summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-01-02 23:39:35 +0000
committerRichard Purdie <richard@openedhand.com>2008-01-02 23:39:35 +0000
commit51d4359d1a38ea99851d6473b6ca476810dad331 (patch)
treed72223eb3a0c0f68cc23d2ab0c83e49e988bc893
parentfe60c6e3e5ad9bf301856e8b9f32b7d69397760d (diff)
downloadpoky-51d4359d1a38ea99851d6473b6ca476810dad331.tar.gz
Add dbus 1.1.1 (leave 1.0.2 as default)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3400 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/dbus/dbus-1.1.1/cross.patch10
-rw-r--r--meta/packages/dbus/dbus-1.1.1/dbus-1.init110
-rw-r--r--meta/packages/dbus/dbus-1.1.1/fix-install-daemon.patch13
-rw-r--r--meta/packages/dbus/dbus-1.1.1/tmpdir.patch30
-rw-r--r--meta/packages/dbus/dbus-native_1.1.1.bb31
-rw-r--r--meta/packages/dbus/dbus_1.0.2.bb2
-rw-r--r--meta/packages/dbus/dbus_1.1.1.bb63
7 files changed, 257 insertions, 2 deletions
diff --git a/meta/packages/dbus/dbus-1.1.1/cross.patch b/meta/packages/dbus/dbus-1.1.1/cross.patch
new file mode 100644
index 0000000000..268a3ae3de
--- /dev/null
+++ b/meta/packages/dbus/dbus-1.1.1/cross.patch
@@ -0,0 +1,10 @@
1--- /tmp/configure.in 2006-11-09 21:47:10.000000000 +0100
2+++ dbus-0.95/configure.in 2006-11-09 21:48:13.108554000 +0100
3@@ -719,6 +719,7 @@
4 exit (0);
5 ]])],
6 [ac_cv_have_abstract_sockets=yes],
7+ [ac_cv_have_abstract_sockets=no],
8 [ac_cv_have_abstract_sockets=no]
9 )])
10 AC_LANG_POP(C)
diff --git a/meta/packages/dbus/dbus-1.1.1/dbus-1.init b/meta/packages/dbus/dbus-1.1.1/dbus-1.init
new file mode 100644
index 0000000000..0725083c69
--- /dev/null
+++ b/meta/packages/dbus/dbus-1.1.1/dbus-1.init
@@ -0,0 +1,110 @@
1#! /bin/sh
2# -*- coding: utf-8 -*-
3# Debian init.d script for D-BUS
4# Copyright © 2003 Colin Walters <walters@debian.org>
5
6set -e
7
8DAEMON=/usr/bin/dbus-daemon
9NAME=dbus
10DAEMONUSER=messagebus
11PIDDIR=/var/run/dbus
12PIDFILE=$PIDDIR/pid
13UUIDDIR=/var/lib/dbus
14DESC="system message bus"
15EVENTDIR=/etc/dbus-1/event.d
16
17test -x $DAEMON || exit 0
18
19# Source defaults file; edit that file to configure this script.
20ENABLED=1
21PARAMS=""
22if [ -e /etc/default/dbus ]; then
23 . /etc/default/dbus
24fi
25
26test "$ENABLED" != "0" || exit 0
27
28start_it_up()
29{
30 if [ ! -d $PIDDIR ]; then
31 mkdir -p $PIDDIR
32 chown $DAEMONUSER $PIDDIR
33 chgrp $DAEMONUSER $PIDDIR
34 fi
35 if [ -e $PIDFILE ]; then
36 PIDDIR=/proc/$(cat $PIDFILE)
37 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
38 echo "$DESC already started; not starting."
39 else
40 echo "Removing stale PID file $PIDFILE."
41 rm -f $PIDFILE
42 fi
43 fi
44
45 if [ ! -d $UUIDDIR ]; then
46 mkdir -p $UUIDDIR
47 chown $DAEMONUSER $UUIDDIR
48 chgrp $DAEMONUSER $UUIDDIR
49 fi
50
51 dbus-uuidgen --ensure
52
53 echo -n "Starting $DESC: "
54 start-stop-daemon --start --quiet --pidfile $PIDFILE \
55 --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
56 echo "$NAME."
57 if [ -d $EVENTDIR ]; then
58 run-parts --arg=start $EVENTDIR
59 fi
60}
61
62shut_it_down()
63{
64 if [ -d $EVENTDIR ]; then
65 # TODO: --reverse when busybox supports it
66 run-parts --arg=stop $EVENTDIR
67 fi
68 echo -n "Stopping $DESC: "
69 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
70 --user $DAEMONUSER
71 # We no longer include these arguments so that start-stop-daemon
72 # can do its job even given that we may have been upgraded.
73 # We rely on the pidfile being sanely managed
74 # --exec $DAEMON -- --system $PARAMS
75 echo "$NAME."
76 rm -f $PIDFILE
77}
78
79reload_it()
80{
81 echo -n "Reloading $DESC config: "
82 dbus-send --print-reply --system --type=method_call \
83 --dest=org.freedesktop.DBus \
84 / org.freedesktop.DBus.ReloadConfig > /dev/null
85 # hopefully this is enough time for dbus to reload it's config file.
86 echo "done."
87}
88
89case "$1" in
90 start)
91 start_it_up
92 ;;
93 stop)
94 shut_it_down
95 ;;
96 reload|force-reload)
97 reload_it
98 ;;
99 restart)
100 shut_it_down
101 sleep 1
102 start_it_up
103 ;;
104 *)
105 echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
106 exit 1
107 ;;
108esac
109
110exit 0
diff --git a/meta/packages/dbus/dbus-1.1.1/fix-install-daemon.patch b/meta/packages/dbus/dbus-1.1.1/fix-install-daemon.patch
new file mode 100644
index 0000000000..c31786357d
--- /dev/null
+++ b/meta/packages/dbus/dbus-1.1.1/fix-install-daemon.patch
@@ -0,0 +1,13 @@
1Index: dbus-0.94/bus/Makefile.am
2===================================================================
3--- dbus-0.94.orig/bus/Makefile.am 2006-10-01 17:36:18.000000000 +0200
4+++ dbus-0.94/bus/Makefile.am 2006-10-14 21:40:05.000000000 +0200
5@@ -110,7 +110,7 @@
6 $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
7 chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
8 fi
9- $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
10+ $(INSTALL_PROGRAM) .libs/dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
11 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
12 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
13 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
diff --git a/meta/packages/dbus/dbus-1.1.1/tmpdir.patch b/meta/packages/dbus/dbus-1.1.1/tmpdir.patch
new file mode 100644
index 0000000000..838b903f0a
--- /dev/null
+++ b/meta/packages/dbus/dbus-1.1.1/tmpdir.patch
@@ -0,0 +1,30 @@
1--- dbus-0.22/configure.in.orig 2004-08-13 00:57:16.000000000 +0200
2+++ dbus-0.22/configure.in 2004-12-30 21:15:57.000000000 +0100
3@@ -1047,15 +1048,18 @@
4 AC_SUBST(ABSOLUTE_TOP_BUILDDIR)
5
6 #### Find socket directories
7-if ! test -z "$TMPDIR" ; then
8- DEFAULT_SOCKET_DIR=$TMPDIR
9-elif ! test -z "$TEMP" ; then
10- DEFAULT_SOCKET_DIR=$TEMP
11-elif ! test -z "$TMP" ; then
12- DEFAULT_SOCKET_DIR=$TMP
13-else
14- DEFAULT_SOCKET_DIR=/tmp
15-fi
16+#if ! test -z "$TMPDIR" ; then
17+# DEFAULT_SOCKET_DIR=$TMPDIR
18+#elif ! test -z "$TEMP" ; then
19+# DEFAULT_SOCKET_DIR=$TEMP
20+#elif ! test -z "$TMP" ; then
21+# DEFAULT_SOCKET_DIR=$TMP
22+#else
23+# DEFAULT_SOCKET_DIR=/tmp
24+#fi
25+
26+# checks disabled to avoid expanding this at build time
27+DEFAULT_SOCKET_DIR=/tmp
28
29 if ! test -z "$with_test_socket_dir" ; then
30 TEST_SOCKET_DIR="$with_test_socket_dir"
diff --git a/meta/packages/dbus/dbus-native_1.1.1.bb b/meta/packages/dbus/dbus-native_1.1.1.bb
new file mode 100644
index 0000000000..72e2190f78
--- /dev/null
+++ b/meta/packages/dbus/dbus-native_1.1.1.bb
@@ -0,0 +1,31 @@
1DESCRIPTION = "message bus system for applications to talk to one another"
2HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
3LICENSE = "GPL"
4SECTION = "base"
5
6PR = "r0"
7
8DEPENDS = "glib-2.0-native libxml2-native expat-native"
9
10DEFAULT_PREFERENCE = "-1"
11
12FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/dbus-1.0.2"
13SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
14 file://cross.patch;patch=1 \
15 "
16
17inherit autotools pkgconfig gettext native
18
19S = "${WORKDIR}/dbus-${PV}"
20
21EXTRA_OECONF = " --disable-tests --disable-checks --disable-xml-docs \
22 --disable-doxygen-docs --with-xml=expat --without-x"
23
24do_stage () {
25 oe_runmake install
26 autotools_stage_all
27
28 # for dbus-glib-native introspection generation
29 install -d ${STAGING_DATADIR}/dbus
30 install -m 0644 bus/session.conf ${STAGING_DATADIR}/dbus/session.conf
31}
diff --git a/meta/packages/dbus/dbus_1.0.2.bb b/meta/packages/dbus/dbus_1.0.2.bb
index 7bf0a8634d..81c8f0cf37 100644
--- a/meta/packages/dbus/dbus_1.0.2.bb
+++ b/meta/packages/dbus/dbus_1.0.2.bb
@@ -1,5 +1,3 @@
1DEFAULT_PREFERENCE = "-1"
2
3SECTION = "base" 1SECTION = "base"
4HOMEPAGE = "http://www.freedesktop.org/Software/dbus" 2HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
5DESCRIPTION = "message bus system for applications to talk to one another" 3DESCRIPTION = "message bus system for applications to talk to one another"
diff --git a/meta/packages/dbus/dbus_1.1.1.bb b/meta/packages/dbus/dbus_1.1.1.bb
new file mode 100644
index 0000000000..7bf0a8634d
--- /dev/null
+++ b/meta/packages/dbus/dbus_1.1.1.bb
@@ -0,0 +1,63 @@
1DEFAULT_PREFERENCE = "-1"
2
3SECTION = "base"
4HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
5DESCRIPTION = "message bus system for applications to talk to one another"
6LICENSE = "GPL"
7DEPENDS = "expat glib-2.0 virtual/libintl"
8
9PR = "r3"
10
11SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
12 file://tmpdir.patch;patch=1 \
13 file://dbus-1.init \
14 file://cross.patch;patch=1 \
15 file://fix-install-daemon.patch;patch=1"
16
17inherit autotools pkgconfig update-rc.d gettext
18
19INITSCRIPT_NAME = "dbus-1"
20INITSCRIPT_PARAMS = "defaults"
21
22CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
23
24FILES_${PN} = "${bindir}/dbus-daemon ${bindir}/dbus-launch ${bindir}/dbus-cleanup-sockets ${bindir}/dbus-send ${bindir}/dbus-monitor ${bindir}/dbus-uuidgen ${sysconfdir} ${datadir}/dbus-1/services ${libdir}/lib*.so.*"
25FILES_${PN}-dev += "${libdir}/dbus-1.0/include"
26
27pkg_postinst_dbus() {
28#!/bin/sh
29
30# can't do adduser stuff offline
31if [ "x$D" != "x" ]; then
32 exit 1
33fi
34
35MESSAGEUSER=messagebus
36MESSAGEHOME=/var/run/dbus
37
38mkdir -p $MESSAGEHOME || true
39chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
40chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
41}
42
43EXTRA_OECONF = " --disable-tests --disable-checks --disable-xml-docs \
44 --disable-doxygen-docs --with-xml=expat --without-x"
45
46do_stage () {
47 oe_libinstall -so -C dbus libdbus-1 ${STAGING_LIBDIR}
48
49 autotools_stage_includes
50
51 mkdir -p ${STAGING_LIBDIR}/dbus-1.0/include/dbus/
52 install -m 0644 dbus/dbus-arch-deps.h ${STAGING_LIBDIR}/dbus-1.0/include/dbus/
53}
54
55do_install_append () {
56 install -d ${D}${sysconfdir}/init.d
57 install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1
58}
59
60python populate_packages_prepend () {
61 if (bb.data.getVar('DEBIAN_NAMES', d, 1)):
62 bb.data.setVar('PKG_dbus', 'dbus-1', d)
63}