]> git.pld-linux.org Git - packages/cronie.git/blobdiff - cronie.spec
- add vixie-cron trigger
[packages/cronie.git] / cronie.spec
index 978ccd9d99b65f0a11820f20dce3098f7ac63f6d..dd0b2aab2c6d22b8409c99049c508bbb5c3eaf84 100644 (file)
@@ -8,7 +8,7 @@ Version:        1.4.1
 Release:       0.1
 License:       MIT and BSD and GPLv2
 Group:         Daemons
 Release:       0.1
 License:       MIT and BSD and GPLv2
 Group:         Daemons
-Source0:       https://fedorahosted.org/cronie/attachment/wiki/WikiStart/cronie-1.4.1.tar.gz?format=raw
+Source0:       https://fedorahosted.org/cronie/attachment/wiki/WikiStart/%{name}-%{version}.tar.gz?format=raw
 # Source0-md5: 9c089d2035b9fa8263bc71da3eb31cdd
 Source1:       %{name}.init
 Source2:       cron.logrotate
 # Source0-md5: 9c089d2035b9fa8263bc71da3eb31cdd
 Source1:       %{name}.init
 Source2:       cron.logrotate
@@ -16,9 +16,9 @@ Source3:      cron.sysconfig
 Source4:       %{name}.crontab
 Source5:       %{name}.pam
 URL:           https://fedorahosted.org/cronie/
 Source4:       %{name}.crontab
 Source5:       %{name}.pam
 URL:           https://fedorahosted.org/cronie/
+BuildRequires: audit-libs-devel
 %{?with_selinux:BuildRequires: libselinux-devel}
 BuildRequires: pam-devel
 %{?with_selinux:BuildRequires: libselinux-devel}
 BuildRequires: pam-devel
-BuildRequires: audit-libs-devel
 BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post):        fileutils
 Requires(post,preun):  /sbin/chkconfig
 BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post):        fileutils
 Requires(post,preun):  /sbin/chkconfig
@@ -33,34 +33,37 @@ Requires:   rc-scripts
 Provides:      crondaemon
 Provides:      crontabs = 1.7
 Provides:      group(crontab)
 Provides:      crondaemon
 Provides:      crontabs = 1.7
 Provides:      group(crontab)
-Provides: vixie-cron = 4:4.4
-Obsoletes: vixie-cron <= 4:4.3
+Provides:      vixie-cron = 4:4.4
 Obsoletes:     crondaemon
 Obsoletes:     crontabs
 Obsoletes:     crondaemon
 Obsoletes:     crontabs
+Obsoletes:     vixie-cron <= 4:4.3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Cronie contains the standard UNIX daemon crond that runs specified programs at
-scheduled times and related tools. It is based on the original cron and
-has security and configuration enhancements like the ability to use pam and
-SELinux.
+Cronie contains the standard UNIX daemon crond that runs specified
+programs at scheduled times and related tools. It is based on the
+original cron and has security and configuration enhancements like the
+ability to use pam and SELinux.
 
 %package anacron
 
 %package anacron
-Summary: Utility for running regular jobs
-Group: Base
-Provides: anacron = 2.4
-Obsoletes: anacron <= 2.3
+Summary:       Utility for running regular jobs
+Group:         Base
+Provides:      anacron = 2.4
+Obsoletes:     anacron <= 2.3
 
 %description anacron
 
 %description anacron
-Anacron becames part of cronie. Anacron is used only for running regular jobs.
-The default settings execute regular jobs by anacron, however this could be
-overloaded in settings.
+Anacron becames part of cronie. Anacron is used only for running
+regular jobs. The default settings execute regular jobs by anacron,
+however this could be overloaded in settings.
 
 %prep
 %setup -q
 
 %build
 %configure \
 
 %prep
 %setup -q
 
 %build
 %configure \
+       SYSCRONTAB=/etc/cron.d/crontab \
+       SYS_CROND_DIR=/etc/cron.d \
+       --sysconfdir=/etc/cron.d \
        --with-pam \
        --with%{?!with_selinux:out}-selinux \
        --with-audit \
        --with-pam \
        --with%{?!with_selinux:out}-selinux \
        --with-audit \
@@ -144,6 +147,15 @@ fi
 /sbin/chkconfig --del crond
 /sbin/chkconfig --add crond
 
 /sbin/chkconfig --del crond
 /sbin/chkconfig --add crond
 
+%triggerun -- vixie-cron
+# Prevent preun from crond from working
+chmod a-x /etc/rc.d/init.d/crond
+
+%triggerpostun -- vixie-cron
+# Restore what triggerun removed
+chmod 754 /etc/rc.d/init.d/crond
+/sbin/chkconfig --add crond
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README
@@ -169,6 +181,6 @@ fi
 %files anacron
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/anacron
 %files anacron
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/anacron
-%attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron
+%attr(755,root,root) %{_sysconfdir}/cron.hourly/0anacron
 %{_mandir}/man5/anacrontab.5*
 %{_mandir}/man8/anacron.8*
 %{_mandir}/man5/anacrontab.5*
 %{_mandir}/man8/anacron.8*
This page took 0.037036 seconds and 4 git commands to generate.