Commit 88afb46f authored by Simon McVittie's avatar Simon McVittie

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.
parent c3963adc
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
......
......@@ -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
......
#!/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#
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment