]> git.proxmox.com Git - pve-ha-manager.git/blobdiff - debian/rules
bump version to 4.0.4
[pve-ha-manager.git] / debian / rules
index 0823cf3acf44922581d846ccbae0c88c47ffbdde..a7a3f6c0b3e165469434156541d61ad9e2e7b8a5 100755 (executable)
 #export DH_VERBOSE=1
 
 %:
-       dh $@ --with=systemd
+       dh $@
 
-override_dh_systemd_enable:
+override_dh_install:
+       # embed copies of libpve-common-perl files needed by simulator
+       install -d -m 0755 debian/tmp/usr/share/pve-ha-simulator/PVE
+       install -m 0644 \
+               /usr/share/perl5/PVE/Exception.pm \
+               /usr/share/perl5/PVE/JSONSchema.pm \
+               /usr/share/perl5/PVE/ProcFSTools.pm \
+               /usr/share/perl5/PVE/SafeSyslog.pm \
+               /usr/share/perl5/PVE/SectionConfig.pm \
+               /usr/share/perl5/PVE/Syscall.pm \
+               /usr/share/perl5/PVE/Tools.pm \
+               debian/tmp/usr/share/pve-ha-simulator/PVE/
+       dh_install
 
-       dh_systemd_enable -ppve-ha-manager --name watchdog-mux
-       dh_systemd_enable -ppve-ha-manager --name pve-ha-crm
-       dh_systemd_enable -ppve-ha-manager --name pve-ha-lrm
+override_dh_missing:
+       dh_missing --fail-missing
 
-override_dh_systemd_start:
-       dh_systemd_start -ppve-ha-manager --name watchdog-mux --no-restart-on-upgrade watchdog-mux.service watchdog-mux.socket
-       dh_systemd_start -ppve-ha-manager --name pve-ha-crm pve-ha-crm.service pve-ha-lrm.service
+# dh_systemd_enable watchdog-mux despite it being static to get it installed in
+# the correct location/package without manual intervention
+override_dh_installsystemd:
+       dh_installsystemd -ppve-ha-manager --name watchdog-mux --no-restart-after-upgrade --no-stop-on-upgrade watchdog-mux.service
+       # restart LRM first, else single-node clusters with configured HA will deadlock
+       dh_installsystemd -ppve-ha-manager --name pve-ha-lrm pve-ha-lrm.service
+       dh_installsystemd -ppve-ha-manager --name pve-ha-crm pve-ha-crm.service