imsd: place the re-signed apks with the packages dir's owner
All checks were successful
image / image (push) Successful in 1h45m31s
All checks were successful
image / image (push) Successful in 1h45m31s
Run 50 got past the key copy and the re-sign, then died on the move into pmbootstrap's packages dir: abuild created that directory from inside the chroot, so it belongs to the chroot user (uid 12345) and the build user cannot write there. Install the files via sudo with the directory's own owner and mode 0644, as abuild would have left them, and fail with a clear message if the directory is missing instead of creating a wrongly-owned one.
This commit is contained in:
parent
877fe92a4b
commit
57517217e4
1 changed files with 14 additions and 2 deletions
16
build.sh
16
build.sh
|
|
@ -277,8 +277,20 @@ for _f in "$IMSD_DL"/*.apk; do
|
|||
python3 ./apk-resign.py "$_f" "$KEYCOPY" "$(basename "$ABUILD_KEY").pub"
|
||||
done
|
||||
rm -f "$KEYCOPY"
|
||||
mkdir -p "$WORKDIR/packages/edge/aarch64"
|
||||
mv "$IMSD_DL"/*.apk "$WORKDIR/packages/edge/aarch64/"
|
||||
# The packages dir belongs to pmbootstrap's chroot user as well (abuild wrote
|
||||
# it from inside the chroot), so the build user cannot write there either
|
||||
# (run 50): install the files with the directory's own owner, as abuild would
|
||||
# have left them. The dir exists because the builds above populated it.
|
||||
PKGDIR="$WORKDIR/packages/edge/aarch64"
|
||||
if [ ! -d "$PKGDIR" ]; then
|
||||
echo "$PKGDIR missing - the package builds above should have created it" >&2
|
||||
exit 1
|
||||
fi
|
||||
for _f in "$IMSD_DL"/*.apk; do
|
||||
sudo install -m 0644 -o "$(stat -c %u "$PKGDIR")" -g "$(stat -c %g "$PKGDIR")" \
|
||||
"$_f" "$PKGDIR/$(basename "$_f")"
|
||||
done
|
||||
rm -f "$IMSD_DL"/*.apk
|
||||
pmbootstrap index
|
||||
|
||||
# --- 4. build the image -------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue