summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus/dbus_1.16.2.bb
diff options
context:
space:
mode:
authorWang Mingyu <wangmy@fujitsu.com>2025-03-04 17:08:47 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-06 11:16:46 +0000
commit69ec94eafa7131d8d0c1a20108a4d8435c9933d7 (patch)
tree3124b51581497eca2ee4f5b59f90897c94f3aad5 /meta/recipes-core/dbus/dbus_1.16.2.bb
parentdd07877cca4e7bb6cbc836ee7f01c04d3153f55b (diff)
downloadpoky-69ec94eafa7131d8d0c1a20108a4d8435c9933d7.tar.gz
dbus: upgrade 1.16.0 -> 1.16.2
Changelog: =========== - The branch used for development releases has been renamed to 'main'. - On Linux, fix build regression with libselinux >= 3.8 and verbose mode enabled - Documentation updates (From OE-Core rev: 2329ff73279299c3243f9773641bdbe9ccf19799) Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/dbus/dbus_1.16.2.bb')
-rw-r--r--meta/recipes-core/dbus/dbus_1.16.2.bb191
1 files changed, 191 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus_1.16.2.bb b/meta/recipes-core/dbus/dbus_1.16.2.bb
new file mode 100644
index 0000000000..9475e55b57
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus_1.16.2.bb
@@ -0,0 +1,191 @@
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 = "https://dbus.freedesktop.org"
4SECTION = "base"
5
6inherit meson pkgconfig gettext upstream-version-is-even ptest-gnome
7
8LICENSE = "AFL-2.1 | GPL-2.0-or-later"
9LIC_FILES_CHKSUM = "file://COPYING;md5=eb0ffc69a965797a3d6686baa153ef05 \
10 file://dbus/dbus.h;beginline=6;endline=22;md5=df4251a6c6e15e6a9e3c77b2ac30065d \
11 "
12
13SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.xz \
14 file://run-ptest \
15 file://dbus-1.init \
16 "
17
18SRC_URI[sha256sum] = "0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2"
19
20EXTRA_OEMESON = "-Dxml_docs=disabled \
21 -Ddoxygen_docs=disabled \
22 -Dsystem_socket=/run/dbus/system_bus_socket \
23 -Dmodular_tests=enabled \
24 -Dchecks=true \
25 -Druntime_dir=${runtimedir} \
26 -Dtest_socket_dir=/tmp \
27 -Dsession_socket_dir=/tmp \
28 "
29
30PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
31 user-session \
32 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
33 "
34PACKAGECONFIG:class-native = ""
35PACKAGECONFIG:class-nativesdk = ""
36
37PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd_system_unitdir=${systemd_system_unitdir},-Dsystemd=disabled,systemd"
38PACKAGECONFIG[x11] = "-Dx11_autolaunch=enabled,-Dx11_autolaunch=disabled, virtual/libx11 libsm"
39PACKAGECONFIG[user-session] = "-Duser_session=true -Dsystemd_user_unitdir=${systemd_user_unitdir},-Duser_session=false"
40PACKAGECONFIG[verbose-mode] = "-Dverbose_mode=true,-Dverbose_mode=false,,"
41PACKAGECONFIG[audit] = "-Dlibaudit=enabled,-Dlibaudit=disabled,audit"
42PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux"
43PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false"
44
45DEPENDS = "expat virtual/libintl autoconf-archive-native glib-2.0"
46RDEPENDS:${PN} += "${PN}-common ${PN}-tools"
47RDEPENDS:${PN}:class-native = ""
48
49inherit useradd update-rc.d
50
51INITSCRIPT_NAME = "dbus-1"
52INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
53
54python __anonymous() {
55 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
56 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
57}
58
59PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools"
60
61USERADD_PACKAGES = "dbus-common"
62USERADD_PARAM:dbus-common = "--system --home ${localstatedir}/lib/dbus \
63 --no-create-home --shell /bin/false \
64 --user-group messagebus"
65
66CONFFILES:${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
67
68DEBIANNAME:${PN} = "dbus-1"
69
70OLDPKGNAME = "dbus-x11"
71OLDPKGNAME:class-nativesdk = ""
72
73# for compatibility
74RPROVIDES:${PN} = "${OLDPKGNAME}"
75RREPLACES:${PN} += "${OLDPKGNAME}"
76
77FILES:${PN} = "${bindir}/dbus-daemon* \
78 ${bindir}/dbus-cleanup-sockets \
79 ${bindir}/dbus-launch \
80 ${bindir}/dbus-run-session \
81 ${libexecdir}/dbus* \
82 ${sysconfdir} \
83 ${localstatedir} \
84 ${systemd_system_unitdir} \
85 ${systemd_user_unitdir} \
86 ${nonarch_libdir}/tmpfiles.d/dbus.conf \
87"
88FILES:${PN}-common = "${sysconfdir}/dbus-1 \
89 ${datadir}/dbus-1/services \
90 ${datadir}/dbus-1/system-services \
91 ${datadir}/dbus-1/session.d \
92 ${datadir}/dbus-1/session.conf \
93 ${datadir}/dbus-1/system.d \
94 ${datadir}/dbus-1/system.conf \
95 ${systemd_system_unitdir}/dbus.socket \
96 ${systemd_system_unitdir}/sockets.target.wants \
97 ${systemd_user_unitdir}/dbus.socket \
98 ${systemd_user_unitdir}/sockets.target.wants \
99 ${nonarch_libdir}/sysusers.d/dbus.conf \
100"
101FILES:${PN}-tools = "${bindir}/dbus-uuidgen \
102 ${bindir}/dbus-send \
103 ${bindir}/dbus-monitor \
104 ${bindir}/dbus-update-activation-environment \
105"
106FILES:${PN}-lib = "${libdir}/lib*.so.*"
107RRECOMMENDS:${PN}-lib = "${PN}"
108FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
109
110RDEPENDS:${PN}-ptest += "bash make dbus"
111
112PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
113pkg_postinst:dbus() {
114 # If both systemd and sysvinit are enabled, mask the dbus-1 init script
115 if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
116 if [ -n "$D" ]; then
117 OPTS="--root=$D"
118 fi
119 systemctl $OPTS mask dbus-1.service
120 fi
121
122 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
123 /etc/init.d/populate-volatile.sh update
124 fi
125}
126
127# dbus uses find_program() to find systemctl, which results in a build path in the
128# user dbus.socket
129EXTRA_OEMESON:append:class-target = " --cross-file=${WORKDIR}/dbus.cross"
130
131do_configure:prepend:class-target() {
132 cat >${WORKDIR}/dbus.cross <<EOF
133[binaries]
134systemctl = '${bindir}/systemctl'
135EOF
136}
137
138do_install:append:class-target() {
139 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
140 install -d ${D}${sysconfdir}/init.d
141 sed 's:@bindir@:${bindir}:' < ${UNPACKDIR}/dbus-1.init > ${S}/dbus-1.init.sh
142 install -m 0755 ${S}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
143 install -d ${D}${sysconfdir}/default/volatiles
144 echo "d messagebus messagebus 0755 /run/dbus none" \
145 > ${D}${sysconfdir}/default/volatiles/99_dbus
146 fi
147
148 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
149 for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
150 install -d ${D}${systemd_system_unitdir}/$i; done
151 install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
152 ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
153 ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
154 ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
155 fi
156
157
158 mkdir -p ${D}${localstatedir}/lib/dbus
159
160 chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
161
162 chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
163 chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
164
165 # Remove Red Hat initscript
166 rm -rf ${D}${sysconfdir}/rc.d
167
168 # Remove empty testexec directory as we don't build tests
169 rm -rf ${D}${libdir}/dbus-1.0/test
170
171 # Remove /run as it is created on startup
172 rm -rf ${D}${runtimedir}
173}
174
175do_install:append:class-native() {
176 # dbus-launch has no X support so lets not install it in case the host
177 # has a more featured and useful version
178 rm -f ${D}${bindir}/dbus-launch
179}
180
181do_install:append:class-nativesdk() {
182 # dbus-launch has no X support so lets not install it in case the host
183 # has a more featured and useful version
184 rm -f ${D}${bindir}/dbus-launch
185
186 # Remove /run to avoid QA error
187 rm -rf ${D}${runtimedir}
188}
189BBCLASSEXTEND = "native nativesdk"
190
191CVE_PRODUCT += "d-bus_project:d-bus freedesktop:dbus freedesktop:libdbus"