debian: dh compat to 12, necessary init/systemd adjustments

Bring the dh compat level to 12, the most recent supported by the
oldest supported Ubuntu LTS release, 20.04. This necessitates changes
to how initscripts & systemd packaging are done.

Signed-off-by: Matthew Vernon <mvernon@wikimedia.org>
This commit is contained in:
Matthew Vernon 2023-09-20 16:13:43 +01:00
parent 842d6aed00
commit 86863990ca
2 changed files with 6 additions and 12 deletions

2
debian/compat vendored
View File

@ -1 +1 @@
9
12

16
debian/rules vendored
View File

@ -58,7 +58,7 @@ py3_overrides_packages := $(basename $(notdir $(wildcard debian/*.requires)))
py3_packages := cephfs-shell cephfs-top cephadm
%:
dh $@ --buildsystem=cmake --with javahelper,python3,systemd --parallel
dh $@ --buildsystem=cmake --with javahelper,python3 --parallel
override_dh_auto_configure:
env | sort
@ -102,15 +102,9 @@ override_dh_installinit:
dh_installinit -p ceph-base --name ceph --no-start
dh_installinit -p radosgw --no-start
# NOTE: execute systemd helpers so they pickup dh_install'ed units and targets
dh_systemd_enable
dh_systemd_start --no-restart-on-upgrade
override_dh_systemd_enable:
# systemd enable done as part of dh_installinit
override_dh_systemd_start:
# systemd start done as part of dh_installinit
override_dh_installsystemd:
# Only enable and start systemd targets
dh_installsystemd --no-stop-on-upgrade --no-restart-after-upgrade -Xceph-mon.service -Xceph-osd.service -X ceph-mds.service
override_dh_strip:
dh_strip -pceph-mds --dbg-package=ceph-mds-dbg
@ -155,4 +149,4 @@ override_dh_python3:
# do not run tests
override_dh_auto_test:
.PHONY: override_dh_autoreconf override_dh_auto_configure override_dh_auto_build override_dh_auto_clean override_dh_auto_install override_dh_installdocs override_dh_installlogrotate override_dh_installinit override_dh_systemd_start override_dh_strip override_dh_auto_test
.PHONY: override_dh_autoreconf override_dh_auto_configure override_dh_auto_build override_dh_auto_clean override_dh_auto_install override_dh_installdocs override_dh_installlogrotate override_dh_installinit override_dh_strip override_dh_auto_test