Skip to content

Commit a722835

Browse files
mega123-artclaude
andcommitted
ci(android-assets): fix PRoot-from-source step working directory
run-docker.sh reads ./scripts/profile-relaxed.apparmor relative to CWD and the build ran from the workspace root -> "No such file" (run failed in 30s). Run the step from .termux-packages, and since `docker exec` lands in /home/builder, cd into the bind-mounted /home/builder/termux-packages before build-package.sh. Fix the PROOT_DEB export path accordingly (/work/.termux-packages/...). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3f9ae92 commit a722835

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/android-assets.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,26 @@ jobs:
5656
path: .termux-packages
5757
- name: Build patched PRoot from source
5858
shell: bash
59+
# run-docker.sh reads ./scripts/profile-relaxed.apparmor relative to CWD, so it must
60+
# run from the termux-packages root (not the workspace root, or it fails "No such file").
61+
working-directory: .termux-packages
5962
run: |
6063
case "${{ github.event.inputs.abi }}" in
6164
arm64) TERMUX_ARCH=aarch64 ;;
6265
x86_64) TERMUX_ARCH=x86_64 ;;
6366
esac
64-
cp surfaces/android/proot/patches/0001-copy-on-link.patch \
65-
.termux-packages/packages/proot/0001-copy-on-link.patch
67+
cp ../surfaces/android/proot/patches/0001-copy-on-link.patch \
68+
packages/proot/0001-copy-on-link.patch
69+
# The repo is bind-mounted at /home/builder/termux-packages inside the builder, but
70+
# `docker exec` lands in /home/builder — so cd into the mount before build-package.sh.
6671
CI=true CONTAINER_NAME=agentnet-proot-builder \
6772
TERMUX_BUILDER_IMAGE_NAME=ghcr.io/termux/package-builder@sha256:fa23eb4238ef8eda877cd991a06152ce76e9f274d1cae0d42f28fee3e5cd6016 \
68-
.termux-packages/scripts/run-docker.sh ./build-package.sh \
69-
-a "$TERMUX_ARCH" -f -I proot
70-
PROOT_PACKAGE=$(ls .termux-packages/output/proot_*_"$TERMUX_ARCH".deb | tail -1)
73+
./scripts/run-docker.sh \
74+
bash -c 'cd /home/builder/termux-packages && ./build-package.sh -a '"$TERMUX_ARCH"' -f -I proot'
75+
PROOT_PACKAGE=$(ls output/proot_*_"$TERMUX_ARCH".deb | tail -1)
7176
test -s "$PROOT_PACKAGE"
72-
echo "PROOT_DEB=/work/$PROOT_PACKAGE" >> "$GITHUB_ENV"
77+
# Asset step mounts the workspace at /work, so the .deb is under /work/.termux-packages.
78+
echo "PROOT_DEB=/work/.termux-packages/$PROOT_PACKAGE" >> "$GITHUB_ENV"
7379
7480
# Run the asset build inside an arm64 Ubuntu container (root + target arch). The
7581
# container has the chroot/apt the rootfs step needs; ALLOW_CROSS lets the script

0 commit comments

Comments
 (0)