From 88afb46fc5901821bd3fd77459c4cb9577fab25a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 23 Dec 2014 21:24:31 +0000 Subject: preinst: partially revert change from 1.8.12-2 * preinst: partially revert change from 1.8.12-2. It seems that the preinst is too late to add a useful dpkg-statoverride entry: dpkg has already loaded the statoverride database by this point, and if we add the entry in the preinst, dpkg-statoverride won't run and have its --update side-effect in the postinst. (Closes: #773107, #773838) * postinst: don't run dpkg-statoverride with 2>/dev/null: in the unlikely event that it fails for a reason other than "not overridden" (which results in silently exiting 1), we'll want to know about it. --- debian/changelog | 13 +++++++++++++ debian/dbus.postinst | 4 +--- debian/dbus.preinst | 20 -------------------- 3 files changed, 14 insertions(+), 23 deletions(-) delete mode 100644 debian/dbus.preinst diff --git a/debian/changelog b/debian/changelog index f13ccf71..b0810a54 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +dbus (1.8.12-3) unstable; urgency=medium + + * preinst: partially revert change from 1.8.12-2. It seems that the + preinst is too late to add a useful dpkg-statoverride entry: dpkg has + already loaded the statoverride database by this point, and if we add + the entry in the preinst, dpkg-statoverride won't run and have + its --update side-effect in the postinst. (Closes: #773107, #773838) + * postinst: don't run dpkg-statoverride with 2>/dev/null: in the unlikely + event that it fails for a reason other than "not overridden" (which + results in silently exiting 1), we'll want to know about it. + + -- Simon McVittie Tue, 23 Dec 2014 21:21:20 +0000 + dbus (1.8.12-2) unstable; urgency=medium * postinst: use dpkg-statoverride to set the permissions for diff --git a/debian/dbus.postinst b/debian/dbus.postinst index 27f77c22..c76a02c6 100644 --- a/debian/dbus.postinst +++ b/debian/dbus.postinst @@ -31,9 +31,7 @@ if [ "$1" = configure ]; then --disabled-password \ --group "$MESSAGEUSER" - # The preinst might have done this already, or a sysadmin might have - # set up their own dpkg-statoverride. Keep this in sync with the preinst. - if ! dpkg-statoverride --list "$LAUNCHER" >/dev/null 2>&1; then + if ! dpkg-statoverride --list "$LAUNCHER" >/dev/null; then dpkg-statoverride --update --add root "$MESSAGEUSER" 4754 "$LAUNCHER" fi diff --git a/debian/dbus.preinst b/debian/dbus.preinst deleted file mode 100644 index 4588ef08..00000000 --- a/debian/dbus.preinst +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -set -e - -MESSAGEUSER=messagebus -LAUNCHER=/usr/lib/dbus-1.0/dbus-daemon-launch-helper - -# Avoid having the new $LAUNCHER temporarily go back to -# its permissions and ownership from the .deb (0755 root:root). -# We do this opportunistically - only if $MESSAGEUSER already exists -# (i.e. dbus is installed or has been installed in the past) - to avoid having -# to pre-depend on adduser, and we don't do it if the postinst or -# the sysadmin has already set up a dpkg-statoverride. -# Keep this in sync with the postinst. -if getent group "$MESSAGEUSER" >/dev/null && \ - ! dpkg-statoverride --list "$LAUNCHER" >/dev/null 2>&1; then - dpkg-statoverride --update --add root "$MESSAGEUSER" 4754 "$LAUNCHER" -fi - -#DEBHELPER# -- cgit v1.2.3