On Tue, Apr 11, 2023 at 09:37:27AM +0200, bi...@debian.org wrote:
> Package: tcmu-runner
> Version: 1.5.4-4       
> Severity: serious
> Tags: sid bookworm
> User: debhel...@packages.debian.org
> Usertags: systemd-files-in-usr-bookworm
> 
> Dear Maintainer,
> 
> It seems that your package tcmu-runner is shipping files (.service, .socket or
> .timer) in /usr/lib/systemd/system.
[...]

tcmu-1.5.4> grep -R systemd.system .
./debian/tcmu-runner.install:debian/tmp/usr/lib/systemd/system/tcmu-runner.service
./README.md:1. If using systemd, copy `org.kernel.TCMUService1.service` to 
`/usr/share/dbus-1/system-services/` and `tcmu-runner.service` to 
`/lib/systemd/system`.
./CMakeLists.txt:  install(FILES tcmu-runner.service DESTINATION 
/usr/lib/systemd/system/)

These paths are wrong and the culprit of this bug report.

You could change them to use the currently correct path, but then you
would have to revert that again after bookworm is released when the
paths will change again.

A better solution would derive the path from systemd.pc, eg.
pkg-config --variable=systemdsystemunitdir systemd

(Note: this needs pkg-config and systemd in build-deps)

Since the upstream build system is CMake, there are plenty of others
to look at of how to implement using pkg-config and querying the
variable in CMake.
This should give you atleast a few hits that could be possible
examples to follow:
https://codesearch.debian.net/search?q=systemdsystemunitdir+path%3ACMake&literal=0
https://codesearch.debian.net/search?q=systemdsystemunitdir+path%3AFindSystemd&literal=0

Regards,
Andreas Henriksson

Reply via email to