blob: 414926e69e736d1e8cdfa38ef58884cb729f4b47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From 77ad3d42df29da964f29ef5fe638277b35eb0b83 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 8 Nov 2018 11:43:47 +0000
Subject: [PATCH] abuild-sign: fall back to libressl if openssl is missing
openssl binary may be missing while migrating system from libressl to
openssl. Make sure we can always sign the backage if either is there.
---
abuild-sign.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/abuild-sign.in b/abuild-sign.in
index 7b5b6db..5890bf5 100644
--- a/abuild-sign.in
+++ b/abuild-sign.in
@@ -17,6 +17,7 @@ fi
do_sign() {
local f i keyname repo
+ local openssl=$(command -v openssl || echo libressl)
# we are actually only interested in the name, not the file itself
keyname=${pubkey##*/}
@@ -29,7 +30,7 @@ do_sign() {
set -e
cd "$repo"
sig=".SIGN.RSA.$keyname"
- openssl dgst -sha1 -sign "$privkey" -out "$sig" "$i"
+ $openssl dgst -sha1 -sign "$privkey" -out "$sig" "$i"
tmptargz=$(mktemp)
tar -f - -c "$sig" | abuild-tar --cut | gzip -9 > "$tmptargz"
tmpsigned=$(mktemp)
--
2.19.1
|