Accepting request 141391 from home:dimstar:branches:Base:System
Enable systemd support OBS-URL: https://build.opensuse.org/request/show/141391 OBS-URL: https://build.opensuse.org/package/show/Base:System/polkit?expand=0&rev=78
This commit is contained in:
parent
ffae1da866
commit
a218f1206e
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 14 09:26:14 UTC 2012 - dimstar@opensuse.org
|
||||
|
||||
- Enable systemd inetegration (change with_systemd to 1): As an
|
||||
agreed target for 12.3, systemd integration will be enabled.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 8 21:34:15 UTC 2012 - aj@suse.de
|
||||
|
||||
|
25
polkit.spec
25
polkit.spec
@ -16,7 +16,10 @@
|
||||
#
|
||||
|
||||
|
||||
%define with_systemd 0
|
||||
%define with_systemd 1
|
||||
%if 0%{with_systemd}
|
||||
%define systemdsystemunitdir %(pkg-config --variable systemdsystemunitdir systemd)
|
||||
%endif
|
||||
|
||||
Name: polkit
|
||||
Summary: PolicyKit Authorization Framework
|
||||
@ -56,6 +59,9 @@ PreReq: permissions pwdutils
|
||||
Requires: ConsoleKit
|
||||
Requires: dbus-1
|
||||
Requires: libpolkit0 = %{version}-%{release}
|
||||
%if %{with_systemd}
|
||||
%systemd_requires
|
||||
%endif
|
||||
|
||||
# Upstream First - Policy:
|
||||
# Never add any patches to this package without the upstream commit id
|
||||
@ -153,11 +159,25 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%pre
|
||||
getent group polkitd > /dev/null || groupadd -r polkitd
|
||||
getent passwd polkitd > /dev/null || useradd -r -g polkitd -d %{_localstatedir}/lib/polkit -s /sbin/nologin -c "User for polkitd" polkitd
|
||||
%if %{with_systemd}
|
||||
%service_add_pre polkit.service
|
||||
%endif
|
||||
exit 0
|
||||
|
||||
%if %{with_systemd}
|
||||
%preun
|
||||
%service_del_preun polkit.service
|
||||
|
||||
%postun
|
||||
%service_del_postun polkit.service
|
||||
%endif
|
||||
|
||||
%post
|
||||
%set_permissions %{_bindir}/pkexec
|
||||
%set_permissions %{_prefix}/lib/polkit-1/polkit-agent-helper-1
|
||||
%if %{with_systemd}
|
||||
%service_add_post polkit.service
|
||||
%endif
|
||||
|
||||
%verifyscript
|
||||
%verify_permissions -e %{_bindir}/pkexec
|
||||
@ -209,6 +229,9 @@ exit 0
|
||||
%verify(not mode) %attr(4755,root,root) %{_prefix}/lib/polkit-1/polkit-agent-helper-1
|
||||
# $HOME for polkit user
|
||||
%dir %{_localstatedir}/lib/polkit
|
||||
%if %{with_systemd}
|
||||
%{systemdsystemunitdir}/polkit.service
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
|
Loading…
x
Reference in New Issue
Block a user