Skip to content
Snippets Groups Projects
Commit 10bec7b7 authored by Thermi's avatar Thermi Committed by Ariadne Conill
Browse files

scripts/bootstrap.sh: Fix error when pubkey exists in ~/.abuild and

/etc/apk/keys

cp: will not overwrite just-created '/home/buildozer/sysroot-aarch64/
/etc/apk/keys/buildozer-6086211a.rsa.pub' with '/home/buildozer/.
abuild/buildozer-6086211a.rsa.pub'
parent 279cb7c6
No related branches found
No related tags found
1 merge request!24047scripts/bootstrap.sh: Fix error when pubkey exists in ~/.abuild and /etc/apk/keys
Pipeline #93871 passed
...@@ -64,7 +64,13 @@ fi ...@@ -64,7 +64,13 @@ fi
if [ ! -d "$CBUILDROOT" ]; then if [ ! -d "$CBUILDROOT" ]; then
msg "Creating sysroot in $CBUILDROOT" msg "Creating sysroot in $CBUILDROOT"
mkdir -p "$CBUILDROOT/etc/apk/keys" mkdir -p "$CBUILDROOT/etc/apk/keys"
cp -a /etc/apk/keys/* ~/.abuild/*.pub "$CBUILDROOT/etc/apk/keys" # /etc/apk/keys and ~/.abuild/ can contain files with the same names.
# if that is the case, cp will abort copying and fail. Then on the next
# run of the bootstrap script, 1) the keys are not in the sysroot and
# 2) the apk database is not initialized the sysroot
# Thus it's unusable at that point and needs to be deleted manually.
cp -a /etc/apk/keys/* "$CBUILDROOT/etc/apk/keys"
cp -a ~/.abuild/*.pub "$CBUILDROOT/etc/apk/keys"
${SUDO_APK} add --quiet --initdb --arch $TARGET_ARCH --root $CBUILDROOT ${SUDO_APK} add --quiet --initdb --arch $TARGET_ARCH --root $CBUILDROOT
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment