From d6f003ef5258d1d00327383dc4bf73d8b744c8fd Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 7 Nov 2008 05:05:57 +0000 Subject: [PATCH 1/4] Initialize branch F-10 for anacron --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..dc32377 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-10 From a0ac6d18fd470e058692cf9ebe6bf08af1c770a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Wed, 28 Jan 2009 13:21:55 +0000 Subject: [PATCH 2/4] - 477709 hack aroung problems with running jobs twice --- .cvsignore | 3 +++ anacron-2.3-hourly.patch | 37 ------------------------------------- anacron.spec | 35 +++++++++++++++++++++-------------- sources | 3 +++ 4 files changed, 27 insertions(+), 51 deletions(-) delete mode 100644 anacron-2.3-hourly.patch diff --git a/.cvsignore b/.cvsignore index 4fa487b..01e7a29 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,5 @@ anacron_2.3.orig.tar.gz anacron.init +anacrontab +runanacron +anacron.cron diff --git a/anacron-2.3-hourly.patch b/anacron-2.3-hourly.patch deleted file mode 100644 index e28ded5..0000000 --- a/anacron-2.3-hourly.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up anacron-2.3/fedora/anacron.daily.old anacron-2.3/fedora/anacron.daily ---- anacron-2.3/fedora/anacron.daily.old 2008-05-30 14:02:27.000000000 +0200 -+++ anacron-2.3/fedora/anacron.daily 2008-05-30 13:59:13.000000000 +0200 -@@ -0,0 +1,33 @@ -+#!/bin/bash -+# wait for 3:02 when /etc/crontab runs cron.daily -+if [ `date +%H` -le 4 ]; then -+ exit 0; -+fi -+ -+#delay - more computers on one line don't receive updates at the same time -+[ -f /etc/sysconfig/crontab ] && . /etc/sysconfig/crontab -+if [ ! -z "$DELAY" ]; then -+ if [ "$DELAY" != "0" ]; then -+ # Create md5sum of hostname (static over system lifetime) -+ md5sum="`echo ${HOSTNAME} | md5sum`" -+ -+ # Extract the first 3 hexdigits (12 Bit: 0-4095) -+ hexvalue="${md5sum:0:3}" -+ -+ # Create decimal value -+ decvalue="`printf "%d" "0x${hexvalue}"`" -+ -+ # Divide delay by factor -+ T_DELAY=$[ ${decvalue} / ${DELAY} ] -+ sleep $T_DELAY -+ fi -+fi -+# in case anacron is already running, -+# there will be log (daemon won't be running twice). -+if test -x /usr/bin/on_ac_power; then -+ /usr/bin/on_ac_power &> /dev/null -+ if test $? -eq 1; then -+ exit 0 -+ fi -+fi -+/usr/sbin/anacron -s diff --git a/anacron.spec b/anacron.spec index baf3855..d4f759d 100644 --- a/anacron.spec +++ b/anacron.spec @@ -1,20 +1,21 @@ Summary: A cron-like program that can run jobs lost during downtime Name: anacron Version: 2.3 -Release: 65%{?dist} +Release: 66%{?dist} License: GPLv2+ Group: System Environment/Base URL: http://packages.debian.org/stable/source/anacron Source: http://ftp.debian.org/debian/pool/main/a/anacron/%{name}_%{version}.orig.tar.gz Source1: anacrontab Source2: anacron.init +Source3: runanacron +Source4: anacron.cron Patch1: anacron_2.3-13.patch Patch2: anacron-2.3-mail-content-type-77108.patch Patch3: anacron-2.3-fdclose.patch Patch4: anacron-2.3-pic.patch Patch5: anacron-2.3-memleaking.patch Patch6: anacron-2.3-spooldir.patch -Patch7: anacron-2.3-hourly.patch Requires: crontabs Requires: initscripts @@ -47,7 +48,6 @@ reboots or hibernation. %patch4 -p1 -b .pic %patch5 -p1 -b .memleaking %patch6 -p1 -b .spool -%patch7 -p1 %build make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} @@ -62,16 +62,22 @@ cp anacron.8 $RPM_BUILD_ROOT/%{_mandir}/man8/ cp anacrontab.5 $RPM_BUILD_ROOT/%{_mandir}/man5/ cp %SOURCE1 $RPM_BUILD_ROOT/etc -for i in cron.daily cron.weekly cron.monthly cron.hourly;do +for i in cron.daily cron.weekly cron.monthly;do mkdir -p $RPM_BUILD_ROOT/etc/$i/ done -install -m755 fedora/anacron.daily $RPM_BUILD_ROOT/etc/cron.daily/0anacron -ln -s ../cron.daily/0anacron $RPM_BUILD_ROOT/etc/cron.weekly/0anacron -ln -s ../cron.daily/0anacron $RPM_BUILD_ROOT/etc/cron.monthly/0anacron +cp debian/0anacron.daily $RPM_BUILD_ROOT/etc/cron.daily/0anacron +cp debian/0anacron.monthly $RPM_BUILD_ROOT/etc/cron.monthly/0anacron +cp debian/0anacron.weekly $RPM_BUILD_ROOT/etc/cron.weekly/0anacron +#install -m755 fedora/anacron.daily $RPM_BUILD_ROOT/etc/cron.daily/0anacron +#ln -s ../cron.daily/0anacron $RPM_BUILD_ROOT/etc/cron.weekly/0anacron +#ln -s ../cron.daily/0anacron $RPM_BUILD_ROOT/etc/cron.monthly/0anacron mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/ install -c -m755 %SOURCE2 $RPM_BUILD_ROOT/etc/rc.d/init.d/anacron +install -c -m755 %SOURCE3 $RPM_BUILD_ROOT/usr/sbin/runanacron +mkdir -p $RPM_BUILD_ROOT/etc/cron.d +install -m644 %SOURCE4 $RPM_BUILD_ROOT/etc/cron.d/anacron %clean rm -rf $RPM_BUILD_ROOT @@ -102,15 +108,16 @@ fi /%{_mandir}/man5/* /%{_mandir}/man8/* /usr/sbin/anacron -%dir /etc/cron.hourly -%dir /etc/cron.daily -%dir /etc/cron.weekly -%dir /etc/cron.monthly -%dir /etc/cron.daily/0anacron -%dir /etc/cron.weekly/0anacron -%dir /etc/cron.monthly/0anacron +/usr/sbin/runanacron +/etc/cron.d/anacron +%attr(755,root,root) %dir /etc/cron.daily/0anacron +%attr(755,root,root) %dir /etc/cron.monthly/0anacron +%attr(755,root,root) %dir /etc/cron.weekly/0anacron %changelog +* Thu Jan 28 2009 Marcela Mašláňová 2.3-66 +- 477709 hack aroung problems with running jobs twice + * Fri Oct 24 2008 Marcela Mašláňová 2.3-65 - rewrite init script - using fedora guidelines SysVInitScript diff --git a/sources b/sources index f016dad..94141e6 100644 --- a/sources +++ b/sources @@ -1,2 +1,5 @@ 9fdfc50f5741643332722a9145146278 anacron_2.3.orig.tar.gz 094af5e05723d2c4924d60f73d738509 anacron.init +e4368e8f686c710f63027af0f213cfe5 anacrontab +1e65b1fcb49c7929645a1bd0baffd7ef runanacron +312b5eed93765e26e9d21f23bccc72c9 anacron.cron From 52dc08a01304863ea977f4c0068a9d2b05e6b73c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:27:35 +0000 Subject: [PATCH 3/4] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9fd3e6e..9770649 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: anacron -# $Id: Makefile,v 1.1 2004/09/09 02:58:39 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 18:35:42 notting Exp $ NAME := anacron SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 8dc819b4f5ec4b61b7f44f4394ca57ee3465d412 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 17:06:31 +0000 Subject: [PATCH 4/4] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 9770649..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: anacron -# $Id: Makefile,v 1.2 2007/10/15 18:35:42 notting Exp $ -NAME := anacron -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index dc32377..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-10