[Pkg-utopia-maintainers] Bug#503307: Bug#503307: Please, restart dbus after upgrade

Maximiliano Curia maxy at gnuservers.com.ar
Fri Oct 24 23:30:14 UTC 2008


Hola Michael Biebl!

El 24/10/2008 a las 21:21 escribiste:
> >> Uploading a new version to stable with a fix for this alone doesn't make
> >> sense. Not restarting at all is even better then restarting in postinst ;-)

> > The problem is that every user of Debian stable that upgrades to this
> > version, will have to figure out that they need to restart dbus or, if they
> > don't, restart the computer. I think this is not acceptable for Debian stable.

> There is a stop in the old versions prerm and a start in the new
> versions postinst script.
> So, users don't have to restart dbus manually.

The stop won't run unless you remove the package, I'm pasting the prerm and
postinst:

--- prerm version 1.0.2-1+etch1 (and 1.0.2-1+etch2)
#!/bin/sh -e

# Do not restart dbus on upgrades, only stop if we remove the package
if [ "$1" = "upgrade" ]; then
    exit 0
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/dbus" ]; then
    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
        invoke-rc.d dbus stop || exit $?
    else
        /etc/init.d/dbus stop || exit $?
    fi
fi
# End automatically added section
---

--- postinst version 1.0.2-1+etch2
#!/bin/sh
# -*- coding: utf-8 -*-
# Post-installation script for D-BUS
# Copyright © 2003 Colin Walters <walters at debian.org>
# Copyright © 2006 Sjoerd Simons <sjoerd at debian.org>

set -e

MESSAGEUSER=messagebus
MESSAGEHOME=/var/run/dbus


chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup --system
"$MESSAGEUSER"
chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || \
    adduser --system --home "$MESSAGEHOME" --no-create-home
--disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"

# Do not restart dbus on upgrades, only on fresh installations
# But do reload it so the machine-id can be generated
if [ "$1" = "configure" ]; then
    if [ -e /var/run/dbus/pid ] &&
      ps --no-heading -p $(cat /var/run/dbus/pid) > /dev/null; then
        # trigger an update notification which recommends to reboot
        [ -x /usr/share/update-notifier/notify-reboot-required ] && \
            /usr/share/update-notifier/notify-reboot-required || true
        if [ -x "/etc/init.d/dbus" ]; then
          if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
                invoke-rc.d dbus reload || true
          else  
                /etc/init.d/dbus reload || true
          fi
        fi
        exit 0
    fi
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/dbus" ]; then
    update-rc.d dbus defaults >/dev/null
    if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
        invoke-rc.d dbus start || exit $?
    else
        /etc/init.d/dbus start || exit $?
    fi
fi
# End automatically added section
---

As you can see, the prerm does an exit 0 if you are upgrading, so that users DO
need to issue a manual restart. Or after they upgrade a security fix they can no
longer start their mail program until they figure out it is a problem with dbus.

I reported the bug myself because I had to waste half an hour trying to
figure out what was going on, after I had applied the security upgrades.

So, sorry if I disagree with you, but I still find this bug important, and I do
believe it's worth an upload to proposed-updates.

Also, the problem wasn't fixed by reverting the upgrade, nor did it show
up until a user tried to open a new evolution session so it wasn't a pleasant
problem to fix. I really don't want that to happen to other Debian users.

-- 
"Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning."
		-- (Rich Cook)
Saludos /\/\ /\ >< `/





More information about the Pkg-utopia-maintainers mailing list