Accepting request 57103 from net-snmp:factory

Accepted submit request 57103 from user leonardocf

OBS-URL: https://build.opensuse.org/request/show/57103
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/net-snmp?expand=0&rev=40
This commit is contained in:
Berthold Gunreben 2011-01-05 15:01:07 +00:00 committed by Git OBS Bridge
parent 6aa2c502e4
commit 98e7159f4b
8 changed files with 26 additions and 116 deletions

View File

@ -1,4 +1,4 @@
libsnmp15
libsnmp25
arch ppc package net-snmp-devel
requires -net-snmp-<targettype>
requires "libsnmp15-<targettype> = <version>"
requires "libsnmp25-<targettype> = <version>"

View File

@ -1,102 +0,0 @@
From: Stephen Hemminger
Subject: if-mib: add support for more speeds with ethtool
Change the use of Linux ethtool interface to match current
conventions used by the ethtool utility:
* allow any reported value for speed
* use ethtool conventions for speed unknown (0 or ffff)
* if device reports unknown speed, don't call MII
* support 32 bits speed data, necessary for 100G
This is newish so need to add autoconf foo to handle it.
Submitted upstream but not yet committed:
https://sourceforge.net/tracker/?func=detail&atid=312694&aid=3057090&group_id=12694
---
agent/mibgroup/if-mib/data_access/interface_linux.c | 23 ++++++++------------
configure.d/config_os_struct_members | 11 +++++++++
include/net-snmp/net-snmp-config.h.in | 3 ++
3 files changed, 24 insertions(+), 13 deletions(-)
Index: net-snmp-5.6/agent/mibgroup/if-mib/data_access/interface_linux.c
===================================================================
--- net-snmp-5.6.orig/agent/mibgroup/if-mib/data_access/interface_linux.c
+++ net-snmp-5.6/agent/mibgroup/if-mib/data_access/interface_linux.c
@@ -802,6 +802,7 @@ netsnmp_linux_interface_get_if_speed(int
{
struct ifreq ifr;
struct ethtool_cmd edata;
+ __u32 speed;
memset(&ifr, 0, sizeof(ifr));
edata.cmd = ETHTOOL_GSET;
@@ -816,24 +817,20 @@ netsnmp_linux_interface_get_if_speed(int
return netsnmp_linux_interface_get_if_speed_mii(fd,name,defaultspeed);
}
- if (edata.speed != SPEED_10 && edata.speed != SPEED_100
-#ifdef SPEED_10000
- && edata.speed != SPEED_10000
+ speed = edata.speed;
+#if HAVE_STRUCT_ETHTOOL_CMD_SPEED_HI
+ speed |= edata.speed_hi << 16;
#endif
-#ifdef SPEED_2500
- && edata.speed != SPEED_2500
-#endif
- && edata.speed != SPEED_1000 ) {
- DEBUGMSGTL(("mibII/interfaces", "fallback to mii for %s\n",
- ifr.ifr_name));
- /* try MII */
- return netsnmp_linux_interface_get_if_speed_mii(fd,name,defaultspeed);
+ if (speed == 0 || speed == (__u16)(-1) || speed == (__u32)(-1)) {
+ DEBUGMSGTL(("mibII/interfaces", "speed is not known for %s\n",
+ ifr.ifr_name));
+ return defaultspeed;
}
/* return in bps */
DEBUGMSGTL(("mibII/interfaces", "ETHTOOL_GSET on %s speed = %d\n",
- ifr.ifr_name, edata.speed));
- return edata.speed*1000LL*1000LL;
+ ifr.ifr_name, speed));
+ return speed*1000LL*1000LL;
}
#endif
Index: net-snmp-5.6/configure.d/config_os_struct_members
===================================================================
--- net-snmp-5.6.orig/configure.d/config_os_struct_members
+++ net-snmp-5.6/configure.d/config_os_struct_members
@@ -33,6 +33,17 @@ AC_CHECK_MEMBERS([struct arphd.at_next],
#endif
]])
+
+# struct ethtool_cmd
+# Agent:
+if test "x$ac_cv_header_linux_ethtool_h" = "xyes" ; then
+ AC_CHECK_MEMBERS([struct ethtool_cmd.speed_hi],,,[[
+#if HAVE_LINUX_ETHTOOL_H
+#include <linux/ethtool.h>
+#endif
+ ]])
+fi
+
# struct des_ks_struct
# ('weak_key' indicates older version of OpenSSL)
# Library:
Index: net-snmp-5.6/include/net-snmp/net-snmp-config.h.in
===================================================================
--- net-snmp-5.6.orig/include/net-snmp/net-snmp-config.h.in
+++ net-snmp-5.6/include/net-snmp/net-snmp-config.h.in
@@ -323,6 +323,9 @@
/* Define to 1 if you have the <linux/ethtool.h> header file. */
#undef HAVE_LINUX_ETHTOOL_H
+/* Define to 1 if `speed_hi' is member of `struct ethtool_cmd'. */
+#undef HAVE_STRUCT_ETHTOOL_CMD_SPEED_HI
+
/* Define to 1 if you have the <linux/hdreg.h> header file. */
#undef HAVE_LINUX_HDREG_H

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f5cb59d1f43be786a5a923d5a946226913617b0bec9473781fe798e21a0e91f6
size 171198

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:09fd65b550cc3c4623fce66fc1cb2729571a105c3dd8c0e229413e114b61a501
size 815

