Correct location for systemd unit files

Micha Lenk micha at debian.org
Sun Sep 26 16:36:18 BST 2021


Dear maintainers of debhelper and systemd,

Thank you for maintaining the both incredibly useful packages debhelper 
and systemd in Debian.

I'm currently struggling with finding the correct location where systemd 
unit files are expected to be installed on Debian systems. Within one of 
my packages, smcroute, I am querying the pkg-config variable 
systemdsystemunitdir during build in order to use the directory that 
systemd wants. The following command is an example how pkg-config is 
called and what it returns as output as of current Debian unstable:

     micha at hostname:~$ pkg-config --variable=systemdsystemunitdir systemd
     /lib/systemd/system
     micha at hostname:~$

However, Lintian flags it as an error (even though the systemd service 
is still correctly managed and managable with systemd):

     E: smcroute: systemd-service-in-odd-location 
lib/systemd/system/smcroute.service

This in turn causes the Salsa CI pipeline to mark the build as failed.
https://salsa.debian.org/debian/smcroute/-/pipelines/295256

Can you please provide me some guidance whether either

a) I should file a bug on debhelper to demote 
systemd-service-in-odd-location from an error to a warning

or

b) I should file a bug on systemd to fix the systemdsystemunitdir 
variable in the systemd.pc file shipped within the systemd package?

Thanks a lot for your guidance.

Best regards,
Micha



More information about the Pkg-systemd-maintainers mailing list