Commit 49eccf14 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/abuild: backport libressl fallback for abuild-sign

then /usr/bin/openssl binary may be deleted while replacing libressl
with openssl. Make sure we can sign the index by falling mback to
libressl if openssl is missing.
parent 3255d98c
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
......@@ -2,7 +2,7 @@
pkgname=abuild
pkgver=3.3.0_pre1
_ver=${pkgver%_git*}
pkgrel=2
pkgrel=3
pkgdesc="Script to build Alpine Packages"
url="https://git.alpinelinux.org/cgit/abuild/"
arch="all"
......@@ -23,6 +23,7 @@ pkggroups="abuild"
source="https://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz
0001-abuild-rmtemp-Do-not-follow-symbolic-links.patch
add-multithreaded-compression.patch
0001-abuild-sign-fall-back-to-libressl-if-openssl-is-miss.patch
"
builddir="$srcdir/$pkgname-$_ver"
......@@ -72,4 +73,5 @@ _rootbld() {
sha512sums="5d3c2c04a7d6ede2c08b524423f9594ced42d4d67f10327996a38e0782fc2de1f8086187aa9a9072df5c1aced540bdcf1b8002b832df4cf2c6a56f6f89657aa7 abuild-3.3.0_pre1.tar.xz
e2cefff3b9d460132a7ef90c5f8ddb309b748e2ef40157c31d3dc047b0516838d8c5a0fe51952e004252ad15a76c5758d61f8deb35a970a0841fec188f8d521d 0001-abuild-rmtemp-Do-not-follow-symbolic-links.patch
933430cfa7f1e37eb3a1867fbf99581e6ae67be4d0a31c84d1a392ccf3ce95862a9b5a0a8cafd8b65edad46ef900bb6ca6a10666993c972b65fdd92b7c07f2d3 add-multithreaded-compression.patch"
933430cfa7f1e37eb3a1867fbf99581e6ae67be4d0a31c84d1a392ccf3ce95862a9b5a0a8cafd8b65edad46ef900bb6ca6a10666993c972b65fdd92b7c07f2d3 add-multithreaded-compression.patch
9b4a13667897ca953f46367f01253781fba1134b2c28f82d0e85ed89bb907c61db1eb9dce875d9c164ac9bd540ebe1d8e9120bc3f75d55a47612e50b24a89d5c 0001-abuild-sign-fall-back-to-libressl-if-openssl-is-miss.patch"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment