diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-05-19 13:58:16 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-05-19 14:00:15 -0400 |
commit | f02009154eaf1a4daf6ccbd528b2c9958b84f946 (patch) | |
tree | fed6164593616dc912d4bde2f5a6dc7862b782dc /sys-process/dcron | |
parent | sys-process/fcron: drop bash dep #580274 (diff) | |
download | gentoo-f02009154eaf1a4daf6ccbd528b2c9958b84f946.tar.gz gentoo-f02009154eaf1a4daf6ccbd528b2c9958b84f946.tar.bz2 gentoo-f02009154eaf1a4daf6ccbd528b2c9958b84f946.zip |
sys-process/dcron: clean up FILESDIR
Drop a bunch of unused files and collapse the duplicate init scripts.
Should be no functional changes here.
Diffstat (limited to 'sys-process/dcron')
-rw-r--r-- | sys-process/dcron/dcron-4.5-r1.ebuild | 4 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron | 24 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-2.9-EDITOR.patch | 20 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-2.9-Makefile.patch | 27 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-3.2-build.patch | 16 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-3.2-pidfile.patch | 20 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-4.4-ldflags.patch | 30 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-4.4-pidfile.patch | 43 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron-4.4-prune.patch | 33 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron.confd | 7 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron.confd-4.4 | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | sys-process/dcron/files/dcron.init | 13 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron.init-4.4 | 24 | ||||
-rw-r--r-- | sys-process/dcron/files/dcron.init-4.5 | 24 | ||||
-rw-r--r-- | sys-process/dcron/metadata.xml | 8 |
15 files changed, 15 insertions, 283 deletions
diff --git a/sys-process/dcron/dcron-4.5-r1.ebuild b/sys-process/dcron/dcron-4.5-r1.ebuild index ab94c00eb33b..c1c26f026825 100644 --- a/sys-process/dcron/dcron-4.5-r1.ebuild +++ b/sys-process/dcron/dcron-4.5-r1.ebuild @@ -39,8 +39,8 @@ src_install() { doins extra/prune-cronstamps dodoc extra/run-cron extra/root.crontab - newinitd "${FILESDIR}"/dcron.init-4.5 dcron - newconfd "${FILESDIR}"/dcron.confd-4.4 dcron + newinitd "${FILESDIR}"/dcron.init dcron + newconfd "${FILESDIR}"/dcron.confd dcron systemd_dounit "${FILESDIR}"/dcron.service insinto /etc/logrotate.d diff --git a/sys-process/dcron/files/dcron b/sys-process/dcron/files/dcron deleted file mode 100644 index b80e826f61d9..000000000000 --- a/sys-process/dcron/files/dcron +++ /dev/null @@ -1,24 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -depend() { - use logger clock hostname - provide cron -} - -start() { - ebegin "Starting dcron" - start-stop-daemon --start --quiet --exec /usr/sbin/crond \ - -- >>/var/log/cron.log 2>&1 - /usr/bin/pgrep -x -u 0 -P 1 crond > /var/run/cron.pid - eend $? -} - -stop() { - ebegin "Stopping dcron" - start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid \ - --exec /usr/sbin/crond - eend $? -} diff --git a/sys-process/dcron/files/dcron-2.9-EDITOR.patch b/sys-process/dcron/files/dcron-2.9-EDITOR.patch deleted file mode 100644 index 08c20bc0d13e..000000000000 --- a/sys-process/dcron/files/dcron-2.9-EDITOR.patch +++ /dev/null @@ -1,20 +0,0 @@ -fix 'crontab -e' to look at $EDITOR and not $VISUAL - ---- crontab.1 -+++ crontab.1 -@@ -27,5 +27,5 @@ - specify a different user and/or crontab directory. Generally the -e - option is used to edit your crontab. crontab will use /usr/bin/vi or --the editor specified by your VISUAL environment variable to edit the -+the editor specified by your EDITOR environment variable to edit the - crontab. - .PP ---- crontab.c -+++ crontab.c -@@ -312,5 +312,5 @@ - if (ChangeUser(user, 1) < 0) - exit(0); -- if ((ptr = getenv("VISUAL")) == NULL || strlen(ptr) > 256) -+ if ((ptr = getenv("EDITOR")) == NULL || strlen(ptr) > 256) - ptr = PATH_VI; - diff --git a/sys-process/dcron/files/dcron-2.9-Makefile.patch b/sys-process/dcron/files/dcron-2.9-Makefile.patch deleted file mode 100644 index 88b542042185..000000000000 --- a/sys-process/dcron/files/dcron-2.9-Makefile.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- Makefile -+++ Makefile -@@ -2,7 +2,8 @@ - # - - CC = gcc --CFLAGS = -O2 -Wall -Wstrict-prototypes -+CFLAGS += -Wall -Wstrict-prototypes -+LDFLAGS += -Wl,-z,now - LIB = - SRCS = main.c subs.c database.c job.c - OBJS = main.o subs.o database.o job.o -@@ -14,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 diff --git a/sys-process/dcron/files/dcron-3.2-build.patch b/sys-process/dcron/files/dcron-3.2-build.patch deleted file mode 100644 index 0dfdad202b0c..000000000000 --- a/sys-process/dcron/files/dcron-3.2-build.patch +++ /dev/null @@ -1,16 +0,0 @@ -fix parallel build - -http://bugs.gentoo.org/181043 - ---- dcron/Makefile -+++ dcron/Makefile -@@ -13,7 +13,8 @@ - PROTOS= protos.h - DISTTAR= /home/dillon/htdocs/FreeSrc/dcron32.tgz - --all: ${PROTOS} crond crontab -+all: crond crontab -+${OBJS} ${D_OBJS}: ${PROTOS} - - crond: ${OBJS} - ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} ${LDFLAGS} diff --git a/sys-process/dcron/files/dcron-3.2-pidfile.patch b/sys-process/dcron/files/dcron-3.2-pidfile.patch deleted file mode 100644 index 9ef687746909..000000000000 --- a/sys-process/dcron/files/dcron-3.2-pidfile.patch +++ /dev/null @@ -1,20 +0,0 @@ -write out a pidfile - ---- dcron/main.c -+++ dcron/main.c -@@ -120,8 +120,14 @@ - perror("fork"); - exit(1); - } -- if (pid > 0) -+ if (pid > 0) { -+ FILE *fp; -+ if ((fp = fopen("/var/run/cron.pid", "w")) != NULL) { -+ fprintf(fp, "%d\n", pid); -+ fclose(fp); -+ } - exit(0); -+ } - } - - /* diff --git a/sys-process/dcron/files/dcron-4.4-ldflags.patch b/sys-process/dcron/files/dcron-4.4-ldflags.patch deleted file mode 100644 index 4120d3090331..000000000000 --- a/sys-process/dcron/files/dcron-4.4-ldflags.patch +++ /dev/null @@ -1,30 +0,0 @@ -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 deleted file mode 100644 index a5994f09e934..000000000000 --- a/sys-process/dcron/files/dcron-4.4-pidfile.patch +++ /dev/null @@ -1,43 +0,0 @@ -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 deleted file mode 100644 index 3a8ff950e2cc..000000000000 --- a/sys-process/dcron/files/dcron-4.4-prune.patch +++ /dev/null @@ -1,33 +0,0 @@ -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 b/sys-process/dcron/files/dcron.confd index 48b41577679d..61cdf12b43a7 100644 --- a/sys-process/dcron/files/dcron.confd +++ b/sys-process/dcron/files/dcron.confd @@ -1,8 +1,5 @@ # /etc/conf.d/dcron -# Options to pass to dcron at startup +# Options to pass to dcron at startup. +# Default logging is via syslog; use -L to send to file. DCRON_OPTS="" - -# Logfile to send log output to -# Default is /var/log/cron.log, set to /dev/null to disable logging -DCRON_LOG="/var/log/cron.log" diff --git a/sys-process/dcron/files/dcron.confd-4.4 b/sys-process/dcron/files/dcron.confd-4.4 deleted file mode 100644 index 61cdf12b43a7..000000000000 --- a/sys-process/dcron/files/dcron.confd-4.4 +++ /dev/null @@ -1,5 +0,0 @@ -# /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 b/sys-process/dcron/files/dcron.init index 6a8bb8c8d956..eccff493b369 100644..100755 --- a/sys-process/dcron/files/dcron.init +++ b/sys-process/dcron/files/dcron.init @@ -1,7 +1,6 @@ #!/sbin/openrc-run -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ depend() { use logger clock hostname @@ -9,16 +8,16 @@ depend() { } start() { - ebegin "Starting dcron" - /usr/sbin/crond ${DCRON_OPTS} >> ${DCRON_LOG:=/var/log/cron.log} 2>&1 + ebegin "Starting ${SVCNAME}" + /usr/sbin/crond ${DCRON_OPTS} eend $? } stop() { - ebegin "Stopping dcron" + ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --quiet \ - --pidfile /var/run/cron.pid --exec /usr/sbin/crond + --pidfile /var/run/crond.pid --exec /usr/sbin/crond local ret=$? - rm -f /var/run/cron.pid + rm -f /var/run/crond.pid eend ${ret} } diff --git a/sys-process/dcron/files/dcron.init-4.4 b/sys-process/dcron/files/dcron.init-4.4 deleted file mode 100644 index 4e6a734df092..000000000000 --- a/sys-process/dcron/files/dcron.init-4.4 +++ /dev/null @@ -1,24 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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} -} diff --git a/sys-process/dcron/files/dcron.init-4.5 b/sys-process/dcron/files/dcron.init-4.5 deleted file mode 100644 index d359914125d2..000000000000 --- a/sys-process/dcron/files/dcron.init-4.5 +++ /dev/null @@ -1,24 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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} -} diff --git a/sys-process/dcron/metadata.xml b/sys-process/dcron/metadata.xml index 1834b57a8213..30cd90ed98ad 100644 --- a/sys-process/dcron/metadata.xml +++ b/sys-process/dcron/metadata.xml @@ -2,10 +2,12 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>vapier@gentoo.org</email> + <email>vapier@gentoo.org</email> </maintainer> <maintainer type="project"> - <email>cron-bugs@gentoo.org</email> - <name>Gentoo Cron Project</name> + <email>cron-bugs@gentoo.org</email> </maintainer> +<upstream> + <remote-id type="github">dubiousjim/dcron</remote-id> +</upstream> </pkgmetadata> |