All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 03/10] dbus: respect systemd distro feature
Date: Sat, 19 Jan 2013 22:47:06 +0000	[thread overview]
Message-ID: <ae25b75af351676b7866215d07359fb602a953b8.1358635193.git.ross.burton@intel.com> (raw)
In-Reply-To: <cover.1358635193.git.ross.burton@intel.com>
In-Reply-To: <cover.1358635193.git.ross.burton@intel.com>

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>
---
 meta/recipes-core/dbus/dbus.inc |   27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index bcc5b6b..88218b7 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
 }
-- 
1.7.10.4




  parent reply	other threads:[~2013-01-19 23:04 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-19 22:47 [PATCH 00/10] Initial systemd integration Ross Burton
2013-01-19 22:47 ` [PATCH 01/10] default-distrovars: Add DISTRO_FEATURES_INITMAN to DISTRO_FEATURES Ross Burton
2013-01-23 11:38   ` [PATCH] bitbake.conf: unbreak all builds with custom DISTRO_FEATURES Marcin Juszkiewicz
2013-01-23 11:43     ` Burton, Ross
2013-01-23 11:47       ` Marcin Juszkiewicz
2013-01-19 22:47 ` [PATCH 02/10] default-providers: Automatically set PREFERRED_PROVIDER_udev Ross Burton
2013-01-20 23:12   ` Martin Jansa
2013-01-20 23:15     ` Martin Jansa
2013-01-19 22:47 ` Ross Burton [this message]
2013-01-19 22:47 ` [PATCH 04/10] systemd: add systemd recipes Ross Burton
2013-01-20 23:11   ` Martin Jansa
2013-01-21 12:07     ` Burton, Ross
2013-01-19 22:47 ` [PATCH 05/10] default-providers: Add systemd option to PREFERRED_PROVIDER_udev Ross Burton
2013-01-19 22:47 ` [PATCH 06/10] packagegroup-core-boot: install systemd-compat-units on systemd images Ross Burton
2013-01-19 22:47 ` [PATCH 07/10] update-rc.d: disable update-rc.d.bbclass when systemd enabled Ross Burton
2013-01-19 22:47 ` [PATCH 08/10] base-files: add fstab for systemd based systems Ross Burton
2013-01-19 22:47 ` [PATCH 09/10] packagegroup-core-boot: only install initscripts if we're using sysvinit Ross Burton
2013-01-19 22:47 ` [PATCH 10/10] libpam: register PAM session with logind Ross Burton
2013-01-20 18:34 ` [PATCH 00/10] Initial systemd integration Saul Wold
2013-01-20 20:21   ` Burton, Ross
2013-01-21  8:59     ` Martin Jansa
2013-01-21  9:21       ` Burton, Ross
2013-01-21  3:57   ` Saul Wold
2013-01-21  8:08     ` Burton, Ross
2013-01-21  8:19       ` Eric Bénard
2013-01-21  8:47         ` Radu Moisan
2013-01-21 10:14         ` Richard Purdie
2013-01-21 12:09           ` Burton, Ross
2013-01-21 12:10     ` Burton, Ross
2013-01-21  3:30 ` Ciprian Ciubotariu
2013-01-21 12:12   ` Burton, Ross
2013-01-21 16:57     ` Saul Wold
2013-01-21 17:00       ` Burton, Ross
2013-01-22 22:04     ` Ciprian Ciubotariu
2013-01-22 22:29       ` Richard Purdie
2013-01-22  9:30 ` ChenQi
2013-01-22 10:48   ` Radu Moisan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae25b75af351676b7866215d07359fb602a953b8.1358635193.git.ross.burton@intel.com \
    --to=ross.burton@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.