View | Details | Raw Unified | Return to bug 166587
Collapse All | Expand All

(-)Makefile (+13 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	radmind
8
PORTNAME=	radmind
9
PORTVERSION=	1.14.1
9
PORTVERSION=	1.14.1
10
PORTREVISION=	2012032001
10
CATEGORIES=	sysutils
11
CATEGORIES=	sysutils
11
MASTER_SITES=	SF
12
MASTER_SITES=	SF
12
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
13
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
Lines 36-41 Link Here
36
MAN8=		radmind.8
37
MAN8=		radmind.8
37
DOCS=		COPYRIGHT README SPEC
38
DOCS=		COPYRIGHT README SPEC
38
39
40
OPTIONS=	IGNORE_TIMESTAMPS	"Add '-t' option to fsdiff"	Off
41
42
.include <bsd.port.options.mk>
43
44
.if defined(WITH_IGNORE_TIMESTAMPS)
45
EXTRA_PATCHES+=	${FILESDIR}/optpatch-ignore_timestamps
46
.endif
47
39
post-install:
48
post-install:
40
# Ugly hack to remove generated man pages
49
# Ugly hack to remove generated man pages
41
	${RM} -rf ${WRKSRC}/tmp
50
	${RM} -rf ${WRKSRC}/tmp
Lines 44-49 Link Here
44
	${MKDIR} ${DOCSDIR}
53
	${MKDIR} ${DOCSDIR}
45
	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
54
	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
46
.endif
55
.endif
56
	${CP} ${FILESDIR}/config.sample ${RADMIND_BASE_DIR}/config.sample
57
	@if [ ! -f ${RADMIND_BASE_DIR}/config ]; then \
58
		${CP} -p ${RADMIND_BASE_DIR}/config.sample ${RADMIND_BASE_DIR}/config ; \
59
	fi
47
	@${CHOWN} -R ${RADMINUSER}:${RADMINUSER} ${RADMIND_BASE_DIR}
60
	@${CHOWN} -R ${RADMINUSER}:${RADMINUSER} ${RADMIND_BASE_DIR}
48
	@${CAT} ${PKGMESSAGE}
61
	@${CAT} ${PKGMESSAGE}
49
62
(-)files/config.sample (+8 lines)
Line 0 Link Here
1
# Example radmind configuration file.
2
#
3
#
4
# Host			Command (.K) file.
5
# localhost		default.K
6
# 127.0.0.1		default.K
7
######################################################
8
(-)files/optpatch-ignore_timestamps (+94 lines)
Line 0 Link Here
1
--- fsdiff.c.orig
2
+++ fsdiff.c
3
@@ -33,6 +33,7 @@ int		dotfd;
4
 int		lastpercent = -1;
5
 int		case_sensitive = 1;
6
 int		tran_format = -1; 
7
+int		ignore_timestamps = 0;
8
 extern int	exclude_warnings;
9
 const EVP_MD    *md;
10
 
11
@@ -266,7 +267,7 @@ main( int argc, char **argv )
12
     cksum = 0;
13
     outtran = stdout;
14
 
15
-    while (( c = getopt( argc, argv, "%1ACc:IK:o:VvW" )) != EOF ) {
16
+    while (( c = getopt( argc, argv, "%1ACc:IK:o:tVvW" )) != EOF ) {
17
 	switch( c ) {
18
 	case '%':
19
 	case 'v':
20
@@ -320,6 +321,10 @@ main( int argc, char **argv )
21
 	    exclude_warnings = 1;
22
 	    break;
23
 
24
+	case 't':		/* ignore files for which only the time has changed */
25
+	    ignore_timestamps = 1;
26
+	break;
27
+
28
 	case '?':
29
 	    printf( "bad %c\n", c );
30
 	    errflag++;
31
32
--- man/fsdiff.1.orig
33
+++ man/fsdiff.1
34
@@ -11,7 +11,7 @@
35
 |
36
 .B -1
37
 } [
38
-.BI -IVW
39
+.BI -IVWt
40
 ] [
41
 .BI \-K\  command
42
 ] [
43
@@ -312,6 +312,9 @@ order of preference and then exits.
44
 prints a warning to the standard error when encountering an object
45
 matching an exclude pattern.
46
 .sp
47
+.TP 19
48
+.B \-t
49
+ignores files where only the timestamp has changed.
50
 .SH FILES
51
 .TP 19
52
 .B _RADMIND_COMMANDFILE
53
54
--- transcript.c.orig
55
+++ transcript.c
56
@@ -38,6 +38,7 @@ static struct transcript	*prev_tran = NULL;
57
 extern int			edit_path;
58
 extern int			case_sensitive;
59
 extern int			tran_format;
60
+extern int			ignore_timestamps;
61
 static char			*kdir;
62
 static struct list		*kfile_list;
63
 struct list			*special_list;
64
@@ -45,6 +46,7 @@ struct list			*exclude_list;
65
 
66
 char				*path_prefix = NULL;
67
 int				edit_path;
68
+int				ignore_timestamps;
69
 int				skip;
70
 int				cksum;
71
 int				fs_minus;
72
@@ -544,14 +546,16 @@ t_compare( struct pathinfo *fs, struct transcript *tran )
73
 		    t_print( fs, tran, PR_DOWNLOAD );
74
 		    break;
75
 		}
76
-	    } else if ( fs->pi_stat.st_mtime != tran->t_pinfo.pi_stat.st_mtime ) {
77
-		t_print( fs, tran, PR_DOWNLOAD );
78
-		break;
79
+	    } else if ( ignore_timestamps == 0 &&
80
+			fs->pi_stat.st_mtime != tran->t_pinfo.pi_stat.st_mtime) {
81
+		    t_print( fs, tran, PR_DOWNLOAD );
82
+		    break;
83
 	    }
84
 
85
-	    if ( fs->pi_stat.st_mtime != tran->t_pinfo.pi_stat.st_mtime ) {
86
-		t_print( fs, tran, PR_STATUS );
87
-		break;
88
+	    if ( ignore_timestamps == 0 &&
89
+		 fs->pi_stat.st_mtime != tran->t_pinfo.pi_stat.st_mtime ) {
90
+		    t_print( fs, tran, PR_STATUS );
91
+		    break;
92
 	    }
93
 	}
94
 
(-)files/patch-.gitignore (+17 lines)
Line 0 Link Here
1
--- ./.gitignore.orig	2010-12-12 22:42:49.000000000 -0500
2
+++ ./.gitignore	2012-03-20 14:37:54.000000000 -0400
3
@@ -10,12 +10,8 @@
4
 config.log
5
 config.status
6
 
7
-# External Libraries #
8
-######################
9
-libsnet
10
-
11
-# Comiled Files #
12
-#################
13
+# Compiled Files #
14
+##################
15
 *.o
16
 fsdiff
17
 ktcheck
(-)files/patch-Makefile.in (+50 lines)
Line 0 Link Here
1
--- ./Makefile.in.orig	2010-12-12 22:43:49.000000000 -0500
2
+++ ./Makefile.in	2012-03-20 14:37:54.000000000 -0400
3
@@ -204,37 +204,37 @@
4
 radmind : libsnet/libsnet.la ${RADMIND_OBJ} Makefile
5
 	${CC} ${CFLAGS} -o radmind ${RADMIND_OBJ} ${LDFLAGS}
6
 
7
-fsdiff : ${FSDIFF_OBJ}
8
+fsdiff : libsnet/libsnet.la ${FSDIFF_OBJ}
9
 	${CC} ${CFLAGS} -o fsdiff ${FSDIFF_OBJ} ${LDFLAGS}
10
 
11
-ktcheck: ${KTCHECK_OBJ}
12
+ktcheck: libsnet/libsnet.la ${KTCHECK_OBJ}
13
 	${CC} ${CFLAGS} -o ktcheck ${KTCHECK_OBJ} ${LDFLAGS}
14
 
15
-lapply: ${LAPPLY_OBJ}
16
+lapply: libsnet/libsnet.la ${LAPPLY_OBJ}
17
 	${CC} ${CFLAGS} -o lapply ${LAPPLY_OBJ} ${LDFLAGS}
18
 
19
-lcksum: ${LCKSUM_OBJ}
20
+lcksum: libsnet/libsnet.la ${LCKSUM_OBJ}
21
 	${CC} ${CFLAGS} -o lcksum ${LCKSUM_OBJ} ${LDFLAGS}
22
 
23
-lcreate: ${LCREATE_OBJ}
24
+lcreate: libsnet/libsnet.la ${LCREATE_OBJ}
25
 	${CC} ${CFLAGS} -o lcreate ${LCREATE_OBJ} ${LDFLAGS}
26
 
27
-lmerge: ${LMERGE_OBJ}
28
+lmerge: libsnet/libsnet.la ${LMERGE_OBJ}
29
 	${CC} ${CFLAGS} -o lmerge ${LMERGE_OBJ} ${LDFLAGS}
30
 
31
-lfdiff: ${LFDIFF_OBJ}
32
+lfdiff: libsnet/libsnet.la ${LFDIFF_OBJ}
33
 	${CC} ${CFLAGS} -o lfdiff ${LFDIFF_OBJ} ${LDFLAGS}
34
 
35
-repo : ${REPO_OBJ}
36
+repo: libsnet/libsnet.la ${REPO_OBJ}
37
 	${CC} ${CFLAGS} -o repo ${REPO_OBJ} ${LDFLAGS}
38
 
39
 t2pkg: ${T2PKG_OBJ}
40
 	${CC} ${CFLAGS} -o t2pkg ${T2PKG_OBJ} ${LDFLAGS}
41
 
42
-twhich: ${TWHICH_OBJ}
43
+twhich: libsnet/libsnet.la ${TWHICH_OBJ}
44
 	${CC} ${CFLAGS} -o twhich ${TWHICH_OBJ} ${LDFLAGS}
45
 
46
-lsort: ${LSORT_OBJ}
47
+lsort: libsnet/libsnet.la ${LSORT_OBJ}
48
 	${CC} ${CFLAGS} -o lsort ${LSORT_OBJ} ${LDFLAGS}
49
 
50
 FRC :
(-)files/patch-README (+46 lines)
Line 0 Link Here
1
--- ./README.orig	2010-12-12 22:42:49.000000000 -0500
2
+++ ./README	2012-03-20 14:37:54.000000000 -0400
3
@@ -72,25 +72,25 @@
4
   % "env CPPFLAGS=-I/usr/kerberos/include ./configure"
5
 
6
 -----------------
7
-Building from CVS
8
+Building from git
9
 -----------------
10
 The Radmind Development Team occasionally asks for help testing a new feature
11
 or bug fix. The best way to assist is to download the source code from the
12
-CVS repository and build it manually. The following steps will result in
13
-a build from CVS.
14
+git repository and build it manually. The following steps will result in
15
+a build from git.
16
 
17
-1) Download the source from CVS:
18
+1) Download the source from git:
19
 
