summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-05-16 20:28:54 +0000
committerMike Frysinger <vapier@gentoo.org>2011-05-16 20:28:54 +0000
commit129c4c96c29ec41f47b8dbe96ba415e755cc44fa (patch)
tree4363f4d3995b894e213185cc869a5ac60ec1114a /sys-process
parentAdd missing patch (diff)
downloadgentoo-2-129c4c96c29ec41f47b8dbe96ba415e755cc44fa.tar.gz
gentoo-2-129c4c96c29ec41f47b8dbe96ba415e755cc44fa.tar.bz2
gentoo-2-129c4c96c29ec41f47b8dbe96ba415e755cc44fa.zip
Version bump #366991 by Alec Moskvin.
(Portage version: 2.2.0_alpha32/cvs/Linux x86_64)
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/dcron/ChangeLog11
-rw-r--r--sys-process/dcron/dcron-4.5.ebuild55
-rw-r--r--sys-process/dcron/files/dcron-4.5-ldflags.patch38
-rw-r--r--sys-process/dcron/files/dcron-4.5-pidfile.patch43
-rwxr-xr-xsys-process/dcron/files/dcron.init-4.524
5 files changed, 169 insertions, 2 deletions
diff --git a/sys-process/dcron/ChangeLog b/sys-process/dcron/ChangeLog
index b817c0608963..d619c3a68851 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.17 2010/10/26 07:07:10 vapier Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/ChangeLog,v 1.18 2011/05/16 20:28:54 vapier Exp $
+
+*dcron-4.5 (16 May 2011)
+
+ 16 May 2011; Mike Frysinger <vapier@gentoo.org> +files/dcron.init-4.5,
+ +dcron-4.5.ebuild, +files/dcron-4.5-ldflags.patch,
+ +files/dcron-4.5-pidfile.patch:
+ Version bump #366991 by Alec Moskvin.
*dcron-4.4 (26 Oct 2010)
diff --git a/sys-process/dcron/dcron-4.5.ebuild b/sys-process/dcron/dcron-4.5.ebuild
new file mode 100644
index 000000000000..821647b7d420
--- /dev/null
+++ b/sys-process/dcron/dcron-4.5.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/dcron-4.5.ebuild,v 1.1 2011/05/16 20:28:54 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}"/${PN}-4.5-pidfile.patch
+ epatch "${FILESDIR}"/${PN}-4.5-ldflags.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.5 dcron || die
+ newconfd "${FILESDIR}"/dcron.confd-4.4 dcron
+
+ insinto /etc/logrotate.d
+ newins extra/crond.logrotate dcron
+}
+
+pkg_postinst() {
+ # upstream renamed their pid file
+ local src="${ROOT}/var/run/cron.pid" dst="${ROOT}/var/run/crond.pid"
+ if [ -e "${src}" -a ! -e "${dst}" ] ; then
+ cp "${src}" "${dst}"
+ fi
+}
diff --git a/sys-process/dcron/files/dcron-4.5-ldflags.patch b/sys-process/dcron/files/dcron-4.5-ldflags.patch
new file mode 100644
index 000000000000..7fa2d8d9d015
--- /dev/null
+++ b/sys-process/dcron/files/dcron-4.5-ldflags.patch
@@ -0,0 +1,38 @@
+From 8a292168e584c50808b80df3577a7d89fa32db26 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 16 May 2011 16:24:20 -0400
+Subject: [PATCH] drop LDFLAGS set, and restore CFLAGS linking
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1938e05..8309ad6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -32,7 +32,6 @@ TABSRCS = crontab.c chuser.c
+ TABOBJS = crontab.o chuser.o
+ PROTOS = protos.h
+ LIBS =
+-LDFLAGS =
+ DEFS = -DVERSION='"$(VERSION)"' \
+ -DSCRONTABS='"$(SCRONTABS)"' -DCRONTABS='"$(CRONTABS)"' \
+ -DCRONSTAMPS='"$(CRONSTAMPS)"' -DLOG_IDENT='"$(LOG_IDENT)"' \
+@@ -54,10 +53,10 @@ protos.h: $(SRCS) $(TABSRCS)
+ fgrep -h Prototype $(SRCS) $(TABSRCS) > protos.h
+
+ crond: $(OBJS)
+- $(CC) $(LDFLAGS) $^ $(LIBS) -o crond
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond
+
+ crontab: $(TABOBJS)
+- $(CC) $(LDFLAGS) $^ -o crontab
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab
+
+ %.o: %.c defs.h $(PROTOS)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@
+--
+1.7.5.rc3
+
diff --git a/sys-process/dcron/files/dcron-4.5-pidfile.patch b/sys-process/dcron/files/dcron-4.5-pidfile.patch
new file mode 100644
index 000000000000..6004c4c4b4d2
--- /dev/null
+++ b/sys-process/dcron/files/dcron-4.5-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/crond.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.init-4.5 b/sys-process/dcron/files/dcron.init-4.5
new file mode 100755
index 000000000000..9fca37fb7872
--- /dev/null
+++ b/sys-process/dcron/files/dcron.init-4.5
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2011 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.5,v 1.1 2011/05/16 20:28:54 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/crond.pid --exec /usr/sbin/crond
+ local ret=$?
+ rm -f /var/run/crond.pid
+ eend ${ret}
+}