Package: net-snmp Version: 5.4.1~dfsg-12 Severity: important Tags: patch
Coin,The following patch deactivate IPv6 support, which is not supported on Hurd yet. It also deactivate a few modules, as collecting the host/routing/... information on Hurd is not that simple, as the information is not centralized, and there is no working solution yet. We'll reactivate those features as soon as a proper solution is available, but in the time being this package is blocking plenty of other packages having SNMP as _optional_ feature, so we'd like to unblock them. With the following patch the snmpd daemon is fully working even if it has not much information to give.
Please note that part of this patch is a fix of the upstream code, as deactivating the mibII module should also deactivate all of its functions, but the VACM config calls are not, thus creating a build failure. So this part is absolutely not Hurd specific.
Regards. -- Marc Dequènes (Duck)
diff -Nur orig/net-snmp-5.4.1~dfsg/debian/changelog net-snmp-5.4.1~dfsg/debian/changelog --- orig/net-snmp-5.4.1~dfsg/debian/changelog 2009-05-23 20:37:47.000000000 +0200 +++ net-snmp-5.4.1~dfsg/debian/changelog 2009-05-22 21:38:53.000000000 +0200 @@ -1,3 +1,11 @@ +net-snmp (5.4.1~dfsg-12+hurdfr1) unreleased; urgency=low + + * Added '56_vacm_missing_dependency_check.patch' patch to avoid using + VACM config features when mibII is disabled. + * Adapted configure options to what is really supported on Hurd. + + -- Marc Dequènes (Duck) <d...@hurdfr.org> Fri, 22 May 2009 21:38:48 +0200 + net-snmp (5.4.1~dfsg-12) unstable; urgency=high * Urgency high because of RC bug fix. diff -Nur orig/net-snmp-5.4.1~dfsg/debian/patches/56_snmpd_read_update_config_fix.README net-snmp-5.4.1~dfsg/debian/patches/56_snmpd_read_update_config_fix.README --- orig/net-snmp-5.4.1~dfsg/debian/patches/56_snmpd_read_update_config_fix.README 1970-01-01 01:00:00.000000000 +0100 +++ net-snmp-5.4.1~dfsg/debian/patches/56_snmpd_read_update_config_fix.README 2009-05-22 18:05:36.000000000 +0200 @@ -0,0 +1 @@ +Do not call vacm_standard_views() if the corresponding module was not compiled. diff -Nur orig/net-snmp-5.4.1~dfsg/debian/patches/56_vacm_missing_dependency_check.patch net-snmp-5.4.1~dfsg/debian/patches/56_vacm_missing_dependency_check.patch --- orig/net-snmp-5.4.1~dfsg/debian/patches/56_vacm_missing_dependency_check.patch 1970-01-01 01:00:00.000000000 +0100 +++ net-snmp-5.4.1~dfsg/debian/patches/56_vacm_missing_dependency_check.patch 2009-05-22 18:42:07.000000000 +0200 @@ -0,0 +1,53 @@ +--- ./agent/agent_read_config.c.orig 2009-05-22 18:02:55.000000000 +0200 ++++ ./agent/agent_read_config.c 2009-05-22 18:03:08.000000000 +0200 +@@ -279,7 +279,9 @@ + snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, + SNMPD_CALLBACK_PRE_UPDATE_CONFIG, NULL); + free_config(); ++#ifdef USING_MIBII_VACM_CONF_MODULE + vacm_standard_views(0,0,NULL,NULL); ++#endif + read_configs(); + } + +--- ./apps/snmptrapd.c.orig 2009-05-22 18:28:02.000000000 +0200 ++++ ./apps/snmptrapd.c 2009-05-22 18:28:33.000000000 +0200 +@@ -1477,7 +1477,9 @@ + trapd_update_config(void) + { + free_config(); ++#ifdef USING_MIBII_VACM_CONF_MODULE + vacm_standard_views(0,0,NULL,NULL); ++#endif + read_configs(); + } + +--- ./apps/snmptrapd_auth.c.orig 2009-05-22 18:39:45.000000000 +0200 ++++ ./apps/snmptrapd_auth.c 2009-05-22 18:41:45.000000000 +0200 +@@ -32,8 +32,10 @@ + netsnmp_trapd_auth); + traph->authtypes = TRAP_AUTH_NONE; + ++#ifdef USING_MIBII_VACM_CONF_MODULE + /* register our configuration tokens for VACM configs */ + init_vacm_config_tokens(); ++#endif + + /* register a config token for turning off the authorization entirely */ + netsnmp_ds_register_config(ASN_BOOLEAN, "snmptrapd", "disableAuthorization", +@@ -109,6 +111,7 @@ + return NETSNMPTRAPD_HANDLER_FINISH; + } + ++#ifdef USING_MIBII_VACM_CONF_MODULE + /* check the pdu against each typo of VACM access we may want to + check up on later. We cache the results for future lookup on + each call to netsnmp_trapd_check_auth */ +@@ -125,6 +128,7 @@ + } + } + DEBUGMSGTL(("snmptrapd:auth", "Final bitmask auth: %x\n", ret)); ++#endif + + if (ret) { + /* we have policy to at least do "something". Remember and continue. */ diff -Nur orig/net-snmp-5.4.1~dfsg/debian/rules net-snmp-5.4.1~dfsg/debian/rules --- orig/net-snmp-5.4.1~dfsg/debian/rules 2009-05-23 20:37:47.000000000 +0200 +++ net-snmp-5.4.1~dfsg/debian/rules 2009-05-23 20:51:36.000000000 +0200 @@ -15,6 +15,7 @@ include/net-snmp/net-snmp-config.h.in MIB_MODULES = host smux ucd-snmp/dlmod +EXCL_MIB_MODULES = PYVERS=$(shell pyversions -vr) @@ -28,6 +29,10 @@ DEB_DH_GENCONTROL_ARGS=-- -Vos-specific-dev="libkvm-dev" endif endif +ifeq (gnu,$(DEB_BUILD_GNU_SYSTEM)) +IPV6 = --disable-ipv6 +EXCL_MIB_MODULES += host mibII +endif DEB_AUTO_UPDATE_LIBTOOL = pre DEB_AUTO_UPDATE_ACLOCAL = 1.9 @@ -46,6 +51,7 @@ --without-dmalloc --without-efence --without-rsaref \ --with-sys-contact="root" --with-sys-location="Unknown" \ --with-mib-modules="$(MIB_MODULES)" \ + --with-out-mib-modules="$(EXCL_MIB_MODULES)" \ --enable-mfd-rewrites \ --with-mnttab=/etc/mtab \ --with-defaults
pgpBD5tEyNamL.pgp
Description: PGP Digital Signature