net-snmp-5.7.2-cert-path.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. 1134475 - dependency in perl package
  2. Use hardcoded path to configuration directories instead of net-snmp-config.
  3. net-snmp-config is in net-snmp-devel package and we do not want net-snmp-perl
  4. depending on -devel.
  5. diff -up net-snmp-5.7.2/local/net-snmp-cert.cert-path net-snmp-5.7.2/local/net-snmp-cert
  6. --- net-snmp-5.7.2/local/net-snmp-cert.cert-path 2012-10-10 00:28:58.000000000 +0200
  7. +++ net-snmp-5.7.2/local/net-snmp-cert 2014-09-01 12:05:10.582427036 +0200
  8. @@ -819,8 +819,7 @@ sub set_default {
  9. sub cfg_path {
  10. my $path;
  11. - $path = `$NetSNMP::Cert::CFGTOOL --snmpconfpath`;
  12. - chomp $path;
  13. + $path = "/etc/snmp:/usr/share/snmp:/usr/lib64/snmp:/home/jsafrane/.snmp:/var/lib/net-snmp";
  14. return (wantarray ? split(':', $path) : $path);
  15. }
  16. @@ -1414,8 +1413,8 @@ sub checkReqs {
  17. die("$NetSNMP::Cert::OPENSSL (v$ossl_ver): must be $ossl_min_ver or later")
  18. if ($ossl_ver cmp $ossl_min_ver) < 0;
  19. - die("$NetSNMP::Cert::CFGTOOL not found: please install")
  20. - if system("$NetSNMP::Cert::CFGTOOL > /dev/null 2>&1");
  21. +# die("$NetSNMP::Cert::CFGTOOL not found: please install")
  22. +# if system("$NetSNMP::Cert::CFGTOOL > /dev/null 2>&1");
  23. }
  24. sub initOpts {