Override upstream sysusers.d confguration (#2118226)

Resolves: #2118226
This commit is contained in:
David King 2022-08-17 14:40:22 +01:00
parent 8031f96aad
commit 01aaacf9b1
2 changed files with 10 additions and 12 deletions

View File

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u dbus 81 "System Message Bus" - -

View File

@ -23,7 +23,7 @@
Name: dbus
Epoch: 1
Version: 1.12.20
Release: 5%{?dist}
Release: 6%{?dist}
Summary: D-BUS message bus
# The effective license of the majority of the package, including the shared
@ -41,6 +41,7 @@ Source4: dbus.socket
Source5: dbus-daemon.service
Source6: dbus.user.socket
Source7: dbus-daemon.user.service
Source8: dbus-systemd-sysusers.conf
Patch0: 0001-tools-Use-Python3-for-GetAllMatchRules.patch
BuildRequires: autoconf-archive
@ -109,7 +110,6 @@ 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
@ -221,6 +221,7 @@ rm -f %{buildroot}%{_unitdir}/sockets.target.wants/dbus.socket
rm -f %{buildroot}%{_unitdir}/multi-user.target.wants/dbus.service
rm -f %{buildroot}%{_userunitdir}/dbus.{socket,service}
rm -f %{buildroot}%{_userunitdir}/sockets.target.wants/dbus.socket
rm -f %{buildroot}%{_sysusersdir}/dbus.conf
# Install downstream units
install -Dp -m755 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/00-start-message-bus.sh
@ -228,6 +229,7 @@ install -Dp -m644 %{SOURCE4} %{buildroot}%{_unitdir}/dbus.socket
install -Dp -m644 %{SOURCE5} %{buildroot}%{_unitdir}/dbus-daemon.service
install -Dp -m644 %{SOURCE6} %{buildroot}%{_userunitdir}/dbus.socket
install -Dp -m644 %{SOURCE7} %{buildroot}%{_userunitdir}/dbus-daemon.service
install -Dp -m644 %{SOURCE8} %{buildroot}%{_sysusersdir}/dbus.conf
# Obsolete, but still widely used, for drop-in configuration snippets.
install --directory %{buildroot}%{_sysconfdir}/dbus-1/session.d
@ -306,16 +308,7 @@ popd
%pre daemon
# Add the "dbus" user and group
getent group dbus >/dev/null || groupadd -f -g %{dbus_user_uid} -r dbus
if ! getent passwd dbus >/dev/null ; then
if ! getent passwd %{dbus_user_uid} >/dev/null ; then
useradd -r -u %{dbus_user_uid} -g %{dbus_user_uid} -d '/' -s /sbin/nologin -c "System message bus" dbus
else
useradd -r -g %{dbus_user_uid} -d '/' -s /sbin/nologin -c "System message bus" dbus
fi
fi
exit 0
%sysusers_create_compat %{SOURCE8}
%post common
%systemd_post dbus.socket
@ -455,6 +448,9 @@ systemctl --no-reload --global preset dbus-daemon.service &>/dev/null || :
%changelog
* Wed Aug 17 2022 David King <amigadave@amigadave.com> - 1:1.12.20-6
- Override upstream sysusers.d confguration (#2118226)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.12.20-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688