public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedora-repos] f45: Add a check that RPM can import the same keys as GPG
@ 2026-08-10 9:41 Adam Williamson
0 siblings, 0 replies; only message in thread
From: Adam Williamson @ 2026-08-10 9:41 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/fedora-repos
Branch : f45
Commit : f2cbb4bb926df42720899375b18652192f0d6f65
Author : Adam Williamson <awilliam@redhat.com>
Date : 2022-08-16T22:47:08-04:00
Stats : +5/-2 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/fedora-repos/c/f2cbb4bb926df42720899375b18652192f0d6f65?branch=f45
Log:
Add a check that RPM can import the same keys as GPG
`rpm --import` seems to be stricter than `gpg --import` on white
space issues - gpg imported the problematic Fedora 39 key file
that was just fixed fine, but rpm refused it. So let's check
that `rpm --import` works on all the keys we check `gpg --import`
on too.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
diff --git a/fedora-repos.spec b/fedora-repos.spec
index 4a2c669..19e0312 100644
--- a/fedora-repos.spec
+++ b/fedora-repos.spec
@@ -17,7 +17,7 @@ Requires: fedora-repos-rawhide = %{version}-%{release}
Requires: fedora-gpg-keys >= %{version}-%{release}
BuildArch: noarch
# Required by %%check
-BuildRequires: gnupg sed
+BuildRequires: gnupg sed rpm
Source1: archmap
Source2: fedora.repo
@@ -357,14 +357,17 @@ for repo in $RPM_BUILD_ROOT/etc/yum.repos.d/fedora-rawhide*.repo; do
done <<< "$gpg_lines"
done
-# Check arch keys exists on supported architectures
+# Check arch keys exists on supported architectures, and RPM considers
+# them valid
TMPRING=$(mktemp)
+DBPATH=$(mktemp -d)
for VER in %{version} %{rawhide_release} ${rawhide_next}; do
echo -n > "$TMPRING"
for ARCH in $(sed -ne "s/^fedora-${VER}-primary://p" %{_sourcedir}/archmap)
do
gpg --no-default-keyring --keyring="$TMPRING" \
--import $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-fedora-$VER-$ARCH
+ rpm --dbpath "$DBPATH" --import $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-fedora-$VER-$ARCH --test
done
# Ensure some arch key was imported
gpg --no-default-keyring --keyring="$TMPRING" --list-keys | grep -A 2 '^pub\s'
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-10 9:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10 9:41 [rpms/fedora-repos] f45: Add a check that RPM can import the same keys as GPG Adam Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox