Mailinglist Archive: opensuse-commit (1826 mails)

< Previous Next >
commit net-snmp
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 08 Sep 2008 16:23:31 +0200
  • Message-id: <20080908142332.67B34678164@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package net-snmp
checked in at Mon Sep 8 16:23:31 CEST 2008.


--------
--- net-snmp/net-snmp.changes 2008-08-25 11:54:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/net-snmp/net-snmp.changes 2008-09-06
17:23:34.063795000 +0200
@@ -1,0 +2,20 @@
+Sat Sep 6 16:15:57 CEST 2008 - mrueckert@xxxxxxx
+
+- update to version 5.4.2
+ - [PATCH 1921861]: Avoid endless loop after truncating 64bit int
+ - Better handling of CONTAINER_INSERT failures with multiple
+ indices
+ - [PATCH 2023633]: add SCTP-MIB implementation (Linux only)
+ - suppress annoying "registration != duplicate" warning for root
+ oids
+ - Update to libtool 1.5.26
+- add net-snmp-5.4.1_perl_tk_warning.patch (bnc#392695)
+ correctly recommend installing the perl-Tk package instead of
+ referring to cpan.
+- fix Required-Stop in the init scripts
+- cleanup the spec file:
+ - moved files from the mibs package to the packages where they
+ really belong (snmpconf-data, mib2c)
+ - move mib2c from the perl package to the devel package
+
+-------------------------------------------------------------------



Old:
----
net-snmp-5.4.1.tar.bz2

New:
----
net-snmp-5.3.0.1_trap-agent-addr_v2.patch
net-snmp-5.4.1_perl_tk_warning.patch
net-snmp-5.4.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ net-snmp.spec ++++++
--- /var/tmp/diff_new_pack.f23899/_old 2008-09-08 16:22:54.000000000 +0200
+++ /var/tmp/diff_new_pack.f23899/_new 2008-09-08 16:22:54.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package net-snmp (Version 5.4.1)
+# spec file for package net-snmp (Version 5.4.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,8 +19,8 @@


Name: net-snmp
-Version: 5.4.1
-Release: 95
+Version: 5.4.2
+Release: 1
#
License: BSD 3-Clause; X11/MIT
Group: Productivity/Networking/Other
@@ -29,6 +29,11 @@
%ifnarch s390 s390x
%define with_sensors 1
%endif
+%if 0%{?suse_version} > 1020
+%define perl_requires Requires: perl-base = %{perl_version}
+%else
+%define perl_requires Requires: perl = %{perl_version}
+%endif
%define netsnmp_logfile /var/log/net-snmpd.log
%define netsnmp_agentx_socket_dir_fhs /var/run/agentx
%define netsnmp_agentx_socket_dir_rfc /var/agentx
@@ -39,6 +44,7 @@
BuildRequires: libsensors3-devel
%endif
Requires: perl-TermReadKey logrotate
+Requires: perl-SNMP = %{version}
PreReq: %insserv_prereq %fillup_prereq /sbin/chkconfig
Provides: snmp ucdsnmp
Obsoletes: snmp ucdsnmp
@@ -63,7 +69,9 @@
Patch6: net-snmp-5.1.1-pie.patch
Patch7: net-snmp-5.3_vendorperl.patch
Patch8: net-snmp-5.4_net-snmp-config_headercheck.patch
-Patch9: net-snmp-5.1.2-snmpconf-selinux.patch
+Patch9: net-snmp-5.4.1_perl_tk_warning.patch
+Patch10: net-snmp-5.1.2-snmpconf-selinux.patch
+Patch11: net-snmp-5.3.0.1_trap-agent-addr_v2.patch
#
Summary: SNMP Daemon

@@ -80,46 +88,52 @@
--------
Wes Hardaker <hardaker@xxxxxxxxxxxxxxxxxxxxx>

-%package devel
+%define library_name libsnmp15
+
+%package -n libsnmp15
License: BSD 3-Clause; X11/MIT
-Group: Development/Libraries/C and C++
-Requires: %{pkg_name} = %{version}
-Requires: openssl-devel rpm-devel tcpd-devel perl
-%if 0%{?with_sensors}
-Requires: libsensors3-devel
-%endif
+Group: Productivity/Networking/Other
+Requires: snmp-mibs = %{version}
+# we link libperl
+%perl_requires
#
-Summary: SNMP Daemon
+Summary: Shared Libraries from net-snmp

-%description devel
+%description -n libsnmp15
This package was originally based on the CMU 2.1.2.1 snmp code. It has
been greatly modified, restructured, enhanced, and fixed. It hardly
looks the same as anything that CMU has ever released. It was renamed
from cmu-snmp to ucd-snmp in 1995 and later renamed from ucd-snmp to
net-snmp in November 2000.

+This package holds the shared libraries from the net-snmp package.
+


Authors:
--------
Wes Hardaker <hardaker@xxxxxxxxxxxxxxxxxxxxx>

-%package -n libsnmp15
+%package devel
License: BSD 3-Clause; X11/MIT
-Group: Productivity/Networking/Other
-Requires: snmp-mibs = %{version}
+Group: Development/Libraries/C and C++
+Requires: %{library_name} = %{version}
+# for mib2c
+Requires: perl-SNMP = %{version}
+Requires: openssl-devel rpm-devel tcpd-devel
+%if 0%{?with_sensors}
+Requires: libsensors3-devel
+%endif
#
-Summary: Shared Libraries from net-snmp
+Summary: SNMP Daemon

-%description -n libsnmp15
+%description devel
This package was originally based on the CMU 2.1.2.1 snmp code. It has
been greatly modified, restructured, enhanced, and fixed. It hardly
looks the same as anything that CMU has ever released. It was renamed
from cmu-snmp to ucd-snmp in 1995 and later renamed from ucd-snmp to
net-snmp in November 2000.

-This package holds the shared libraries from the net-snmp package.
-


Authors:
@@ -151,11 +165,8 @@
License: GPL v2 or later
Group: Development/Libraries/Perl
Requires: %{pkg_name} = %{version}
-%if 0%{?suse_version} > 1020
-Requires: perl-base = %{perl_version}
-%else
-Requires: perl = %{perl_version}
-%endif
+Recommends: perl-Tk
+%perl_requires
#
Summary: Perl-SNMP

@@ -179,7 +190,9 @@
%patch6
%patch7
%patch8
-%patch9 -p1
+%patch9
+%patch10 -p1
+%patch11
find -name "CVS" -type d | xargs -r %{__rm} -rfv
find -name ".cvsignore" | xargs -r %{__rm} -fv
find -name "*.orig" | xargs -r %{__rm} -fv
@@ -294,9 +307,9 @@
%restart_on_update snmpd
%{insserv_cleanup}

-%post -n libsnmp15 -p /sbin/ldconfig
+%post -n %{library_name} -p /sbin/ldconfig

-%postun -n libsnmp15 -p /sbin/ldconfig
+%postun -n %{library_name} -p /sbin/ldconfig

%files
%defattr(-,root,root)
@@ -340,12 +353,16 @@
%config(noreplace) /etc/logrotate.d/net-snmp
/var/adm/fillup-templates/sysconfig.%{pkg_name}
%{netsnmp_agentx_socket_dir_rfc}
+%{_datadir}/snmp/snmpconf-data/
+%{_datadir}/snmp/snmp_perl.pl
+%{_datadir}/snmp/snmp_perl_trapd.pl

%files -n snmp-mibs
%defattr(-,root,root)
-%{_datadir}/snmp
+%dir %{_datadir}/snmp
+%{_datadir}/snmp/mibs/

-%files -n libsnmp15
+%files -n %{library_name}
%defattr(-,root,root)
%{_libdir}/libsnmp*.so.*
%{_libdir}/libnetsnmp*.so.*
@@ -360,6 +377,9 @@
%{_libdir}/libsnmp*.so
%{_libdir}/libnetsnmp*.la
%{_libdir}/libnetsnmp*.so
+%{_bindir}/mib2c
+%{_bindir}/mib2c-update
+%{_datadir}/snmp/mib2c*

%files -n perl-SNMP
%defattr(-,root,root)
@@ -370,10 +390,25 @@
%{perl_vendorarch}/NetSNMP
/var/adm/perl-modules/%{name}
%{_bindir}/tkmib
-%{_bindir}/mib2c
-%{_bindir}/mib2c-update

%changelog
+* Sat Sep 06 2008 mrueckert@xxxxxxx
+- update to version 5.4.2
+ - [PATCH 1921861]: Avoid endless loop after truncating 64bit int
+ - Better handling of CONTAINER_INSERT failures with multiple
+ indices
+ - [PATCH 2023633]: add SCTP-MIB implementation (Linux only)
+ - suppress annoying "registration != duplicate" warning for root
+ oids
+ - Update to libtool 1.5.26
+- add net-snmp-5.4.1_perl_tk_warning.patch (bnc#392695)
+ correctly recommend installing the perl-Tk package instead of
+ referring to cpan.
+- fix Required-Stop in the init scripts
+- cleanup the spec file:
+ - moved files from the mibs package to the packages where they
+ really belong (snmpconf-data, mib2c)
+ - move mib2c from the perl package to the devel package
* Mon Aug 25 2008 prusnak@xxxxxxx
- fixed wrong SELinux context (selinux.patch) [Fate#303662]
* Fri Aug 22 2008 mrueckert@xxxxxxx

++++++ baselibs.conf ++++++
--- net-snmp/baselibs.conf 2008-04-10 12:15:12.000000000 +0200
+++ /mounts/work_src_done/STABLE/net-snmp/baselibs.conf 2008-09-06
15:58:23.008292000 +0200
@@ -1,2 +1,5 @@
-net-snmp
+libsnmp15
arch ppc64 package net-snmp-devel
+ requires -net-snmp-<targettype>
+ requires "libsnmp15-<targettype> = <version>"
+

++++++ net-snmp-5.3.0.1_trap-agent-addr_v2.patch ++++++
426355: Cannot set source agent address for SNMP traps

Author: Jan Safranek <jsafrane@xxxxxxxxxx>

Introduce "v1trapaddress" snmpd config option, which defines agent address
set in SNMPv1 traps, i.e. inside the SNMPv1 TRAP-PDU, not UDP packet
source address. The agent sets arbitrary local address to the TRAP PDU
when this option is ommited.

Index: snmplib/system.c
===================================================================
--- snmplib/system.c.orig 2008-06-05 23:11:53.000000000 +0200
+++ snmplib/system.c 2008-09-06 18:04:38.784302537 +0200
@@ -77,6 +77,10 @@ SOFTWARE.
#if HAVE_NET_IF_H
#include <net/if.h>
#endif
+#if HAVE_NETDB_H
+#include <netdb.h>
+#endif
+

#if HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
@@ -825,6 +829,84 @@ get_uptime(void)
#endif /* ! WIN32 */
/*******************************************************************/

+int
+get_thisaddr(const char* name, in_addr_t *addr_out)
+{
+
+#if HAVE_GETADDRINFO
+ struct addrinfo *addrs = NULL;
+ struct addrinfo hint;
+ int err;
+
+ memset(&hint, 0, sizeof hint);
+ hint.ai_flags = 0;
+ hint.ai_family = PF_INET;
+ hint.ai_socktype = SOCK_DGRAM;
+ hint.ai_protocol = 0;
+
+ err = getaddrinfo(name, NULL, &hint, &addrs);
+ if (err != 0) {
+#if HAVE_GAI_STRERROR
+ snmp_log(LOG_ERR, "getaddrinfo: %s %s\n", name,
+ gai_strerror(err));
+#else
+ snmp_log(LOG_ERR, "getaddrinfo: %s (error %d)\n", name,
+ err);
+#endif
+ return -1;
+ }
+ if (addrs != NULL) {
+ memcpy(addr_out,
+ &((struct sockaddr_in *) addrs->ai_addr)->sin_addr,
+ sizeof(in_addr_t));
+ freeaddrinfo(addrs);
+ } else {
+ DEBUGMSGTL(("get_thisaddr",
+ "Failed to resolve IPv4 hostname\n"));
+ }
+ return 0;
+
+#elif HAVE_GETHOSTBYNAME
+ struct hostent *hp = NULL;
+
+ hp = gethostbyname(host);
+ if (hp == NULL) {
+ DEBUGMSGTL(("get_thisaddr",
+ "hostname (couldn't resolve)\n"));
+ return -1;
+ } else if (hp->h_addrtype != AF_INET) {
+ DEBUGMSGTL(("get_thisaddr",
+ "hostname (not AF_INET!)\n"));
+ return -1;
+ } else {
+ DEBUGMSGTL(("get_thisaddr",
+ "hostname (resolved okay)\n"));
+ memcpy(addr_out, hp->h_addr, sizeof(in_addr_t));
+ }
+ return 0;
+
+#elif HAVE_GETIPNODEBYNAME
+ struct hostent *hp = NULL;
+ int err;
+
+ hp = getipnodebyname(peername, AF_INET, 0, &err);
+ if (hp == NULL) {
+ DEBUGMSGTL(("get_thisaddr",
+ "hostname (couldn't resolve = %d)\n", err));
+ return -1;
+ }
+ DEBUGMSGTL(("get_thisaddr",
+ "hostname (resolved okay)\n"));
+ memcpy(addr_out, hp->h_addr, sizeof(in_addr_t));
+ return 0;
+
+#else /* HAVE_GETIPNODEBYNAME */
+ return -1;
+#endif
+}
+
+/*******************************************************************/
+
#ifndef HAVE_STRNCASECMP

/*
Index: man/snmpd.conf.5.def
===================================================================
--- man/snmpd.conf.5.def.orig 2008-08-07 11:00:04.000000000 +0200
+++ man/snmpd.conf.5.def 2008-09-06 18:04:38.788301614 +0200
@@ -641,6 +641,12 @@ Ordinarily the corresponding MIB
object (\fCsnmpEnableAuthenTraps.0\fR) is read-write, but specifying
this directive makes this object read-only, and attempts to set the
value via SET requests will result in a \fInotWritable\fR error response.
+.RE
+.IP "v1trapaddress HOST"
+defines the agent address, which is inserted into SNMPv1 TRAPs. Arbitrary local
+IPv4 address is chosen if this option is ommited. This option is useful mainly
+when the agent is visible from outside world by specific address only (e.g.
+because of network address translation or firewall).
.SS "DisMan Event MIB"
The previous directives can be used to configure where traps should
be sent, but are not concerned with \fIwhen\fR to send such traps
Index: include/net-snmp/agent/ds_agent.h
===================================================================
--- include/net-snmp/agent/ds_agent.h.orig 2007-05-07 22:23:23.000000000
+0200
+++ include/net-snmp/agent/ds_agent.h 2008-09-06 18:04:38.823792310 +0200
@@ -42,6 +42,7 @@
#define NETSNMP_DS_AGENT_PERL_INIT_FILE 4 /* used by embedded perl */
#define NETSNMP_DS_SMUX_SOCKET 5 /* ip:port socket addr */
#define NETSNMP_DS_NOTIF_LOG_CTX 6 /* "" | "snmptrapd" */
+#define NETSNMP_DS_AGENT_TRAP_ADDR 7 /* used as v1 trap agent addres
*/

/*
* integers
Index: include/net-snmp/library/system.h
===================================================================
--- include/net-snmp/library/system.h.orig 2007-01-11 23:13:56.000000000
+0100
+++ include/net-snmp/library/system.h 2008-09-06 18:04:38.855791728 +0200
@@ -107,6 +107,8 @@ SOFTWARE.

#include <net-snmp/types.h> /* For definition of in_addr_t */

+ int get_thisaddr(const char* name,
+ in_addr_t *addr_out);
in_addr_t get_myaddr(void);
long get_uptime(void);

Index: agent/agent_read_config.c
===================================================================
--- agent/agent_read_config.c.orig 2008-07-24 08:53:02.000000000 +0200
+++ agent/agent_read_config.c 2008-09-06 18:04:38.880308775 +0200
@@ -243,6 +243,9 @@ init_agent_read_config(const char *app)
snmpd_free_trapcommunity,
"community-string");
#endif /* support for community based SNMP */
+ netsnmp_ds_register_config(ASN_OCTET_STR, app, "v1trapaddress",
+ NETSNMP_DS_APPLICATION_ID,
+ NETSNMP_DS_AGENT_TRAP_ADDR);
#ifdef HAVE_UNISTD_H
register_app_config_handler("agentuser",
snmpd_set_agent_user, NULL, "userid");
Index: agent/agent_trap.c
===================================================================
--- agent/agent_trap.c.orig 2007-05-18 00:16:12.000000000 +0200
+++ agent/agent_trap.c 2008-09-06 18:06:23.367792400 +0200
@@ -58,6 +58,7 @@
#include <net-snmp/utilities.h>

#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/agent/agent_trap.h>
#include <net-snmp/agent/snmp_agent.h>
#include <net-snmp/agent/agent_callbacks.h>
@@ -639,6 +640,8 @@ netsnmp_send_traps(int trap, int specifi
in_addr_t *pdu_in_addr_t;
u_long uptime;
struct trap_sink *sink;
+ const char *v1trapaddress;
+ int res;

DEBUGMSGTL(( "trap", "send_trap %d %d ", trap, specific));
DEBUGMSGOID(("trap", enterprise, enterprise_length));
@@ -792,7 +795,18 @@ netsnmp_send_traps(int trap, int specifi
* Ensure that the v1 trap PDU includes the local IP address
*/
pdu_in_addr_t = (in_addr_t *) template_v1pdu->agent_addr;
- *pdu_in_addr_t = get_myaddr();
+
+ v1trapaddress = netsnmp_ds_get_string(NETSNMP_DS_APPLICATION_ID,
+ NETSNMP_DS_AGENT_TRAP_ADDR);
+ if (v1trapaddress != NULL) {
+ /* "v1trapaddress" was specified in config, try to resolve it */
+ res = get_thisaddr(v1trapaddress, pdu_in_addr_t);
+ }
+ if (v1trapaddress == NULL || res < 0) {
+ /* "v1trapaddress" was not specified in config or the resolution
failed,
+ * try any local address */
+ *pdu_in_addr_t = get_myaddr();
+ }
}


++++++ net-snmp-5.4.1_perl_tk_warning.patch ++++++
Index: local/tkmib
===================================================================
--- local/tkmib.orig 2006-07-27 21:48:25.000000000 +0200
+++ local/tkmib 2008-06-21 01:23:34.985622311 +0200
@@ -27,10 +27,9 @@ instructions.

if (!$havetk) {
print "
-ERROR: You don't have the Tk module installed. You should be able to
-install this by running (as root):
+ERROR: You don't have the Tk module installed.

- perl -MCPAN -e 'install Tk'
+ Please install the perl-Tk package.
";
}

++++++ net-snmp-5.4.1.tar.bz2 -> net-snmp-5.4.2.tar.bz2 ++++++
++++ 77372 lines of diff (skipped)


++++++ net-snmp-rpmlintrc ++++++
--- net-snmp/net-snmp-rpmlintrc 2007-08-02 01:15:10.000000000 +0200
+++ /mounts/work_src_done/STABLE/net-snmp/net-snmp-rpmlintrc 2008-09-06
16:15:44.712291000 +0200
@@ -1,5 +1,3 @@
-addFilter("incoherent-init-script-name")
-addFilter("net-snmp-devel package-with-huge-docs")
-addFilter("net-snmp-devel files-duplicate.*")
-addFilter("net-snmp incoherent-init-script-name /etc/init.d/snmpd")
-addFilter("perl-SNMP zero-length.*")
+addFilter("net-snmp-devel.* files-duplicate.*man.*")
+addFilter("net-snmp.*incoherent-init-script-name")
+addFilter("perl-SNMP.* zero-length.*\.bs")


++++++ rc.net-snmp ++++++
--- net-snmp/rc.net-snmp 2008-08-22 16:19:25.000000000 +0200
+++ /mounts/work_src_done/STABLE/net-snmp/rc.net-snmp 2008-09-04
17:56:22.763791000 +0200
@@ -7,8 +7,10 @@
#
### BEGIN INIT INFO
# Provides: net-snmp snmp
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
+# Required-Start: $remote_fs
+# Should-Start: $syslog $network
+# Required-Stop: $remote_fs
+# Should-Stop: $syslog $network
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: Net-SNMP snmpd

++++++ rc.snmptrapd ++++++
--- net-snmp/rc.snmptrapd 2008-08-22 16:18:43.000000000 +0200
+++ /mounts/work_src_done/STABLE/net-snmp/rc.snmptrapd 2008-09-04
17:56:35.063791000 +0200
@@ -7,8 +7,8 @@
#
### BEGIN INIT INFO
# Provides: snmpdtrapd
-# Required-Start: $network $remote_fs
-# Required-Stop: $network $remote_fs
+# Required-Start: $network
+# Required-Stop: $network
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: start net-snmptrapd





++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread