Package: live-config
X-Debbugs-Cc: asik...@proton.me
Version: 11.0.5
Severity: normal
Tags: patch

Dear Maintainer,

If I create live/config.conf.d/custom.conf inside a Trixie live medium/iso tree 
with, for example, the following single line:

LIVE_USERNAME='mycustomuser'

...my LIVE_USERNAME parameter does not get picked up by live-config as it does 
when doing the same to a Bookworm live medium. Meanwhile, the live-config 
manpage for Trixie still lists live/config.conf.d/* as a valid path, so I would 
normally expect my config and its params to get picked up.

In init-config.sh, we currently assume that all live media are mounted inside 
(/usr)/lib/live/mount. This is true and valid as of Bookworm:

  > user@debian:~$ grep ^VERSION_CODENAME /etc/os-release && grep 'medium' 
/proc/mounts
  > VERSION_CODENAME=bookworm
  > /dev/sr0 /run/live/medium iso9660 
ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8 0 0
  > /dev/sr0 /usr/lib/live/mount/medium iso9660 
ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8 0 0

However, Trixie live images only seem to be mounted in /run/live:

  > user@debian:~$ grep ^VERSION_CODENAME /etc/os-release && grep 'medium' 
/proc/mounts
  > VERSION_CODENAME=trixie
  > /dev/sr0 /run/live/medium iso9660 
ro,noatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8 0 0
  > user@debian:~$ grep 'lib' /proc/mounts 
  > user@debian:~$

One can of course work around this by simply placing configs in 
$rootfs/etc/live instead, but both scenarios are supposed to work.

Adding mountpoints starting with /run/live/medium to init-config.sh appears to 
resolve the issue for me. If paths starting with (/usr)/lib/live/mount/medium 
are no longer used by Debian live media at all, they can probably be removed at 
some point, but I am not sure about that, so my attached suggested patch 
retains them for now.

Thanks.

Best regards
Aka Sikrom


-- System Information:
Debian Release: 13.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.27-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages live-config depends on:
ii  live-config-systemd [live-config-backend]  11.0.5

Versions of packages live-config recommends:
ii  iproute2                6.15.0-1
ii  keyboard-configuration  1.237
pn  live-config-doc         <none>
pn  live-tools              <none>
ii  locales                 2.41-8
ii  sudo                    1.9.16p2-2
ii  user-setup              1.105

Versions of packages live-config suggests:
pn  pciutils  <none>
ii  wget      1.25.0-2

-- no debconf information
diff --git a/frontend/init-config.sh b/frontend/init-config.sh
index 88536e1..b4f8358 100755
--- a/frontend/init-config.sh
+++ b/frontend/init-config.sh
@@ -11,7 +11,9 @@ export LIVE_HOSTNAME LIVE_USERNAME LIVE_USER_FULLNAME LIVE_USER_DEFAULT_GROUPS
 set -o allexport
 for _FILE in /etc/live/config.conf /etc/live/config.conf.d/*.conf \
 	     /lib/live/mount/medium/live/config.conf /lib/live/mount/medium/live/config.conf.d/*.conf \
-	     /lib/live/mount/persistence/*/live/config.conf /lib/live/mount/persistence/*/live/config.conf.d/*.conf
+	     /lib/live/mount/persistence/*/live/config.conf /lib/live/mount/persistence/*/live/config.conf.d/*.conf \
+	     /run/live/medium/live/config.conf /run/live/medium/live/config.conf.d/*.conf \
+	     /run/live/persistence/*/live/config.conf /run/live/persistence/*/live/config.conf.d/*.conf
 do
 	if [ -e "${_FILE}" ]
 	then

Reply via email to