packages: net-snmp/net-snmp.spec, net-snmp/net-snmp-libpci-init.patch (NEW)...
baggins
baggins at pld-linux.org
Sun Aug 7 21:13:05 CEST 2011
Author: baggins Date: Sun Aug 7 19:13:05 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- fix uber-stupid behaviour of libpci init error not returning but exiting the program
---- Files affected:
packages/net-snmp:
net-snmp.spec (1.183 -> 1.184) , net-snmp-libpci-init.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/net-snmp/net-snmp.spec
diff -u packages/net-snmp/net-snmp.spec:1.183 packages/net-snmp/net-snmp.spec:1.184
--- packages/net-snmp/net-snmp.spec:1.183 Mon Aug 1 19:22:29 2011
+++ packages/net-snmp/net-snmp.spec Sun Aug 7 21:12:59 2011
@@ -27,7 +27,7 @@
Summary(uk.UTF-8): Набір утиліт для протоколу SNMP від UC-Davis
Name: net-snmp
Version: 5.7
-Release: 2
+Release: 2.1
License: BSD-like
Group: Networking/Daemons
Source0: http://downloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
@@ -56,6 +56,7 @@
Patch12: %{name}-use-rpm-hrmib.patch
Patch13: %{name}-TCP_STATS_CACHE_TIMEOUT.patch
Patch14: %{name}-libnl.patch
+Patch15: %{name}-libpci-init.patch
URL: http://www.net-snmp.org/
BuildRequires: autoconf >= 2.63
BuildRequires: automake
@@ -433,6 +434,7 @@
%patch12 -p1
%patch13 -p1
%patch14 -p1
+%patch15 -p1
%build
%{__libtoolize}
@@ -814,6 +816,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.184 2011/08/07 19:12:59 baggins
+- fix uber-stupid behaviour of libpci init error not returning but exiting the program
+
Revision 1.183 2011/08/01 17:22:29 arekm
- link perl module with freshly built libs instead of using system libs
================================================================
Index: packages/net-snmp/net-snmp-libpci-init.patch
diff -u /dev/null packages/net-snmp/net-snmp-libpci-init.patch:1.1
--- /dev/null Sun Aug 7 21:13:05 2011
+++ packages/net-snmp/net-snmp-libpci-init.patch Sun Aug 7 21:12:59 2011
@@ -0,0 +1,37 @@
+--- net-snmp-5.7/agent/mibgroup/if-mib/data_access/interface_linux.c.orig 2011-07-02 00:35:46.000000000 +0200
++++ net-snmp-5.7/agent/mibgroup/if-mib/data_access/interface_linux.c 2011-08-07 21:10:45.760672551 +0200
+@@ -19,6 +19,18 @@
+ #ifdef HAVE_PCI_LOOKUP_NAME
+ #include <pci/pci.h>
+ static struct pci_access *pci_access;
++static int _net_snmp_pci_status = 1;
++
++static void _net_snmp_pci_error(char *msg, ...)
++{
++ va_list args;
++
++ va_start(args, msg);
++ fputs("pcilib: ", stderr);
++ vfprintf(stderr, msg, args);
++ fputc('\n', stderr);
++ _net_snmp_pci_status = 0;
++}
+ #endif
+
+ #ifdef HAVE_LINUX_ETHTOOL_H
+@@ -146,9 +158,13 @@
+
+ #ifdef HAVE_PCI_LOOKUP_NAME
+ pci_access = pci_alloc();
+- if (pci_access)
++ if (pci_access) {
+ pci_init(pci_access);
+- else
++ if (_net_snmp_pci_status == 0) {
++ pci_cleanup(pci_access);
++ pci_access = NULL;
++ }
++ } else
+ snmp_log(LOG_ERR, "Unable to create pci access method\n");
+ #endif
+ }
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/net-snmp/net-snmp.spec?r1=1.183&r2=1.184&f=u
More information about the pld-cvs-commit
mailing list