Skip to content
Snippets Groups Projects
Commit 33cba646 authored by Stanislav Kholmanskikh's avatar Stanislav Kholmanskikh Committed by Natanael Copa
Browse files

scripts/mkimage.sh: switch from abuild-apk to apk


The issue is that 'abuild-apk' creates root-owned files in the workdir,
and they cannot be removed later without root privileges.

'abuild-apk' is called only with 2 commands (add --initdb, update),
and in the context of the script they don't seem to be requiring
root privileges, so I'm proposing to substitute the calls with 'apk'.
This will automatically resolve the issue mentioned above.

Signed-off-by: default avatarStanislav Kholmanskikh <stanislav.kholmanskikh@bell-sw.com>
parent 352d91a9
No related branches found
No related tags found
2 merge requests!39304[3.16] main/expat: security upgrade to 2.4.9,!26263scripts/mkimage.sh: non-root cleanup fixes
......@@ -297,7 +297,7 @@ for ARCH in $req_arch; do
# create root for caching packages
mkdir -p "$APKROOT/etc/apk/cache"
cp -Pr /etc/apk/keys "$APKROOT/etc/apk/"
abuild-apk --arch "$ARCH" --root "$APKROOT" add --initdb
apk --arch "$ARCH" --root "$APKROOT" add --initdb
if [ -z "$REPOS" ]; then
warning "no repository set"
......@@ -307,7 +307,7 @@ for ARCH in $req_arch; do
echo "$repo" >> "$APKROOT/etc/apk/repositories"
done
fi
abuild-apk update --root "$APKROOT"
apk update --root "$APKROOT"
if [ "$_yaml" = "yes" ]; then
_yaml_out=${OUTDIR:-.}/latest-releases.yaml
......
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