[generic-release/f20] fix key linking with archmap
Tom Callaway
spot at fedoraproject.org
Mon Jun 9 18:45:26 UTC 2014
commit 7b0e9e7ed5e316d5466f9418c7cf51019f027042
Author: Tom Callaway <spot at fedoraproject.org>
Date: Mon Jun 9 14:45:19 2014 -0400
fix key linking with archmap
generic-release.spec | 32 +++++++++++++++++++++-----------
sources | 2 +-
2 files changed, 22 insertions(+), 12 deletions(-)
---
diff --git a/generic-release.spec b/generic-release.spec
index 13ff447..b4b23e6 100644
--- a/generic-release.spec
+++ b/generic-release.spec
@@ -4,7 +4,7 @@
Summary: Generic release files
Name: generic-release
Version: 20
-Release: 3
+Release: 4
License: GPLv2
Group: System Environment/Base
Source: %{name}-%{version}.tar.gz
@@ -70,24 +70,31 @@ VERSION_ID=%{version}
PRETTY_NAME="Generic %{version} (%{release_name})"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:generic:generic:%{version}"
+HOME_URL="http://zombo.com/"
+BUG_REPORT_URL="http://zombo.com/"
EOF
+# Install the keys
install -d -m 755 $RPM_BUILD_ROOT/etc/pki/rpm-gpg
install -m 644 RPM-GPG-KEY* $RPM_BUILD_ROOT/etc/pki/rpm-gpg/
-# Install all the keys, link the primary keys to primary arch files
-# and to compat generic location
+# Link the primary/secondary keys to arch files, according to archmap.
+# Ex: if there's a key named RPM-GPG-KEY-fedora-19-primary, and archmap
+# says "fedora-19-primary: i386 x86_64",
+# RPM-GPG-KEY-fedora-19-{i386,x86_64} will be symlinked to that key.
pushd $RPM_BUILD_ROOT/etc/pki/rpm-gpg/
-for arch in i386 x86_64
- do
- ln -s RPM-GPG-KEY-fedora-%{dist_version}-primary RPM-GPG-KEY-fedora-$arch
-done
-ln -s RPM-GPG-KEY-fedora-%{dist_version}-primary RPM-GPG-KEY-fedora
-for arch in arm armhfp aarch64 ppc ppc64 s390 s390x
- do
- ln -s RPM-GPG-KEY-fedora-%{dist_version}-secondary RPM-GPG-KEY-fedora-$arch
+for keyfile in RPM-GPG-KEY*; do
+ key=${keyfile#RPM-GPG-KEY-} # e.g. 'fedora-20-primary'
+ arches=$(sed -ne "s/^${key}://p" $RPM_BUILD_DIR/%{name}-%{version}/archmap) \
+ || echo "WARNING: no archmap entry for $key"
+ for arch in $arches; do
+ # replace last part with $arch (fedora-20-primary -> fedora-20-$arch)
+ ln -s $keyfile ${keyfile%%-*}-$arch # NOTE: RPM replaces %% with %
+ done
done
+# and add symlink for compat generic location
+ln -s RPM-GPG-KEY-fedora-%{dist_version}-primary RPM-GPG-KEY-%{dist_version}-fedora
popd
install -d -m 755 $RPM_BUILD_ROOT/etc/yum.repos.d
@@ -134,6 +141,9 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) /etc/yum.repos.d/fedora-rawhide.repo
%changelog
+* Mon Jun 9 2014 Tom Callaway <spot at fedoraproject.org> 20-4
+- use archmap
+
* Sun Mar 09 2014 Bruno Wolff III <bruno at wolff.to> - 20-3
- Put dist macro file in the correct directory
diff --git a/sources b/sources
index 13ab3d4..984213e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-864b9c98539f964552944292bfaa01d1 generic-release-20.tar.gz
+3a5ef5e6309ef496b5a1a16f039e6f33 generic-release-20.tar.gz
More information about the scm-commits
mailing list