Bug#767429: dh-systemd: Please improve timer unit handling

Andreas Henriksson andreas at fatal.se
Thu Oct 30 22:59:08 GMT 2014


Package: dh-systemd
Version: 1.21
Severity: wishlist

Dear Maintainer,

I've looked at how to make a package where upstream installs systemd
service and timer units to not start the service during package postinst.

I could do this with override_dh_systemd_start: dh_systemd_start --no-start myunit.service
but that didn't really accomplish what I wanted and there where no
"dh_systemd_start --remaining" like other debhelpers offer.
(If I have to manually list each and every unit explicitly that will likely
lead to me missing to update it when a new one gets added upstream.)

I'm now wondering if it possible to always make the assumption that
if something ships a timer unit, then it never wants the matching service
unit started (other then by the timer) ?....

I've made a patch for that, please see attachment and excuse my lack of
perl knowledge.

(It would also be useful to me if similar would be possible for services
that has a socket unit, and I'd only like them to be socket activated.
c.f. uuid-runtime's uuidd.socket / uuidd.service which always gets started
on package upgrade.)


Regards,
Andreas Henriksson


PS. dh_systemd_start contains a comment talking about dh_installsystemd which I
assume is an old leftover which needs updating. Also the --no-also option seems
to be undocumented.

PPS. Thanks for the readable perl-code! Even someone with lack of proper
perl skills could understand it.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dh-systemd depends on:
ii  debhelper  9.20141003
ii  perl       5.20.1-1

dh-systemd recommends no packages.

Versions of packages dh-systemd suggests:
ii  augeas-tools  1.2.0-0.2

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Do-not-start-services-with-a-matching-timer-unit.patch
Type: text/x-diff
Size: 1760 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20141030/99150178/attachment.patch>


More information about the Pkg-systemd-maintainers mailing list