Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deb822.sources #284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Deb822.sources #284

wants to merge 1 commit into from

Conversation

crpb
Copy link

@crpb crpb commented Jan 7, 2025

# TODO
In case of the Wayback machine and CLASS=RELEASE we might get a booboo? (not tested yet)
[x] - update config/hooksupdatebase.GRMLBASE

Maybe use Pinning to generally set snapshots.debian.org so both configs could live w/o breaking things

- but don't think thats possible..
root@grml-sid ~ # apt update ; apt policy
Hit:1 http://deb.debian.org/debian sid InRelease
Hit:3 http://deb.grml.org grml-live InRelease
Hit:4 http://deb.grml.org grml-stable InRelease
Hit:5 http://deb.grml.org grml-testing InRelease
Hit:2 http://snapshot.debian.org/archive/debian/20250107 sid InRelease
Hit:6 http://snapshot.debian.org/archive/debian/20240107 sid InRelease
All packages are up to date.
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/20240107 sid/non-free amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20240107 sid/non-free-firmware amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free-firmware,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20240107 sid/contrib amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20240107 sid/main amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20250107 sid/non-free amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20250107 sid/non-free-firmware amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free-firmware,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20250107 sid/contrib amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=amd64
     origin snapshot.debian.org
 500 http://snapshot.debian.org/archive/debian/20250107 sid/main amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=amd64
     origin snapshot.debian.org
 500 http://deb.debian.org/debian sid/non-free-firmware amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free-firmware,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian sid/non-free amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian sid/contrib amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=contrib,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian sid/main amd64 Packages
     release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=amd64
     origin deb.debian.org
Pinned packages:

The Types of "deb" and "deb-src" could go together but this way you could disable deb-src if wished easily.
Of course this could also be done with all Components but that would be a bit overbord.

~~ [ ] - add backports ~~

@crpb crpb force-pushed the deb822 branch 3 times, most recently from c2f1118 to 3806869 Compare January 8, 2025 09:34
config/hooks/instsoft.GRMLBASE Outdated Show resolved Hide resolved
@crpb
Copy link
Author

crpb commented Jan 8, 2025

i guess that's finished

@crpb crpb force-pushed the deb822 branch 2 times, most recently from 745800b to 2c61586 Compare January 8, 2025 19:37
Copy link
Member

@mika mika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase and consider squashing the changes into one single change if possible :)

grml-live Show resolved Hide resolved
perl -pi -e 'BEGIN { $d="'"$current_date"'"; } s#^(\s+)(deb.* )(.*://deb.debian.org.*?)\s+([a-z-]+)\s+(.*)$#$1$2http://snapshot.debian.org/archive/debian/$d/ $4 $5#' \
"${target}/etc/apt/sources.list.d/debian.list"
perl -pi -e 'BEGIN { $d="'"$current_date"'"; } \
s#^(URIs:)\s+(.*://deb.debian.org.*?)$#$1 http://snapshot.debian.org/archive/debian/$d/#' \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, @zeha might it worth switching to https also for snapshot.d.o in a followup commit? 🤔
(Same for config/hooks/updatebase.GRMLBASE of course)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think apt-cacher-ng won't be amused with such changes and no further configuration on it's side.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think https is not adding value here. Lets stay with http for all sources.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks && ACK

@crpb crpb force-pushed the deb822 branch 3 times, most recently from dd530a2 to b01814e Compare January 16, 2025 18:24
Copy link
Member

@mika mika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, some minor ideas

@zeha are you also fine with this deb822 approach?

config/files/etc/apt/sources.list.d/grml.sources/GRMLBASE Outdated Show resolved Hide resolved
perl -pi -e 'BEGIN { $d="'"$current_date"'"; } s#^(\s+)(deb.* )(.*://deb.debian.org.*?)\s+([a-z-]+)\s+(.*)$#$1$2http://snapshot.debian.org/archive/debian/$d/ $4 $5#' \
"${target}/etc/apt/sources.list.d/debian.list"
perl -pi -e 'BEGIN { $d="'"$current_date"'"; } \
s#^(URIs:)\s+(.*://deb.debian.org.*?)$#$1 http://snapshot.debian.org/archive/debian/$d/#' \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks && ACK

@@ -0,0 +1,28 @@
Types: deb deb-src
URIs: http://deb.debian.org/debian/
Suites:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we maybe also put all the Suites and Components into one single line, this should simplify search/replace with sed etc?

Copy link
Author

@crpb crpb Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it? if you want to enable backports it's just a sed '/backports/ s/# // ; t ; s/' away
How do you do that in a single line?
Run this two times 🙊

sed -i '/backports/ s/# // ; t ; s/^t/# t/' DEBIAN_TRIXIE ; cat DEBIAN_TRIXIE

which is of course a bit longer but just to illustrate that you only need to switch out "backports" (and the "t" 🙈 )and nothing else.

Mir is ja wurscht, ich finds so nur bequemer und übersichtlicher.

Components: main
Enabled: yes
Signed-By:
/usr/share/keyrings/grml-archive-keyring.gpg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was wondering how this can work, and indeed CI says it doesn't:

Err:3 http://deb.grml.org/ grml-stable InRelease
  Sub-process /usr/bin/sqv returned an error code (1), error message is: Error: Failed to parse keyring "/usr/share/keyrings/grml-archive-keyring.gpg"  Caused by:     0: Reading "/usr/share/keyrings/grml-archive-keyring.gpg": No such file or directory (os error 2)     1: No such file or directory (os error 2)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and how did it work before it was a link from /etc/trusted.gpg.d/ to the same location?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config/files/etc/apt/trusted.gpg.d/grml-archive-keyring.gpg/GRMLBASE was installed; its a regular file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

gpg --export-options export-minimal --armor --export < /usr/share/keyrings/grml-archive-keyring.gpg |wc -l
468

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that presumes the keyring is already installed. here we're faced with making it spring into existence somehow!

* replaced all sources.list's with deb822.sources.
* grml-archive-keyring.gpg: move to apt/keyrings - apt-secure(8)
* patched wayback(snapshot) hook and 33apt-setup to work with .sources.
* grml-live: added the wayback date to the configuration output as confirmation
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.

3 participants