A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.
fix(rootfs): drop unused pulseaudio service and dedupe lxc bridge setup
ExTv1ff222c56c22
diff --git a/build-rootfs/build-rootfs.sh b/build-rootfs/build-rootfs.shindex 1ee8eaa..7aaeec6 100755--- a/build-rootfs/build-rootfs.sh+++ b/build-rootfs/build-rootfs.sh@@ -83,6 +83,12 @@ sed -i "s|^root:[^:]*:|root:${ROOT_HASH}:|" "$ROOTFS/etc/shadow"rm -rf "$ROOTFS/usr/share/man" "$ROOTFS/usr/share/doc" \"$ROOTFS/usr/share/locale" "$ROOTFS/usr/share/info"+# Remove the stock pulseaudio OpenRC service. Podroid starts pulseaudio+# directly from podroid-x11 (start-stop-daemon), never as a service; left in+# place its depend() pulls in a non-existent "udev" service, so OpenRC logs+# "Service 'pulseaudio' needs non existent service 'udev'" on every boot.+rm -f "$ROOTFS/etc/init.d/pulseaudio"+# Pre-create podman storage dirs (saves first-boot mkdir)mkdir -p "$ROOTFS/var/lib/containers/storage" \"$ROOTFS/run/containers/storage" \diff --git a/build-rootfs/files/etc/init.d/podroid-bootstrap b/build-rootfs/files/etc/init.d/podroid-bootstrapindex ffee78f..96301bb 100644--- a/build-rootfs/files/etc/init.d/podroid-bootstrap+++ b/build-rootfs/files/etc/init.d/podroid-bootstrap@@ -135,21 +135,12 @@ start() {mkdir -p /mnt/persist/lxc /var/lib/lxc 2>/dev/nullmountpoint -q /var/lib/lxc || mount --bind /mnt/persist/lxc /var/lib/lxc- # LXC: pre-create lxcbr0 (10.0.3.1/24) so `lxc-start` works out of the- # box. Containers reach the internet via MASQUERADE → eth0 → SLIRP.- # The Alpine lxc-bridge package only ships dnsmasq config, not a- # service to actually create the bridge — so we do it here.- if ! ip link show lxcbr0 >/dev/null 2>&1; then- ip link add name lxcbr0 type bridge 2>/dev/null- ip addr add 10.0.3.1/24 dev lxcbr0 2>/dev/null- ip link set lxcbr0 up 2>/dev/null- # Don't hide the rule-install failure: the `-C` probe is an expected- # non-zero existence check (kept quiet), but a failed `-A` (missing- # nat table / nf modules) must surface in the boot log instead of- # leaving lxc containers without outbound NAT and no diagnostic.- iptables -t nat -C POSTROUTING -s 10.0.3.0/24 ! -o lxcbr0 -j MASQUERADE 2>/dev/null \- || iptables -t nat -A POSTROUTING -s 10.0.3.0/24 ! -o lxcbr0 -j MASQUERADE- fi+ # The lxc bridge (lxcbr0, 10.0.3.1/24) plus its MASQUERADE/DHCP are owned+ # by the stock `dnsmasq.lxcbr0` service (rc_before=lxc), which creates the+ # bridge, assigns the address, and installs NAT in its start_pre. We used+ # to pre-create it here as well, but both running double-assigned the+ # address ("ipv4: Address already assigned" in the boot log). /var/lib/lxc+ # above is still ours to bind-mount.eend 0}diff --git a/build-rootfs/files/etc/init.d/podroid-network b/build-rootfs/files/etc/init.d/podroid-networkindex bb8beb7..3d4ea74 100644--- a/build-rootfs/files/etc/init.d/podroid-network+++ b/build-rootfs/files/etc/init.d/podroid-network@@ -14,8 +14,9 @@ start() {NETIF=""for _i in $(seq 1 10); do# Exclude virtual/bridge devices so the real virtio NIC is picked.- # lxcbr0 is created by podroid-bootstrap (which runs *before* us), so- # it would otherwise be a candidate; br-/cni cover other bridge names.+ # The LXC bridge lxcbr0 (brought up by the dnsmasq.lxcbr0 service),+ # podman/docker/cni bridges, and veth pairs would otherwise be+ # candidates; the grep below filters them all out by name.NETIF=$(ip -o link show 2>/dev/null | awk -F': ' '{print $2}' | \grep -vE '^(lo|dummy[0-9]*|veth|podman|cni|docker|lxcbr|br-)' | head -1)[ -n "$NETIF" ] && break