FS#76142 - [systemd] v251.5-1 Inicpio install hook isn't properly adding service overrides
Attached to Project:
Arch Linux
Opened by Christian Påbøl Jacobsen (cpebble) - Saturday, 08 October 2022, 17:51 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:14 GMT
Opened by Christian Påbøl Jacobsen (cpebble) - Saturday, 08 October 2022, 17:51 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:14 GMT
|
Details
When using the "add_systemd_unit" initpcio function, the
systemd unit is added to the initramfs. However if that unit
has an override defined in /etc/systemd/system, that
override isn't correctly carried over.
The code for add_systemd_unit is in /usr/lib/initcpio/install/systemd. That file also have an "add_systemd_drop_in" which isn't used, but can be used to implement this. The bug was discovered after trying to add a service (pcscd - smart card daemon) to boot. Normally it would depend on "sockets.target" and systemd won't start it during launch. Adding an override with "defaultdependencies=no" and a new "RequiredBy" would let the service start, but it isn't copied to initramfs. A fix can be made by simply checking the /etc/ directory on call to "add_systemd_unit" Steps to reproduce: 1. Override a service by "systemctl edit xxx.service" 2. Call "add_systemd_unit xxx.service" in an initcpio hook 3. Browse lsinitcpio and confirm no override is copied |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:14 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/systemd/issues/7
Saturday, 25 November 2023, 20:14 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/systemd/issues/7
I'll provide a patch