Update to 2.3.8

ok okan@
This commit is contained in:
pea 2012-06-08 13:59:08 +00:00
parent dcaa682854
commit a811697c0c
8 changed files with 47 additions and 133 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.13 2012/04/28 10:51:44 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.14 2012/06/08 13:59:08 pea Exp $
COMMENT = Really Awesome New Cisco confIg Differ
DISTNAME = rancid-2.3.3
REVISION = 2
DISTNAME = rancid-2.3.8
EPOCH = 0
CATEGORIES = sysutils

View File

@ -1,5 +1,5 @@
MD5 (rancid-2.3.3.tar.gz) = hmbIhfQrjuZXHgQyHVqxbQ==
RMD160 (rancid-2.3.3.tar.gz) = r57H0R1i4VL+1kbF7+K7Hgf899A=
SHA1 (rancid-2.3.3.tar.gz) = F9Oy5sRoqWficU8ov5iP5HdV3K8=
SHA256 (rancid-2.3.3.tar.gz) = ZKLfhRbaYk/677I5fc9PBw/hReyXqdkk274MWtPm5Ds=
SIZE (rancid-2.3.3.tar.gz) = 356679
MD5 (rancid-2.3.8.tar.gz) = jN/f2KuYnpJNriVg2BRXoA==
RMD160 (rancid-2.3.8.tar.gz) = YQU5j4Vhe84gU9chnnWGwbgLdqs=
SHA1 (rancid-2.3.8.tar.gz) = dGnX+eOen4b5d/HwljMA5dGDCI8=
SHA256 (rancid-2.3.8.tar.gz) = RORMh6IpaNUinAHWCqRpYNoCOiSEbu9D+ePI1w/Vs/s=
SIZE (rancid-2.3.8.tar.gz) = 379908

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-Makefile_in,v 1.3 2010/04/23 11:18:43 pea Exp $
--- Makefile.in.orig Wed Mar 24 00:34:09 2010
+++ Makefile.in Fri Apr 16 10:22:54 2010
$OpenBSD: patch-Makefile_in,v 1.4 2012/06/08 13:59:08 pea Exp $
--- Makefile.in.orig Thu Nov 17 22:10:12 2011
+++ Makefile.in Tue May 29 13:19:25 2012
@@ -16,7 +16,7 @@
@SET_MAKE@
@ -10,7 +10,7 @@ $OpenBSD: patch-Makefile_in,v 1.3 2010/04/23 11:18:43 pea Exp $
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -241,7 +241,7 @@ top_build_prefix = @top_build_prefix@
@@ -242,7 +242,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign no-dependencies

View File

@ -1,39 +1,12 @@
$OpenBSD: patch-bin_Makefile_in,v 1.4 2010/04/23 11:18:43 pea Exp $
--- bin/Makefile.in.orig Wed Mar 24 00:33:49 2010
+++ bin/Makefile.in Fri Apr 16 10:29:28 2010
@@ -62,7 +62,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile
$(srcdir)/rivrancid.in $(srcdir)/rrancid.in \
$(srcdir)/srancid.in $(srcdir)/tlogin.in $(srcdir)/tntlogin.in \
$(srcdir)/tntrancid.in $(srcdir)/trancid.in \
- $(srcdir)/xrancid.in $(srcdir)/zrancid.in
+ $(srcdir)/xrancid.in $(srcdir)/zrancid.in $(srcdir)/fnlogin.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
@@ -76,7 +76,7 @@ CONFIG_CLEAN_FILES = control_rancid par rancid-fe agmr
flogin francid fnrancid hlogin hrancid htlogin htrancid jlogin \
jrancid jerancid mrancid mrvlogin mrvrancid nlogin nrancid \
nslogin nsrancid nxrancid prancid rivlogin rivrancid rrancid \
- srancid tlogin tntlogin tntrancid trancid xrancid zrancid
+ srancid tlogin tntlogin tntrancid trancid xrancid zrancid fnlogin
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
@@ -248,7 +248,7 @@ bin_SCRIPTS = agmrancid alogin arancid arrancid avolog
mrancid mrvlogin mrvrancid nlogin nrancid nslogin nsrancid \
nxrancid par prancid rancid-fe rancid rivlogin rivrancid \
rrancid srancid tlogin tntlogin tntrancid trancid xrancid \
- zrancid lg.cgi lgform.cgi rancid-cvs rancid-run
+ zrancid lg.cgi lgform.cgi rancid-cvs rancid-run fnlogin
EXTRA_DIST = lg.cgi.in lgform.cgi.in rancid-cvs.in rancid-run.in
#dist_bin_SCRIPTS= $(bin_SCRIPTS:%=%.in)
CLEANFILES = lg.cgi lgform.cgi rancid-cvs rancid-run
@@ -356,6 +356,8 @@ f5rancid: $(top_builddir)/config.status $(srcdir)/f5ra
f10rancid: $(top_builddir)/config.status $(srcdir)/f10rancid.in
$OpenBSD: patch-bin_Makefile_in,v 1.5 2012/06/08 13:59:08 pea Exp $
--- bin/Makefile.in.orig Thu Nov 17 22:10:11 2011
+++ bin/Makefile.in Tue May 29 13:19:25 2012
@@ -363,6 +363,8 @@ f10rancid: $(top_builddir)/config.status $(srcdir)/f10
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
flogin: $(top_builddir)/config.status $(srcdir)/flogin.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+fnlogin: $(top_builddir)/config.status $(srcdir)/fnlogin.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+fnlogin: $(top_builddir)/config.status $(srcdir)/fnlogin.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
francid: $(top_builddir)/config.status $(srcdir)/francid.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
fnlogin: $(top_builddir)/config.status $(srcdir)/fnlogin.in

View File

@ -1,15 +1,15 @@
$OpenBSD: patch-bin_fnrancid_in,v 1.4 2010/04/23 11:18:43 pea Exp $
--- bin/fnrancid.in.orig Wed Mar 24 00:33:50 2010
+++ bin/fnrancid.in Fri Apr 16 10:34:08 2010
$OpenBSD: patch-bin_fnrancid_in,v 1.5 2012/06/08 13:59:08 pea Exp $
--- bin/fnrancid.in.orig Wed Mar 9 18:19:15 2011
+++ bin/fnrancid.in Tue May 29 13:19:25 2012
@@ -172,6 +172,7 @@ sub GetSystem {
while (<INPUT>) {
tr/\015//d;
+ s/exit//gi ;
next if /^\s*$/;
last if(/$prompt/);
ProcessHistory("","","","$_");
@@ -201,6 +202,15 @@ sub GetConf {
last if (/$prompt/);
@@ -215,6 +216,15 @@ sub GetConf {
next;
}
ProcessHistory("","","","$_");
@ -25,69 +25,3 @@ $OpenBSD: patch-bin_fnrancid_in,v 1.4 2010/04/23 11:18:43 pea Exp $
}
$found_end = 1;
return(1);
@@ -212,7 +222,7 @@ sub DoNothing {print STDOUT;}
# Main
@commandtable = (
{'get system status' => 'GetSystem'},
- {'get conf' => 'GetConf'}
+ {'show' => 'GetConf'}
);
# Use an array to preserve the order of the commands and a hash for mapping
# commands to the subroutine and track commands that have been completed.
@@ -241,13 +251,13 @@ if ($file) {
print STDOUT "opening file $host\n" if ($log);
open(INPUT,"<$host") || die "open failed for $host: $!\n";
} else {
- print STDERR "executing nlogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($debug);
- print STDOUT "executing nlogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($log);
+ print STDERR "executing fnlogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($debug);
+ print STDOUT "executing fnlogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($log);
if (defined($ENV{NOPIPE})) {
- system "nlogin -t $timeo -c \"$cisco_cmds\" $host </dev/null > $host.raw 2>&1" || die "nlogin failed for $host: $!\n";
- open(INPUT, "< $host.raw") || die "nlogin failed for $host: $!\n";
+ system "fnlogin -t $timeo -c \"$cisco_cmds\" $host </dev/null > $host.raw 2>&1" || die "fnlogin failed for $host: $!\n";
+ open(INPUT, "< $host.raw") || die "fnlogin failed for $host: $!\n";
} else {
- open(INPUT,"nlogin -t $timeo -c \"$cisco_cmds\" $host </dev/null |") || die "nlogin failed for $host: $!\n";
+ open(INPUT,"fnlogin -t $timeo -c \"$cisco_cmds\" $host </dev/null |") || die "fnlogin failed for $host: $!\n";
}
}
@@ -275,13 +285,32 @@ ProcessHistory("","","","!RANCID-CONTENT-TYPE: fortiga
TOP: while(<INPUT>) {
tr/\015//d;
if (/^Error:/) {
- print STDOUT ("$host nlogin error: $_");
- print STDERR ("$host nlogin error: $_") if ($debug);
+ print STDOUT ("$host fnlogin error: $_");
+ print STDERR ("$host fnlogin error: $_") if ($debug);
last;
}
- while (/>\s*($cmds_regexp)\s*$/) {
- $cmd = $1;
- if (!defined($prompt)) { $prompt = " >\s*"; }
+ while (/^.+(#|\$)\s*($cmds_regexp)\s*$/) {
+ $cmd = $2;
+ # - FortiGate prompts end with either '#' or '$'. Further, they may
+# be prepended with a '~' if the hostname is too long. Therefore,
+# we need to figure out what our prompt really is.
+ if (!defined($prompt)) {
+ if ( $_ =~ m/^.+\~\$/ ) {
+ $prompt = '\~\$ .*' ;
+ } else {
+ if ( $_ =~ m/^.+\$/ ) {
+ $prompt = ' \$ .*' ;
+ } else {
+ if ( $_ =~ m/^.+\~#/ ) {
+ $prompt = '\~# .*' ;
+ } else {
+ if ( $_ =~ m/^.+#/ ) {
+ $prompt = ' # .*' ;
+ }
+ }
+ }
+ }
+ }
print STDERR ("HIT COMMAND:$_") if ($debug);
if (!defined($commands{$cmd})) {
print STDERR "$host: found unexpected command - \"$cmd\"\n";

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure,v 1.4 2010/04/23 11:18:43 pea Exp $
--- configure.orig Wed Mar 24 00:34:37 2010
+++ configure Fri Apr 16 10:21:50 2010
@@ -6058,7 +6058,7 @@ ac_config_files="$ac_config_files bin/nslogin bin/nsra
$OpenBSD: patch-configure,v 1.5 2012/06/08 13:59:08 pea Exp $
--- configure.orig Thu Nov 17 22:10:12 2011
+++ configure Tue May 29 13:19:25 2012
@@ -6068,7 +6068,7 @@ ac_config_files="$ac_config_files bin/nslogin bin/nsra
ac_config_files="$ac_config_files bin/nxrancid"
@ -10,17 +10,17 @@ $OpenBSD: patch-configure,v 1.4 2010/04/23 11:18:43 pea Exp $
ac_config_files="$ac_config_files bin/rivlogin bin/rivrancid"
@@ -6839,6 +6839,7 @@ do
"bin/mrvlogin") CONFIG_FILES="$CONFIG_FILES bin/mrvlogin" ;;
"bin/mrvrancid") CONFIG_FILES="$CONFIG_FILES bin/mrvrancid" ;;
@@ -6854,6 +6854,7 @@ do
"bin/mtrancid") CONFIG_FILES="$CONFIG_FILES bin/mtrancid" ;;
"bin/mtlogin") CONFIG_FILES="$CONFIG_FILES bin/mtlogin" ;;
"bin/nlogin") CONFIG_FILES="$CONFIG_FILES bin/nlogin" ;;
+ "bin/fnlogin") CONFIG_FILES="$CONFIG_FILES bin/fnlogin" ;;
"bin/nrancid") CONFIG_FILES="$CONFIG_FILES bin/nrancid" ;;
"bin/nslogin") CONFIG_FILES="$CONFIG_FILES bin/nslogin" ;;
"bin/nsrancid") CONFIG_FILES="$CONFIG_FILES bin/nsrancid" ;;
@@ -7567,6 +7568,7 @@ $as_echo X"$file" |
"bin/mrvlogin":F) chmod a+x $ac_file ;;
"bin/mrvrancid":F) chmod a+x $ac_file ;;
@@ -7586,6 +7587,7 @@ $as_echo X"$file" |
"bin/mtrancid":F) chmod a+x $ac_file ;;
"bin/mtlogin":F) chmod a+x $ac_file ;;
"bin/nlogin":F) chmod a+x $ac_file ;;
+ "bin/fnlogin":F) chmod a+x $ac_file ;;
"bin/nrancid":F) chmod a+x $ac_file ;;

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-etc_Makefile_in,v 1.3 2010/04/23 11:18:43 pea Exp $
--- etc/Makefile.in.orig Wed Mar 24 00:33:52 2010
+++ etc/Makefile.in Fri Apr 16 10:34:53 2010
$OpenBSD: patch-etc_Makefile_in,v 1.4 2012/06/08 13:59:08 pea Exp $
--- etc/Makefile.in.orig Thu Nov 17 22:10:11 2011
+++ etc/Makefile.in Tue May 29 13:19:25 2012
@@ -22,7 +22,7 @@
# permission and modified beyond recognition.
@ -10,7 +10,7 @@ $OpenBSD: patch-etc_Makefile_in,v 1.3 2010/04/23 11:18:43 pea Exp $
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -422,26 +422,10 @@ uninstall-am: uninstall-pkgdataDATA
@@ -423,26 +423,10 @@ uninstall-am: uninstall-pkgdataDATA
install-data-local: all

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.6 2010/11/08 08:24:32 jasper Exp $
@comment $OpenBSD: PLIST,v 1.7 2012/06/08 13:59:08 pea Exp $
@conflict par-*
@newgroup _rancid:613
@newuser _rancid:613:_rancid:daemon:Rancid user:/var/rancid:/bin/sh
@ -35,6 +35,8 @@ bin/jrancid
bin/mrancid
bin/mrvlogin
bin/mrvrancid
bin/mtlogin
bin/mtrancid
bin/nlogin
bin/nrancid
bin/nslogin
@ -55,6 +57,7 @@ bin/tntlogin
bin/tntrancid
bin/trancid
bin/xrancid
bin/xrrancid
bin/zrancid
@man man/man1/agmrancid.1
@man man/man1/alogin.1
@ -73,6 +76,7 @@ bin/zrancid
@man man/man1/f10rancid.1
@man man/man1/f5rancid.1
@man man/man1/flogin.1
@man man/man1/fnlogin.1
@man man/man1/fnrancid.1
@man man/man1/francid.1
@man man/man1/hlogin.1
@ -86,6 +90,8 @@ bin/zrancid
@man man/man1/mrancid.1
@man man/man1/mrvlogin.1
@man man/man1/mrvrancid.1
@man man/man1/mtlogin.1
@man man/man1/mtrancid.1
@man man/man1/nlogin.1
@man man/man1/nrancid.1
@man man/man1/nslogin.1
@ -106,6 +112,7 @@ bin/zrancid
@man man/man1/tntrancid.1
@man man/man1/trancid.1
@man man/man1/xrancid.1
@man man/man1/xrrancid.1
@man man/man1/zrancid.1
@man man/man5/cloginrc.5
@man man/man5/lg.conf.5
@ -134,6 +141,7 @@ share/rancid/downreport
share/rancid/getipacctg
share/rancid/index.html
share/rancid/lgnotes.html
share/rancid/rancid-cvspurge
share/rancid/rtrfilter
@mode 755
@owner _rancid