39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From 3b8ca0d0068e452e7c97e761a69a34757cbd135c Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Wed, 15 Aug 2012 11:32:40 -0400
|
|
Subject: [PATCH] Simplify macros.pesign some more.
|
|
|
|
---
|
|
src/macros.pesign | 16 ++++++++++++----
|
|
1 file changed, 12 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/macros.pesign b/src/macros.pesign
|
|
index 7932629..703edbb 100644
|
|
--- a/src/macros.pesign
|
|
+++ b/src/macros.pesign
|
|
@@ -6,9 +6,17 @@
|
|
# %pesign -s -i shim.orig -o shim.efi
|
|
# And magically get the right thing.
|
|
|
|
-%__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_token %{nil}%{?pe_signing_token:-t "%{pe_signing_token}"}
|
|
+%__pesign_cert %{!?pe_signing_cert:-c "Red Hat Test Certificate"}%{?pe_signing_cert:-c "%{pe_signing_cert}"}
|
|
|
|
-%_pesign %{expand:%%([ %%{_arch} == x86_64 ] && echo /usr/bin/pesign || echo /usr/bin/true)}
|
|
+%_pesign /usr/bin/pesign
|
|
+
|
|
+%pesign(i:o:C:s) \
|
|
+ if [ -x %{_pesign} -a "%{_target_cpu}" == "x86_64" ]; then \
|
|
+ %{_pesign} %{__pesign_token} %{__pesign_cert} %{-i} %{-o} %{-s} \
|
|
+ else \
|
|
+ if [ -n "%{-i*}" -a -n "%{-o*}" ]; then \
|
|
+ mv %{-i*} %{-o*} \
|
|
+ fi \
|
|
+ fi ;
|
|
|
|
-%pesign %{_pesign} %{__pesign_token} %{__pesign_cert}
|
|
--
|
|
1.7.11.2
|
|
|