aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/rancid3
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2014-10-10 23:37:48 +0000
committerMark Felder <feld@FreeBSD.org>2014-10-10 23:37:48 +0000
commit66db0506290734ec28f285bcc5c97e790444968c (patch)
tree599249384235013eb59973a4499542517e39a89c /net-mgmt/rancid3
parent5f0a21c5354f904df54d3a4c1d44f15f2bb41b18 (diff)
downloadports-66db0506290734ec28f285bcc5c97e790444968c.tar.gz
ports-66db0506290734ec28f285bcc5c97e790444968c.zip
New port: net-mgmt/rancid3
I'm creating an entirely new port for rancid 3.x as the syntax for the router.db file is different and a blind upgrade will cause deletion of backed up devices and their configs from the repository if the user doesn't stop the cron jobs before updating the syntax. PR: 193351
Notes
Notes: svn path=/head/; revision=370617
Diffstat (limited to 'net-mgmt/rancid3')
-rw-r--r--net-mgmt/rancid3/Makefile101
-rw-r--r--net-mgmt/rancid3/distinfo2
-rw-r--r--net-mgmt/rancid3/files/patch-bin__control_rancid.in13
-rw-r--r--net-mgmt/rancid3/files/patch-etc__Makefile.am37
-rw-r--r--net-mgmt/rancid3/files/patch-etc__Makefile.in37
-rw-r--r--net-mgmt/rancid3/files/pkg-message.in11
-rw-r--r--net-mgmt/rancid3/pkg-descr16
-rw-r--r--net-mgmt/rancid3/pkg-plist157
8 files changed, 374 insertions, 0 deletions
diff --git a/net-mgmt/rancid3/Makefile b/net-mgmt/rancid3/Makefile
new file mode 100644
index 000000000000..234b0d4a422b
--- /dev/null
+++ b/net-mgmt/rancid3/Makefile
@@ -0,0 +1,101 @@
+# Created by: Janos.Mohacsi@bsd.hu
+# $FreeBSD$
+
+PORTNAME= rancid
+PORTVERSION= 3.1
+CATEGORIES= net-mgmt
+MASTER_SITES= ftp://ftp.shrubbery.net/pub/rancid/
+PKGNAMESUFFIX= 3
+
+MAINTAINER= feld@FreeBSD.org
+COMMENT= Really Awesome New Cisco confIg Differ
+
+LIB_DEPENDS= libexpect.so:${PORTSDIR}/lang/expect
+RUN_DEPENDS= p5-LockFile-Simple>=0:${PORTSDIR}/devel/p5-LockFile-Simple
+
+USES= gmake perl5 shebangfix
+perl_OLD_CMD= @PERLV_PATH@
+SHEBANG_FILES= bin/*
+
+SUB_FILES= pkg-message
+GNU_CONFIGURE= yes
+
+CONFIGURE_ARGS= --localstatedir=${PREFIX}/var/${PORTNAME}/ \
+ --bindir=${PREFIX}/libexec/${PORTNAME}/ \
+ --sysconfdir=${PREFIX}/etc/${PORTNAME}/
+
+OLDCONFIG_FILE1= bin/env
+OLDCONFIG_FILE2= util/lg/lg.conf
+NEWERCONFIG_FILES1= etc/rancid.conf
+NEWERCONFIG_FILES2= etc/lg.conf
+NEWCONFIG_FILES= rancid.conf lg.conf
+
+OPTIONS_DEFINE= SVN
+OPTIONS_DEFAULT=
+
+SVN_DESC= Use Subversion instead of CVS
+
+CONFLICTS= rancid-[0-9]*
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MSVN}
+CONFIGURE_ARGS+= --with-svn
+BUILD_DEPENDS+= svn:${PORTSDIR}/devel/subversion
+.else
+CONFIGURE_ARGS+= --without-svn
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000
+RUN_DEPENDS+= cvs>0:${PORTSDIR}/devel/cvs
+.endif
+.endif
+
+pre-everything::
+ @ ${ECHO} "Make sure your rancid repository is quiet before upgrading; disable rancid cron jobs"
+
+post-patch:
+ ${REINPLACE_CMD} "s|par.1|rancid-par.1|" ${WRKSRC}/man/Makefile.in ${WRKSRC}/man/Makefile.am
+ ${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
+.if !defined(BATCH)
+ @ ${ECHO}
+ @ ${CAT} ${PKGMESSAGE}
+ @ ${ECHO}
+.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"; \
+ ${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}/ "; \
+ ${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 "; \
+ ${ECHO} " : *** Copy the repository if you want to keep the history "; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/rancid3/distinfo b/net-mgmt/rancid3/distinfo
new file mode 100644
index 000000000000..5d011a1de8c4
--- /dev/null
+++ b/net-mgmt/rancid3/distinfo
@@ -0,0 +1,2 @@
+SHA256 (rancid-3.1.tar.gz) = ad5b6814d2ae8ede69b1cd07a5e4406df92cf3d5ba6846daf57c2c1aeb273102
+SIZE (rancid-3.1.tar.gz) = 435045
diff --git a/net-mgmt/rancid3/files/patch-bin__control_rancid.in b/net-mgmt/rancid3/files/patch-bin__control_rancid.in
new file mode 100644
index 000000000000..0b659c35cadc
--- /dev/null
+++ b/net-mgmt/rancid3/files/patch-bin__control_rancid.in
@@ -0,0 +1,13 @@
+--- ./bin/control_rancid.in.orig 2011-01-10 21:17:17.000000000 +0100
++++ ./bin/control_rancid.in 2012-04-09 23:03:03.000000000 +0200
+@@ -347,6 +347,10 @@
+ done
+ cd $DIR
+
++if [ $RCSSYS = svn ] ; then
++ $RCSSYS update >/dev/null 2>&1
++fi
++
+ # no routers, empty list or all 'down'
+ if [ ! -s routers.up ]
+ then
diff --git a/net-mgmt/rancid3/files/patch-etc__Makefile.am b/net-mgmt/rancid3/files/patch-etc__Makefile.am
new file mode 100644
index 000000000000..88e9c810e1e8
--- /dev/null
+++ b/net-mgmt/rancid3/files/patch-etc__Makefile.am
@@ -0,0 +1,37 @@
+--- etc/Makefile.am.orig 2014-09-05 15:59:52 UTC
++++ etc/Makefile.am
+@@ -25,30 +25,10 @@
+ endif
+
+ install-data-local: all
+- @if test "$(DO_CONF_INSTALL)" = "yes"; then \
+- if test -f $(DESTDIR)$(sysconfdir)/rancid.conf ; then \
+- echo ""; \
+- echo "WARNING: *** $(DESTDIR)$(sysconfdir)/rancid.conf exists. See "; \
+- echo " *** $(pkgdatadir)/rancid.conf.sample for new"; \
+- echo " *** examples."; \
+- echo ""; \
+- else \
+- $(INSTALL_DATA) rancid.conf.sample $(DESTDIR)$(sysconfdir)/rancid.conf; \
+- fi; \
+- if test ! -f $(DESTDIR)$(sysconfdir)/rancid.types.conf ; then \
+- $(INSTALL_DATA) rancid.types.conf $(DESTDIR)$(sysconfdir)/rancid.types.conf; \
+- fi; \
+- if test -f $(DESTDIR)$(sysconfdir)/lg.conf ; then \
+- echo ""; \
+- echo "WARNING: *** $(DESTDIR)$(sysconfdir)/lg.conf exists. See "; \
+- echo " *** $(pkgdatadir)/lg.conf.sample for new"; \
+- echo " *** examples."; \
+- echo ""; \
+- else \
+- $(INSTALL_DATA) lg.conf.sample $(DESTDIR)$(sysconfdir)/lg.conf; \
+- fi; \
+- fi; \
+- $(INSTALL_DATA) rancid.types.base $(DESTDIR)$(sysconfdir)/rancid.types.base
++ $(INSTALL_DATA) rancid.conf.sample $(DESTDIR)$(sysconfdir)
++ #$(INSTALL_DATA) rancid.types.conf $(DESTDIR)$(sysconfdir)
++ $(INSTALL_DATA) lg.conf.sample $(DESTDIR)$(sysconfdir)
++ $(INSTALL_DATA) rancid.types.base $(DESTDIR)$(sysconfdir)
+
+ #clean:
+ # rm -f Makefile rancid.conf $(BIN_DATAS) $(BIN_PROGS)
diff --git a/net-mgmt/rancid3/files/patch-etc__Makefile.in b/net-mgmt/rancid3/files/patch-etc__Makefile.in
new file mode 100644
index 000000000000..2f3dafa5f595
--- /dev/null
+++ b/net-mgmt/rancid3/files/patch-etc__Makefile.in
@@ -0,0 +1,37 @@
+--- etc/Makefile.in.orig 2014-09-05 15:59:57 UTC
++++ etc/Makefile.in
+@@ -520,30 +520,10 @@
+
+
+ install-data-local: all
+- @if test "$(DO_CONF_INSTALL)" = "yes"; then \
+- if test -f $(DESTDIR)$(sysconfdir)/rancid.conf ; then \
+- echo ""; \
+- echo "WARNING: *** $(DESTDIR)$(sysconfdir)/rancid.conf exists. See "; \
+- echo " *** $(pkgdatadir)/rancid.conf.sample for new"; \
+- echo " *** examples."; \
+- echo ""; \
+- else \
+- $(INSTALL_DATA) rancid.conf.sample $(DESTDIR)$(sysconfdir)/rancid.conf; \
+- fi; \
+- if test ! -f $(DESTDIR)$(sysconfdir)/rancid.types.conf ; then \
+- $(INSTALL_DATA) rancid.types.conf $(DESTDIR)$(sysconfdir)/rancid.types.conf; \
+- fi; \
+- if test -f $(DESTDIR)$(sysconfdir)/lg.conf ; then \
+- echo ""; \
+- echo "WARNING: *** $(DESTDIR)$(sysconfdir)/lg.conf exists. See "; \
+- echo " *** $(pkgdatadir)/lg.conf.sample for new"; \
+- echo " *** examples."; \
+- echo ""; \
+- else \
+- $(INSTALL_DATA) lg.conf.sample $(DESTDIR)$(sysconfdir)/lg.conf; \
+- fi; \
+- fi; \
+- $(INSTALL_DATA) rancid.types.base $(DESTDIR)$(sysconfdir)/rancid.types.base
++ $(INSTALL_DATA) rancid.conf.sample $(DESTDIR)$(sysconfdir)
++ #$(INSTALL_DATA) rancid.types.conf $(DESTDIR)$(sysconfdir)
++ $(INSTALL_DATA) lg.conf.sample $(DESTDIR)$(sysconfdir)
++ $(INSTALL_DATA) rancid.types.base $(DESTDIR)$(sysconfdir)
+
+ lg.conf.sample: Makefile $(srcdir)/lg.conf.sample.in
+ rm -f lg.conf.sample lg.conf.sample.tmp; \
diff --git a/net-mgmt/rancid3/files/pkg-message.in b/net-mgmt/rancid3/files/pkg-message.in
new file mode 100644
index 000000000000..c1f59582807f
--- /dev/null
+++ b/net-mgmt/rancid3/files/pkg-message.in
@@ -0,0 +1,11 @@
+For further configuration information please look at
+%%PREFIX%%/share/rancid/README.
+
+If you are upgrading from the previous version of rancid look at
+%%PREFIX%%/share/rancid/UPGRADING.
+
+If you would like to set up Rancid to be browseable from Web,
+you need to install devel/cvsweb or devel/viewvc.
+
+For rancid looking-glass copy the actual CGIs (located at
+%%PREFIX%%/libexec/rancid/{lg.cgi lgform.cgi}) to your cgi-bin.
diff --git a/net-mgmt/rancid3/pkg-descr b/net-mgmt/rancid3/pkg-descr
new file mode 100644
index 000000000000..891ecf211b71
--- /dev/null
+++ b/net-mgmt/rancid3/pkg-descr
@@ -0,0 +1,16 @@
+Rancid monitors a router's (or device's) configuration, including software
+and hardware (cards, serial numbers, etc), using CVS. Rancid currently
+supports Bay routers, Cisco routers, Juniper routers, Catalyst switches,
+Foundry switches, Redback NASs, ADC EZT3 muxes, MRTd (and thus likely IRRd),
+Alteon switches, HP Procurve switches, Hitachi routers.
+
+Rancid logs into each of the devices in a router table file, runs various
+commands, chomps the output, and emails any differences from the previous
+collection to a mail list.
+
+A looking glass is also included with rancid, based on Ed Kern's in use on
+http://nitrous.digex.net/. Rancid version has added functions, supports Cisco,
+Juniper, and Foundry and uses the login scripts that come with rancid;
+so it can use rsh, telnet, or ssh to connect to your router(s).
+
+WWW: http://www.shrubbery.net/rancid/
diff --git a/net-mgmt/rancid3/pkg-plist b/net-mgmt/rancid3/pkg-plist
new file mode 100644
index 000000000000..d98e0a179b0b
--- /dev/null
+++ b/net-mgmt/rancid3/pkg-plist
@@ -0,0 +1,157 @@
+bin/rancid-cvs
+bin/rancid-run
+lib/rancid/arbor.pm
+lib/rancid/dell.pm
+lib/rancid/eos.pm
+lib/rancid/foundry.pm
+lib/rancid/ios.pm
+lib/rancid/iosxr.pm
+lib/rancid/junos.pm
+lib/rancid/mrv.pm
+lib/rancid/rancid.pm
+libexec/rancid/alogin
+libexec/rancid/anlogin
+libexec/rancid/arancid
+libexec/rancid/anrancid
+libexec/rancid/arrancid
+libexec/rancid/avologin
+libexec/rancid/avorancid
+libexec/rancid/agmrancid
+libexec/rancid/blogin
+libexec/rancid/brancid
+libexec/rancid/cat5rancid
+libexec/rancid/clogin
+libexec/rancid/complogin
+libexec/rancid/control_rancid
+libexec/rancid/cssrancid
+libexec/rancid/dllogin
+libexec/rancid/elogin
+libexec/rancid/erancid
+libexec/rancid/f10rancid
+libexec/rancid/f5rancid
+libexec/rancid/flogin
+libexec/rancid/fnrancid
+libexec/rancid/fnlogin
+libexec/rancid/hlogin
+libexec/rancid/hpuifilter
+libexec/rancid/hrancid
+libexec/rancid/htlogin
+libexec/rancid/htrancid
+libexec/rancid/jerancid
+libexec/rancid/jlogin
+libexec/rancid/lg.cgi
+libexec/rancid/lgform.cgi
+libexec/rancid/mrancid
+libexec/rancid/mrvlogin
+libexec/rancid/mtlogin
+libexec/rancid/mtrancid
+libexec/rancid/nlogin
+libexec/rancid/nrancid
+libexec/rancid/nxrancid
+libexec/rancid/nslogin
+libexec/rancid/nsrancid
+libexec/rancid/par
+libexec/rancid/prancid
+libexec/rancid/rancid
+libexec/rancid/rancid-cvs
+libexec/rancid/rancid-fe
+libexec/rancid/rancid-run
+libexec/rancid/rivlogin
+libexec/rancid/rivrancid
+libexec/rancid/rrancid
+libexec/rancid/srancid
+libexec/rancid/tlogin
+libexec/rancid/trancid
+libexec/rancid/tntlogin
+libexec/rancid/tntrancid
+libexec/rancid/xilogin
+libexec/rancid/xirancid
+libexec/rancid/xrancid
+libexec/rancid/zrancid
+man/man1/agmrancid.1.gz
+man/man1/alogin.1.gz
+man/man1/anlogin.1.gz
+man/man1/anrancid.1.gz
+man/man1/arancid.1.gz
+man/man1/arrancid.1.gz
+man/man1/avologin.1.gz
+man/man1/avorancid.1.gz
+man/man1/blogin.1.gz
+man/man1/brancid.1.gz
+man/man1/cat5rancid.1.gz
+man/man1/clogin.1.gz
+man/man1/complogin.1.gz
+man/man1/comprancid.1.gz
+man/man1/control_rancid.1.gz
+man/man1/cssrancid.1.gz
+man/man1/dllogin.1.gz
+man/man1/elogin.1.gz
+man/man1/erancid.1.gz
+man/man1/f10rancid.1.gz
+man/man1/f5rancid.1.gz
+man/man1/flogin.1.gz
+man/man1/fnlogin.1.gz
+man/man1/fnrancid.1.gz
+man/man1/hlogin.1.gz
+man/man1/hrancid.1.gz
+man/man1/htlogin.1.gz
+man/man1/htrancid.1.gz
+man/man1/jerancid.1.gz
+man/man1/jlogin.1.gz
+man/man1/lg_intro.1.gz
+man/man1/mrancid.1.gz
+man/man1/mrvlogin.1.gz
+man/man1/mtlogin.1.gz
+man/man1/mtrancid.1.gz
+man/man1/nlogin.1.gz
+man/man1/nrancid.1.gz
+man/man1/nslogin.1.gz
+man/man1/nsrancid.1.gz
+man/man1/nxrancid.1.gz
+man/man1/prancid.1.gz
+man/man1/rancid-cvs.1.gz
+man/man1/rancid-par.1.gz
+man/man1/rancid-run.1.gz
+man/man1/rancid.1.gz
+man/man1/rancid_intro.1.gz
+man/man1/rivlogin.1.gz
+man/man1/rivrancid.1.gz
+man/man1/rrancid.1.gz
+man/man1/srancid.1.gz
+man/man1/tlogin.1.gz
+man/man1/tntlogin.1.gz
+man/man1/tntrancid.1.gz
+man/man1/trancid.1.gz
+man/man1/xilogin.1.gz
+man/man1/xirancid.1.gz
+man/man1/xrancid.1.gz
+man/man1/zrancid.1.gz
+man/man3/rancid.3.gz
+man/man5/cloginrc.5.gz
+man/man5/lg.conf.5.gz
+man/man5/rancid.conf.5.gz
+man/man5/rancid.types.base.5.gz
+man/man5/rancid.types.conf.5.gz
+man/man5/router.db.5.gz
+%%ETCDIR%%/rancid.types.base
+@sample %%ETCDIR%%/lg.conf.sample
+@sample %%ETCDIR%%/rancid.conf.sample
+%%DATADIR%%/CHANGES
+%%DATADIR%%/COPYING
+%%DATADIR%%/FAQ
+%%DATADIR%%/README
+%%DATADIR%%/README.lg
+%%DATADIR%%/README.misc
+%%DATADIR%%/UPGRADING
+%%DATADIR%%/cisco-load.exp
+%%DATADIR%%/cisco-reload.exp
+%%DATADIR%%/cloginrc.sample
+%%DATADIR%%/downreport
+%%DATADIR%%/getipacctg
+%%DATADIR%%/index.html
+%%DATADIR%%/lg.conf.sample
+%%DATADIR%%/lgnotes.html
+%%DATADIR%%/rancid-cvspurge
+%%DATADIR%%/rancid.conf.sample
+%%DATADIR%%/rtrfilter
+@dir(,,755) var/rancid