I think this is OK. pea@, any comments?
On 2016/11/16 05:20, Pavel Korovin wrote:
> On 11/15, Stuart Henderson wrote:
> > Except for special situations (e.g. what we have in autoconf), an @conflict
> > on the same port doesn't make sense.
> >
> > > +@ask-update rancid-<3v0 Make sure router.db files use new fields
> > > separator before upgrading
> >
> > I think either MESSAGE *or* @ask-update is enough. ask-update is quite
>
> Stuart, thank you for your comments!
> I agree that MESSAGE should be enough.
>
> Please see the updated patch with your suggestions applied and some more
> cleanups, like removal of Looking Glass configs (I don't see any reason
> to keep it while corresponding scripts were removed in the first place),
> relocation of misc example files from ${PREFIX}/share to
> ${PREFIX}/share/examples and commenting out several man pages for which
> corresponding binaries were removed.
>
> --
> With best regards,
> Pavel Korovin
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/rancid/Makefile,v
> retrieving revision 1.17
> diff -u -p -r1.17 Makefile
> --- Makefile 15 May 2013 09:49:40 -0000 1.17
> +++ Makefile 16 Nov 2016 01:58:05 -0000
> @@ -2,8 +2,9 @@
>
> COMMENT = Really Awesome New Cisco confIg Differ
>
> -DISTNAME = rancid-2.3.8
> -REVISION = 0
> +DISTNAME = rancid-3.5.1
> +DISTPATCH = 1
> +PKGNAME = ${DISTNAME}pl${DISTPATCH}
> EPOCH = 0
> CATEGORIES = sysutils
>
> @@ -19,20 +20,19 @@ WANTLIB = c util
>
> MASTER_SITES = ftp://ftp.shrubbery.net/pub/rancid/
>
> +PATCHFILES = ${DISTNAME}.p${DISTPATCH}.gz
> +
> RUN_DEPENDS = lang/expect
> BUILD_DEPENDS = ${RUN_DEPENDS}
>
> LOCALSTATEDIR = ${BASELOCALSTATEDIR}/rancid
>
> -AUTOMAKE_VERSION = 1.8
> -CONFIGURE_STYLE = automake
> +CONFIGURE_STYLE = gnu
> CONFIGURE_ARGS = --prefix=${PREFIX} \
> --disable-mk-localstatedir
>
> +MAKE_FLAGS = sysconfdir=${BASESYSCONFDIR}/rancid
> +FAKE_FLAGS = sysconfdir=${PREFIX}/share/examples/rancid
> USE_GMAKE = yes
> -USE_GROFF = Yes
> -
> -pre-configure:
> - @cp ${FILESDIR}/fnlogin.in ${WRKSRC}/bin/fnlogin.in
>
> .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/sysutils/rancid/distinfo,v
> retrieving revision 1.6
> diff -u -p -r1.6 distinfo
> --- distinfo 18 Jan 2015 03:15:14 -0000 1.6
> +++ distinfo 16 Nov 2016 01:58:05 -0000
> @@ -1,2 +1,4 @@
> -SHA256 (rancid-2.3.8.tar.gz) = RORMh6IpaNUinAHWCqRpYNoCOiSEbu9D+ePI1w/Vs/s=
> -SIZE (rancid-2.3.8.tar.gz) = 379908
> +SHA256 (rancid-3.5.1.p1.gz) = GqbR11OkR4dA3jbeTn8Zmiio1ZZ/iAfShCHJ4yogAPQ=
> +SHA256 (rancid-3.5.1.tar.gz) = 82V5MNbr+FWs2WHJrK3v+wUM2e15gJ+tXbHB917PxxE=
> +SIZE (rancid-3.5.1.p1.gz) = 202
> +SIZE (rancid-3.5.1.tar.gz) = 501561
> Index: files/fnlogin.in
> ===================================================================
> RCS file: files/fnlogin.in
> diff -N files/fnlogin.in
> --- files/fnlogin.in 16 Dec 2008 21:07:55 -0000 1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,544 +0,0 @@
> -#! @EXPECT_PATH@ --
> -##
> -## $Id: fnlogin.in,v 1.1.1.1 2008/12/16 21:07:55 pea Exp $
> -##
> -## rancid 2.3.2a7
> -## Copyright (C) 1997-2006 by Terrapin Communications, Inc.
> -## All rights reserved.
> -##
> -## This software may be freely copied, modified and redistributed
> -## without fee for non-commerical purposes provided that this license
> -## remains intact and unmodified with any RANCID distribution.
> -##
> -## There is no warranty or other guarantee of fitness of this software.
> -## It is provided solely "as is". The author(s) disclaim(s) all
> -## responsibility and liability with respect to this software's usage
> -## or its effect upon hardware, computer systems, other software, or
> -## anything else.
> -##
> -## Except where noted otherwise, rancid was written by and is maintained by
> -## Henry Kilmer, John Heasley, Andrew Partan, Pete Whiting, and Austin
> Schutz.
> -##
> -#
> -# The login expect scripts were based on Erik Sherk's gwtn, by permission.
> -# Netscreen hacks implemented by Stephen Gill <[email protected]>.
> -#
> -# nlogin - netscreen login
> -#
> -# Most options are intuitive for logging into a netscreen firewall.
> -#
> -# Misc notes
> -# netscreen does not have the concept of "enable", once logged in, a
> -# users permissions can not change.
> -
> -# Usage line
> -set usage "Usage: $argv0 \[-c command\] \[-Evar=x\] \[-f cloginrc-file\] \
> -\[-p user-password\] \
> -\[-s script-file\] \[-t timeout\] \[-u username\] \
> -\[-v vty-password\] \[-x command-file\] \
> -\[-y ssh_cypher_type\] router \[router...\]\n"
> -
> -# env(CLOGIN) may contain:
> -# x == do not set xterm banner or name
> -
> -# Password file
> -set password_file $env(HOME)/.cloginrc
> -# Default is to login to the firewall
> -set do_command 0
> -set do_script 0
> -# The default is to look in the password file to find the passwords. This
> -# tracks if we receive them on the command line.
> -set do_passwd 1
> -set do_enapasswd 1
> -
> -# Find the user in the ENV, or use the unix userid.
> -if {[ info exists env(CISCO_USER) ]} {
> - set default_user $env(CISCO_USER)
> -} elseif {[ info exists env(USER) ]} {
> - set default_user $env(USER)
> -} elseif {[ info exists env(LOGNAME) ]} {
> - set default_user $env(LOGNAME)
> -} else {
> - # This uses "id" which I think is portable. At least it has existed
> - # (without options) on all machines/OSes I've been on recently -
> - # unlike whoami or id -nu.
> - if [ catch {exec id} reason ] {
> - send_error "\nError: could not exec id: $reason\n"
> - exit 1
> - }
> - regexp {\(([^)]*)} "$reason" junk default_user
> -}
> -if {[ info exists env(CLOGINRC) ]} {
> - set password_file $env(CLOGINRC)
> -}
> -
> -# Sometimes firewall take awhile to answer (the default is 10 sec)
> -set timeout 45
> -
> -# Process the command line
> -for {set i 0} {$i < $argc} {incr i} {
> - set arg [lindex $argv $i]
> -
> - switch -glob -- $arg {
> - # Username
> - -u* -
> - -U* {
> - if {! [ regexp .\[uU\](.+) $arg ignore user]} {
> - incr i
> - set username [ lindex $argv $i ]
> - }
> - # VTY Password
> - } -p* -
> - -P* {
> - if {! [ regexp .\[pP\](.+) $arg ignore userpasswd]} {
> - incr i
> - set userpasswd [ lindex $argv $i ]
> - }
> - set do_passwd 0
> - # Environment variable to pass to -s scripts
> - } -E*
> - {
> - if {[ regexp .\[E\](.+)=(.+) $arg ignore varname varvalue]} {
> - set E$varname $varvalue
> - } else {
> - send_user "\nError: invalid format for -E in $arg\n"
> - exit 1
> - }
> - # Command to run.
> - } -c* -
> - -C* {
> - if {! [ regexp .\[cC\](.+) $arg ignore command]} {
> - incr i
> - set command [ lindex $argv $i ]
> - }
> - set do_command 1
> - # Expect script to run.
> - } -s* -
> - -S* {
> - if {! [ regexp .\[sS\](.+) $arg ignore sfile]} {
> - incr i
> - set sfile [ lindex $argv $i ]
> - }
> - if { ! [ file readable $sfile ] } {
> - send_user "\nError: Can't read $sfile\n"
> - exit 1
> - }
> - set do_script 1
> - # cypher type
> - } -y* -
> - -Y* {
> - if {! [ regexp .\[eE\](.+) $arg ignore cypher]} {
> - incr i
> - set cypher [ lindex $argv $i ]
> - }
> - # alternate cloginrc file
> - } -f* -
> - -F* {
> - if {! [ regexp .\[fF\](.+) $arg ignore password_file]} {
> - incr i
> - set password_file [ lindex $argv $i ]
> - }
> - } -t* -
> - -T* {
> - incr i
> - set timeout [ lindex $argv $i ]
> - } -x* -
> - -X {
> - if {! [ regexp .\[xX\](.+) $arg ignore cmd_file]} {
> - incr i
> - set cmd_file [ lindex $argv $i ]
> - }
> - if [ catch {set cmd_fd [open $cmd_file r]} reason ] {
> - send_user "\nError: $reason\n"
> - exit 1
> - }
> - set cmd_text [read $cmd_fd]
> - close $cmd_fd
> - set command [join [split $cmd_text \n] \;]
> - set do_command 1
> - # Does tacacs automatically enable us?
> - } -autoenable {
> - # ignore autoenable
> - } -* {
> - send_user "\nError: Unknown argument! $arg\n"
> - send_user $usage
> - exit 1
> - } default {
> - break
> - }
> - }
> -}
> -# Process firewalls...no firewalls listed is an error.
> -if { $i == $argc } {
> - send_user "\nError: $usage"
> -}
> -
> -# Only be quiet if we are running a script (it can log its output
> -# on its own)
> -if { $do_script } {
> - log_user 0
> -} else {
> - log_user 1
> -}
> -
> -#
> -# Done configuration/variable setting. Now run with it...
> -#
> -
> -# Sets Xterm title if interactive...if its an xterm and the user cares
> -proc label { host } {
> - global env
> - # if CLOGIN has an 'x' in it, don't set the xterm name/banner
> - if [info exists env(CLOGIN)] {
> - if {[string first "x" $env(CLOGIN)] != -1} { return }
> - }
> - # take host from ENV(TERM)
> - if [info exists env(TERM)] {
> - if [regexp \^(xterm|vs) $env(TERM) ignore ] {
> - send_user "\033]1;[lindex [split $host "."] 0]\a"
> - send_user "\033]2;$host\a"
> - }
> - }
> -}
> -
> -# This is a helper function to make the password file easier to
> -# maintain. Using this the password file has the form:
> -# add password sl* pete cow
> -# add password at* steve
> -# add password * hanky-pie
> -proc add {var args} { global int_$var ; lappend int_$var $args}
> -proc include {args} {
> - global env
> - regsub -all "(^{|}$)" $args {} args
> - if { [ regexp "^/" $args ignore ] == 0 } {
> - set args $env(HOME)/$args
> - }
> - source_password_file $args
> -}
> -
> -proc find {var firewall} {
> - upvar int_$var list
> - if { [info exists list] } {
> - foreach line $list {
> - if { [string match [lindex $line 0] $firewall ] } {
> - return [lrange $line 1 end]
> - }
> - }
> - }
> - return {}
> -}
> -
> -# Loads the password file. Note that as this file is tcl, and that
> -# it is sourced, the user better know what to put in there, as it
> -# could install more than just password info... I will assume however,
> -# that a "bad guy" could just as easy put such code in the clogin
> -# script, so I will leave .cloginrc as just an extention of that script
> -proc source_password_file { password_file } {
> - global env
> - if { ! [file exists $password_file] } {
> - send_user "\nError: password file ($password_file) does not exist\n"
> - exit 1
> - }
> - file stat $password_file fileinfo
> - if { [expr ($fileinfo(mode) & 007)] != 0000 } {
> - send_user "\nError: $password_file must not be world
> readable/writable\n"
> - exit 1
> - }
> - if [ catch {source $password_file} reason ] {
> - send_user "\nError: $reason\n"
> - exit 1
> - }
> -}
> -
> -# Log into the firewall.
> -# returns: 0 on success, 1 on failure
> -proc login { firewall user userpswd passwd enapasswd prompt cmethod
> -cyphertype } {
> - global spawn_id in_proc do_command do_script sshcmd
> - set in_proc 1
> - set uprompt_seen 0
> -
> - # Telnet to the firewall & try to login.
> - set progs [llength $cmethod]
> - foreach prog [lrange $cmethod 0 end] {
> - incr progs -1
> - if [string match "telnet*" $prog] {
> - regexp {telnet(:([^[:space:]]+))*} $prog command suffix port
> - if {"$port" == ""} {
> - set retval [ catch {spawn telnet $firewall} reason ]
> - } else {
> - set retval [ catch {spawn telnet $firewall $port} reason ]
> - }
> - if { $retval } {
> - send_user "\nError: telnet failed: $reason\n"
> - return 1
> - }
> - } elseif ![string compare $prog "ssh"] {
> - if [ catch {spawn $sshcmd -c $cyphertype -x -l $user $firewall}
> reason ] {
> - send_user "\nError: $sshcmd failed: $reason\n"
> - return 1
> - }
> - } elseif ![string compare $prog "rsh"] {
> - send_error "\nError: unsupported method: rsh\n"
> - if { $progs == 0 } {
> - return 1
> - }
> - continue;
> - } else {
> - send_user "\nError: unknown connection method: $prog\n"
> - return 1
> - }
> -
> - sleep 0.3
> -
> - # This helps cleanup each expect clause.
> - expect_after {
> - timeout {
> - send_user "\nError: TIMEOUT reached\n"
> - catch {close}; wait
> - if { $in_proc} {
> - return 1
> - } else {
> - continue
> - }
> - } eof {
> - send_user "\nError: EOF received\n"
> - catch {close}; wait
> - if { $in_proc} {
> - return 1
> - } else {
> - continue
> - }
> - }
> - }
> -
> - # Here we get a little tricky. There are several possibilities:
> - # the firewall can ask for a username and passwd and then
> - # talk to the TACACS server to authenticate you, or if the
> - # TACACS server is not working, then it will use the enable
> - # passwd. Or, the firewall might not have TACACS turned on,
> - # then it will just send the passwd.
> - # if telnet fails with connection refused, try ssh
> - expect {
> - "Connection refused" {
> - send_user "\nError: Connection Refused\n"; wait; return 1
> - } eof { send_user "\nError: Couldn't login\n"; wait; return 1
> - } "Unknown host\r\n" {
> - expect eof
> - send_user "\nError: Unknown host\n"; wait; return 1
> - } "Host is unreachable" {
> - expect eof
> - send_user "\nError: Host Unreachable!\n"; wait; return 1
> - } "No address associated with name" {
> - expect eof
> - send_user "\nError: Unknown host\n"; wait; return 1
> - }
> - -re "Are you sure you want to continue connecting .*" {
> - send "yes\r"
> - send_user "Host $firewall added to the list of known hosts.\n"
> - exp_continue }
> - -re "Host key not found .* \(yes\/no\)\?" {
> - send "yes\r"
> - send_user "Host $firewall added to the list of known hosts.\n"
> - exp_continue }
> - -re "HOST IDENTIFICATION HAS CHANGED.* \(yes\/no\)\?" {
> - send "no\r"
> - send_user "\nError: The host key for $firewall has changed.
> Update the SSH known_hosts file accordingly.\n"
> - return 1 }
> - -re "Offending key for .* \(yes\/no\)\?" {
> - send "no\r"
> - send_user "\nError: host key mismatch for $firewall. Update the
> SSH known_hosts file accordingly.\n"
> - return 1 }
> - denied { send_user "\nError: Check your passwd for $firewall\n"
> - catch {close}; wait; return 1
> - }
> - " ### Login failed" {send_user "\nError: Check your passwd for
> $firewall\n"; return 1 }
> - -re "(login:)" {
> - sleep 1;
> - send "$user\r"
> - set uprompt_seen 1
> - exp_continue
> - }
> - -re "@\[^\r\n]+\[Pp]assword:" {
> - # ssh pwd prompt
> - sleep 1
> - send "$userpswd\r"
> - exp_continue
> - }
> - "\[Pp]assword:" {
> - sleep 1;
> - if {$uprompt_seen == 1} {
> - send "$userpswd\r"
> - } else {
> - send "$passwd\r"
> - }
> - exp_continue
> - }
> - -- "$prompt" { break; }
> - }
> - }
> - set in_proc 0
> - return 0
> -}
> -
> -# Run commands given on the command line.
> -proc run_commands { prompt command } {
> - global in_proc
> - set in_proc 1
> -
> - # Disable output paging.
> -# send "config system console\r"
> -# send "set output standard\r"
> -# send "end\r"
> -# expect -re $prompt {}
> -
> - # Is this a multi-command?
> - if [ string match "*\;*" "$command" ] {
> - set commands [split $command \;]
> - set num_commands [llength $commands]
> -
> - for {set i 0} {$i < $num_commands} { incr i} {
> - send "[subst [lindex $commands $i]]\r"
> - expect {
> - -re "\[\n\r]+" { exp_continue }
> - -re "$prompt" {}
> - -gl "--More-- " { send " "
> - exp_continue
> - }
> - }
> - }
> - } else {
> - send "[subst $command]\r"
> - expect {
> - -re "\[\n\r]+" { exp_continue }
> - -re "$prompt" {}
> - -gl "--More-- " { send " "
> - exp_continue
> - }
> - }
> - }
> -# send "config system console\r"
> -# send "set output more\r"
> -# send "end\r"
> -# expect -re $prompt {}
> - send "exit\r"
> - expect {
> - -re "$prompt" {
> - #send "exit\r"
> - exp_continue
> - }
> - -re "\[\n\r]+" { exp_continue }
> - -gl "Configuration modified, save?" {
> - send "n\r"
> - exp_continue
> - }
> - timeout { catch {close}; wait
> - return 0
> - }
> - eof { return 0 }
> - }
> - set in_proc 0d
> -}
> -
> -#
> -# For each firewall... (this is main loop)
> -#
> -source_password_file $password_file
> -set in_proc 0
> -foreach firewall [lrange $argv $i end] {
> - set firewall [string tolower $firewall]
> - send_user "$firewall\n"
> -
> - # FortiOS 2.x prompts can end in either '#' or '$'
> - set prompt "\[#\\$] $"
> -
> - # Figure out passwords
> - if { $do_passwd || $do_enapasswd } {
> - set pswd [find password $firewall]
> - if { [llength $pswd] == 0 } {
> - send_user "\nError: no password for $firewall in $password_file.\n"
> - continue
> - }
> - set passwd [join [lindex $pswd 0] ""]
> - set enapasswd [join [lindex $pswd 1] ""]
> - } else {
> - set passwd $userpasswd
> - set enapasswd $enapasswd
> - }
> -
> - # Figure out username
> - if {[info exists username]} {
> - # command line username
> - set ruser $username
> - } else {
> - set ruser [join [find user $firewall] ""]
> - if { "$ruser" == "" } { set ruser $default_user }
> - }
> -
> - # Figure out username's password (if different from the vty password)
> - if {[info exists userpasswd]} {
> - # command line username
> - set userpswd $userpasswd
> - } else {
> - set userpswd [join [find userpassword $firewall] ""]
> - if { "$userpswd" == "" } { set userpswd $passwd }
> - }
> -
> -
> - # Figure out cypher type
> - if {[info exists cypher]} {
> - # command line cypher type
> - set cyphertype $cypher
> - } else {
> - set cyphertype [find cyphertype $firewall]
> - if { "$cyphertype" == "" } { set cyphertype "3des" }
> - }
> -
> - # Figure out connection method
> - set cmethod [find method $firewall]
> - if { "$cmethod" == "" } { set cmethod {{telnet} {ssh}} }
> -
> - # Figure out the SSH executable name
> - set sshcmd [find sshcmd $firewall]
> - if { "$sshcmd" == "" } { set sshcmd {ssh} }
> -
> - # Login to the firewall
> - if {[login $firewall $ruser $userpswd $passwd $enapasswd $prompt
> $cmethod $cyphertype]} {
> - continue
> - }
> -
> - # we are logged in, now figure out the full prompt
> - send "\r"
> - expect {
> - -re "\[\r\n]+" { exp_continue; }
> - -re "^(.+$prompt)" { set junk $expect_out(0,string); }
> - if {[$junk = "(^\\$ $)"]} {
> - set prompt $junk;
> - } else {
> - if {[$junk = "(^# $)"]} { set prompt $junk ; }
> - }
> - }
> -
> - if { $do_command } {
> - if {[run_commands $prompt $command]} {
> - continue
> - }
> - } elseif { $do_script } {
> - # Disable output paging.
> -# send "config system console\r"
> -# send "set output standard\r"
> -# send "end\r"
> -# expect -re $prompt {}
> - source $sfile
> - close
> - } else {
> - label $firewall
> - log_user 1
> - interact
> - }
> -
> - # End of for each firewall
> - wait
> - sleep 0.3
> -}
> -exit 0
> Index: patches/patch-Makefile_in
> ===================================================================
> RCS file: /cvs/ports/sysutils/rancid/patches/patch-Makefile_in,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-Makefile_in
> --- patches/patch-Makefile_in 8 Jun 2012 13:59:08 -0000 1.4
> +++ patches/patch-Makefile_in 16 Nov 2016 01:58:05 -0000
> @@ -1,21 +1,21 @@
> -$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@
> -
> - VPATH = @srcdir@
> +$OpenBSD$
> +--- Makefile.in.orig Tue Sep 6 17:12:39 2016
> ++++ Makefile.in Wed Nov 16 02:34:44 2016
> +@@ -70,7 +70,7 @@ am__make_running_with_option = \
> + test $$has_opt = yes
> + am__make_dryrun = (target_option=n; $(am__make_running_with_option))
> + am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
> -pkgdatadir = $(datadir)/@PACKAGE@
> +pkgdatadir = $(datadir)/doc/@PACKAGE@
> pkgincludedir = $(includedir)/@PACKAGE@
> pkglibdir = $(libdir)/@PACKAGE@
> pkglibexecdir = $(libexecdir)/@PACKAGE@
> -@@ -242,7 +242,7 @@ top_build_prefix = @top_build_prefix@
> +@@ -351,7 +351,7 @@ top_build_prefix = @top_build_prefix@
> top_builddir = @top_builddir@
> top_srcdir = @top_srcdir@
> AUTOMAKE_OPTIONS = foreign no-dependencies
> -pkgdata_DATA = COPYING CHANGES FAQ README README.lg UPGRADING
> cloginrc.sample
> -+pkgdata_DATA = COPYING CHANGES FAQ README README.lg UPGRADING
> - EXTRA_DIST = BUGS Todo configure install-sh \
> ++pkgdata_DATA = COPYING CHANGES FAQ README UPGRADING
> + EXTRA_DIST = BUGS Todo configure configure.vers install-sh \
> mkinstalldirs Makefile.in Todo $(pkgdata_DATA)
>
> Index: patches/patch-bin_Makefile_in
> ===================================================================
> RCS file: patches/patch-bin_Makefile_in
> diff -N patches/patch-bin_Makefile_in
> --- patches/patch-bin_Makefile_in 8 Jun 2012 13:59:08 -0000 1.5
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$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)/$@
> - francid: $(top_builddir)/config.status $(srcdir)/francid.in
> - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
> - fnlogin: $(top_builddir)/config.status $(srcdir)/fnlogin.in
> Index: patches/patch-bin_fnrancid_in
> ===================================================================
> RCS file: patches/patch-bin_fnrancid_in
> diff -N patches/patch-bin_fnrancid_in
> --- patches/patch-bin_fnrancid_in 8 Jun 2012 13:59:08 -0000 1.5
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,27 +0,0 @@
> -$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/);
> -
> -@@ -215,6 +216,15 @@ sub GetConf {
> - next;
> - }
> - ProcessHistory("","","","$_");
> -+ if (length($host) == 0) {
> -+ if ( $file) {
> -+ print(STDERR "Too few arguments: file name required\n");
> -+ exit(1);
> -+ } else {
> -+ print(STDERR "Too few arguments: host name required\n");
> -+ exit(1);
> -+ }
> -+ }
> - }
> - $found_end = 1;
> - return(1);
> Index: patches/patch-configure
> ===================================================================
> RCS file: /cvs/ports/sysutils/rancid/patches/patch-configure,v
> retrieving revision 1.6
> diff -u -p -r1.6 patch-configure
> --- patches/patch-configure 18 May 2015 10:12:33 -0000 1.6
> +++ patches/patch-configure 16 Nov 2016 01:58:05 -0000
> @@ -1,7 +1,7 @@
> -$OpenBSD: patch-configure,v 1.6 2015/05/18 10:12:33 espie Exp $
> ---- configure.orig Thu Nov 17 22:10:12 2011
> -+++ configure Mon May 18 12:09:18 2015
> -@@ -5461,7 +5461,7 @@ fi
> +$OpenBSD$
> +--- configure.orig Tue Nov 8 10:16:39 2016
> ++++ configure Tue Nov 8 10:17:17 2016
> +@@ -5471,7 +5471,7 @@ fi
> # ping seems to take one of two formats for count (N)
> # BSD: ping -c N host
> # SVR: ping host N
> @@ -10,28 +10,3 @@ $OpenBSD: patch-configure,v 1.6 2015/05/
> if test $? -eq 0 ; then
> LG_PING_CMD="$PING_PATH -c 1"
> else
> -@@ -6068,7 +6068,7 @@ ac_config_files="$ac_config_files bin/nslogin bin/nsra
> -
> - ac_config_files="$ac_config_files bin/nxrancid"
> -
> --ac_config_files="$ac_config_files bin/prancid"
> -+ac_config_files="$ac_config_files bin/prancid bin/fnlogin"
> -
> - ac_config_files="$ac_config_files bin/rivlogin bin/rivrancid"
> -
> -@@ -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" ;;
> -@@ -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 ;;
> - "bin/nslogin":F) chmod a+x $ac_file ;;
> - "bin/nsrancid":F) chmod a+x $ac_file ;;
> Index: patches/patch-etc_Makefile_in
> ===================================================================
> RCS file: /cvs/ports/sysutils/rancid/patches/patch-etc_Makefile_in,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-etc_Makefile_in
> --- patches/patch-etc_Makefile_in 8 Jun 2012 13:59:08 -0000 1.4
> +++ patches/patch-etc_Makefile_in 16 Nov 2016 01:58:05 -0000
> @@ -1,16 +1,16 @@
> -$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.
> -
> - VPATH = @srcdir@
> +$OpenBSD$
> +--- etc/Makefile.in.orig Tue Sep 6 17:12:39 2016
> ++++ etc/Makefile.in Wed Nov 16 03:51:28 2016
> +@@ -70,7 +70,7 @@ am__make_running_with_option = \
> + test $$has_opt = yes
> + am__make_dryrun = (target_option=n; $(am__make_running_with_option))
> + am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
> -pkgdatadir = $(datadir)/@PACKAGE@
> +pkgdatadir = $(datadir)/examples/@PACKAGE@
> pkgincludedir = $(includedir)/@PACKAGE@
> pkglibdir = $(libdir)/@PACKAGE@
> pkglibexecdir = $(libexecdir)/@PACKAGE@
> -@@ -423,26 +423,10 @@ uninstall-am: uninstall-pkgdataDATA
> +@@ -534,30 +534,10 @@ uninstall-am: uninstall-pkgdataDATA uninstall-sysconfD
>
>
> install-data-local: all
> @@ -24,6 +24,9 @@ $OpenBSD: patch-etc_Makefile_in,v 1.4 20
> - 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 "; \
> @@ -33,11 +36,12 @@ $OpenBSD: patch-etc_Makefile_in,v 1.4 20
> - else \
> - $(INSTALL_DATA) lg.conf.sample $(DESTDIR)$(sysconfdir)/lg.conf; \
> - fi; \
> -- fi
> +- fi; \
> +- $(INSTALL_DATA) rancid.types.base
> $(DESTDIR)$(sysconfdir)/rancid.types.base
> + test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
> + $(INSTALL_DATA) ../cloginrc.sample
> $(DESTDIR)$(pkgdatadir)/cloginrc.sample; \
> -+ $(INSTALL_DATA) rancid.conf.sample $(DESTDIR)$(pkgdatadir)/rancid.conf;
> \
> -+ $(INSTALL_DATA) lg.conf.sample $(DESTDIR)$(pkgdatadir)/lg.conf; \
> ++ $(INSTALL_DATA) rancid.conf.sample
> $(DESTDIR)$(pkgdatadir)/rancid.conf.sample; \
> ++ $(INSTALL_DATA) rancid.types.base
> $(DESTDIR)$(pkgdatadir)/rancid.types.base
>
> lg.conf.sample: Makefile $(srcdir)/lg.conf.sample.in
> rm -f lg.conf.sample lg.conf.sample.tmp; \
> Index: patches/patch-etc_rancid_conf_sample_in
> ===================================================================
> RCS file: patches/patch-etc_rancid_conf_sample_in
> diff -N patches/patch-etc_rancid_conf_sample_in
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-etc_rancid_conf_sample_in 16 Nov 2016 01:58:05 -0000
> @@ -0,0 +1,12 @@
> +$OpenBSD$
> +--- etc/rancid.conf.sample.in.orig Tue Nov 8 10:22:04 2016
> ++++ etc/rancid.conf.sample.in Tue Nov 8 10:22:57 2016
> +@@ -32,7 +32,7 @@ TMPDIR=/tmp; export TMPDIR
> + # Be careful changing this, it affects CVSROOT below. It should be a FQPN,
> not
> + # relative.
> + BASEDIR=@localstatedir@; export BASEDIR
> +-PATH=@bindir@:@ENV_PATH@; export PATH
> ++PATH=/usr/bin:/bin:@prefix@/bin; export PATH
> + #
> + # Set to the name of the sendmail executable (or script) that will accept
> the
> + # -t option to take its rcpt and other headers from std-in and $MAILOPTS
> (see
> Index: patches/patch-share_Makefile_in
> ===================================================================
> RCS file: patches/patch-share_Makefile_in
> diff -N patches/patch-share_Makefile_in
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-share_Makefile_in 16 Nov 2016 01:58:05 -0000
> @@ -0,0 +1,22 @@
> +$OpenBSD$
> +--- share/Makefile.in.orig Tue Sep 6 17:12:39 2016
> ++++ share/Makefile.in Wed Nov 16 04:10:43 2016
> +@@ -71,7 +71,7 @@ am__make_running_with_option = \
> + test $$has_opt = yes
> + am__make_dryrun = (target_option=n; $(am__make_running_with_option))
> + am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
> +-pkgdatadir = $(datadir)/@PACKAGE@
> ++pkgdatadir = $(datadir)/examples/@PACKAGE@
> + pkgincludedir = $(includedir)/@PACKAGE@
> + pkglibdir = $(libdir)/@PACKAGE@
> + pkglibexecdir = $(libexecdir)/@PACKAGE@
> +@@ -276,8 +276,7 @@ top_srcdir = @top_srcdir@
> + AUTOMAKE_OPTIONS = foreign
> + pkgdata_SCRIPTS = rancid-cvspurge rtrfilter downreport
> + dist_pkgdata_SCRIPTS = getipacctg
> +-dist_pkgdata_DATA = README.misc cisco-load.exp cisco-reload.exp \
> +- index.html lgnotes.html
> ++dist_pkgdata_DATA = README.misc cisco-load.exp cisco-reload.exp
> +
> + EXTRA_DIST = rancid-cvspurge.in rancid.spec rtrfilter.in downreport.in
> + CLEANFILES = rancid-cvspurge downreport
> Index: pkg/DESCR
> ===================================================================
> RCS file: /cvs/ports/sysutils/rancid/pkg/DESCR,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 DESCR
> --- pkg/DESCR 16 Dec 2008 21:07:55 -0000 1.1.1.1
> +++ pkg/DESCR 16 Nov 2016 01:58:05 -0000
> @@ -1,12 +1,12 @@
> RANCID monitors a router's (or more generally a device's)
> configuration, including software and hardware (cards, serial numbers,
> -etc) and uses CVS (Concurrent Version System) to maintain history of
> +etc) and uses CVS (Concurrent Version System) to maintain history of
> changes.
>
> RANCID does this by the very simple process summarized here:
> - * login to each device in the router table (router.db)
> - * run various commands to get the information that will be saved
> - * cook the output; re-format, remove oscillating or incrementing data
> + * login to each device in the router table (router.db)
> + * run various commands to get the information that will be saved
> + * cook the output; re-format, remove oscillating or incrementing data
> * email any differences (sample) from the previous collection to a
> - mail list
> + mail list
> * and finally commit those changes to the revision control system
> Index: pkg/MESSAGE
> ===================================================================
> RCS file: pkg/MESSAGE
> diff -N pkg/MESSAGE
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/MESSAGE 16 Nov 2016 01:58:05 -0000
> @@ -0,0 +1,7 @@
> +If you are upgrading from rancid-<3, please note that router.db field
> +separator has been changed from ':' to ';' to avoid conflict with IPv6
> +addresses. Replace the field separator in router.db files before running
> +rancid.
> +
> +The configuration files location is changed from ${SYSCONFDIR} to
> +${SYSCONFDIR}/rancid.
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/sysutils/rancid/pkg/PLIST,v
> retrieving revision 1.7
> diff -u -p -r1.7 PLIST
> --- pkg/PLIST 8 Jun 2012 13:59:08 -0000 1.7
> +++ pkg/PLIST 16 Nov 2016 01:58:05 -0000
> @@ -2,18 +2,22 @@
> @conflict par-*
> @newgroup _rancid:613
> @newuser _rancid:613:_rancid:daemon:Rancid user:/var/rancid:/bin/sh
> +bin/a10login
> bin/agmrancid
> bin/alogin
> +bin/anlogin
> bin/arancid
> -bin/arrancid
> bin/avologin
> bin/avorancid
> bin/blogin
> bin/brancid
> +bin/brlogin
> bin/cat5rancid
> bin/clogin
> +bin/complogin
> bin/control_rancid
> bin/cssrancid
> +bin/dllogin
> bin/elogin
> bin/erancid
> bin/f10rancid
> @@ -21,7 +25,6 @@ bin/f5rancid
> bin/flogin
> bin/fnlogin
> bin/fnrancid
> -bin/francid
> bin/hlogin
> @bin bin/hpuifilter
> bin/hrancid
> @@ -29,48 +32,74 @@ bin/htlogin
> bin/htrancid
> bin/jerancid
> bin/jlogin
> -bin/jrancid
> @comment bin/lg.cgi
> @comment bin/lgform.cgi
> bin/mrancid
> bin/mrvlogin
> -bin/mrvrancid
> bin/mtlogin
> bin/mtrancid
> bin/nlogin
> bin/nrancid
> bin/nslogin
> bin/nsrancid
> -bin/nxrancid
> -bin/par
> -bin/prancid
> +bin/panlogin
> +@bin bin/par
> +bin/plogin
> bin/rancid
> bin/rancid-cvs
> bin/rancid-fe
> bin/rancid-run
> +bin/rblogin
> bin/rivlogin
> bin/rivrancid
> bin/rrancid
> +bin/rtftpcopy
> bin/srancid
> bin/tlogin
> -bin/tntlogin
> -bin/tntrancid
> bin/trancid
> -bin/xrancid
> -bin/xrrancid
> +bin/ulogin
> +bin/wlogin
> +bin/xilogin
> +bin/xirancid
> +bin/xlogin
> bin/zrancid
> +lib/rancid/
> +lib/rancid/acos.pm
> +lib/rancid/aeos.pm
> +lib/rancid/arbor.pm
> +lib/rancid/bigip.pm
> +lib/rancid/ciscowlc.pm
> +lib/rancid/dell.pm
> +lib/rancid/edgemax.pm
> +lib/rancid/edgerouter.pm
> +lib/rancid/eos.pm
> +lib/rancid/exos.pm
> +lib/rancid/foundry.pm
> +lib/rancid/ios.pm
> +lib/rancid/iosxr.pm
> +lib/rancid/junos.pm
> +lib/rancid/mrv.pm
> +lib/rancid/nxos.pm
> +lib/rancid/panos.pm
> +lib/rancid/rancid.pm
> +lib/rancid/rbt.pm
> +lib/rancid/wavesvros.pm
> @man man/man1/agmrancid.1
> @man man/man1/alogin.1
> +@man man/man1/anlogin.1
> +@man man/man1/anrancid.1
> @man man/man1/arancid.1
> -@man man/man1/arrancid.1
> +@comment man/man1/arrancid.1
> @man man/man1/avologin.1
> @man man/man1/avorancid.1
> @man man/man1/blogin.1
> @man man/man1/brancid.1
> @man man/man1/cat5rancid.1
> @man man/man1/clogin.1
> +@man man/man1/complogin.1
> @man man/man1/control_rancid.1
> @man man/man1/cssrancid.1
> +@man man/man1/dllogin.1
> @man man/man1/elogin.1
> @man man/man1/erancid.1
> @man man/man1/f10rancid.1
> @@ -78,27 +107,26 @@ bin/zrancid
> @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
> @man man/man1/hrancid.1
> @man man/man1/htlogin.1
> @man man/man1/htrancid.1
> @man man/man1/jerancid.1
> @man man/man1/jlogin.1
> -@man man/man1/jrancid.1
> -@man man/man1/lg_intro.1
> +@comment man/man1/lg_intro.1
> @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
> @man man/man1/nsrancid.1
> -@man man/man1/nxrancid.1
> +@comment man/man1/nxrancid.1
> +@man man/man1/panlogin.1
> @man man/man1/par.1
> -@man man/man1/prancid.1
> +@man man/man1/plogin.1
> +@comment man/man1/prancid.1
> @man man/man1/rancid-cvs.1
> @man man/man1/rancid-run.1
> @man man/man1/rancid.1
> @@ -108,15 +136,19 @@ bin/zrancid
> @man man/man1/rrancid.1
> @man man/man1/srancid.1
> @man man/man1/tlogin.1
> -@man man/man1/tntlogin.1
> -@man man/man1/tntrancid.1
> @man man/man1/trancid.1
> -@man man/man1/xrancid.1
> -@man man/man1/xrrancid.1
> +@man man/man1/ulogin.1
> +@man man/man1/wlogin.1
> +@man man/man1/xilogin.1
> +@man man/man1/xirancid.1
> +@man man/man1/xlogin.1
> @man man/man1/zrancid.1
> +@man man/man3/rancid.3
> @man man/man5/cloginrc.5
> -@man man/man5/lg.conf.5
> +@comment man/man5/lg.conf.5
> @man man/man5/rancid.conf.5
> +@comment @man man/man5/rancid.types.base.5
> +@man man/man5/rancid.types.conf.5
> @man man/man5/router.db.5
> share/doc/pkg-readmes/${FULLPKGNAME}
> share/doc/rancid/
> @@ -124,25 +156,22 @@ share/doc/rancid/CHANGES
> share/doc/rancid/COPYING
> share/doc/rancid/FAQ
> share/doc/rancid/README
> -share/doc/rancid/README.lg
> share/doc/rancid/UPGRADING
> share/examples/rancid/
> +@sample ${SYSCONFDIR}/rancid/
> +share/examples/rancid/README.misc
> +share/examples/rancid/cisco-load.exp
> +share/examples/rancid/cisco-reload.exp
> share/examples/rancid/cloginrc.sample
> -share/examples/rancid/lg.conf
> -share/examples/rancid/lg.conf.sample
> -share/examples/rancid/rancid.conf
> -@sample ${SYSCONFDIR}/rancid.conf
> +share/examples/rancid/downreport
> +share/examples/rancid/getipacctg
> +@comment share/examples/rancid/lg.conf.sample
> +share/examples/rancid/rancid-cvspurge
> share/examples/rancid/rancid.conf.sample
> -share/rancid/
> -share/rancid/README.misc
> -share/rancid/cisco-load.exp
> -share/rancid/cisco-reload.exp
> -share/rancid/downreport
> -share/rancid/getipacctg
> -share/rancid/index.html
> -share/rancid/lgnotes.html
> -share/rancid/rancid-cvspurge
> -share/rancid/rtrfilter
> +@sample ${SYSCONFDIR}/rancid/rancid.conf
> +share/examples/rancid/rancid.types.base
> +@sample ${SYSCONFDIR}/rancid/rancid.types.base
> +share/examples/rancid/rtrfilter
> @mode 755
> @owner _rancid
> @group _rancid
> Index: pkg/README
> ===================================================================
> RCS file: /cvs/ports/sysutils/rancid/pkg/README,v
> retrieving revision 1.2
> diff -u -p -r1.2 README
> --- pkg/README 2 Jun 2011 13:41:41 -0000 1.2
> +++ pkg/README 16 Nov 2016 01:58:05 -0000
> @@ -4,19 +4,19 @@ $OpenBSD: README,v 1.2 2011/06/02 13:41:
> | Running ${FULLPKGNAME} on OpenBSD
> +-----------------------------------------------------------------------
>
> -On OpenBSD, RANCID lives and works in /var/rancid, with user id _rancid.
> +On OpenBSD, RANCID lives and works in ${LOCALSTATEDIR}, with user id _rancid.
>
> Quick Installation Guide (an example):
>
> -1) Modify ${SYSCONFDIR}/rancid.conf. The variable LIST_OF_GROUPS is a space
> - delimited list of router "groups".
> +1) Modify ${SYSCONFDIR}/rancid/rancid.conf. The variable LIST_OF_GROUPS is
> + a space delimited list of router "groups".
> e.g.:
> LIST_OF_GROUPS="backbone aggregation switches"
>
> -2) Create /var/rancid/.cloginrc, with read/write permissions only for
> +2) Create ${LOCALSTATEDIR}/.cloginrc, with read/write permissions only for
> the _rancid user, e.g. 0600 or 0640.
>
> - Review ${TRUEPREFIX}/share/examples/rancid/cloginrc.sample for examples
> + Review ${TRUEPREFIX}/share/examples/rancid/cloginrc.sample for examples
> and a good starting point. See also cloginrc(5).
>
> Test to make sure that you can login to every router.
> @@ -35,7 +35,7 @@ Quick Installation Guide (an example):
> do it. See also rancid-cvs(1).
>
> 5) For each "group", modify the router.db file in the group directory.
> - The file is of the form "router:mfg:state", where "router" is
> + The file is of the form "router;mfg;state", where "router" is
> the name (we use FQDN) of the router, mfg is the manufacturer from
> the set of (cat5|cisco|juniper), and "state" is either up or down.
> Each router listed as "up" will have the configuration grabbed.
> @@ -44,16 +44,16 @@ Quick Installation Guide (an example):
>
> 6) For first-time users or new installations, run `rancid-run' (with no
> arguments) as the user _rancid and check the resulting log file(s)
> - (in /var/rancid/logs/*) for errors. Repeat until there are no
> + (in ${LOCALSTATEDIR}/logs/*) for errors. Repeat until there are no
> errors.
>
> 7) Put `rancid-run' in _rancid's crontab to be called however often you
> want it to run for each group (rancid-run [<GROUP>]). If you run it
> less often than once/hour, check the setting of OLDTIME in
> - ${SYSCONFDIR}/rancid.conf.
> + ${SYSCONFDIR}/rancid/rancid.conf.
>
> Example:
> # run config differ hourly
> 1 * * * * ${TRUEPREFIX}/bin/rancid-run
> # clean out config differ logs
> - 50 23 * * * /usr/bin/find /var/rancid/logs -type f -mtime +2 -exec rm
> {} \;
> + 50 23 * * * /usr/bin/find ${LOCALSTATEDIR}/logs -type f -mtime +2 -exec
> rm {} \;