dcron: update to 3.2

This commit is contained in:
Juergen Daubert 2008-09-25 12:00:54 +02:00
parent 3765e0fa4b
commit 49da11c325
6 changed files with 77 additions and 107 deletions

View File

@ -1,4 +1,5 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/cron.d/
drwxr-xr-x root/root etc/cron/
drwxr-xr-x root/root etc/cron/daily/
drwxr-xr-x root/root etc/cron/monthly/

View File

@ -1,5 +1,5 @@
3540f192c0d50dbc566211ac7052f39e crond
1a208f09e660c72f0117185289b2c109 crond
3e71eb70863bea6491bf4b3ac291a7b0 crontab
d0d819a48773b4f3f9f2f8322ca64097 dcron-2.3.3.patch
537cda2dff7dfaf87660fee91b2cf78f dcron-2.3.3.tar.gz
adf3ad8cb05ea391b9a9169ddcccaba4 dcron-3.2.patch
c2c816deb389b4bfb00761f26afe3efd dcron32.tgz
d80b27b1b9532890136c14d30e2a0d2b runjobs

View File

@ -1,23 +1,29 @@
# Description: Multi-user cron daemon
# URL: http://freshmeat.net/projects/dcron/
# URL: http://apollo.backplane.com/FreeSrc
# Maintainer: CRUX System Team, core-ports at crux dot nu
name=dcron
version=2.3.3
release=10
source=(http://www.ibiblio.org/pub/linux/system/daemons/cron/$name-$version.tar.gz \
crontab runjobs crond $name-$version.patch)
version=3.2
release=1
source=(http://apollo.backplane.com/FreeSrc/dcron32.tgz \
crontab runjobs crond $name-$version.patch)
build() {
cd $name-$version
patch -p1 < ../$name-$version.patch
cd $name
patch -p1 -i $SRC/$name-$version.patch
make
make DESTDIR=$PKG install
mkdir -p $PKG/var/{spool,log} $PKG/etc/cron/{daily,weekly,monthly}
install -D -m 600 ../crontab $PKG/var/spool/cron/crontabs/root
install -D -m 755 ../crond $PKG/etc/rc.d/crond
install -D -m 755 ../runjobs $PKG/usr/sbin/runjobs
chmod 0700 $PKG/var/spool/cron/crontabs
install -d $PKG/var/{spool/cron,log}
install -d $PKG/etc/{cron.d,cron/{daily,weekly,monthly}}
install -d -m 700 $PKG/var/spool/cron/crontabs
install -m 600 $SRC/crontab $PKG/var/spool/cron/crontabs/root
ln -s ../var/spool/cron/crontabs/root $PKG/etc/crontab
install -D -m 755 $SRC/crond $PKG/etc/rc.d/crond
install -D -m 755 $SRC/runjobs $PKG/usr/sbin/runjobs
touch $PKG/var/log/cron
}

View File

@ -5,7 +5,7 @@
case $1 in
start)
/usr/sbin/crond &> /var/log/cron
/usr/sbin/crond >> /var/log/cron 2>&1
;;
stop)
killall -q /usr/sbin/crond

View File

