[RFC] Manifest v3: D-Bus scoping, BinderFS delegation, and declarative firewall backend for nested containers
@mirkobrombin ci sta già lavorando.
Dal 3/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
On declarative OS like NixOS, Waydroid is a pain because it mutates host state imperatively: waydroid init downloads blobs into /var/lib/waydroid, waydroid-net.sh injects iptables/nftables rules on the fly, and the session service grabs arbitrary D-Bus names. cpak already solves the OverlayFS/content-addressed part. What is missing are three manifest primitives to let cpak manage the lifecycle of privileged nested runtimes (Waydroid, Steam PressureVessel, etc.) without the workload touching host state directly.
Steam PoC: D-Bus is the current blocker
Tested Steam inside cpak on NixOS (Wayland/Niri, AMD 780M RADV). GPU pass-through and Wayland socket forwarding work. What fails:
(zenity:311): Gdk-WARNING **: Cannot list activatable names: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: session bus access is not permitted
steam-runtime-launcher-service[1386]: E: Unable to acquire bus name "com.steampowered.PressureVessel.LaunchAlongsideSteam"
Steam acquires custom session bus names inside its own proxy. cpak's D-Bus proxy currently blocks this. Same pattern applies to Waydroid's org.waydroid.* session names.
Kernel baseline (no edge cases, just facts)
binderfs merged in Linux 5.0 (2019). Present in all stock kernels ≥5.7.
ashmem deprecated since Linux 5.18; Waydroid uses memfd. No extra kernel modules needed on recent kernels.
iptables legacy modules (ip_tables) are increasingly absent on kernels ≥6.17. NixOS already switched Waydroid to an nftables backend (waydroid-nftables) in nixpkgs PR #466473.
This means cpak cannot assume iptables is available. The manifest must declare the expected firewall backend.
Proposed Manifest v3 additions
A. Scoped D-Bus name ownership (ownSessionNames)
Allow the manifest to request specific bus name patterns on cpak's private D-Bus proxy, instead of exposing the raw host socket:
"override": {
"dbus": {
"ownSessionNames": [
"com.steampowered.PressureVessel.*",
"org.waydroid.*"
]
}
}
This is the Flatpak --own-name model, adapted to cpak's proxy architecture.
B. BinderFS device delegation
Waydroid needs /dev/binderfs/binder, /dev/binderfs/hwbinder, /dev/binderfs/vndbinder. A manifest flag lets System Authority bind-mount or delegate these nodes into the container:
"override": {
"devices": {
"binderfs": true
}
}
Assumes the host kernel already exposes binderfs (true for Linux ≥5.0). No DKMS, no custom kernels — stock kernel is sufficient.
C. Declarative firewall backend
Replace imperative waydroid-net.sh with a manifest-declared backend. System Authority sets up NAT/forwarding/masquerade using the correct tool:
"override": {
"network": {
"firewallBackend": "nftables",
"forwardPorts": [53, 67],
"masqueradeSubnet": "192.168.240.0/24"
}
}
Supported values: "iptables", "nftables", "none". cpak picks the backend that matches the host kernel capabilities.
D. OCI flavor tags (future)
waydroid init -s GAPPS is imperative state. If cpak supports OCI-tagged rootfs images, this becomes:
cpak install github.com/containerpak/waydroid:vanilla-latest
cpak install github.com/containerpak/waydroid:gapps-android13
Zero post-install scripts, rollback via layer hash.
Minor: cursor theme forwarding
GTK/Wayland apps inside cpak fall back to default cursors. Forward XCURSOR_THEME, XCURSOR_SIZE, and mount host icon paths (~/.icons, /usr/share/icons) to match host UX.
Environment
OS: NixOS 26.11 (Zokor) x86_64
Compositor: Niri (Wayland)
GPU: AMD Radeon 780M (RADV Mesa 26.0.3)
Kernel: Linux 7.1.10-zen1
cpak: v2.11.2 (Flake module)
- Lingua principale
- Go
- Stelle
- 218
- Fork
- 5
- Merge medio
- 45m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Containerpak/cpak
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Containerpak/cpak#93 ·
-
fish completions are brokenAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Containerpak/cpak#92 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Containerpak/cpak#90 ·
-
displayX11 requires Xephyr on X11 but nested display fails with MIT-SHM errors (black screen)Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
Containerpak/cpak#89 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
Containerpak/cpak#88 ·
Tutte le issue di Containerpak/cpak
Issue simili
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug laptop
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
router-for-me/CLIProxyAPI#7607 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement ui/ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
myNameArnav/lex#52 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100