Hi,
I was looking at sanlock for another issue today and saw this bug in
the tracker.
The missing binary is no where listed in an obvious way in the source/build.
I checked it is also not an artifact that just needs a debian/*.install rule.
It really seems to be missing.

But since upstream refers to systemd-wdmd in the service file as well
and upstream is by redhat I looked into the rpm src build.

First of all - yes there is this binary in Fedora:
rpm -qf /lib/systemd/systemd-wdmd
sanlock-3.5.0-3.fc27.x86_64

There in the spec file this is resolved by:
install -D -m 0755 init.d/wdmd $RPM_BUILD_ROOT/usr/lib/systemd/systemd-wdmd

So TL;DR this unknown /lib/systemd/systemd-wdmd is actually init.d/wdmd.
Since we need to install+rename+chmod (no x by default) I'd suggest to
do it in the rules file - if you know better how to do through dh_
tools please feel free to do so.

The fix could look like:
 override_dh_installinit:
        dh_installinit -psanlock --name=wdmd --no-restart-on-upgrade --no-start
+       cp init.d/wdmd debian/sanlock/lib/systemd/systemd-wdmd
+       chmod +x debian/sanlock/lib/systemd/systemd-wdmd
        dh_installinit -psanlock --name=sanlock --no-restart-on-upgrade


I test built with the change above and got a working file at the place
it is supposed to be in the package:
-rwxr-xr-x root/root      2351 2018-01-29 07:19 ./lib/systemd/systemd-wdmd

-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd

Reply via email to