diff --git a/rancid-3.13-dnos10-psu-filter.patch b/rancid-3.13-dnos10-psu-filter.patch new file mode 100644 index 0000000..565b2d9 --- /dev/null +++ b/rancid-3.13-dnos10-psu-filter.patch @@ -0,0 +1,34 @@ +diff -up rancid-3.13/lib/dnos10.pm.in.psu-filter rancid-3.13/lib/dnos10.pm.in +--- rancid-3.13/lib/dnos10.pm.in.psu-filter 2020-10-02 12:48:05.000000000 -0400 ++++ rancid-3.13/lib/dnos10.pm.in 2022-04-25 10:42:42.888049369 -0400 +@@ -122,19 +122,27 @@ REDO: last if (/$prompt/); + + if (/-- power supplies --/i) { + ProcessHistory("COMMENTS","keysort","C1","! $_"); +- # PSU-ID Status Type AirFlow Fan Speed(rpm) Status +- # ---------------------------------------------------------------- +- # 1 up AC REVERSE 1 25800 up + while (<$INPUT>) { + s/^\s+\015//g; + tr/\015//d; + last if (/$prompt/); + last if (/^-- /); # next section + /^\s*$/ && next; ++ # PSU-ID Status Type AirFlow Fan Speed(rpm) Status ++ # ---------------------------------------------------------------- ++ # 1 up AC REVERSE 1 25800 up + if (/^(\d+\s+\w+\s+\w+\s+\w+\s+\d+\s+)(\d+)(\s+\w+)\s*$/) { + my($sl) = length($2); + my($fmt) = "%s%-". $sl ."s%s\n"; + $_ = sprintf($fmt, $1, "", $3); ++ # PSU-ID Status Type Power(w) AvgPower(w) AvgPowerStartTime AirFlow Fan Speed(rpm) Status ++ # ------------------------------------------------------------------------------------------------------- ++ # 1 up AC 34 34 04/05/2022-20:47 REVERSE 1 3600 up ++ } elsif (/^(\d+\s+\w+\s+\w+\s+)(\d+\s+\d+\s+[^ ]+\s+)(\w+\s+\d+\s+)(\d+)(\s+\w+)\s*$/) { ++ my($pl) = length($2); ++ my($sl) = length($4); ++ my($fmt) = "%s%-". $pl ."s%s%-". $sl ."s%s\n"; ++ $_ = sprintf($fmt, $1, "", $3, "", $5); + } + ProcessHistory("COMMENTS","keysort","C1","! $_"); + } diff --git a/rancid.spec b/rancid.spec index 0026588..2354f54 100644 --- a/rancid.spec +++ b/rancid.spec @@ -1,6 +1,6 @@ Name: rancid Version: 3.13 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Really Awesome New Cisco confIg Differ License: BSD with advertising @@ -9,6 +9,7 @@ Source0: https://shrubbery.net/pub/%{name}/%{name}-%{version}.tar.gz Source1: %{name}.cron Patch0: %{name}-Makefile.patch Patch1: %{name}-configure-no-ping-test.patch +Patch2: %{name}-3.13-dnos10-psu-filter.patch BuildRequires: make BuildRequires: gcc @@ -40,6 +41,7 @@ including software and hardware (cards, serial numbers, etc) and uses CVS %setup -q -n %{name}-%{version} %patch0 -p1 -b .no-cflags %patch1 -p1 -b .no-ping-check +%patch2 -p1 -b .dnos10-psu-filter %build %configure \ @@ -114,6 +116,10 @@ exit 0 %changelog +* Fri Mar 17 2023 Charles R. Anderson - 3.13-7 +- add patch to filter PSU output on Dell OS10 10.5.3.2 + https://shrubbery.net/pipermail/rancid-discuss/2022-April/011186.html + * Fri Mar 10 2023 Chris Adams - 3.13-6 - fix BASEDIR and LOGDIR (#2092029)