aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-01-19 22:47:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-20 12:44:49 +0000
commit06e262c9b4c406b886db6ca8eee55ab441599151 (patch)
treed9074c9d71d9f56111eee350ad89e7eb0fc8fed3 /meta
parentda13562af73d144b5782ee8d755e2249cd9d2d8c (diff)
downloadopenembedded-core-contrib-06e262c9b4c406b886db6ca8eee55ab441599151.tar.gz
dbus: respect systemd distro feature
Only configure for systemd if we are using systemd, and remove the dbus-systemd package by putting the service files into PN itself. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/dbus/dbus.inc27
1 files changed, 14 insertions, 13 deletions
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index bcc5b6ba293..88218b7b8aa 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -33,7 +33,7 @@ CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session
DEBIANNAME_${PN} = "dbus-1"
-PACKAGES =+ "${PN}-lib ${PN}-systemd"
+PACKAGES =+ "${PN}-lib"
OLDPKGNAME = "dbus-x11"
OLDPKGNAME_class-nativesdk = ""
@@ -42,8 +42,6 @@ OLDPKGNAME_class-nativesdk = ""
RPROVIDES_${PN} = "${OLDPKGNAME}"
RREPLACES_${PN} += "${OLDPKGNAME}"
-FILES_${PN}-systemd = "${systemd_unitdir}/system/"
-
FILES_${PN} = "${bindir}/dbus-daemon* \
${bindir}/dbus-uuidgen \
${bindir}/dbus-cleanup-sockets \
@@ -54,7 +52,8 @@ FILES_${PN} = "${bindir}/dbus-daemon* \
${sysconfdir} \
${localstatedir} \
${datadir}/dbus-1/services \
- ${datadir}/dbus-1/system-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"
@@ -67,6 +66,9 @@ pkg_postinst_dbus() {
EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
EXTRA_OECONF_X_class-native = "--without-x --disable-x11-autolaunch"
+# TODO: would like to --enable-systemd but that's a circular build-dependency
+# between systemd <->dbus
+EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '', d)}"
EXTRA_OECONF = "--disable-tests \
--disable-checks \
@@ -74,15 +76,18 @@ EXTRA_OECONF = "--disable-tests \
--disable-doxygen-docs \
--disable-libaudit \
--with-xml=expat \
- --with-systemdsystemunitdir=${systemd_unitdir}/system/ \
+ --disable-systemd \
+ ${EXTRA_OECONF_SYSTEMD} \
${EXTRA_OECONF_X}"
do_install() {
autotools_do_install
- 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
+ if ${@base_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
install -d ${D}${sysconfdir}/default/volatiles
echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
@@ -101,10 +106,6 @@ do_install() {
# Remove empty testexec directory as we don't build tests
rm -rf ${D}${libdir}/dbus-1.0/test
-
- # disable dbus-1 sysv script on systemd installs
- # nearly all distros call the initscript plain 'dbus', but OE-core is different
- ln -sf /dev/null ${D}/${systemd_unitdir}/system/dbus-1.service
}
do_install_class-native() {
@@ -114,7 +115,7 @@ do_install_class-native() {
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
}