From ac371bdc36c0b8b520b77586420d957ac6b6ef1b Mon Sep 17 00:00:00 2001 From: veilor-org Date: Sun, 3 May 2026 01:35:52 +0100 Subject: [PATCH] v0.5.6: anaconda --cmdline + XDG_RUNTIME_DIR for unattended install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v0.5.5 fixed AnacondaError: 'LANG'. Auto-install harness then hit next crash: TypeError: expected str, bytes or os.PathLike object, not NoneType File "/usr/lib64/python3.14/site-packages/pyanaconda/display.py", line 223 wl_socket_path = os.path.join(os.getenv("XDG_RUNTIME_DIR"), ...) anaconda's display.setup_display() unconditionally tries to set up Wayland socket path. tty1 has no XDG_RUNTIME_DIR set. None gets passed to os.path.join → TypeError. Two-part fix: 1. export XDG_RUNTIME_DIR=/run/user/0 + mkdir, so even if anaconda probes it, the env var has a valid string value. 2. Pass --cmdline to anaconda. Fully unattended text-only mode, no Wayland/X/TUI. Right fit for our gum-driven kickstart flow where ks is self-contained (disk, pw, locale all pre-answered). Combined effect: anaconda goes straight from CLI parse → kickstart execute → reboot. No display subsystem at all. Surfaced by test/auto-install.sh round 2. --- overlay/usr/local/bin/veilor-installer | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/overlay/usr/local/bin/veilor-installer b/overlay/usr/local/bin/veilor-installer index feab14c..dfa665a 100644 --- a/overlay/usr/local/bin/veilor-installer +++ b/overlay/usr/local/bin/veilor-installer @@ -529,7 +529,17 @@ Logs: /var/log/veilor-installer.log + /tmp/anaconda.log" # default. Use the locale the user picked (or fall back to en_GB). export LANG="${SEL_LOCALE:-en_GB.UTF-8}" export LC_ALL="$LANG" - if anaconda --kickstart=/run/install/veilor-generated.ks; then + # XDG_RUNTIME_DIR must exist — anaconda's display.setup_display() + # tries os.getenv("XDG_RUNTIME_DIR") + constants.WAYLAND_SOCKET_NAME + # and crashes with TypeError on None. We're running unattended so + # no graphical display is needed, but the env var still has to exist. + export XDG_RUNTIME_DIR="/run/user/$(id -u)" + mkdir -p "$XDG_RUNTIME_DIR" + chmod 0700 "$XDG_RUNTIME_DIR" + # --cmdline: fully unattended text-only mode. No Wayland setup, no + # graphical/text TUI. Reads kickstart, executes, reboots. Right mode + # for our gum-driven flow where ks is fully self-contained. + if anaconda --cmdline --kickstart=/run/install/veilor-generated.ks; then prompt_message "Install complete. System will reboot. Remove the install media after shutdown." sleep 3