grml-debootstrap icon indicating copy to clipboard operation
grml-debootstrap copied to clipboard

Use deb822 sources format everywhere

Open ArrayBolt3 opened this issue 5 months ago • 1 comments

This should be a relatively straightforward change. I went through all files searching for list and deb , porting any one-line format code to deb822 as I went.

Unfortunately, the most complex bit of code, the deletesource function in chroot-script, has not been tested in an actual VM build, as I'm not sure how to even trigger it. $MIRROR has to be a file: URL for remove_chrootmirror to be called, and that's the only function that calls deletesource. But for $MIRROR to be a file: URL, the contents of the mirror would have to be signed by the Debian archive keyring, which means I'd need to clone the Debian archive or some substantial portion thereof, which I don't currently know how to do. I have tested deletesource in an interactive Bash shell and it seems to work in a couple of scenarios (copy /usr/share/doc/apt/examples/debian.sources to your home dir, then try deletesource ~/debian.sources 'deb' 'http://deb.debian.org/debian' 'trixie trixie-updates' 'main contrib non-free non-free-firmware' '/usr/share/keyrings/debian-archive-keyring.gpg' and deletesource ~/debian.sources 'deb' 'http://deb.debian.org/debian-security' 'trixie-security', see what happens to the file).

I also did not test packer/debian64_provision.sh as I don't know how it's intended to be used. It looks like it's part of Grml's CI system?

Fixes https://github.com/grml/grml-debootstrap/issues/203.

ArrayBolt3 avatar Aug 12 '25 00:08 ArrayBolt3

One possible issue with this way of doing things is that deb822 is now used unconditionally everywhere. I think it's been supported since Jessie, but it might not be desirable to use it in anything older than Trixie.

ArrayBolt3 avatar Aug 12 '25 01:08 ArrayBolt3

@zeha maybe that's something we might wanna unify now for an upcoming version of grml-debootstrap + Grml release? What's your take on old/single-line format vs. deb822?

mika avatar Dec 23 '25 16:12 mika

DEB822-STYLE FORMAT is the future.

Quote https://manpages.debian.org/trixie/apt/sources.list.5.en.html

ONE-LINE-STYLE FORMAT

This format is deprecated and may eventually be removed, but not before 2029.

adrelanos avatar Dec 25 '25 16:12 adrelanos

DEB822-STYLE FORMAT is the future. [...]

Yes, but as @ArrayBolt3 wrote:

I think it's been supported since Jessie, but it might not be desirable to use it in anything older than Trixie.

So we should decide when (in terms of which Debian releases) to use deb822 format.

mika avatar Dec 27 '25 10:12 mika

I think now is fine.

zeha avatar Dec 27 '25 10:12 zeha

I think now is fine.

As in: switch it for trixie and newer?

mika avatar Dec 27 '25 14:12 mika

I think now is fine.

As in: switch it for trixie and newer?

No, just for everything we support (which is bullseye and newer).

But obviously it should then work for all the releases.

zeha avatar Dec 27 '25 21:12 zeha