packages should use 'pkg-config systemd' to determine systemd unit install destination path


ID: 319
PHID: PHID-TASK-zbv7yk3l2dawnopb7mu7
Author: Patrick
Status at Migration Time: open
Priority at Migration Time: Low


Currently systemd units for packages developed under the Whonix umbrella are located in lib/systemd/system (or etc/systemd/system). And installed by make install with the usual DESTDIR support. This works for Debian and perhaps Fedora based distributions, but is not 100% convention conform.

As per daemon(7), section Installing Systemd Service Files, Quote:

“At the build installation time (e.g. make install during package build), packages are recommended to install their systemd unit files in the directory returned by pkg-config systemd --variable=systemdsystemunitdir (for system services) or pkg-config systemd --variable=systemduserunitdir (for user services).”

Therefore, for better platform / porting support, we should

  • move those files to the package’s root pkg-name.service (?),
  • genmkfile should Depends: on pkg-config,
  • genmkfile’s function make_install (function make_helper) should use pkg-config to determine the systemd install destination path