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

So configure.ac contains this:
```
AC_ARG_WITH(systemd-service,
AS_HELP_STRING([--with-systemd-service=PATH],
    [Install systemd service file in given path. The default is no, but if 
specified, the default path is /usr/lib/systemd/system.]),
```

So it hard-codes a default path, rather than check with systemd.pc.....
I think that could be fixed to actually use the path from systemd.pc
instead.

Alternatively you could ofcourse use the existing mechanism
and extend the --with-systemd-service you're already passing in
debian/rules to actually include the correct path as an argument.

eg.

```
SYSTEMDSYSTEMUNITDIR=$(shell pkg-config --variable=systemdsystemunitdir systemd)

[...]
        --with-systemd-service=$(SYSTEMDSYSTEMUNITDIR) \
[...]
```

Note: do not forget to add pkg-config and systemd (for systemd.pc) to
build-deps.


Regards,
Andreas Henriksson

Reply via email to