File dbus-1.patch of Package dbus-1
--- dbus-1.spec 2025-03-08 20:08:30.301279162 +0800
+++ dbus-1.spec.new 2025-03-08 20:07:13.919573518 +0800
@@ -50,16 +50,10 @@
BuildRequires: xmlto
BuildRequires: pkgconfig(libsystemd) >= 209
Requires: alts
-Requires(post): %{_libname} = %{version}
-Requires(post): /usr/bin/cmp
-Requires(pre): permissions
-Provides: dbus-launch = %{version}
%if %{with selinux}
BuildRequires: libselinux-devel
%endif
Requires: dbus-1-common >= %{version}
-# Later this should move to Recommends
-Requires: dbus-1-tools >= %{version}
Requires: dbus-broker
%package -n %{_libname}
@@ -70,12 +64,22 @@
%package common
Summary: D-BUS message bus configuration
BuildArch: noarch
+Requires(post): /usr/bin/cmp
%sysusers_requires
+%package launch
+Summary: D-Bus message bus launch helper
+Requires: dbus-1 = %{version}
+Requires: dbus-1-daemon = %{version}
+Recommends: dbus-1-tools >= %{version}
+Provides: dbus-1:%{_bindir}/dbus-launch
+
%package daemon
Summary: D-Bus message bus daemon
Provides: dbus-1:%{_bindir}/dbus-daemon
Provides: dbus-service = %{version}
+Requires(post): %{_libname} = %{version}
+Requires(pre): permissions
%package devel
Summary: Developer package for D-Bus
@@ -107,6 +111,10 @@
D-Bus is a message bus system, The dbus-common package provides the configuration and setup files for D-Bus
implementations to provide a System and User Message Bus.
+%description launch
+D-Bus is a message bus system, this package contains the original
+dbus-launch to make it easier to switch to dbus-broker
+
%description daemon
D-Bus is a message bus system, This package contains the original
dbus-daemon to make it easier to switch to dbus-broker
@@ -197,31 +205,30 @@
rm -Rf %{buildroot}%{_datadir}/doc/dbus
-%verifyscript -n dbus-1
+%verifyscript daemon
%verify_permissions -e %{_libexecdir}/dbus-1/dbus-daemon-launch-helper
%post -n %{_libname} -p /sbin/ldconfig
%postun -n %{_libname} -p /sbin/ldconfig
-%pre
-%if %{with_service}
-%service_add_pre dbus.service
-%endif
+%pre launch
# removing old update-alternatives entries
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.nox11
fi
-%post
-/sbin/ldconfig
+%post daemon
%set_permissions %{_libexecdir}/dbus-1/dbus-daemon-launch-helper
%if %{with_service}
%service_add_post dbus.service
-%preun
+%pre daemon
+%service_add_pre dbus.service
+
+%preun daemon
%service_del_preun dbus.service
-%postun
+%postun daemon
%service_del_postun_without_restart dbus.service
%endif
@@ -249,28 +256,9 @@
%service_del_postun_without_restart dbus.socket
%files
-%dir %{_libexecdir}/dbus-1/
%license COPYING
%doc AUTHORS NEWS README
-# See doc/system-activation.txt in source tarball for the rationale
-# behind these permissions
-%attr(4750,root,messagebus) %verify(not mode) %{_libexecdir}/dbus-1/dbus-daemon-launch-helper
-%if %{with_service}
-%{_unitdir}/dbus.service
-%endif
-%if %{with_service}
-%dir %{_unitdir}/multi-user.target.wants
-%{_unitdir}/multi-user.target.wants/dbus.service
-%{_userunitdir}/dbus.service
-%endif
-%dir %{_datadir}/libalternatives
-%dir %{_datadir}/libalternatives/dbus-launch
-%{_datadir}/libalternatives/dbus-launch/10.conf
-%{_bindir}/dbus-launch.nox11
-%{_bindir}/dbus-launch
-%{_mandir}/man1/dbus-launch.1%{?ext_man}
-
%files -n %{_libname}
%{_libdir}/libdbus-1.so.*
@@ -297,11 +285,31 @@
%{_unitdir}/sockets.target.wants
%{_userunitdir}/sockets.target.wants
+%files launch
+%dir %{_libexecdir}/dbus-1/
+%dir %{_datadir}/libalternatives
+%dir %{_datadir}/libalternatives/dbus-launch
+%{_datadir}/libalternatives/dbus-launch/10.conf
+%{_bindir}/dbus-launch.nox11
+%{_bindir}/dbus-launch
+%{_mandir}/man1/dbus-launch.1%{?ext_man}
+
%files daemon
%{_bindir}/dbus-cleanup-sockets
%{_bindir}/dbus-daemon
%{_bindir}/dbus-run-session
%{_bindir}/dbus-test-tool
+# See doc/system-activation.txt in source tarball for the rationale
+# behind these permissions
+%attr(4750,root,messagebus) %verify(not mode) %{_libexecdir}/dbus-1/dbus-daemon-launch-helper
+%if %{with_service}
+%{_unitdir}/dbus.service
+%endif
+%if %{with_service}
+%dir %{_unitdir}/multi-user.target.wants
+%{_unitdir}/multi-user.target.wants/dbus.service
+%{_userunitdir}/dbus.service
+%endif
%{_mandir}/man1/dbus-cleanup-sockets.1%{?ext_man}
%{_mandir}/man1/dbus-daemon.1%{?ext_man}
%{_mandir}/man1/dbus-run-session.1%{?ext_man}