Package: debhelper
Version: 11.3.2
Severity: important
Dear Maintainer,
I am trying to convert SysV init script to systemd unit files for the nss-pam-
ldapd packages. Multiple packages are built out of this nss-pam-ldapd sources.
There are two packages with daemons which needs systemd unit files : nslcd and
pynslcd.
I was able to do systemd conversion on Debian 9.4 with the following section in
debian/rules file:
override_dh_installinit:
dh_systemd_enable -pnslcd --name=k5start-nslcd k5start-nslcd.service
dh_systemd_enable -pnslcd --name=nslcd nslcd.service
dh_installinit -pnslcd --name=k5start-nslcd --no-start --noscripts
dh_installinit -pnslcd --name=nslcd --no-start --noscripts
dh_systemd_start -pnslcd --name=k5start-nslcd --no-restart-on-upgrade
dh_systemd_start -pnslcd --name=nslcd --no-restart-on-upgrade
dh_systemd_enable -ppynslcd --name=k5start-pynslcd k5start-
pynslcd.service
dh_systemd_enable -ppynslcd --name=pynslcd pynslcd.service
dh_installinit -ppynslcd --name=k5start-pynslcd --no-start --noscripts
dh_installinit -ppynslcd --name=pynslcd --no-start --noscripts
dh_systemd_start -ppynslcd --name=k5start-pynslcd --no-restart-on-
upgrade
dh_systemd_start -ppynslcd --name=pynslcd --no-restart-on-upgrade
Now I am trying to move this to unstable where I have to use the new
dh_installsystemd. On unstable, I have changed the above section as:
override_dh_installsystemd:
dh_installsystemd -pnslcd --name=k5start-nslcd k5start-nslcd.service
dh_installsystemd -pnslcd --name=nslcd nslcd.service
dh_installsystemd -ppynslcd --name=k5start-pynslcd k5start-
pynslcd.service
dh_installsystemd -ppynslcd --name=pynslcd pynslcd.service
Running debuild -us -uc I get the following error message:
dh_installsystemd -ppynslcd --name=k5start-pynslcd k5start-pynslcd.service
dh_installsystemd: Could not find "k5start-pynslcd.service" in the
/lib/systemd/system directory of pynslcd. This could be a typo, or using Also=
with a service file from another package. Please check carefully that this
message is harmless.
Looking at the whole output deeper, I can see that dh_installsystemd creates
the proper directories for the first package:
dh_installsystemd -pnslcd --name=k5start-nslcd k5start-nslcd.service
install -d debian/nslcd/lib/systemd/system
install -p -m0644 debian/k5start-nslcd.service
debian/nslcd/lib/systemd/system/k5start-
nslcd.service
However, it appears to fail to create them for the second package.
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.16.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages debhelper depends on:
ii autotools-dev 20180224.1
ii dh-autoreconf 19
ii dh-strip-nondeterminism 0.041-1
ii dpkg 1.19.0.5+b1
ii dpkg-dev 1.19.0.5
ii dwz 0.12-2
ii file 1:5.33-2
ii libdpkg-perl 1.19.0.5
ii man-db 2.8.3-2
ii perl 5.26.2-5
ii po-debconf 1.0.20
debhelper recommends no packages.
Versions of packages debhelper suggests:
pn dh-make <none>
-- no debconf information
#!/usr/bin/make -f
export DH_VERBOSE=1
# multiarch support
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# enable hardening options
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
dh $@ --with python2
# pass extra flags to configure
override_dh_auto_configure:
dh_auto_configure -- \
--libdir=/lib/$(DEB_HOST_MULTIARCH) \
--with-pam-seclib-dir=/lib/$(DEB_HOST_MULTIARCH)/security \
--enable-warnings \
--enable-pynslcd
# run the tests but ignore the results
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-chmod o-rwx tests/nslcd-test.conf
-dh_auto_test
-cat tests/test-suite.log
endif
override_dh_installsystemd:
dh_installsystemd -pnslcd --name=k5start-nslcd k5start-nslcd.service
dh_installsystemd -pnslcd --name=nslcd nslcd.service
dh_installsystemd -ppynslcd --name=k5start-pynslcd
k5start-pynslcd.service
dh_installsystemd -ppynslcd --name=pynslcd pynslcd.service