#1034231 freedombox: dh_installsystemd doesn't handle files in /usr/lib/systemd/system

#1034231#5
Date:
2023-04-11 07:37:27 UTC
From:
To:
Dear Maintainer,

It seems that your package freedombox is shipping files (.service, .socket or
.timer) in /usr/lib/systemd/system.

This is not supported by the version of dh_installsystemd/debhelper currently
in unstable and bookworm (See: #1031695). That means that currently your
service might not be enabled at boot and/or started as expected.

With the freeze currently in effect, debhelper will not be fixed for bookworm.

As a result, could you please move these files to /lib/systemd/system instead
so they are properly detected by debhelper?
As soon as debhelper is supporting (not until bookworm+1 aka Trixie) you will
be able to move them back to the newer location.

Note that bookworm is currently in hard freeze, please limit the changes you
are uploading to the ones fixing RC bugs.  Also note that you might have to
request a freeze exception to the release team.
See: https://release.debian.org/testing/freeze_policy.html

Feel free to contact me if you have any questions.

Kind regards,
Laurent Bigonville

The list of packages has been generated with the following command:
apt-file search -x '^/usr/lib/systemd/system/.*\.(service|timer|socket)$'|cut -d: -f1|sort -u

#1034231#10
Date:
2023-04-11 13:31:38 UTC
From:
To:
Thank you for the bug report and bringing the issue to our attention.
.service meant for freedombox itself. Others units are meant for other
packages (most of them configuration extensions). These units must not
be started/stopped when freedombox package is installed/uninstalled.
Hence this issue applies only to a single unit: plinth.service.

My understanding of the bug is that dh_installsystemd will not discover
services listed in /usr/lib and this will not change for bookworm.

Long ago, when lintian was issuing a message about moving unit files
from /lib to /usr/lib, we have moved the files. We also realized that
the services were not being automatically started after installing the
package. So, we implemented a workaround to keep the files in /usr/lib
but force dh_installsystemd to discover plinth.service. The workaround
reads like this:

override_dh_installsystemd:
	# Do not enable or start any service other than FreedomBox service. Use
	# of --tmpdir is a hack to workaround an issue with dh_installsystemd
	# (as of debhelper 13.5.2) that still has hardcoded search path of
	# /lib/systemd/system for searching systemd services. See #987989 and
	# reversion of its changes.
	dh_installsystemd --tmpdir=debian/tmp/usr --package=freedombox
plinth.service

I believe that the freedombox package does not need any changes for
bookworm. Could you please confirm that there are no changes planned for
dh_installsystemd that would make our workaround not work anymore?

I will confirm that freedombox is working well as-is in bookworm and
close this issue.

[...]

Thank you for your contributions,

#1034231#15
Date:
2023-04-11 14:38:01 UTC
From:
To:
On 11/04/23 19:01, Sunil Mohan Adapa wrote:
[...]

On a fresh Debian testing VM, I installed the freedombox package
(currently version 23.6). As soon as the package was installed, I
noticed that the freedombox daemon was running (due to plinth.service).
I also found that start/stop scripts has been properly installed by
dh_installsystemd in /var/lib/dpkg/info/freedombox.postinst.

Hence this bug does not apply to the freedombox package. Closing.

Thank you,

#1034231#20
Date:
2023-04-11 14:38:01 UTC
From:
To:
On 11/04/23 19:01, Sunil Mohan Adapa wrote:
[...]

On a fresh Debian testing VM, I installed the freedombox package
(currently version 23.6). As soon as the package was installed, I
noticed that the freedombox daemon was running (due to plinth.service).
I also found that start/stop scripts has been properly installed by
dh_installsystemd in /var/lib/dpkg/info/freedombox.postinst.

Hence this bug does not apply to the freedombox package. Closing.

Thank you,