Accepting request 85402 from home:fcrozat:branches:Base:System

- Use systemd macros to register cron.service.

OBS-URL: https://build.opensuse.org/request/show/85402
OBS-URL: https://build.opensuse.org/package/show/Base:System/cronie?expand=0&rev=87
This commit is contained in:
Stephan Kulow 2011-09-29 09:35:07 +00:00 committed by Git OBS Bridge
parent 6fcd46a8a8
commit cdad1fa213
2 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Sep 29 09:17:49 UTC 2011 - fcrozat@suse.com
- Use systemd macros to register cron.service.
-------------------------------------------------------------------
Sun Sep 18 00:00:19 UTC 2011 - jengelh@medozas.de

View File

@ -20,13 +20,14 @@
%define cron_configs \{/etc/init.d/cron,/etc/pam.d/crond,/etc/crontab,/etc/cron.deny,/etc/omc/srvinfo.d/cron.xml\}
Name: cronie
BuildRequires: audit-devel libselinux-devel pam-devel
BuildRequires: audit-devel libselinux-devel pam-devel systemd
Url: https://fedorahosted.org/cronie/
License: MIT and BSD and GPLv2
Group: System/Daemons
Recommends: smtp_daemon
Recommends: postfix
PreReq: permissions %fillup_prereq %insserv_prereq cron sysvinit(syslog)
%{?systemd_requires}
Version: 1.4.7
Release: 14
%{expand: %%define cronie_version %version}
@ -120,8 +121,8 @@ export LDFLAGS="-Wl,-z,relro,-z,now,-z,defs"
%{__install} -v -d %{buildroot}%{_sysconfdir}/init.d/
%{__install} -v -m744 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/cron
%{__ln_s} -f ../../etc/init.d/cron %{buildroot}/usr/sbin/rccron
%{__install} -v -d %{buildroot}/lib/systemd/system
%{__install} -v -m 644 %{SOURCE8} %{buildroot}/lib/systemd/system
%{__install} -v -d %{buildroot}/%{_unitdir}
%{__install} -v -m 644 %{SOURCE8} %{buildroot}/%{_unitdir}
%{__install} -m 644 contrib/anacrontab $RPM_BUILD_ROOT%{_sysconfdir}/anacrontab
%{__install} -c -m755 contrib/0anacron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/0anacron
%{__mkdir_p} $RPM_BUILD_ROOT/var/spool/anacron
@ -157,6 +158,7 @@ if [ -e /var/run/update_from_old_cron ]; then
%__mv "$conf.bk" "$conf" ||:
done
fi
%service_add_pre cron.service
%post
# when we are doing rename then we pretend update with set 2
@ -173,13 +175,16 @@ fi
%run_permissions
%verifyscript
%verify_permissions -e /etc/crontab -e /usr/bin/crontab
%service_add_post cron.service
%preun
%stop_on_removal cron
%service_del_preun cron.service
%postun
%restart_on_update cron
%insserv_cleanup
%service_del_postun cron.service
%posttrans
if [ -e /var/run/update_from_old_cron ]; then
@ -213,9 +218,7 @@ fi
%config %{_sysconfdir}/omc/srvinfo.d/cron.xml
%dir %{_sysconfdir}/omc/srvinfo.d/
%dir %{_sysconfdir}/omc/
%dir /lib/systemd
%dir /lib/systemd/system
/lib/systemd/system/cron.service
%{_unitdir}/cron.service
%files anacron
%defattr(-,root,root,-)