diff options
author | Ross Burton <ross.burton@intel.com> | 2013-01-19 22:47:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-20 12:58:54 +0000 |
commit | b18886d9b7c913cd463a98d0ef1b3a8a240f5791 (patch) | |
tree | c03b8ab36080dfcb320f48ad8ddcc41ab141277b | |
parent | 4c8b2ddbecfbddd3e12c04dc39caea9212358276 (diff) | |
download | poky-b18886d9b7c913cd463a98d0ef1b3a8a240f5791.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.
(From OE-Core rev: 06e262c9b4c406b886db6ca8eee55ab441599151)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/dbus/dbus.inc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc index bcc5b6ba29..88218b7b8a 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 | |||
33 | 33 | ||
34 | DEBIANNAME_${PN} = "dbus-1" | 34 | DEBIANNAME_${PN} = "dbus-1" |
35 | 35 | ||
36 | PACKAGES =+ "${PN}-lib ${PN}-systemd" | 36 | PACKAGES =+ "${PN}-lib" |
37 | 37 | ||
38 | OLDPKGNAME = "dbus-x11" | 38 | OLDPKGNAME = "dbus-x11" |
39 | OLDPKGNAME_class-nativesdk = "" | 39 | OLDPKGNAME_class-nativesdk = "" |
@@ -42,8 +42,6 @@ OLDPKGNAME_class-nativesdk = "" | |||
42 | RPROVIDES_${PN} = "${OLDPKGNAME}" | 42 | RPROVIDES_${PN} = "${OLDPKGNAME}" |
43 | RREPLACES_${PN} += "${OLDPKGNAME}" | 43 | RREPLACES_${PN} += "${OLDPKGNAME}" |
44 | 44 | ||
45 | FILES_${PN}-systemd = "${systemd_unitdir}/system/" | ||
46 | |||
47 | FILES_${PN} = "${bindir}/dbus-daemon* \ | 45 | FILES_${PN} = "${bindir}/dbus-daemon* \ |
48 | ${bindir}/dbus-uuidgen \ | 46 | ${bindir}/dbus-uuidgen \ |
49 | ${bindir}/dbus-cleanup-sockets \ | 47 | ${bindir}/dbus-cleanup-sockets \ |
@@ -54,7 +52,8 @@ FILES_${PN} = "${bindir}/dbus-daemon* \ | |||
54 | ${sysconfdir} \ | 52 | ${sysconfdir} \ |
55 | ${localstatedir} \ | 53 | ${localstatedir} \ |
56 | ${datadir}/dbus-1/services \ | 54 | ${datadir}/dbus-1/services \ |
57 | ${datadir}/dbus-1/system-services" | 55 | ${datadir}/dbus-1/system-services \ |
56 | ${systemd_unitdir}/system/" | ||
58 | FILES_${PN}-lib = "${libdir}/lib*.so.*" | 57 | FILES_${PN}-lib = "${libdir}/lib*.so.*" |
59 | RRECOMMENDS_${PN}-lib = "${PN}" | 58 | RRECOMMENDS_${PN}-lib = "${PN}" |
60 | FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" | 59 | FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" |
@@ -67,6 +66,9 @@ pkg_postinst_dbus() { | |||
67 | 66 | ||
68 | EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" | 67 | EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" |
69 | EXTRA_OECONF_X_class-native = "--without-x --disable-x11-autolaunch" | 68 | EXTRA_OECONF_X_class-native = "--without-x --disable-x11-autolaunch" |
69 | # TODO: would like to --enable-systemd but that's a circular build-dependency | ||
70 | # between systemd <->dbus | ||
71 | EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '', d)}" | ||
70 | 72 | ||
71 | EXTRA_OECONF = "--disable-tests \ | 73 | EXTRA_OECONF = "--disable-tests \ |
72 | --disable-checks \ | 74 | --disable-checks \ |
@@ -74,15 +76,18 @@ EXTRA_OECONF = "--disable-tests \ | |||
74 | --disable-doxygen-docs \ | 76 | --disable-doxygen-docs \ |
75 | --disable-libaudit \ | 77 | --disable-libaudit \ |
76 | --with-xml=expat \ | 78 | --with-xml=expat \ |
77 | --with-systemdsystemunitdir=${systemd_unitdir}/system/ \ | 79 | --disable-systemd \ |
80 | ${EXTRA_OECONF_SYSTEMD} \ | ||
78 | ${EXTRA_OECONF_X}" | 81 | ${EXTRA_OECONF_X}" |
79 | 82 | ||
80 | do_install() { | 83 | do_install() { |
81 | autotools_do_install | 84 | autotools_do_install |
82 | 85 | ||
83 | install -d ${D}${sysconfdir}/init.d | 86 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
84 | sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh | 87 | install -d ${D}${sysconfdir}/init.d |
85 | install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 | 88 | sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh |
89 | install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 | ||
90 | fi | ||
86 | 91 | ||
87 | install -d ${D}${sysconfdir}/default/volatiles | 92 | install -d ${D}${sysconfdir}/default/volatiles |
88 | echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \ | 93 | echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \ |
@@ -101,10 +106,6 @@ do_install() { | |||
101 | 106 | ||
102 | # Remove empty testexec directory as we don't build tests | 107 | # Remove empty testexec directory as we don't build tests |
103 | rm -rf ${D}${libdir}/dbus-1.0/test | 108 | rm -rf ${D}${libdir}/dbus-1.0/test |
104 | |||
105 | # disable dbus-1 sysv script on systemd installs | ||
106 | # nearly all distros call the initscript plain 'dbus', but OE-core is different | ||
107 | ln -sf /dev/null ${D}/${systemd_unitdir}/system/dbus-1.service | ||
108 | } | 109 | } |
109 | 110 | ||
110 | do_install_class-native() { | 111 | do_install_class-native() { |
@@ -114,7 +115,7 @@ do_install_class-native() { | |||
114 | install -d ${STAGING_DATADIR_NATIVE}/dbus/ | 115 | install -d ${STAGING_DATADIR_NATIVE}/dbus/ |
115 | # N.B. is below install actually required? | 116 | # N.B. is below install actually required? |
116 | install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf | 117 | install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf |
117 | 118 | ||
118 | # dbus-glib-native and dbus-glib need this xml file | 119 | # dbus-glib-native and dbus-glib need this xml file |
119 | ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml | 120 | ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml |
120 | } | 121 | } |