mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-16 01:52:34 +00:00
Merge pull request #1811 from runejuhl/fix-alpine-apk-keys
Change alpine template file check to also check file size (`-f` => `-s`)
This commit is contained in:
commit
aedfcb8acb
@ -185,7 +185,7 @@ fetch_apk_keys() {
|
|||||||
|
|
||||||
echo "$APK_KEYS_SHA256" | while read -r line; do
|
echo "$APK_KEYS_SHA256" | while read -r line; do
|
||||||
keyname="${line##* }"
|
keyname="${line##* }"
|
||||||
if [ ! -f "$keyname" ]; then
|
if [ ! -s "$keyname" ]; then
|
||||||
fetch "$APK_KEYS_URI/$keyname" > "$keyname"
|
fetch "$APK_KEYS_URI/$keyname" > "$keyname"
|
||||||
fi
|
fi
|
||||||
echo "$line" | sha256sum -c -
|
echo "$line" | sha256sum -c -
|
||||||
@ -210,7 +210,7 @@ fetch_apk_static() {
|
|||||||
fetch "$MIRROR_URL/latest-stable/main/$arch/${pkg_name}-${pkg_ver}.apk" \
|
fetch "$MIRROR_URL/latest-stable/main/$arch/${pkg_name}-${pkg_ver}.apk" \
|
||||||
| tar -xz -C "$dest" sbin/ # --extract --gzip --directory
|
| tar -xz -C "$dest" sbin/ # --extract --gzip --directory
|
||||||
|
|
||||||
[ -f "$dest/sbin/apk.static" ] || die 2 'apk.static not found'
|
[ -s "$dest/sbin/apk.static" ] || die 2 'apk.static not found'
|
||||||
|
|
||||||
local keyname=$(echo "$dest"/sbin/apk.static.*.pub | sed 's/.*\.SIGN\.RSA\.//')
|
local keyname=$(echo "$dest"/sbin/apk.static.*.pub | sed 's/.*\.SIGN\.RSA\.//')
|
||||||
openssl dgst -sha1 \
|
openssl dgst -sha1 \
|
||||||
|
Loading…
Reference in New Issue
Block a user