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