[maemo-commits] [maemo-commits] r17545 - projects/haf/trunk/dbus/debian
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Fri Feb 27 23:47:07 EET 2009
- Previous message: [maemo-commits] r17544 - projects/haf/tags/libxml2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: guillem Date: 2009-02-27 23:47:05 +0200 (Fri, 27 Feb 2009) New Revision: 17545 Added: projects/haf/trunk/dbus/debian/dbus-actdead.event projects/haf/trunk/dbus/debian/dbus.event Modified: projects/haf/trunk/dbus/debian/changelog projects/haf/trunk/dbus/debian/control projects/haf/trunk/dbus/debian/dbus-Xsession projects/haf/trunk/dbus/debian/rules Log: Take over upstart scripts Take over upstart event.d files. (Fixes: NB#103322) - Fix script to match the previous contents from the init script. - Add a Replaces on system-services to dbus package. Take over upstart Xsession file. (Fixes: NB#103349) - Reactivate Xsession script installation logic. - Prepend maemo code, and disable debian stuff for now. Modified: projects/haf/trunk/dbus/debian/changelog =================================================================== --- projects/haf/trunk/dbus/debian/changelog 2009-02-27 16:18:38 UTC (rev 17544) +++ projects/haf/trunk/dbus/debian/changelog 2009-02-27 21:47:05 UTC (rev 17545) @@ -1,6 +1,12 @@ dbus (1.2.12-0maemo3) UNRELEASED; urgency=low * Add information headers to patches. + * Take over upstart event.d files. (Fixes: NB#103322) + - Fix script to match the previous contents from the init script. + - Add a Replaces on system-services to dbus package. + * Take over upstart Xsession file. (Fixes: NB#103349) + - Reactivate Xsession script installation logic. + - Prepend maemo code, and disable debian stuff for now. -- Guillem Jover <guillem.jover at nokia.com> Wed, 11 Feb 2009 12:51:02 +0200 Modified: projects/haf/trunk/dbus/debian/control =================================================================== --- projects/haf/trunk/dbus/debian/control 2009-02-27 16:18:38 UTC (rev 17544) +++ projects/haf/trunk/dbus/debian/control 2009-02-27 21:47:05 UTC (rev 17545) @@ -24,7 +24,8 @@ libdbus-1-1 Replaces: libdbus0, dbus-1, - dbus-1-utils (<< 1.0.2-5) + dbus-1-utils (<< 1.0.2-5), + system-services Provides: dbus-1-utils Recommends: dbus-x11 Description: simple interprocess messaging system @@ -52,7 +53,7 @@ ${misc:Depends}, dbus Conflicts: dbus (<< 1.1.2) -Replaces: dbus (<< 1.1.2) +Replaces: dbus (<< 1.1.2), system-services Description: simple interprocess messaging system (X11 deps) D-Bus is a message bus, used for sending messages between applications. Conceptually, it fits somewhere in between raw sockets and CORBA in Modified: projects/haf/trunk/dbus/debian/dbus-Xsession =================================================================== --- projects/haf/trunk/dbus/debian/dbus-Xsession 2009-02-27 16:18:38 UTC (rev 17544) +++ projects/haf/trunk/dbus/debian/dbus-Xsession 2009-02-27 21:47:05 UTC (rev 17545) @@ -3,6 +3,14 @@ # simply place use-session-dbus into your /etc/X11/Xsession.options file # +/usr/sbin/dsmetool -n -1 -t "/usr/bin/dbus-daemon --session" +echo 'export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/session_bus_socket' > ${SESSION_BUS_ADDRESS_FILE} +# export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/session_bus_socket +# export $(dbus-launch --exit-with-session) + +# XXX: maemo divergence +if false; then + STARTDBUS= DBUSLAUNCH=/usr/bin/dbus-launch @@ -15,3 +23,6 @@ if [ -n "$STARTDBUS" ]; then STARTUP="$DBUSLAUNCH --exit-with-session $STARTUP" fi + +fi + Added: projects/haf/trunk/dbus/debian/dbus-actdead.event =================================================================== --- projects/haf/trunk/dbus/debian/dbus-actdead.event 2009-02-27 16:18:38 UTC (rev 17544) +++ projects/haf/trunk/dbus/debian/dbus-actdead.event 2009-02-27 21:47:05 UTC (rev 17545) @@ -0,0 +1,68 @@ +description "System message bus" +author "Michael Biebl" + +start on ACT_DEAD +stop on USER +stop on starting shutdown + +console none + +pre-start script + DAEMON=/usr/bin/dbus-daemon + UUIDGEN=/usr/bin/dbus-uuidgen + UUIDGEN_OPTS=--ensure + DAEMONUSER=messagebus + PIDDIR=/var/run/dbus + PIDFILE=$PIDDIR/pid + MACHINE_ID=/var/lib/dbus/machine-id + + . /lib/lsb/init-functions + + create_machineid() { + # Create machine-id file if it does not exist (this is the first boot) or + # empty (due to an unclean reboot). + if [ ! -f $MACHINE_ID -o ! -s $MACHINE_ID ]; then + # machine-id file does not exist or is empty + if [ -x $UUIDGEN ]; then + if [ -f $MACHINE_ID ]; then + # machine-id file is empty, remove it to make dbus-uuidgen happy + rm $MACHINE_ID + fi + # generate machine-id file + $UUIDGEN $UUIDGEN_OPTS + else + log_warning_msg "The machine-id file cannot be created." + fi + fi + } + + # PID dir is made also in dsmetool case, so that system.conf + # does not need changes + if [ ! -d $PIDDIR ]; then + mkdir -p $PIDDIR + chown $DAEMONUSER:$DAEMONUSER $PIDDIR + fi + + if [ -e $PIDFILE ]; then + PIDDIR=/proc/$(cat $PIDFILE) + if ! [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then + log_success_msg "Removing stale PID file $PIDFILE." + rm -f $PIDFILE + fi + fi + + create_machineid + + echo "Starting dbus" +end script + +post-start script + # Block until the daemon is ready for use + while [ ! -e /var/run/dbus/system_bus_socket ]; do + sleep 1 + done +end script + +exec /usr/bin/dbus-daemon --system --nofork +respawn + Added: projects/haf/trunk/dbus/debian/dbus.event =================================================================== --- projects/haf/trunk/dbus/debian/dbus.event 2009-02-27 16:18:38 UTC (rev 17544) +++ projects/haf/trunk/dbus/debian/dbus.event 2009-02-27 21:47:05 UTC (rev 17545) @@ -0,0 +1,68 @@ +description "System message bus" +author "Michael Biebl" + +start on USER +stop on starting shutdown +stop on ACT_DEAD + +console none + +pre-start script + DAEMON=/usr/bin/dbus-daemon + UUIDGEN=/usr/bin/dbus-uuidgen + UUIDGEN_OPTS=--ensure + DAEMONUSER=messagebus + PIDDIR=/var/run/dbus + PIDFILE=$PIDDIR/pid + MACHINE_ID=/var/lib/dbus/machine-id + + . /lib/lsb/init-functions + + create_machineid() { + # Create machine-id file if it does not exist (this is the first boot) or + # empty (due to an unclean reboot). + if [ ! -f $MACHINE_ID -o ! -s $MACHINE_ID ]; then + # machine-id file does not exist or is empty + if [ -x $UUIDGEN ]; then + if [ -f $MACHINE_ID ]; then + # machine-id file is empty, remove it to make dbus-uuidgen happy + rm $MACHINE_ID + fi + # generate machine-id file + $UUIDGEN $UUIDGEN_OPTS + else + log_warning_msg "The machine-id file cannot be created." + fi + fi + } + + # PID dir is made also in dsmetool case, so that system.conf + # does not need changes + if [ ! -d $PIDDIR ]; then + mkdir -p $PIDDIR + chown $DAEMONUSER:$DAEMONUSER $PIDDIR + fi + + if [ -e $PIDFILE ]; then + PIDDIR=/proc/$(cat $PIDFILE) + if ! [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then + log_success_msg "Removing stale PID file $PIDFILE." + rm -f $PIDFILE + fi + fi + + create_machineid + + echo "Starting dbus" +end script + +post-start script + # Block until the daemon is ready for use + while [ ! -e /var/run/dbus/system_bus_socket ]; do + sleep 1 + done +end script + +exec /usr/bin/dbus-daemon --system --nofork +respawn + Modified: projects/haf/trunk/dbus/debian/rules =================================================================== --- projects/haf/trunk/dbus/debian/rules 2009-02-27 16:18:38 UTC (rev 17544) +++ projects/haf/trunk/dbus/debian/rules 2009-02-27 21:47:05 UTC (rev 17545) @@ -36,11 +36,17 @@ endif endif +# XXX (maemo) divergence +binary-post-install/dbus:: + mkdir -p debian/dbus/etc/event.d + cp debian/dbus.event debian/dbus/etc/event.d/dbus + cp debian/dbus-actdead.event debian/dbus/etc/event.d/dbus-actdead + binary-post-install/dbus-x11:: - # XXX divergence + # XXX (maemo) divergence #mkdir -p debian/dbus/etc/dbus-1/event.d - #mkdir -p debian/dbus-x11/etc/X11/Xsession.d - #cp debian/dbus-Xsession debian/dbus-x11/etc/X11/Xsession.d/75dbus_dbus-launch + mkdir -p debian/dbus-x11/etc/X11/Xsession.d + cp debian/dbus-Xsession debian/dbus-x11/etc/X11/Xsession.d/01dbus # XXX (maemo): this is needed because we patch doc/Makefile.am makebuilddir/dbus-1-doc::
- Previous message: [maemo-commits] r17544 - projects/haf/tags/libxml2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]