20
-cvs -d :pserver:anonymous@radmind.cvs.sourceforge.net:/cvsroot/radmind \
21
-	checkout radmind
22
+    git clone git://radmind.git.sourceforge.net/gitroot/gradmind
23
 
24
 2) Move into the new radmind directory:
25
 
26
-cd radmind
27
+    cd radmind
28
 
29
-3) Download libsnet[1], the network library Radmind uses:
30
+3) Checkout all required submodules [1]:
31
 
32
-sh bin/getsnet
33
+    git submodule init
34
+    git submodule update
35
 
36
 4) Follow steps 2 and 3 from "More detailed instructions" for building, above.
37
 
38
@@ -115,4 +115,7 @@
39
 ----------
40
 References
41
 ----------
42
-[1]: http://sourceforge.net/projects/libsnet
43
+[1]: Current submodules:
44
+
45
+    * libsnet, a networking library with TLS support
46
+	http://sourceforge.net/projects/libsnet
(-)files/patch-aclocal.m4 (+21 lines)
Line 0 Link Here
1
--- ./aclocal.m4.orig	2010-12-12 22:42:49.000000000 -0500
2
+++ ./aclocal.m4	2012-03-20 14:37:54.000000000 -0400
3
@@ -105,16 +105,11 @@
4
 	    arches="-arch i386 -arch ppc"
