dbus: extract 'dbus-common' sub-package
Create a new sub-package called 'dbus-common', extracting the XML configuration and setup files from 'dbus-daemon'. These files might be used by alternative D-Bus Messages Bus implementations, hence we want them as a separate package. This also pulls in the 'dbus' sysuser.d setup file, since this uid is referenced from the xml-configuration of the system bus. Hence, it is part of the configuration and required to be used by any compatible implementation using the official XML configurations. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
parent
1adc79b70a
commit
b3696e58df
45
dbus.spec
45
dbus.spec
@ -74,12 +74,22 @@ D-BUS is a system for sending messages between applications. It is
|
||||
used both for the system-wide message bus service, and as a
|
||||
per-user-login-session messaging facility.
|
||||
|
||||
%package common
|
||||
Summary: D-BUS message bus configuration
|
||||
Group: System Environment/Libraries
|
||||
BuildArch: noarch
|
||||
Requires(pre): /usr/sbin/useradd
|
||||
|
||||
%description common
|
||||
The %{name}-common package provides the configuration and setup files for D-Bus
|
||||
implementations to provide a System and User Message Bus.
|
||||
|
||||
%package daemon
|
||||
Summary: D-BUS message bus
|
||||
Group: System Environment/Libraries
|
||||
Requires: libselinux%{?_isa} >= %{libselinux_version}
|
||||
Requires: dbus-common = %{epoch}:%{version}-%{release}
|
||||
Requires: dbus-libs%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
Requires(pre): /usr/sbin/useradd
|
||||
|
||||
%description daemon
|
||||
D-BUS is a system for sending messages between applications. It is
|
||||
@ -260,7 +270,7 @@ popd
|
||||
%endif
|
||||
|
||||
|
||||
%pre daemon
|
||||
%pre common
|
||||
# Add the "dbus" user and group
|
||||
/usr/sbin/groupadd -r -g %{dbus_user_uid} dbus 2>/dev/null || :
|
||||
/usr/sbin/useradd -c 'System message bus' -u %{dbus_user_uid} -g %{dbus_user_uid} \
|
||||
@ -291,6 +301,20 @@ popd
|
||||
# particular dbus *implementation*, nor any libraries. These should be pulled
|
||||
# in, if required, via explicit dependencies.
|
||||
|
||||
%files common
|
||||
%dir %{_sysconfdir}/dbus-1
|
||||
%dir %{_sysconfdir}/dbus-1/session.d
|
||||
%dir %{_sysconfdir}/dbus-1/system.d
|
||||
%config %{_sysconfdir}/dbus-1/session.conf
|
||||
%config %{_sysconfdir}/dbus-1/system.conf
|
||||
%dir %{_datadir}/dbus-1
|
||||
%{_datadir}/dbus-1/session.conf
|
||||
%{_datadir}/dbus-1/system.conf
|
||||
%{_datadir}/dbus-1/services
|
||||
%{_datadir}/dbus-1/system-services
|
||||
%{_datadir}/dbus-1/interfaces
|
||||
%{_sysusersdir}/dbus.conf
|
||||
|
||||
%files daemon
|
||||
# Strictly speaking, we could remove the COPYING from this subpackage and
|
||||
# just have it be in libs, because dbus Requires dbus-libs.
|
||||
@ -303,11 +327,6 @@ popd
|
||||
%exclude %{_pkgdocdir}/introspect.*
|
||||
%exclude %{_pkgdocdir}/system-activation.txt
|
||||
%exclude %{_pkgdocdir}/*.html
|
||||
%dir %{_sysconfdir}/dbus-1
|
||||
%dir %{_sysconfdir}/dbus-1/session.d
|
||||
%dir %{_sysconfdir}/dbus-1/system.d
|
||||
%config %{_sysconfdir}/dbus-1/session.conf
|
||||
%config %{_sysconfdir}/dbus-1/system.conf
|
||||
%ghost %dir /run/%{name}
|
||||
%dir %{_localstatedir}/lib/dbus/
|
||||
%{_bindir}/dbus-daemon
|
||||
@ -326,12 +345,6 @@ popd
|
||||
%{_mandir}/man1/dbus-test-tool.1*
|
||||
%{_mandir}/man1/dbus-update-activation-environment.1*
|
||||
%{_mandir}/man1/dbus-uuidgen.1*
|
||||
%dir %{_datadir}/dbus-1
|
||||
%{_datadir}/dbus-1/session.conf
|
||||
%{_datadir}/dbus-1/system.conf
|
||||
%{_datadir}/dbus-1/services
|
||||
%{_datadir}/dbus-1/system-services
|
||||
%{_datadir}/dbus-1/interfaces
|
||||
%dir %{_libexecdir}/dbus-1
|
||||
# See doc/system-activation.txt in source tarball for the rationale
|
||||
# behind these permissions
|
||||
@ -346,7 +359,6 @@ popd
|
||||
%{_userunitdir}/dbus.service
|
||||
%{_userunitdir}/dbus.socket
|
||||
%{_userunitdir}/sockets.target.wants/dbus.socket
|
||||
%{_sysusersdir}/dbus.conf
|
||||
|
||||
%files libs
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
@ -385,6 +397,11 @@ popd
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed May 16 2018 David Herrmann <dh.herrmann@gmail.com> - 1:1.12.8-1
|
||||
- Extract 'dbus-common' package from 'dbus-daemon' to provide XML configuration
|
||||
and setup files as independent package ready for alternative Message Bus
|
||||
implementations to be used.
|
||||
|
||||
* Wed May 16 2018 David Herrmann <dh.herrmann@gmail.com> - 1:1.12.8-1
|
||||
- Turn 'dbus' package into 'dbus-daemon' package, but keep 'dbus' for
|
||||
compatibility around and make it pull in the new 'dbus-daemon' package.
|
||||
|
Loading…
Reference in New Issue
Block a user