From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- .../dbus/dbus-glib-0.100.2/no-examples.patch | 15 ++ .../obsolete_automake_macros.patch | 15 ++ .../dbus-glib-0.100.2/test-install-makefile.patch | 48 ++++++ .../dbus/dbus-glib-0.102/no-examples.patch | 15 ++ .../dbus-glib-0.102/obsolete_automake_macros.patch | 15 ++ .../dbus-glib-0.102/test-install-makefile.patch | 48 ++++++ meta/recipes-core/dbus/dbus-glib.inc | 44 ++++++ meta/recipes-core/dbus/dbus-glib_0.100.2.bb | 5 + meta/recipes-core/dbus/dbus-glib_0.102.bb | 8 + meta/recipes-core/dbus/dbus-test_1.8.2.bb | 60 ++++++++ meta/recipes-core/dbus/dbus-test_1.8.6.bb | 59 +++++++ meta/recipes-core/dbus/dbus.inc | 169 +++++++++++++++++++++ ...015-0245-prevent-forged-ActivationFailure.patch | 48 ++++++ ...guid_from_server-if-send_negotiate_unix_f.patch | 104 +++++++++++++ meta/recipes-core/dbus/dbus/dbus-1.init | 123 +++++++++++++++ meta/recipes-core/dbus/dbus/os-test.patch | 35 +++++ meta/recipes-core/dbus/dbus/python-config.patch | 25 +++ meta/recipes-core/dbus/dbus/run-ptest | 10 ++ meta/recipes-core/dbus/dbus/tmpdir.patch | 44 ++++++ meta/recipes-core/dbus/dbus_1.8.2.bb | 4 + meta/recipes-core/dbus/dbus_1.8.6.bb | 4 + 21 files changed, 898 insertions(+) create mode 100644 meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch create mode 100644 meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch create mode 100644 meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch create mode 100644 meta/recipes-core/dbus/dbus-glib-0.102/no-examples.patch create mode 100644 meta/recipes-core/dbus/dbus-glib-0.102/obsolete_automake_macros.patch create mode 100644 meta/recipes-core/dbus/dbus-glib-0.102/test-install-makefile.patch create mode 100644 meta/recipes-core/dbus/dbus-glib.inc create mode 100644 meta/recipes-core/dbus/dbus-glib_0.100.2.bb create mode 100644 meta/recipes-core/dbus/dbus-glib_0.102.bb create mode 100644 meta/recipes-core/dbus/dbus-test_1.8.2.bb create mode 100644 meta/recipes-core/dbus/dbus-test_1.8.6.bb create mode 100644 meta/recipes-core/dbus/dbus.inc create mode 100644 meta/recipes-core/dbus/dbus/CVE-2015-0245-prevent-forged-ActivationFailure.patch create mode 100644 meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch create mode 100644 meta/recipes-core/dbus/dbus/dbus-1.init create mode 100644 meta/recipes-core/dbus/dbus/os-test.patch create mode 100644 meta/recipes-core/dbus/dbus/python-config.patch create mode 100755 meta/recipes-core/dbus/dbus/run-ptest create mode 100644 meta/recipes-core/dbus/dbus/tmpdir.patch create mode 100644 meta/recipes-core/dbus/dbus_1.8.2.bb create mode 100644 meta/recipes-core/dbus/dbus_1.8.6.bb (limited to 'meta/recipes-core/dbus') 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 @@ +Disable compiling examples + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Kevin Tian +Signed-off-by: Scott Garman + +--- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200 ++++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200 +@@ -1,4 +1,4 @@ +-SUBDIRS = . examples ++SUBDIRS = . + + INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" + 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 @@ +Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003] + +Signed-off-by: Marko Lindqvist +diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac +--- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300 ++++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200 +@@ -8,7 +8,7 @@ + + AM_INIT_AUTOMAKE([1.9]) + +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + + # Honor aclocal flags + 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 @@ +Change Makefile.am to install regression tests for test package purpose. + +Upstream-Status: Inappropriate [test not install is for purpose from upstream] + +Signed-off-by: Yao Zhao + +diff --git a/test/Makefile.am b/test/Makefile.am +index 7ba11a8..249f0e7 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -13,7 +13,8 @@ else + TEST_BINARIES= + endif + +-noinst_PROGRAMS= $(TEST_BINARIES) ++testdir = $(datadir)/@PACKAGE@/tests ++test_PROGRAMS= $(TEST_BINARIES) + + test_service_SOURCES= \ + test-service.c +diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am +index 3cb2c39..e6de67d 100644 +--- a/test/interfaces/Makefile.am ++++ b/test/interfaces/Makefile.am +@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS + + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we + ## build even when not doing "make check" +-noinst_PROGRAMS = test-service test-client ++testdir = $(datadir)/@PACKAGE@/tests/interfaces ++test_PROGRAMS = test-service test-client + + test_service_SOURCES = \ + test-interfaces.c \ +diff --git a/test/core/Makefile.am b/test/core/Makefile.am +index ef6cb26..9786c3a 100644 +--- a/test/core/Makefile.am ++++ b/test/core/Makefile.am +@@ -46,7 +46,8 @@ endif + + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we + ## build even when not doing "make check" +-noinst_PROGRAMS = \ ++testdir = $(datadir)/@PACKAGE@/tests/core ++test_PROGRAMS = \ + test-dbus-glib \ + test-service-glib \ + $(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 @@ +Disable compiling examples + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Kevin Tian +Signed-off-by: Scott Garman + +--- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200 ++++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200 +@@ -1,4 +1,4 @@ +-SUBDIRS = . examples ++SUBDIRS = . + + INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" + 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 @@ +Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003] + +Signed-off-by: Marko Lindqvist +diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac +--- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300 ++++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200 +@@ -8,7 +8,7 @@ + + AM_INIT_AUTOMAKE([1.9]) + +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + + # Honor aclocal flags + 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 @@ +Change Makefile.am to install regression tests for test package purpose. + +Upstream-Status: Inappropriate [test not install is for purpose from upstream] + +Signed-off-by: Yao Zhao + +diff --git a/test/Makefile.am b/test/Makefile.am +index 7ba11a8..249f0e7 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -13,7 +13,8 @@ else + TEST_BINARIES= + endif + +-noinst_PROGRAMS= $(TEST_BINARIES) ++testdir = $(datadir)/@PACKAGE@/tests ++test_PROGRAMS= $(TEST_BINARIES) + + test_service_SOURCES= \ + test-service.c +diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am +index 3cb2c39..e6de67d 100644 +--- a/test/interfaces/Makefile.am ++++ b/test/interfaces/Makefile.am +@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS + + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we + ## build even when not doing "make check" +-noinst_PROGRAMS = test-service test-client ++testdir = $(datadir)/@PACKAGE@/tests/interfaces ++test_PROGRAMS = test-service test-client + + test_service_SOURCES = \ + test-interfaces.c \ +diff --git a/test/core/Makefile.am b/test/core/Makefile.am +index ef6cb26..9786c3a 100644 +--- a/test/core/Makefile.am ++++ b/test/core/Makefile.am +@@ -46,7 +46,8 @@ endif + + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we + ## build even when not doing "make check" +-noinst_PROGRAMS = \ ++testdir = $(datadir)/@PACKAGE@/tests/core ++test_PROGRAMS = \ + test-dbus-glib \ + test-service-glib \ + $(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 @@ +SUMMARY = "High level language (GLib) binding for D-Bus" +DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \ +the D-Bus library with the GLib thread abstraction and main loop." +HOMEPAGE = "http://www.freedesktop.org/Software/dbus" +LICENSE = "AFL-2 | GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \ + file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c" +SECTION = "base" + +DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus" +DEPENDS_class-native = "glib-2.0-native dbus-native" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \ + file://no-examples.patch \ + file://test-install-makefile.patch \ + file://obsolete_automake_macros.patch \ +" + +inherit autotools pkgconfig gettext + +#default disable regression tests, some unit test code in non testing code +#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf +PACKAGECONFIG ??= "" +PACKAGECONFIG[tests] = "--enable-tests,,," + +EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \ + --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool" +EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml" + +PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests" + +FILES_${PN} = "${libdir}/lib*${SOLIBS}" +FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \ + ${libexecdir}/dbus-bash-completion-helper" +FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" +FILES_${PN}-dev += "${bindir}/dbus-binding-tool" + +RDEPENDS_${PN}-tests += "dbus-x11" +FILES_${PN}-tests = "${datadir}/${BPN}/tests" +FILES_${PN}-tests-dbg = "${datadir}/${BPN}/tests/.debug/* \ + ${datadir}/${BPN}/tests/core/.debug/* \ + ${datadir}/${BPN}/tests/interfaces/.debug/*" + +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 @@ +require dbus-glib.inc + + +SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e" +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 @@ +require dbus-glib.inc + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \ + file://no-examples.patch \ +" + +SRC_URI[md5sum] = "f76b8558fd575d0106c3a556eaa49184" +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 @@ +SUMMARY = "D-Bus test package (for D-bus functionality testing only)" +HOMEPAGE = "http://dbus.freedesktop.org" +SECTION = "base" +LICENSE = "AFL-2 | GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ + file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" + +DEPENDS = "python-pygobject dbus dbus-glib" + +RDEPENDS_${PN} += "make" +RDEPENDS_${PN}-dev = "" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ + file://tmpdir.patch \ + file://dbus-1.init \ + file://run-ptest \ + file://python-config.patch \ + file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ + " + +SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068" +SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08" + +S="${WORKDIR}/dbus-${PV}" +FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:" + +inherit autotools pkgconfig gettext ptest + +EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" +EXTRA_OECONF_X_class-native = "--without-x" + +EXTRA_OECONF = "--enable-tests \ + --enable-modular-tests \ + --enable-installed-tests \ + --enable-checks \ + --enable-asserts \ + --enable-verbose-mode \ + --disable-xml-docs \ + --disable-doxygen-docs \ + --disable-libaudit \ + --disable-systemd \ + --without-systemdsystemunitdir \ + --with-dbus-test-dir=${PTEST_PATH} \ + ${EXTRA_OECONF_X}" + +do_install() { +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + case1="shell printf refs syslog" + for i in ${case1}; do install ${B}/test/test-$i ${D}${PTEST_PATH}/test; done + case2="marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay" + for i in ${case2}; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done + case3="bus bus-system bus-launch-helper" + for i in ${case3}; do install ${B}/bus/test-$i ${D}${PTEST_PATH}/test; done + install ${B}/dbus/test-dbus ${D}${PTEST_PATH}/test + cp -r ${B}/test/data ${D}${PTEST_PATH}/test +} +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 @@ +SUMMARY = "D-Bus test package (for D-bus functionality testing only)" +HOMEPAGE = "http://dbus.freedesktop.org" +SECTION = "base" +LICENSE = "AFL-2 | GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ + file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" + +DEPENDS = "python-pygobject dbus dbus-glib" + +RDEPENDS_${PN} += "make" +RDEPENDS_${PN}-dev = "" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ + file://tmpdir.patch \ + file://dbus-1.init \ + file://run-ptest \ + file://python-config.patch \ + file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ + " + +SRC_URI[md5sum] = "6a08ba555d340e9dfe2d623b83c0eea8" + +S="${WORKDIR}/dbus-${PV}" +FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:" + +inherit autotools pkgconfig gettext ptest + +EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" +EXTRA_OECONF_X_class-native = "--without-x" + +EXTRA_OECONF = "--enable-tests \ + --enable-modular-tests \ + --enable-installed-tests \ + --enable-checks \ + --enable-asserts \ + --enable-verbose-mode \ + --disable-xml-docs \ + --disable-doxygen-docs \ + --disable-libaudit \ + --disable-systemd \ + --without-systemdsystemunitdir \ + --with-dbus-test-dir=${PTEST_PATH} \ + ${EXTRA_OECONF_X}" + +do_install() { +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + case1="shell printf refs syslog" + for i in ${case1}; do install ${B}/test/test-$i ${D}${PTEST_PATH}/test; done + case2="marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay" + for i in ${case2}; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done + case3="bus bus-system bus-launch-helper" + for i in ${case3}; do install ${B}/bus/test-$i ${D}${PTEST_PATH}/test; done + install ${B}/dbus/test-dbus ${D}${PTEST_PATH}/test + cp -r ${B}/test/data ${D}${PTEST_PATH}/test +} +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 @@ +SUMMARY = "D-Bus message bus" +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." +HOMEPAGE = "http://dbus.freedesktop.org" +SECTION = "base" +LICENSE = "AFL-2 | GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ + file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" +DEPENDS = "expat virtual/libintl" +RDEPENDS_dbus_class-native = "" +RDEPENDS_dbus_class-nativesdk = "" +PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}" +ALLOW_EMPTY_dbus-ptest = "1" +RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ + file://tmpdir.patch \ + file://dbus-1.init \ + file://os-test.patch \ + file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ + file://CVE-2015-0245-prevent-forged-ActivationFailure.patch \ +" + +inherit useradd autotools pkgconfig gettext update-rc.d + +INITSCRIPT_NAME = "dbus-1" +INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." + +python __anonymous() { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "-r netdev" +USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ + --no-create-home --shell /bin/false \ + --user-group messagebus" + +CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" + +DEBIANNAME_${PN} = "dbus-1" + +PACKAGES =+ "${PN}-lib" + +OLDPKGNAME = "dbus-x11" +OLDPKGNAME_class-nativesdk = "" + +# for compatibility +RPROVIDES_${PN} = "${OLDPKGNAME}" +RREPLACES_${PN} += "${OLDPKGNAME}" + +FILES_${PN} = "${bindir}/dbus-daemon* \ + ${bindir}/dbus-uuidgen \ + ${bindir}/dbus-cleanup-sockets \ + ${bindir}/dbus-send \ + ${bindir}/dbus-monitor \ + ${bindir}/dbus-launch \ + ${bindir}/dbus-run-session \ + ${libexecdir}/dbus* \ + ${sysconfdir} \ + ${localstatedir} \ + ${datadir}/dbus-1/services \ + ${datadir}/dbus-1/system-services \ + ${systemd_unitdir}/system/" +FILES_${PN}-lib = "${libdir}/lib*.so.*" +RRECOMMENDS_${PN}-lib = "${PN}" +FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" + +pkg_postinst_dbus() { + # If both systemd and sysvinit are enabled, mask the dbus-1 init script + if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then + if [ -n "$D" ]; then + OPTS="--root=$D" + fi + systemctl $OPTS mask dbus-1.service + fi + + if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then + /etc/init.d/populate-volatile.sh update + fi +} + +EXTRA_OECONF = "--disable-tests \ + --disable-xml-docs \ + --disable-doxygen-docs \ + --disable-libaudit \ + --disable-systemd \ + --without-dbus-glib" + +EXTRA_OECONF_append_class-native = " --disable-selinux" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" +PACKAGECONFIG_class-native = "" +PACKAGECONFIG_class-nativesdk = "" + +# Would like to --enable-systemd but that's a circular build-dependency between +# systemd<->dbus +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir" +PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" + +do_install() { + autotools_do_install + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh + install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \ + install -d ${D}${systemd_unitdir}/system/$i; done + install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_unitdir}/system/ + cd ${D}${systemd_unitdir}/system/dbus.target.wants/ + ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/dbus.target.wants/dbus.socket + ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/sockets.target.wants/dbus.socket + ln -fs ../dbus.service ${D}${systemd_unitdir}/system/multi-user.target.wants/dbus.service + fi + + install -d ${D}${sysconfdir}/default/volatiles + echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \ + > ${D}${sysconfdir}/default/volatiles/99_dbus + + + mkdir -p ${D}${localstatedir}/lib/dbus + + chown messagebus:messagebus ${D}${localstatedir}/lib/dbus + + chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper + chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper + + # Remove Red Hat initscript + rm -rf ${D}${sysconfdir}/rc.d + + # Remove empty testexec directory as we don't build tests + rm -rf ${D}${libdir}/dbus-1.0/test + + # Remove /var/run as it is created on startup + rm -rf ${D}${localstatedir}/run +} + +do_install_class-native() { + autotools_do_install + + # for dbus-glib-native introspection generation + install -d ${STAGING_DATADIR_NATIVE}/dbus/ + # N.B. is below install actually required? + install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf + + # dbus-glib-native and dbus-glib need this xml file + ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml + + # dbus-launch has no X support so lets not install it in case the host + # has a more featured and useful version + rm -f ${D}${bindir}/dbus-launch +} + +do_install_class-nativesdk() { + autotools_do_install + + # dbus-launch has no X support so lets not install it in case the host + # has a more featured and useful version + rm -f ${D}${bindir}/dbus-launch + + # Remove /var/run to avoid QA error + rm -rf ${D}${localstatedir}/run +} +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 @@ +CVE-2015-0245: prevent forged ActivationFailure from non-root processes + +Upstream has fixed this in code but suggests using this as a easily +backportable fix: https://bugs.freedesktop.org/show_bug.cgi?id=88811 + +Upstream-Status: Inappropriate +Signed-off-by: Jussi Kukkonen + + + +From 91eb2ea3362630190e08c1c777c47bae065ac828 Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Mon, 26 Jan 2015 20:09:56 +0000 +Subject: [PATCH 1/3] CVE-2015-0245: prevent forged ActivationFailure from + non-root processes + +Without either this rule or better checking in dbus-daemon, non-systemd +processes can make dbus-daemon think systemd failed to activate a system +service, resulting in an error reply back to the requester. + +This is redundant with the fix in the C code (which I consider to be +the real solution), but is likely to be easier to backport. +--- + bus/system.conf.in | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/bus/system.conf.in b/bus/system.conf.in +index 92f4cc4..851b9e6 100644 +--- a/bus/system.conf.in ++++ b/bus/system.conf.in +@@ -68,6 +68,14 @@ + ++ ++ ++ ++ ++ ++ + + +