From owner-svn-ports-branches@freebsd.org Tue Nov 1 21:03:34 2016 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F342AC2A152; Tue, 1 Nov 2016 21:03:33 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BFDD191B; Tue, 1 Nov 2016 21:03:33 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uA1L3WIs038120; Tue, 1 Nov 2016 21:03:32 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uA1L3Wk3038115; Tue, 1 Nov 2016 21:03:32 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201611012103.uA1L3Wk3038115@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Tue, 1 Nov 2016 21:03:32 +0000 (UTC) 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 X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2016 21:03:34 -0000 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