[rancid] Several suggestions about rancid-3.2.p7

heasley heas at shrubbery.net
Fri Jun 5 00:44:39 UTC 2015


Wed, Jun 03, 2015 at 10:16:09PM +0900, Tetsuo Handa:
> Hello.
> 
> I've just installed rancid-3.2p7 on CentOS 6.6.
> 
> (1) I noticed that while the configure script checks for Socket.pm >= 2.006 ,
>     it works for me with below patch. If below patch is correct (I'm not perl
>     user), we don't need to force users to upgrade package to a version which
>     is not included in RHEL 6 / CentOS 6 distribution.

I'm not sure what I'll do here.  I'll poke the various suggestions folks
have sent to make sure that the change does not result in a regression.

> ----------------------------------------
> patch -p0 << "EOF"
> --- configure
> +++ configure
> @@ -5316,15 +5316,6 @@
>  PERLV=`basename $PERLV_PATH`
>  
>  
> -# check Socket.pm version
> -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Socket.pm version" >&5
> -$as_echo_n "checking Socket.pm version... " >&6; }
> -$PERLV_PATH -e 'use 2.006 Socket qw(inet_pton);' 2>&1 >/dev/null
> -if test $? -ne 0 ; then
> -   as_fn_error $? "Socket.pm is older than 2.006; upgrade from http://metacpan.org/pod/Socket" "$LINENO" 5
> -   exit 1
> -fi
> -
>  # Extract the first word of "expect", so it can be a program name with args.
>  set dummy expect; ac_word=$2
>  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
> --- lib/rancid.pm.in
> +++ lib/rancid.pm.in
> @@ -48,7 +48,7 @@
>  use 5.010;
>  use strict 'vars';
>  use warnings;
> -use 2.006 Socket qw(AF_INET AF_INET6 inet_pton);
> +use Socket qw(AF_INET AF_INET6);
>  require(Exporter);
>  our @ISA = qw(Exporter);
>  
> @@ -351,6 +351,11 @@
>      @sorted_lines;
>  }
>  
> +sub inet_pton {
> +    my($family, $addr) = @_;
> +    return inet_pton($family, $addr);
> +}
> +
>  # ipaddrval(IPaddr) converts and IPv4/v6 address to a string for comparison.
>  # Some may ask why not use Net::IP; performance.  We tried and it was horribly
>  # slow.
> EOF
> ----------------------------------------
> 
> (2) I noticed that the shell variable SENDMAIL is defined in
>     bin/control_rancid.in like below
> 
>       # SENDMAIL location
>       SENDMAIL=${SENDMAIL:=sendmail};
	...

Crap.  Thanks

> (3) I noticed that bin/control_rancid.in forgot to exclude .cvsignore
>     file in the
> 
>       # delete configs from RCS for routers not listed in routers.up.

	...

I update 3.2p6 a few days ago for this.  thanks

> (4) Usually, PATH environment variable should not contain "."
>     (current directory).

I presume that it inheritted this from your environment or whomever ran
configure.


More information about the Rancid-discuss mailing list