summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/dbus')
-rw-r--r--meta/recipes-core/dbus/dbus-1.2.24/dbus-1.init121
-rw-r--r--meta/recipes-core/dbus/dbus-1.2.24/fix-install-daemon.patch56
-rw-r--r--meta/recipes-core/dbus/dbus-1.2.24/tmpdir.patch34
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.86/fix_asneeded.patch17
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.86/no-examples.patch12
-rw-r--r--meta/recipes-core/dbus/dbus-glib.inc23
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.86.bb3
-rw-r--r--meta/recipes-core/dbus/dbus.inc91
-rw-r--r--meta/recipes-core/dbus/dbus_1.2.24.bb3
9 files changed, 360 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus-1.2.24/dbus-1.init b/meta/recipes-core/dbus/dbus-1.2.24/dbus-1.init
new file mode 100644
index 0000000000..4abc4cbf73
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.2.24/dbus-1.init
@@ -0,0 +1,121 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: dbus
4# Required-Start: $remote_fs $syslog
5# Required-Stop: $remote_fs $syslog
6# Default-Start: 2 3 4 5
7# Default-Stop: 1
8# Short-Description: D-Bus systemwide message bus
9# Description: D-Bus is a simple interprocess messaging system, used
10# for sending messages between applications.
11### END INIT INFO
12#
13# -*- coding: utf-8 -*-
14# Debian init.d script for D-BUS
15# Copyright © 2003 Colin Walters <walters@debian.org>
16
17set -e
18
19DAEMON=/usr/bin/dbus-daemon
20NAME=dbus
21DAEMONUSER=messagebus
22PIDDIR=/var/run/dbus
23PIDFILE=$PIDDIR/pid
24UUIDDIR=/var/lib/dbus
25DESC="system message bus"
26EVENTDIR=/etc/dbus-1/event.d
27
28test -x $DAEMON || exit 0
29
30# Source defaults file; edit that file to configure this script.
31ENABLED=1
32PARAMS=""
33if [ -e /etc/default/dbus ]; then
34 . /etc/default/dbus
35fi
36
37test "$ENABLED" != "0" || exit 0
38
39start_it_up()
40{
41 if [ ! -d $PIDDIR ]; then
42 mkdir -p $PIDDIR
43 chown $DAEMONUSER $PIDDIR
44 chgrp $DAEMONUSER $PIDDIR
45 fi
46 if [ -e $PIDFILE ]; then
47 PIDDIR=/proc/$(cat $PIDFILE)
48 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
49 echo "$DESC already started; not starting."
50 else
51 echo "Removing stale PID file $PIDFILE."
52 rm -f $PIDFILE
53 fi
54 fi
55
56 if [ ! -d $UUIDDIR ]; then
57 mkdir -p $UUIDDIR
58 chown $DAEMONUSER $UUIDDIR
59 chgrp $DAEMONUSER $UUIDDIR
60 fi
61
62 dbus-uuidgen --ensure
63
64 echo -n "Starting $DESC: "
65 start-stop-daemon --start --quiet --pidfile $PIDFILE \
66 --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
67 echo "$NAME."
68 if [ -d $EVENTDIR ]; then
69 run-parts --arg=start $EVENTDIR
70 fi
71}
72
73shut_it_down()
74{
75 if [ -d $EVENTDIR ]; then
76 # TODO: --reverse when busybox supports it
77 run-parts --arg=stop $EVENTDIR
78 fi
79 echo -n "Stopping $DESC: "
80 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
81 --user $DAEMONUSER
82 # We no longer include these arguments so that start-stop-daemon
83 # can do its job even given that we may have been upgraded.
84 # We rely on the pidfile being sanely managed
85 # --exec $DAEMON -- --system $PARAMS
86 echo "$NAME."
87 rm -f $PIDFILE
88}
89
90reload_it()
91{
92 echo -n "Reloading $DESC config: "
93 dbus-send --print-reply --system --type=method_call \
94 --dest=org.freedesktop.DBus \
95 / org.freedesktop.DBus.ReloadConfig > /dev/null
96 # hopefully this is enough time for dbus to reload it's config file.
97 echo "done."
98}
99
100case "$1" in
101 start)
102 start_it_up
103 ;;
104 stop)
105 shut_it_down
106 ;;
107 reload|force-reload)
108 reload_it
109 ;;
110 restart)
111 shut_it_down
112 sleep 1
113 start_it_up
114 ;;
115 *)
116 echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
117 exit 1
118 ;;
119esac
120
121exit 0
diff --git a/meta/recipes-core/dbus/dbus-1.2.24/fix-install-daemon.patch b/meta/recipes-core/dbus/dbus-1.2.24/fix-install-daemon.patch
new file mode 100644
index 0000000000..edb63a5faf
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.2.24/fix-install-daemon.patch
@@ -0,0 +1,56 @@
1# Update fix-daemon-install patch to use automake magic to avoid the wrapper scripts
2#
3# original by RP, updated to handle dbus-daemon-launch-helper by Kevin Tian <kevin.tian@intel.com>, 2010-07-10
4Index: dbus-1.2.14/bus/Makefile.am
5===================================================================
6--- dbus-1.2.14.orig/bus/Makefile.am 2009-04-17 20:45:29.000000000 +0100
7+++ dbus-1.2.14/bus/Makefile.am 2009-11-13 09:47:24.000000000 +0000
8@@ -149,7 +149,7 @@ endif
9
10 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
11 ## even when not doing "make check"
12-noinst_PROGRAMS=$(TESTS) dbus-daemon dbus-daemon-launch-helper-test dbus-daemon-launch-helper
13+noinst_PROGRAMS=$(TESTS) dbus-daemon-launch-helper-test
14
15 bus_test_system_SOURCES= \
16 $(XML_SOURCES) \
17@@ -171,34 +171,22 @@ bus_test_SOURCES= \
18 bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
19 bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
20
21+dbusdaemondir = $(DBUS_DAEMONDIR)
22+dbusdaemon_PROGRAMS = dbus-daemon
23+
24+libexec_PROGRAMS = dbus-daemon-launch-helper
25+
26 ## mop up the gcov files
27 clean-local:
28 /bin/rm *.bb *.bbg *.da *.gcov || true
29
30-uninstall-hook:
31- rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon
32- rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper
33-
34 install-data-hook:
35- if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \
36- $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
37- chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
38- fi
39- $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
40 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
41 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
42 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
43 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
44 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
45 $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1
46- $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir)
47- if test `id -u` -eq 0; then \
48- chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
49- chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
50- else \
51- echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
52- echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
53- fi
54
55 #### Init scripts fun
56 SCRIPT_IN_FILES=messagebus.in \
diff --git a/meta/recipes-core/dbus/dbus-1.2.24/tmpdir.patch b/meta/recipes-core/dbus/dbus-1.2.24/tmpdir.patch
new file mode 100644
index 0000000000..f5c22af129
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.2.24/tmpdir.patch
@@ -0,0 +1,34 @@
1# avoid to check tmp dir at build time. instead uses hard coded /tmp here
2#
3# comment added by Kevin Tian <kevin.tian@intel.com>
4
5--- dbus-0.22/configure.in.orig 2004-08-13 00:57:16.000000000 +0200
6+++ dbus-0.22/configure.in 2004-12-30 21:15:57.000000000 +0100
7@@ -1047,15 +1048,18 @@
8 AC_SUBST(ABSOLUTE_TOP_BUILDDIR)
9
10 #### Find socket directories
11-if ! test -z "$TMPDIR" ; then
12- DEFAULT_SOCKET_DIR=$TMPDIR
13-elif ! test -z "$TEMP" ; then
14- DEFAULT_SOCKET_DIR=$TEMP
15-elif ! test -z "$TMP" ; then
16- DEFAULT_SOCKET_DIR=$TMP
17-else
18- DEFAULT_SOCKET_DIR=/tmp
19-fi
20+#if ! test -z "$TMPDIR" ; then
21+# DEFAULT_SOCKET_DIR=$TMPDIR
22+#elif ! test -z "$TEMP" ; then
23+# DEFAULT_SOCKET_DIR=$TEMP
24+#elif ! test -z "$TMP" ; then
25+# DEFAULT_SOCKET_DIR=$TMP
26+#else
27+# DEFAULT_SOCKET_DIR=/tmp
28+#fi
29+
30+# checks disabled to avoid expanding this at build time
31+DEFAULT_SOCKET_DIR=/tmp
32
33 if ! test -z "$with_test_socket_dir" ; then
34 TEST_SOCKET_DIR="$with_test_socket_dir"
diff --git a/meta/recipes-core/dbus/dbus-glib-0.86/fix_asneeded.patch b/meta/recipes-core/dbus/dbus-glib-0.86/fix_asneeded.patch
new file mode 100644
index 0000000000..3065557683
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.86/fix_asneeded.patch
@@ -0,0 +1,17 @@
1# not sure the reason for changing link order. Disable it for now, but keep for a while
2#
3# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-10
4
5Index: dbus-glib-0.82/dbus/Makefile.am
6===================================================================
7--- dbus-glib-0.82.orig/dbus/Makefile.am 2009-07-16 15:54:44.000000000 +0100
8+++ dbus-glib-0.82/dbus/Makefile.am 2009-12-11 09:27:20.000000000 +0000
9@@ -105,7 +105,7 @@
10
11 dbus_bash_completion_helper_SOURCES = \
12 dbus-bash-completion-helper.c
13-dbus_bash_completion_helper_LDADD=$(DBUS_LIBS) $(DBUS_GLIB_LIBS) $(builddir)/libdbus-gtool.la -lexpat $(builddir)/libdbus-glib-1.la
14+dbus_bash_completion_helper_LDADD=$(DBUS_LIBS) $(DBUS_GLIB_LIBS) $(builddir)/libdbus-gtool.la $(builddir)/libdbus-glib-1.la -lexpat
15
16
17 EXTRA_DIST=dbus-gmarshal.list make-dbus-glib-error-switch.sh make-dbus-glib-error-enum.sh dbus-bash-completion.sh.in
diff --git a/meta/recipes-core/dbus/dbus-glib-0.86/no-examples.patch b/meta/recipes-core/dbus/dbus-glib-0.86/no-examples.patch
new file mode 100644
index 0000000000..32609b9b9c
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.86/no-examples.patch
@@ -0,0 +1,12 @@
1# disable compiling examples
2#
3# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-10
4
5--- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200
6+++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200
7@@ -1,4 +1,4 @@
8-SUBDIRS = . examples
9+SUBDIRS = .
10
11 INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
12
diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc
new file mode 100644
index 0000000000..985c565e8b
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib.inc
@@ -0,0 +1,23 @@
1DESCRIPTION = "high level language (glib) binding for dbus"
2HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
3LICENSE = "AFL2.1 | GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \
5 file://dbus/dbus-glib.h;firstline=7;endline=21;md5=833ef01806b4c524fb3678a16300536f"
6SECTION = "base"
7DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
8DEPENDS_virtclass-native = "glib-2.0-native dbus-native"
9
10SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
11 file://no-examples.patch"
12
13inherit autotools pkgconfig gettext
14
15FILES_${PN} = "${libdir}/lib*.so.*"
16FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
17FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
18
19EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \
20 --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
21EXTRA_OECONF_virtclass-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml"
22
23BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/dbus/dbus-glib_0.86.bb b/meta/recipes-core/dbus/dbus-glib_0.86.bb
new file mode 100644
index 0000000000..000146ab7e
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib_0.86.bb
@@ -0,0 +1,3 @@
1require dbus-glib.inc
2
3PR = "r0"
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
new file mode 100644
index 0000000000..90a38e66a9
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -0,0 +1,91 @@
1DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed"
2HOMEPAGE = "http://dbus.freedesktop.org"
3SECTION = "base"
4LICENSE = "AFL2.1 | GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
6 file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0c7750dd8e620dcb1437312fa5"
7DEPENDS = "expat glib-2.0 virtual/libintl virtual/libx11 libsm"
8
9SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
10 file://tmpdir.patch; \
11 file://fix-install-daemon.patch; \
12 file://dbus-1.init"
13
14inherit autotools pkgconfig gettext update-rc.d
15
16INITSCRIPT_NAME = "dbus-1"
17INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
18
19CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
20
21DEBIANNAME_${PN} = "dbus-1"
22
23PACKAGES =+ "${PN}-lib"
24
25FILES_${PN} = "${bindir}/dbus-daemon* \
26 ${bindir}/dbus-uuidgen \
27 ${bindir}/dbus-launch \
28 ${bindir}/dbus-cleanup-sockets \
29 ${bindir}/dbus-send \
30 ${bindir}/dbus-monitor \
31 ${libexecdir}/dbus* \
32 ${sysconfdir} \
33 ${datadir}/dbus-1/services \
34 ${datadir}/dbus-1/system-services"
35FILES_${PN}-lib = "${libdir}/lib*.so.*"
36RRECOMMENDS_${PN}-lib = "${PN}"
37FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
38
39pkg_postinst_dbus() {
40 # can't do adduser stuff offline
41 if [ "x$D" != "x" ]; then
42 exit 1
43 fi
44
45 MESSAGEUSER=messagebus
46 MESSAGEHOME=/var/run/dbus
47
48 mkdir -p $MESSAGEHOME || true
49 chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
50 chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || \
51 adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password \
52 --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
53
54 grep -q netdev: /etc/group || addgroup netdev
55 chmod u+s /usr/libexec/dbus-daemon-launch-helper
56
57 # add volatile after new user/grp are created
58 echo "d messagebus messagebus 0755 /var/run/dbus none" > /etc/default/volatiles/99_dbus
59 /etc/init.d/populate-volatile.sh update
60}
61
62EXTRA_OECONF_X = "--with-x"
63EXTRA_OECONF_X_virtclass-native = "--without-x"
64
65EXTRA_OECONF = "--disable-tests \
66 --disable-checks \
67 --disable-xml-docs \
68 --disable-doxygen-docs \
69 --disable-libaudit \
70 --with-xml=expat \
71 ${EXTRA_OECONF_X}"
72
73do_install() {
74 autotools_do_install
75
76 install -d ${D}${sysconfdir}/init.d
77 install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1
78}
79
80do_install_virtclass-native() {
81 autotools_do_install
82
83 # for dbus-glib-native introspection generation
84 install -d ${STAGING_DATADIR_NATIVE}/dbus/
85 # N.B. is below install actually required?
86 install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf
87
88 # dbus-glib-native and dbus-glib need this xml file
89 ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
90}
91BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/dbus/dbus_1.2.24.bb b/meta/recipes-core/dbus/dbus_1.2.24.bb
new file mode 100644
index 0000000000..8e3e329fde
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus_1.2.24.bb
@@ -0,0 +1,3 @@
1include dbus.inc
2
3PR = "r1"