From 572cb64dd0c5057058835911d8de63c2bfa2a3d4 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 19 Aug 2024 01:01:44 -0500 Subject: user/dbus-sd: New package --- user/dbus-sd/APKBUILD | 70 +++++++++++++++++++++++++++++++++++++++ user/dbus-sd/dbus-sd.post-install | 3 ++ user/dbus-sd/dbus-sd.pre-install | 7 ++++ user/dbus-sd/dbus-sd.trigger | 4 +++ 4 files changed, 84 insertions(+) create mode 100644 user/dbus-sd/APKBUILD create mode 100644 user/dbus-sd/dbus-sd.post-install create mode 100644 user/dbus-sd/dbus-sd.pre-install create mode 100644 user/dbus-sd/dbus-sd.trigger diff --git a/user/dbus-sd/APKBUILD b/user/dbus-sd/APKBUILD new file mode 100644 index 000000000..ef47edc2f --- /dev/null +++ b/user/dbus-sd/APKBUILD @@ -0,0 +1,70 @@ +# Maintainer: A. Wilcox +pkgname=dbus-sd +pkgver=1.12.20 +pkgrel=0 +pkgdesc="IPC/message bus system, allowing user applications to communicate" +url="https://www.freedesktop.org/wiki/Software/dbus/" +pkggroups="messagebus" +pkgusers="messagebus" +arch="all" +options="!check" # Requires running X11 server. +license="AFL-2.1 OR GPL-2.0+" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-x11" +triggers="$pkgname.trigger=/etc/dbus-1/system.d" +depends="" +depends_dev="util-linux-dev" +makedepends="$depends_dev expat-dev libx11-dev autoconf automake libtool xmlto + libsm-dev systemd-dev" +provides="dbus=$pkgver-r$pkgrel" +replaces="dbus" +install="$pkgname.pre-install $pkgname.post-install" +source="http://dbus.freedesktop.org/releases/dbus/dbus-$pkgver.tar.gz" +builddir="$srcdir/dbus-$pkgver" + +# secfixes: +# 1.12.16-r0: +# - CVE-2019-12749 +# 1.12.18-r0: +# - CVE-2020-12049 + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-dbus-user=messagebus \ + --with-system-pid-file=/var/run/dbus.pid \ + --disable-verbose-mode \ + --disable-static \ + --enable-inotify \ + --disable-tests \ + --disable-asserts \ + --enable-user-session \ + --enable-xml-docs \ + --with-session-socket-dir=/tmp \ + --with-x + make +} + +package() { + make -j1 DESTDIR="$pkgdir" install +} + +libs() { + pkgdesc="Libraries to communicate over D-Bus" + replaces="dbus dbus-libs" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/ +} + +x11() { + pkgdesc="X11 add-ons for D-Bus" + depends="dbus-sd=$pkgver-r$pkgrel" + replaces="dbus-x11=$pkgver-r$pkgrel" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/dbus-launch "$subpkgdir"/usr/bin/ +} + +sha512sums="0964683bc6859374cc94e42e1ec0cdb542cca67971c205fcba4352500b6c0891665b0718e7d85eb060c81cb82e3346c313892bc02384da300ddd306c7eef0056 dbus-1.12.20.tar.gz" diff --git a/user/dbus-sd/dbus-sd.post-install b/user/dbus-sd/dbus-sd.post-install new file mode 100644 index 000000000..305297a48 --- /dev/null +++ b/user/dbus-sd/dbus-sd.post-install @@ -0,0 +1,3 @@ +#!/bin/sh + +exec dbus-uuidgen --ensure diff --git a/user/dbus-sd/dbus-sd.pre-install b/user/dbus-sd/dbus-sd.pre-install new file mode 100644 index 000000000..39e5464f2 --- /dev/null +++ b/user/dbus-sd/dbus-sd.pre-install @@ -0,0 +1,7 @@ +#!/bin/sh + +groupadd -r messagebus 2>/dev/null +useradd -c "D-Bus User" -s /sbin/nologin -g messagebus \ + -m -d /dev/null -r messagebus 2>/dev/null + +exit 0 diff --git a/user/dbus-sd/dbus-sd.trigger b/user/dbus-sd/dbus-sd.trigger new file mode 100644 index 000000000..a537bd8df --- /dev/null +++ b/user/dbus-sd/dbus-sd.trigger @@ -0,0 +1,4 @@ +#!/bin/sh + +dbus-send --system --type=method_call --dest=org.freedesktop.DBus / \ + org.freedesktop.DBUS.ReloadConfig >/dev/null 2>&1 || : -- cgit v1.2.3-70-g09d2