Skip to content

Commit

Permalink
Do a better job of isolating pesign-rh-test-crap
Browse files Browse the repository at this point in the history
  • Loading branch information
vathpela committed Apr 20, 2016
1 parent a90c967 commit a5066ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Makefile
Expand Up @@ -67,6 +67,7 @@ install_sysvinit: pesign.sysvinit

install :
$(INSTALL) -d -m 700 $(INSTALLROOT)/etc/pki/pesign/
$(INSTALL) -d -m 700 $(INSTALLROOT)/etc/pki/pesign-rh-test/
$(INSTALL) -d -m 770 $(INSTALLROOT)/var/run/pesign/
$(INSTALL) -d -m 755 $(INSTALLROOT)$(bindir)
$(INSTALL) -m 755 authvar $(INSTALLROOT)$(bindir)
Expand Down
9 changes: 7 additions & 2 deletions src/macros.pesign
Expand Up @@ -7,7 +7,7 @@
# And magically get the right thing.

%__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_cert %{!?pe_signing_cert:"Red Hat Test Certificate"}%{?pe_signing_cert:"%{pe_signing_cert}"}

%_pesign /usr/bin/pesign
%_pesign_client /usr/bin/pesign-client
Expand All @@ -21,6 +21,10 @@
# -a <input ca cert filename> # rhel only
# -s # perform signing
%pesign(i:o:C:e:c:n:a:s) \
_pesign_nssdir=/etc/pki/pesign \
if [ %{__pesign_cert} = "Red Hat Test Certificate" ]; then \
_pesign_nssdir=/etc/pki/pesign-rh-test \
fi \
if [ -x %{_pesign} ] && \\\
[ "%{_target_cpu}" == "x86_64" -o \\\
"%{_target_cpu}" == "aarch64" ]; then \
Expand All @@ -41,7 +45,8 @@
-c "/CN=Fedora Secure Boot Signer" \\\
%{-i} %{-o} %{-e} %{-s} %{-C} \
else \
%{_pesign} %{__pesign_token} %{__pesign_cert} \\\
%{_pesign} %{__pesign_token} -c %{__pesign_cert} \\\
--certdir ${_pesign_nssdir} \\\
%{-i} %{-o} %{-e} %{-s} %{-C} \
fi \
else \
Expand Down

0 comments on commit a5066ff

Please sign in to comment.