Mailing List Archive

Rancid in FreeBSD ports break on FreeBSD 13.0
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@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@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@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@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@www.shrubbery.net
https://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Rancid in FreeBSD ports break on FreeBSD 13.0 [ In reply to ]
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@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@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@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@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@www.shrubbery.net
> https://www.shrubbery.net/mailman/listinfo/rancid-discuss

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@www.shrubbery.net
https://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Rancid in FreeBSD ports break on FreeBSD 13.0 [ In reply to ]
On 1 Nov 2021, at 1:36 EAT, Geert Jan de Groot wrote:

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

I only see 3.13.1 in the repos.

https://freebsd.pkgs.org/13/freebsd-amd64/rancid3-3.13_1.txz.html

--
patrick

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@www.shrubbery.net
https://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Rancid in FreeBSD ports break on FreeBSD 13.0 [ In reply to ]
Hi,


> 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?

The machine is in an inaccessible place (radio-tower, now double
inaccessible because of COVID) and I simply run pkg update on FreeBSD
every so often, and run an upgrade when I must.
Stangely, it was stuck with the old version of rancid from pkg and pkg
wasn't complaining.

I un-installed rancid, installed rancid (now 'rancid3' in pkg) and all
is well.

I don't know how this package got stuck on the old version, but now all
is well. Apologies for crying wolf.

Geert Jan

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@www.shrubbery.net
https://www.shrubbery.net/mailman/listinfo/rancid-discuss