mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-22 07:00:28 +00:00
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.
This commit is contained in:
parent
832ab44934
commit
bbe4a4fdfd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user