diff options
Diffstat (limited to 'meta/recipes-core/dbus/dbus_1.14.10.bb')
-rw-r--r-- | meta/recipes-core/dbus/dbus_1.14.10.bb | 186 |
1 files changed, 186 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus_1.14.10.bb b/meta/recipes-core/dbus/dbus_1.14.10.bb new file mode 100644 index 0000000000..6a08f6984e --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.14.10.bb | |||
@@ -0,0 +1,186 @@ | |||
1 | SUMMARY = "D-Bus message bus" | ||
2 | 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." | ||
3 | HOMEPAGE = "https://dbus.freedesktop.org" | ||
4 | SECTION = "base" | ||
5 | |||
6 | inherit autotools pkgconfig gettext upstream-version-is-even ptest-gnome | ||
7 | |||
8 | LICENSE = "AFL-2.1 | GPL-2.0-or-later" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=6423dcd74d7be9715b0db247fd889da3 \ | ||
10 | file://dbus/dbus.h;beginline=6;endline=20;md5=866739837ccd835350af94dccd6457d8 \ | ||
11 | " | ||
12 | |||
13 | SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.xz \ | ||
14 | file://run-ptest \ | ||
15 | file://tmpdir.patch \ | ||
16 | file://dbus-1.init \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[sha256sum] = "ba1f21d2bd9d339da2d4aa8780c09df32fea87998b73da24f49ab9df1e36a50f" | ||
20 | |||
21 | EXTRA_OECONF = "--disable-xml-docs \ | ||
22 | --disable-doxygen-docs \ | ||
23 | --enable-largefile \ | ||
24 | --with-system-socket=/run/dbus/system_bus_socket \ | ||
25 | --enable-modular-tests \ | ||
26 | --enable-checks \ | ||
27 | --runstatedir=/run \ | ||
28 | " | ||
29 | EXTRA_OECONF:append:class-target = " SYSTEMCTL=${base_bindir}/systemctl" | ||
30 | |||
31 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ | ||
32 | user-session \ | ||
33 | " | ||
34 | PACKAGECONFIG:class-native = "" | ||
35 | PACKAGECONFIG:class-nativesdk = "" | ||
36 | |||
37 | PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd" | ||
38 | PACKAGECONFIG[x11] = "--enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" | ||
39 | PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session" | ||
40 | PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,," | ||
41 | PACKAGECONFIG[audit] = "--enable-libaudit,--disable-libaudit,audit" | ||
42 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
43 | |||
44 | DEPENDS = "expat virtual/libintl autoconf-archive-native glib-2.0" | ||
45 | RDEPENDS:${PN} += "${PN}-common ${PN}-tools" | ||
46 | RDEPENDS:${PN}:class-native = "" | ||
47 | |||
48 | inherit useradd update-rc.d | ||
49 | |||
50 | INITSCRIPT_NAME = "dbus-1" | ||
51 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." | ||
52 | |||
53 | python __anonymous() { | ||
54 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
55 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
56 | } | ||
57 | |||
58 | PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools" | ||
59 | |||
60 | USERADD_PACKAGES = "dbus-common" | ||
61 | USERADD_PARAM:dbus-common = "--system --home ${localstatedir}/lib/dbus \ | ||
62 | --no-create-home --shell /bin/false \ | ||
63 | --user-group messagebus" | ||
64 | |||
65 | CONFFILES:${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" | ||
66 | |||
67 | DEBIANNAME:${PN} = "dbus-1" | ||
68 | |||
69 | OLDPKGNAME = "dbus-x11" | ||
70 | OLDPKGNAME:class-nativesdk = "" | ||
71 | |||
72 | # for compatibility | ||
73 | RPROVIDES:${PN} = "${OLDPKGNAME}" | ||
74 | RREPLACES:${PN} += "${OLDPKGNAME}" | ||
75 | |||
76 | FILES:${PN} = "${bindir}/dbus-daemon* \ | ||
77 | ${bindir}/dbus-cleanup-sockets \ | ||
78 | ${bindir}/dbus-launch \ | ||
79 | ${bindir}/dbus-run-session \ | ||
80 | ${libexecdir}/dbus* \ | ||
81 | ${sysconfdir} \ | ||
82 | ${localstatedir} \ | ||
83 | ${systemd_system_unitdir} \ | ||
84 | ${systemd_user_unitdir} \ | ||
85 | ${nonarch_libdir}/tmpfiles.d/dbus.conf \ | ||
86 | " | ||
87 | FILES:${PN}-common = "${sysconfdir}/dbus-1 \ | ||
88 | ${datadir}/dbus-1/services \ | ||
89 | ${datadir}/dbus-1/system-services \ | ||
90 | ${datadir}/dbus-1/session.d \ | ||
91 | ${datadir}/dbus-1/session.conf \ | ||
92 | ${datadir}/dbus-1/system.d \ | ||
93 | ${datadir}/dbus-1/system.conf \ | ||
94 | ${systemd_system_unitdir}/dbus.socket \ | ||
95 | ${systemd_system_unitdir}/sockets.target.wants \ | ||
96 | ${systemd_user_unitdir}/dbus.socket \ | ||
97 | ${systemd_user_unitdir}/sockets.target.wants \ | ||
98 | ${nonarch_libdir}/sysusers.d/dbus.conf \ | ||
99 | " | ||
100 | FILES:${PN}-tools = "${bindir}/dbus-uuidgen \ | ||
101 | ${bindir}/dbus-send \ | ||
102 | ${bindir}/dbus-monitor \ | ||
103 | ${bindir}/dbus-update-activation-environment \ | ||
104 | " | ||
105 | FILES:${PN}-lib = "${libdir}/lib*.so.*" | ||
106 | RRECOMMENDS:${PN}-lib = "${PN}" | ||
107 | FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1" | ||
108 | |||
109 | RDEPENDS:${PN}-ptest += "bash make dbus" | ||
110 | |||
111 | PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" | ||
112 | pkg_postinst:dbus() { | ||
113 | # If both systemd and sysvinit are enabled, mask the dbus-1 init script | ||
114 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then | ||
115 | if [ -n "$D" ]; then | ||
116 | OPTS="--root=$D" | ||
117 | fi | ||
118 | systemctl $OPTS mask dbus-1.service | ||
119 | fi | ||
120 | |||
121 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
122 | /etc/init.d/populate-volatile.sh update | ||
123 | fi | ||
124 | } | ||
125 | |||
126 | |||
127 | do_install() { | ||
128 | autotools_do_install | ||
129 | |||
130 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
131 | install -d ${D}${sysconfdir}/init.d | ||
132 | sed 's:@bindir@:${bindir}:' < ${UNPACKDIR}/dbus-1.init > ${S}/dbus-1.init.sh | ||
133 | install -m 0755 ${S}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 | ||
134 | install -d ${D}${sysconfdir}/default/volatiles | ||
135 | echo "d messagebus messagebus 0755 /run/dbus none" \ | ||
136 | > ${D}${sysconfdir}/default/volatiles/99_dbus | ||
137 | fi | ||
138 | |||
139 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
140 | for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \ | ||
141 | install -d ${D}${systemd_system_unitdir}/$i; done | ||
142 | install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/ | ||
143 | ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket | ||
144 | ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket | ||
145 | ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service | ||
146 | fi | ||
147 | |||
148 | |||
149 | mkdir -p ${D}${localstatedir}/lib/dbus | ||
150 | |||
151 | chown messagebus:messagebus ${D}${localstatedir}/lib/dbus | ||
152 | |||
153 | chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper | ||
154 | chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper | ||
155 | |||
156 | # Remove Red Hat initscript | ||
157 | rm -rf ${D}${sysconfdir}/rc.d | ||
158 | |||
159 | # Remove empty testexec directory as we don't build tests | ||
160 | rm -rf ${D}${libdir}/dbus-1.0/test | ||
161 | |||
162 | # Remove /var/run as it is created on startup | ||
163 | rm -rf ${D}${localstatedir}/run | ||
164 | } | ||
165 | |||
166 | do_install:class-native() { | ||
167 | autotools_do_install | ||
168 | |||
169 | # dbus-launch has no X support so lets not install it in case the host | ||
170 | # has a more featured and useful version | ||
171 | rm -f ${D}${bindir}/dbus-launch | ||
172 | } | ||
173 | |||
174 | do_install:class-nativesdk() { | ||
175 | autotools_do_install | ||
176 | |||
177 | # dbus-launch has no X support so lets not install it in case the host | ||
178 | # has a more featured and useful version | ||
179 | rm -f ${D}${bindir}/dbus-launch | ||
180 | |||
181 | # Remove /var/run to avoid QA error | ||
182 | rm -rf ${D}${localstatedir}/run | ||
183 | } | ||
184 | BBCLASSEXTEND = "native nativesdk" | ||
185 | |||
186 | CVE_PRODUCT += "d-bus_project:d-bus freedesktop:dbus freedesktop:libdbus" | ||