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