From 2b525a1930df6a0d14bb659d5197265c5075722d Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 24 Sep 2021 18:51:21 -0700 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- debian/rules | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 9d68df184..a99ef4c7f 100755 --- a/debian/rules +++ b/debian/rules @@ -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