[Fedora-spins] [spin-kickstarts] cloud image import fedora GPG key for RPMs, as the livecd does

Matthew Miller mattdm at fedoraproject.org
Fri Dec 6 17:16:24 UTC 2013


commit c6f36e4c103de8a5be3ddc54efc3bfed0e85ac88
Author: Matthew Miller <mattdm at mattdm.org>
Date:   Fri Dec 6 12:16:02 2013 -0500

    cloud image import fedora GPG key for RPMs, as the livecd does

 fedora-cloud-base.ks |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/fedora-cloud-base.ks b/fedora-cloud-base.ks
index 0ac5b4e..5e847e2 100644
--- a/fedora-cloud-base.ks
+++ b/fedora-cloud-base.ks
@@ -195,6 +195,19 @@ yum history new
 yum clean all
 truncate -c -s 0 /var/log/yum.log
 
+echo "Import RPM GPG key"
+releasever=$(rpm -q --qf '%{version}\n' fedora-release)
+basearch=$(uname -m)
+rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
+
+echo "Packages within this cloud image:"
+echo "-----------------------------------------------------------------------"
+rpm -qa
+echo "-----------------------------------------------------------------------"
+# Note that running rpm recreates the rpm db files which aren't needed/wanted
+rm -f /var/lib/rpm/__db*
+
+
 echo "Fixing SELinux contexts."
 touch /var/log/cron
 touch /var/log/boot.log


More information about the spins mailing list