Date: Tue, 1 Nov 2016 21:03:32 +0000 (UTC) From: Mark Felder <feld@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r425093 - in branches/2016Q4/net-mgmt/rancid3: . files Message-ID: <201611012103.uA1L3Wk3038115@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: feld Date: Tue Nov 1 21:03:32 2016 New Revision: 425093 URL: https://svnweb.freebsd.org/changeset/ports/425093 Log: MFH: r425092 net-mgmt/rancid3: port improvements - Add periodic script - Change PREFIX to LOCALBASE in port Makefile - Inform users of periodic script via updated pkg-message Approved by: ports-secteam (with hat) Added: branches/2016Q4/net-mgmt/rancid3/files/200.rancid.in - copied unchanged from r425092, head/net-mgmt/rancid3/files/200.rancid.in Modified: branches/2016Q4/net-mgmt/rancid3/Makefile branches/2016Q4/net-mgmt/rancid3/files/pkg-message.in branches/2016Q4/net-mgmt/rancid3/pkg-plist Directory Properties: branches/2016Q4/ (props changed) Modified: branches/2016Q4/net-mgmt/rancid3/Makefile ============================================================================== --- branches/2016Q4/net-mgmt/rancid3/Makefile Tue Nov 1 21:02:13 2016 (r425092) +++ branches/2016Q4/net-mgmt/rancid3/Makefile Tue Nov 1 21:03:32 2016 (r425093) @@ -3,7 +3,7 @@ PORTNAME= rancid PORTVERSION= 3.5.1 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.shrubbery.net/pub/rancid/ PKGNAMESUFFIX= 3 @@ -21,12 +21,12 @@ SHEBANG_FILES= bin/* USERS= rancid GROUPS= rancid -SUB_FILES= pkg-message +SUB_FILES= pkg-message 200.rancid GNU_CONFIGURE= yes -CONFIGURE_ARGS= --localstatedir=${PREFIX}/var/${PORTNAME}/ \ - --bindir=${PREFIX}/libexec/${PORTNAME}/ \ - --sysconfdir=${PREFIX}/etc/${PORTNAME}/ +CONFIGURE_ARGS= --localstatedir=${LOCALBASE}/var/${PORTNAME}/ \ + --bindir=${LOCALBASE}/libexec/${PORTNAME}/ \ + --sysconfdir=${LOCALBASE}/etc/${PORTNAME}/ OLDCONFIG_FILE1= bin/env OLDCONFIG_FILE2= util/lg/lg.conf @@ -71,43 +71,45 @@ post-patch: ${MV} ${WRKSRC}/man/par.1 ${WRKSRC}/man/rancid-par.1 post-install: - ${LN} -s ${PREFIX}/libexec/${PORTNAME}/rancid-cvs ${STAGEDIR}${PREFIX}/bin - ${LN} -s ${PREFIX}/libexec/${PORTNAME}/rancid-run ${STAGEDIR}${PREFIX}/bin + ${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/periodic/hourly + ${INSTALL_SCRIPT} ${WRKDIR}/200.rancid ${STAGEDIR}${LOCALBASE}/etc/periodic/hourly + ${LN} -s ${LOCALBASE}/libexec/${PORTNAME}/rancid-cvs ${STAGEDIR}${LOCALBASE}/bin + ${LN} -s ${LOCALBASE}/libexec/${PORTNAME}/rancid-run ${STAGEDIR}${LOCALBASE}/bin .if ${PORT_OPTIONS:MCOMWARE} - ${INSTALL_DATA} ${FILESDIR}/cmw.pm ${STAGEDIR}/${PREFIX}/lib/rancid - ${INSTALL_SCRIPT} ${FILESDIR}/cmwlogin ${STAGEDIR}/${PREFIX}/libexec/rancid + ${INSTALL_DATA} ${FILESDIR}/cmw.pm ${STAGEDIR}/${LOCALBASE}/lib/rancid + ${INSTALL_SCRIPT} ${FILESDIR}/cmwlogin ${STAGEDIR}/${LOCALBASE}/libexec/rancid .endif .for file in ${NEWCONFIG_FILES} - @ if [ -f ${PREFIX}/etc/${PORTNAME}/${file} ] ; then \ - ${ECHO} "WARNING: *** new ${file} file is installed as ${PREFIX}/rancid/${file}.sample"; \ + @ if [ -f ${LOCALBASE}/etc/${PORTNAME}/${file} ] ; then \ + ${ECHO} "WARNING: *** new ${file} file is installed as ${LOCALBASE}/rancid/${file}.sample"; \ ${ECHO} " : *** review ${file}.sample for new/deprecated switches or install in place ${file}"; \ fi .endfor - @ if [ -f ${PREFIX}/rancid/${NEWERCONFIG_FILE1} ] ; then \ - ${ECHO} "WARNING: *** ${PREFIX}/rancid/${NEWERCONFIG_FILE1} has been replaced with "; \ - ${ECHO} " : *** ${PREFIX}/etc/${PORTNAME}/rancid.conf. Merge from sample and old file "; \ - fi - @ if [ -f ${PREFIX}/rancid/${NEWERCONFIG_FILE2} ] ; then \ - ${ECHO} "WARNING: *** ${PREFIX}/rancid/${NEWERCONFIG_FILE2} has been replaced with "; \ - ${ECHO} " : *** ${PREFIX}/etc/${PORTNAME}/lg.conf. Merge from sample and old file "; \ - fi - @ if [ -f ${PREFIX}/rancid/${NEWERCONFIG_FILE1} -o \ - -f ${PREFIX}/rancid/${NEWERCONFIG_FILE2} ] ; then \ - ${ECHO} "WARNING: *** New CVS Repository will be stored ${PREFIX}/var/${PORTNAME}/ "; \ + @ if [ -f ${LOCALBASE}/rancid/${NEWERCONFIG_FILE1} ] ; then \ + ${ECHO} "WARNING: *** ${LOCALBASE}/rancid/${NEWERCONFIG_FILE1} has been replaced with "; \ + ${ECHO} " : *** ${LOCALBASE}/etc/${PORTNAME}/rancid.conf. Merge from sample and old file "; \ + fi + @ if [ -f ${LOCALBASE}/rancid/${NEWERCONFIG_FILE2} ] ; then \ + ${ECHO} "WARNING: *** ${LOCALBASE}/rancid/${NEWERCONFIG_FILE2} has been replaced with "; \ + ${ECHO} " : *** ${LOCALBASE}/etc/${PORTNAME}/lg.conf. Merge from sample and old file "; \ + fi + @ if [ -f ${LOCALBASE}/rancid/${NEWERCONFIG_FILE1} -o \ + -f ${LOCALBASE}/rancid/${NEWERCONFIG_FILE2} ] ; then \ + ${ECHO} "WARNING: *** New CVS Repository will be stored ${LOCALBASE}/var/${PORTNAME}/ "; \ ${ECHO} " : *** Copy the repository if you want to keep the history "; \ fi - @ if [ -f ${PREFIX}/rancid/${OLDCONFIG_FILE1} ] ; then \ - ${ECHO} "WARNING: *** ${PREFIX}/rancid/${OLDCONFIG_FILE1} has been replaced with "; \ - ${ECHO} " : *** ${PREFIX}/etc/${PORTNAME}/rancid.conf. Merge from sample and old file "; \ - fi - @ if [ -f ${PREFIX}/rancid/${OLDCONFIG_FILE2} ] ; then \ - ${ECHO} "WARNING: *** ${PREFIX}/rancid/${OLDCONFIG_FILE2} has been replaced with "; \ - ${ECHO} " : *** ${PREFIX}/etc/${PORTNAME}/lg.conf. Merge from sample and old file "; \ - fi - @ if [ -f ${PREFIX}/rancid/${OLDCONFIG_FILE1} -o \ - -f ${PREFIX}/rancid/${OLDCONFIG_FILE2} ] ; then \ - ${ECHO} "WARNING: *** New CVS Repository will be stored ${PREFIX}/rancid/var "; \ + @ if [ -f ${LOCALBASE}/rancid/${OLDCONFIG_FILE1} ] ; then \ + ${ECHO} "WARNING: *** ${LOCALBASE}/rancid/${OLDCONFIG_FILE1} has been replaced with "; \ + ${ECHO} " : *** ${LOCALBASE}/etc/${PORTNAME}/rancid.conf. Merge from sample and old file "; \ + fi + @ if [ -f ${LOCALBASE}/rancid/${OLDCONFIG_FILE2} ] ; then \ + ${ECHO} "WARNING: *** ${LOCALBASE}/rancid/${OLDCONFIG_FILE2} has been replaced with "; \ + ${ECHO} " : *** ${LOCALBASE}/etc/${PORTNAME}/lg.conf. Merge from sample and old file "; \ + fi + @ if [ -f ${LOCALBASE}/rancid/${OLDCONFIG_FILE1} -o \ + -f ${LOCALBASE}/rancid/${OLDCONFIG_FILE2} ] ; then \ + ${ECHO} "WARNING: *** New CVS Repository will be stored ${LOCALBASE}/rancid/var "; \ ${ECHO} " : *** Copy the repository if you want to keep the history "; \ fi Copied: branches/2016Q4/net-mgmt/rancid3/files/200.rancid.in (from r425092, head/net-mgmt/rancid3/files/200.rancid.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q4/net-mgmt/rancid3/files/200.rancid.in Tue Nov 1 21:03:32 2016 (r425093, copy of r425092, head/net-mgmt/rancid3/files/200.rancid.in) @@ -0,0 +1,20 @@ +#!/bin/sh + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ]; then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +# hourly_rancid_enable - Enable hourly rancid run (values: YES | NO) + +case "${hourly_rancid_enable-"NO"}" in + [Yy][Ee][Ss]) + /usr/bin/su -f rancid %%LOCALBASE%%/libexec/rancid/rancid-run + ;; + + *) + exit 0 + ;; +esac Modified: branches/2016Q4/net-mgmt/rancid3/files/pkg-message.in ============================================================================== --- branches/2016Q4/net-mgmt/rancid3/files/pkg-message.in Tue Nov 1 21:02:13 2016 (r425092) +++ branches/2016Q4/net-mgmt/rancid3/files/pkg-message.in Tue Nov 1 21:03:32 2016 (r425093) @@ -9,3 +9,7 @@ you need to install devel/cvsweb or deve For rancid looking-glass copy the actual CGIs (located at %%PREFIX%%/libexec/rancid/{lg.cgi lgform.cgi}) to your cgi-bin. + +Schedule rancid-run with cron at your desired interval or add +hourly_rancid_enable="YES" to /etc/periodic.conf for automatic hourly +runs. Modified: branches/2016Q4/net-mgmt/rancid3/pkg-plist ============================================================================== --- branches/2016Q4/net-mgmt/rancid3/pkg-plist Tue Nov 1 21:02:13 2016 (r425092) +++ branches/2016Q4/net-mgmt/rancid3/pkg-plist Tue Nov 1 21:03:32 2016 (r425093) @@ -1,5 +1,6 @@ bin/rancid-cvs bin/rancid-run +etc/periodic/hourly/200.rancid lib/rancid/acos.pm lib/rancid/arbor.pm lib/rancid/ciscowlc.pm
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611012103.uA1L3Wk3038115>