[Lunar-commits] <moonbase> *cron*: Tweaked install procedure for hc-cron, vixie-cron and cronie.
Stefan Wold
ratler at lunar-linux.org
Sat Nov 7 14:50:36 CET 2009
commit 11c99b42ff65b0abf8441507217432e9dd06b214
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sat Nov 7 14:50:36 2009 +0100
*cron*: Tweaked install procedure for hc-cron, vixie-cron and cronie.
* Added cron-common module, contain files etc that all cronds have in common
* Added cron.plugin with cron-common. This plugin will install files from the following
directories inside a module: cron.d, cron.hourly, cron.weekly, cron.daily and cron.monthly
* cronie, vixie-cron, hc-cron now all depend on cron-common
* cronie: Version bumped to 1.4.3
* hc-cron: Version bumped to 0.87a
---
utils/cron-common/BUILD | 10 +++++++
utils/cron-common/DETAILS | 15 +++++++++++
utils/cron-common/PRE_BUILD | 1 +
utils/cron-common/plugin.d/cron.plugin | 43 ++++++++++++++++++++++++++++++++
utils/cronie/BUILD | 6 +---
utils/cronie/CONFLICTS | 1 -
utils/cronie/DEPENDS | 1 +
utils/cronie/DETAILS | 16 +++--------
utils/hc-cron/BUILD | 42 ++++++-------------------------
utils/hc-cron/CONFIGURE | 2 -
utils/hc-cron/CONFLICTS | 1 -
utils/hc-cron/DEPENDS | 3 +-
utils/hc-cron/DETAILS | 10 +++---
utils/hc-cron/crontab | 9 ------
utils/vixie-cron/BUILD | 12 +--------
utils/vixie-cron/CONFLICTS | 1 -
utils/vixie-cron/DEPENDS | 1 +
utils/vixie-cron/DETAILS | 5 +---
utils/vixie-cron/crontab | 15 -----------
19 files changed, 94 insertions(+), 100 deletions(-)
diff --git a/utils/cron-common/BUILD b/utils/cron-common/BUILD
new file mode 100644
index 0000000..1b1dc9d
--- /dev/null
+++ b/utils/cron-common/BUILD
@@ -0,0 +1,10 @@
+(
+
+ invoke_installwatch &&
+ mkdir -p /etc/cron.{daily,hourly,weekly,monthly,d} &&
+ install -m 755 $SOURCE_CACHE/$SOURCE /usr/bin/run-parts &&
+ [ -e /etc/crontab ] || install -m 644 $SOURCE_CACHE/$SOURCE2 /etc/crontab &&
+ touch /etc/cron.deny &&
+ devoke_installwatch
+
+) > $C_FIFO 2>&1
diff --git a/utils/cron-common/DETAILS b/utils/cron-common/DETAILS
new file mode 100644
index 0000000..d41f18f
--- /dev/null
+++ b/utils/cron-common/DETAILS
@@ -0,0 +1,15 @@
+ MODULE=cron-common
+ VERSION=0.1
+ SOURCE=run-parts-0.2
+ SOURCE2=crontab-0.1
+ SOURCE_URL=$PATCH_URL
+ SOURCE2_URL=$PATCH_URL
+ SOURCE_VFY=sha1:94d6d2d782e088bd379991c2899054d01802baab
+ SOURCE2_VFY=sha1:152be3e3a358d70eabe10957c3c6ba0651e5b7e9
+ MAINTAINER=ratler at lunar-linux.org
+ ENTERED=20091107
+ UPDATED=20091107
+ SHORT="Common cron files shared between all crond"
+cat <<EOF
+Common cron files shared between all crond.
+EOF
diff --git a/utils/cron-common/PRE_BUILD b/utils/cron-common/PRE_BUILD
new file mode 100644
index 0000000..27ba77d
--- /dev/null
+++ b/utils/cron-common/PRE_BUILD
@@ -0,0 +1 @@
+true
diff --git a/utils/cron-common/plugin.d/cron.plugin b/utils/cron-common/plugin.d/cron.plugin
new file mode 100644
index 0000000..f3cd192
--- /dev/null
+++ b/utils/cron-common/plugin.d/cron.plugin
@@ -0,0 +1,43 @@
+#!/bin/bash
+######################################################
+# #
+# cron.plugin - handling of cron files #
+# #
+######################################################
+# #
+# Copyright 2009 by Stefan Wold under GPLv2 #
+# #
+######################################################
+
+
+plugin_cron_post_build()
+{
+ local FILE CRONDIRS DIR
+ CRONDIRS="cron.d cron.daily cron.hourly cron.monthly cron.weekly"
+
+ debug_msg "plugin_cron_post_build ($@)"
+ for DIR in $CRONDIRS; do
+ if [ -d "$SCRIPT_DIRECTORY/$DIR" ]; then
+ verbose_msg "Handling '$DIR' files"
+ invoke_installwatch
+
+ [ -d /etc/$DIR ] || mkdir -p /etc/$DIR
+
+ for FILE in $SCRIPT_DIRECTORY/$DIR/*; do
+ if [ ! -f /etc/$DIR/$(basename $FILE) ]; then
+ verbose_msg "Installing $(basename $FILE) into /etc/$DIR"
+ if [ "$DIR" == "cron.d" ]; then
+ /usr/bin/install -g 0 -o 0 -m 0644 $FILE /etc/$DIR/
+ else
+ /usr/bin/install -g 0 -o 0 -m 0755 $FILE /etc/$DIR/
+ fi
+ fi
+ done
+ devoke_installwatch
+ fi
+ done
+
+ return 2
+}
+
+plugin_register BUILD_POST_BUILD plugin_cron_post_build
diff --git a/utils/cronie/BUILD b/utils/cronie/BUILD
index 6b9f5f4..4a481cc 100644
--- a/utils/cronie/BUILD
+++ b/utils/cronie/BUILD
@@ -14,10 +14,6 @@
chmod 6711 /usr/bin/crontab &&
- mkdir -p /etc/cron.{daily,hourly,weekly,monthly,d} &&
- install -m 755 $SOURCE_CACHE/$SOURCE2 /usr/bin/run-parts &&
- [ -e /etc/config.d/crond ] || install -m 644 $SOURCE_DIRECTORY/crond.sysconfig /etc/config.d/crond &&
- [ -e /etc/crontab ] || install -m 644 $SOURCE_CACHE/$SOURCE3 /etc/crontab &&
- touch /etc/cron.deny
+ [ -e /etc/config.d/crond ] || install -m 644 $SOURCE_DIRECTORY/crond.sysconfig /etc/config.d/crond
) > $C_FIFO 2>&1
diff --git a/utils/cronie/CONFLICTS b/utils/cronie/CONFLICTS
index e5b541b..43a4052 100644
--- a/utils/cronie/CONFLICTS
+++ b/utils/cronie/CONFLICTS
@@ -1,3 +1,2 @@
-conflicts fcron
conflicts hc-cron
conflicts vixie-cron
diff --git a/utils/cronie/DEPENDS b/utils/cronie/DEPENDS
new file mode 100644
index 0000000..4308063
--- /dev/null
+++ b/utils/cronie/DEPENDS
@@ -0,0 +1 @@
+depends cron-common
diff --git a/utils/cronie/DETAILS b/utils/cronie/DETAILS
index 002086c..3829f68 100644
--- a/utils/cronie/DETAILS
+++ b/utils/cronie/DETAILS
@@ -1,18 +1,12 @@
MODULE=cronie
- VERSION=1.4.1
+ VERSION=1.4.3
SOURCE=${MODULE}-${VERSION}.tar.gz
- SOURCE2=run-parts-0.2
- SOURCE3=crontab-0.1
- SOURCE_URL=http://people.su.se/~swold/cronie/
- SOURCE2_URL=$PATCH_URL
- SOURCE3_URL=$PATCH_URL
- SOURCE_VFY=sha1:6c6f7267fee94c55357bb019213cd4310375ee97
- SOURCE2_VFY=sha1:94d6d2d782e088bd379991c2899054d01802baab
- SOURCE3_VFY=sha1:152be3e3a358d70eabe10957c3c6ba0651e5b7e9
+ SOURCE_URL=https://fedorahosted.org/releases/c/r/cronie
+ SOURCE_VFY=sha1:60fbc45dde8c8c86e24c15cc9d8b5d3982b78537
MAINTAINER=ratler at lunar-linux.org
- WEB_SITE="https://fedorahosted.org/cronie"
+ WEB_SITE="https://fedorahosted.org/cronie/"
ENTERED=20080626
- UPDATED=20090829
+ UPDATED=20091107
SHORT="Cron daemon for executing programs at set times"
cat <<EOF
Cronie contains the standard UNIX daemon crond that runs specified
diff --git a/utils/hc-cron/BUILD b/utils/hc-cron/BUILD
index 609c8e3..f73b110 100644
--- a/utils/hc-cron/BUILD
+++ b/utils/hc-cron/BUILD
@@ -1,37 +1,11 @@
(
-
- sedit "s/SYS_TIME_H 1/SYS_TIME_H 0/" compat.h &&
- patch_it $SOURCE2 1 &&
-
- if [ "$SYSLOG" == "y" ]; then
- echo "#define SYSLOG 1" >> config.h
- fi &&
- if [ "$LOG_FILE" == "y" ]; then
- sedit "/LOG_FILE/d" pathnames.h
- fi &&
-
- make &&
- prepare_install &&
- make install &&
-
- mkdir -p /etc/cron.daily /etc/cron.hourly \
- /etc/cron.monthly /etc/cron.weekly &&
- if [ ! -e /etc/crontab ]; then
- install -m600 $SCRIPT_DIRECTORY/crontab /etc/crontab
- fi &&
-
- mkdir -p /var/cache/locate &&
- if [ -f /var/cache/locatedb ] ; then
- mv /var/cache/locatedb /var/cache/locate/locatedb
- fi &&
-
- if [ -e "/etc/init.d/crond.sh" ]; then
- rm -f /etc/init.d/crond.sh
- rm -f /etc/rc?.d/???crond.sh
- fi &&
-
- if [ -e "/usr/man/man?/cron*" ]; then
- rm -f /usr/man/man?/cron*
- fi
+ sedit "s;-m 4755 -o daemon;-m 4711 -o root;" src/Makefile.in &&
+ sedit "/^#define LOG_FILE/s;.*;/*&*/;" src/include/options.h &&
+ sedit "/#define SYSLOG/s;.*;#define SYSLOG;" src/include/options.h &&
+ sedit "/^SYSLOG/s;.*;SYSLOG = 1;" src/cron.conf &&
+ sedit "/^LOG_FILE/s;.*;LOG_FILE = NONE;" src/cron.conf &&
+ sedit "/^DENY_FILE/s;.*;DENY_FILE = /etc/cron.deny;" src/cron.conf &&
+
+ default_build
) > $C_FIFO 2>&1
diff --git a/utils/hc-cron/CONFIGURE b/utils/hc-cron/CONFIGURE
deleted file mode 100644
index 349e562..0000000
--- a/utils/hc-cron/CONFIGURE
+++ /dev/null
@@ -1,2 +0,0 @@
-mquery SYSLOG "Use syslog to log messages ?" y
-mquery LOG_FILE "disable direct logging to /var/log/cron ?" y
diff --git a/utils/hc-cron/CONFLICTS b/utils/hc-cron/CONFLICTS
index d500a2b..4e1ee23 100644
--- a/utils/hc-cron/CONFLICTS
+++ b/utils/hc-cron/CONFLICTS
@@ -1,3 +1,2 @@
-conflicts fcron
conflicts vixie-cron
conflicts cronie
diff --git a/utils/hc-cron/DEPENDS b/utils/hc-cron/DEPENDS
index e8a31eb..643cd71 100644
--- a/utils/hc-cron/DEPENDS
+++ b/utils/hc-cron/DEPENDS
@@ -1,2 +1,3 @@
-depends chkconfig &&
+depends chkconfig
+depends cron-common
depends heirloom-mailx
diff --git a/utils/hc-cron/DETAILS b/utils/hc-cron/DETAILS
index 4d4f94f..1bdad1c 100644
--- a/utils/hc-cron/DETAILS
+++ b/utils/hc-cron/DETAILS
@@ -1,12 +1,12 @@
MODULE=hc-cron
- VERSION=0.14
+ VERSION=0.87a
SOURCE=$MODULE-$VERSION.tar.gz
- SOURCE2=$MODULE-$VERSION-instloc-1.patch
- SOURCE_URL[0]=ftp://ftp.berlios.de/pub/$MODULE/
- SOURCE2_URL[0]=$PATCH_URL
+ SOURCE_URL=http://download.berlios.de/$MODULE
+ SOURCE_VFY=sha1:a4776f85f00165f9d5ec014c259afceadcc37c4c
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-0.87
WEB_SITE=http://hc-cron.berlios.de/
ENTERED=20011014
- UPDATED=20020418
+ UPDATED=20091107
SHORT="modified vixie cron periodic scheduler"
cat << EOF
hc-cron is a cron daemon for 'home computers'. It runs specified jobs
diff --git a/utils/hc-cron/crontab b/utils/hc-cron/crontab
deleted file mode 100644
index aec1dc6..0000000
--- a/utils/hc-cron/crontab
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# /etc/crontab - system crontab file
-#
-# see man crontab(5) for more information about this file.
-#
- at hourly root for i in /etc/cron.hourly/* ; do $i ; done > /dev/null 2>&1
- at daily root for d in /etc/cron.daily/* ; do $d ; done > /dev/null 2>&1
- at weekly root for w in /etc/cron.weekly/* ; do $w ; done > /dev/null 2>&1
- at monthly root for m in /etc/cron.monthly/* ; do $m ; done > /dev/null 2>&1
diff --git a/utils/vixie-cron/BUILD b/utils/vixie-cron/BUILD
index 422dea6..a22115b 100644
--- a/utils/vixie-cron/BUILD
+++ b/utils/vixie-cron/BUILD
@@ -12,16 +12,6 @@
autoconf &&
default_build &&
- chmod 6711 /usr/bin/crontab &&
- install -m 755 $SOURCE_CACHE/$SOURCE2 /usr/bin/run-parts &&
-
- mkdir -p /etc/cron.daily /etc/cron.hourly /etc/cron.d\
- /etc/cron.monthly /etc/cron.weekly &&
-
- touch /etc/cron.deny &&
-
- if [ ! -f /etc/crontab ]; then
- install -m 644 $SCRIPT_DIRECTORY/crontab /etc/crontab
- fi
+ chmod 6711 /usr/bin/crontab
) > $C_FIFO 2>&1
diff --git a/utils/vixie-cron/CONFLICTS b/utils/vixie-cron/CONFLICTS
index edca85f..35f7108 100644
--- a/utils/vixie-cron/CONFLICTS
+++ b/utils/vixie-cron/CONFLICTS
@@ -1,3 +1,2 @@
-conflicts fcron
conflicts hc-cron
conflicts cronie
diff --git a/utils/vixie-cron/DEPENDS b/utils/vixie-cron/DEPENDS
index f6f4d4a..3f99678 100644
--- a/utils/vixie-cron/DEPENDS
+++ b/utils/vixie-cron/DEPENDS
@@ -1,2 +1,3 @@
depends chkconfig
+depends cron-common
optional_depends "Linux-PAM" "" "" "for PAM support"
diff --git a/utils/vixie-cron/DETAILS b/utils/vixie-cron/DETAILS
index 50d7675..37c0eb7 100644
--- a/utils/vixie-cron/DETAILS
+++ b/utils/vixie-cron/DETAILS
@@ -1,15 +1,12 @@
MODULE=vixie-cron
VERSION=4.3
SOURCE=$MODULE-$VERSION.tar.bz2
- SOURCE2=run-parts-0.1
SOURCE_URL=http://download.lunar-linux.org/lunar/mirrors/
- SOURCE2_URL=$PATCH_URL
SOURCE_VFY=sha1:4b5692308b3548f8df92e2f3337a1226da0f45fd
- SOURCE2_VFY=sha1:9051ae770851bc3e8a7be9c616e651c4fdfbc24e
WEB_SITE=https://hosted.fedoraproject.org/projects/vixie-cron/
MAINTAINER=ratler at lunar-linux.org
ENTERED=20030301
- UPDATED=20071111
+ UPDATED=20091107
SHORT="A daemon that runs specified programs at scheduled times."
cat << EOF
Vixie cron is a standard UNIX daemon that runs specified programs at scheduled
diff --git a/utils/vixie-cron/crontab b/utils/vixie-cron/crontab
deleted file mode 100755
index 9c11389..0000000
--- a/utils/vixie-cron/crontab
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# /etc/crontab - system crontab file
-#
-# see man crontab(5) for more information about this file.
-#
-SHELL=/bin/bash
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-MAILTO=root
-HOME=/
-
- at hourly root run-parts /etc/cron.hourly
- at daily root run-parts /etc/cron.daily
- at weekly root run-parts /etc/cron.weekly
- at monthly root run-parts /etc/cron.monthly
-
More information about the Lunar-commits
mailing list