d/rules: Don't install and enable other systemd service files

Close: #1982.

This eliminates the issue with calibre and wordpress services getting run even
before the app is installed. These services are enabled when the app is
installed. On disadvantage is that services are no longer restarted when a newer
service file is installed.

Users for whom caibre and wordpress have already been enabled. Nothing changes
on upgrade and service will still be enabled. However, the services won't be
attempted to be started without the app's being installed. This is good enough
without having to write custom logic to disable these services.

Tests:

- Install freedombox package on a fresh setup. wordpress and calibre service
files are not enabled.

- When wordpress and calibre apps are installed, these services are enabled and
run as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-09-24 18:51:21 -07:00 committed by James Valleroy
parent 1c47877f6b
commit 2b525a1930
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

8
debian/rules vendored
View File

@ -19,5 +19,9 @@ override_dh_auto_test:
PYBUILD_TEST_ARGS="{interpreter} -m pytest" dh_auto_test
override_dh_installsystemd:
# Do not enable or start freedombox-manual-upgrade.service.
dh_installsystemd --exclude=freedombox-manual-upgrade.service
# 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