Skip to content

Conversation

@crpb
Copy link
Contributor

@crpb crpb commented Aug 23, 2025

  • If the class RELEASE is enabled (which is now default) and we use the waybackmachine the sources.list(5) entry 'Check-Valid-Until' will be taken care by config/scripts/GRMLBASE/33-aptsetup

@zeha
Copy link
Member

zeha commented Aug 23, 2025

pretty sure ifclass ! RELEASE doesn't do what you want there.

if ! ifclass RELEASE should work. and we dont need quotes around RELEASE :)

@crpb
Copy link
Contributor Author

crpb commented Aug 23, 2025

pretty sure ifclass ! RELEASE doesn't do what you want there.

DOCH!

% ifclass
ifclass, evaluate boolean expression of FAI classes

   Copyright (C) 2025 by Thomas Lange

Usage: ifclass 'EXPRESSION'
Usage: ifclass [-a|-o] CLASS1 [CLASSN]...

   -o         Evaluate a logical OR  of the given classes
   -a         Evaluate a logical AND of the given classes

Either an expression is given and will be evaluated or a list of classes
is combined with the OR or AND operator.
The list of defined FAI classes must be stored in the variable $classes.

Examples:

$ classes="DEMO AMD64 FAIBASE UBUNTU MINT
$ ifclass 'UBUNTU && ! MINT'
$ ifclass 'DEMO || MINT'
$ ifclass 'AMD64 && ( ROCKY || ALMA )'

and we dont need quotes around RELEASE

i know that it isn't necessary with this simple query but i think it is cleaner to write it like that. someone also did put a space between RELEASE and ; which wasn't necessary 🙈 🙊 🙉

@zeha
Copy link
Member

zeha commented Aug 23, 2025

% ifclass
ifclass, evaluate boolean expression of FAI classes

Copyright (C) 2025 by Thomas Lange

Remember this is not FAI's ifclass :)

@zeha
Copy link
Member

zeha commented Aug 26, 2025

isn't this too simple?

if you build an image without RELEASE, and then rebuild it with -w and RELEASE, won't this fail now?

@zeha
Copy link
Member

zeha commented Aug 26, 2025

isn't this too simple?

if you build an image without RELEASE, and then rebuild it with -w and RELEASE, won't this fail now?

To clarify, IMO a test should be:

grml-live -c GRML_SMALL -s testing -R

and then

grml-live -c GRML_SMALL -s testing -b -w <something>

@crpb
Copy link
Contributor Author

crpb commented Sep 18, 2025

To clarify, IMO a test should be:

grml-live -c GRML_SMALL -s testing -R

and then

grml-live -c GRML_SMALL -s testing -b -w <something>

@zeha
so i just tried that, and it correctly sets the snapshot date on the second run but what i stumbled over is that some packages are then not available anymore (apt list '~o').

is that expected?

command used

root@obelix /tmp/tmp.fPHgZOfxYq # "$GITDIR"/grml-live $GRMLLIVEOPTS -c GRML_SMALL -s testing -R ; cp -ar grml{,.firstrun} ; "$GITDIR"/grml-live $GRMLLIVEOPTS -c GRML_SMALL -s testing -b -w 20250801

difference

root@obelix /tmp/tmp.fPHgZOfxYq # grep '' grml*/grml_chroot/etc/apt/sources.list.d/debian.sources
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Types: deb deb-src
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:URIs: http://deb.debian.org/debian
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Suites:
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: testing
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:# testing-updates
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:# testing-proposed-updates
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:# testing-backports
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Components:
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: main
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: contrib
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: non-free-firmware
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: non-free
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Enabled: yes
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Signed-By:
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: /usr/share/keyrings/debian-archive-keyring.gpg
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Types: deb deb-src
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:URIs: http://deb.debian.org/debian-security
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Suites: testing-security
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Components:
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: main
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: contrib
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: non-free-firmware
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: non-free
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Enabled: yes
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:Signed-By:
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources: /usr/share/keyrings/debian-archive-keyring.gpg
grml.firstrun/grml_chroot/etc/apt/sources.list.d/debian.sources:
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Types: deb deb-src
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Check-Valid-Until: no
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:URIs: http://snapshot.debian.org/archive/debian/20250801
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Suites:
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: testing
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:# testing-updates
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:# testing-proposed-updates
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:# testing-backports
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Components:
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: main
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: contrib
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: non-free-firmware
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: non-free
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Enabled: yes
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Signed-By:
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: /usr/share/keyrings/debian-archive-keyring.gpg
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Types: deb deb-src
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Check-Valid-Until: no
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:URIs: http://snapshot.debian.org/archive/debian-security/20250801
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Suites: testing-security
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Components:
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: main
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: contrib
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: non-free-firmware
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: non-free
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Enabled: yes
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:Signed-By:
grml/grml_chroot/etc/apt/sources.list.d/debian.sources: /usr/share/keyrings/debian-archive-keyring.gpg
grml/grml_chroot/etc/apt/sources.list.d/debian.sources:
root@grml ~ # apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://deb.grml.org grml-testing/main amd64 Packages
     release o=The grml project,a=grml-testing,n=grml-testing,l=grml,c=main,b=amd64
     origin deb.grml.org
 500 http://deb.grml.org grml-stable/main amd64 Packages
     release o=The grml project,a=grml-stable,n=grml-stable,l=grml,c=main,b=amd64
     origin deb.grml.org
 500 http://snapshot.debian.org/archive/debian-security/20250801 testing-security/main amd64 Packages
     release o=Debian,a=testing-security,n=trixie-security,l=Debian-Security,c=main,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20250801 testing/non-free amd64 Packages
     release o=Debian,a=testing,n=trixie,l=Debian,c=non-free,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20250801 testing/non-free-firmware amd64 Packages
     release o=Debian,a=testing,n=trixie,l=Debian,c=non-free-firmware,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20250801 testing/contrib amd64 Packages
     release o=Debian,a=testing,n=trixie,l=Debian,c=contrib,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20250801 testing/main amd64 Packages
     release o=Debian,a=testing,n=trixie,l=Debian,c=main,b=amd64
     origin snapshot.debian.org
Pinned packages:
root@grml ~ # apt list '~o'
gcc-15-base/now 15.2.0-4 amd64 [installed,local]
libsframe2/now 2.45-7 amd64 [installed,local]
linux-image-6.16.7+deb14-amd64/now 6.16.7-1 amd64 [installed,local]
root@grml ~ #

* If the class RELEASE is enabled (which is now default) and we use the
  waybackmachine the sources.list(5) entry 'Check-Valid-Until' will
  be taken care by config/scripts/GRMLBASE/33-aptsetup
@crpb
Copy link
Contributor Author

crpb commented Oct 4, 2025

same result with a current merge... anything else i could test or do we want a workflow test for this? ¯\_(ツ)_/¯

@zeha
Copy link
Member

zeha commented Oct 5, 2025

it correctly sets the snapshot date on the second run but what i stumbled over is that some packages are then not available anymore (apt list '~o').

I mean obviously, if you pick an older date than what you built with, some packages will not be available.

@zeha
Copy link
Member

zeha commented Oct 5, 2025

General questions I have about updatebase:

  • Should the debian sources be managed by it at all, or should grml-live know and do more there? It already deals with the bootstrap mirror and has to provide an initial set of keys.
  • Is -w useful at all in a second run?
  • Should the chroot/hostname setup be in that script or in grml-live?

@crpb
Copy link
Contributor Author

crpb commented Oct 5, 2025

I mean obviously, if you pick an older date than what you built with, some packages will not be available.

yeah i know that but maybe it would be prefferred to 'reinstall' those with the currently available version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants