Index: head/net/cvsup-mirror/Makefile =================================================================== --- head/net/cvsup-mirror/Makefile (revision 183584) +++ head/net/cvsup-mirror/Makefile (revision 183585) @@ -1,46 +1,55 @@ # New ports collection makefile for: cvsup-mirror # Date created: 01 February 1997 # Whom: jdp # # $FreeBSD$ # PORTNAME= cvsup-mirror PORTVERSION= 1.3 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= net DISTFILES= MAINTAINER= jdp@FreeBSD.org COMMENT= A kit for easily setting up a FreeBSD mirror site using CVSup RUN_DEPENDS= ${LOCALBASE}/sbin/cvsupd:${PORTSDIR}/net/cvsup-without-gui NO_WRKSUBDIR= true NO_BUILD= true IS_INTERACTIVE= true NO_PACKAGE= too interactive SCRIPTS_ENV= USA_RESIDENT=${USA_RESIDENT} USE_RC_SUBR= cvsupd.sh +SUB_FILES= update.sh base=${PREFIX}/etc/cvsup distrib=${base}/sup.client/distrib +.include + +.if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101)) +SUB_LIST+= CVSUPD="cvsupd" +.else +SUB_LIST+= CVSUPD="cvsupd.sh" +.endif + do-extract: @test -d ${WRKSRC} || ${MKDIR} ${WRKSRC} do-install: @${ECHO_MSG} "Installing files" @test -d ${distrib} || ${MKDIR} ${distrib} @${INSTALL_DATA} ${WRKSRC}/config.sh ${base} @${INSTALL_DATA} ${WRKSRC}/cvsupd.access ${base} - @${INSTALL_SCRIPT} ${FILESDIR}/update.sh ${base} + @${INSTALL_SCRIPT} ${WRKSRC}/update.sh ${base} @${INSTALL_DATA} ${FILESDIR}/supfile ${base} @${INSTALL_DATA} ${FILESDIR}/refuse.self ${distrib} @${CP} /dev/null ${base}/.start_server post-install: @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.include +.include Property changes on: head/net/cvsup-mirror/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.23 \ No newline at end of property +1.24 \ No newline at end of property Index: head/net/cvsup-mirror/files/update.sh =================================================================== --- head/net/cvsup-mirror/files/update.sh (revision 183584) +++ head/net/cvsup-mirror/files/update.sh (nonexistent) @@ -1,59 +0,0 @@ -#! /bin/sh - -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/cvsup/update\.sh\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -export PREFIX -export CVSUP_ARGS="$*" -export PATH=/bin:/usr/bin:${PREFIX}/bin - -lock=/var/spool/lock/cvsup.lock -log=/var/log/cvsup.log - -umask 22 - -exec >>${log} 2>&1 - -# Do the update - -date "+CVSup update begins at %Y-%m-%d %T" - -# The rest of this is executed while holding the lock file, to ensure that -# multiple instances won't collide with one another. - -lockf -t 0 ${lock} /bin/sh << 'E*O*F' - -base=${PREFIX}/etc/cvsup -rundir=/var/tmp -cd ${rundir} || exit -. ${base}/config.sh || exit - -colldir=sup.client -startup=${PREFIX}/etc/rc.d -eval chome=~${cuser} -cmd="exec env HOME=${chome} cvsup" -options="-1gL 1 -b ${base} -c ${colldir} ${CVSUP_ARGS}" - -umask 2 -ok=yes - -echo "Updating from ${host}" -su -f -m ${cuser} -c \ - "${cmd} ${options} -h ${host} ${base}/supfile" || ok=no - -if [ ${ok} = yes ]; then - if [ -f ${base}/.start_server ]; then - if [ -x ${startup}/cvsupd.sh ]; then - echo -n "Starting the server:" - /bin/sh ${startup}/cvsupd.sh start - echo "." - fi - rm -f ${base}/.start_server - fi -fi - -E*O*F - -date "+CVSup update ends at %Y-%m-%d %T" Property changes on: head/net/cvsup-mirror/files/update.sh ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.18 \ No newline at end of property Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Index: head/net/cvsup-mirror/files/update.sh.in =================================================================== --- head/net/cvsup-mirror/files/update.sh.in (nonexistent) +++ head/net/cvsup-mirror/files/update.sh.in (revision 183585) @@ -0,0 +1,59 @@ +#! /bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/cvsup/update\.sh\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +export PREFIX +export CVSUP_ARGS="$*" +export PATH=/bin:/usr/bin:${PREFIX}/bin + +lock=/var/spool/lock/cvsup.lock +log=/var/log/cvsup.log + +umask 22 + +exec >>${log} 2>&1 + +# Do the update + +date "+CVSup update begins at %Y-%m-%d %T" + +# The rest of this is executed while holding the lock file, to ensure that +# multiple instances won't collide with one another. + +lockf -t 0 ${lock} /bin/sh << 'E*O*F' + +base=${PREFIX}/etc/cvsup +rundir=/var/tmp +cd ${rundir} || exit +. ${base}/config.sh || exit + +colldir=sup.client +startup=${PREFIX}/etc/rc.d +eval chome=~${cuser} +cmd="exec env HOME=${chome} cvsup" +options="-1gL 1 -b ${base} -c ${colldir} ${CVSUP_ARGS}" + +umask 2 +ok=yes + +echo "Updating from ${host}" +su -f -m ${cuser} -c \ + "${cmd} ${options} -h ${host} ${base}/supfile" || ok=no + +if [ ${ok} = yes ]; then + if [ -f ${base}/.start_server ]; then + if [ -x ${startup}/%%CVSUPD%% ]; then + echo -n "Starting the server:" + /bin/sh ${startup}/%%CVSUPD%% start + echo "." + fi + rm -f ${base}/.start_server + fi +fi + +E*O*F + +date "+CVSup update ends at %Y-%m-%d %T" Property changes on: head/net/cvsup-mirror/files/update.sh.in ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property