Skip to content

Commit 8839e84

Browse files
Kabuki94claude
andcommitted
fix: ship etc/containers/{storage,containers}.conf.d drop-ins (gitignore allowlist)
The .gitignore rule `etc/containers/*` blocked everything outside `/etc/containers/systemd/`, so two MiOS-authored config drop-ins created in earlier commits never actually reached origin: - etc/containers/storage.conf.d/30-mios-additionalstores.conf (rootful build store -> rootless distrobox image bridge; the Universal Blue / Bazzite additionalimagestores pattern) - etc/containers/containers.conf.d/30-mios-rootless-network.conf (default_rootless_network_cmd = "slirp4netns" so rootless Quadlets work on hosts without /dev/net/tun -- specifically MiOS-DEV WSL2) Per the MiOS-DEV feature-parity invariant (mios_dev_parity.md): both drop-ins are unconditional, not WSL-gated. The substrate must support running every Quadlet the deployed image runs; gating Quadlets off inside the builder is the wrong direction. Adds explicit allowlists for `storage.conf.d/30-mios-*` and `containers.conf.d/30-mios-*` to mirror the existing systemd/mios* allowlist, and ships the two .conf files that were created on disk but never tracked. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6faf6fd commit 8839e84

3 files changed

Lines changed: 68 additions & 0 deletions

File tree

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,17 @@ etc/containers/*
108108
!/etc/containers/systemd/
109109
etc/containers/systemd/*
110110
!/etc/containers/systemd/mios*
111+
# storage.conf.d/ -- additionalimagestores bridge so rootless distrobox
112+
# can read images built into rootful podman storage by the system-scope
113+
# .build Quadlets (Universal Blue / Bazzite pattern).
114+
!/etc/containers/storage.conf.d/
115+
etc/containers/storage.conf.d/*
116+
!/etc/containers/storage.conf.d/30-mios-*
117+
# containers.conf.d/ -- per-host podman tunables (rootless network
118+
# backend, runtime defaults). All shipped .conf files are MiOS-authored.
119+
!/etc/containers/containers.conf.d/
120+
etc/containers/containers.conf.d/*
121+
!/etc/containers/containers.conf.d/30-mios-*
111122
!/etc/fapolicyd/
112123
etc/fapolicyd/*
113124
!/etc/fapolicyd/fapolicyd.rules
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# /etc/containers/containers.conf.d/30-mios-rootless-network.conf
2+
#
3+
# Force rootless containers to use slirp4netns instead of the newer
4+
# pasta backend.
5+
#
6+
# Why: podman 5.x defaults rootless networking to pasta, which opens
7+
# /dev/net/tun directly. Some MiOS deployment shapes -- notably the
8+
# MiOS-DEV podman-machine WSL2 distro that operates as the Windows-
9+
# side build/runtime substrate -- ship without /dev/net/tun (the
10+
# microsoft-WSL2 kernel does have the tun module compiled in, but the
11+
# device node isn't created until something modprobes it, and
12+
# rootless podman runs unprivileged so it can't trigger that).
13+
#
14+
# Without this drop-in every Quadlet that uses rootless networking
15+
# fails at startup with:
16+
# pasta[NNNN]: Failed to open() /dev/net/tun: No such file or directory
17+
# pasta[NNNN]: Failed to set up tap device in namespace
18+
# mios-forge[NNNN]: setting up Pasta: pasta failed with exit code 1
19+
#
20+
# slirp4netns is the legacy rootless network backend; it builds an
21+
# in-process userspace TCP/IP stack instead of using a tap device,
22+
# so it works on every host without requiring kernel/device support.
23+
# Slightly slower than pasta on TCP throughput, but functionally
24+
# identical for everything MiOS does (REST APIs, git push/pull,
25+
# systemd-managed inbound listeners). Architectural Law 4 (VM |
26+
# Container | Flatpak only) is unaffected.
27+
#
28+
# Per the MiOS-DEV feature-parity contract this drop-in ships on
29+
# every shape, not gated to WSL -- the substrate either has /dev/net/tun
30+
# (most hosts) and pasta would have worked anyway, or doesn't (WSL),
31+
# in which case slirp4netns is the only option. Either way the
32+
# behavior is consistent across all MiOS deployments.
33+
34+
[network]
35+
default_rootless_network_cmd = "slirp4netns"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# /etc/containers/storage.conf.d/30-mios-additionalstores.conf
2+
#
3+
# Bridge rootful podman image storage into rootless users' view.
4+
#
5+
# MiOS builds Distrobox base images at boot via .build Quadlets under
6+
# /usr/share/containers/systemd/ (e.g. mios-aichat.build). Those run
7+
# in system scope -- the resulting image lands in
8+
# /var/lib/containers/storage, which rootless podman normally cannot
9+
# see.
10+
#
11+
# Adding it as an `additionalimagestores` entry makes rootless users
12+
# (and therefore distrobox, which always runs rootless on MiOS) able
13+
# to *read* images from the rootful store without copy or push. This
14+
# is the Universal Blue / Bazzite pattern.
15+
#
16+
# The store is read-only from the rootless side; rootless writes
17+
# still go to ~/.local/share/containers/storage as usual.
18+
19+
[storage.options]
20+
additionalimagestores = [
21+
"/var/lib/containers/storage",
22+
]

0 commit comments

Comments
 (0)