Accepting request 107166 from home:vuntz:branches:GNOME:Factory
Fix systemd-related packaging OBS-URL: https://build.opensuse.org/request/show/107166 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/colord?expand=0&rev=32
This commit is contained in:
parent
0b45c68acf
commit
d1a17d3c0e
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 27 13:24:10 UTC 2012 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
- Fix systemd-related packaging:
|
||||||
|
+ Use %{?systemd_requires}.
|
||||||
|
+ Call %service_{add,del}_* macros in scriptlets for
|
||||||
|
colord.service.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 23 07:51:54 UTC 2012 - vuntz@opensuse.org
|
Thu Feb 23 07:51:54 UTC 2012 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
14
colord.spec
14
colord.spec
@ -45,6 +45,7 @@ Requires(pre): pwdutils
|
|||||||
Requires: shared-color-profiles
|
Requires: shared-color-profiles
|
||||||
Recommends: %{name}-lang
|
Recommends: %{name}-lang
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
%{?systemd_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
colord is a system activated daemon that maps devices to color profiles.
|
colord is a system activated daemon that maps devices to color profiles.
|
||||||
@ -110,12 +111,23 @@ popd
|
|||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
|
%service_add_pre colord.service
|
||||||
|
# Create colord user
|
||||||
getent group colord >/dev/null || groupadd -r colord
|
getent group colord >/dev/null || groupadd -r colord
|
||||||
getent passwd colord >/dev/null || useradd -r -g colord -d %{_localstatedir}/lib/colord -s /sbin/nologin -c "user for colord" colord
|
getent passwd colord >/dev/null || useradd -r -g colord -d %{_localstatedir}/lib/colord -s /sbin/nologin -c "user for colord" colord
|
||||||
# Fix ownership of /var/lib/colord from first packages (in 12.1)
|
# Fix ownership of /var/lib/colord from first packages (in 12.1)
|
||||||
test ! -d %{_localstatedir}/lib/colord || chown -R colord:colord %{_localstatedir}/lib/colord
|
test ! -d %{_localstatedir}/lib/colord || chown -R colord:colord %{_localstatedir}/lib/colord
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
%post
|
||||||
|
%service_add_post colord.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun colord.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun colord.service
|
||||||
|
|
||||||
%post -n libcolord1 -p /sbin/ldconfig
|
%post -n libcolord1 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -n libcolord1 -p /sbin/ldconfig
|
%postun -n libcolord1 -p /sbin/ldconfig
|
||||||
@ -123,7 +135,7 @@ exit 0
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc AUTHORS ChangeLog COPYING NEWS README
|
%doc AUTHORS ChangeLog COPYING NEWS README
|
||||||
/lib/systemd/system/colord.service
|
%{_unitdir}/colord.service
|
||||||
/lib/udev/rules.d/*.rules
|
/lib/udev/rules.d/*.rules
|
||||||
%attr(755,colord,colord) %dir %{_localstatedir}/lib/colord
|
%attr(755,colord,colord) %dir %{_localstatedir}/lib/colord
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user