|
@@ -1,23 +1,33 @@
|
|
|
-%bcond_without selinux
|
|
|
+%bcond_with selinux
|
|
|
%bcond_without pam
|
|
|
%bcond_without audit
|
|
|
%bcond_without inotify
|
|
|
|
|
|
+%define ver 1.4.11
|
|
|
+%define rel 1
|
|
|
+
|
|
|
Summary: Cron daemon for executing programs at set times
|
|
|
Name: cronie
|
|
|
-Version: 1.4.11
|
|
|
-Release: 11%{?dist}
|
|
|
+Version: %{ver}
|
|
|
+Release: %{rel}%{?_dist_release}
|
|
|
License: MIT and BSD and ISC and GPLv2+
|
|
|
Group: System Environment/Base
|
|
|
URL: https://fedorahosted.org/cronie
|
|
|
Source0: https://fedorahosted.org/releases/c/r/cronie/%{name}-%{version}.tar.gz
|
|
|
-Patch0: cronie-systemd.patch
|
|
|
+# from cronie 1.4.8 tarball
|
|
|
+Source1: cronie.init
|
|
|
+#Patch0: cronie-systemd.patch
|
|
|
Patch1: cronie-1.4.11-fcntl_locking.patch
|
|
|
Patch2: cronie-1.4.11-pamenv.patch
|
|
|
Patch3: cronie-1.4.11-man-debug.patch
|
|
|
Patch4: cronie-check-config-param.patch
|
|
|
|
|
|
Requires: dailyjobs
|
|
|
+Conflicts: vixie-cron
|
|
|
+
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
+Packager: iwaim
|
|
|
|
|
|
%if %{with selinux}
|
|
|
Requires: libselinux >= 2.0.64
|
|
@@ -31,14 +41,9 @@ Buildrequires: pam-devel >= 1.0.1
|
|
|
Buildrequires: audit-libs-devel >= 1.4.1
|
|
|
%endif
|
|
|
|
|
|
-BuildRequires: systemd
|
|
|
-Obsoletes: %{name}-sysvinit
|
|
|
-
|
|
|
-Requires(post): coreutils sed
|
|
|
-Requires(post): systemd
|
|
|
-Requires(preun): systemd
|
|
|
-Requires(postun): systemd
|
|
|
-Requires(post): systemd
|
|
|
+Requires(post): coreutils sed
|
|
|
+Requires(post): chkconfig
|
|
|
+Requires(preun): chkconfig
|
|
|
|
|
|
%description
|
|
|
Cronie contains the standard UNIX daemon crond that runs specified programs at
|
|
@@ -80,7 +85,7 @@ extra features.
|
|
|
|
|
|
%prep
|
|
|
%setup -q
|
|
|
-%patch0 -p1
|
|
|
+#%patch0 -p1
|
|
|
%patch1 -p1
|
|
|
%patch2 -p1
|
|
|
%patch3 -p1
|
|
@@ -128,13 +133,13 @@ touch $RPM_BUILD_ROOT/var/spool/anacron/cron.monthly
|
|
|
# noanacron package
|
|
|
install -m 644 contrib/dailyjobs $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/dailyjobs
|
|
|
|
|
|
-# install systemd initscript
|
|
|
-mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system/
|
|
|
-install -m 644 contrib/cronie.systemd $RPM_BUILD_ROOT/usr/lib/systemd/system/crond.service
|
|
|
+# install initscript
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_initddir}
|
|
|
+install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/crond
|
|
|
|
|
|
%post
|
|
|
# run after an installation
|
|
|
-%systemd_post crond.service
|
|
|
+/sbin/chkconfig --add crond
|
|
|
|
|
|
%post anacron
|
|
|
[ -e /var/spool/anacron/cron.daily ] || touch /var/spool/anacron/cron.daily
|
|
@@ -143,38 +148,16 @@ install -m 644 contrib/cronie.systemd $RPM_BUILD_ROOT/usr/lib/systemd/system/cro
|
|
|
|
|
|
%preun
|
|
|
# run before a package is removed
|
|
|
-%systemd_preun crond.service
|
|
|
+if [ "$1" -eq 0 ]; then
|
|
|
+ /sbin/service crond stop >/dev/null 2>&1
|
|
|
+ /sbin/chkconfig --del crond
|
|
|
+fi
|
|
|
|
|
|
%postun
|
|
|
# run after a package is removed
|
|
|
-%systemd_postun_with_restart crond.service
|
|
|
-
|
|
|
-%triggerun -- cronie-anacron < 1.4.1
|
|
|
-# empty /etc/crontab in case there are only old regular jobs
|
|
|
-cp -a /etc/crontab /etc/crontab.rpmsave
|
|
|
-sed -e '/^01 \* \* \* \* root run-parts \/etc\/cron\.hourly/d'\
|
|
|
- -e '/^02 4 \* \* \* root run-parts \/etc\/cron\.daily/d'\
|
|
|
- -e '/^22 4 \* \* 0 root run-parts \/etc\/cron\.weekly/d'\
|
|
|
- -e '/^42 4 1 \* \* root run-parts \/etc\/cron\.monthly/d' /etc/crontab.rpmsave > /etc/crontab
|
|
|
-exit 0
|
|
|
-
|
|
|
-%triggerun -- cronie < 1.4.7-2
|
|
|
-# Save the current service runlevel info
|
|
|
-# User must manually run systemd-sysv-convert --apply crond
|
|
|
-# to migrate them to systemd targets
|
|
|
-/usr/bin/systemd-sysv-convert --save crond
|
|
|
-
|
|
|
-# The package is allowed to autostart:
|
|
|
-/bin/systemctl enable crond.service >/dev/null 2>&1
|
|
|
-
|
|
|
-/sbin/chkconfig --del crond >/dev/null 2>&1 || :
|
|
|
-/bin/systemctl try-restart crond.service >/dev/null 2>&1 || :
|
|
|
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
|
-
|
|
|
-%triggerin -- pam, glibc, libselinux
|
|
|
-# changes in pam, glibc or libselinux can make crond crash
|
|
|
-# when it calls pam
|
|
|
-/bin/systemctl try-restart crond.service >/dev/null 2>&1 || :
|
|
|
+if [ "$1" -ge "1" ]; then
|
|
|
+ /sbin/service crond condrestart >/dev/null 2>&1 || :
|
|
|
+fi
|
|
|
|
|
|
%files
|
|
|
%doc AUTHORS COPYING INSTALL README ChangeLog
|
|
@@ -192,7 +175,7 @@ exit 0
|
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/crond
|
|
|
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/cron.deny
|
|
|
%attr(0644,root,root) %{_sysconfdir}/cron.d/0hourly
|
|
|
-%attr(0644,root,root) /usr/lib/systemd/system/crond.service
|
|
|
+%attr(0755,root,root) %{_initddir}/crond
|
|
|
|
|
|
%files anacron
|
|
|
%{_sbindir}/anacron
|
|
@@ -209,6 +192,9 @@ exit 0
|
|
|
%attr(0644,root,root) %{_sysconfdir}/cron.d/dailyjobs
|
|
|
|
|
|
%changelog
|
|
|
+* Thu Jun 26 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.4.11-1
|
|
|
+- initial build for Vine Linux
|
|
|
+
|
|
|
* Mon Jan 27 2014 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-11
|
|
|
- now it's work even on ppc64, all checks working correctly
|
|
|
- Related: rhbz#1031384
|