mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 20:46:41 +02:00
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
From 6202f263427372058dd9a73250fd13d79a84e4b8 Mon Sep 17 00:00:00 2001
|
|
From: Kaarle Ritvanen <kunkku@alpinelinux.org>
|
|
Date: Tue, 10 Dec 2024 15:16:08 +0200
|
|
Subject: [PATCH 03/11] lxc-alpine: variable for apk.static path
|
|
|
|
Signed-off-by: Kaarle Ritvanen <kunkku@alpinelinux.org>
|
|
---
|
|
templates/lxc-alpine.in | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/templates/lxc-alpine.in b/templates/lxc-alpine.in
|
|
index 535d0ef..5667144 100644
|
|
--- a/templates/lxc-alpine.in
|
|
+++ b/templates/lxc-alpine.in
|
|
@@ -219,17 +219,18 @@ fetch_apk_static() {
|
|
fetch "$MIRROR_URL/latest-stable/main/$arch/${pkg_name}-${pkg_ver}.apk" \
|
|
| tar -xz -C "$dest" sbin/ # --extract --gzip --directory
|
|
|
|
- [ -s "$dest/sbin/apk.static" ] || die 2 'apk.static not found'
|
|
+ local apk=$dest/sbin/apk.static
|
|
+ [ -s "$apk" ] || die 2 'apk.static not found'
|
|
|
|
- local keyname=$(echo "$dest"/sbin/apk.static.*.pub | sed 's/.*\.SIGN\.RSA\.//')
|
|
+ local keyname=$(echo "$apk".*.pub | sed 's/.*\.SIGN\.RSA\.//')
|
|
openssl dgst -sha1 \
|
|
-verify "$APK_KEYS_DIR/$keyname" \
|
|
-signature "$dest/sbin/apk.static.SIGN.RSA.$keyname" \
|
|
- "$dest/sbin/apk.static" \
|
|
+ "$apk" \
|
|
|| die 2 'Signature verification for apk.static failed'
|
|
|
|
# Note: apk doesn't return 0 for --version
|
|
- local out="$("$dest"/sbin/apk.static --version)"
|
|
+ local out=$("$apk" --version)
|
|
echo "$out"
|
|
|
|
[ "${out%% *}" = 'apk-tools' ] || die 3 'apk.static --version failed'
|
|
--
|
|
2.47.1
|
|
|