Repository navigation
aurora-repos: refresh the Aurora repository without a key prompt - #134
Merged
Merged
Conversation
aurora-repos 44-1 and the images set repo_gpgcheck=1. Fedora 44's dnf5 (5.4.6) trusts a repository metadata key only through its confirmation callback, and only keeps it in <repo cachedir>/pubring. Nothing in the release pre-trusts a key: no option, and no key location it reads without asking. A run that cannot answer the prompt declines it; with Fedora's skip_if_unavailable=True the repository is then skipped, and "Metadata cache created" is printed anyway. On a fresh fedora:44 with the testing feed: - dnf makecache </dev/null, dnf5-makecache.service, dnf upgrade --assumeno and dnf5 offline-upgrade download: 0 Aurora packages, so every Aurora update (kernels included) silently stops; - dnf on a terminal: asks to import the key on the first refresh; - PackageKit (KDE Discover): works, because its dnf5 backend registers no key callback and libdnf5 then imports without asking; - dnf5daemon (GNOME Software): works for root and for an active local wheel user (polkit rule); a wheel user outside an active session gets no Aurora packages. It keeps its own cache, so its key does not help the command line. Upstream dnf5 added auto_import_local_keys for this (e2e9b94, 04683e7, October 2026); no release has it yet. Seeding the pubring depends on libdnf5 and librepo internals and needs redoing for every cache directory and baseurl. A dnf5 fork would shadow Fedora's dnf5 under priority=1. So the repository checks package signatures only, as Fedora's own repositories and COPR do. The feed still signs repomd.xml. What is lost is the check against forged metadata from a compromised origin. Transport stays HTTPS to a single origin, and an unsigned or wrongly signed package is still refused. libdnf5 never checked metadata freshness, so a replayed older signed repomd was accepted before too. - aurora-repos 44-2 sets repo_gpgcheck=0 and auto_import_local_keys=1 in a dnf5 repository override, /usr/share/dnf5/repos.override.d/ 50-aurora.repo. dnf5, PackageKit and dnf5daemon all read it, and it applies where aurora.repo was changed locally, as in an image built for another channel. Once Fedora's dnf5 has auto_import_local_keys, the metadata check can return there. - images/configure.py writes aurora-repos's own repo file (only the baseurl differs), so testing images keep a file rpm can replace. - config.sh imports the Aurora key into the image rpm database and fails the build without it. KIWI already imports <signing> keys, but without the key the first Aurora install asks again. - The KIWI Aurora repository sets package_gpgcheck. KIWI writes gpgcheck=0 into its own repo files otherwise, and image builds skipped the check for every package. - scripts/test-repo-trust exercises the shipped files with probe packages and signed metadata from a throwaway key, on Fedora 44 and 45 in CI. Existing installs whose refreshes skip the repository get 44-2 from Discover, GNOME Software, dnf -y, or one interactive dnf where the prompt is accepted. After that no path asks. Assisted-by: Claude Opus 5.5
This was referenced Nov 3, 2026
RyanTheTide
added a commit
that referenced
this pull request
Nov 9, 2026
…C8.2 The switch-on now requires speakerguardd-v2 RC8.2 or later (same-boot switch grants, #134) and the matching aurora-speaker-upgrade. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> Assisted-by: LLM
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.
On a fresh Aurora Fedora 44 install, every refresh that can't answer a key prompt drops the Aurora repository, and every Aurora update with it, kernels included. This PR makes every update path see the repository with no prompt. Packages are still signature-checked; the repository metadata signature is no longer checked.
Root cause
aurora.repo(aurora-repos 44-1 and the image's copy) setrepo_gpgcheck=1. Fedora 44's dnf5 5.4.6 only trusts a metadata key through its confirmation callback (RepoPgp::import_key). It keeps the key in<repo cachedir>/pubring, a directory of librepo<keyid>.pubfiles. The release has no option and no key location that skips the question. The CLI's callback declines on--assumenoor EOF. Fedora setsskip_if_unavailable=True, so the repository is then skipped, and dnf still prints "Metadata cache created".Measured on fresh
fedora:44containers (dnf5 5.4.6, librepo 1.21.2, PackageKit 1.4.0) against the live testing feed. "Before" is 44-1. "After" is this PR. The key is in the rpmdb, as in the image.dnf makecache </dev/nulldnf5-makecache.service(/usr/bin/dnf5 makecache)dnf upgrade --assumenosees no Aurora updatednf upgrade --refresh --assumenodnf upgradeon a ttydnf5 offline-upgrade download-y)pkcon refresh force,get-updates/var/cache/PackageKit/44/metadata/aurora-*/pubringwithout asking/var/cache/dnf5daemon-server, so its key never helps the CLIOptions considered
auto_import_local_keys(keys under/usr/share/pki/rpm-gpgor/etc/pki/rpm-gpgimport without asking): rpm-software-management/dnf5 e2e9b94 (2026-10-05) and 04683e7 (2026-10-14). No release has it yet. 5.4.6 ignores the option silently (checked: no output, nothing indnf5.log).<id>-sha256(baseurl)[:16]. Each consumer has its own: the CLI,~/.cachefor users, PackageKit, dnf5daemon. The file format belongs to librepo's OpenPGP backend (a gpgme keybox before,.pubfiles now).dnf clean alldoes keep it. It would have to be redone after every baseurl change (channel switch, release upgrade), and an rpm scriptlet can't run dnf.priority=1and forks here aren't tracked automatically, so an Aurora dnf5 would hide Fedora's dnf5 updates.That leaves
repo_gpgcheck=0withgpgcheck=1, as Fedora's own repositories and COPR do. The cost is the check against forged metadata from a compromised origin or CDN. Such metadata can't get an unsigned or foreign package installed, but it could, for example, add obsoletes or dependencies among signed packages. The check never guarded against replay: libdnf5 and librepo don't compare metadata age or revision, so a replayed older signed repomd passes today too. Transport stays HTTPS to a single origin. The feed keeps signing repomd.xml, so the check can come back as a one-file change once Fedora shipsauto_import_local_keys. Meanwhile the old setting caused the very freeze the metadata signature is meant to resist, silently, on the timer.Changes
repo_gpgcheck=0andauto_import_local_keys=1live in a dnf5 distribution override,/usr/share/dnf5/repos.override.d/50-aurora.repo. The CLI, PackageKit and dnf5daemon all callcreate_repos_from_system_configuration(), which applies it. It also takes effect whereaurora.repowas changed locally, as in an image built for another channel. An admin can still mask it from/etc/dnf/repos.override.d/.aurora.repoitself keepsgpgcheck=1, the key and the priority.aurora.repois now aurora-repos's own file, with only the baseurl replaced. A testing image therefore keeps a file rpm treats as unmodified and replaces on update.config.shrunsrpm --importon the Aurora key and fails unlessrpmkeys --list <fingerprint>finds it.package_gpgcheck="true". Without it, KIWI writesgpgcheck=0into its build repo files, and a minimalkiwi-ng system preparereported "skipped OpenPGP checks for 104 packages from repositories: aurora, fedora". With it, Aurora packages are checked, and a wrong<signing>key fails the build ("OpenPGP check for package aurora-release … has failed").tests/test_specs.pyandimages/test_configure.pycover the override, the repo file, the key check and the KIWI attribute.scripts/test-repo-trustis a new CI job on Fedora 44 and 45. Probe packages and metadata are signed with a throwaway key and served through the shipped files. It checksdnf5 makecachewith no answer (with the shipped file and with a changed file still sayingrepo_gpgcheck=1),upgrade --assumeno,offline-upgrade download,pkcon refreshandget-updates, and an interactive upgrade. It also checks that unsigned and foreign packages are refused. It fails against 44-1's file, and against an empty override with a changed file.docs/updates.md,images/README.md.Verification (oracle, aarch64 containers, live feed)
file://:aurora-reposwith its signature removed: refused by both ("The package is not signed")..rpmnew,rpm -Vclean, effectiverepo_gpgcheck = 0.makecache </dev/nullgoes from a prompt and 0 packages to 167 with no prompt..rpmnewwritten), and the override still makesrepo_gpgcheck = 0. 167 packages, no prompt.<signing>key (rpm --root … --import …/RPM-GPG-KEY-aurora).rpmkeys --rootlists D6C97493… in the image rpmdb.python3 -m unittest discover -s testspasses (249, in Ubuntu 24.04).images/test_configure.py(16),compileall,bash -nandgit diff --checkpass too.Existing installs: the chicken-and-egg
A system whose refreshes skip the repository can't get 44-2 from the timer or from a non-interactive
dnf. It gets it from:sudo dnf -y upgrade,sudo dnf upgradewhere the key prompt is accepted.After that no path asks. A system where someone already accepted the prompt keeps working throughout.
Follow-ups (not in this PR)
auto_import_local_keys, setrepo_gpgcheck=1in the override and require that libdnf5.package_gpgcheck="true"there would need a change to the pinned upstream description.aurora.repohard-codes44in the baseurl, so asystem-upgradeto 45 keeps using the 44 feed until aurora-repos 45 replaces the file.🤖 Generated with Claude Code