Hello community,
here is the log from the commit of package cronie for openSUSE:Factory
checked in at Sat Oct 23 23:48:38 CEST 2010.
--------
--- cronie/cronie.changes 2010-08-26 03:40:00.000000000 +0200
+++ /mounts/work_src_done/STABLE/cronie/cronie.changes 2010-10-21 21:36:26.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Oct 21 19:32:39 UTC 2010 - cristian.rodriguez@opensuse.org
+
+- Update to cronie 1.4.5_git201010210619
+ * Fix broken ifdef HAS_FCHOWN
+ * Cronie supports "clustering" now.
+
+-------------------------------------------------------------------
+Wed Oct 13 17:42:15 UTC 2010 - mseben@gmail.com
+
+- added scriptlets and subpackage cron for propper update
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
cronie-1.4.5_git201007091204.tar.bz2
cronie.xml
New:
----
cron_to_cronie.README
cronie-1.4.5_git201010210619.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cronie.spec ++++++
--- /var/tmp/diff_new_pack.61q3Kd/_old 2010-10-23 23:48:00.000000000 +0200
+++ /var/tmp/diff_new_pack.61q3Kd/_new 2010-10-23 23:48:00.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package cronie (Version 1.4.5_git201007091204)
+# spec file for package cronie (Version 1.4.5_git201010210619)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -17,26 +17,30 @@
# norootforbuild
+# 3 : we don't need to do something with /etc/sysconfig/cron for now
+%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 xz
Url: https://fedorahosted.org/cronie/
License: MIT and BSD and GPLv2
Group: System/Daemons
-Requires: smtp_daemon
+Recommends: smtp_daemon
Recommends: postfix
AutoReqProv: on
-PreReq: permissions %fillup_prereq %insserv_prereq
-Version: 1.4.5_git201007091204
+PreReq: permissions %fillup_prereq %insserv_prereq cron
+Version: 1.4.5_git201010210619
Release: 1
+%{expand: %%define cronie_version %version}
Summary: Cron Daemon
-Source0: %name-%version.tar.bz2
+Source0: %name-%version.tar.xz
Source1: cron.init
Source2: run-crons
Source3: sample.root
Source4: deny.sample
Source5: cron.xml
Source6: cronie-rpmlintrc
+Source7: cron_to_cronie.README
# PATCH-FEATURE-OPENSUSE cronie-pam_config.diff added pam config file from old cron
Patch3: %name-pam_config.diff
# openSUSE set NHEADER_LINES to 3 - old openSUSE cron put three lines of comments
@@ -45,9 +49,11 @@
Patch4: %name-nheader_lines.diff
# we use cron.pid instead of crond.pid
Patch5: %name-crond_pid.diff
+Conflicts: cron <= 4.1
+# When finish update protection of sles11 we could uncomment line bellow and drop all
+# ugly hacks with subpackage cron needed for proper update proces
+# Obsoletes: cron <=4.x
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Provides: cron = 4.2
-Obsoletes: cron <= 4.1
%description
cron automatically starts programs at specific times. Add new entries
@@ -58,6 +64,17 @@
and cron.monthly. Scripts and programs that are located there are
started automatically.
+%package -n cron
+License: MIT and BSD and GPLv2
+Version: 4.2
+Release: 1
+Summary: Auxiliary package
+Group: System/Daemons
+Requires: %{name} = %{cronie_version}-%{release}
+
+%description -n cron
+Auxiliary package, needed for proper update from vixie-cron 4.1 to cronie 1.4.4
+
%package anacron
License: MIT and BSD and GPLv2
Summary: Utility for running regular jobs
@@ -72,8 +89,9 @@
%prep
%setup -q
%patch3 -p1
-%patch4 -p1
+%patch4
%patch5 -p1
+cp %{S:7} ./cron_to_cronie.README
%build
autoreconf -fiv
@@ -106,7 +124,40 @@
%{__install} -v -d %{buildroot}%{_sysconfdir}/omc/srvinfo.d/
%{__install} -v -m644 %{S:5} %{buildroot}%{_sysconfdir}/omc/srvinfo.d/
+%pre -n cron
+# check if we are doing "ugly" update from old 4.1 vixie-cron
+check_cron_mail_feature=`/usr/sbin/cron --help 2>&1 | /usr/bin/grep mail`
+# vixie-cron 4.1 doesn't contain mail fature
+if [ -e /usr/sbin/cron -a "${check_cron_mail_feature}" == "" ]; then
+ # save configs for cronie post-install phase
+ touch /var/run/update_from_old_cron
+ echo $1
+ for conf in %{cron_configs}
+ do
+ %__mv "$conf" "$conf.bk" ||:
+ done
+fi
+
+%pre
+if [ -e /var/run/update_from_old_cron ]; then
+ # restore configs
+ for conf in %{cron_configs}
+ do
+ %__mv "$conf.bk" "$conf" ||:
+ done
+fi
+
%post
+# when we are doing rename then we pretend update with set 2
+if [ -e /var/run/update_from_old_cron ]; then
+ set 2
+ %restart_on_update cron
+ # in %postun restart_on_update call try-restart but we don't have init script in this phase when
+ # we are doing "ugly" update, but don't panic, it produces only warning to stderr
+ echo "Please ignore message about missing init script(from postun) - when occurs, we will install init script later with cronie package"
+ %__mv /etc/init.d/cron /etc/init.d/cron.bk ||:
+ %__ln_s /bin/true /etc/init.d/cron
+fi
%{fillup_and_insserv -y cron}
%run_permissions
%verifyscript
@@ -117,7 +168,13 @@
%postun
%restart_on_update cron
-%{insserv_cleanup}
+%insserv_cleanup
+
+%posttrans
+if [ -e /var/run/update_from_old_cron ]; then
+ %{__rm} /var/run/update_from_old_cron ||:
+ %__mv /etc/init.d/cron.bk /etc/init.d/cron ||:
+fi
%post anacron
[ -e /var/spool/anacron/cron.daily ] || touch /var/spool/anacron/cron.daily
@@ -158,4 +215,8 @@
%{_mandir}/man5/anacrontab.*
%{_mandir}/man8/anacron.*
+%files -n cron
+%defattr(-,root,root,-)
+%doc cron_to_cronie.README
+
%changelog
++++++ cron_to_cronie.README ++++++
package cron 4.2 is only auxiliary package needed for proper renaming package cron to cronie
usefull links :
http://en.opensuse.org/Cron_replace
http://en.opensuse.org/Cron_rename
++++++ cronie-nheader_lines.diff ++++++
--- /var/tmp/diff_new_pack.61q3Kd/_old 2010-10-23 23:48:00.000000000 +0200
+++ /var/tmp/diff_new_pack.61q3Kd/_new 2010-10-23 23:48:00.000000000 +0200
@@ -1,17 +1,15 @@
-Index: cronie-1.4.3/src/crontab.c
-===================================================================
---- cronie-1.4.3.orig/src/crontab.c
-+++ cronie-1.4.3/src/crontab.c
-@@ -33,7 +33,7 @@
+--- src/crontab.c.orig
++++ src/crontab.c
+@@ -38,7 +38,7 @@
# include
participants (1)
-
root@hilbert.suse.de