summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Shadura <andrew.shadura@collabora.co.uk>2015-11-20 15:27:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-01 21:32:10 +0000
commite0b6d0c1d6b7c5724a1848d147b0ad261598808e (patch)
treeac49fbce4e7466f7dd8fc30d39db7202de01c16e
parentd99958a9095f496a0ba7a1f1e5947b5dee1c0f9d (diff)
downloadpoky-e0b6d0c1d6b7c5724a1848d147b0ad261598808e.tar.gz
dbus: merge .bb and .inc
The split is no longer necessary, and only makes it more complicated to do changes in external layers. (From OE-Core rev: aea82066eb3ba67c1d3a170112ff3bb324b43dfb) Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> 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.inc170
-rw-r--r--meta/recipes-core/dbus/dbus_1.8.20.bb171
2 files changed, 170 insertions, 171 deletions
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
deleted file mode 100644
index 3971081fd1..0000000000
--- a/meta/recipes-core/dbus/dbus.inc
+++ /dev/null
@@ -1,170 +0,0 @@
1SUMMARY = "D-Bus message bus"
2DESCRIPTION = "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."
3HOMEPAGE = "http://dbus.freedesktop.org"
4SECTION = "base"
5LICENSE = "AFL-2 | GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
7 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8DEPENDS = "expat virtual/libintl"
9RDEPENDS_dbus_class-native = ""
10RDEPENDS_dbus_class-nativesdk = ""
11PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
12ALLOW_EMPTY_dbus-ptest = "1"
13RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
14
15SRC_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"
21
22inherit useradd autotools pkgconfig gettext update-rc.d
23
24INITSCRIPT_NAME = "dbus-1"
25INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
26
27python __anonymous() {
28 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
29 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
30}
31
32USERADD_PACKAGES = "${PN}"
33GROUPADD_PARAM_${PN} = "-r netdev"
34USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
35 --no-create-home --shell /bin/false \
36 --user-group messagebus"
37
38CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
39
40DEBIANNAME_${PN} = "dbus-1"
41
42PACKAGES =+ "${PN}-lib"
43
44OLDPKGNAME = "dbus-x11"
45OLDPKGNAME_class-nativesdk = ""
46
47# for compatibility
48RPROVIDES_${PN} = "${OLDPKGNAME}"
49RREPLACES_${PN} += "${OLDPKGNAME}"
50
51FILES_${PN} = "${bindir}/dbus-daemon* \
52 ${bindir}/dbus-uuidgen \
53 ${bindir}/dbus-cleanup-sockets \
54 ${bindir}/dbus-send \
55 ${bindir}/dbus-monitor \
56 ${bindir}/dbus-launch \
57 ${bindir}/dbus-run-session \
58 ${libexecdir}/dbus* \
59 ${sysconfdir} \
60 ${localstatedir} \
61 ${datadir}/dbus-1/services \
62 ${datadir}/dbus-1/system-services \
63 ${systemd_unitdir}/system/"
64FILES_${PN}-lib = "${libdir}/lib*.so.*"
65RRECOMMENDS_${PN}-lib = "${PN}"
66FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
67
68pkg_postinst_dbus() {
69 # If both systemd and sysvinit are enabled, mask the dbus-1 init script
70 if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
71 if [ -n "$D" ]; then
72 OPTS="--root=$D"
73 fi
74 systemctl $OPTS mask dbus-1.service
75 fi
76
77 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
78 /etc/init.d/populate-volatile.sh update
79 fi
80}
81
82EXTRA_OECONF = "--disable-tests \
83 --disable-xml-docs \
84 --disable-doxygen-docs \
85 --disable-libaudit \
86 --disable-systemd \
87 --without-dbus-glib"
88
89EXTRA_OECONF_append_class-native = " --disable-selinux"
90
91PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
92 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
93PACKAGECONFIG_class-native = ""
94PACKAGECONFIG_class-nativesdk = ""
95
96# Would like to --enable-systemd but that's a circular build-dependency between
97# systemd<->dbus
98PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
99PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
100
101do_install() {
102 autotools_do_install
103
104 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
105 install -d ${D}${sysconfdir}/init.d
106 sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
107 install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
108 fi
109
110 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
111 for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
112 install -d ${D}${systemd_unitdir}/system/$i; done
113 install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_unitdir}/system/
114 cd ${D}${systemd_unitdir}/system/dbus.target.wants/
115 ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/dbus.target.wants/dbus.socket
116 ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/sockets.target.wants/dbus.socket
117 ln -fs ../dbus.service ${D}${systemd_unitdir}/system/multi-user.target.wants/dbus.service
118 fi
119
120 install -d ${D}${sysconfdir}/default/volatiles
121 echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
122 > ${D}${sysconfdir}/default/volatiles/99_dbus
123
124
125 mkdir -p ${D}${localstatedir}/lib/dbus
126
127 chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
128
129 chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
130 chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
131
132 # Remove Red Hat initscript
133 rm -rf ${D}${sysconfdir}/rc.d
134
135 # Remove empty testexec directory as we don't build tests
136 rm -rf ${D}${libdir}/dbus-1.0/test
137
138 # Remove /var/run as it is created on startup
139 rm -rf ${D}${localstatedir}/run
140}
141
142do_install_class-native() {
143 autotools_do_install
144
145 # for dbus-glib-native introspection generation
146 install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
147 # N.B. is below install actually required?
148 install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
149
150 # dbus-glib-native and dbus-glib need this xml file
151 ./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
152
153 # dbus-launch has no X support so lets not install it in case the host
154 # has a more featured and useful version
155 rm -f ${D}${bindir}/dbus-launch
156}
157
158do_install_class-nativesdk() {
159 autotools_do_install
160
161 # dbus-launch has no X support so lets not install it in case the host
162 # has a more featured and useful version
163 rm -f ${D}${bindir}/dbus-launch
164
165 # Remove /var/run to avoid QA error
166 rm -rf ${D}${localstatedir}/run
167}
168BBCLASSEXTEND = "native nativesdk"
169
170INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/meta/recipes-core/dbus/dbus_1.8.20.bb b/meta/recipes-core/dbus/dbus_1.8.20.bb
index a8f2094ea6..207a018c25 100644
--- a/meta/recipes-core/dbus/dbus_1.8.20.bb
+++ b/meta/recipes-core/dbus/dbus_1.8.20.bb
@@ -1,4 +1,173 @@
1include dbus.inc 1SUMMARY = "D-Bus message bus"
2DESCRIPTION = "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."
3HOMEPAGE = "http://dbus.freedesktop.org"
4SECTION = "base"
5LICENSE = "AFL-2 | GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
7 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8DEPENDS = "expat virtual/libintl"
9RDEPENDS_dbus_class-native = ""
10RDEPENDS_dbus_class-nativesdk = ""
11PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
12ALLOW_EMPTY_dbus-ptest = "1"
13RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
14
15SRC_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"
2 21
3SRC_URI[md5sum] = "b49890bbabedab3a1c3f4f73c7ff8b2b" 22SRC_URI[md5sum] = "b49890bbabedab3a1c3f4f73c7ff8b2b"
4SRC_URI[sha256sum] = "5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a" 23SRC_URI[sha256sum] = "5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a"
24
25inherit useradd autotools pkgconfig gettext update-rc.d
26
27INITSCRIPT_NAME = "dbus-1"
28INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
29
30python __anonymous() {
31 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
32 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
33}
34
35USERADD_PACKAGES = "${PN}"
36GROUPADD_PARAM_${PN} = "-r netdev"
37USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
38 --no-create-home --shell /bin/false \
39 --user-group messagebus"
40
41CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
42
43DEBIANNAME_${PN} = "dbus-1"
44
45PACKAGES =+ "${PN}-lib"
46
47OLDPKGNAME = "dbus-x11"
48OLDPKGNAME_class-nativesdk = ""
49
50# for compatibility
51RPROVIDES_${PN} = "${OLDPKGNAME}"
52RREPLACES_${PN} += "${OLDPKGNAME}"
53
54FILES_${PN} = "${bindir}/dbus-daemon* \
55 ${bindir}/dbus-uuidgen \
56 ${bindir}/dbus-cleanup-sockets \
57 ${bindir}/dbus-send \
58 ${bindir}/dbus-monitor \
59 ${bindir}/dbus-launch \
60 ${bindir}/dbus-run-session \
61 ${libexecdir}/dbus* \
62 ${sysconfdir} \
63 ${localstatedir} \
64 ${datadir}/dbus-1/services \
65 ${datadir}/dbus-1/system-services \
66 ${systemd_unitdir}/system/"
67FILES_${PN}-lib = "${libdir}/lib*.so.*"
68RRECOMMENDS_${PN}-lib = "${PN}"
69FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
70
71pkg_postinst_dbus() {
72 # If both systemd and sysvinit are enabled, mask the dbus-1 init script
73 if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
74 if [ -n "$D" ]; then
75 OPTS="--root=$D"
76 fi
77 systemctl $OPTS mask dbus-1.service
78 fi
79
80 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
81 /etc/init.d/populate-volatile.sh update
82 fi
83}
84
85EXTRA_OECONF = "--disable-tests \
86 --disable-xml-docs \
87 --disable-doxygen-docs \
88 --disable-libaudit \
89 --disable-systemd \
90 --without-dbus-glib"
91
92EXTRA_OECONF_append_class-native = " --disable-selinux"
93
94PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
95 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
96PACKAGECONFIG_class-native = ""
97PACKAGECONFIG_class-nativesdk = ""
98
99# Would like to --enable-systemd but that's a circular build-dependency between
100# systemd<->dbus
101PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
102PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
103
104do_install() {
105 autotools_do_install
106
107 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
108 install -d ${D}${sysconfdir}/init.d
109 sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
110 install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
111 fi
112
113 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
114 for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
115 install -d ${D}${systemd_unitdir}/system/$i; done
116 install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_unitdir}/system/
117 cd ${D}${systemd_unitdir}/system/dbus.target.wants/
118 ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/dbus.target.wants/dbus.socket
119 ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/sockets.target.wants/dbus.socket
120 ln -fs ../dbus.service ${D}${systemd_unitdir}/system/multi-user.target.wants/dbus.service
121 fi
122
123 install -d ${D}${sysconfdir}/default/volatiles
124 echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
125 > ${D}${sysconfdir}/default/volatiles/99_dbus
126
127
128 mkdir -p ${D}${localstatedir}/lib/dbus
129
130 chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
131
132 chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
133 chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
134
135 # Remove Red Hat initscript
136 rm -rf ${D}${sysconfdir}/rc.d
137
138 # Remove empty testexec directory as we don't build tests
139 rm -rf ${D}${libdir}/dbus-1.0/test
140
141 # Remove /var/run as it is created on startup
142 rm -rf ${D}${localstatedir}/run
143}
144
145do_install_class-native() {
146 autotools_do_install
147
148 # for dbus-glib-native introspection generation
149 install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
150 # N.B. is below install actually required?
151 install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
152
153 # dbus-glib-native and dbus-glib need this xml file
154 ./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
155
156 # dbus-launch has no X support so lets not install it in case the host
157 # has a more featured and useful version
158 rm -f ${D}${bindir}/dbus-launch
159}
160
161do_install_class-nativesdk() {
162 autotools_do_install
163
164 # dbus-launch has no X support so lets not install it in case the host
165 # has a more featured and useful version
166 rm -f ${D}${bindir}/dbus-launch
167
168 # Remove /var/run to avoid QA error
169 rm -rf ${D}${localstatedir}/run
170}
171BBCLASSEXTEND = "native nativesdk"
172
173INSANE_SKIP_${PN}-ptest += "build-deps"