@ -1,91 +0,0 @@
diff -ru dcron-2.3.3/Makefile dcron-2.3.3-new/Makefile
--- dcron-2.3.3/Makefile Fri Sep 5 21:42:44 1997
+++ dcron-2.3.3-new/Makefile Thu Aug 9 22:23:34 2001
@@ -1,8 +1,9 @@
# Makefile for dillon's cron and crontab
#
+DESTDIR =
CC = gcc
-CFLAGS = -O2 -Wall -Wstrict-prototypes
+CFLAGS += -Wall -Wstrict-prototypes
LIB =
SRCS = main.c subs.c database.c job.c
OBJS = main.o subs.o database.o job.o
@@ -13,12 +14,10 @@
all: ${PROTOS} crond crontab
crond: ${OBJS}
- ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB}
- strip crond
+ ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} ${LDFLAGS}
crontab: ${D_OBJS}
- ${CC} ${CFLAGS} -o crontab ${D_OBJS}
- strip crontab
+ ${CC} ${CFLAGS} -o crontab ${D_OBJS} ${LDFLAGS}
protos.h: ${SRCS} ${D_SRCS}
fgrep -h Prototype ${SRCS} ${D_SRCS} >protos.h
@@ -30,10 +29,10 @@
rm -f *.o dcron.tgz $(PROTOS)
install: crond crontab
- install -o root -g root -m 0755 crond /usr/sbin
- install -o root -g root -m 4755 crontab /usr/bin
- install -o root -g root crontab.1 /usr/man/man1
- install -o root -g root crond.8 /usr/man/man8
+ install -o root -g root -m 0755 -D crond $(DESTDIR)/usr/sbin/crond
+ install -o root -g root -m 4755 -D crontab $(DESTDIR)/usr/bin/crontab
+ install -o root -g root -m 0644 -D crontab.1 $(DESTDIR)/usr/man/man1/crontab.1
+ install -o root -g root -m 0644 -D crond.8 $(DESTDIR)/usr/man/man8/crond.8
tar: cleano
(cd ..; tar cvf - dcron | gzip -9 >dcron.tgz.tmp)
diff -ru dcron-2.3.3/defs.h dcron-2.3.3-new/defs.h
--- dcron-2.3.3/defs.h Fri Sep 5 21:44:32 1997
+++ dcron-2.3.3-new/defs.h Thu Aug 9 22:23:53 2001
@@ -35,7 +35,7 @@
#define OPEN_MAX 256
#endif
#ifndef SENDMAIL
-#define SENDMAIL "/usr/lib/sendmail"
+#define SENDMAIL "/usr/sbin/sendmail"
#endif
#ifndef SENDMAIL_ARGS
#define SENDMAIL_ARGS "-t", "-oem", "-i"
diff -ru dcron-2.3.3/subs.c dcron-2.3.3-new/subs.c
--- dcron-2.3.3/subs.c Mon Feb 16 20:35:10 1998
+++ dcron-2.3.3-new/subs.c Thu Aug 9 22:23:34 2001
@@ -15,7 +15,7 @@
Prototype int ChangeUser(const char *user, short dochdir);
Prototype void vlog(int level, int fd, const char *ctl, va_list va);
Prototype int slog(char *buf, size_t sz, const char *ctl, va_list va, short useDate);
-Prototype char *strdup(const char *);
+/*Prototype char *strdup(const char *);*/
void
log9(const char *ctl, ...)
@@ -80,7 +80,7 @@
buf[0] = 0;
if (useDate)
- strftime(buf, 128, "%d-%b-%y %H:%M ", tp);
+ strftime(buf, 128, "%d-%b-%Y %H:%M ", tp);
vsnprintf(buf + strlen(buf), sz - strlen(buf), ctl, va);
return(strlen(buf));
}
@@ -131,6 +131,7 @@
return(pas->pw_uid);
}
+/*
char *
strdup(const char *str)
{
@@ -140,4 +141,4 @@
strcpy(ptr, str);
return(ptr);
}
-
+*/

54
dcron/dcron-3.2.patch Normal file
View File

@ -0,0 +1,54 @@
diff -Nru dcron.orig/Makefile dcron/Makefile
--- dcron.orig/Makefile 2008-09-24 10:10:19.000000000 +0200
+++ dcron/Makefile 2008-09-24 14:48:17.000000000 +0200
@@ -3,7 +3,7 @@
DESTDIR ?= /usr/local
CC = gcc
-CFLAGS = -O2 -Wall -Wstrict-prototypes
+CFLAGS += -Wall -Wstrict-prototypes -D_GNU_SOURCE -DSENDMAIL="\"/usr/sbin/sendmail\""
LIB =
SRCS = main.c subs.c database.c job.c
OBJS = main.o subs.o database.o job.o
@@ -15,12 +15,10 @@
all: ${PROTOS} crond crontab
crond: ${OBJS}
- ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB}
- strip crond
+ ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} ${LDFLAGS}
crontab: ${D_OBJS}
- ${CC} ${CFLAGS} -o crontab ${D_OBJS}
- strip crontab
+ ${CC} ${CFLAGS} -o crontab ${D_OBJS} ${LDFLAGS}
protos.h: ${SRCS} ${D_SRCS}
fgrep -h Prototype ${SRCS} ${D_SRCS} >protos.h
@@ -32,10 +30,10 @@
rm -f *.o dcron.tgz ${PROTOS}
install:
- install -o root -g wheel -m 0755 crond ${DESTDIR}/sbin/crond
- install -o root -g wheel -m 4755 crontab ${DESTDIR}/bin/crontab
- install -o root -g wheel -m 0644 crontab.1 ${DESTDIR}/man/man1/crontab.1
- install -o root -g wheel -m 0644 crond.8 ${DESTDIR}/man/man8/crond.8
+ install -o root -g root -m 0755 -D crond $(DESTDIR)/usr/sbin/crond
+ install -o root -g root -m 4755 -D crontab $(DESTDIR)/usr/bin/crontab
+ install -o root -g root -m 0644 -D crontab.1 $(DESTDIR)/usr/man/man1/crontab.1
+ install -o root -g root -m 0644 -D crond.8 $(DESTDIR)/usr/man/man8/crond.8
# dillon-specific
#
diff -Nru dcron.orig/subs.c dcron/subs.c
--- dcron.orig/subs.c 2008-09-24 10:10:19.000000000 +0200
+++ dcron/subs.c 2008-09-24 14:44:30.000000000 +0200
@@ -79,7 +79,7 @@
buf[0] = 0;
if (useDate)
- strftime(buf, 128, "%d-%b-%y %H:%M ", tp);
+ strftime(buf, 128, "%d-%b-%Y %H:%M ", tp);
vsnprintf(buf + strlen(buf), nmax, ctl, va);
return(strlen(buf));
}