Skip to content

Commit

Permalink
dbus: update to 1.16.0 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-a-r0ni authored Dec 26, 2024
1 parent 0980026 commit 2d1c514
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 57 deletions.
21 changes: 15 additions & 6 deletions dbus/.footprint
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ drwxr-xr-x root/root usr/lib/dbus-1.0/include/
drwxr-xr-x root/root usr/lib/dbus-1.0/include/dbus/
-rw-r--r-- root/root usr/lib/dbus-1.0/include/dbus/dbus-arch-deps.h
drwxr-xr-x root/root usr/lib/dbus/
-rwsr-x--- root/messagebus usr/lib/dbus/dbus-daemon-launch-helper
-rw-r--r-- root/root usr/lib/libdbus-1.a
-rwxr-xr-x root/root usr/lib/libdbus-1.la
lrwxrwxrwx root/root usr/lib/libdbus-1.so -> libdbus-1.so.3.32.4
lrwxrwxrwx root/root usr/lib/libdbus-1.so.3 -> libdbus-1.so.3.32.4
-rwxr-xr-x root/root usr/lib/libdbus-1.so.3.32.4
---s--x--- root/messagebus usr/lib/dbus/dbus-daemon-launch-helper
lrwxrwxrwx root/root usr/lib/libdbus-1.so -> libdbus-1.so.3
lrwxrwxrwx root/root usr/lib/libdbus-1.so.3 -> libdbus-1.so.3.38.3
-rwxr-xr-x root/root usr/lib/libdbus-1.so.3.38.3
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/dbus-1.pc
drwxr-xr-x root/root usr/sbin/
Expand All @@ -66,6 +64,17 @@ drwxr-xr-x root/root usr/share/dbus-1/session.d/
drwxr-xr-x root/root usr/share/dbus-1/system-services/
-rw-r--r-- root/root usr/share/dbus-1/system.conf
drwxr-xr-x root/root usr/share/dbus-1/system.d/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man1/
-rw-r--r-- root/root usr/share/man/man1/dbus-cleanup-sockets.1.gz
-rw-r--r-- root/root usr/share/man/man1/dbus-daemon.1.gz
-rw-r--r-- root/root usr/share/man/man1/dbus-launch.1.gz
-rw-r--r-- root/root usr/share/man/man1/dbus-monitor.1.gz
-rw-r--r-- root/root usr/share/man/man1/dbus-run-session.1.gz
-rw-r--r-- root/root usr/share/man/man1/dbus-send.1.gz
-rw-r--r-- root/root usr/share/man/man1/dbus-test-tool.1.gz
-rw-r--r-- root/root usr/share/man/man1/dbus-update-activation-environment.1.gz
-rw-r--r-- root/root usr/share/man/man1/dbus-uuidgen.1.gz
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/lib/
drwxr-xr-x root/root var/lib/dbus/
47 changes: 25 additions & 22 deletions dbus/Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,36 @@
# Depends on: expat

name=dbus
version=1.14.10
version=1.16.0
release=1
source=(https://dbus.freedesktop.org/releases/dbus/$name-$version.tar.xz
rc.dbus 30-dbus.launch)
fix-daemon-location.patch
rc.dbus 30-dbus.launch)

build() {
cd $name-$version
patch -Np1 -d $name-$version -i $SRC/fix-daemon-location.patch
meson setup $name-$version build \
--prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--libexecdir=lib/dbus \
--buildtype=plain \
--wrap-mode nodownload \
-D b_lto=true \
-D b_pie=true \
-D dbus_daemondir=/usr/sbin \
-D dbus_user=messagebus \
-D runtime_dir=/run \
-D system_pid_file=/run/dbus/pid \
-D system_socket=/run/dbus/system_bus_socket

./configure \
--prefix=/usr \
--with-dbus-daemondir=/usr/sbin \
--localstatedir=/var \
--runstatedir=/run \
--sysconfdir=/etc \
--libexecdir=/usr/lib/dbus \
--with-dbus-user=messagebus \
--with-init-scripts=none \
--with-system-pid-file=/run/dbus/pid \
--with-system-socket=/run/dbus/system_bus_socket
meson compile -C build
DESTDIR=$PKG meson install -C build

make
make DESTDIR=$PKG install
install -D -m 0755 $SRC/rc.dbus $PKG/etc/rc.d/dbus
install -D -m 0755 $SRC/30-dbus.launch \
$PKG/etc/X11/xinit/xinitrc.d/30-dbus.launch.sh

install -D -m 0755 $SRC/rc.dbus $PKG/etc/rc.d/dbus
install -D -m 0755 $SRC/30-dbus.launch \
$PKG/etc/X11/xinit/xinitrc.d/30-dbus.launch.sh

rm -r $PKG/usr/share/doc $PKG/var/run
rm -rf $PKG/usr/share/xml
rm -r $PKG/usr/share/doc $PKG/run
rm -rf $PKG/usr/share/xml
}
11 changes: 11 additions & 0 deletions dbus/fix-daemon-location.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -Naur dbus-1.16.0.orig/bus/meson.build dbus-1.16.0/bus/meson.build
--- dbus-1.16.0.orig/bus/meson.build 2024-12-24 01:25:30.856267635 +0100
+++ dbus-1.16.0/bus/meson.build 2024-12-24 01:28:28.098900906 +0100
@@ -139,6 +139,7 @@
include_directories: root_include,
link_with: libdbus_daemon_internal,
install: true,
+ install_dir: get_option('dbus_daemondir'),
)


61 changes: 32 additions & 29 deletions dbus/rc.dbus
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,39 @@

SSD=/sbin/start-stop-daemon
PROG=/usr/sbin/dbus-daemon
PID=/run/dbus/dbus.pid
PID=/run/dbus/pid
OPTS="--system"

case $1 in
start)
if [ ! -f /var/lib/dbus/machine-id ]
then
/usr/bin/dbus-uuidgen --ensure
fi
mkdir -p /run/dbus
$SSD --start --pidfile=$PID --exec $PROG -- $OPTS
;;
stop)
$SSD --stop --remove-pidfile --retry 10 --pidfile=$PID
;;
restart)
$0 stop
$0 start
;;
status)
$SSD --status --exec $PROG
case $? in
0) echo "$PROG is running with pid $(cat $PID)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
*)
echo "usage: $0 [start|stop|restart|status]"
;;
esac
start)
if [ ! -f /var/lib/dbus/machine-id ]
then
/usr/bin/dbus-uuidgen --ensure
fi
mkdir -p /run/dbus
$SSD --start --pidfile=$PID --exec $PROG -- $OPTS
;;

stop)
$SSD --stop --remove-pidfile --retry 10 --pidfile=$PID
;;

restart)
$0 stop
$0 start
;;

status)
$SSD --status --exec $PROG
case $? in
0) echo "$PROG is running with pid $(cat $PID)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;

*)
echo "usage: $0 [start|stop|restart|status]"
;;
esac

0 comments on commit 2d1c514

Please sign in to comment.