From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 4 Apr 2022 14:45:29 -0400 Subject: [PATCH] Detect the presence of rpm-sign when checking for "rhel"-ness Signed-off-by: Peter Jones [rharwood: manually reapply to main] Signed-off-by: Robbie Harwood (cherry picked from commit 17e5878cb087e0a766722d3c487f87c41b318f9a) (cherry picked from commit a1cfd0b6ddb423571d430f3df46af7761c0797e3) --- src/pesign-rpmbuild-helper.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pesign-rpmbuild-helper.in b/src/pesign-rpmbuild-helper.in index 0a845d2..239605a 100644 --- a/src/pesign-rpmbuild-helper.in +++ b/src/pesign-rpmbuild-helper.in @@ -192,7 +192,7 @@ main() { fi fi - if [[ "${rhelver}" -ge 7 ]] ; then + if [[ "${rhelver}" -ge 7 ]] && which rpm-sign >&/dev/null ; then nssdir="$(mktemp -p "${PWD}" -d)" echo > "${nssdir}/pwfile" certutil -N -d "${nssdir}" -f "${nssdir}/pwfile"