Only sign things on x86_64; all else ignore gracefully.

This commit is contained in:
Peter Jones 2012-08-14 15:46:35 -04:00
parent a28df7d436
commit cc70e8687e
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From a8e0e93a15ae57dcfc2bf20921fc5fe604dee3fa Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 14 Aug 2012 15:44:26 -0400
Subject: [PATCH] Only sign things on x86_64.
---
src/macros.pesign | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/macros.pesign b/src/macros.pesign
index beb6489..7932629 100644
--- a/src/macros.pesign
+++ b/src/macros.pesign
@@ -9,6 +9,6 @@
%__pesign_token %{expand: %%{nil} %%{?pe_signing_token:-t "%%{pe_signing_token}"}}
%__pesign_cert %{expand: %%{!?pe_signing_cert:-c "Red Hat Test Certificate"} %%{?pe_signing_cert:-c "%%{pe_signing_cert}"}}
-%_pesign /usr/bin/pesign
-%pesign \
-%{_pesign} %{__pesign_token} %{__pesign_cert}
+%_pesign %{expand:%%([ %%{_arch} == x86_64 ] && echo /usr/bin/pesign || echo /usr/bin/true)}
+
+%pesign %{_pesign} %{__pesign_token} %{__pesign_cert}
--
1.7.11.4

View File

@ -1,7 +1,7 @@
Summary: Signing utility for UEFI binaries
Name: pesign
Version: 0.10
Release: 2%{?dist}
Release: 3%{?dist}
Group: Development/System
License: GPLv2
URL: https://github.com/vathpela/pesign
@ -17,6 +17,7 @@ Source0: pesign-%{version}.tar.bz2
Source1: rh-test-certs.tar.bz2
Patch0: pesign-0.10-better-macros.patch
Patch1: pesign-0.10-only-sign-on-x86-64.patch
%description
This package contains the pesign utility for signing UEFI binaries as
@ -57,6 +58,9 @@ rm -rf %{buildroot}
%attr(0644,root,root) /etc/pki/pesign/*
%changelog
* Tue Aug 14 2012 Peter Jones <pjones@redhat.com> - 0.10-3
- Only sign things on x86_64; all else ignore gracefully.
* Tue Aug 14 2012 Peter Jones <pjones@redhat.com> - 0.10-2
- Make macros.pesign more reliable