[rancid] Rancid in FreeBSD ports break on FreeBSD 13.0

Geert Jan de Groot GeertJan.deGroot at xs4all.nl
Sun Oct 31 22:36:14 UTC 2021


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".

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
       (



More information about the Rancid-discuss mailing list