diff options
| author | Wang Mingyu <wangmy@fujitsu.com> | 2025-03-04 17:08:47 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-06 11:16:46 +0000 |
| commit | 69ec94eafa7131d8d0c1a20108a4d8435c9933d7 (patch) | |
| tree | 3124b51581497eca2ee4f5b59f90897c94f3aad5 /meta/recipes-core/dbus/dbus_1.16.2.bb | |
| parent | dd07877cca4e7bb6cbc836ee7f01c04d3153f55b (diff) | |
| download | poky-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.bb | 191 |
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 @@ | |||
| 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 meson 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=eb0ffc69a965797a3d6686baa153ef05 \ | ||
| 10 | file://dbus/dbus.h;beginline=6;endline=22;md5=df4251a6c6e15e6a9e3c77b2ac30065d \ | ||
| 11 | " | ||
| 12 | |||
| 13 | SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.xz \ | ||
| 14 | file://run-ptest \ | ||
| 15 | file://dbus-1.init \ | ||
| 16 | " | ||
| 17 | |||
| 18 | SRC_URI[sha256sum] = "0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2" | ||
| 19 | |||
| 20 | EXTRA_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 | |||
| 30 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ | ||
| 31 | user-session \ | ||
| 32 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ | ||
| 33 | " | ||
| 34 | PACKAGECONFIG:class-native = "" | ||
| 35 | PACKAGECONFIG:class-nativesdk = "" | ||
| 36 | |||
| 37 | PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd_system_unitdir=${systemd_system_unitdir},-Dsystemd=disabled,systemd" | ||
| 38 | PACKAGECONFIG[x11] = "-Dx11_autolaunch=enabled,-Dx11_autolaunch=disabled, virtual/libx11 libsm" | ||
| 39 | PACKAGECONFIG[user-session] = "-Duser_session=true -Dsystemd_user_unitdir=${systemd_user_unitdir},-Duser_session=false" | ||
| 40 | PACKAGECONFIG[verbose-mode] = "-Dverbose_mode=true,-Dverbose_mode=false,," | ||
| 41 | PACKAGECONFIG[audit] = "-Dlibaudit=enabled,-Dlibaudit=disabled,audit" | ||
| 42 | PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" | ||
| 43 | PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" | ||
| 44 | |||
| 45 | DEPENDS = "expat virtual/libintl autoconf-archive-native glib-2.0" | ||
| 46 | RDEPENDS:${PN} += "${PN}-common ${PN}-tools" | ||
| 47 | RDEPENDS:${PN}:class-native = "" | ||
| 48 | |||
| 49 | inherit useradd update-rc.d | ||
| 50 | |||
| 51 | INITSCRIPT_NAME = "dbus-1" | ||
| 52 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." | ||
| 53 | |||
| 54 | python __anonymous() { | ||
| 55 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
| 56 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
| 57 | } | ||
| 58 | |||
| 59 | PACKAGES =+ "${PN}-lib ${PN}-common ${PN}-tools" | ||
| 60 | |||
| 61 | USERADD_PACKAGES = "dbus-common" | ||
| 62 | USERADD_PARAM:dbus-common = "--system --home ${localstatedir}/lib/dbus \ | ||
| 63 | --no-create-home --shell /bin/false \ | ||
| 64 | --user-group messagebus" | ||
| 65 | |||
| 66 | CONFFILES:${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" | ||
| 67 | |||
| 68 | DEBIANNAME:${PN} = "dbus-1" | ||
| 69 | |||
| 70 | OLDPKGNAME = "dbus-x11" | ||
| 71 | OLDPKGNAME:class-nativesdk = "" | ||
| 72 | |||
| 73 | # for compatibility | ||
| 74 | RPROVIDES:${PN} = "${OLDPKGNAME}" | ||
| 75 | RREPLACES:${PN} += "${OLDPKGNAME}" | ||
| 76 | |||
| 77 | FILES:${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 | " | ||
| 88 | FILES:${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 | " | ||
| 101 | FILES:${PN}-tools = "${bindir}/dbus-uuidgen \ | ||
| 102 | ${bindir}/dbus-send \ | ||
| 103 | ${bindir}/dbus-monitor \ | ||
| 104 | ${bindir}/dbus-update-activation-environment \ | ||
| 105 | " | ||
| 106 | FILES:${PN}-lib = "${libdir}/lib*.so.*" | ||
| 107 | RRECOMMENDS:${PN}-lib = "${PN}" | ||
| 108 | FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1" | ||
| 109 | |||
| 110 | RDEPENDS:${PN}-ptest += "bash make dbus" | ||
| 111 | |||
| 112 | PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" | ||
| 113 | pkg_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 | ||
| 129 | EXTRA_OEMESON:append:class-target = " --cross-file=${WORKDIR}/dbus.cross" | ||
| 130 | |||
| 131 | do_configure:prepend:class-target() { | ||
| 132 | cat >${WORKDIR}/dbus.cross <<EOF | ||
| 133 | [binaries] | ||
| 134 | systemctl = '${bindir}/systemctl' | ||
| 135 | EOF | ||
| 136 | } | ||
| 137 | |||
| 138 | do_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 | |||
| 175 | do_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 | |||
| 181 | do_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 | } | ||
| 189 | BBCLASSEXTEND = "native nativesdk" | ||
| 190 | |||
| 191 | CVE_PRODUCT += "d-bus_project:d-bus freedesktop:dbus freedesktop:libdbus" | ||
