On Thu, Aug 25, 2022 at 1:41 PM Kenton Groombridge <conc...@gentoo.org> wrote: > > On 22/08/25 01:04PM, Mike Gilbert wrote: > > We could introduce a new function to install distro-specific overrides > > in [/usr]/lib/systemd/system. > > > > I think that's a good idea. systemd_{new,do}serviceconf maybe? > > As I understand it these should go to /usr/lib/[...].
The correct path to use depends on the type of unit and the "split-usr" USE flag. With split-usr enabled, overrides for system service units go in /lib/systemd/system/foo.service.d. With split-usr disabled, overrides for system services units go in /usr/lib/systemd/system/foo.service.d. Overrides for user service units would always go in /usr/lib/systemd/user/foo.service.d. We will be phasing out split-usr later this year due to pressure from systemd upstream to stop supporting it. Anyway, there are already functions to get the correct path based on pkg-config in the systemd.eclass.