From 9295022f57edd6eda90d51e973f5ca6749135003 Mon Sep 17 00:00:00 2001 From: Pat Riehecky Date: Dec 03 2019 19:51:23 +0000 Subject: Add patches to fixup minor bits --- diff --git a/fix_lspci.diff b/fix_lspci.diff new file mode 100644 index 0000000..4ca67af --- /dev/null +++ b/fix_lspci.diff @@ -0,0 +1,32 @@ +From 7f57ff160e0ce561c0f2e3e7c6c5ea9879aadcf2 Mon Sep 17 00:00:00 2001 +From: lhchin +Date: Fri, 25 Oct 2019 10:47:15 +0800 +Subject: [PATCH] Update Controllers.pm + +filter out command "lspci -vvv" console error "pcilib: sysfs_read_vpd: read failed: Input/output error ..." for data not relevant for data collection +--- + .../Agent/Backend/OS/Generic/Lspci/Controllers.pm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci/Controllers.pm b/lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci/Controllers.pm +index fff290ba..56852970 100644 +--- a/lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci/Controllers.pm ++++ b/lib/Ocsinventory/Agent/Backend/OS/Generic/Lspci/Controllers.pm +@@ -18,7 +18,7 @@ sub run { + my $pcislot; + my $type; + my $lspci_version; +- my $command = "lspci -vvv"; ++ my $command = "lspci -vvv 2>/dev/null"; + + #We get the current lspci version + `lspci --version` =~ m/lspci\sversion\s(\d+.*)/ ; +@@ -26,7 +26,7 @@ sub run { + $lspci_version = $common->convertVersion($lspci_version,3); + + if ($lspci_version >= 224) { #More informations since version 2.2.4 +- $command = "lspci -vvv -nn"; ++ $command = "lspci -vvv -nn 2>/dev/null"; + } + + foreach(`$command`){ diff --git a/fix_syntax.diff b/fix_syntax.diff new file mode 100644 index 0000000..1079a25 --- /dev/null +++ b/fix_syntax.diff @@ -0,0 +1,23 @@ +From 9918d58a547ee6fc34e57faa17ad1e4b82e01812 Mon Sep 17 00:00:00 2001 +From: buttfix <57773498+buttfix@users.noreply.github.com> +Date: Thu, 14 Nov 2019 21:55:34 +0100 +Subject: [PATCH] Fixes #238 + +Semicolon is too much. +--- + lib/Ocsinventory/Agent/Network.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Ocsinventory/Agent/Network.pm b/lib/Ocsinventory/Agent/Network.pm +index b177b195..20a4caf8 100644 +--- a/lib/Ocsinventory/Agent/Network.pm ++++ b/lib/Ocsinventory/Agent/Network.pm +@@ -53,7 +53,7 @@ sub new { + $uaserver, # server:port, port is needed + $self->{config}->{realm}, + $self->{config}->{user}, +- $password, ++ $password + ); + + #Setting SSL configuration depending on LWP version diff --git a/fix_unused_user.diff b/fix_unused_user.diff new file mode 100644 index 0000000..a61a3af --- /dev/null +++ b/fix_unused_user.diff @@ -0,0 +1,22 @@ +From ebb3b4a951ea77725709548895792ea24cd2511a Mon Sep 17 00:00:00 2001 +From: "Gabriel.Moreau" +Date: Tue, 21 May 2019 15:59:45 +0200 +Subject: [PATCH] Suppress unused line 52 $self->{config}->{user}.",". which + make a warning when execute + +--- + lib/Ocsinventory/Agent/Network.pm | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lib/Ocsinventory/Agent/Network.pm b/lib/Ocsinventory/Agent/Network.pm +index 1054bcc0..66c3a2e3 100644 +--- a/lib/Ocsinventory/Agent/Network.pm ++++ b/lib/Ocsinventory/Agent/Network.pm +@@ -49,7 +49,6 @@ sub new { + my $version = 'OCS-NG_unified_unix_agent_v'; + $version .= exists ($self->{config}->{VERSION})?$self->{config}->{VERSION}:''; + $self->{ua}->agent($version); +- $self->{config}->{user}.",". + my $password = $self->{config}->{password}.""; + $self->{ua}->credentials( + $uaserver, # server:port, port is needed diff --git a/ocsinventory-agent.spec b/ocsinventory-agent.spec index 48b4f60..716da0e 100644 --- a/ocsinventory-agent.spec +++ b/ocsinventory-agent.spec @@ -22,7 +22,7 @@ Name: ocsinventory-agent Summary: Open Computer and Software Inventory Next Generation client Version: 2.6.0 -Release: 2%{?dist} +Release: 2.1%{?dist} Source0: https://github.com/OCSInventory-NG/UnixAgent/releases/download/v%{official_version}/Ocsinventory-Unix-Agent-%{official_version}.tar.gz @@ -36,6 +36,10 @@ Source31: ocsinventory-agent-onboot.timer Source32: ocsinventory-agent-hourly.timer Source33: ocsinventory-agent-daily.timer +Patch0001: fix_unused_user.diff +Patch0002: fix_syntax.diff +Patch0003: fix_lspci.diff + License: GPLv2+ URL: http://www.ocsinventory-ng.org/ @@ -138,6 +142,7 @@ Perl libraries for %{name} %prep %setup -q -n Ocsinventory-Unix-Agent-%{version} +%autopatch -p1 sed -e 's/\r//' -i snmp/mibs/local/6876.xml diff --git a/sources b/sources index 91b3f69..f6dcae4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Ocsinventory-Unix-Agent-2.6.0.tar.gz) = d767ee556121e132c816abd93a93aa2f2013444e009924752099daf5bb1fa4455cd8d2aff3d905780cd8edcbe7f6aee2ef0be7279716c6e7b172e4adc840bd71 +SHA512 (Ocsinventory-Unix-Agent-2.6.0.tar.gz) = fbc5804c18bd7969fffff29c015737bb9333cb1575fbb388051cf8b9c19e6378fed71455a4d4605ab42333bc4e653640342dc23ac099f12e5634a432839a76c4