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.6.10/dbus-1.init123
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/os-test.patch35
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/ptest.patch154
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/python-config.patch25
-rwxr-xr-xmeta/recipes-core/dbus/dbus-1.6.10/run-ptest3
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch26
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch44
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch15
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch48
-rw-r--r--meta/recipes-core/dbus/dbus-glib.inc44
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.100.2.bb6
-rw-r--r--meta/recipes-core/dbus/dbus-ptest_1.6.10.bb51
-rw-r--r--meta/recipes-core/dbus/dbus.inc148
-rw-r--r--meta/recipes-core/dbus/dbus_1.6.10.bb6
15 files changed, 743 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
new file mode 100644
index 0000000000..04025e65f8
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
@@ -0,0 +1,123 @@
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
19# Source function library.
20. /etc/init.d/functions
21
22DAEMON=@bindir@/dbus-daemon
23NAME=dbus
24DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
25PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
26UUIDDIR=/var/lib/dbus
27DESC="system message bus"
28EVENTDIR=/etc/dbus-1/event.d
29
30test -x $DAEMON || exit 0
31
32# Source defaults file; edit that file to configure this script.
33ENABLED=1
34PARAMS=""
35if [ -e /etc/default/dbus ]; then
36 . /etc/default/dbus
37fi
38
39test "$ENABLED" != "0" || exit 0
40
41start_it_up()
42{
43 mkdir -p "`dirname $PIDFILE`"
44 if [ -e $PIDFILE ]; then
45 PIDDIR=/proc/$(cat $PIDFILE)
46 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
47 echo "$DESC already started; not starting."
48 else
49 echo "Removing stale PID file $PIDFILE."
50 rm -f $PIDFILE
51 fi
52 fi
53
54 if [ ! -d $UUIDDIR ]; then
55 mkdir -p $UUIDDIR
56 chown $DAEMONUSER $UUIDDIR
57 chgrp $DAEMONUSER $UUIDDIR
58 fi
59
60 dbus-uuidgen --ensure
61
62 echo -n "Starting $DESC: "
63 start-stop-daemon -o --start --quiet --pidfile $PIDFILE \
64 --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
65 echo "$NAME."
66 if [ -d $EVENTDIR ]; then
67 run-parts --arg=start $EVENTDIR
68 fi
69}
70
71shut_it_down()
72{
73 if [ -d $EVENTDIR ]; then
74 # TODO: --reverse when busybox supports it
75 run-parts --arg=stop $EVENTDIR
76 fi
77 echo -n "Stopping $DESC: "
78 start-stop-daemon -o --stop --quiet --pidfile $PIDFILE \
79 --user $DAEMONUSER
80 # We no longer include these arguments so that start-stop-daemon
81 # can do its job even given that we may have been upgraded.
82 # We rely on the pidfile being sanely managed
83 # --exec $DAEMON -- --system $PARAMS
84 echo "$NAME."
85 rm -f $PIDFILE
86}
87
88reload_it()
89{
90 echo -n "Reloading $DESC config: "
91 dbus-send --print-reply --system --type=method_call \
92 --dest=org.freedesktop.DBus \
93 / org.freedesktop.DBus.ReloadConfig > /dev/null
94 # hopefully this is enough time for dbus to reload it's config file.
95 echo "done."
96}
97
98case "$1" in
99 start)
100 start_it_up
101 ;;
102 stop)
103 shut_it_down
104 ;;
105 status)
106 status $DAEMON
107 exit $?
108 ;;
109 reload|force-reload)
110 reload_it
111 ;;
112 restart)
113 shut_it_down
114 sleep 1
115 start_it_up
116 ;;
117 *)
118 echo "Usage: /etc/init.d/$NAME {start|stop|status|restart|reload|force-reload}" >&2
119 exit 1
120 ;;
121esac
122
123exit 0
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch b/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch
new file mode 100644
index 0000000000..79554b1ee1
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch
@@ -0,0 +1,35 @@
1dbus: remove build host test in configure script
2
3The dbus build tests the build host to detect what initscript
4environment it expects. Remove the test and set it to "redhat"
5unconditionally as the oe-core initscript has a redhat-style pid file
6path.
7
8Signed-off-by: Andy Ross <andy.ross@windriver.com>
9Upstream-Status: innappropriate [embedded]
10
11diff -u a/configure.ac b/configure.ac
12--- a/configure.ac 2012-08-28 11:23:43.040609874 -0700
13+++ b/configure.ac 2012-08-28 11:54:25.602913945 -0700
14@@ -1348,19 +1348,8 @@
15 AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
16 AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
17
18-#### Check our operating system
19-operating_system=unknown
20-if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
21- operating_system=redhat
22-fi
23-
24-if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
25- operating_system=slackware
26-fi
27-
28-if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then
29- operating_system=cygwin
30-fi
31+#### Build host test removed from upstream code, openembedded initscript is redhat-like:
32+operating_system=redhat
33
34 #### Sort out init scripts
35
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch b/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch
new file mode 100644
index 0000000000..263d17eff7
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch
@@ -0,0 +1,154 @@
1Add install-ptest rules.
2Change TEST_ENVIRONMENT to allow running outside build dir.
3
4 Makefile.am | 7 +++++++
5 bus/Makefile.am | 6 ++++++
6 dbus/Makefile.am | 6 ++++++
7 doc/Makefile.am | 4 ++++
8 test/Makefile.am | 25 ++++++++++++++++++++-----
9 test/name-test/Makefile.am | 9 +++++++++
10 tools/Makefile.am | 12 ++++++++++++
11 7 files changed, 64 insertions(+), 5 deletions(-)
12
13Signed-off-by: Björn Stenberg <bjst@enea.com>
14Upstream-Status: Pending
15
16diff -ur a/Makefile.am b/Makefile.am
17--- a/Makefile.am 2012-12-06 14:34:01.157414449 +0100
18+++ b/Makefile.am 2012-12-06 15:21:14.447113035 +0100
19@@ -30,4 +30,11 @@
20
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22
23+if DBUS_BUILD_TESTS
24+install-ptest:
25+ @for subdir in $(SUBDIRS); do \
26+ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
27+ done
28+endif
29+
30 include tools/lcov.am
31diff -ur a/bus/Makefile.am b/bus/Makefile.am
32--- a/bus/Makefile.am 2012-12-06 14:34:01.169413931 +0100
33+++ b/bus/Makefile.am 2012-12-06 15:21:14.463112346 +0100
34@@ -290,3 +290,9 @@
35 #### Extra dist
36
37 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)
38+
39+if DBUS_BUILD_TESTS
40+install-ptest:
41+ @$(MKDIR_P) $(DESTDIR)
42+ @install $(dbus_daemon_exec_PROGRAMS) $(noinst_PROGRAMS) $(DESTDIR)
43+endif
44diff -ur a/dbus/Makefile.am b/dbus/Makefile.am
45--- a/dbus/Makefile.am 2012-12-06 14:34:01.161414276 +0100
46+++ b/dbus/Makefile.am 2012-12-06 15:21:14.451112862 +0100
47@@ -310,3 +310,9 @@
48 update-systemd:
49 curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
50 curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h
51+
52+if DBUS_BUILD_TESTS
53+install-ptest:
54+ @$(MKDIR_P) $(DESTDIR)
55+ @install $(noinst_PROGRAMS) $(DESTDIR)
56+endif
57diff -ur a/test/Makefile.am b/test/Makefile.am
58--- a/test/Makefile.am 2012-12-06 14:34:01.165414103 +0100
59+++ b/test/Makefile.am 2012-12-06 15:21:14.455112690 +0100
60@@ -119,12 +119,13 @@
61 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
62 DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
63
64+ptest_run_dir = ..
65+
66 TESTS_ENVIRONMENT = \
67- DBUS_BLOCK_ON_ABORT=1 \
68- DBUS_FATAL_WARNINGS=1 \
69- DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
70- DBUS_TEST_DATA=@abs_top_builddir@/test/data \
71- DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
72+ DBUS_FATAL_WARNINGS=0 \
73+ DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \
74+ DBUS_TEST_DATA=$(ptest_run_dir)/test/data \
75+ DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \
76 $(NULL)
77
78 test_corrupt_SOURCES = corrupt.c
79@@ -325,3 +325,25 @@
80 data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
81 $(AM_V_at)$(MKDIR_P) data/valid-config-files
82 $(AM_V_GEN)cp $< $@
83+
84+if DBUS_BUILD_TESTS
85+install-ptest: install-ptest-nonrecursive
86+ @for subdir in $(SUBDIRS); do \
87+ if [ $$subdir != "." ]; then \
88+ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
89+ fi; \
90+ done
91+
92+install-ptest-nonrecursive:
93+ @$(MKDIR_P) $(DESTDIR)/data/valid-config-files/session.d
94+ @for file in Makefile $(installable_tests) $(noinst_PROGRAMS) $(noinst_DATA) ; do \
95+ if [ -f .libs/$$file ]; then \
96+ install .libs/$$file $(DESTDIR); \
97+ else \
98+ install -D $${file%.in} $(DESTDIR)/$${file%.in}; \
99+ fi; \
100+ done;
101+ @for file in $(EXTRA_DIST); do \
102+ install -D ${srcdir}/$${file%.in} $(DESTDIR)/$${file%.in}; \
103+ done;
104+endif
105diff -ur a/test/name-test/Makefile.am b/test/name-test/Makefile.am
106--- a/test/name-test/Makefile.am 2012-12-06 14:34:01.169413931 +0100
107+++ b/test/name-test/Makefile.am 2012-12-06 15:21:14.459112518 +0100
108@@ -36,4 +36,16 @@
109 test_privserver_client_LDADD=../libdbus-testutils.la
110 test_autolaunch_LDADD=../libdbus-testutils.la
111
112+install-ptest:
113+ @$(MKDIR_P) $(DESTDIR)
114+ @for file in Makefile $(noinst_PROGRAMS); do \
115+ if [ -f .libs/$$file ]; then \
116+ install .libs/$$file $(DESTDIR); \
117+ else \
118+ install $$file $(DESTDIR); \
119+ fi \
120+ done;
121+ @for file in $(EXTRA_DIST); do \
122+ cp $(srcdir)/$$file $(DESTDIR); \
123+ done;
124 endif
125diff -ur a/tools/Makefile.am b/tools/Makefile.am
126--- a/tools/Makefile.am 2012-12-06 14:34:01.161414276 +0100
127+++ b/tools/Makefile.am 2012-12-06 15:21:14.455112690 +0100
128@@ -78,3 +78,15 @@
129
130 installcheck-local:
131 test -d $(DESTDIR)$(localstatedir)/lib/dbus
132+
133+if DBUS_BUILD_TESTS
134+install-ptest:
135+ @$(MKDIR_P) $(DESTDIR)
136+ @for file in $(bin_PROGRAMS); do \
137+ if [ -f .libs/$$file ]; then \
138+ install .libs/$$file $(DESTDIR); \
139+ else \
140+ install $$file $(DESTDIR); \
141+ fi; \
142+ done;
143+endif
144diff -ur a/doc/Makefile.am b/doc/Makefile.am
145--- a/doc/Makefile.am 2012-06-06 12:45:55.000000000 +0200
146+++ b/doc/Makefile.am 2012-12-06 16:04:58.990070587 +0100
147@@ -174,3 +174,7 @@
148
149 maintainer-clean-local:
150 rm -f $(XMLTO_OUTPUT)
151+
152+if DBUS_BUILD_TESTS
153+install-ptest:
154+endif
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch b/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch
new file mode 100644
index 0000000000..294400247e
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch
@@ -0,0 +1,25 @@
1When building the dbus-ptest package, we have to enable python. However
2checking if the host-system python has the necessary library isn't useful.
3
4Disable the python module check for cross compiling.
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
9
10--- dbus-1.6.8/configure.ac.orig 2013-07-11 14:15:58.834554799 -0500
11+++ dbus-1.6.8/configure.ac 2013-07-11 14:14:40.969554848 -0500
12@@ -257,13 +257,6 @@
13 # full test coverage is required, Python is a hard dependency
14 AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
15 AM_PATH_PYTHON([2.6])
16- AC_MSG_CHECKING([for Python modules for full test coverage])
17- if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
18- AC_MSG_RESULT([yes])
19- else
20- AC_MSG_RESULT([no])
21- AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
22- fi
23 else
24 # --enable-tests not given: do not abort if Python is missing
25 AM_PATH_PYTHON([2.6], [], [:])
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/run-ptest b/meta/recipes-core/dbus/dbus-1.6.10/run-ptest
new file mode 100755
index 0000000000..e08ecb1a63
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2cd test
3make -k runtest-TESTS
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch b/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch
new file mode 100644
index 0000000000..5c08c9354a
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch
@@ -0,0 +1,26 @@
1
2
3Signed-off-by: Björn Stenberg <bjst@enea.com>
4Upstream-Status: Pending
5
6--- a/test/Makefile.am 2012-06-15 15:25:43.000000000 +0200
7+++ b/test/Makefile.am 2012-11-16 09:24:44.263140840 +0100
8@@ -119,12 +119,13 @@
9 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
10 DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
11
12+ptest_run_dir = ..
13+
14 TESTS_ENVIRONMENT = \
15- DBUS_BLOCK_ON_ABORT=1 \
16- DBUS_FATAL_WARNINGS=1 \
17- DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
18- DBUS_TEST_DATA=@abs_top_builddir@/test/data \
19- DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
20+ DBUS_FATAL_WARNINGS=0 \
21+ DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \
22+ DBUS_TEST_DATA=$(ptest_run_dir)/test/data \
23+ DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \
24 $(NULL)
25
26 test_corrupt_SOURCES = corrupt.c
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch b/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch
new file mode 100644
index 0000000000..bf086e1788
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch
@@ -0,0 +1,44 @@
1From 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 23 Jun 2011 13:52:09 +0200
4Subject: [PATCH] buildsys: hardcode socketdir to /tmp
5
6the TMPDIR env var isn't always pointing to the right target path
7
8Upstream-Status: Inappropriate [embedded]
9
10Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
11
12Original comment:
13
14 avoid to check tmp dir at build time. instead uses hard coded /tmp here
15 comment added by Kevin Tian <kevin.tian@intel.com>
16---
17 configure.ac | 11 +----------
18 1 files changed, 1 insertions(+), 10 deletions(-)
19
20diff --git a/configure.ac b/configure.ac
21index 408054b..6d26180 100644
22--- a/configure.ac
23+++ b/configure.ac
24@@ -1483,16 +1483,7 @@ AC_SUBST(TEST_LAUNCH_HELPER_BINARY)
25 AC_DEFINE_UNQUOTED(DBUS_TEST_LAUNCH_HELPER_BINARY, "$TEST_LAUNCH_HELPER_BINARY",
26 [Full path to the launch helper test program in the builddir])
27
28-#### Find socket directories
29-if ! test -z "$TMPDIR" ; then
30- DEFAULT_SOCKET_DIR=$TMPDIR
31-elif ! test -z "$TEMP" ; then
32- DEFAULT_SOCKET_DIR=$TEMP
33-elif ! test -z "$TMP" ; then
34- DEFAULT_SOCKET_DIR=$TMP
35-else
36- DEFAULT_SOCKET_DIR=/tmp
37-fi
38+DEFAULT_SOCKET_DIR=/tmp
39
40 DEFAULT_SOCKET_DIR=`echo $DEFAULT_SOCKET_DIR | sed 's/+/%2B/g'`
41
42--
431.6.6.1
44
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch
new file mode 100644
index 0000000000..fbb4967828
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch
@@ -0,0 +1,15 @@
1Disable compiling examples
2
3Upstream-Status: Inappropriate [disable feature]
4
5Signed-off-by: Kevin Tian <kevin.tian@intel.com>
6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7
8--- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200
9+++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200
10@@ -1,4 +1,4 @@
11-SUBDIRS = . examples
12+SUBDIRS = .
13
14 INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
15
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
new file mode 100644
index 0000000000..40e3b12b5d
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac
5--- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300
6+++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200
7@@ -8,7 +8,7 @@
8
9 AM_INIT_AUTOMAKE([1.9])
10
11-AM_CONFIG_HEADER(config.h)
12+AC_CONFIG_HEADERS(config.h)
13
14 # Honor aclocal flags
15 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch
new file mode 100644
index 0000000000..2e8e178bb7
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch
@@ -0,0 +1,48 @@
1Change Makefile.am to install regression tests for test package purpose.
2
3Upstream-Status: Inappropriate [test not install is for purpose from upstream]
4
5Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
6
7diff --git a/test/Makefile.am b/test/Makefile.am
8index 7ba11a8..249f0e7 100644
9--- a/test/Makefile.am
10+++ b/test/Makefile.am
11@@ -13,7 +13,8 @@ else
12 TEST_BINARIES=
13 endif
14
15-noinst_PROGRAMS= $(TEST_BINARIES)
16+testdir = $(datadir)/@PACKAGE@/tests
17+test_PROGRAMS= $(TEST_BINARIES)
18
19 test_service_SOURCES= \
20 test-service.c
21diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
22index 3cb2c39..e6de67d 100644
23--- a/test/interfaces/Makefile.am
24+++ b/test/interfaces/Makefile.am
25@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS
26
27 ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
28 ## build even when not doing "make check"
29-noinst_PROGRAMS = test-service test-client
30+testdir = $(datadir)/@PACKAGE@/tests/interfaces
31+test_PROGRAMS = test-service test-client
32
33 test_service_SOURCES = \
34 test-interfaces.c \
35diff --git a/test/core/Makefile.am b/test/core/Makefile.am
36index ef6cb26..9786c3a 100644
37--- a/test/core/Makefile.am
38+++ b/test/core/Makefile.am
39@@ -46,7 +46,8 @@ endif
40
41 ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
42 ## build even when not doing "make check"
43-noinst_PROGRAMS = \
44+testdir = $(datadir)/@PACKAGE@/tests/core
45+test_PROGRAMS = \
46 test-dbus-glib \
47 test-service-glib \
48 $(THREAD_APPS) \
diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc
new file mode 100644
index 0000000000..6c60d9e408
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib.inc
@@ -0,0 +1,44 @@
1SUMMARY = "High level language (GLib) binding for D-Bus"
2DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \
3the D-Bus library with the GLib thread abstraction and main loop."
4HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
5LICENSE = "AFL-2 | GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \
7 file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8SECTION = "base"
9
10DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
11DEPENDS_class-native = "glib-2.0-native dbus-native"
12
13SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
14 file://no-examples.patch \
15 file://test-install-makefile.patch \
16 file://obsolete_automake_macros.patch \
17"
18
19inherit autotools pkgconfig gettext
20
21#default disable regression tests, some unit test code in non testing code
22#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
23PACKAGECONFIG ??= ""
24PACKAGECONFIG[tests] = "--enable-tests,,,"
25
26EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \
27 --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
28EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml"
29
30PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests"
31
32FILES_${PN} = "${libdir}/lib*${SOLIBS}"
33FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \
34 ${libexecdir}/dbus-bash-completion-helper"
35FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
36FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
37
38RDEPENDS_${PN}-tests += "dbus-x11"
39FILES_${PN}-tests = "${datadir}/${BPN}/tests"
40FILES_${PN}-tests-dbg = "${datadir}/${BPN}/tests/.debug/* \
41 ${datadir}/${BPN}/tests/core/.debug/* \
42 ${datadir}/${BPN}/tests/interfaces/.debug/*"
43
44BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
new file mode 100644
index 0000000000..e08e3564d1
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
@@ -0,0 +1,6 @@
1require dbus-glib.inc
2
3PR = "r0"
4
5SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e"
6SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5"
diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
new file mode 100644
index 0000000000..84ed287cb2
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb
@@ -0,0 +1,51 @@
1DESCRIPTION = "D-Bus test package, only used for D-bus functionality test."
2HOMEPAGE = "http://dbus.freedesktop.org"
3SECTION = "base"
4LICENSE = "AFL-2 | GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
6 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
7
8DEPENDS = "python-pygobject dbus dbus-glib"
9
10RDEPENDS_${PN} += "make"
11RDEPENDS_${PN}-dev = ""
12
13SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
14 file://tmpdir.patch \
15 file://ptest.patch \
16 file://dbus-1.init \
17 file://run-ptest \
18 file://python-config.patch \
19 "
20
21SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
22SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86"
23
24S="${WORKDIR}/dbus-${PV}"
25FILESPATH = "${FILE_DIRNAME}/dbus-${PV}"
26
27inherit autotools pkgconfig gettext ptest
28
29EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
30EXTRA_OECONF_X_virtclass-native = "--without-x"
31
32EXTRA_OECONF = "--enable-tests \
33 --enable-modular-tests \
34 --enable-installed-tests \
35 --enable-checks \
36 --enable-asserts \
37 --enable-verbose-mode \
38 --disable-xml-docs \
39 --disable-doxygen-docs \
40 --disable-libaudit \
41 --with-xml=expat \
42 --with-systemdsystemunitdir=${systemd_unitdir}/system/ \
43 --with-dbus-test-dir=${PTEST_PATH} \
44 ${EXTRA_OECONF_X}"
45
46do_install() {
47}
48
49do_install_ptest() {
50 find ${D}${PTEST_PATH} -name Makefile | xargs sed -i 's/^Makefile:/_Makefile:/'
51}
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
new file mode 100644
index 0000000000..5864643996
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -0,0 +1,148 @@
1SUMMARY = "D-Bus message bus"
2DESCRIPTION = "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."
3HOMEPAGE = "http://dbus.freedesktop.org"
4SECTION = "base"
5LICENSE = "AFL-2 | GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
7 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8X11DEPENDS = "virtual/libx11 libsm"
9DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
10DEPENDS_class-native = "expat-native virtual/libintl-native"
11DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl"
12RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest-ptest', '', d)}"
13RDEPENDS_class-native = ""
14
15INC_PR = "r6"
16
17SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
18 file://tmpdir.patch; \
19 file://dbus-1.init \
20 file://os-test.patch \
21"
22
23inherit useradd autotools pkgconfig gettext update-rc.d
24
25INITSCRIPT_NAME = "dbus-1"
26INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
27
28python __anonymous() {
29 features = d.getVar("DISTRO_FEATURES", True).split()
30 if "sysvinit" not in features:
31 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
32}
33
34USERADD_PACKAGES = "${PN}"
35GROUPADD_PARAM_${PN} = "-r netdev"
36USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
37 --no-create-home --shell /bin/false \
38 --user-group messagebus"
39
40CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
41
42DEBIANNAME_${PN} = "dbus-1"
43
44PACKAGES =+ "${PN}-lib"
45
46OLDPKGNAME = "dbus-x11"
47OLDPKGNAME_class-nativesdk = ""
48
49# for compatibility
50RPROVIDES_${PN} = "${OLDPKGNAME}"
51RREPLACES_${PN} += "${OLDPKGNAME}"
52
53FILES_${PN} = "${bindir}/dbus-daemon* \
54 ${bindir}/dbus-uuidgen \
55 ${bindir}/dbus-cleanup-sockets \
56 ${bindir}/dbus-send \
57 ${bindir}/dbus-monitor \
58 ${bindir}/dbus-launch \
59 ${libexecdir}/dbus* \
60 ${sysconfdir} \
61 ${localstatedir} \
62 ${datadir}/dbus-1/services \
63 ${datadir}/dbus-1/system-services \
64 ${systemd_unitdir}/system/"
65FILES_${PN}-lib = "${libdir}/lib*.so.*"
66RRECOMMENDS_${PN}-lib = "${PN}"
67FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
68
69pkg_postinst_dbus() {
70 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
71 /etc/init.d/populate-volatile.sh update
72 fi
73}
74
75EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
76EXTRA_OECONF_X_class-native = "--without-x --disable-x11-autolaunch"
77# TODO: would like to --enable-systemd but that's a circular build-dependency
78# between systemd<->dbus
79EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
80
81EXTRA_OECONF = "--disable-tests \
82 --disable-checks \
83 --disable-xml-docs \
84 --disable-doxygen-docs \
85 --disable-libaudit \
86 --with-xml=expat \
87 --disable-systemd \
88 ${EXTRA_OECONF_SYSTEMD} \
89 ${EXTRA_OECONF_X}"
90
91do_install() {
92 autotools_do_install
93
94 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
95 install -d ${D}${sysconfdir}/init.d
96 sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
97 install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
98 fi
99
100 install -d ${D}${sysconfdir}/default/volatiles
101 echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
102 > ${D}${sysconfdir}/default/volatiles/99_dbus
103
104
105 mkdir -p ${D}${localstatedir}/lib/dbus
106
107 chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
108
109 chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
110 chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
111
112 # Remove Red Hat initscript
113 rm -rf ${D}${sysconfdir}/rc.d
114
115 # Remove empty testexec directory as we don't build tests
116 rm -rf ${D}${libdir}/dbus-1.0/test
117
118 # Remove /var/run as it is created on startup
119 rm -rf ${D}${localstatedir}/run
120}
121
122do_install_class-native() {
123 autotools_do_install
124
125 # for dbus-glib-native introspection generation
126 install -d ${STAGING_DATADIR_NATIVE}/dbus/
127 # N.B. is below install actually required?
128 install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf
129
130 # dbus-glib-native and dbus-glib need this xml file
131 ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
132
133 # dbus-launch has no X support so lets not install it in case the host
134 # has a more featured and useful version
135 rm -f ${D}${bindir}/dbus-launch
136}
137
138do_install_class-nativesdk() {
139 autotools_do_install
140
141 # dbus-launch has no X support so lets not install it in case the host
142 # has a more featured and useful version
143 rm -f ${D}${bindir}/dbus-launch
144
145 # Remove /var/run to avoid QA error
146 rm -rf ${D}${localstatedir}/run
147}
148BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/dbus/dbus_1.6.10.bb b/meta/recipes-core/dbus/dbus_1.6.10.bb
new file mode 100644
index 0000000000..5b8220c8ff
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus_1.6.10.bb
@@ -0,0 +1,6 @@
1include dbus.inc
2
3PR = "${INC_PR}.0"
4
5SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630"
6SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86"