Accepting request 765344 from home:kukuk:ei-demo
- Remove left overs from blocking restart on update from May 29th 2019 - Use sysusers.d to create messagebus user OBS-URL: https://build.opensuse.org/request/show/765344 OBS-URL: https://build.opensuse.org/package/show/Base:System/dbus-1?expand=0&rev=290
This commit is contained in:
parent
5f58e7ecf7
commit
b8daf232e5
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package dbus-1-x11
|
# spec file for package dbus-1-x11
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LLC
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 17 13:02:10 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Remove left overs from blocking restart on update from May 29th 2019
|
||||||
|
- Use sysusers.d to create messagebus user
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 3 01:16:18 UTC 2019 - Simon Lees <sflees@suse.de>
|
Tue Dec 3 01:16:18 UTC 2019 - Simon Lees <sflees@suse.de>
|
||||||
|
|
||||||
|
28
dbus-1.spec
28
dbus-1.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package dbus-1
|
# spec file for package dbus-1
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LLC
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,8 +19,6 @@
|
|||||||
%define with_systemd 1
|
%define with_systemd 1
|
||||||
%define _name dbus
|
%define _name dbus
|
||||||
%define _libname libdbus-1-3
|
%define _libname libdbus-1-3
|
||||||
# Temporary code to disable service restart on update sflees@suse.de boo#1020301
|
|
||||||
%global _backup %{_sysconfdir}/sysconfig/services.rpmbak.%{name}-%{version}-%{release}
|
|
||||||
|
|
||||||
%bcond_without selinux
|
%bcond_without selinux
|
||||||
Name: dbus-1
|
Name: dbus-1
|
||||||
@ -35,6 +33,7 @@ Source1: http://dbus.freedesktop.org/releases/dbus/%{_name}-%{version}.ta
|
|||||||
Source2: dbus-1.keyring
|
Source2: dbus-1.keyring
|
||||||
Source3: baselibs.conf
|
Source3: baselibs.conf
|
||||||
Source4: dbus-1.desktop
|
Source4: dbus-1.desktop
|
||||||
|
Source5: messagebus.conf
|
||||||
Patch0: feature-suse-log-deny.patch
|
Patch0: feature-suse-log-deny.patch
|
||||||
# PATCH-FIX-OPENSUSE coolo@suse.de -- force a feature configure won't accept without x11 in buildrequires
|
# PATCH-FIX-OPENSUSE coolo@suse.de -- force a feature configure won't accept without x11 in buildrequires
|
||||||
Patch1: feature-suse-do-autolaunch.patch
|
Patch1: feature-suse-do-autolaunch.patch
|
||||||
@ -48,17 +47,19 @@ BuildRequires: libexpat-devel >= 2.1.0
|
|||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: permissions
|
BuildRequires: permissions
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: sysuser-shadow
|
||||||
|
BuildRequires: sysuser-tools
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
BuildRequires: pkgconfig(libsystemd) >= 209
|
BuildRequires: pkgconfig(libsystemd) >= 209
|
||||||
Requires(post): %{_libname} = %{version}
|
Requires(post): %{_libname} = %{version}
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(pre): permissions
|
Requires(pre): permissions
|
||||||
Requires(pre): shadow
|
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
Provides: dbus-launch
|
Provides: dbus-launch
|
||||||
%if %{with selinux}
|
%if %{with selinux}
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
%endif
|
%endif
|
||||||
|
%sysusers_requires
|
||||||
|
|
||||||
%package -n %{_libname}
|
%package -n %{_libname}
|
||||||
Summary: Library package for D-Bus
|
Summary: Library package for D-Bus
|
||||||
@ -140,6 +141,10 @@ export V=1
|
|||||||
--with-systemduserunitdir=%{_userunitdir} \
|
--with-systemduserunitdir=%{_userunitdir} \
|
||||||
--without-x
|
--without-x
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
# The original dbus sysusers config does not create our account,
|
||||||
|
# overwrite it with our user definition
|
||||||
|
cp %{SOURCE5} bus/sysusers.d/dbus.conf
|
||||||
|
%sysusers_generate_pre %{SOURCE5} messagebus
|
||||||
|
|
||||||
doxygen -u && doxygen
|
doxygen -u && doxygen
|
||||||
./cleanup-man-pages.sh
|
./cleanup-man-pages.sh
|
||||||
@ -195,11 +200,8 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
|
|
||||||
%post -n %{_libname} -p /sbin/ldconfig
|
%post -n %{_libname} -p /sbin/ldconfig
|
||||||
%postun -n %{_libname} -p /sbin/ldconfig
|
%postun -n %{_libname} -p /sbin/ldconfig
|
||||||
%pre
|
|
||||||
getent group messagebus >/dev/null || \
|
%pre -f messagebus.pre
|
||||||
%{_sbindir}/groupadd -r messagebus
|
|
||||||
getent passwd messagebus >/dev/null || \
|
|
||||||
%{_sbindir}/useradd -r -s %{_bindir}/false -c "User for D-Bus" -d /run/dbus -g messagebus messagebus
|
|
||||||
%service_add_pre dbus.service dbus.socket
|
%service_add_pre dbus.service dbus.socket
|
||||||
|
|
||||||
%post
|
%post
|
||||||
@ -229,14 +231,6 @@ fi
|
|||||||
%postun
|
%postun
|
||||||
%service_del_postun_without_restart dbus.service dbus.socket
|
%service_del_postun_without_restart dbus.service dbus.socket
|
||||||
|
|
||||||
%posttrans
|
|
||||||
# See comments in pre
|
|
||||||
if [ -s "%{_backup}" ]; then
|
|
||||||
mv -f %{_backup} %{_sysconfdir}/sysconfig/services
|
|
||||||
elif [ -e "%{_backup}" ]; then
|
|
||||||
rm -f %{_sysconfdir}/sysconfig/services
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%dir %{_localstatedir}/lib/dbus
|
%dir %{_localstatedir}/lib/dbus
|
||||||
%dir /lib/dbus-1
|
%dir /lib/dbus-1
|
||||||
|
2
messagebus.conf
Normal file
2
messagebus.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Type Name ID GECOS [HOME]
|
||||||
|
u messagebus - "User for D-Bus" /run/dbus
|
Loading…
Reference in New Issue
Block a user