diff options
author | Simon McVittie <smcv@debian.org> | 2014-12-23 21:24:31 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2014-12-23 21:24:31 +0000 |
commit | 88afb46fc5901821bd3fd77459c4cb9577fab25a (patch) | |
tree | 75b54ffdb6e83de0b855d5bfd9330e3d2e222b2f | |
parent | c3963adc0a056e78367b13849cd63dbcd19de72e (diff) | |
download | dbus-88afb46fc5901821bd3fd77459c4cb9577fab25a.tar.gz |
preinst: partially revert change from 1.8.12-2debian/1.8.12-3
* 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.
-rw-r--r-- | debian/changelog | 13 | ||||
-rw-r--r-- | debian/dbus.postinst | 4 | ||||
-rw-r--r-- | debian/dbus.preinst | 20 |
3 files changed, 14 insertions, 23 deletions
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 <smcv@debian.org> 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# |