[debhelper-devel] Bug#830208: dh_installinit tries to do dh_systemd_start's job

Michael Biebl biebl at debian.org
Tue Jul 19 20:14:53 UTC 2016


Hi

Am 19.07.2016 um 19:28 schrieb Niels Thykier:
> Thanks for the report - at first glance it sounds like #830208 (Cc'ed
> accordingly).
> 
> Peter's message quoted in full (for those not subscribed to
> debhelper-devel):
> 
>> Hi,
>>
>> Now that dh_systemd_start and dh_systemd_enable are part of debhelper
>> proper, there's a bit of duplication of work between dh_installinit and
>> dh_systemd_start.  Now don't get me wrong: I do agree that installing
>> and configuring systemd service files correctly is a Good Thing(tm);
>> it's just that I'm afraid that there are some more rough edges to
>> polish.
>>
>> So far I've only seen the problem in a package that provides both
>> a systemd service file and a SysV init script.  If the service file is
>> named debian/package.service, dh_systemd_start and dh_systemd_enable
>> will pick it up and process it just fine... but then dh_installinit will
>> *also* pick it up.  It's invoked because debian/package.init exists, but
>> it tries to process systemd and upstart files, too, if it finds them,
>> so it tries to do once again what dh_systemd_start just did, and, well,
>> it even gets it subtly wrong :)

Could you be more specific what you think it gets wrong?

>> So, hm, I'm not sure what the proper resolution would be.  Would it be
>> possible for dh_installinit to figure out that the systemd sequence is
>> enabled?  If so, then this might be the best solution - in compat 10
>> with the systemd sequence enabled, ignore any systemd service files.
>>
>> Again, don't get me wrong, I *am* very happy with the way debhelper
>> development is progressing; thanks a lot for that!
>>
>> G'luck,
>> Peter
>>
>> [...]
> 
> Michael/Martin: What is your take - should we just disable the service
> handling in dh_installinit for compat 10 or newer?  AFAICT, it should
> "just work(tm)" and now would be the time to do it if we want it in
> compat 10.

The interaction between dh_installinit and dh_systemd_* is a bit tricky
and it's been a while since I looked at it. So I'm a bit wary to simply
disable the systemd specific parts. This would need a closer look.

In general, I certainly agree though that we want to reduce the
duplicate functionality. I'm just not entirely sure yet, if merging the
dh_systemd_* helpers into dh_installinit or pulling the systemd specific
bits out of dh_installinit into dh_systemd_* is the way to go.
Both approaches have their pros and cons.

Regards,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20160719/190b6c10/attachment-0002.sig>


More information about the debhelper-devel mailing list