Packaging: where should I install the systemd configuration?

3 Antworten [Letzter Beitrag]
vkraus
Offline
Beigetreten: 02/19/2025

Hi! I’m working on a private Trisquel package for my program. My program installs a systemd service file, and a timer. I tried to install them in $sysconfdir/systemd/system, but then lintian complains that they should go in /usr/lib/systemd/system instead. Fine, I put them in $libdir/systemd/system. However, they end up installed in ./usr/lib/x86_64-linux-gnu/systemd/system/ and systemd can’t find them! What can I do to have them installed in /usr/lib/systemd/system?

jxself
Offline
Beigetreten: 09/13/2010

It sounds like your package's build system is using $libdir incorrectly, appending an architecture-specific path (x86_64-linux-gnu) when it shouldn't? Instead of using $libdir, could you directly use /usr/lib/systemd/system as the install target?

Legimet
Offline
Beigetreten: 12/10/2013

If this package is just for your private use, you shouldn't really worry about what Lintian says.

vkraus
Offline
Beigetreten: 02/19/2025

So I’m satisfied with what I did: i asked debhelper to configure with --libdir=\${prefix}/lib:

override_dh_auto_configure:
[TAB]dh_auto_configure -- --libdir=\$${prefix}/lib

It seems to do the job now.