Compare commits

...
Sign in to create a new pull request.

15 commits

Author SHA1 Message Date
David King
1542d96bcd Ensure presets are applied during this upgrade only 2019-01-21 13:30:41 +00:00
David King
3003d5f603 Change -devel subpackage to depend on -libs 2019-01-21 13:27:00 +00:00
David King
59e4e60b0b Update to 1.12.12 2019-01-21 13:25:41 +00:00
David King
e70dafcb63 Fix requirement on fedora-release
Similar to commit bca95f22ec on master.
2019-01-21 13:11:25 +00:00
Tom Gundersen
b9e195f6bf Fix messagebus alias 2019-01-21 12:57:10 +00:00
David King
d39121006b Add further Requires to subpackages
Add fedora-release to daemon subpackage, as the systemctl preset calls
in the triggerpostun require it. Add systemd_requires macro to daemon
subpackage, as it (like the common subpackage) calls systemctl in
triggerpostun.
2019-01-21 12:54:09 +00:00
Tom Gundersen
fe19cfc6e3 Add missing requires to 'common' and 'daemon' subpackage
Both subpackages call various %systemd scriptlets, so they need
the %systmd_requires macro. Their %triggerpostun also call
systemctl directly, so add an explicit Requires on that.

Some of this may in practice prove redundant, but let's be explicit
and hopefully more robust.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-01-21 12:53:52 +00:00
David Herrmann
7fba6aba69 Move 'useradd' dependency to daemon subpackage
The 'useradd' invocation is now on the 'daemon' subpackage, so move the
useradd dependency as well.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2018-10-25 16:11:15 +01:00
David King
e5920b7c91 Remove unnecessary ldconfig calls
https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets
2018-10-22 08:58:37 +01:00
David King
7e5ac9fffd Move systemd to Requires of common subpackage (#1638910) 2018-10-22 08:58:34 +01:00
David King
8f3ff4dd6c Move user and group creation to daemon subpackage 2018-10-22 08:58:30 +01:00
Tom Gundersen
7e05148768 dbus: depend on the right fedora-release for f29
Signed-off-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2018-10-22 08:58:23 +01:00
Tom Gundersen
83c01b25d9 dbus: apply presets on update
The systemd RPM macros only apply presets on first install, we need
to also apply them on the initial upgrade that starts depending on
them.

Signed-off-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2018-10-22 08:58:23 +01:00
David Herrmann
79fe35567b dbus: change 'system-release' dependency to 'fedora-release'
As it turns out, 'fedora-release' only has:

    'Provides: system-release'

rather than:

    'Provides: system-release = %{version}-%{release}'

This means, any explicit dependencies on 'system-release' ignore
versioning completely. This is unfortunate, and breaks our reliance on
'system-release'.

Fortunately, unlike recommended on the wiki, it is safe to depend on
'fedora-release' explicitly. Other fedora flavors have this package as
well, so there is no reason not to.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2018-10-22 08:58:23 +01:00
David Herrmann
337387ac7b dbus: move systemd-hooks for dbus.socket to 'dbus-common'
The systemd_{post,postun,preun,..} hooks should be called in the package
that actually provides the given files. There is no harm in calling
these in the dbus-daemon package, but preferably we don't. Move this to
'dbus-common' for dbus.socket, since dbus.socket is provided by it. This
makes sure the unit is properly enabled/disabled even without the
dbus-daemon package installed.

Note that it is safe to enable/disable dbus.socket even without a
dbus.service around. systemd can deal with this just fine, and only ever
actually pulls in the socket if an activatable service is around.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2018-10-22 08:58:23 +01:00
4 changed files with 74 additions and 28 deletions

1
.gitignore vendored
View file

@ -40,3 +40,4 @@
/dbus-1.12.0.tar.gz
/dbus-1.12.8.tar.gz
/dbus-1.12.10.tar.gz
/dbus-1.12.12.tar.gz

View file

@ -9,5 +9,7 @@ ExecReload=/usr/bin/dbus-send --print-reply --system --type=method_call --dest=o
OOMScoreAdjust=-900
[Install]
Alias=dbus.service
# Make sure that services can still refer to this under the name of the
# old SysV script (messagebus).
Alias=dbus.service messagebus.service
WantedBy=multi-user.target

View file

@ -5,8 +5,9 @@
%global libselinux_version 2.0.86
# fedora-release-30-0.2 added required presets to enable systemd-unit symlinks
%global system_release_version 30-0.2
# fedora-release-29-0.12 added required presets to enable systemd-unit symlinks
# generic-release does not yet have the required presets
%global fedora_release_version 29-0.12
%global dbus_user_uid 81
@ -21,8 +22,8 @@
Name: dbus
Epoch: 1
Version: 1.12.10
Release: 2%{?dist}
Version: 1.12.12
Release: 1%{?dist}
Summary: D-BUS message bus
Group: System Environment/Libraries
@ -61,7 +62,6 @@ BuildRequires: cmake
%endif
#For macroized scriptlets.
%{?systemd_requires}
BuildRequires: systemd
# Note: These is only required for --with-tests; when bootstrapping, you can
@ -86,8 +86,9 @@ per-user-login-session messaging facility.
Summary: D-BUS message bus configuration
Group: System Environment/Libraries
BuildArch: noarch
Requires(pre): /usr/sbin/useradd
Requires: system-release >= %{system_release_version}
%{?systemd_requires}
Conflicts: fedora-release < %{fedora_release_version}
Requires: /usr/bin/systemctl
%description common
The %{name}-common package provides the configuration and setup files for D-Bus
@ -96,10 +97,14 @@ implementations to provide a System and User Message Bus.
%package daemon
Summary: D-BUS message bus
Group: System Environment/Libraries
%{?systemd_requires}
Conflicts: fedora-release < %{fedora_release_version}
Requires: libselinux%{?_isa} >= %{libselinux_version}
Requires: dbus-common = %{epoch}:%{version}-%{release}
Requires: dbus-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: dbus-tools = %{epoch}:%{version}-%{release}
Requires(pre): /usr/sbin/useradd
Requires: /usr/bin/systemctl
%description daemon
D-BUS is a system for sending messages between applications. It is
@ -135,8 +140,7 @@ other supporting documentation such as the introspect dtd file.
%package devel
Summary: Development files for D-BUS
Group: Development/Libraries
# The server package can be a different architecture.
Requires: %{name}-daemon = %{epoch}:%{version}-%{release}
Requires: dbus-libs%{?_isa} = %{epoch}:%{version}-%{release}
# For xml directory ownership.
Requires: xml-common
@ -224,11 +228,6 @@ install -Dp -m644 %{SOURCE3} %{buildroot}%{_unitdir}/dbus-daemon.service
install -Dp -m644 %{SOURCE4} %{buildroot}%{_userunitdir}/dbus.socket
install -Dp -m644 %{SOURCE5} %{buildroot}%{_userunitdir}/dbus-daemon.service
# Make sure that when somebody asks for D-Bus under the name of the
# old SysV script, that he ends up with the standard dbus.service name
# now.
ln -s dbus.service %{buildroot}%{_unitdir}/messagebus.service
# Obsolete, but still widely used, for drop-in configuration snippets.
install --directory %{buildroot}%{_sysconfdir}/dbus-1/session.d
install --directory %{buildroot}%{_sysconfdir}/dbus-1/system.d
@ -304,28 +303,43 @@ popd
%endif
%pre common
%pre daemon
# 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} \
-s /sbin/nologin -r -d '/' dbus 2> /dev/null || :
%post daemon
%systemd_post dbus-daemon.service dbus.socket
%systemd_user_post dbus-daemon.service dbus.socket
%post common
%systemd_post dbus.socket
%systemd_user_post dbus.socket
%post libs -p /sbin/ldconfig
%post daemon
%systemd_post dbus-daemon.service
%systemd_user_post dbus-daemon.service
%preun common
%systemd_preun dbus.socket
%systemd_user_preun dbus.socket
%preun daemon
%systemd_preun dbus-daemon.service dbus.socket
%systemd_user_preun dbus-daemon.service dbus.socket
%systemd_preun dbus-daemon.service
%systemd_user_preun dbus-daemon.service
%postun common
%systemd_postun dbus.socket
%systemd_user_postun dbus.socket
%postun daemon
%systemd_postun dbus-daemon.service dbus.socket
%systemd_user_postun dbus-daemon.service dbus.socket
%systemd_postun dbus-daemon.service
%systemd_user_postun dbus-daemon.service
%postun libs -p /sbin/ldconfig
%triggerpostun common -- dbus-common < 1:1.12.12-1
systemctl --no-reload preset dbus.socket &>/dev/null || :
systemctl --no-reload --global preset dbus.socket &>/dev/null || :
%triggerpostun daemon -- dbus-daemon < 1:1.12.12-1
systemctl --no-reload preset dbus-daemon.service &>/dev/null || :
systemctl --no-reload --global preset dbus-daemon.service &>/dev/null || :
%files
# The 'dbus' package is only retained for compatibility purposes. It will
@ -349,7 +363,6 @@ popd
%{_datadir}/dbus-1/interfaces
%{_sysusersdir}/dbus.conf
%{_unitdir}/dbus.socket
%{_unitdir}/messagebus.service
%{_userunitdir}/dbus.socket
%files daemon
@ -357,7 +370,7 @@ popd
# just have it be in libs, because dbus Requires dbus-libs.
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc AUTHORS ChangeLog HACKING NEWS README
%doc AUTHORS ChangeLog CONTRIBUTING.md NEWS README
%exclude %{_pkgdocdir}/api
%exclude %{_pkgdocdir}/dbus.devhelp
%exclude %{_pkgdocdir}/diagram.*
@ -432,6 +445,36 @@ popd
%changelog
* Mon Jan 21 2019 David King <amigadave@amigadave.com> - 1:1.12.12-1
- Update to 1.12.12
- Change -devel subpackage to depend on -libs
- Ensure presets are applied during this upgrade only
* Mon Jan 21 2019 David King <amigadave@amigadave.com> - 1:1.12.10-8
- Fix requirement on fedora-release
* Tue Nov 06 2018 Tom Gundersen <teg@jklm.no> - 1:1.12.10-7
- Fix the messagebus.service alias
* Mon Nov 05 2018 David King <amigadave@amigadave.com> - 1:1.12.10-6
- Add further Requires to subpackages
* Tue Oct 23 2018 David Herrmann <dh.herrmann@gmail.com> - 1:1.12.10-5
- Move useradd dependency to daemon subpackage
* Fri Oct 19 2018 David King <amigadave@amigadave.com> - 1:1.12.10-4
- Move user and group creation to daemon subpackage
- Move systemd to Requires of common subpackage (#1638910)
- Remove unnecessary ldconfig calls
* Fri Aug 31 2018 Tom Gundersen <teg@jklm.no> - 1:1.12.10-3
- Make sure presets are applied when upgrading from packages before the presets
existed
* Thu Aug 30 2018 David Herrmann <dh.herrmann@gmail.com> - 1:1.12.10-2
- Change 'system-release' dependency to 'fedora-release', since otherwise hard
version dependencies are ignored.
* Fri Aug 10 2018 David Herrmann <dh.herrmann@gmail.com> - 1:1.12.10-2
- Move generic units into 'dbus-common', so other dbus implementations can use
them as well.

View file

@ -1 +1 @@
SHA512 (dbus-1.12.10.tar.gz) = 36a16393af6630c32474b971fb8864ded0fb5fe08c5ff5243a4ca312b95af4f20335c5f166b72526a0b8162c1ccfe6542ad6953c5d21a0542d920d7cb4a9ac76
SHA512 (dbus-1.12.12.tar.gz) = 51af4e86ab7d36e1c9a861164e7cd7aa1605fdd82f90aed8728b34c45a87864a00671de9db00d88ea6f96be97459c7eb53d2517ea9d9687ae9ebf81c58c3a80f