View | Details | Raw Unified | Return to bug 209139 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 209139