A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.
build(rootfs): ship overlay-normalize helper and bake system-version
ExTvbf2781d7c48f
diff --git a/build-all.sh b/build-all.shindex 0081303..727151f 100755--- a/build-all.sh+++ b/build-all.sh@@ -122,11 +122,14 @@ build_initramfs() {build_rootfs() {log "Building Alpine rootfs squashfs..."+ local sysver+ sysver=$(grep -E '^[[:space:]]*versionCode[[:space:]]*=' "${SCRIPT_DIR}/app/build.gradle.kts" | grep -oE '[0-9]+' | head -1)docker build -f "${SCRIPT_DIR}/build-rootfs/Dockerfile.rootfs" \-t podroid-rootfs:latest \+ --build-arg "SYSTEM_VERSION=${sysver:-0}" \--output type=local,dest="${ASSETS}" \"${SCRIPT_DIR}/build-rootfs/"- success "Built ${ASSETS}/alpine-rootfs.squashfs ($(du -h "${ASSETS}/alpine-rootfs.squashfs" | cut -f1))"+ success "Built ${ASSETS}/alpine-rootfs.squashfs ($(du -h "${ASSETS}/alpine-rootfs.squashfs" | cut -f1)), system-version ${sysver:-0}"}build_qemu() {diff --git a/build-rootfs/Dockerfile.rootfs b/build-rootfs/Dockerfile.rootfsindex 107e7c2..56b98ed 100644--- a/build-rootfs/Dockerfile.rootfs+++ b/build-rootfs/Dockerfile.rootfs@@ -9,6 +9,8 @@ COPY vsock-agent /work/vsock-agentRUN cd /work/vsock-agent && make CC=gccCOPY host-bridge /work/host-bridgeRUN cd /work/host-bridge && make CC=gcc+COPY overlay-normalize /work/overlay-normalize+RUN cd /work/overlay-normalize && make CC=gcc# ── Stage 2: build the Alpine rootfs squashfs ───────────────────────────────FROM alpine:3.23 AS builder@@ -28,6 +30,10 @@ RUN curl -L -o minirootfs.tar.gz \# Pull in the vsock-agent binary built in stage 1.COPY --from=vsock-builder /work/vsock-agent/podroid-vsock-agent /work/rootfs/usr/local/bin/podroid-vsock-agentCOPY --from=vsock-builder /work/host-bridge/podroid-hostd /work/rootfs/usr/local/bin/podroid-hostd+COPY --from=vsock-builder /work/overlay-normalize/podroid-overlay-normalize /work/rootfs/usr/local/bin/podroid-overlay-normalize++ARG SYSTEM_VERSION=0+ENV SYSTEM_VERSION=${SYSTEM_VERSION}ENV ALPINE_VERSION=${ALPINE_RELEASE}COPY files /work/filesdiff --git a/build-rootfs/build-rootfs.sh b/build-rootfs/build-rootfs.shindex 2841b9a..456b0d0 100755--- a/build-rootfs/build-rootfs.sh+++ b/build-rootfs/build-rootfs.sh@@ -118,6 +118,8 @@ chmod +x "$ROOTFS/usr/local/bin/podroid-vsock-agent" 2>/dev/null || true# podroid-hostd is also COPY'd from the vsock-builder stage; same mode-bit guard.# The CLIs are argv[0]-dispatch symlinks onto the one multi-call binary.chmod +x "$ROOTFS/usr/local/bin/podroid-hostd" 2>/dev/null || true+# podroid-overlay-normalize is COPY'd from the vsock-builder stage; mode-bit guard.+chmod +x "$ROOTFS/usr/local/bin/podroid-overlay-normalize" 2>/dev/null || trueln -sf podroid-hostd "$ROOTFS/usr/local/bin/podroid-notify"ln -sf podroid-hostd "$ROOTFS/usr/local/bin/podroid-forward"ln -sf podroid-hostd "$ROOTFS/usr/local/bin/podroid-open"@@ -131,6 +133,10 @@ cp /work/files/etc/conf.d/podroid "$ROOTFS/etc/conf.d/"mkdir -p "$ROOTFS/etc/podroid"cp /work/files/etc/podroid/forwards.conf "$ROOTFS/etc/podroid/forwards.conf"chmod 0644 "$ROOTFS/etc/podroid/forwards.conf"+# System-version stamp: the migration anchor. Baked from the app versionCode at+# build time; compared against /mnt/persist/.podroid/applied-version at boot.+printf '%s\n' "${SYSTEM_VERSION:-0}" > "$ROOTFS/etc/podroid/system-version"+chmod 0644 "$ROOTFS/etc/podroid/system-version"cp /work/files/etc/inittab "$ROOTFS/etc/inittab"cp /work/files/etc/rc.conf "$ROOTFS/etc/rc.conf"