svn commit: r361606 - in head/sysutils/radmind: . files
Thomas Zander
riggs at FreeBSD.org
Sat Jul 12 09:31:07 UTC 2014
Author: riggs
Date: Sat Jul 12 09:31:02 2014
New Revision: 361606
URL: http://svnweb.freebsd.org/changeset/ports/361606
QAT: https://qat.redports.org/buildarchive/r361606/
Log:
- Update to new revision 2014052201
- Stagify
- Add LICENSE*
- Remove IGNORE_TIMESTAMPS option
- Handle file ownerships via pkg-plist macros
- Silence superfluous warnings
- Handle stripping of installed binaries
- Pet portlint
PR: 190120
Submitted by: mikeg at bsd-box.net (maintainer)
Reviewed by: riggs
Approved by: mentors (implicit), maintainer (timeout)
Added:
head/sysutils/radmind/files/patch-.gitmodules (contents, props changed)
head/sysutils/radmind/files/patch-argcargv.c (contents, props changed)
head/sysutils/radmind/files/patch-command.c (contents, props changed)
head/sysutils/radmind/files/patch-command.h (contents, props changed)
head/sysutils/radmind/files/patch-contrib__specialist (contents, props changed)
head/sysutils/radmind/files/patch-fsdiff.c (contents, props changed)
head/sysutils/radmind/files/patch-ktcheck.c (contents, props changed)
head/sysutils/radmind/files/patch-largefile.h (contents, props changed)
head/sysutils/radmind/files/patch-lcksum.c (contents, props changed)
head/sysutils/radmind/files/patch-transcript.c (contents, props changed)
head/sysutils/radmind/files/patch-transcript.h (contents, props changed)
head/sysutils/radmind/files/patch-update.c (contents, props changed)
Modified:
head/sysutils/radmind/Makefile
head/sysutils/radmind/files/patch-.gitignore
head/sysutils/radmind/files/patch-Makefile.in
head/sysutils/radmind/files/patch-README
head/sysutils/radmind/files/patch-aclocal.m4
head/sysutils/radmind/files/patch-configure.ac
head/sysutils/radmind/files/patch-lapply.c
head/sysutils/radmind/files/patch-man__lcreate.1
head/sysutils/radmind/files/patch-man__rash.1
head/sysutils/radmind/files/patch-mkdirs.c
head/sysutils/radmind/files/patch-ra.sh
head/sysutils/radmind/files/patch-t2pkg.c
head/sysutils/radmind/pkg-descr
head/sysutils/radmind/pkg-plist
Modified: head/sysutils/radmind/Makefile
==============================================================================
--- head/sysutils/radmind/Makefile Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/Makefile Sat Jul 12 09:31:02 2014 (r361606)
@@ -3,7 +3,7 @@
PORTNAME= radmind
PORTVERSION= 1.14.1
-PORTREVISION= 2012032001
+PORTREVISION= 2014052201
CATEGORIES= sysutils
MASTER_SITES= SF
MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -11,6 +11,11 @@ MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAM
MAINTAINER= mikeg at bsd-box.net
COMMENT= Utility for administering filesystem changes
+LICENSE= Michigan
+LICENSE_NAME= University of Michigan License
+LICENSE_FILE= ${WRKSRC}/COPYRIGHT
+LICENSE_PERMS= ${_LICENSE_PERMS_DEFAULT}
+
USE_OPENSSL= yes
USE_RC_SUBR= radmind
MAKE_JOBS_UNSAFE= yes
@@ -24,38 +29,36 @@ GROUPS= ${RADMINUSER}
RADMIND_BASE_DIR?= /var/radmind
SUB_LIST= RADMIND_BASE_DIR=${RADMIND_BASE_DIR} RADMINUSER=${RADMINUSER}
-PLIST_SUB= RADMIND_BASE_DIR=${RADMIND_BASE_DIR} RADMINUSER=${RADMINUSER}
+PLIST_SUB= RADMIND_BASE_DIR=${RADMIND_BASE_DIR:S@/@@} RADMINUSER=${RADMINUSER}
SUB_FILES+= pkg-install pkg-message
-MAN1= fsdiff.1 ktcheck.1 lapply.1 lcksum.1 lcreate.1 lfdiff.1 \
- lmerge.1 lsort.1 twhich.1 rash.1 repo.1
-MAN5= applefile.5
-MAN8= radmind.8
DOCS= COPYRIGHT README SPEC
-OPTIONS_DEFINE= IGNORE_TIMESTAMPS DOCS
+OPTIONS_DEFINE= DOCS
IGNORE_TIMESTAMPS_DESC= Add '-t' option to fsdiff
-NO_STAGE= yes
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MIGNORE_TIMESTAMPS}
-EXTRA_PATCHES+= ${FILESDIR}/optpatch-ignore_timestamps
-.endif
-
post-install:
-# Ugly hack to remove generated man pages
+ # Ugly hack to remove generated man pages
${RM} -rf ${WRKSRC}/tmp
-.if ${PORT_OPTIONS:MDOCS}
- ${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}
+ # Port's Docs (Copyright & wire protocol info)
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
+
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/cert
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/client
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/command
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/file
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/postapply
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/preapply
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/special
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp/file
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/tmp/transcript
+ ${MKDIR} ${STAGEDIR}${RADMIND_BASE_DIR}/transcript
+ ${CP} ${FILESDIR}/config.sample ${STAGEDIR}${RADMIND_BASE_DIR}/config.sample
.include <bsd.port.mk>
Modified: head/sysutils/radmind/files/patch-.gitignore
==============================================================================
--- head/sysutils/radmind/files/patch-.gitignore Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-.gitignore Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./.gitignore.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./.gitignore 2012-03-20 14:37:54.000000000 -0400
+--- ./.gitignore.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./.gitignore 2014-06-29 12:15:04.241543320 +0200
@@ -10,12 +10,8 @@
config.log
config.status
Added: head/sysutils/radmind/files/patch-.gitmodules
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-.gitmodules Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,6 @@
+--- ./.gitmodules.orig 2014-06-29 12:15:04.241543320 +0200
++++ ./.gitmodules 2014-06-29 12:15:04.242543988 +0200
+@@ -0,0 +1,3 @@
++[submodule "libsnet"]
++ path = libsnet
++ url = git://libsnet.git.sourceforge.net/gitroot/libsnet/libsnet
Modified: head/sysutils/radmind/files/patch-Makefile.in
==============================================================================
--- head/sysutils/radmind/files/patch-Makefile.in Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-Makefile.in Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./Makefile.in.orig 2010-12-12 22:43:49.000000000 -0500
-+++ ./Makefile.in 2012-03-20 14:37:54.000000000 -0400
+--- Makefile.in.orig 2010-12-13 04:43:49.000000000 +0100
++++ Makefile.in 2014-06-29 13:32:18.069225436 +0200
@@ -204,37 +204,37 @@
radmind : libsnet/libsnet.la ${RADMIND_OBJ} Makefile
${CC} ${CFLAGS} -o radmind ${RADMIND_OBJ} ${LDFLAGS}
@@ -48,3 +48,51 @@
${CC} ${CFLAGS} -o lsort ${LSORT_OBJ} ${LDFLAGS}
FRC :
+@@ -259,7 +259,7 @@
+ (cd .. && tar cvfz ${DISTDIR}.tar.gz ${DISTDIR})
+
+ rash : FRC
+- -mkdir tmp
++ -mkdir -p tmp
+ sed -e 's at _RADMIND_HOST@${RADMIND_HOST}@g' \
+ -e 's at _RADMIND_AUTHLEVEL@${RADMIND_AUTHLEVEL}@g' \
+ -e 's at _RADMIND_PREAPPLY@${PREAPPLYDIR}@g' \
+@@ -273,8 +273,7 @@
+ ${srcdir}/ra.sh > tmp/ra.sh;
+
+ man : FRC
+- -mkdir tmp
+- -mkdir tmp/man
++ -mkdir -p tmp/man
+ pwd
+ for i in ${MANTARGETS}; do \
+ sed -e 's at _RADMIND_PATH@${RADMINDDIR}@g' \
+@@ -290,23 +289,22 @@
+ install : all man rash
+ -mkdir -p ${DESTDIR}/${exec_prefix}
+ -mkdir -p ${DESTDIR}/${SBINDIR}
+- ${INSTALL} -m 0755 -c radmind ${DESTDIR}/${SBINDIR}/
++ ${INSTALL} -s -m 0755 -c radmind ${DESTDIR}/${SBINDIR}/
+ -mkdir -p ${DESTDIR}/${BINDIR}
+ for i in ${BINTARGETS}; do \
+- ${INSTALL} -m 0755 -c $$i ${DESTDIR}/${BINDIR}/; \
++ ${INSTALL} -s -m 0755 -c $$i ${DESTDIR}/${BINDIR}/; \
+ done
+ ${INSTALL} -m 0755 -c tmp/ra.sh ${DESTDIR}/${BINDIR}/
+ -mkdir -p ${DESTDIR}/${prefix}
+- -mkdir -p ${DESTDIR}/${MANDIR}
+- -mkdir ${DESTDIR}/${MANDIR}/man1
++ -mkdir -p ${DESTDIR}/${MANDIR}/man1
+ for i in ${MAN1TARGETS}; do \
+ ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man1/; \
+ done
+- -mkdir ${DESTDIR}/${MANDIR}/man5
++ -mkdir -p ${DESTDIR}/${MANDIR}/man5
+ for i in ${MAN5TARGETS}; do \
+ ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man5/; \
+ done
+- -mkdir ${DESTDIR}/${MANDIR}/man8
++ -mkdir -p ${DESTDIR}/${MANDIR}/man8
+ for i in ${MAN8TARGETS}; do \
+ ${INSTALL} -m 0644 -c tmp/man/$$i ${DESTDIR}/${MANDIR}/man8/; \
+ done
Modified: head/sysutils/radmind/files/patch-README
==============================================================================
--- head/sysutils/radmind/files/patch-README Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-README Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./README.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./README 2012-03-20 14:37:54.000000000 -0400
+--- ./README.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./README 2014-06-29 12:15:04.242543988 +0200
@@ -72,25 +72,25 @@
% "env CPPFLAGS=-I/usr/kerberos/include ./configure"
@@ -19,7 +19,7 @@
-cvs -d :pserver:anonymous at radmind.cvs.sourceforge.net:/cvsroot/radmind \
- checkout radmind
-+ git clone git://radmind.git.sourceforge.net/gitroot/gradmind
++ git clone git://radmind.git.sourceforge.net/gitroot/radmind/radmind
2) Move into the new radmind directory:
Modified: head/sysutils/radmind/files/patch-aclocal.m4
==============================================================================
--- head/sysutils/radmind/files/patch-aclocal.m4 Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-aclocal.m4 Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./aclocal.m4.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./aclocal.m4 2012-03-20 14:37:54.000000000 -0400
+--- ./aclocal.m4.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./aclocal.m4 2014-06-29 12:15:04.242543988 +0200
@@ -105,16 +105,11 @@
arches="-arch i386 -arch ppc"
;;
@@ -19,3 +19,24 @@
;;
*)
+@@ -129,3 +124,20 @@
+ fi
+ ])
+
++AC_DEFUN([MACOSX_MUTE_DEPRECATION_WARNINGS],
++[
++ dnl Lion deprecates a system-provided OpenSSL. Build output
++ dnl is cluttered with useless deprecation warnings.
++
++ AS_IF([test x"$CC" = x"gcc"], [
++ case "${host_os}" in
++ darwin11*)
++ AC_MSG_NOTICE([muting deprecation warnings from compiler])
++ OPTOPTS="$OPTOPTS -Wno-deprecated-declarations"
++ ;;
++
++ *)
++ ;;
++ esac
++ ])
++])
Added: head/sysutils/radmind/files/patch-argcargv.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-argcargv.c Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,13 @@
+--- ./argcargv.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./argcargv.c 2014-06-29 12:15:04.243544285 +0200
+@@ -48,7 +48,9 @@
+
+ if ( acav == NULL ) {
+ if ( acavg == NULL ) {
+- acavg = acav_alloc();
++ if (( acavg = acav_alloc()) == NULL ) {
++ return( -1 );
++ }
+ }
+ acav = acavg;
+ }
Added: head/sysutils/radmind/files/patch-command.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-command.c Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,230 @@
+--- ./command.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./command.c 2014-06-29 12:15:04.244544161 +0200
+@@ -477,38 +477,90 @@
+
+ /* looks for special file info in transcripts */
+ char **
+-special_t( char *transcript, char *epath )
++special_t( char *sp_path, char *remote_path )
+ {
+- FILE *fs;
+- int ac, len;
+- char **av;
++ FILE *fs = NULL;
++ int i, ac, len, ln;
++ char **av = NULL;
++ char *paths[ 4 ] = { NULL };
++ char *p;
++ char sp_t[ MAXPATHLEN ];
+ static char line[ MAXPATHLEN ];
+
+- if (( fs = fopen( transcript, "r" )) == NULL ) {
+- return( NULL );
+- }
++ /*
++ * in order, we look for special file transcript lines in the
++ * following locations:
++ *
++ * - A transcript in the same directory and with the same name
++ * as the special file, but with a ".T" extension.
++ *
++ * - A transcript named "<remote_id>.T" in the same directory as
++ * the client's special file directory root.
++ *
++ * - /var/radmind/transcript/special.T
++ *
++ * if no matching transcript line is found, default metadata is
++ * returned to the client (type: f; mode: 0444; owner: 0; group: 0).
++ */
++ paths[ 0 ] = sp_path;
++ paths[ 1 ] = special_dir;
++ paths[ 2 ] = "transcript/special.T";
++ paths[ 3 ] = NULL;
+
+- while ( fgets( line, MAXPATHLEN, fs ) != NULL ) {
+- len = strlen( line );
+- if (( line[ len - 1 ] ) != '\n' ) {
+- syslog( LOG_ERR, "special_t: %s: line too long", transcript );
+- break;
++ for ( i = 0; paths[ i ] != NULL; i++ ) {
++ if (( p = strrchr( paths[ i ], '.' )) != NULL
++ && strcmp( p, ".T" ) == 0 ) {
++ if ( strlen( paths[ i ] ) >= MAXPATHLEN ) {
++ syslog( LOG_WARNING, "special_t: path \"%s\" too long",
++ paths[ i ] );
++ continue;
++ }
++ strcpy( sp_t, paths[ i ] );
++ } else if ( snprintf( sp_t, MAXPATHLEN, "%s.T",
++ paths[ i ] ) >= MAXPATHLEN ) {
++ syslog( LOG_WARNING, "special_t: path \"%s.T\" too long", sp_path );
++ continue;
+ }
+
+- if (( ac = argcargv( line, &av )) != 8 ) {
++ if (( fs = fopen( sp_t, "r" )) == NULL ) {
+ continue;
+ }
+- if (( *av[ 0 ] != 'f' ) && ( *av[ 0 ] != 'a' )) {
+- continue;
++
++ ln = 0;
++ while ( fgets( line, MAXPATHLEN, fs ) != NULL ) {
++ ln++;
++ len = strlen( line );
++ if (( line[ len - 1 ] ) != '\n' ) {
++ syslog( LOG_ERR, "special_t: %s: line %d too long", sp_t, ln );
++ break;
++ }
++
++ /* only files and applefiles allowed */
++ if ( strncmp( line, "f ", strlen( "f " )) != 0 &&
++ strncmp( line, "a ", strlen( "a " )) != 0 ) {
++ continue;
++ }
++ if (( ac = argcargv( line, &av )) != 8 ) {
++ syslog( LOG_WARNING, "special_t: %s: line %d: "
++ "bad transcript line", sp_t, ln );
++ continue;
++ }
++
++ if ( strcmp( av[ 1 ], remote_path ) == 0 ) {
++ (void)fclose( fs );
++ return( av );
++ }
+ }
+
+- if ( strcmp( av[ 1 ], epath ) == 0 ) {
+- (void)fclose( fs );
+- return( av );
++ if ( fclose( fs ) != 0 ) {
++ syslog( LOG_WARNING, "special_t: fclose %s: %m", sp_t );
+ }
++ fs = NULL;
+ }
+-
+- (void)fclose( fs );
++ if ( fs != NULL ) {
++ (void)fclose( fs );
++ }
++
+ return( NULL );
+ }
+
+@@ -624,11 +676,11 @@
+ switch ( key ) {
+ case K_COMMAND:
+ if ( ac == 2 ) {
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
++ snet_writef( sn, RADMIND_STAT_FMT,
+ "f", "command", DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+ st.st_mtime, st.st_size, cksum_b64 );
+ } else {
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
++ snet_writef( sn, RADMIND_STAT_FMT,
+ "f", av[ 2 ], DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+ st.st_mtime, st.st_size, cksum_b64 );
+ }
+@@ -636,61 +688,33 @@
+
+
+ case K_TRANSCRIPT:
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
++ snet_writef( sn, RADMIND_STAT_FMT,
+ "f", av[ 2 ],
+ DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+ st.st_mtime, st.st_size, cksum_b64 );
+ return( 0 );
+
+ case K_SPECIAL:
+- /* status on a special file comes from 1 of three cases:
+- * 1. A transcript in the special file directory
+- * 2. A transcript in the Transcript dir with .T appended
+- * 3. No transcript is found, and constants are returned
+- */
+-
+- /* look for transcript containing the information */
+- if ( ( strlen( path ) + 2 ) > MAXPATHLEN ) {
+- syslog( LOG_WARNING,
+- "f_stat: transcript path longer than MAXPATHLEN" );
+-
+- /* return constants */
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+- "f", av[ 2 ],
+- DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+- st.st_mtime, st.st_size, cksum_b64 );
+- return( 0 );
+- }
+-
+- /* if allowable, check for transcript in the special file directory */
+-
+- strcat( path, ".T" );
+-
+- /* store value of av[ 2 ], because argcargv will be called
++ /*
++ * store value of av[ 2 ], because argcargv will be called
+ * from special_t(), and that will blow away the current values
+- * for av[ 2 ]
+- *
+- * Could just use new argvargc API... XXX Notice how we never free
+- * env_file...
++ * for av[ 2 ].
+ */
+-
+ if (( enc_file = strdup( av[ 2 ] )) == NULL ) {
+ syslog( LOG_ERR, "f_stat: strdup: %s %m", av[ 2 ] );
+ return( -1 );
+ }
+
+ if (( av = special_t( path, enc_file )) == NULL ) {
+- if (( av = special_t( "transcript/special.T", enc_file ))
+- == NULL ) {
+- snet_writef( sn, "%s %s %o %d %d %d %" PRIofft "d %s\r\n",
+- "f", enc_file,
+- DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
+- st.st_mtime, st.st_size, cksum_b64 );
+- free( enc_file );
+- return( 0 );
+- }
++ /* no special transcript match found, return defaults. */
++ snet_writef( sn, RADMIND_STAT_FMT,
++ "f", enc_file,
++ DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
++ st.st_mtime, st.st_size, cksum_b64 );
++ free( enc_file );
++ return( 0 );
+ }
+- snet_writef( sn, "%s %s %s %s %s %d %" PRIofft "d %s\r\n",
++ snet_writef( sn, RADMIND_STAT_FMT,
+ av[ 0 ], enc_file,
+ av[ 2 ], av[ 3 ], av[ 4 ],
+ st.st_mtime, st.st_size, cksum_b64 );
+@@ -1261,8 +1285,7 @@
+ continue;
+ }
+ if ( strcmp( av[ 0 ], "@include" ) == 0 ) {
+- depth++;
+- if ( depth > RADMIND_MAX_INCLUDE_DEPTH ) {
++ if ( depth >= RADMIND_MAX_INCLUDE_DEPTH ) {
+ syslog( LOG_ERR, "%s: line %d: include %s exceeds max depth",
+ path_config, linenum, av[ 1 ] );
+ goto command_k_done;
+@@ -1277,7 +1300,7 @@
+ continue;
+ }
+ }
+- if ( command_k( av[ 1 ], depth ) != 0 ) {
++ if ( command_k( av[ 1 ], depth + 1 ) != 0 ) {
+ continue;
+ }
+
+@@ -1325,7 +1348,8 @@
+
+ /* If we get here, the host that connected is not in the config
+ file. So screw him. */
+- syslog( LOG_ERR, "host not in config file: %s", remote_host );
++ syslog( LOG_ERR, "host %s not in config file %s",
++ remote_host, path_config );
+
+ command_k_done:
+ snet_close( sn );
Added: head/sysutils/radmind/files/patch-command.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-command.h Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,8 @@
+--- ./command.h.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./command.h 2014-06-29 12:15:04.244544161 +0200
+@@ -13,3 +13,5 @@
+ char *c_name;
+ int (*c_func)( SNET *, int, char *[] );
+ };
++
++#define RADMIND_STAT_FMT "%s %s %o %d %d %" PRItimet "d %" PRIofft "d %s\r\n"
Modified: head/sysutils/radmind/files/patch-configure.ac
==============================================================================
--- head/sysutils/radmind/files/patch-configure.ac Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-configure.ac Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,12 +1,17 @@
---- ./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 @@
+--- ./configure.ac.orig 2010-12-13 04:43:38.000000000 +0100
++++ ./configure.ac 2014-06-29 12:15:04.244544161 +0200
+@@ -44,25 +44,36 @@
+
# Check sizes
AC_CHECK_SIZEOF(off_t)
-
++AC_CHECK_SIZEOF(time_t)
++
+# check early to make any required changes to environment for following tests.
+CHECK_UNIVERSAL_BINARIES
+
++# mute Mac OS X's helpful notices that using dylib OpenSSL
++MACOSX_MUTE_DEPRECATION_WARNINGS
+
# Checks for libraries.
AC_CHECK_LIB(c, inet_aton, libc_inet_aton=yes)
if test x$libc_inet_aton != xyes; then
@@ -14,8 +19,10 @@
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)], [])
++if test x$host_vendor = xapply; then
++ AC_CHECK_LIB(c, lchown, [AC_DEFINE(HAVE_LCHOWN)], [])
++ AC_CHECK_LIB(c, lchmod, [AC_DEFINE(HAVE_LCHMOD)], [])
++fi
AC_CHECK_LIB(nsl, gethostbyaddr)
AC_CHECK_LIB([socket], [socket])
AC_CHECK_LIB([ssl], [SSL_accept], , [CHECK_SSL])
@@ -34,7 +41,7 @@
AC_CHECK_LIB([pam], [pam_start],
[
AC_CHECK_HEADERS(pam/pam_appl.h, , [AC_CHECK_HEADERS(security/pam_appl.h)])
-@@ -75,7 +80,6 @@
+@@ -75,7 +86,6 @@
AC_CHECK_LIB(dns_sd, DNSServiceRegister)
CHECK_ZLIB
Added: head/sysutils/radmind/files/patch-contrib__specialist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-contrib__specialist Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,82 @@
+--- ./contrib/specialist.orig 2014-06-29 12:15:04.244544161 +0200
++++ ./contrib/specialist 2014-06-29 12:15:04.245544128 +0200
+@@ -0,0 +1,79 @@
++#! /bin/sh
++
++# specialist: assist creation of special files.
++
++PATH=/bin:/usr/bin:/usr/local/bin; export PATH
++
++SCRIPT=`basename "$0"`
++INPUT_FORMAT=${INPUT_FORMAT:=path}
++
++usage() {
++ echo "usage: ${SCRIPT} [ -T ]" 1>&2
++ exit 1
++}
++
++die() {
++ msg=$*
++
++ echo "${msg}" 1>&2
++ exit 2
++}
++
++# create a special transcript line for the given path.
++specialize() {
++ local path="$1"
++
++ [ -n "${path}" -a -f "${path}" ] || die "Invalid path: ${path}"
++
++ fsdiff -1 -c sha1 "${path}"
++ return $?
++}
++
++specialize_transcript() {
++ local path=""
++ status=0
++
++ while read type path remainder; do
++ if [ x"${type}" != x"f" ]; then
++ continue
++ fi
++
++ specialize "${path}"
++ done
++}
++
++specialize_paths() {
++ local path=""
++ status=0
++
++ while read path; do
++ specialize "${path}"
++ if [ $? -ne 0 ]; then
++ status=1
++ fi
++ done
++
++ return "${status}"
++}
++
++while getopts T opt; do
++ case $opt in
++ T)
++ INPUT_FORMAT="transcript"
++ ;;
++
++ *)
++ usage
++ ;;
++
++ esac
++done
++shift $((OPTIND - 1))
++
++if [ x"${INPUT_FORMAT}" = x"transcript" ]; then
++ specialize_transcript
++else
++ specialize_paths
++fi
++
++exit $?
Added: head/sysutils/radmind/files/patch-fsdiff.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-fsdiff.c Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,251 @@
+--- ./fsdiff.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./fsdiff.c 2014-06-29 12:15:04.245544128 +0200
+@@ -249,6 +249,144 @@
+ return;
+ }
+
++ static char *
++canonicalized_path( char *path )
++{
++ int len;
++ static char cpath[ MAXPATHLEN ];
++
++ if ( path == NULL ) {
++ return( NULL );
++ }
++
++ len = strlen( path );
++ if ( len >= sizeof( cpath )) {
++ fprintf( stderr, "fsdiff: path too long: %s\n", path );
++ exit( 2 );
++ }
++ strcpy( cpath, path );
++
++ /* Clip trailing '/' */
++ if (( len > 1 ) && ( cpath[ len - 1 ] == '/' )) {
++ cpath[ len - 1 ] = '\0';
++ len--;
++ }
++
++ /*
++ * If prefix doesn't contain a directory, canonicalize it by prepending a
++ * "./". This allow paths to be dynamically converted between relative and
++ * absolute paths without breaking sort order.
++ */
++ switch( cpath[ 0 ] ) {
++ case '/':
++ break;
++
++ case '.':
++ /* Don't rewrite '.' or paths starting with './' */
++ if ( len == 1 || cpath[ 1 ] == '/' ) {
++ break;
++ }
++
++ default:
++ if ( len + 2 >= sizeof( cpath )) {
++ fprintf( stderr, "fsdiff: path too long: ./%s\n", cpath );
++ exit( 2 );
++ }
++ memmove( cpath + 2, cpath, len );
++ cpath[ 0 ] = '.'; cpath[ 1 ] = '/';
++
++ break;
++ }
++
++ /*
++ * Determine if called with relative or absolute pathing. Path is relative
++ * if it's just '.' or starts with './'. File names that start with a '.'
++ * are absolute.
++ */
++ if ( cpath[ 0 ] == '.' ) {
++ if ( len == 1 ) {
++ tran_format = T_RELATIVE;
++ } else if ( cpath[ 1 ] == '/' ) {
++ tran_format = T_RELATIVE;
++ } else {
++ tran_format = T_ABSOLUTE;
++ }
++ } else {
++ tran_format = T_ABSOLUTE;
++ }
++
++ return( cpath );
++}
++
++ static void
++fsdiff( char *path, char *kfile, int start, int finish, int pdel )
++{
++ struct applefileinfo afinfo;
++ struct stat st;
++ char type;
++ char lpath[ MAXPATHLEN ];
++ int len;
++
++ if (( dotfd = open( ".", O_RDONLY, 0 )) < 0 ) {
++ perror( "OOPS!" );
++ exit( 2 );
++ }
++
++ if ( skip && strcmp( path, "-" ) == 0 ) {
++ /* leave excludes in place */
++ skip = skip & ~T_SKIP_EXCLUDES;
++
++ path_prefix = "/";
++ transcript_init( kfile, K_CLIENT );
++
++ /* run -1 against every line we get from stdin */
++ while ( fgets( lpath, sizeof( lpath ), stdin ) != NULL ) {
++ len = strlen( lpath );
++ if ( lpath[ len - 1 ] != '\n' ) {
++ fprintf( stderr, "fsdiff: fgets: line too long\n" );
++ exit( 2 );
++ }
++ lpath[ len - 1 ] = '\0';
++ path = canonicalized_path( lpath );
++
++ if ( radstat( path, &st, &type, &afinfo ) != 0 ) {
++ if ( errno != ENOENT ) {
++ perror( lpath );
++ exit( 2 );
++ }
++
++ fprintf( stderr, "Warning: %s: %s\n", path, strerror( errno ));
++ continue;
++ }
++ (void)transcript( path, &st, &type, &afinfo, pdel );
++ }
++ if ( ferror( stdin )) {
++ perror( "fgets" );
++ exit( 2 );
++ }
++ } else {
++ path_prefix = canonicalized_path( path );
++
++ /* initialize the transcripts */
++ transcript_init( kfile, K_CLIENT );
++
++ if ( radstat( path_prefix, &st, &type, &afinfo ) != 0 ) {
++ perror( path_prefix );
++ exit( 2 );
++ }
++
++ fs_walk( path_prefix, &st, &type, &afinfo, start, finish, pdel );
++ }
++
++ if ( finish > 0 ) {
++ printf( "%%%d\n", ( int )finish );
++ }
++
++ /* free the transcripts */
++ transcript_free( );
++ hardlink_free( );
++}
++
+ int
+ main( int argc, char **argv )
+ {
+@@ -258,9 +396,6 @@
+ int c, len, edit_path_change = 0;
+ int errflag = 0, use_outfile = 0;
+ int finish = 0;
+- struct stat st;
+- char type, buf[ MAXPATHLEN ];
+- struct applefileinfo afinfo;
+
+ edit_path = CREATABLE;
+ cksum = 0;
+@@ -300,7 +435,7 @@
+ break;
+
+ case '1':
+- skip = 1;
++ skip = T_SKIP_ALL;
+ case 'C':
+ edit_path_change++;
+ edit_path = CREATABLE;
+@@ -347,82 +482,13 @@
+ }
+
+ if ( errflag || ( argc - optind != 1 )) {
+- fprintf( stderr, "usage: %s { -C | -A | -1 } [ -IVW ] ", argv[ 0 ] );
++ fprintf( stderr, "usage: %s { -C | -A | -1 } " "[ -IVW ] ", argv[ 0 ] );
+ fprintf( stderr, "[ -K command ] " );
+ fprintf( stderr, "[ -c checksum ] [ -o file [ -%% ] ] path\n" );
+ exit ( 2 );
+ }
+
+- path_prefix = argv[ optind ];
+- len = strlen( path_prefix );
+-
+- /* Clip trailing '/' */
+- if (( len > 1 ) && ( path_prefix[ len - 1 ] == '/' )) {
+- path_prefix[ len - 1 ] = '\0';
+- len--;
+- }
+-
+- /* If path_prefix doesn't contain a directory, canonicalize it by
+- * prepending a "./". This allow paths to be dynamically converted between
+- * relative and absolute paths without breaking sort order.
+- */
+- switch( path_prefix[ 0 ] ) {
+- case '/':
+- break;
+-
+- case '.':
+- /* Don't rewrite '.' or paths starting with './' */
+- if (( len == 1 ) || ( path_prefix[ 1 ] == '/' )) {
+- break;
+- }
+- default:
+- if ( snprintf( buf, sizeof( buf ), "./%s",
+- path_prefix ) >= MAXPATHLEN ) {
+- fprintf( stderr, "path too long\n" );
+- exit( 2 );
+- }
+- path_prefix = buf;
+- break;
+- }
+-
+- /* Determine if called with relative or absolute pathing. Path is relative
+- * if it's just '.' or starts with './'. File names that start with a '.'
+- * are absolute.
+- */
+- if ( path_prefix[ 0 ] == '.' ) {
+- if ( len == 1 ) {
+- tran_format = T_RELATIVE;
+- } else if ( path_prefix[ 1 ] == '/' ) {
+- tran_format = T_RELATIVE;
+- } else {
+- tran_format = T_ABSOLUTE;
+- }
+- } else {
+- tran_format = T_ABSOLUTE;
+- }
+-
+- if ( radstat( path_prefix, &st, &type, &afinfo ) != 0 ) {
+- perror( path_prefix );
+- exit( 2 );
+- }
+-
+- if (( dotfd = open( ".", O_RDONLY, 0 )) < 0 ) {
+- perror( "OOPS!" );
+- exit( 2 );
+- }
+-
+- /* initialize the transcripts */
+- transcript_init( kfile, K_CLIENT );
+-
+- fs_walk( path_prefix, &st, &type, &afinfo, 0, finish, 0 );
+-
+- if ( finish > 0 ) {
+- printf( "%%%d\n", ( int )finish );
+- }
+-
+- /* free the transcripts */
+- transcript_free( );
+- hardlink_free( );
++ fsdiff( argv[ optind ], kfile, 0, finish, 0 );
+
+ /* close the output file */
+ fclose( outtran );
Added: head/sysutils/radmind/files/patch-ktcheck.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-ktcheck.c Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,20 @@
+--- ./ktcheck.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./ktcheck.c 2014-06-29 12:15:04.245544128 +0200
+@@ -459,7 +459,7 @@
+ perror( "Incorrect number of arguments\n" );
+ return( 2 );
+ }
+- times.modtime = atoi( targv[ 5 ] );
++ times.modtime = strtotimet( targv[ 5 ], NULL, 10 );
+ times.actime = time( NULL );
+
+ if (( stat( path, &st )) != 0 ) {
+@@ -506,7 +506,7 @@
+ needupdate = 1;
+ }
+ } else {
+- if ( atoi( targv[ 5 ] ) != (int)st.st_mtime ) {
++ if ( strtotimet( targv[ 5 ], NULL, 10 ) != st.st_mtime ) {
+ needupdate = 1;
+ }
+ }
Modified: head/sysutils/radmind/files/patch-lapply.c
==============================================================================
--- head/sysutils/radmind/files/patch-lapply.c Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-lapply.c Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./lapply.c.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./lapply.c 2012-03-20 14:37:54.000000000 -0400
+--- ./lapply.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./lapply.c 2014-06-29 12:15:04.246544121 +0200
@@ -651,27 +651,37 @@
filechecklist:
if ( head == NULL ) {
Added: head/sysutils/radmind/files/patch-largefile.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-largefile.h Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,18 @@
+--- ./largefile.h.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./largefile.h 2014-06-29 12:15:04.246544121 +0200
+@@ -18,3 +18,15 @@
+ #define strtoofft(x,y,z) (strtol((x),(y),(z)))
+ #define PRIofft "l"
+ #endif
++
++#if SIZEOF_TIME_T == 8
++ #ifdef HAVE_STRTOLL
++ #define strtotimet(x,y,z) (strtoll((x),(y),(z)))
++ #else /* !HAVE_STRTOLL */
++ #define strtotimet(x,y,z) (strtol((x),(y),(z)))
++ #endif /* HAVE_STRTOLL */
++ #define PRItimet "ll"
++#else /* SIZEOF_TIME_T != 8 */
++ #define strtotimet(x,y,z) (strtol((x),(y),(z)))
++ #define PRItimet "l"
++#endif /* SIZEOF_TIME_T */
Added: head/sysutils/radmind/files/patch-lcksum.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/radmind/files/patch-lcksum.c Sat Jul 12 09:31:02 2014 (r361606)
@@ -0,0 +1,35 @@
+--- ./lcksum.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./lcksum.c 2014-06-29 12:15:04.247544144 +0200
+@@ -434,7 +434,7 @@
+ /* Check to see if checksum is listed in transcript */
+ if ( strcmp( targv[ 7 ], "-" ) != 0) {
+ /* use mtime from server */
+- fprintf( ufs, "%s %-37s %4s %5s %5s %9ld "
++ fprintf( ufs, "%s %-37s %4s %5s %5s %9" PRItimet "d "
+ "%7" PRIofft "d %s\n",
+ targv[ 0 ], targv[ 1 ], targv[ 2 ], targv[ 3 ],
+ targv[ 4 ], st.st_mtime, st.st_size, lcksum );
+@@ -457,6 +457,12 @@
+ }
+ free( line );
+ }
++ if ( fclose( f ) != 0 ) {
++ fprintf( stderr, "%s: fclose failed: %s\n", path, strerror( errno ));
++ cleanup( updatetran, upath );
++ exit( 2 );
++ }
++
+ if ( showprogress ) {
+ progressupdate( bytes, "" );
+ }
+@@ -496,6 +502,10 @@
+ badline:
+ exitval = 1;
+
++ if ( fclose( f ) != 0 ) {
++ fprintf( stderr, "%s: fclose failed: %s\n", path, strerror( errno ));
++ }
++
+ if ( checkall ) {
+ goto done;
+ } else {
Modified: head/sysutils/radmind/files/patch-man__lcreate.1
==============================================================================
--- head/sysutils/radmind/files/patch-man__lcreate.1 Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-man__lcreate.1 Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./man/lcreate.1.orig 2010-12-12 22:50:53.000000000 -0500
-+++ ./man/lcreate.1 2012-03-20 14:38:03.000000000 -0400
+--- ./man/lcreate.1.orig 2010-12-13 04:50:53.000000000 +0100
++++ ./man/lcreate.1 2014-06-29 12:15:04.247544144 +0200
@@ -45,12 +45,6 @@
.sp
If the -n option is given, no files or transcripts are uploaded. Instead,
Modified: head/sysutils/radmind/files/patch-man__rash.1
==============================================================================
--- head/sysutils/radmind/files/patch-man__rash.1 Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-man__rash.1 Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./man/rash.1.orig 2010-12-12 22:50:53.000000000 -0500
-+++ ./man/rash.1 2012-03-20 14:38:08.000000000 -0400
+--- ./man/rash.1.orig 2010-12-13 04:50:53.000000000 +0100
++++ ./man/rash.1 2014-06-29 12:15:04.247544144 +0200
@@ -11,6 +11,10 @@
|
.B -q
Modified: head/sysutils/radmind/files/patch-mkdirs.c
==============================================================================
--- head/sysutils/radmind/files/patch-mkdirs.c Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-mkdirs.c Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./mkdirs.c.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./mkdirs.c 2012-03-20 14:38:08.000000000 -0400
+--- ./mkdirs.c.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./mkdirs.c 2014-06-29 12:15:04.247544144 +0200
@@ -37,7 +37,9 @@
if ( mkdir( path, 0777 ) == 0 ) {
break;
Modified: head/sysutils/radmind/files/patch-ra.sh
==============================================================================
--- head/sysutils/radmind/files/patch-ra.sh Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-ra.sh Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./ra.sh.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./ra.sh 2012-03-20 14:38:08.000000000 -0400
+--- ./ra.sh.orig 2010-12-13 04:42:49.000000000 +0100
++++ ./ra.sh 2014-06-29 12:15:04.248542975 +0200
@@ -91,7 +91,7 @@
}
Modified: head/sysutils/radmind/files/patch-t2pkg.c
==============================================================================
--- head/sysutils/radmind/files/patch-t2pkg.c Sat Jul 12 09:09:44 2014 (r361605)
+++ head/sysutils/radmind/files/patch-t2pkg.c Sat Jul 12 09:31:02 2014 (r361606)
@@ -1,5 +1,5 @@
---- ./t2pkg.c.orig 2010-12-12 22:42:49.000000000 -0500
-+++ ./t2pkg.c 2012-03-20 14:38:08.000000000 -0400
+--- ./t2pkg.c.orig 2010-12-13 04:42:49.000000000 +0100
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-ports-head
mailing list