5
 	    ;;
6
 
7
-	  darwin9*)
8
+	  darwin9*|darwin10*|darwin11*)
9
 	    dep_target="-mmacosx-version-min=10.4"
10
 	    macosx_sdk="MacOSX10.5.sdk"
11
 	    arches="-arch i386 -arch x86_64 -arch ppc -arch ppc64"
12
-	    ;;
13
-
14
-	  darwin10*)
15
-	    dep_target="-mmacosx-version-min=10.4"
16
-	    macosx_sdk="MacOSX10.6.sdk"
17
-	    arches="-arch i386 -arch x86_64 -arch ppc"
18
+	    LDFLAGS="$LDFLAGS -L/Developer/SDKs/$macosx_sdk/usr/lib"
19
 	    ;;
20
 
21
 	  *)
(-)files/patch-configure.ac (+44 lines)
Line 0 Link Here
1
--- ./configure.ac.orig	2010-12-12 22:43:38.000000000 -0500
2
+++ ./configure.ac	2012-03-20 14:37:54.000000000 -0400
3
@@ -45,24 +45,29 @@
4
 # Check sizes
5
 AC_CHECK_SIZEOF(off_t)
6
 
7
+# check early to make any required changes to environment for following tests.
8
+CHECK_UNIVERSAL_BINARIES
9
+
10
 # Checks for libraries.
