[debhelper-devel] Bug#887900: dh_installsystemd does not properly handle aliased services

Michael Biebl biebl at debian.org
Thu Jan 25 08:17:45 UTC 2018


Am 25.01.2018 um 09:14 schrieb Michael Biebl:
> Am 24.01.2018 um 23:21 schrieb Felipe Sateler:
>> On Wed, Jan 24, 2018 at 5:44 PM, Michael Biebl <biebl at debian.org> wrote:
> 
>>>> if ! [ -d /run/systemd/system ] || ! [ -e /lib/sytemd/system/foo.service ] ; then
>>>>       invoke-rc.d foo $_dh_action || exit 1
>>>> fi
>>>
>>
>> Something like this, yes. But this seems a bit simplistic (would we
>> want to check /etc, /usr/lib, /usr/local/lib and /run ?)
> 
> Hm, not sure. Imho packages shipping a native service file should imho
> either make sure to have a name which matches the one of the SysV init
> script, or provide a static symlink in the package (i.e. not one that is
> generated via systemctl enable). For a package which uses a generator,
> i.e. generate the .service files on the fly, the package should ship a
> static symlink in the package /lib/systemd/system/foo.service -> /dev/null.
> 
> In all these cases, the simple check I suggested would be sufficient.
> 
> Felipe, do you have a case in mind this would not cover?

Fwiw, I also considered moving the above check into invoke-rc.d itself.
I.e. if invoke-rc.d detects that it is running in a dpkg context and
there is a matching service file, it will do nothing.

But then again, invoke-rc.d can't know if the package was compiled with
compat 12 support or not, i.e. if there will be the necessary
deb-systemd-invoke calls.


-- 
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: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20180125/16d703b1/attachment-0003.sig>


More information about the debhelper-devel mailing list