pesign/0003-Make-the-RHEL-bits-for-macros.pesign-a-bit-cleaner.patch

42 lines
1.6 KiB
Diff

From c2d54b835ca3db92c9110a2596429710453c2a95 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 6 Aug 2013 12:32:43 -0400
Subject: [PATCH 3/9] Make the RHEL bits for macros.pesign a bit cleaner.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
src/macros.pesign | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/macros.pesign b/src/macros.pesign
index 8b123fa..244f576 100644
--- a/src/macros.pesign
+++ b/src/macros.pesign
@@ -22,11 +22,7 @@
# -s # perform signing
%pesign(i:o:C:e:c:n:a:s) \
if [ -x %{_pesign} -a "%{_target_cpu}" == "x86_64" ]; then \
- if [ -e /var/run/pesign/socket ]; then \
- %{_pesign_client} -t "OpenSC Card (Fedora Signer)" \\\
- -c "/CN=Fedora Secure Boot Signer" \\\
- %{-i} %{-o} %{-e} %{-s} %{-C} \
- elif [ -e /etc/rhel-release ]; then \
+ if [ -e /etc/rhel-release ]; then \
nss=$(mktemp -p $PWD -d) \
certutil -d ${nss} -N \
certutil -A -n "ca" -t "CT,C," -i %{-a*} -a -d ${nss} \
@@ -37,6 +33,10 @@
%{_pesign} -R ${sattrs}.sig -I ${sattrs} %{-i} \\\
--certdir ${nss} -c signer %{-o} \
rm -rf ${sattrs} ${sattrs}.sig ${nss} \
+ elif [ -S /var/run/pesign/socket ]; then \
+ %{_pesign_client} -t "OpenSC Card (Fedora Signer)" \\\
+ -c "/CN=Fedora Secure Boot Signer" \\\
+ %{-i} %{-o} %{-e} %{-s} %{-C} \
else \
%{_pesign} %{__pesign_token} %{__pesign_cert} \\\
%{-i} %{-o} %{-e} %{-s} %{-C} \
--
1.8.3.1