Distro keys updater keep only primary signing key remove expired ones : reduces size of archlinux.key and tails.key#2078
Merged
tlaurion merged 2 commits intolinuxboot:masterfrom Mar 27, 2026
Conversation
Introduces a maintainable structure for keeping distro signing keys under initrd/etc/distro/keys/ up to date: bin/update_distro_signing_key/lib/helper.sh -- shared logic bin/update_distro_signing_key/tails.sh -- Tails bin/update_distro_signing_key/archlinux.sh -- Arch Linux bin/update_distro_signing_key/qubes.sh -- Qubes OS 4.2/4.3/weekly bin/update_distro_signing_keys.sh -- meta: runs all scripts The meta script auto-discovers all *.sh in update_distro_signing_key/; adding a new distro only requires adding one script there. Exit codes of the meta script: 0 all keys up to date, no action needed 1 one or more keys changed (review with git diff, then commit) 2 one or more per-distro scripts failed (download/import error) The helper normalizes each key with: --export-options export-minimal,export-clean --export-filter drop-subkey=expired -gt 0 || usage !~ s Only the primary key and non-expired signing subkeys are kept -- no encryption, authentication, or expired subkeys. The helper also reports primary key expiry with days remaining, and emits a color-coded warning (yellow) when expiry is within 365 days (one full release cycle) or red if already expired -- so rotations are caught before they ship in a release and break users in the field. All gpg calls use --batch to prevent interactive prompts in CI. git diff uses -C flag to avoid cd side-effects. qubes.sh propagates the highest exit code across all three key updates. GPG work is done in a mktemp directory wiped via trap on EXIT. Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Re-export both keys through the new update_distro_signing_key scripts to strip non-signing subkeys (encryption, authentication) and expired subkeys that had accumulated in the in-tree copies. Only the primary key and currently-valid signing subkeys are retained. archlinux.key: 1168B -> 673B (495B saved, auth+encrypt subkeys removed) tails.key: 21282B -> 7376B (13906B saved, expired+non-signing subkeys removed) Qubes OS keys (4.2, 4.3, weekly builds) were already minimal -- no change. Fixes linuxboot#2066. This class of manual update has been needed repeatedly in the past and was caught late each time, causing distro ISO verification failures in the field for Tails and other supported distros: linuxboot#1808 (issue: Tails key expired, ISOs unbootable) linuxboot#1631 (PR: update tails.key, replay of manual steps) linuxboot#1809 (PR: replay of linuxboot#1631 for next Tails rotation) linuxboot#2000 (PR: Tails 7.0 key, same manual process again) linuxboot#1457 (PR: Arch Linux key update) linuxboot#2033 (PR: Qubes OS 4.3 key addition) TODO: wire bin/update_distro_signing_keys.sh into CI (e.g. a scheduled workflow) so upstream key rotations are detected automatically before they break users. Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Collaborator
Author
|
Concern on Tails distro signing key short expiration window raised in my relance for exfat support under their initramfs at reopened issue https://gitlab.tails.boum.org/tails/tails/-/work_items/20621 |
Collaborator
Author
opened https://gitlab.tails.boum.org/tails/tails/-/work_items/21492 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bin/: add update_distro_signing_key/ scripts for all distro signing keys
Introduces a maintainable structure for keeping distro signing keys under initrd/etc/distro/keys/ up to date:
Result of running scripts:
WARNING: [Tails] Primary key expires 2027-01-13 (292 days) -- update soon!
To reproduce: