pesign/SOURCES/0005-Detect-the-presence-of-rpm-sign-when-checking-for-rh.patch

28 lines
1.0 KiB
Diff
Raw Normal View History

2022-11-15 06:27:14 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2022-05-17 08:54:26 +00:00
From: Peter Jones <pjones@redhat.com>
2022-11-15 06:27:14 +00:00
Date: Mon, 4 Apr 2022 14:45:29 -0400
Subject: [PATCH] Detect the presence of rpm-sign when checking for "rhel"-ness
2022-05-17 08:54:26 +00:00
Signed-off-by: Peter Jones <pjones@redhat.com>
2022-11-15 06:27:14 +00:00
[rharwood: manually reapply to main]
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
(cherry picked from commit 17e5878cb087e0a766722d3c487f87c41b318f9a)
(cherry picked from commit a1cfd0b6ddb423571d430f3df46af7761c0797e3)
2022-05-17 08:54:26 +00:00
---
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
2022-11-15 06:27:14 +00:00
index 0a845d2..239605a 100644
2022-05-17 08:54:26 +00:00
--- a/src/pesign-rpmbuild-helper.in
+++ b/src/pesign-rpmbuild-helper.in
2022-11-15 06:27:14 +00:00
@@ -192,7 +192,7 @@ main() {
2022-05-17 08:54:26 +00:00
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"