Package: runit
Version: 2.3.1-4
Severity: normal
X-Debbugs-Cc: [email protected], [email protected]

By default in runit the service runs inside the service directory,
which would be /etc/service/foo for system-wide (root) services and
/home/$USER/.service/foo for user services;
In runit 2.3.1-3 I changed invoke-run to automatically chdir to
/home/$USER for user-services (uid>=1000 and /home/$USER is found),
to be consistent with systemd --user behaviour and try to fix issues like
the one reported in #1032368 [1] (krunner)

Then I realized that many rusncripts have things like
'sv d .' or use pwd, try to include conf file or looks for
dirs inside the service directory and in general there is the
expectation that those files/dirs are in the current working directory,
so I reverted the change in 2.3.1-4.

Right now I suspect only a tiny subset of user services needs to
chdir to /home/$USER to work properly (other might rely on some
$XDG_ var to find conf files, but we provide those with runit-user-session)
so it's better to just use chpst to chdir in the exec line, when it's needed.

the krunner issue in #1032368 might be fixed by chdir the dbus@user user service
runscript (still to be tested); in general, as long as the number of user 
services
that needs to chdir is low, I prefer to chdir in each rusncript; if the number 
of
such runscripts becomes too high the I'll consider reverting the revert (chdir 
in
invoke-run)

I'll leave this open until there is an estimate of the number of user services
that needs to chdir

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1032368



-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.17.9+deb14-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: runit (via /run/runit.stopit)

Versions of packages runit depends on:
ii  libc6           2.42-16
ii  runit-helper    2.16.6
ii  sysuser-helper  1.6.0

Versions of packages runit recommends:
ii  runit-init  2.3.1-4

Versions of packages runit suggests:
ii  runit-services  0.13.1
ii  socklog         2.1.2+repack-2
ii  ucspi-unix      1.0-6
ii  xchpst          0.8.5-1
pn  zsh             <none>

-- Configuration Files:
/etc/runit/1 changed [not included]
/etc/runit/2 changed [not included]

-- no debconf information

Reply via email to