dbus: extract 'dbus' package into 'dbus-daemon'

This extracts all the contents of the 'dbus' package into a new
'dbus-daemon' package. All internal sub-package dependencies are
updated to point to the new sub-package. The original 'dbus' package is
kept around as empty meta-package that simply pulls in 'dbus-daemon'.
This is meant for compatibility so other packages continue working for
now. Dependencies on 'dbus' will be reviewed and updated before this
meta-package gets removed.

This package rename prepares Fedora to allow alternative
implementations of D-Bus System and Session buses. The 'dbus' package
name is freed from dependencies on any particular implementation.
Instead, the reference implementation is now called 'dbus-daemon' as a
package, with the intent to re-use the 'dbus' package name in the
future as a meta-name provided by 'dbus-daemon' as well alternative
implementations like 'dbus-broker'. It will serve as dependency of
dbus-only services to clearly tell rpm that a dbus system or user bus
implementation is required for a given package.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
David Herrmann 2018-05-03 11:52:46 +02:00
parent 8655952f6f
commit 1adc79b70a

View File

@ -56,10 +56,6 @@ BuildRequires: cmake
%{?systemd_requires} %{?systemd_requires}
BuildRequires: systemd BuildRequires: systemd
Requires: libselinux%{?_isa} >= %{libselinux_version}
Requires: dbus-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires(pre): /usr/sbin/useradd
# Note: These is only required for --with-tests; when bootstrapping, you can # Note: These is only required for --with-tests; when bootstrapping, you can
# pass --without-tests. # pass --without-tests.
%if %{with tests} %if %{with tests}
@ -71,11 +67,25 @@ BuildRequires: pygobject3
BuildRequires: /usr/bin/Xvfb BuildRequires: /usr/bin/Xvfb
%endif %endif
Requires: %{name}-daemon = %{epoch}:%{version}-%{release}
%description %description
D-BUS is a system for sending messages between applications. It is D-BUS is a system for sending messages between applications. It is
used both for the system-wide message bus service, and as a used both for the system-wide message bus service, and as a
per-user-login-session messaging facility. per-user-login-session messaging facility.
%package daemon
Summary: D-BUS message bus
Group: System Environment/Libraries
Requires: libselinux%{?_isa} >= %{libselinux_version}
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
used both for the system-wide message bus service, and as a
per-user-login-session messaging facility.
%package libs %package libs
Summary: Libraries for accessing D-BUS Summary: Libraries for accessing D-BUS
Group: Development/Libraries Group: Development/Libraries
@ -86,7 +96,7 @@ This package contains lowlevel libraries for accessing D-BUS.
%package doc %package doc
Summary: Developer documentation for D-BUS Summary: Developer documentation for D-BUS
Group: Documentation Group: Documentation
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name}-daemon = %{epoch}:%{version}-%{release}
BuildArch: noarch BuildArch: noarch
%description doc %description doc
@ -97,7 +107,7 @@ other supporting documentation such as the introspect dtd file.
Summary: Development files for D-BUS Summary: Development files for D-BUS
Group: Development/Libraries Group: Development/Libraries
# The server package can be a different architecture. # The server package can be a different architecture.
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name}-daemon = %{epoch}:%{version}-%{release}
# For xml directory ownership. # For xml directory ownership.
Requires: xml-common Requires: xml-common
@ -106,19 +116,19 @@ This package contains libraries and header files needed for
developing software that uses D-BUS. developing software that uses D-BUS.
%package tests %package tests
Summary: Tests for the %{name} package Summary: Tests for the %{name}-daemon package
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-daemon%{?_isa} = %{epoch}:%{version}-%{release}
%description tests %description tests
The %{name}-tests package contains tests that can be used to verify The %{name}-tests package contains tests that can be used to verify
the functionality of the installed %{name} package. the functionality of the installed %{name}-daemon package.
%package x11 %package x11
Summary: X11-requiring add-ons for D-BUS Summary: X11-requiring add-ons for D-BUS
Group: Development/Libraries Group: Development/Libraries
# The server package can be a different architecture. # The server package can be a different architecture.
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name}-daemon = %{epoch}:%{version}-%{release}
%description x11 %description x11
D-BUS contains some tools that require Xlib to be installed, those are D-BUS contains some tools that require Xlib to be installed, those are
@ -250,23 +260,23 @@ popd
%endif %endif
%pre %pre daemon
# Add the "dbus" user and group # Add the "dbus" user and group
/usr/sbin/groupadd -r -g %{dbus_user_uid} dbus 2>/dev/null || : /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} \ /usr/sbin/useradd -c 'System message bus' -u %{dbus_user_uid} -g %{dbus_user_uid} \
-s /sbin/nologin -r -d '/' dbus 2> /dev/null || : -s /sbin/nologin -r -d '/' dbus 2> /dev/null || :
%post %post daemon
%systemd_post dbus.service dbus.socket %systemd_post dbus.service dbus.socket
%systemd_user_post dbus.service dbus.socket %systemd_user_post dbus.service dbus.socket
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
%preun %preun daemon
%systemd_preun dbus.service dbus.socket %systemd_preun dbus.service dbus.socket
%systemd_user_preun dbus.service dbus.socket %systemd_user_preun dbus.service dbus.socket
%postun %postun daemon
%systemd_postun dbus.service dbus.socket %systemd_postun dbus.service dbus.socket
%systemd_user_postun dbus.service dbus.socket %systemd_user_postun dbus.service dbus.socket
@ -274,6 +284,14 @@ popd
%files %files
# The 'dbus' package is only retained for compatibility purposes. It will
# eventually be removed and then replaced by 'Provides: dbus' in the
# dbus-daemon package. It will then exclusively be used for other packages to
# describe their dependency on a system and user bus. It does not pull in any
# particular dbus *implementation*, nor any libraries. These should be pulled
# in, if required, via explicit dependencies.
%files daemon
# Strictly speaking, we could remove the COPYING from this subpackage and # Strictly speaking, we could remove the COPYING from this subpackage and
# just have it be in libs, because dbus Requires dbus-libs. # just have it be in libs, because dbus Requires dbus-libs.
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
@ -367,6 +385,10 @@ popd
%changelog %changelog
* 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.
* Mon Apr 30 2018 David King <amigadave@amigadave.com> - 1:1.12.8-1 * Mon Apr 30 2018 David King <amigadave@amigadave.com> - 1:1.12.8-1
- Update to 1.12.8 (#1556590) - Update to 1.12.8 (#1556590)