Bug#780522: init-system-helpers: deb-systemd-helper doesn't handle drop-ins and is inconsistent w/ systemd w.r.t. lists
christian at iwakd.de
Tue Apr 26 09:27:02 BST 2016
On 04/26/2016 10:09 AM, Martin Pitt wrote:
> Christian Seiler [2015-03-15 15:23 +0100]:
>> deb-systemd-helper doesn't handle drop-ins at all (only the main
>> service file is parsed) and it doesn't treat lists properly: when
>> creating links for Alias=, it doesn't properly treat multiple entries
>> in the same line ($1 instead of $_ used), when removing links for
>> Also=, it assumes that there's only ever one entry per line, and it
>> doesn't support systemd's syntax to reset a list to empty (which native
>> systemd supports for the [Install] section entries).
> It's been a while, sorry for not getting to this earlier! Do you think
> you can update the patch to current i-s-h 1.30? I'm afraid it does not
> apply any more.
Yes, however there's a slight issue: systemctl enable/disable doesn't
handle dropins either, as I found out quite a bit after reporting this
bug. So only part of my patch is actually "correct", in terms of the
list handling. (And even there it is more complicated, as systemd only
allows resets for everything, but not Also= IIRC.) OTOH, I do think
that dropins should be handled the same in all cases, and I was
working on a patch for upstream systemd before I got sidetracked by
I'll provide you with a patch to make i-s-h match the current behavior
of systemctl enable/disable later this evening (which IMHO ideally
should also go into Jessie after some testing in unstable).
Then I'll try to improve systemd upstream behavior and send a pull
request upstream. Assuming that's accepted at some point, I'll provide
a separate patch to make i-s-h comply to that as well.
>> Also, while I've tested this to some extent, I haven't done extensive
>> stress testing of these changes. I'm fairly certain it's correct the
>> way it is, but I have to admit I'm not a Perl guy, so you should
>> double-check this. I HAVE diverted deb-systemd-helper on my system
>> now and replaced it with this, so I'll hopefully notice mistakes.
> The patch LGTM in general. Did you see any fallout?
Well, kinda. I saw some fallout when I realized that systemctl enable
and disable don't handle dropins either. Which typically didn't make
much of a difference, unless you reset WantedBy= in a dropin, because
systemctl wouldn't see that, and so using that would have a slightly
different effect as compared to package installation. But I never had
any issue with my patch not doing what I wanted it to do, so the code
itself appears to be fine.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: OpenPGP digital signature
More information about the Pkg-systemd-maintainers