[Pkg-utopia-maintainers] Bug#712167: dbus: add upstart init support

Dmitrijs Ledkovs xnox at debian.org
Fri Jun 14 11:44:58 UTC 2013


On 14 June 2013 12:16, Simon McVittie <smcv at debian.org> wrote:
> On Thu, 13 Jun 2013 at 19:23:46 +0100, Dmitrijs Ledkovs wrote:
>> please consider applying the following patch that adds upstart
>> integration for the dbus package.
>
> pkg-utopia are probably aware, but: dbus/testing has a CVE, so please don't
> upload dbus/unstable until 1.6.12 has migrated.
>
>> The upstart job attached will continue to honour existing
>> settings for additional parameters from /etc/default/dbus, just like
>> the current init.d script.
>
> Do/should we support that file at all? I can't see anything in dbus-daemon

I'd drop sourcing /etc/default/dbus with pleasure. This simplifies the
job file, making it more upstart like.

>
>> Also conditional check whether dbus is
>> running under upstart is added in the dbus.postinst for the upgrade
>> notification.
>
> This is an increasing amount of code to detect whether the dbus-daemon
> is running, so that we know whether to prompt the user to reboot.
>

Taking in your suggestion about pgrep/unconditional trigger, how about
something like this?

    read pid < /var/run/dbus/pid
    [ -n "${pid:-}" ] && $(kill -0 "${pid:-}" 2> /dev/null) && \
        [ -x /usr/share/update-notifier/notify-reboot-required ] && \
        /usr/share/update-notifier/notify-reboot-required || true

This should work with sysvinit, upstart and systemd. This is roughly
inspired by status_of_proc from /lib/lsb/init-functions
It still has opportunity for false positives (stale pids), but is
probably good enough.

Updated patch attached.

Regards,

Dmitrijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-upstart-2.deb.diff
Type: application/octet-stream
Size: 3398 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20130614/69de88a4/attachment.obj>


More information about the Pkg-utopia-maintainers mailing list