11
 AC_CHECK_LIB(c, inet_aton, libc_inet_aton=yes) 
12
 if test x$libc_inet_aton != xyes; then 
13
     AC_CHECK_LIB(resolv, inet_aton) 
14
 fi 
15
-AC_CHECK_LIB(c, lchown)
16
-AC_CHECK_LIB(c, lchmod)
17
+AC_CHECK_LIB(c, lchown, [AC_DEFINE(HAVE_LCHOWN)], [])
18
+AC_CHECK_LIB(c, lchmod, [AC_DEFINE(HAVE_LCHMOD)], [])
19
 AC_CHECK_LIB(nsl, gethostbyaddr)
20
 AC_CHECK_LIB([socket], [socket])
21
 AC_CHECK_LIB([ssl], [SSL_accept], , [CHECK_SSL])
22
 AC_CHECK_HEADER([openssl/ssl.h], [], [AC_MSG_ERROR([header file <openssl/ssl.h>
23
 is required for this software.  You may be running RedHat 9.  If so, see the FAQ or the README for further instructions.])])
24
 AC_CHECK_LIB([crypto], [SSLeay_version], , [CHECK_SSL])
25
-AC_CHECK_FUNC([X509_VERIFY_PARAM_set_flags], [AC_DEFINE(HAVE_X509_VERIFY_PARAM)], [])
26
+AC_CHECK_LIB([crypto], [X509_VERIFY_PARAM_set_flags], [AC_DEFINE(HAVE_X509_VERIFY_PARAM)], [])
27
 
28
 # PAM
29
-AC_ARG_WITH([pam], AC_HELP_STRING([--with-pam=yes], [Pluggable Authentication Module support (default: yes)]), [], with_pam=yes)
30
+AC_ARG_WITH([pam], AC_HELP_STRING([--with-pam=PATH], [Pluggable Authentication Module support (default: /usr)]), [], with_pam=/usr)
31
 if test x_"$with_pam" != x_no; then
