aboutsummaryrefslogtreecommitdiff
path: root/sysutils/fcron
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-05-08 09:33:26 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-05-08 09:33:26 +0000
commit1eaca4435a9b6d940fa4f009d6452f3d0a44d908 (patch)
tree821c465a7112fc7fafa33b298c44fafe53b13014 /sysutils/fcron
parentb532c3aa77eb39cb50e857067f30b48eddc6d64a (diff)
downloadports-1eaca4435a9b6d940fa4f009d6452f3d0a44d908.tar.gz
ports-1eaca4435a9b6d940fa4f009d6452f3d0a44d908.zip
sysutils/fcron: 3.0.6 -> 3.2.0
Changes: http://fcron.free.fr/doc/en/changes.html - updated maintainer mail PR: 209139 Submitted by: bob@eager.cx (maintainer)
Notes
Notes: svn path=/head/; revision=414794
Diffstat (limited to 'sysutils/fcron')
-rw-r--r--sysutils/fcron/Makefile41
-rw-r--r--sysutils/fcron/distinfo4
-rw-r--r--sysutils/fcron/files/fcron.in11
-rw-r--r--sysutils/fcron/files/patch-configure11
-rw-r--r--sysutils/fcron/files/patch-doc_en_man_fcron.813
-rw-r--r--sysutils/fcron/files/patch-doc_en_man_fcron.conf.520
-rw-r--r--sysutils/fcron/files/patch-doc_en_man_fcrontab.111
-rw-r--r--sysutils/fcron/files/patch-doc_fr_man_fcron.813
-rw-r--r--sysutils/fcron/files/patch-fcrondyn.c23
-rw-r--r--sysutils/fcron/files/patch-fileconf.c14
-rw-r--r--sysutils/fcron/files/patch-files_fcron.pam8
-rw-r--r--sysutils/fcron/files/patch-m4_ax__lib__readline.m411
-rw-r--r--sysutils/fcron/files/patch-save.c15
-rw-r--r--sysutils/fcron/files/patch-subs.c28
-rw-r--r--sysutils/fcron/pkg-plist3
15 files changed, 166 insertions, 60 deletions
diff --git a/sysutils/fcron/Makefile b/sysutils/fcron/Makefile
index c6b6733c277d..960ade965248 100644
--- a/sysutils/fcron/Makefile
+++ b/sysutils/fcron/Makefile
@@ -1,66 +1,69 @@
-# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
# $FreeBSD$
PORTNAME= fcron
-PORTVERSION= 3.0.6
-PORTREVISION= 2
+PORTVERSION= 3.2.0
CATEGORIES= sysutils
-MASTER_SITES= SUNSITE/system/daemons/cron \
- http://fcron.free.fr/archives/ \
+MASTER_SITES= http://fcron.free.fr/archives/ \
ftp://ftp.seul.org/pub/fcron/
DISTNAME= ${PORTNAME}-${PORTVERSION}.src
-MAINTAINER= rde@tavi.co.uk
+MAINTAINER= bob@eager.cx
COMMENT= Periodic command scheduler
+LICENSE= GPLv2
+
OPTIONS_DEFINE= DOCS EXAMPLES
GNU_CONFIGURE= yes
USES= perl5 gmake
USE_PERL5= build
-CONFIGURE_ARGS= --with-etcdir=${PREFIX}/etc --localstatedir=/var \
+CONFIGURE_ARGS= --localstatedir=/var \
--with-cflags="${CFLAGS}" \
--with-rootname=root --with-rootgroup=wheel \
- --with-docdir=${DOCSDIR}
+ --with-docdir=${DOCSDIR} \
+ --with-dsssl-dir=no
-WRKSRC= ${WRKDIR}/fcron-${PORTVERSION}
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USERS= fcron
GROUPS= fcron
USE_RC_SUBR= fcron
+
SUB_FILES= pkg-message
-PAMDIR?= /etc/pam.d
+PAMDIR?= etc/pam.d
PLIST_SUB+= PAMDIR=etc/pam.d
PORTDOCS= *
-.if defined(MANLANG) && exists(${WRKSRC}/doc/${MANLANG})
-DOCSRC= ${WRKSRC}/doc/${MANLANG}
-.else
DOCSRC= ${WRKSRC}/doc/en
-.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/fcron ${STAGEDIR}${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/fcrontab ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/fcrondyn ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/fcronsighup ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/files/fcron.pam ${STAGEDIR}${PREFIX}/${PAMDIR}/fcron
+ ${INSTALL_DATA} ${WRKSRC}/files/fcrontab.pam ${STAGEDIR}${PREFIX}/${PAMDIR}/fcrontab
.for f in fcron.allow fcron.conf fcron.deny
${INSTALL_DATA} -m 640 ${WRKSRC}/files/${f} ${STAGEDIR}${PREFIX}/etc/${f}.sample
.endfor
- ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- ${INSTALL_DATA} ${FILESDIR}/fcrontab-* ${WRKSRC}/files/*.pam ${STAGEDIR}${EXAMPLESDIR}
- ${INSTALL_DATA} ${WRKSRC}/files/fcron.pam ${STAGEDIR}${PREFIX}${PAMDIR}/fcron
- ${INSTALL_DATA} ${WRKSRC}/files/fcrontab.pam ${STAGEDIR}${PREFIX}${PAMDIR}/fcrontab
- install -d -m 770 ${STAGEDIR}/var/spool/fcron
.for n in 1 5 8
${INSTALL_MAN} ${DOCSRC}/man/*.${n} ${STAGEDIR}${PREFIX}/man/man${n}
.endfor
+
+do-install-EXAMPLES-on:
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${FILESDIR}/fcrontab-* ${WRKSRC}/files/*.pam ${STAGEDIR}${EXAMPLESDIR}
+
+do-install-DOCS-on:
.for d in txt HTML
${MKDIR} ${STAGEDIR}${DOCSDIR}/${d}
${INSTALL_DATA} ${DOCSRC}/${d}/* ${STAGEDIR}${DOCSDIR}/${d}
.endfor
+post-install:
+ ${MKDIR} -m 770 ${STAGEDIR}/var/spool/fcron
+
.include <bsd.port.mk>
diff --git a/sysutils/fcron/distinfo b/sysutils/fcron/distinfo
index 89b98e9820e8..307d486520f5 100644
--- a/sysutils/fcron/distinfo
+++ b/sysutils/fcron/distinfo
@@ -1,2 +1,2 @@
-SHA256 (fcron-3.0.6.src.tar.gz) = 9c36b1bc6c931ec8b4ef55fef569ba17004b32f3ae0a72e3cc4ec4d15bee30a1
-SIZE (fcron-3.0.6.src.tar.gz) = 552805
+SHA256 (fcron-3.2.0.src.tar.gz) = eb13b86ed96805d117e19847f1da30b834f1990f7ef4c38f5007234d44679564
+SIZE (fcron-3.2.0.src.tar.gz) = 595408
diff --git a/sysutils/fcron/files/fcron.in b/sysutils/fcron/files/fcron.in
index 0faf39352cff..1c698563268e 100644
--- a/sysutils/fcron/files/fcron.in
+++ b/sysutils/fcron/files/fcron.in
@@ -2,18 +2,23 @@
#
# $FreeBSD$
#
-
# PROVIDE: fcron
# REQUIRE: LOGIN
# BEFORE: securelevel
# KEYWORD: shutdown
+#
+# fcron_enable (bool): Set to NO by default.
+# Set it to YES to enable fcron.
. /etc/rc.subr
-name="fcron"
+desc="Periodic command scheduler"
+name=fcron
rcvar=fcron_enable
+
+load_rc_config $name
+
command="%%PREFIX%%/sbin/${name}"
pidfile="/var/run/${name}.pid"
-load_rc_config $name
run_rc_command "$1"
diff --git a/sysutils/fcron/files/patch-configure b/sysutils/fcron/files/patch-configure
new file mode 100644
index 000000000000..e96c7cfd317f
--- /dev/null
+++ b/sysutils/fcron/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig 2014-07-06 10:05:56 UTC
++++ configure
+@@ -5153,7 +5153,7 @@ if ${ax_cv_lib_readline+:} false; then :
+ else
+
+ ORIG_LIBS="$LIBS"
+- for readline_lib in readline edit editline; do
++ for readline_lib in readline editline; do
+ for termcap_lib in "" termcap curses ncurses; do
+ if test -z "$termcap_lib"; then
+ TRY_LIB="-l$readline_lib"
diff --git a/sysutils/fcron/files/patch-doc_en_man_fcron.8 b/sysutils/fcron/files/patch-doc_en_man_fcron.8
new file mode 100644
index 000000000000..92a39f2d6e57
--- /dev/null
+++ b/sysutils/fcron/files/patch-doc_en_man_fcron.8
@@ -0,0 +1,13 @@
+--- doc/en/man/fcron.8.orig 2014-07-06 10:10:37 UTC
++++ doc/en/man/fcron.8
+@@ -25,8 +25,8 @@ fcron \- daemon to execute scheduled tas
+
+ .SH "DESCRIPTION"
+ .PP
+-\fBFcron\fR should be started from \fI/etc/rc\fR or
+-\fI/etc/rc.local\fR\&. Unless the \fB-f\fR (or
++\fBFcron\fR should be started from \fI/etc/rc.d\fR or
++\fI/usr/local/etc/rc.d\fR\&. Unless the \fB-f\fR (or
+ \fB--foreground\fR) option is given, it will return immediately, so
+ you don't need to start it with '&'.
+ .PP
diff --git a/sysutils/fcron/files/patch-doc_en_man_fcron.conf.5 b/sysutils/fcron/files/patch-doc_en_man_fcron.conf.5
new file mode 100644
index 000000000000..7de9a66b837f
--- /dev/null
+++ b/sysutils/fcron/files/patch-doc_en_man_fcron.conf.5
@@ -0,0 +1,20 @@
+--- doc/en/man/fcron.conf.5.orig 2014-07-06 10:10:37 UTC
++++ doc/en/man/fcron.conf.5
+@@ -27,14 +27,14 @@ optional. Trailing blanks are also ignor
+ The following names are recognized (default value in parentheses):
+ "VALID VARIABLES IN A FCRON.CONF FILE"
+ .TP
+-\fBfcrontabs=\fIdirectory\fB (\fI/usr/local/var/spool/fcron\fB)\fR
++\fBfcrontabs=\fIdirectory\fB (\fI/var/spool/fcron\fB)\fR
+ \fBFcron\fR spool directory.
+ .TP
+-\fBpidfile=\fIfile-path\fB (\fI/usr/local/var/run/fcron.pid\fB)\fR
++\fBpidfile=\fIfile-path\fB (\fI/var/run/fcron.pid\fB)\fR
+ Location of \fBfcron\fR pid file (needed by \fBfcrontab\fR
+ to work properly).
+ .TP
+-\fBfifofile=\fIfile-path\fB (\fI/usr/local/var/run/fcron.fifo\fB)\fR
++\fBfifofile=\fIfile-path\fB (\fI/var/run/fcron.fifo\fB)\fR
+ Location of \fBfcron\fR fifo file (needed by
+ \fBfcrondyn\fR to communicate with \fBfcron\fR).
+ .TP
diff --git a/sysutils/fcron/files/patch-doc_en_man_fcrontab.1 b/sysutils/fcron/files/patch-doc_en_man_fcrontab.1
new file mode 100644
index 000000000000..5d4b53ccb5be
--- /dev/null
+++ b/sysutils/fcron/files/patch-doc_en_man_fcrontab.1
@@ -0,0 +1,11 @@
+--- doc/en/man/fcrontab.1.orig 2014-07-06 10:10:38 UTC
++++ doc/en/man/fcrontab.1
+@@ -32,7 +32,7 @@ and date of next execution), the user ca
+ .PP
+ When a user
+ installs a \fBfcrontab\fR, the source file is saved in the spool
+-directory (\fI/usr/local/var/spool/fcron\fR) to allow future
++directory (\fI/var/spool/fcron\fR) to allow future
+ editions, and a formatted file is generated for the \fBfcron\fR daemon,
+ which is signaled once about ten seconds before the next minute for
+ all changes made previously. The daemon is not informed of the changes
diff --git a/sysutils/fcron/files/patch-doc_fr_man_fcron.8 b/sysutils/fcron/files/patch-doc_fr_man_fcron.8
new file mode 100644
index 000000000000..3315651b2adf
--- /dev/null
+++ b/sysutils/fcron/files/patch-doc_fr_man_fcron.8
@@ -0,0 +1,13 @@
+--- doc/fr/man/fcron.8.orig 2014-07-06 10:10:39 UTC
++++ doc/fr/man/fcron.8
+@@ -25,8 +25,8 @@ fcron \- démon pour exécuter des tâches
+
+ .SH "DESCRIPTION"
+ .PP
+-\fBFcron\fR devrait être lancé par un script \fI/etc/rc\fR
+-ou \fI/etc/rc.local\fR\&. À moins que l'option
++\fBFcron\fR devrait être lancé par un script en \fI/etc/rc.d\fR
++ou \fI/usr/local/etc/rc.d\fR\&. À moins que l'option
+ \fB-f\fR (ou \fB--foreground\fR) n'ait été fournie,
+ cette commande rend la main immédiatement. Ainsi, vous n'avez pas besoin
+ de la lancer avec «\~&\~».
diff --git a/sysutils/fcron/files/patch-fcrondyn.c b/sysutils/fcron/files/patch-fcrondyn.c
new file mode 100644
index 000000000000..4948b08b5e5e
--- /dev/null
+++ b/sysutils/fcron/files/patch-fcrondyn.c
@@ -0,0 +1,23 @@
+Fix use of size_t in context where ssize_t (error value included) is
+more correct.
+
+--- fcrondyn.c.orig 2014-05-10 17:03:59 UTC
++++ fcrondyn.c
+@@ -482,7 +482,7 @@ talk_fcron(char *cmd_str, int fd)
+ long int *cmd = NULL;
+ int cmd_len = 0;
+ char buf[LINE_LEN];
+- size_t read_len = 0;
++ ssize_t read_len = 0;
+ char existing_connection = (fd < 0) ? 0 : 1;
+ fd_set read_set; /* needed to use select to check if some data is waiting */
+ struct timeval tv;
+@@ -578,7 +578,7 @@ talk_fcron(char *cmd_str, int fd)
+ }
+
+
+- while ((read_len = (size_t) recv(fd, buf, sizeof(buf) - 1, 0)) >= 0
++ while ((read_len = (ssize_t) recv(fd, buf, sizeof(buf) - 1, 0)) >= 0
+ || errno == EINTR) {
+
+ if (errno == EINTR && debug_opt)
diff --git a/sysutils/fcron/files/patch-fileconf.c b/sysutils/fcron/files/patch-fileconf.c
index 9255b7909027..53bff7b53462 100644
--- a/sysutils/fcron/files/patch-fileconf.c
+++ b/sysutils/fcron/files/patch-fileconf.c
@@ -1,15 +1,15 @@
We don't need to fflush the file, since it is opened read-only.
---- fileconf.c.orig 2011-07-18 19:55:28.726082293 +0400
-+++ fileconf.c 2011-07-18 19:55:37.988079816 +0400
-@@ -264,10 +264,6 @@
+--- fileconf.c.orig 2014-05-10 17:03:59 UTC
++++ fileconf.c
+@@ -278,10 +278,6 @@ read_file(char *filename, int fd)
cf->cf_next = file_base;
file_base = cf;
- /* don't close as underlying fd may still be used by calling function */
- if (fflush(file) != 0)
- error_e("could not fflush() file_name");
--
- free(default_line.cl_runas);
- free(default_line.cl_mailto);
- free(default_line.cl_tz);
+-
+ Free_safe(default_line.cl_runas);
+ Free_safe(default_line.cl_mailto);
+ Free_safe(default_line.cl_tz);
diff --git a/sysutils/fcron/files/patch-files_fcron.pam b/sysutils/fcron/files/patch-files_fcron.pam
new file mode 100644
index 000000000000..2f9d01107b11
--- /dev/null
+++ b/sysutils/fcron/files/patch-files_fcron.pam
@@ -0,0 +1,8 @@
+--- files/fcron.pam.orig 2012-12-05 18:17:00 UTC
++++ files/fcron.pam
+@@ -9,4 +9,4 @@ auth required pam_permit.so
+ #auth required pam_env.so
+ session required pam_permit.so
+ #session required pam_unix.so
+-session required pam_loginuid.so
++#session required pam_loginuid.so
diff --git a/sysutils/fcron/files/patch-m4_ax__lib__readline.m4 b/sysutils/fcron/files/patch-m4_ax__lib__readline.m4
new file mode 100644
index 000000000000..b9a816809116
--- /dev/null
+++ b/sysutils/fcron/files/patch-m4_ax__lib__readline.m4
@@ -0,0 +1,11 @@
+--- m4/ax_lib_readline.m4.orig 2013-01-01 17:47:31 UTC
++++ m4/ax_lib_readline.m4
+@@ -65,7 +65,7 @@ AC_DEFUN([AX_LIB_READLINE], [
+ AC_CACHE_CHECK([for a readline compatible library],
+ ax_cv_lib_readline, [
+ ORIG_LIBS="$LIBS"
+- for readline_lib in readline edit editline; do
++ for readline_lib in readline editline; do
+ for termcap_lib in "" termcap curses ncurses; do
+ if test -z "$termcap_lib"; then
+ TRY_LIB="-l$readline_lib"
diff --git a/sysutils/fcron/files/patch-save.c b/sysutils/fcron/files/patch-save.c
new file mode 100644
index 000000000000..5ddd7209eebd
--- /dev/null
+++ b/sysutils/fcron/files/patch-save.c
@@ -0,0 +1,15 @@
+Replace fdatasync() with fsync() because FreeBSD doesn't have fdatasync().
+
+--- save.c.orig 2014-05-10 17:03:59 UTC
++++ save.c
+@@ -311,8 +311,8 @@ write_file_to_disk(int fd, struct cf_t *
+ * This is to avoid cases where the file name (meta-data) would be updated,
+ * and there is a crash before the data is fully written: not sure if that
+ * is possible, but better safe than sorry! */
+- if (fdatasync(fd) < 0) {
+- error_e("could not fdatasync() %s's fcrontab", file->cf_user);
++ if (fsync(fd) < 0) {
++ error_e("could not fsync() %s's fcrontab", file->cf_user);
+ return ERR;
+ }
+
diff --git a/sysutils/fcron/files/patch-subs.c b/sysutils/fcron/files/patch-subs.c
deleted file mode 100644
index bee359d4e40e..000000000000
--- a/sysutils/fcron/files/patch-subs.c
+++ /dev/null
@@ -1,28 +0,0 @@
---- subs.c.orig 2011-07-18 17:28:21.745080904 +0400
-+++ subs.c 2011-07-18 19:39:18.999087202 +0400
-@@ -121,7 +121,11 @@
-
- if (flags & O_CREAT) {
- va_start(ap, flags);
-- mode = va_arg(ap, mode_t);
-+ /* Beware: default argument promotion. */
-+ if (sizeof(int) > sizeof(mode_t))
-+ mode = va_arg(ap, int);
-+ else
-+ mode = va_arg(ap, mode_t);
- va_end(ap);
- }
-
-@@ -179,7 +183,11 @@
-
- if (flags & O_CREAT) {
- va_start(ap, flags);
-- mode = va_arg(ap, mode_t);
-+ /* Beware: default argument promotion. */
-+ if (sizeof(int) > sizeof(mode_t))
-+ mode = va_arg(ap, int);
-+ else
-+ mode = va_arg(ap, mode_t);
- va_end(ap);
- }
-
diff --git a/sysutils/fcron/pkg-plist b/sysutils/fcron/pkg-plist
index d81efec53ff1..dc3787ede088 100644
--- a/sysutils/fcron/pkg-plist
+++ b/sysutils/fcron/pkg-plist
@@ -6,8 +6,9 @@
@(,,6111) bin/fcrontab
@(,,4110) bin/fcronsighup
@sample etc/fcron.allow.sample
-@sample etc/fcron.conf.sample
@sample etc/fcron.deny.sample
+@owner root
+@sample etc/fcron.conf.sample
@owner
@group
man/man1/fcrondyn.1.gz