From 17435b3e5262235591bb183cbb496724daa5e82c Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Mon, 1 Sep 2014 12:02:03 +0200 Subject: [PATCH] Fixed net-snmp-cert tool, now it does not depend on net-snmp-devel Resolves: #1134475 --- net-snmp-5.7.2-cert-path.patch | 30 ++++++++++++++++++++++++++++++ net-snmp.spec | 3 +++ 2 files changed, 33 insertions(+) create mode 100644 net-snmp-5.7.2-cert-path.patch diff --git a/net-snmp-5.7.2-cert-path.patch b/net-snmp-5.7.2-cert-path.patch new file mode 100644 index 0000000..495fccb --- /dev/null +++ b/net-snmp-5.7.2-cert-path.patch @@ -0,0 +1,30 @@ +1134475 - dependency in perl package + +Use hardcoded path to configuration directories instead of net-snmp-config. +net-snmp-config is in net-snmp-devel package and we do not want net-snmp-perl +depending on -devel. + +diff -up net-snmp-5.7.2/local/net-snmp-cert.cert-path net-snmp-5.7.2/local/net-snmp-cert +--- net-snmp-5.7.2/local/net-snmp-cert.cert-path 2012-10-10 00:28:58.000000000 +0200 ++++ net-snmp-5.7.2/local/net-snmp-cert 2014-09-01 12:05:10.582427036 +0200 +@@ -819,8 +819,7 @@ sub set_default { + sub cfg_path { + my $path; + +- $path = `$NetSNMP::Cert::CFGTOOL --snmpconfpath`; +- chomp $path; ++ $path = "/etc/snmp:/usr/share/snmp:/usr/lib64/snmp:/home/jsafrane/.snmp:/var/lib/net-snmp"; + return (wantarray ? split(':', $path) : $path); + } + +@@ -1414,8 +1413,8 @@ sub checkReqs { + die("$NetSNMP::Cert::OPENSSL (v$ossl_ver): must be $ossl_min_ver or later") + if ($ossl_ver cmp $ossl_min_ver) < 0; + +- die("$NetSNMP::Cert::CFGTOOL not found: please install") +- if system("$NetSNMP::Cert::CFGTOOL > /dev/null 2>&1"); ++# die("$NetSNMP::Cert::CFGTOOL not found: please install") ++# if system("$NetSNMP::Cert::CFGTOOL > /dev/null 2>&1"); + } + + sub initOpts { diff --git a/net-snmp.spec b/net-snmp.spec index ce0f067..606c84e 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -44,6 +44,7 @@ Patch11: net-snmp-5.7-agentx-crash.patch Patch12: net-snmp-5.5-agentx-disconnect-crash.patch Patch13: net-snmp-5.7.2-icmp-mib.patch Patch14: net-snmp-CVE-2014-3565.patch +Patch15: net-snmp-5.7.2-cert-path.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -212,6 +213,7 @@ cp %{SOURCE12} . %patch12 -p1 -b .agentx-disconnect-crash %patch13 -p1 -b .icmp-mib %patch14 -p1 -b .CVE-2014-3565 +%patch15 -p1 -b .cert-path %ifarch sparc64 s390 s390x # disable failing test - see https://bugzilla.redhat.com/show_bug.cgi?id=680697 @@ -515,6 +517,7 @@ rm -rf ${RPM_BUILD_ROOT} %changelog * Mon Sep 1 2014 Jan Safranek - 1:5.7.2-15 - Fixed CVE-2014-3565 +- Fixed net-snmp-cert tool, now it does not depend on net-snmp-devel (#1134475) * Tue Mar 4 2014 Jan Safranek - 1:5.7.2-14 - Fixed buffer overflow in ICMP-MIB (#1071753)