Support snapshot usage with -w <date> option also during bootstrapping
The wayback option -w doesn't yet respect the given date for bootstrapping the issue.
This can be worked around via providing a custom BASEFILE, though we should support the wayback option also during the automated debootstrap/mmdebstrap riun if no BASEFILE exists.
(Forwarding from customer, TT#69519 in customer's ticket system)
I think this was implemented in 1601f8b9d0a91b5fbaea9343ed07f589e6b4267f ? If not, it would be good to know how exactly this doesn't work.
I think this now works in the initial bootstraping thanks to mmdebstrap!
Executing grml-live -s stable -a amd64 -c GRMLBASE,GRML_SMALL,AMD64 -o [...] -v 2025-06-06 -w 20250601 v0.53.1 works fine in bootstrapping, now only failing later on:
[...]
Wayback date '20250601' identified, enabling for snapshot.debian.org usage.
D: fcopy recursive=True ignore_missing=True user='root' group='root' mode=420 paths=['etc/apt']
I: fcopy: Installing /usr/share/grml-live/config/files/DEBIAN_STABLE/etc/apt/sources.list.d/debian.sources as /home/mika/build/grml-live-testing/grml_chroot/etc/apt/sources.list.d/debian.sources.
I: fcopy: Installing /usr/share/grml-live/config/files/GRMLBASE/etc/apt/sources.list as /home/mika/build/grml-live-testing/grml_chroot/etc/apt/sources.list.
W: fcopy: Destination /home/mika/build/grml-live-testing/grml_chroot/etc/apt/sources.list already exists, removing.
I: fcopy: Installing /usr/share/grml-live/config/files/GRMLBASE/etc/apt/sources.list.d/grml.sources as /home/mika/build/grml-live-testing/grml_chroot/etc/apt/sources.list.d/grml.sources.
I: fcopy: Installing /usr/share/grml-live/config/files/GRMLBASE/etc/apt/preferences.d/15grml.pref as /home/mika/build/grml-live-testing/grml_chroot/etc/apt/preferences.d/15grml.pref.
I: fcopy: Installing /usr/share/grml-live/config/files/GRMLBASE/etc/apt/apt.conf.d/15grml-live as /home/mika/build/grml-live-testing/grml_chroot/etc/apt/apt.conf.d/15grml-live.
I: fcopy: Installing /usr/share/grml-live/config/files/GRMLBASE/etc/apt/apt.conf.d/20pdiffs as /home/mika/build/grml-live-testing/grml_chroot/etc/apt/apt.conf.d/20pdiffs.
D: fcopy recursive=True ignore_missing=True user='root' group='root' mode=420 paths=['usr/share/keyrings']
I: fcopy: Installing /usr/share/grml-live/config/files/GRMLBASE/usr/share/keyrings/grml-archive-keyring.gpg as /home/mika/build/grml-live-testing/grml_chroot/usr/share/keyrings/grml-archive-keyring.gpg.
I: Finished script /usr/share/grml-live/config/hooks/GRMLBASE/updatebase.
I: Installing temporary policy-rc.d
D: Running "chroot" "/home/mika/build/grml-live-testing/grml_chroot" "apt-get" "update" "-q"
E: Malformed entry 1 in sources file /etc/apt/sources.list.d/debian.sources (Suite)
E: The list of sources could not be read.
Traceback (most recent call last):
File "/sbin/..//lib/grml-live/minifai", line 702, in main
rc = _run_tasks(conf_dir, chroot_dir, classes, args.grml_live_config, args.action)
File "/sbin/..//lib/grml-live/minifai", line 658, in _run_tasks
task_updatebase(chroot_dir, dynamic_state)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sbin/..//lib/grml-live/minifai", line 639, in task_updatebase
run_chrooted(chroot_dir, ["apt-get", "update", "-q"])
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sbin/..//lib/grml-live/minifai", line 132, in run_chrooted
return run_x(["chroot", chroot_dir] + args, check=check, **kwargs)
File "/sbin/..//lib/grml-live/minifai", line 123, in run_x
return subprocess.run(args, check=check, **kwargs)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['chroot', '/home/mika/build/grml-live-testing/grml_chroot', 'apt-get', 'update', '-q']' returned non-zero exit status 100.
I: Cleaning up /home/mika/build/grml-live-testing/grml_chroot/usr/sbin/policy-rc.d
E: 2025-06-06T12:05:53.458003 minifai main caught fatal exception
I: minifai exiting with exit code 2
[ FAIL ] Error: critical error while executing fai [exit code 2]. Exiting.
grml-live -s stable -a amd64 -c DEBORPHAN,GRMLBASE,GRML_SMALL,AMD64 -o -v - 10.93s user 6.14s system 28% cpu 1:00.02 total
FTR:
root@corazon /home/mika/build # cat /home/mika/build/grml-live-testing/grml_chroot/etc/apt/sources.list.d/debian.sources
Types: deb deb-src
URIs: http://snapshot.debian.org/archive/debian/20250601/
Suites:
Check-Valid-Until: no
stable
# stable-updates
# stable-proposed-updates
stable-backports
Components:
main
contrib
non-free-firmware
non-free
Enabled: yes
Signed-By:
/usr/share/keyrings/debian-archive-keyring.gpg
Types: deb deb-src
URIs: http://snapshot.debian.org/archive/debian/20250601/
Suites: stable-security
Check-Valid-Until: no
Components:
main
contrib
non-free-firmware
non-free
Enabled: yes
Signed-By:
/usr/share/keyrings/debian-archive-keyring.gpg
Same also when using bookworm instead of stable, then we end up with:
Types: deb deb-src
URIs: http://snapshot.debian.org/archive/debian/20250601/
Suites:
Check-Valid-Until: no
bookworm
# bookworm-updates
# bookworm-proposed-updates
# bookworm-backports
Components:
main
contrib
AFAICS commit 4f36e593bc35927932e954d0d5949fe42d3170c3 with its change to config/hooks/updatebase.GRMLBASE isn't properly handling this for the multiline configuration with:
Suites:
stable
# stable-updates
# stable-proposed-updates
stable-backports
Maybe @crpb has some perl magic for us? :)
@mika given #340 was merged, does this work now?
If its important maybe a CI check would also be good...
Thanks for the ping, I raised this at $customer internally. (If we shouldn't have any feedback by the end of September 2025 we can certainly close this here, unless we want to use it for tracking CI stuff or alike!)
If its important maybe a CI check would also be good...
That would be very interesting, also for checking that reproducible builds (continue to) work as expected!
That would be very interesting, also for checking that reproducible builds (continue to) work as expected!
Yes indeed. Might be good to get a github daily build with this, validating yesterdays daily build, or something.