32
+    CPPFLAGS="${CPPFLAGS} -I$with_pam/include"
33
+    LDFLAGS="${LDFLAGS} -L$with_pam/lib"
34
     AC_CHECK_LIB([pam], [pam_start],
35
 	[
36
 	AC_CHECK_HEADERS(pam/pam_appl.h, , [AC_CHECK_HEADERS(security/pam_appl.h)])
37
@@ -75,7 +80,6 @@
38
 AC_CHECK_LIB(dns_sd, DNSServiceRegister)
39
 
40
 CHECK_ZLIB
41
-CHECK_UNIVERSAL_BINARIES
42
 
43
 # HPUX lacks wait4 and strtoll
44
 AC_CHECK_FUNCS(wait4 strtoll)
(-)files/patch-lapply.c (+52 lines)
Line 0 Link Here
1
--- ./lapply.c.orig	2010-12-12 22:42:49.000000000 -0500
2
+++ ./lapply.c	2012-03-20 14:37:54.000000000 -0400
3
@@ -651,27 +651,37 @@
4
 filechecklist:
5
 		if ( head == NULL ) {
6
 		    if ( unlink( path ) != 0 ) {
7
-			perror( path );
8
-			goto error2;
9
-		    }
10
-		    if ( !quiet && !showprogress ) {
11
-			printf( "%s: deleted\n", path );
12
-		    }
13
-		    if ( showprogress ) {
14
-			progressupdate( PROGRESSUNIT, path );
15
-		    }
16
-		} else {
17
-		    if ( ischildcase( path, head->path, case_sensitive )) {
18
-			if ( unlink( path ) != 0 ) {
19
+			if ( !force || errno != ENOENT ) {
20
 			    perror( path );
21
 			    goto error2;
22
 			}
23
+			fprintf( stderr, "Warning: failed to remove %s: %s\n",
24
+				path, strerror( errno ));
25
+		    } else {
26
 			if ( !quiet && !showprogress ) {
27
 			    printf( "%s: deleted\n", path );
28
 			}
29
 			if ( showprogress ) {
30
 			    progressupdate( PROGRESSUNIT, path );
31
 			}
32
+		    }
33
+		} else {
34
+		    if ( ischildcase( path, head->path, case_sensitive )) {
35
+			if ( unlink( path ) != 0 ) {
36
+			    if ( !force || errno != ENOENT ) {
37
+				perror( path );
38
+				goto error2;
39
+			    }
40
+			    fprintf( stderr, "Warning: failed to remove %s: "
41
+				    "%s\n", path, strerror( errno ));
42
+			} else {
43
+			    if ( !quiet && !showprogress ) {
44
+				printf( "%s: deleted\n", path );
45
+			    }
46
+			    if ( showprogress ) {
47
+				progressupdate( PROGRESSUNIT, path );
48
+			    }
49
+			}
50
 		    } else {
51
 			/* remove head */
52
 			if ( rmdir( head->path ) != 0 ) {
(-)files/patch-man__lcreate.1 (+15 lines)
Line 0 Link Here
1
--- ./man/lcreate.1.orig	2010-12-12 22:50:53.000000000 -0500
2
+++ ./man/lcreate.1	2012-03-20 14:38:03.000000000 -0400
3
@@ -45,12 +45,6 @@
4
 .sp
5
 If the -n option is given, no files or transcripts are uploaded.  Instead,
6
 .B lcreate
7
-verifies that all files exist in the filesystem and have
8
-the same size as listed in the transcript.  If used with the -c option,
9
-checksums are also verified.
10
-.sp
11
-If the -n option is given, no files or transcripts are uploaded.  Instead,
12
-.B lcreate
13
 uses 
14
 .BR access (2)
15
 to verify that all files in the transcript exist in the
(-)files/patch-man__rash.1 (+38 lines)
Line 0 Link Here
1
--- ./man/rash.1.orig	2010-12-12 22:50:53.000000000 -0500
2
+++ ./man/rash.1	2012-03-20 14:38:08.000000000 -0400
3
@@ -11,6 +11,10 @@
4
 |
5
 .B -q
6
 ] [
7
+.BR \-C\  "generate"
8
+|
9
+.BI \-C\  checksum
10
+] [
11
 .B \-D
12
 .I workingdir
13
 ] [
14
@@ -120,6 +124,24 @@
15
 .B \-c
16
 use sha1 checksums.
17
 .TP 19
18
+.BR \-C\  "generate"
19
+Print a sha1 checksum of the difference transcript of applied changes. For use with
20
+.IR auto ,
21
+.IR force
22
+or
23
+.IR update .
24
+.TP 19
25
+.BI \-C\  checksum
26
+In
27
+.I auto
28
+mode, exit with an error if the checksum of the difference transcript to be applied does not match
29
+.IR checksum .
30
+In
31
+.I update
32
+or
33
+.I force
34
+mode, warn if the two do not match.
35
+.TP 19
36
 .BI \-D\  workingdir
37
 change to
38
 .I workingdir
(-)files/patch-mkdirs.c (+13 lines)
Line 0 Link Here
1
--- ./mkdirs.c.orig	2010-12-12 22:42:49.000000000 -0500
2
+++ ./mkdirs.c	2012-03-20 14:38:08.000000000 -0400
3
@@ -37,7 +37,9 @@
4
 	if ( mkdir( path, 0777 ) == 0 ) {
5
 	    break;
6
 	}
7
-	if ( errno != ENOENT ) {
8
+	if ( errno == EEXIST ) {
9
+	    break;
10
+	} else if ( errno != ENOENT ) {
11
 	    return( -1 );
12
 	}
13
 	q = p;
(-)files/patch-ra.sh (+139 lines)
Line 0 Link Here
1
--- ./ra.sh.orig	2010-12-12 22:42:49.000000000 -0500
2
+++ ./ra.sh	2012-03-20 14:38:08.000000000 -0400
3
@@ -91,7 +91,7 @@
4
 }
5
 
6
 usage() {
7
-    $ECHO "Usage:	$0 [ -ctV ] [ -D working-directory ] [ -h server ] [ -p port ] [ -w authlevel ] { trip | update | create | auto | force | checkout | checkin } [ /path/or/file ]" >&2
8
+    $ECHO "Usage:	$0 [ -cIltV ] [ -% | -q ] [ -C \"generate\" | -C <checksum> ] [ -D working-directory ] [ -h server ] [ -p port ] [ -w authlevel ] { trip | update | create | auto | force | checkout | checkin } [ /path/or/file ]" >&2
9
     exit 1
10
 }
11
 
12
@@ -128,6 +128,38 @@
13
     fi
14
 }
15
 
16
+cksum_generate() {
17
+    if [ -n "$FSDIFF_CHECKSUM" ]; then
18
+	FTMP_CHECKSUM=`openssl sha1 ${FTMP} | awk '{ print $2 }'`
19
+    fi
20
+}
21
+
22
+cksum_compare() {
23
+    if [ -n "$FSDIFF_CHECKSUM" -a \
24
+	    "$FSDIFF_CHECKSUM" != "generate" -a \
25
+	    "$FSDIFF_CHECKSUM" != "$FTMP_CHECKSUM" ]; then
26
+	return 1
27
+    fi
28
+
29
+    return 0
30
+}
31
+
32
+cksum_print() {
33
+    if [ -n "$FSDIFF_CHECKSUM" ]; then
34
+	$ECHO "Difference transcript checksum: $FTMP_CHECKSUM"
35
+    fi
36
+}
37
+
38
+cksum_mismatch() {
39
+    if [ -n "$FSDIFF_CHECKSUM" ]; then
40
+	$ECHO
41
+	$ECHO "**** Difference transcript checksum mismatch!"
42
+	$ECHO "****	Expected: $FSDIFF_CHECKSUM"
43
+	$ECHO "****	Actual:   $FTMP_CHECKSUM"
44
+	#ECHO
45
+    fi
46
+}
47
+
48
 update() {
49
     opt="$1"
50
     kopt=
51
@@ -211,6 +243,11 @@
52
     fi
53
     if [ x"${opt}" = x"interactive" ]; then
54
 	while [ 1 ]; do
55
+	    cksum_generate
56
+	    if ! cksum_compare; then
57
+		cksum_mismatch
58
+	    fi
59
+
60
 	    if [ x"${can_edit}" = x"yes" ]; then
61
 		$ECHO -n "(e)dit difference transcript, "
62
 	    fi
63
@@ -248,7 +285,8 @@
64
 		
65
     lapply ${CASE} ${PROGRESS} ${NETOPTS} ${CHECKSUM} ${FTMP}
66
     case "$?" in
67
-    0)	;;
68
+    0)	cksum_print
69
+	;;
70
 
71
     *)  if [ x"$opt" = x"hook" ]; then
72
 	    $ECHO -n "Applying changes failed, trying again "
73
@@ -284,7 +322,7 @@
74
     . "${DEFAULTS}"
75
 fi
76
 
77
-while getopts %cD:h:Ilp:qr:tU:Vw: opt; do
78
+while getopts %C:cD:h:Ilp:qr:tU:Vw: opt; do
79
     case $opt in
80
     %)  PROGRESS="-%"
81
 	FPROGRESS="-%"
82
@@ -293,6 +331,13 @@
83
     q)  PROGRESS="-q"
84
 	;;
85
 
86
+    C)	FSDIFF_CHECKSUM="$OPTARG"
87
+	if ! type openssl >/dev/null 2>&1; then
88
+	    $ECHO "-C requires openssl, but no openssl found in PATH $PATH"
89
+	    cleanup_and_exit
90
+	fi
91
+	;;
92
+
93
     c)	CHECKSUM="-csha1"
