[Build-common-hackers] Bug#864489: Bug#864489: cdbs: Resolution of bug #811555 breaks fix for bug #715504

Alexander Sbitnev alexander.sbitnev at gmail.com
Fri Jun 9 17:47:30 UTC 2017

I am quite a newbie myself so don't think I be able to propose something 
rock solid.
This problem is quite trivial.
Normally dh_systemd_enable expect to see *.service file inside debian/ 
directory or installed into /lib/systemd/system/ of created package.
And in case of tarantool package it installing tarantool.service into 
file tree with dh_install which called after dh_systemd_enable.
Same situation was before #715504 bug closed in cdbs 0.4.123 (Fix 
debhelper snippet to call dh_systemd_* after dh_install.).
But with #811555 bug there was a need to put dh_systemd_enable before 
dh_installinit. And this was resolved by moving dh_systemd_enable up 
before dh_installinit (and before dh_install). After #811555 bug 
resolution #715504 bug become valid again.

As result we get such kind of error:
dh_systemd_enable -ptarantool-common --name=tarantool tarantool.service
dh_systemd_enable: Could not find "tarantool.service" in the 
/lib/systemd/system directory of tarantool-common. This could be a typo, 
or using Also= with a service file from another package. Please check 
carefully that this message is harmless.
dh_systemd_enable: Cannot open(tarantool.service) for extracting the 
Also= line(s)

In result this service are not automatically started after installation 
(not a big deal actually).

I've attached file with solution working for current tarantool package. 
But I quite unsure if such order of execution not breaking something else.
Maybe dh_install should be moved higher instead of my solution to put 
dh_systemd_enable and dh_installinit lower.
I am only hope someone more experienced will take a lead here.
Probably this bug should be addressed inside tarantool package.

And as I've checked miredo package it doesn't have such problem probably 
because they doesn't using cdbs currently.

On 06/09/2017 03:16 PM, Jonas Smedegaard wrote:
> Quoting Alexander Sbitnev (2017-06-09 13:02:32)
>> During resolution of bug #811555 dh_systemd_enable was moved up to be
>> before dh_installinit. But probably instead dh_installinit (and now
>> dh_systemd_enable) should be moved down to be after dh_install.
>> Atleast tarantool package unable to produce pure systemd startup files
>> as result of this bug. Current situation is compensated by legacy SysV
>> init startup files but not on pure systemd setup. Probably mentioned
>> in #715504 miredo package is also have same problem.
> Thanks for reporting.
> I am no expert in systemd.
> Please (you or someone else more knowledgeable than me) provide a patch
> - or at least a clear description of a single order of execution of all
> involved parts - which takes these multiple bugreports into account.
>   - Jonas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Run-dh_systemd_enable-after-dh_install.patch
Type: text/x-patch
Size: 2239 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20170609/df18a90c/attachment.bin>

More information about the Build-common-hackers mailing list