summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-10-26 07:07:10 +0000
committerMike Frysinger <vapier@gentoo.org>2010-10-26 07:07:10 +0000
commitfbeb8289603a9091aae08a399507837fc95c4751 (patch)
tree5926e86bf80402deccaf7d10e448d2c0e2f6fdab /sys-process
parentstable x86, bug 341827 (diff)
downloadgentoo-2-fbeb8289603a9091aae08a399507837fc95c4751.tar.gz
gentoo-2-fbeb8289603a9091aae08a399507837fc95c4751.tar.bz2
gentoo-2-fbeb8289603a9091aae08a399507837fc95c4751.zip
Version bump #318703 by Sebastian Pipping.
(Portage version: 2.2_rc96/cvs/Linux x86_64)
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/dcron/ChangeLog9
-rw-r--r--sys-process/dcron/dcron-4.4.ebuild48
-rw-r--r--sys-process/dcron/files/dcron-4.4-ldflags.patch30
-rw-r--r--sys-process/dcron/files/dcron-4.4-pidfile.patch43
-rw-r--r--sys-process/dcron/files/dcron-4.4-prune.patch33
-rw-r--r--sys-process/dcron/files/dcron.confd-4.45
-rwxr-xr-xsys-process/dcron/files/dcron.init-4.424
7 files changed, 191 insertions, 1 deletions
diff --git a/sys-process/dcron/ChangeLog b/sys-process/dcron/ChangeLog
index f4f9bb245042..b817c0608963 100644
--- a/sys-process/dcron/ChangeLog
+++ b/sys-process/dcron/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-process/dcron
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/ChangeLog,v 1.16 2010/10/17 03:51:47 leio Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/ChangeLog,v 1.17 2010/10/26 07:07:10 vapier Exp $
+
+*dcron-4.4 (26 Oct 2010)
+
+ 26 Oct 2010; Mike Frysinger <vapier@gentoo.org> +files/dcron.confd-4.4,
+ +files/dcron.init-4.4, +dcron-4.4.ebuild, +files/dcron-4.4-ldflags.patch,
+ +files/dcron-4.4-pidfile.patch, +files/dcron-4.4-prune.patch:
+ Version bump #318703 by Sebastian Pipping.
17 Oct 2010; Mart Raudsepp <leio@gentoo.org> dcron-3.2-r1.ebuild:
Drop to ~mips
diff --git a/sys-process/dcron/dcron-4.4.ebuild b/sys-process/dcron/dcron-4.4.ebuild
new file mode 100644
index 000000000000..9d22c3570099
--- /dev/null
+++ b/sys-process/dcron/dcron-4.4.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/dcron-4.4.ebuild,v 1.1 2010/10/26 07:07:10 vapier Exp $
+
+EAPI="2"
+
+inherit cron toolchain-funcs
+
+DESCRIPTION="A cute little cron from Matt Dillon"
+HOMEPAGE="http://www.jimpryor.net/linux/dcron.html http://apollo.backplane.com/FreeSrc/"
+SRC_URI="http://www.jimpryor.net/linux/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ epatch "${FILESDIR}"/${P}-pidfile.patch
+ epatch "${FILESDIR}"/${P}-prune.patch
+ tc-export CC
+ cat <<-EOF > config
+ PREFIX = /usr
+ CRONTAB_GROUP = cron
+ EOF
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc CHANGELOG README "${FILESDIR}"/crontab
+
+ docrondir
+ docron crond -m0700 -o root -g wheel
+ docrontab
+
+ insinto /etc
+ doins "${FILESDIR}"/crontab || die
+ insinto /etc/cron.d
+ doins extra/prune-cronstamps || die
+ dodoc extra/run-cron extra/root.crontab
+
+ newinitd "${FILESDIR}"/dcron.init-4.4 dcron || die
+ newconfd "${FILESDIR}"/dcron.confd-4.4 dcron
+
+ insinto /etc/logrotate.d
+ newins extra/crond.logrotate dcron
+}
diff --git a/sys-process/dcron/files/dcron-4.4-ldflags.patch b/sys-process/dcron/files/dcron-4.4-ldflags.patch
new file mode 100644
index 000000000000..4120d3090331
--- /dev/null
+++ b/sys-process/dcron/files/dcron-4.4-ldflags.patch
@@ -0,0 +1,30 @@
+From 9f4d538a4427240a807b82225080a3ff1fac9d16 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 26 Oct 2010 01:38:18 -0400
+Subject: [PATCH] respect LDFLAGS env var while building
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3a89a3b..dc5b78f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -53,10 +53,10 @@ protos.h: $(SRCS) $(TABSRCS)
+ fgrep -h Prototype $(SRCS) $(TABSRCS) > protos.h
+
+ crond: $(OBJS)
+- $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o crond
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond
+
+ crontab: $(TABOBJS)
+- $(CC) $(CFLAGS) $(TABOBJS) -o crontab
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab
+
+ %.o: %.c defs.h $(PROTOS)
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $< -o $@
+--
+1.7.3.1
+
diff --git a/sys-process/dcron/files/dcron-4.4-pidfile.patch b/sys-process/dcron/files/dcron-4.4-pidfile.patch
new file mode 100644
index 000000000000..a5994f09e934
--- /dev/null
+++ b/sys-process/dcron/files/dcron-4.4-pidfile.patch
@@ -0,0 +1,43 @@
+From 14b0f33ebf33d3d08427fd4d9fd4bda3cc107bd0 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 26 Oct 2010 01:42:32 -0400
+Subject: [PATCH] crond: write a pid file
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 2 +-
+ main.c | 5 +++++
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index dc5b78f..e278312 100644
+--- a/Makefile
++++ b/Makefile
+@@ -38,7 +38,7 @@ DEFS = -DVERSION='"$(VERSION)"' \
+ -DTIMESTAMP_FMT='"$(TIMESTAMP_FMT)"'
+
+ # save variables needed for `make install` in config
+-all: $(PROTOS) crond crontab ;
++all: crond crontab ;
+ rm -f config
+ echo "PREFIX = $(PREFIX)" >> config
+ echo "SBINDIR = $(SBINDIR)" >> config
+diff --git a/main.c b/main.c
+index e4a742e..6313213 100644
+--- a/main.c
++++ b/main.c
+@@ -227,6 +227,11 @@ main(int ac, char **av)
+ exit(1);
+ } else if (pid > 0) {
+ /* parent */
++ FILE *fp;
++ if ((fp = fopen("/var/run/cron.pid", "w")) != NULL) {
++ fprintf(fp, "%d\n", pid);
++ fclose(fp);
++ }
+ exit(0);
+ }
+ /* child continues */
+--
+1.7.3.1
+
diff --git a/sys-process/dcron/files/dcron-4.4-prune.patch b/sys-process/dcron/files/dcron-4.4-prune.patch
new file mode 100644
index 000000000000..3a8ff950e2cc
--- /dev/null
+++ b/sys-process/dcron/files/dcron-4.4-prune.patch
@@ -0,0 +1,33 @@
+From 7d5633e67db8160b77df5e14bdcfb8cd579a9003 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 26 Oct 2010 02:11:12 -0400
+Subject: [PATCH] prune-cronstamps: reformat for cron.d usage
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ extra/prune-cronstamps | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+ mode change 100755 => 100644 extra/prune-cronstamps
+
+diff --git a/extra/prune-cronstamps b/extra/prune-cronstamps
+old mode 100755
+new mode 100644
+index c2973a5..9ce82a0
+--- a/extra/prune-cronstamps
++++ b/extra/prune-cronstamps
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++# /etc/cron.d/prune-cronstamps
+
+ # Prunes any files in /var/spool/cron/cronstamps that haven't been used in ninety days.
+ # We check that both mtime and atime are greater than this:
+@@ -10,5 +10,4 @@
+ # and so its atime won't be updated. At least its mtime will be updated when
+ # it's modified.
+
+-find /var/spool/cron/cronstamps -mtime +90 -atime +90 -delete
+-
++@weekly ID=prune-cronstamps find /var/spool/cron/cronstamps -mtime +90 -atime +90 -delete
+--
+1.7.3.1
+
diff --git a/sys-process/dcron/files/dcron.confd-4.4 b/sys-process/dcron/files/dcron.confd-4.4
new file mode 100644
index 000000000000..61cdf12b43a7
--- /dev/null
+++ b/sys-process/dcron/files/dcron.confd-4.4
@@ -0,0 +1,5 @@
+# /etc/conf.d/dcron
+
+# Options to pass to dcron at startup.
+# Default logging is via syslog; use -L to send to file.
+DCRON_OPTS=""
diff --git a/sys-process/dcron/files/dcron.init-4.4 b/sys-process/dcron/files/dcron.init-4.4
new file mode 100755
index 000000000000..791bae7ce8f1
--- /dev/null
+++ b/sys-process/dcron/files/dcron.init-4.4
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/files/dcron.init-4.4,v 1.1 2010/10/26 07:07:10 vapier Exp $
+
+depend() {
+ use logger clock hostname
+ provide cron
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ /usr/sbin/crond ${DCRON_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/cron.pid --exec /usr/sbin/crond
+ local ret=$?
+ rm -f /var/run/cron.pid
+ eend ${ret}
+}