94
 	;;
95
 
96
@@ -524,6 +569,14 @@
97
 		cleanup
98
 		exit 1
99
 	    fi
100
+
101
+	    cksum_generate
102
+	    if ! cksum_compare; then
103
+		$ECHO "Auto failure: `hostname`: difference cksum mismatch" 
104
+		cksum_mismatch
105
+		cleanup_and_exit
106
+	    fi
107
+
108
 	    dopreapply ${FTMP}
109
 	    if [ -s ${FTMP} ]; then
110
 		lapply ${NETOPTS} ${CASE} ${PROGRESS} \
111
@@ -532,6 +585,7 @@
112
 		0)
113
 		    $ECHO Auto update: `hostname`
114
 		    cat ${FTMP}
115
+		    cksum_print
116
 		    dopostapply ${FTMP}
117
 		    cleanup
118
 		    break
119
@@ -588,14 +642,17 @@
120
 	exit 0
121
     fi
122
     
123
+    cksum_generate
124
+    cksum_compare || cksum_mismatch
125
     dopreapply ${FTMP}
126
     lapply ${CASE} ${PROGRESS} ${NETOPTS} ${CHECKSUM} ${FTMP}
127
     case "$?" in
128
-    0)	;;
129
+    0)	cksum_print
130
+	;;
131
 
