From 35a72df49796488aae638a5560b79181e0d03084 Mon Sep 17 00:00:00 2001 From: Ryan Lewis Date: Wed, 2 Sep 2026 01:13:50 +0100 Subject: [PATCH] fix: give every VM its own machine ID systemd's and dbus's package configuration during the apt layer bakes a machine ID into /etc/machine-id and /var/lib/dbus/machine-id. Both survive into every VM created from the image, so a whole fleet shares one identity, which defeats anything that assumes machine IDs are unique (systemd's FixedRandomDelay=, for one). Empty the file at the end of the build so systemd generates one per VM in early boot. Emptied rather than removed: systemd treats an absent /etc/machine-id as first boot and presets all units, which would re-enable the ones this image disables. Ported from exeuntu commit e530b2f (17 Aug 2026), the only platform-wiring change upstream since exeslim was forked. --- Dockerfile | 10 ++++++++++ README.md | 1 + 2 files changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9a457f1..08b49f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -161,6 +161,16 @@ RUN mkdir -p /home/exedev/.claude /home/exedev/.codex /home/exedev/.pi \ COPY init /usr/local/bin/init RUN chmod +x /usr/local/bin/init +# Empty the machine ID that systemd's and dbus's package configuration baked in +# during the apt layer above. Left as-is, every VM created from this image +# shares one identity, which defeats anything that assumes machine IDs are +# unique (systemd's FixedRandomDelay=, for one). Emptied rather than removed: +# systemd reads an *absent* /etc/machine-id as first boot and presets all units, +# re-enabling the ones disabled above. Must stay after the last apt-get install, +# or a later package configure bakes in a fresh one. Mirrors exeuntu. +RUN : >/etc/machine-id \ + && ln -sf /etc/machine-id /var/lib/dbus/machine-id + # Sets the default proxy port. Without an EXPOSE, exe.dev defaults to :80 # (verified on a stock ubuntu:24.04 VM); exeuntu exposes 8000 and 9999, the # latter being Shelley's. We have no Shelley, so 8000 alone. diff --git a/README.md b/README.md index 52a95dd..2bd511c 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,7 @@ below is platform wiring that exe.dev depends on, and is reproduced here: | `rm /usr/sbin/policy-rc.d` | Otherwise apt-installed services silently fail to start. | | exedev uid 1000 via `usermod -l` | Renames the stock `ubuntu` user so uid/gid/home/subuid line up with exeuntu. | | linger + `XDG_RUNTIME_DIR` | Populates `/run/user/1000` so `systemd --user` works. | +| Empty `/etc/machine-id` at the end of the build | Package configuration bakes an ID into the image, so every VM would share one identity. Emptied, not removed: an absent file makes systemd treat boot as first boot and re-enable the units disabled above. | Deliberately **not** carried over: Chrome/headless-shell, the Claude/Codex/pi agent *binaries*, the pi extension and catalog, nginx + its index page,