tag 553672 +patch
thanks

On Sun, Feb 13, 2011 at 09:19:46AM -0500, Andrew Engelbrecht wrote:
> I tried removing /etc/dbus-1/system.d/system-tools-backends.conf, and
> found that it solves the problem. Doing this lets an admin launch the
> *-admin programs, and authenticate to make any changes, as normal.
> This way, you don't have to manually add yourself and every new admin
> account to the stb-admin group.

The source of the bug is that upstream had renamed
   /etc/dbus-1/system.d/system-tools-backends.conf
to /etc/dbus-1/system.d/org.freedesktop.SystemToolsBackends.conf after
version 2.6.0.

Unfortunately, a rename of a conffile must be handled in maintainer
scripts to be handled properly. Otherwise, the old conffile simply sit
there. In this case, overriding the proper D-Bus configuration and
making gnome-system-tools fail.

The attached patch fix this issue. The resulting package has been
installed:

 * as a single upgrade on a freshly installed Squeeze (where the bug
   does not exist),
 * as a single upgrade on a Squeeze upgraded from Lenny where it fixes
   the issue,
 * as part as an upgrade from Lenny to Squeeze, and the issue does not
   appear anymore.

This fix should really be included in the next Squeeze point-release.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
[email protected]                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
diff -Nru system-tools-backends-2.10.1/debian/changelog system-tools-backends-2.10.1/debian/changelog
--- system-tools-backends-2.10.1/debian/changelog	2010-12-17 22:48:52.000000000 +0100
+++ system-tools-backends-2.10.1/debian/changelog	2011-06-05 16:26:43.000000000 +0200
@@ -1,3 +1,11 @@
+system-tools-backends (2.10.1-3) UNRELEASED; urgency=low
+
+  * Properly handle the rename of
+    /etc/dbus-1/system.d/system-tools-backends.conf to
+    org.freedesktop.SystemToolsBackends.conf.  (Closes: #553672)
+
+ -- Jérémy Bobbio <[email protected]>  Sun, 05 Jun 2011 16:16:54 +0200
+
 system-tools-backends (2.10.1-2) unstable; urgency=low
 
   * 03_hostname.patch: patch by Mario Izquierdo to fix hostname 
diff -Nru system-tools-backends-2.10.1/debian/system-tools-backends.postinst system-tools-backends-2.10.1/debian/system-tools-backends.postinst
--- system-tools-backends-2.10.1/debian/system-tools-backends.postinst	1970-01-01 01:00:00.000000000 +0100
+++ system-tools-backends-2.10.1/debian/system-tools-backends.postinst	2011-06-05 16:13:49.000000000 +0200
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/dbus-1/system.d/system-tools-backends.conf \
+    /etc/dbus-1/system.d/org.freedesktop.SystemToolsBackends.conf 2.6.0-6.1 -- "$@"
+
+#DEBHELPER#
diff -Nru system-tools-backends-2.10.1/debian/system-tools-backends.postrm system-tools-backends-2.10.1/debian/system-tools-backends.postrm
--- system-tools-backends-2.10.1/debian/system-tools-backends.postrm	2007-05-06 09:43:52.000000000 +0200
+++ system-tools-backends-2.10.1/debian/system-tools-backends.postrm	2011-06-05 16:16:31.000000000 +0200
@@ -2,6 +2,9 @@
 
 set -e
 
+dpkg-maintscript-helper mv_conffile /etc/dbus-1/system.d/system-tools-backends.conf \
+    /etc/dbus-1/system.d/org.freedesktop.SystemToolsBackends.conf 2.6.0-6.1 -- "$@"
+
 # Do not restart dbus on upgrades, only if we remove the package.
 if [ "$1" = "remove" ] ; then 
     if [ -x /etc/init.d/dbus ]; then
diff -Nru system-tools-backends-2.10.1/debian/system-tools-backends.preinst system-tools-backends-2.10.1/debian/system-tools-backends.preinst
--- system-tools-backends-2.10.1/debian/system-tools-backends.preinst	2009-01-04 12:27:27.000000000 +0100
+++ system-tools-backends-2.10.1/debian/system-tools-backends.preinst	2011-06-05 17:06:26.000000000 +0200
@@ -33,7 +33,24 @@
             rm_conffile system-tools-backends "/etc/init.d/system-tools-backends"
             update-rc.d system-tools-backends remove
         fi
+        if [ -f /etc/dbus-1/system.d/system-tools-backends.conf ] && \
+           [ -f /etc/dbus-1/system.d/org.freedesktop.SystemToolsBackends.conf ]; then
+            # We have both old and new conffiles, which probably means that a version
+            # between 2.6.0-6.1 and 2.10.1-2 was installed.
+            if echo "68224c4af00f723e7e08992a91ddc9f286fc4f4c  /etc/dbus-1/system.d/system-tools-backends.conf" |
+               sha1sum --check --status -; then
+                # Old conffile was not modified, let's just remove it
+                rm -f /etc/dbus-1/system.d/system-tools-backends.conf
+            else
+                # Otherwise, rename it
+                mv /etc/dbus-1/system.d/system-tools-backends.conf \
+                        /etc/dbus-1/system.d/system-tools-backends.conf.dpkg-remove
+            fi
+        fi
         ;;
 esac
 
+dpkg-maintscript-helper mv_conffile /etc/dbus-1/system.d/system-tools-backends.conf \
+    /etc/dbus-1/system.d/org.freedesktop.SystemToolsBackends.conf 2.6.0-6.1 -- "$@"
+
 #DEBHELPER#

Attachment: signature.asc
Description: Digital signature

Reply via email to