I have attached a deb diff that includes an upstart job. It is
different from the previous diff by Dimitri because it prompts for a
reboot in the post installation regardless, per Simon McVittie's
suggestion. It also uses the --nopidfile option to start dbus.
Please consider this for inclusion,
--
Cameron Norman
diff -Nru dbus-1.8.0/debian/changelog dbus-1.8.0/debian/changelog
--- dbus-1.8.0/debian/changelog 2014-02-26 05:15:58.000000000 -0800
+++ dbus-1.8.0/debian/changelog 2014-03-25 15:32:27.000000000 -0700
@@ -1,3 +1,15 @@
+dbus (1.8.0-2.1) UNRELEASED; urgency=low
+
+ * Non-maintainer upload.
+ * Add Upstart integration:
+ - Check if init is upstart in the init.d script and exit
+ appropiately
+ - Add Upstart job
+ - Depend on lsb-base that provides init_is_upstart function
+ - Prompt for reboot on post-install always
+
+ -- Cameron Norman <camerontnor...@gmail.com> Tue, 25 Mar 2014 15:29:17 -0700
+
dbus (1.8.0-2) unstable; urgency=low
* debian/rules: look for DEB_BUILD_PROFILES, the new name for
diff -Nru dbus-1.8.0/debian/control dbus-1.8.0/debian/control
--- dbus-1.8.0/debian/control 2014-02-26 05:15:58.000000000 -0800
+++ dbus-1.8.0/debian/control 2014-03-25 15:29:10.000000000 -0700
@@ -57,7 +57,7 @@
Depends: ${shlibs:Depends},
${misc:Depends},
adduser,
- lsb-base (>= 3.2-14)
+ lsb-base (>= 4.1+Debian3)
Suggests: dbus-x11
Multi-Arch: foreign
Description: simple interprocess messaging system (daemon and utilities)
diff -Nru dbus-1.8.0/debian/dbus.init dbus-1.8.0/debian/dbus.init
--- dbus-1.8.0/debian/dbus.init 2014-02-26 05:15:58.000000000 -0800
+++ dbus-1.8.0/debian/dbus.init 2014-03-25 15:27:16.000000000 -0700
@@ -97,6 +97,17 @@
log_action_end_msg $?
}
+if init_is_upstart; then
+ case "$1" in
+ stop)
+ exit 0
+ ;;
+ *)
+ exit 1
+ ;;
+ esac
+fi
+
case "$1" in
start)
start_it_up
diff -Nru dbus-1.8.0/debian/dbus.postinst dbus-1.8.0/debian/dbus.postinst
--- dbus-1.8.0/debian/dbus.postinst 2014-02-26 05:15:58.000000000 -0800
+++ dbus-1.8.0/debian/dbus.postinst 2014-03-25 14:51:12.000000000 -0700
@@ -38,11 +38,9 @@
# system bus is not supported by upstream). The code added by
# dh_installinit -r creates a start action, below.
- if [ -x "/etc/init.d/dbus" ] && /etc/init.d/dbus status > /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
- fi
+ # trigger an update notification which recommends to reboot
+ [ -x /usr/share/update-notifier/notify-reboot-required ] && \
+ /usr/share/update-notifier/notify-reboot-required || true
fi
# This is what the init script would do, but it's simpler (and less
diff -Nru dbus-1.8.0/debian/dbus.upstart dbus-1.8.0/debian/dbus.upstart
--- dbus-1.8.0/debian/dbus.upstart 1969-12-31 16:00:00.000000000 -0800
+++ dbus-1.8.0/debian/dbus.upstart 2014-03-25 15:24:38.000000000 -0700
@@ -0,0 +1,25 @@
+# dbus - D-Bus system message bus daemon
+#
+# The D-Bus system message bus allows system daemons
+# and user applications to communicate.
+
+description "dbus - D-Bus system message bus daemon"
+
+start on local-filesystems
+stop on deconfiguring-networking
+
+oom score -900
+
+expect fork
+respawn
+
+pre-start script
+ mkdir -p /var/run/dbus
+ chown messagebus:messagebus /var/run/dbus
+
+ exec dbus-uuidgen --ensure
+end script
+
+exec dbus-daemon --system --nopidfile --fork
+
+post-start exec kill -USR1 1