[rancid] Rancid in FreeBSD ports break on FreeBSD 13.0

heasley heas at shrubbery.net
Mon Nov 1 03:59:30 UTC 2021


Sun, Oct 31, 2021 at 11:36:14PM +0100, Geert Jan de Groot:
> Hi,
> 
> Perhaps I should not report this because the current version of Rancid 
> is 3.1, but the version in FreeBSD pkg is still 2.3.8. Anyway..
> 
> With the upgrade to FreeBSD 13.0, this old version of Rancid broke.
> Root cause seems to be the use of "diff -u -4" in control-rancid.
> I'm not sure what '-4' does; could not find it in the man pages of diff.
> 
> Anyway, omitting it makes things work again. I should just install from 
> the repository, but "not today".

Hey. -N sets the number of lines of context.  at least two forms have
appeared over time; -N, -uN.  Why the need for change, I do not know.

I expect configure to have found the right options.  Did you re-install
from source?  do you have multiple versions of diff?

> Geert Jan
> 
> *** control_rancid.SAV	Sun Apr  3 14:32:28 2016
> --- control_rancid	Sun Oct 31 16:36:14 2021
> ***************
> *** 199,213 ****
>    	tr '[A-Z]' '[a-z]' | sort -u > routers.db
>    cut -d: -f1,2 routers.db > routers.all.new
>    if [ ! -f routers.all ] ; then touch routers.all; fi
> ! diff -u -4 routers.all routers.all.new > /dev/null 2>&1; RALL=$?
>    perl5 -F: -ane '{$F[2] =~ s/\s*\$//; ($F[0] =~ tr at A-Z@a-z@, print $_)
>        if ($F[2] !~ /^up$/i);}' routers.db > routers.down.new
>    if [ ! -f routers.down ] ; then touch routers.down; fi
> ! diff -u -4 routers.down routers.down.new > /dev/null 2>&1; RDOWN=$?
>    perl5 -F: -ane '{$F[2] =~ s/\s*\$//; ($F[0] =~ tr at A-Z@a-z@,
>        print "$F[0]:$F[1]\n") if ($F[2] =~ /^up$/i);}' routers.db > 
> routers.up.new
>    if [ ! -f routers.up ] ; then touch routers.up; fi
> ! diff -u -4 routers.up routers.up.new > /dev/null 2>&1; RUP=$?
> 
>    if [ $RALL -ne 0 -o $RDOWN -ne 0 -o $RUP -ne 0 ] ; then
>        (
> --- 199,213 ----
>    	tr '[A-Z]' '[a-z]' | sort -u > routers.db
>    cut -d: -f1,2 routers.db > routers.all.new
>    if [ ! -f routers.all ] ; then touch routers.all; fi
> ! diff -u routers.all routers.all.new > /dev/null 2>&1; RALL=$?
>    perl5 -F: -ane '{$F[2] =~ s/\s*\$//; ($F[0] =~ tr at A-Z@a-z@, print $_)
>        if ($F[2] !~ /^up$/i);}' routers.db > routers.down.new
>    if [ ! -f routers.down ] ; then touch routers.down; fi
> ! diff -u routers.down routers.down.new > /dev/null 2>&1; RDOWN=$?
>    perl5 -F: -ane '{$F[2] =~ s/\s*\$//; ($F[0] =~ tr at A-Z@a-z@,
>        print "$F[0]:$F[1]\n") if ($F[2] =~ /^up$/i);}' routers.db > 
> routers.up.new
>    if [ ! -f routers.up ] ; then touch routers.up; fi
> ! diff -u routers.up routers.up.new > /dev/null 2>&1; RUP=$?
> 
>    if [ $RALL -ne 0 -o $RDOWN -ne 0 -o $RUP -ne 0 ] ; then
>        (
> 
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at www.shrubbery.net
> https://www.shrubbery.net/mailman/listinfo/rancid-discuss



More information about the Rancid-discuss mailing list