Skip to content

Commit 876c466

Browse files
committed
build.sh: add CentOS Stream keys into /etc/pki/rpm-gpg
This goes together with a related patch in openshift/os. Copying the same context from that one: A long-standing issue that rears its head in various places in our code is the fact that the repo files for CentOS Stream reference a `gpgkey` path that is valid only for cosa but not within a CentOS Stream environment. See e.g. 0a7ad3b ("extensions: Workaround for CentOS GPG key paths") in the openshift/os repo for an example issue. We don't have this problem with RHEL because cosa, being Fedora-based, ships the Red Hat key in its `/etc/pki/rpm-gpg`. I want to address this for CentOS Stream the same way, i.e. by adding the CentOS Stream keys to `/etc/pki/rpm-gpg` in cosa. This should allow us to simplify code there.
1 parent e504452 commit 876c466

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ install_rpms() {
9090
fi
9191
# Similarly for kernel data and SELinux policy, which we want to inject into supermin
9292
chmod -R a+rX /usr/lib/modules /usr/share/selinux/targeted
93+
94+
# Symlink the CentOS Stream GPG keys to /etc to make it easier to build
95+
# CentOS-based artifacts.
96+
if [ ! -e "/etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial" ]; then
97+
ln -s /usr/share/distribution-gpg-keys/centos/RPM-GPG-KEY-CentOS-Official /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
98+
ln -s {/usr/share/distribution-gpg-keys/centos,/etc/pki/rpm-gpg}/RPM-GPG-KEY-CentOS-SIG-Cloud
99+
ln -s {/usr/share/distribution-gpg-keys/centos,/etc/pki/rpm-gpg}/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
100+
ln -s {/usr/share/distribution-gpg-keys/centos,/etc/pki/rpm-gpg}/RPM-GPG-KEY-CentOS-SIG-NFV
101+
ln -s {/usr/share/distribution-gpg-keys/centos,/etc/pki/rpm-gpg}/RPM-GPG-KEY-CentOS-SIG-Virtualization
102+
fi
103+
93104
# Further cleanup
94105
yum clean all
95106
}

0 commit comments

Comments
 (0)