diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-core/dbus | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/dbus')
21 files changed, 898 insertions, 0 deletions
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 @@ | |||
1 | Disable compiling examples | ||
2 | |||
3 | Upstream-Status: Inappropriate [disable feature] | ||
4 | |||
5 | Signed-off-by: Kevin Tian <kevin.tian@intel.com> | ||
6 | Signed-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 @@ | |||
1 | Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003] | ||
2 | |||
3 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
4 | diff -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 @@ | |||
1 | Change Makefile.am to install regression tests for test package purpose. | ||
2 | |||
3 | Upstream-Status: Inappropriate [test not install is for purpose from upstream] | ||
4 | |||
5 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
6 | |||
7 | diff --git a/test/Makefile.am b/test/Makefile.am | ||
8 | index 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 | ||
21 | diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am | ||
22 | index 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 \ | ||
35 | diff --git a/test/core/Makefile.am b/test/core/Makefile.am | ||
36 | index 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-0.102/no-examples.patch b/meta/recipes-core/dbus/dbus-glib-0.102/no-examples.patch new file mode 100644 index 0000000000..fbb4967828 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib-0.102/no-examples.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Disable compiling examples | ||
2 | |||
3 | Upstream-Status: Inappropriate [disable feature] | ||
4 | |||
5 | Signed-off-by: Kevin Tian <kevin.tian@intel.com> | ||
6 | Signed-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.102/obsolete_automake_macros.patch b/meta/recipes-core/dbus/dbus-glib-0.102/obsolete_automake_macros.patch new file mode 100644 index 0000000000..40e3b12b5d --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib-0.102/obsolete_automake_macros.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003] | ||
2 | |||
3 | Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> | ||
4 | diff -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.102/test-install-makefile.patch b/meta/recipes-core/dbus/dbus-glib-0.102/test-install-makefile.patch new file mode 100644 index 0000000000..2e8e178bb7 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib-0.102/test-install-makefile.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | Change Makefile.am to install regression tests for test package purpose. | ||
2 | |||
3 | Upstream-Status: Inappropriate [test not install is for purpose from upstream] | ||
4 | |||
5 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
6 | |||
7 | diff --git a/test/Makefile.am b/test/Makefile.am | ||
8 | index 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 | ||
21 | diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am | ||
22 | index 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 \ | ||
35 | diff --git a/test/core/Makefile.am b/test/core/Makefile.am | ||
36 | index 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 @@ | |||
1 | SUMMARY = "High level language (GLib) binding for D-Bus" | ||
2 | DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \ | ||
3 | the D-Bus library with the GLib thread abstraction and main loop." | ||
4 | HOMEPAGE = "http://www.freedesktop.org/Software/dbus" | ||
5 | LICENSE = "AFL-2 | GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \ | ||
7 | file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c" | ||
8 | SECTION = "base" | ||
9 | |||
10 | DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus" | ||
11 | DEPENDS_class-native = "glib-2.0-native dbus-native" | ||
12 | |||
13 | SRC_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 | |||
19 | inherit 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 | ||
23 | PACKAGECONFIG ??= "" | ||
24 | PACKAGECONFIG[tests] = "--enable-tests,,," | ||
25 | |||
26 | EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \ | ||
27 | --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool" | ||
28 | EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml" | ||
29 | |||
30 | PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests" | ||
31 | |||
32 | FILES_${PN} = "${libdir}/lib*${SOLIBS}" | ||
33 | FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \ | ||
34 | ${libexecdir}/dbus-bash-completion-helper" | ||
35 | FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" | ||
36 | FILES_${PN}-dev += "${bindir}/dbus-binding-tool" | ||
37 | |||
38 | RDEPENDS_${PN}-tests += "dbus-x11" | ||
39 | FILES_${PN}-tests = "${datadir}/${BPN}/tests" | ||
40 | FILES_${PN}-tests-dbg = "${datadir}/${BPN}/tests/.debug/* \ | ||
41 | ${datadir}/${BPN}/tests/core/.debug/* \ | ||
42 | ${datadir}/${BPN}/tests/interfaces/.debug/*" | ||
43 | |||
44 | BBCLASSEXTEND = "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..c1bb06a1b4 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require dbus-glib.inc | ||
2 | |||
3 | |||
4 | SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e" | ||
5 | SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5" | ||
diff --git a/meta/recipes-core/dbus/dbus-glib_0.102.bb b/meta/recipes-core/dbus/dbus-glib_0.102.bb new file mode 100644 index 0000000000..28e8a72e23 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib_0.102.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require dbus-glib.inc | ||
2 | |||
3 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \ | ||
4 | file://no-examples.patch \ | ||
5 | " | ||
6 | |||
7 | SRC_URI[md5sum] = "f76b8558fd575d0106c3a556eaa49184" | ||
8 | SRC_URI[sha256sum] = "6964ed585bb8149a14ab744b5ded5e77cf71ec5446e6dcc5fcf5eebcc52df29c" | ||
diff --git a/meta/recipes-core/dbus/dbus-test_1.8.2.bb b/meta/recipes-core/dbus/dbus-test_1.8.2.bb new file mode 100644 index 0000000000..e19d2e9d1e --- /dev/null +++ b/meta/recipes-core/dbus/dbus-test_1.8.2.bb | |||
@@ -0,0 +1,60 @@ | |||
1 | SUMMARY = "D-Bus test package (for D-bus functionality testing only)" | ||
2 | HOMEPAGE = "http://dbus.freedesktop.org" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "AFL-2 | GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ | ||
6 | file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" | ||
7 | |||
8 | DEPENDS = "python-pygobject dbus dbus-glib" | ||
9 | |||
10 | RDEPENDS_${PN} += "make" | ||
11 | RDEPENDS_${PN}-dev = "" | ||
12 | |||
13 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ | ||
14 | file://tmpdir.patch \ | ||
15 | file://dbus-1.init \ | ||
16 | file://run-ptest \ | ||
17 | file://python-config.patch \ | ||
18 | file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ | ||
19 | " | ||
20 | |||
21 | SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068" | ||
22 | SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08" | ||
23 | |||
24 | S="${WORKDIR}/dbus-${PV}" | ||
25 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:" | ||
26 | |||
27 | inherit autotools pkgconfig gettext ptest | ||
28 | |||
29 | EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" | ||
30 | EXTRA_OECONF_X_class-native = "--without-x" | ||
31 | |||
32 | EXTRA_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 | --disable-systemd \ | ||
42 | --without-systemdsystemunitdir \ | ||
43 | --with-dbus-test-dir=${PTEST_PATH} \ | ||
44 | ${EXTRA_OECONF_X}" | ||
45 | |||
46 | do_install() { | ||
47 | } | ||
48 | |||
49 | do_install_ptest() { | ||
50 | install -d ${D}${PTEST_PATH}/test | ||
51 | case1="shell printf refs syslog" | ||
52 | for i in ${case1}; do install ${B}/test/test-$i ${D}${PTEST_PATH}/test; done | ||
53 | case2="marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay" | ||
54 | for i in ${case2}; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done | ||
55 | case3="bus bus-system bus-launch-helper" | ||
56 | for i in ${case3}; do install ${B}/bus/test-$i ${D}${PTEST_PATH}/test; done | ||
57 | install ${B}/dbus/test-dbus ${D}${PTEST_PATH}/test | ||
58 | cp -r ${B}/test/data ${D}${PTEST_PATH}/test | ||
59 | } | ||
60 | RDEPENDS_${PN}-ptest += "bash" | ||
diff --git a/meta/recipes-core/dbus/dbus-test_1.8.6.bb b/meta/recipes-core/dbus/dbus-test_1.8.6.bb new file mode 100644 index 0000000000..53c5d9ae38 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-test_1.8.6.bb | |||
@@ -0,0 +1,59 @@ | |||
1 | SUMMARY = "D-Bus test package (for D-bus functionality testing only)" | ||
2 | HOMEPAGE = "http://dbus.freedesktop.org" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "AFL-2 | GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ | ||
6 | file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" | ||
7 | |||
8 | DEPENDS = "python-pygobject dbus dbus-glib" | ||
9 | |||
10 | RDEPENDS_${PN} += "make" | ||
11 | RDEPENDS_${PN}-dev = "" | ||
12 | |||
13 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ | ||
14 | file://tmpdir.patch \ | ||
15 | file://dbus-1.init \ | ||
16 | file://run-ptest \ | ||
17 | file://python-config.patch \ | ||
18 | file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ | ||
19 | " | ||
20 | |||
21 | SRC_URI[md5sum] = "6a08ba555d340e9dfe2d623b83c0eea8" | ||
22 | |||
23 | S="${WORKDIR}/dbus-${PV}" | ||
24 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:" | ||
25 | |||
26 | inherit autotools pkgconfig gettext ptest | ||
27 | |||
28 | EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" | ||
29 | EXTRA_OECONF_X_class-native = "--without-x" | ||
30 | |||
31 | EXTRA_OECONF = "--enable-tests \ | ||
32 | --enable-modular-tests \ | ||
33 | --enable-installed-tests \ | ||
34 | --enable-checks \ | ||
35 | --enable-asserts \ | ||
36 | --enable-verbose-mode \ | ||
37 | --disable-xml-docs \ | ||
38 | --disable-doxygen-docs \ | ||
39 | --disable-libaudit \ | ||
40 | --disable-systemd \ | ||
41 | --without-systemdsystemunitdir \ | ||
42 | --with-dbus-test-dir=${PTEST_PATH} \ | ||
43 | ${EXTRA_OECONF_X}" | ||
44 | |||
45 | do_install() { | ||
46 | } | ||
47 | |||
48 | do_install_ptest() { | ||
49 | install -d ${D}${PTEST_PATH}/test | ||
50 | case1="shell printf refs syslog" | ||
51 | for i in ${case1}; do install ${B}/test/test-$i ${D}${PTEST_PATH}/test; done | ||
52 | case2="marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay" | ||
53 | for i in ${case2}; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done | ||
54 | case3="bus bus-system bus-launch-helper" | ||
55 | for i in ${case3}; do install ${B}/bus/test-$i ${D}${PTEST_PATH}/test; done | ||
56 | install ${B}/dbus/test-dbus ${D}${PTEST_PATH}/test | ||
57 | cp -r ${B}/test/data ${D}${PTEST_PATH}/test | ||
58 | } | ||
59 | RDEPENDS_${PN}-ptest += "bash" | ||
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc new file mode 100644 index 0000000000..971eabf82c --- /dev/null +++ b/meta/recipes-core/dbus/dbus.inc | |||
@@ -0,0 +1,169 @@ | |||
1 | SUMMARY = "D-Bus message bus" | ||
2 | DESCRIPTION = "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." | ||
3 | HOMEPAGE = "http://dbus.freedesktop.org" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "AFL-2 | GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ | ||
7 | file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" | ||
8 | DEPENDS = "expat virtual/libintl" | ||
9 | RDEPENDS_dbus_class-native = "" | ||
10 | RDEPENDS_dbus_class-nativesdk = "" | ||
11 | PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}" | ||
12 | ALLOW_EMPTY_dbus-ptest = "1" | ||
13 | RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest" | ||
14 | |||
15 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ | ||
16 | file://tmpdir.patch \ | ||
17 | file://dbus-1.init \ | ||
18 | file://os-test.patch \ | ||
19 | file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ | ||
20 | file://CVE-2015-0245-prevent-forged-ActivationFailure.patch \ | ||
21 | " | ||
22 | |||
23 | inherit useradd autotools pkgconfig gettext update-rc.d | ||
24 | |||
25 | INITSCRIPT_NAME = "dbus-1" | ||
26 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." | ||
27 | |||
28 | python __anonymous() { | ||
29 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
30 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
31 | } | ||
32 | |||
33 | USERADD_PACKAGES = "${PN}" | ||
34 | GROUPADD_PARAM_${PN} = "-r netdev" | ||
35 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ | ||
36 | --no-create-home --shell /bin/false \ | ||
37 | --user-group messagebus" | ||
38 | |||
39 | CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" | ||
40 | |||
41 | DEBIANNAME_${PN} = "dbus-1" | ||
42 | |||
43 | PACKAGES =+ "${PN}-lib" | ||
44 | |||
45 | OLDPKGNAME = "dbus-x11" | ||
46 | OLDPKGNAME_class-nativesdk = "" | ||
47 | |||
48 | # for compatibility | ||
49 | RPROVIDES_${PN} = "${OLDPKGNAME}" | ||
50 | RREPLACES_${PN} += "${OLDPKGNAME}" | ||
51 | |||
52 | FILES_${PN} = "${bindir}/dbus-daemon* \ | ||
53 | ${bindir}/dbus-uuidgen \ | ||
54 | ${bindir}/dbus-cleanup-sockets \ | ||
55 | ${bindir}/dbus-send \ | ||
56 | ${bindir}/dbus-monitor \ | ||
57 | ${bindir}/dbus-launch \ | ||
58 | ${bindir}/dbus-run-session \ | ||
59 | ${libexecdir}/dbus* \ | ||
60 | ${sysconfdir} \ | ||
61 | ${localstatedir} \ | ||
62 | ${datadir}/dbus-1/services \ | ||
63 | ${datadir}/dbus-1/system-services \ | ||
64 | ${systemd_unitdir}/system/" | ||
65 | FILES_${PN}-lib = "${libdir}/lib*.so.*" | ||
66 | RRECOMMENDS_${PN}-lib = "${PN}" | ||
67 | FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" | ||
68 | |||
69 | pkg_postinst_dbus() { | ||
70 | # If both systemd and sysvinit are enabled, mask the dbus-1 init script | ||
71 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then | ||
72 | if [ -n "$D" ]; then | ||
73 | OPTS="--root=$D" | ||
74 | fi | ||
75 | systemctl $OPTS mask dbus-1.service | ||
76 | fi | ||
77 | |||
78 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
79 | /etc/init.d/populate-volatile.sh update | ||
80 | fi | ||
81 | } | ||
82 | |||
83 | EXTRA_OECONF = "--disable-tests \ | ||
84 | --disable-xml-docs \ | ||
85 | --disable-doxygen-docs \ | ||
86 | --disable-libaudit \ | ||
87 | --disable-systemd \ | ||
88 | --without-dbus-glib" | ||
89 | |||
90 | EXTRA_OECONF_append_class-native = " --disable-selinux" | ||
91 | |||
92 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | ||
93 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" | ||
94 | PACKAGECONFIG_class-native = "" | ||
95 | PACKAGECONFIG_class-nativesdk = "" | ||
96 | |||
97 | # Would like to --enable-systemd but that's a circular build-dependency between | ||
98 | # systemd<->dbus | ||
99 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir" | ||
100 | PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" | ||
101 | |||
102 | do_install() { | ||
103 | autotools_do_install | ||
104 | |||
105 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
106 | install -d ${D}${sysconfdir}/init.d | ||
107 | sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh | ||
108 | install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 | ||
109 | fi | ||
110 | |||
111 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
112 | for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \ | ||
113 | install -d ${D}${systemd_unitdir}/system/$i; done | ||
114 | install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_unitdir}/system/ | ||
115 | cd ${D}${systemd_unitdir}/system/dbus.target.wants/ | ||
116 | ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/dbus.target.wants/dbus.socket | ||
117 | ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/sockets.target.wants/dbus.socket | ||
118 | ln -fs ../dbus.service ${D}${systemd_unitdir}/system/multi-user.target.wants/dbus.service | ||
119 | fi | ||
120 | |||
121 | install -d ${D}${sysconfdir}/default/volatiles | ||
122 | echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \ | ||
123 | > ${D}${sysconfdir}/default/volatiles/99_dbus | ||
124 | |||
125 | |||
126 | mkdir -p ${D}${localstatedir}/lib/dbus | ||
127 | |||
128 | chown messagebus:messagebus ${D}${localstatedir}/lib/dbus | ||
129 | |||
130 | chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper | ||
131 | chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper | ||
132 | |||
133 | # Remove Red Hat initscript | ||
134 | rm -rf ${D}${sysconfdir}/rc.d | ||
135 | |||
136 | # Remove empty testexec directory as we don't build tests | ||
137 | rm -rf ${D}${libdir}/dbus-1.0/test | ||
138 | |||
139 | # Remove /var/run as it is created on startup | ||
140 | rm -rf ${D}${localstatedir}/run | ||
141 | } | ||
142 | |||
143 | do_install_class-native() { | ||
144 | autotools_do_install | ||
145 | |||
146 | # for dbus-glib-native introspection generation | ||
147 | install -d ${STAGING_DATADIR_NATIVE}/dbus/ | ||
148 | # N.B. is below install actually required? | ||
149 | install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf | ||
150 | |||
151 | # dbus-glib-native and dbus-glib need this xml file | ||
152 | ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml | ||
153 | |||
154 | # dbus-launch has no X support so lets not install it in case the host | ||
155 | # has a more featured and useful version | ||
156 | rm -f ${D}${bindir}/dbus-launch | ||
157 | } | ||
158 | |||
159 | do_install_class-nativesdk() { | ||
160 | autotools_do_install | ||
161 | |||
162 | # dbus-launch has no X support so lets not install it in case the host | ||
163 | # has a more featured and useful version | ||
164 | rm -f ${D}${bindir}/dbus-launch | ||
165 | |||
166 | # Remove /var/run to avoid QA error | ||
167 | rm -rf ${D}${localstatedir}/run | ||
168 | } | ||
169 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-core/dbus/dbus/CVE-2015-0245-prevent-forged-ActivationFailure.patch b/meta/recipes-core/dbus/dbus/CVE-2015-0245-prevent-forged-ActivationFailure.patch new file mode 100644 index 0000000000..59363b3e76 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/CVE-2015-0245-prevent-forged-ActivationFailure.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | CVE-2015-0245: prevent forged ActivationFailure from non-root processes | ||
2 | |||
3 | Upstream has fixed this in code but suggests using this as a easily | ||
4 | backportable fix: https://bugs.freedesktop.org/show_bug.cgi?id=88811 | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
8 | |||
9 | |||
10 | |||
11 | From 91eb2ea3362630190e08c1c777c47bae065ac828 Mon Sep 17 00:00:00 2001 | ||
12 | From: Simon McVittie <simon.mcvittie@collabora.co.uk> | ||
13 | Date: Mon, 26 Jan 2015 20:09:56 +0000 | ||
14 | Subject: [PATCH 1/3] CVE-2015-0245: prevent forged ActivationFailure from | ||
15 | non-root processes | ||
16 | |||
17 | Without either this rule or better checking in dbus-daemon, non-systemd | ||
18 | processes can make dbus-daemon think systemd failed to activate a system | ||
19 | service, resulting in an error reply back to the requester. | ||
20 | |||
21 | This is redundant with the fix in the C code (which I consider to be | ||
22 | the real solution), but is likely to be easier to backport. | ||
23 | --- | ||
24 | bus/system.conf.in | 8 ++++++++ | ||
25 | 1 file changed, 8 insertions(+) | ||
26 | |||
27 | diff --git a/bus/system.conf.in b/bus/system.conf.in | ||
28 | index 92f4cc4..851b9e6 100644 | ||
29 | --- a/bus/system.conf.in | ||
30 | +++ b/bus/system.conf.in | ||
31 | @@ -68,6 +68,14 @@ | ||
32 | <deny send_destination="org.freedesktop.DBus" | ||
33 | send_interface="org.freedesktop.DBus" | ||
34 | send_member="UpdateActivationEnvironment"/> | ||
35 | + <deny send_destination="org.freedesktop.DBus" | ||
36 | + send_interface="org.freedesktop.systemd1.Activator"/> | ||
37 | + </policy> | ||
38 | + | ||
39 | + <!-- Only systemd, which runs as root, may report activation failures. --> | ||
40 | + <policy user="root"> | ||
41 | + <allow send_destination="org.freedesktop.DBus" | ||
42 | + send_interface="org.freedesktop.systemd1.Activator"/> | ||
43 | </policy> | ||
44 | |||
45 | <!-- Config files are placed here that among other things, punch | ||
46 | -- | ||
47 | 2.1.4 | ||
48 | |||
diff --git a/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch b/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch new file mode 100644 index 0000000000..6bb6d9c82e --- /dev/null +++ b/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch | |||
@@ -0,0 +1,104 @@ | |||
1 | From b8f84bd39485d3977625c9a8b8e8cff5d23be56f Mon Sep 17 00:00:00 2001 | ||
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Thu, 27 Feb 2014 09:05:02 +0800 | ||
4 | Subject: [PATCH] dbus: clear guid_from_server if send_negotiate_unix_fd | ||
5 | failed | ||
6 | |||
7 | Upstream-Status: Submitted | ||
8 | |||
9 | bus-test dispatch test failed with below information: | ||
10 | ./bus/bus-test: Running message dispatch test | ||
11 | Activating service name='org.freedesktop.DBus.TestSuiteEchoService' | ||
12 | Successfully activated service 'org.freedesktop.DBus.TestSuiteEchoService' | ||
13 | 6363: assertion failed "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0" file "dbus-auth.c" line 1545 function process_ok | ||
14 | ./bus/bus-test(_dbus_print_backtrace+0x29) [0x80cb969] | ||
15 | ./bus/bus-test(_dbus_abort+0x14) [0x80cfb44] | ||
16 | ./bus/bus-test(_dbus_real_assert+0x53) [0x80b52c3] | ||
17 | ./bus/bus-test() [0x80e24da] | ||
18 | ./bus/bus-test(_dbus_auth_do_work+0x388) [0x80e3848] | ||
19 | ./bus/bus-test() [0x80aea49] | ||
20 | ./bus/bus-test() [0x80affde] | ||
21 | ./bus/bus-test(_dbus_transport_handle_watch+0xb1) [0x80ad841] | ||
22 | ./bus/bus-test(_dbus_connection_handle_watch+0x104) [0x8089174] | ||
23 | ./bus/bus-test(dbus_watch_handle+0xd8) [0x80b15e8] | ||
24 | ./bus/bus-test(_dbus_loop_iterate+0x4a9) [0x80d1509] | ||
25 | ./bus/bus-test(bus_test_run_clients_loop+0x5d) [0x808129d] | ||
26 | ./bus/bus-test() [0x806cab0] | ||
27 | ./bus/bus-test() [0x806e0ca] | ||
28 | ./bus/bus-test() [0x806da6f] | ||
29 | ./bus/bus-test(_dbus_test_oom_handling+0x18c) [0x80b5c8c] | ||
30 | ./bus/bus-test() [0x806f723] | ||
31 | ./bus/bus-test(bus_dispatch_test+0x3c) [0x8071aac] | ||
32 | ./bus/bus-test(main+0x1b7) [0x805acc7] | ||
33 | /lib/libc.so.6(__libc_start_main+0xf3) [0x45f919b3] | ||
34 | ./bus/bus-test() [0x805ae39] | ||
35 | |||
36 | The stack is below: | ||
37 | #0 0xffffe425 in __kernel_vsyscall () | ||
38 | #1 0x45fa62d6 in raise () from /lib/libc.so.6 | ||
39 | #2 0x45fa9653 in abort () from /lib/libc.so.6 | ||
40 | #3 0x080cfb65 in _dbus_abort () at dbus-sysdeps.c:94 | ||
41 | #4 0x080b52c3 in _dbus_real_assert (condition=0, | ||
42 | condition_text=condition_text@entry=0x8117a38 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0", | ||
43 | file=file@entry=0x8117273 "dbus-auth.c", line=line@entry=1545, | ||
44 | func=func@entry=0x8117f8e <__FUNCTION__.3492> "process_ok") | ||
45 | data=0x8157290) at dbus-connection.c:1515 | ||
46 | #0 0x00000033fee353e9 in raise () from /lib64/libc.so.6 | ||
47 | #1 0x00000033fee38508 in abort () from /lib64/libc.so.6 | ||
48 | #2 0x000000000047d585 in _dbus_abort () at dbus-sysdeps.c:94 | ||
49 | #3 0x0000000000466486 in _dbus_real_assert (condition=<optimized out>, | ||
50 | condition_text=condition_text@entry=0x4c2988 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0", | ||
51 | file=file@entry=0x4c21a5 "dbus-auth.c", line=line@entry=1546, | ||
52 | func=func@entry=0x4c2fce <__FUNCTION__.3845> "process_ok") | ||
53 | at dbus-internals.c:931 | ||
54 | #4 0x000000000048d424 in process_ok (args_from_ok=0x7fffffffe480, | ||
55 | auth=0x6ff340) at dbus-auth.c:1546 | ||
56 | #5 handle_client_state_waiting_for_data (auth=0x6ff340, | ||
57 | command=<optimized out>, args=0x7fffffffe480) at dbus-auth.c:1996 | ||
58 | #6 0x000000000048e789 in process_command (auth=0x6ff340) at dbus-auth.c:2208 | ||
59 | #7 _dbus_auth_do_work (auth=0x6ff340) at dbus-auth.c:2458 | ||
60 | #8 0x000000000046091d in do_authentication ( | ||
61 | transport=transport@entry=0x6ffaa0, do_reading=do_reading@entry=1, | ||
62 | do_writing=do_writing@entry=0, | ||
63 | auth_completed=auth_completed@entry=0x7fffffffe55c) | ||
64 | at dbus-transport-socket.c:442 | ||
65 | #9 0x0000000000461d08 in socket_handle_watch (transport=0x6ffaa0, | ||
66 | watch=0x6f4190, flags=1) at dbus-transport-socket.c:921 | ||
67 | #10 0x000000000045fa3a in _dbus_transport_handle_watch (transport=0x6ffaa0, | ||
68 | |||
69 | Once send_negotiate_unix_fd failed, this failure will happen, since | ||
70 | auth->guid_from_server has been set to some value before | ||
71 | send_negotiate_unix_fd. send_negotiate_unix_fd failure will lead to | ||
72 | this auth be handled by process_ok again, but this auth->guid_from_server | ||
73 | is not zero. | ||
74 | |||
75 | So we should clear auth->guid_from_server if send_negotiate_unix_fd failed | ||
76 | |||
77 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
78 | --- | ||
79 | dbus/dbus-auth.c | 9 +++++++-- | ||
80 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
81 | |||
82 | diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c | ||
83 | index d2c37a7..37b45c6 100644 | ||
84 | --- a/dbus/dbus-auth.c | ||
85 | +++ b/dbus/dbus-auth.c | ||
86 | @@ -1571,8 +1571,13 @@ process_ok(DBusAuth *auth, | ||
87 | _dbus_verbose ("Got GUID '%s' from the server\n", | ||
88 | _dbus_string_get_const_data (& DBUS_AUTH_CLIENT (auth)->guid_from_server)); | ||
89 | |||
90 | - if (auth->unix_fd_possible) | ||
91 | - return send_negotiate_unix_fd(auth); | ||
92 | + if (auth->unix_fd_possible) { | ||
93 | + if (!send_negotiate_unix_fd(auth)) { | ||
94 | + _dbus_string_set_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server, 0); | ||
95 | + return FALSE; | ||
96 | + } | ||
97 | + return TRUE; | ||
98 | + } | ||
99 | |||
100 | _dbus_verbose("Not negotiating unix fd passing, since not possible\n"); | ||
101 | return send_begin (auth); | ||
102 | -- | ||
103 | 1.7.10.4 | ||
104 | |||
diff --git a/meta/recipes-core/dbus/dbus/dbus-1.init b/meta/recipes-core/dbus/dbus/dbus-1.init new file mode 100644 index 0000000000..42c86297c3 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/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 | |||
17 | # set -e | ||
18 | |||
19 | # Source function library. | ||
20 | . /etc/init.d/functions | ||
21 | |||
22 | DAEMON=@bindir@/dbus-daemon | ||
23 | NAME=dbus | ||
24 | DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf | ||
25 | PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf | ||
26 | UUIDDIR=/var/lib/dbus | ||
27 | DESC="system message bus" | ||
28 | EVENTDIR=/etc/dbus-1/event.d | ||
29 | |||
30 | test -x $DAEMON || exit 0 | ||
31 | |||
32 | # Source defaults file; edit that file to configure this script. | ||
33 | ENABLED=1 | ||
34 | PARAMS="" | ||
35 | if [ -e /etc/default/dbus ]; then | ||
36 | . /etc/default/dbus | ||
37 | fi | ||
38 | |||
39 | test "$ENABLED" != "0" || exit 0 | ||
40 | |||
41 | start_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 | |||
71 | shut_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 | |||
88 | reload_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 | |||
98 | case "$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 | ;; | ||
121 | esac | ||
122 | |||
123 | exit 0 | ||
diff --git a/meta/recipes-core/dbus/dbus/os-test.patch b/meta/recipes-core/dbus/dbus/os-test.patch new file mode 100644 index 0000000000..79554b1ee1 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/os-test.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | dbus: remove build host test in configure script | ||
2 | |||
3 | The dbus build tests the build host to detect what initscript | ||
4 | environment it expects. Remove the test and set it to "redhat" | ||
5 | unconditionally as the oe-core initscript has a redhat-style pid file | ||
6 | path. | ||
7 | |||
8 | Signed-off-by: Andy Ross <andy.ross@windriver.com> | ||
9 | Upstream-Status: innappropriate [embedded] | ||
10 | |||
11 | diff -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/python-config.patch b/meta/recipes-core/dbus/dbus/python-config.patch new file mode 100644 index 0000000000..294400247e --- /dev/null +++ b/meta/recipes-core/dbus/dbus/python-config.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | When building the dbus-ptest package, we have to enable python. However | ||
2 | checking if the host-system python has the necessary library isn't useful. | ||
3 | |||
4 | Disable the python module check for cross compiling. | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe specific] | ||
7 | |||
8 | Signed-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/run-ptest b/meta/recipes-core/dbus/dbus/run-ptest new file mode 100755 index 0000000000..c72d083a91 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/run-ptest | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | output() { | ||
4 | if [ $? -eq 0 ] | ||
5 | then echo "PASS: $i" | ||
6 | else echo "FAIL: $i" | ||
7 | fi | ||
8 | } | ||
9 | |||
10 | for i in `ls test/test-*`; do ./$i ./test/data DBUS_TEST_HOMEDIR=./test >/dev/null; output; done | ||
diff --git a/meta/recipes-core/dbus/dbus/tmpdir.patch b/meta/recipes-core/dbus/dbus/tmpdir.patch new file mode 100644 index 0000000000..bf086e1788 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/tmpdir.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Thu, 23 Jun 2011 13:52:09 +0200 | ||
4 | Subject: [PATCH] buildsys: hardcode socketdir to /tmp | ||
5 | |||
6 | the TMPDIR env var isn't always pointing to the right target path | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded] | ||
9 | |||
10 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
11 | |||
12 | Original 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 | |||
20 | diff --git a/configure.ac b/configure.ac | ||
21 | index 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 | -- | ||
43 | 1.6.6.1 | ||
44 | |||
diff --git a/meta/recipes-core/dbus/dbus_1.8.2.bb b/meta/recipes-core/dbus/dbus_1.8.2.bb new file mode 100644 index 0000000000..37ebed2bd6 --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.8.2.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | include dbus.inc | ||
2 | |||
3 | SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068" | ||
4 | SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08" | ||
diff --git a/meta/recipes-core/dbus/dbus_1.8.6.bb b/meta/recipes-core/dbus/dbus_1.8.6.bb new file mode 100644 index 0000000000..2fd630fa98 --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.8.6.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | include dbus.inc | ||
2 | |||
3 | SRC_URI[md5sum] = "6a08ba555d340e9dfe2d623b83c0eea8" | ||
4 | SRC_URI[sha256sum] = "eded83ca007b719f32761e60fd8b9ffd0f5796a4caf455b01b5a5ef740ebd23f" | ||