132
     *)	cleanup
133
-	    exit $?
134
-	    ;;
135
+	exit $?
136
+	;;
137
     esac
138
     dopostapply ${FTMP}
139
     
(-)files/patch-t2pkg.c (+46 lines)
Line 0 Link Here
1
--- ./t2pkg.c.orig	2010-12-12 22:42:49.000000000 -0500
2
+++ ./t2pkg.c	2012-03-20 14:38:08.000000000 -0400
3
@@ -38,6 +38,7 @@
4
 extern off_t	lsize;
5
 extern char	*version;
6
 
7
+int		tran_format = -1;
8
 int		cksum = 0;
9
 int		force = 0;
10
 int		case_sensitive = 1;
11
@@ -718,31 +719,23 @@
12
 	}
13
 
14
 	/* create the destination path */
15
-	if ( snprintf( tmp, MAXPATHLEN, "%s/%s", dstdir, t->t_pinfo.pi_name )
16
+	if ( snprintf( dst, MAXPATHLEN, "%s/%s", dstdir, t->t_pinfo.pi_name )
17
 		>= MAXPATHLEN ) {
18
 	    fprintf( stderr, "%s/%s: path too long\n", dstdir,
19
 			t->t_pinfo.pi_name );
20
 	    exit( 2 );
21
 	}
22
-	if ( mkdirs( tmp ) < 0 ) {
23
-	    fprintf( stderr, "mkdirs %s: %s\n", tmp, strerror( errno ));
24
-	}
25
-	if ( realpath( tmp, dst ) == NULL ) {
26
-	    fprintf( stderr, "realpath %s: %s\n", tmp, strerror( errno ));
27
-	    exit( 2 );
28
+	if ( mkdirs( dst ) < 0 ) {
29
+	    fprintf( stderr, "mkdirs %s: %s\n", dst, strerror( errno ));
30
 	}
31
 
32
 	/* and the source path */
33
-	if ( snprintf( tmp, MAXPATHLEN, "%s/%s", root, t->t_pinfo.pi_name )
34
+	if ( snprintf( src, MAXPATHLEN, "%s/%s", root, t->t_pinfo.pi_name )
35
 		>= MAXPATHLEN ) {
36
 	    fprintf( stderr, "%s/%s: path too long\n", dstdir,
37
 			t->t_pinfo.pi_name );
38
 	    exit( 2 );
39
 	}
40
-	if ( realpath( tmp, src ) == NULL ) {
41
-	    fprintf( stderr, "realpath %s: %s\n", tmp, strerror( errno ));
42
-	    exit( 2 );
43
-	}
44
 
45
 	if ( local_update( t, dst, src, where ) != 0 ) {
46
 	    /* XXX is this really a good idea? */
(-)files/pkg-message.in (-13 / +8 lines)
Lines 1-16 Link Here
1
####################
1
####################
2
The radmind daemon for this port runs as user "%%RADMINUSER%%"
3
by default.  If you wish to change this behavior you may
4
set the radmind_user variable in /etc/rc.conf
2
5
3
Important Note:
6
A template configuration file has been installed as
4
The radmind daemon now runs as user "%%RADMINUSER%%"
7
%%RADMIND_BASE_DIR%%/config.sample .
5
by default.
8
Please modify this file as necessary and place it in
6
If you have installed an older version of
9
%%RADMIND_BASE_DIR%%/config to ensure proper operation of the
7
the radmind port you may need to chown
10
radmind daemon.
8
%%RADMIND_BASE_DIR%% appropriately.
9
10
11
You may restore the previous behavior by
12
setting
13
	radmind_user="root"
14
in /etc/rc.conf 
15
16
####################
11
####################
(-)files/radmind.sh.in (-2 / +2 lines)
Lines 15-21 Link Here
15
# You may also override the default daemon user & flags:
15
# You may also override the default daemon user & flags:
16
#
16
#
17
#radmind_user="radmind"
17
#radmind_user="radmind"
18
#radmind_flags="-D /var/radmind -m 5 -u 077 -Llocal7 -w 0"
18
#radmind_flags="-D /var/radmind -u 077 -w 0"
19
#
19
#
20
# See radmind(8) for flags
20
# See radmind(8) for flags
21
#
21
#
Lines 32-38 Link Here
32
32
33
radmind_enable=${radmind_enable:-"NO"}
33
radmind_enable=${radmind_enable:-"NO"}
34
radmind_user=${radmind_user:-"radmind"}
34
radmind_user=${radmind_user:-"radmind"}
35
radmind_flags=${radmind_flags:-"-D %%RADMIND_BASE_DIR%% -m 5 -u 077 -Llocal7 -w 0"}
35
radmind_flags=${radmind_flags:-"-D %%RADMIND_BASE_DIR%% -m 5 -u 077 -w 0"}
36
36
37
load_rc_config ${name}
37
load_rc_config ${name}
38
run_rc_command "$1"
38
run_rc_command "$1"
(-)pkg-descr (-1 / +3 lines)
Lines 3-6 Link Here
3
of hosts at the filesystem level. It can also act as an intelligent
3
of hosts at the filesystem level. It can also act as an intelligent
4
tripwire.
4
tripwire.
5
5
6
WWW: http://rsug.itd.umich.edu/software/g
6
This port contains functionality and security patches through March 20, 2012
7
8
WWW: http://www.sourceforge.net/projects/radmind
(-)pkg-plist (-1 / +3 lines)
Lines 19-26 Link Here
19
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/client
19
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/client
20
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/preapply
20
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/preapply
21
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/postapply
21
@exec mkdir -p -m 755 %%RADMIND_BASE_DIR%%/postapply
22
@exec chown -R radmind:radmind %%RADMIND_BASE_DIR%%
22
@exec chown -R %%RADMINUSER%%:%%RADMINUSER%% %%RADMIND_BASE_DIR%%
23
@cwd /
23
@cwd /
24
@unexec if cmp -s %%RADMIND_BASE_DIR%%/config.sample %%RADMIND_BASE_DIR%%/config; then rm -f %%RADMIND_BASE_DIR%%/config; fi
25
%%RADMIND_BASE_DIR%%/config.sample
24
@dirrmtry %%RADMIND_BASE_DIR%%/transcript
26
@dirrmtry %%RADMIND_BASE_DIR%%/transcript
25
@dirrmtry %%RADMIND_BASE_DIR%%/tmp/transcript
27
@dirrmtry %%RADMIND_BASE_DIR%%/tmp/transcript
26
@dirrmtry %%RADMIND_BASE_DIR%%/tmp/file
28
@dirrmtry %%RADMIND_BASE_DIR%%/tmp/file

Return to bug 166587