Use deb822 sources format everywhere
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.
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.
@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?
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.
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.
I think now is fine.
I think now is fine.
As in: switch it for trixie and newer?
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.