3
net-snmp-5.6.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f362bdad5e58f7868dc241a7d6f3e8f054dfd5bbafbdcf7a1c2ea84e0a59a4c5
size 4281087

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:05d41dae9b81ba40d0abaefc8559814ff5c8eb41b16686335605b66898854c1f
size 4248283

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue Jan 4 11:34:19 UTC 2011 - lchiquitto@novell.com
- fix libsnmp version in baselibs.conf
-------------------------------------------------------------------
Tue Jan 4 11:26:48 UTC 2011 - lchiquitto@novell.com
- update to version 5.6.1:
new features and lots of bug fixes
- update upstream patches from branch V5-6-patches to 20110104
- remove patches that are no longer needed:
net-snmp-5.6.0-ethtool-speed.patch
-------------------------------------------------------------------
Tue Nov 30 18:09:58 UTC 2010 - lchiquitto@novell.com

View File

@ -1,5 +1,5 @@
#
# spec file for package net-snmp (Version 5.6)
# spec file for package net-snmp (Version 5.6.1)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -27,8 +27,8 @@
%define netsnmp_agentx_socket_dir_rfc /var/agentx
Name: net-snmp
Version: 5.6
Release: 3
Version: 5.6.1
Release: 1
License: BSD3c(or similar) ; MIT License (or similar)
Group: Productivity/Networking/Other
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -55,7 +55,7 @@ Source6: test_installed
Source7: net-snmp.sysconfig
Source8: net-snmp-rpmlintrc
Source9: baselibs.conf
Patch0: net-snmp-5.6.0-upstream-20101129.patch.bz2
Patch0: net-snmp-5.6.1-upstream-20110104.patch.bz2
# unused patch atm
Patch1: net-snmp-5.5.0-socket-path.patch
Patch2: net-snmp-5.5.0-testing-empty-arptable.patch
@ -64,7 +64,6 @@ Patch5: net-snmp-5.6.0-net-snmp-config-headercheck.patch
Patch6: net-snmp-5.5.0-perl-tk-warning.patch
Patch7: net-snmp-5.5.0-velocity-mib.patch
Patch9: net-snmp-5.6.0-enable-hrh-filesys.patch
Patch10: net-snmp-5.6.0-ethtool-speed.patch
#
Summary: SNMP Daemon
@ -207,7 +206,6 @@ Authors:
%patch6 -p1
%patch7 -p1
%patch9 -p1
%patch10 -p1
%build
MIBS="misc/ipfwacc ucd-snmp/diskio etherlike-mib rmon-mib velocity smux \