summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Jackson <mjolnir@gentoo.org>2007-11-08 12:51:12 +0000
committerMartin Jackson <mjolnir@gentoo.org>2007-11-08 12:51:12 +0000
commitdf776c90809b9b0e568a9379f61f9ba97fcf0455 (patch)
tree72db8f713a5f154e6c815e3e81027f22401e5717 /net-analyzer
parentMarked ~ppc (diff)
downloadhistorical-df776c90809b9b0e568a9379f61f9ba97fcf0455.tar.gz
historical-df776c90809b9b0e568a9379f61f9ba97fcf0455.tar.bz2
historical-df776c90809b9b0e568a9379f61f9ba97fcf0455.zip
Add patch and bump net-snmp-5.4 for 198346
Package-Manager: portage-2.1.3.16
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/net-snmp/ChangeLog8
-rw-r--r--net-analyzer/net-snmp/Manifest19
-rw-r--r--net-analyzer/net-snmp/files/digest-net-snmp-5.4-r13
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-maxreps.patch122
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.4-r1.ebuild177
5 files changed, 324 insertions, 5 deletions
diff --git a/net-analyzer/net-snmp/ChangeLog b/net-analyzer/net-snmp/ChangeLog
index ed6d44d4a242..4cba038d577b 100644
--- a/net-analyzer/net-snmp/ChangeLog
+++ b/net-analyzer/net-snmp/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-analyzer/net-snmp
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.154 2007/09/07 03:57:29 mjolnir Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.155 2007/11/08 12:51:11 mjolnir Exp $
+
+ 08 Nov 2007; Martin Jackson <mjolnir@gentoo.org>
+ +files/net-snmp-maxreps.patch, +net-snmp-5.4-r1.ebuild:
+ Add maxreps patch from upstream, to fix #198346
+
+*net-snmp-5.4-r1 (07 Nov 2007)
07 Sep 2007; Martin Jackson <mjolnir@gentoo.org> net-snmp-5.4.1-r1.ebuild:
Add dep on setuptools to fix #191504
diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
index fab3af8c3ed5..3a15d9aa42ea 100644
--- a/net-analyzer/net-snmp/Manifest
+++ b/net-analyzer/net-snmp/Manifest
@@ -38,6 +38,10 @@ AUX net-snmp-lm_sensors.patch 13686 RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed
MD5 25d92c9a7adcbb80240a914a8f6bbfe5 files/net-snmp-lm_sensors.patch 13686
RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed194 files/net-snmp-lm_sensors.patch 13686
SHA256 51dc2363a687d9f4e65b0a59e767b33129d07623a0b4da07b685e406d2576b86 files/net-snmp-lm_sensors.patch 13686
+AUX net-snmp-maxreps.patch 5495 RMD160 a1a958f292f780f5c4f8ec66a4ec350f261d3214 SHA1 2ed58bb7c1136452532909154a1cb2c2f322467d SHA256 5e37133da687d84cb06eea7899e1be23d9613be1d24f43e8e8555577f3d47da7
+MD5 d12c1aa77ee79717e2dba9ecc058f67c files/net-snmp-maxreps.patch 5495
+RMD160 a1a958f292f780f5c4f8ec66a4ec350f261d3214 files/net-snmp-maxreps.patch 5495
+SHA256 5e37133da687d84cb06eea7899e1be23d9613be1d24f43e8e8555577f3d47da7 files/net-snmp-maxreps.patch 5495
AUX snmpd-5.1.conf 606 RMD160 a243da5c9dfde4a5cfb16bd7d4491cedb7879620 SHA1 5c7c45a434cb566cfec678050384f9ab6af912a9 SHA256 f569766eb6ca203a0c9549b2592d6f36ae4999cfaabc423cad5a864201a86ac9
MD5 ed2e953a9a923caec45eeca95bec2efc files/snmpd-5.1.conf 606
RMD160 a243da5c9dfde4a5cfb16bd7d4491cedb7879620 files/snmpd-5.1.conf 606
@@ -88,6 +92,10 @@ EBUILD net-snmp-5.3.1.ebuild 5465 RMD160 712d65e44b544ee053e9d9c3eebe11abdee5720
MD5 3728bf98cd75eaca47041b4153193d72 net-snmp-5.3.1.ebuild 5465
RMD160 712d65e44b544ee053e9d9c3eebe11abdee57203 net-snmp-5.3.1.ebuild 5465
SHA256 7cda7dfdf97b13e1978b7e03256d0ca61eda8e414e6833e4f79139af39a8fbba net-snmp-5.3.1.ebuild 5465
+EBUILD net-snmp-5.4-r1.ebuild 5112 RMD160 fdb14428f6113d1c02100120bcb29eb4e1149b41 SHA1 8a0206f664517047994916fa2221c53a1d81f8ea SHA256 be3d3c3d27e5d1d6a09a24e897773e8c0fac430ffc2efb83cffe74621495007d
+MD5 3ad7d62e5eba760fe114dc205ec8bc7b net-snmp-5.4-r1.ebuild 5112
+RMD160 fdb14428f6113d1c02100120bcb29eb4e1149b41 net-snmp-5.4-r1.ebuild 5112
+SHA256 be3d3c3d27e5d1d6a09a24e897773e8c0fac430ffc2efb83cffe74621495007d net-snmp-5.4-r1.ebuild 5112
EBUILD net-snmp-5.4.1-r1.ebuild 5675 RMD160 6fe7c407e16b70b4910464bde03c9ea3bdd961f6 SHA1 ff1b66afdb31b6aae55e9131019e2eb66b6663e5 SHA256 adf02c50a8efcebbc75efefba62ba66f0b41ab1aff3cf1a129f5aa7675345d34
MD5 ec0b96a7e9552ec3c9c84fa4a2f3ade5 net-snmp-5.4.1-r1.ebuild 5675
RMD160 6fe7c407e16b70b4910464bde03c9ea3bdd961f6 net-snmp-5.4.1-r1.ebuild 5675
@@ -100,10 +108,10 @@ EBUILD net-snmp-5.4.ebuild 4980 RMD160 0644c9f896aad2319b6118a0197b1e5e1bf9dbae
MD5 b364b3ea366405299dd623556f0cac96 net-snmp-5.4.ebuild 4980
RMD160 0644c9f896aad2319b6118a0197b1e5e1bf9dbae net-snmp-5.4.ebuild 4980
SHA256 ca149d10943ae6cb71d0485fa939bb6d6ed0636f084948b03a91c0266a67b333 net-snmp-5.4.ebuild 4980
-MISC ChangeLog 25109 RMD160 75f30fe722e8461de068397335e339dd518f9190 SHA1 ec814e66d297d126ce93e258c49141a693d8c2f3 SHA256 d23d20917854798a5cab2c65fad80807c01cfe548367b279ccefe32627d506d9
-MD5 a4a5e95a2edbb59d7a145568369f6fb0 ChangeLog 25109
-RMD160 75f30fe722e8461de068397335e339dd518f9190 ChangeLog 25109
-SHA256 d23d20917854798a5cab2c65fad80807c01cfe548367b279ccefe32627d506d9 ChangeLog 25109
+MISC ChangeLog 25301 RMD160 47c223900452fbbf1e50ae6d25cfc491ee93c741 SHA1 56e832d06d9069e57682c99adca251ec7101d7ac SHA256 b34d19c81043a4e7f3d9abef50c6fd3ae863d594fb8b8db55ab668b69f976c27
+MD5 da6eae062644b60a655ab38d28584e12 ChangeLog 25301
+RMD160 47c223900452fbbf1e50ae6d25cfc491ee93c741 ChangeLog 25301
+SHA256 b34d19c81043a4e7f3d9abef50c6fd3ae863d594fb8b8db55ab668b69f976c27 ChangeLog 25301
MISC metadata.xml 160 RMD160 2738573ec519cbef4b293bc132f7dd9d02291137 SHA1 29b8b234e0f3a475b50bd4df1ef8b4e5749823ce SHA256 39e232fc7ec88ca0b077cb3950cb39d15cd990842b88d5bfe14f02f34d72f37b
MD5 637389da071d8ee0c0292695525bc29f metadata.xml 160
RMD160 2738573ec519cbef4b293bc132f7dd9d02291137 metadata.xml 160
@@ -126,6 +134,9 @@ SHA256 57af851df7613f792fa9dac8cec68746943eb997c4b19589733df8a6a8176709 files/di
MD5 0340885b6d1fa55330e5b6cbce6694d5 files/digest-net-snmp-5.4 241
RMD160 7a8010ebb09ad5848ffdf5714a0f0ac7e3feaaff files/digest-net-snmp-5.4 241
SHA256 ab88014a897e9738bad61e22a24d7689c091e04d4510d283fa2163920ef2f1a0 files/digest-net-snmp-5.4 241
+MD5 0340885b6d1fa55330e5b6cbce6694d5 files/digest-net-snmp-5.4-r1 241
+RMD160 7a8010ebb09ad5848ffdf5714a0f0ac7e3feaaff files/digest-net-snmp-5.4-r1 241
+SHA256 ab88014a897e9738bad61e22a24d7689c091e04d4510d283fa2163920ef2f1a0 files/digest-net-snmp-5.4-r1 241
MD5 2e34b0d7a577176cbcf6ef8d902718fb files/digest-net-snmp-5.4.1 247
RMD160 eea7a4c51416de3c43bcf3c2404be5affd3f6118 files/digest-net-snmp-5.4.1 247
SHA256 2f2084a65a62043ef1cb434c7ed0717ed22310fa0bd3225946c19b7fb6864ecb files/digest-net-snmp-5.4.1 247
diff --git a/net-analyzer/net-snmp/files/digest-net-snmp-5.4-r1 b/net-analyzer/net-snmp/files/digest-net-snmp-5.4-r1
new file mode 100644
index 000000000000..2141580dd27e
--- /dev/null
+++ b/net-analyzer/net-snmp/files/digest-net-snmp-5.4-r1
@@ -0,0 +1,3 @@
+MD5 46d893281056ff476e597659cb91574d net-snmp-5.4.tar.gz 5031685
+RMD160 8ad1f9a3def8022eea48d9b74ae71d8efb59ca61 net-snmp-5.4.tar.gz 5031685
+SHA256 2f43cd6f3c4066f8c17fdc47931a96c1fce808c9d1dd74bcb5a79d9d29d5f947 net-snmp-5.4.tar.gz 5031685
diff --git a/net-analyzer/net-snmp/files/net-snmp-maxreps.patch b/net-analyzer/net-snmp/files/net-snmp-maxreps.patch
new file mode 100644
index 000000000000..7d9627deaad5
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-maxreps.patch
@@ -0,0 +1,122 @@
+Index: man/snmpd.conf.5.def
+===================================================================
+--- man/snmpd.conf.5.def (revision 16338)
++++ man/snmpd.conf.5.def (working copy)
+@@ -71,6 +71,28 @@
+ .IP "leave_pidfile yes"
+ instructs the agent to not remove its pid file on shutdown. Equivalent to
+ specifying "-U" on the command line.
++.IP "maxGetbulkRepeats NUM"
++Sets the maximum number of responses allowed for a single variable in
++a getbulk request. Set to 0 to enable the default and set it to -1 to
++enable unlimited. Because memory is allocated ahead of time, sitting
++this to unlimited is not considered safe if your user population can
++not be trusted. A repeat number greater than this will be truncated
++to this value.
++.IP
++This is set by default to -1.
++.IP "maxGetbulkResponses NUM"
++Sets the maximum number of responses allowed for a getbulk request.
++This is set by default to 100. Set to 0 to enable the default and set
++it to -1 to enable unlimited. Because memory is allocated ahead of
++time, sitting this to unlimited is not considered safe if your user
++population can not be trusted.
++.IP
++In general, the total number of responses will not be allowed to
++exceed the maxGetbulkResponses number and the total number returned
++will be an integer multiple of the number of variables requested times
++the calculated number of repeats allow to fit below this number.
++.IP
++Also not that processing of maxGetbulkRepeats is handled first.
+ .SS SNMPv3 Configuration
+ SNMPv3 requires an SNMP agent to define a unique "engine ID"
+ in order to respond to SNMPv3 requests.
+Index: include/net-snmp/agent/ds_agent.h
+===================================================================
+--- include/net-snmp/agent/ds_agent.h (revision 16338)
++++ include/net-snmp/agent/ds_agent.h (working copy)
+@@ -59,5 +59,7 @@
+ #define NETSNMP_DS_AGENT_CACHE_TIMEOUT 10 /* default cache timeout */
+ #define NETSNMP_DS_AGENT_INTERNAL_VERSION 11 /* used by internal queries */
+ #define NETSNMP_DS_AGENT_INTERNAL_SECLEVEL 12 /* used by internal queries */
++#define NETSNMP_DS_AGENT_MAX_GETBULKREPEATS 13 /* max getbulk repeats */
++#define NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES 14 /* max getbulk respones */
+
+ #endif
+Index: agent/agent_read_config.c
+===================================================================
+--- agent/agent_read_config.c (revision 16338)
++++ agent/agent_read_config.c (working copy)
+@@ -258,6 +258,12 @@
+ netsnmp_ds_register_config(ASN_BOOLEAN, app, "dontLogTCPWrappersConnects",
+ NETSNMP_DS_APPLICATION_ID,
+ NETSNMP_DS_AGENT_DONT_LOG_TCPWRAPPERS_CONNECTS);
++ netsnmp_ds_register_config(ASN_INTEGER, app, "maxGetbulkRepeats",
++ NETSNMP_DS_APPLICATION_ID,
++ NETSNMP_DS_AGENT_MAX_GETBULKREPEATS);
++ netsnmp_ds_register_config(ASN_INTEGER, app, "maxGetbulkResponses",
++ NETSNMP_DS_APPLICATION_ID,
++ NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES);
+ netsnmp_init_handler_conf();
+
+ #include "agent_module_dot_conf.h"
+Index: agent/snmp_agent.c
+===================================================================
+--- agent/snmp_agent.c (revision 16338)
++++ agent/snmp_agent.c (working copy)
+@@ -2156,7 +2156,6 @@
+ * getbulk prep
+ */
+ int count = count_varbinds(asp->pdu->variables);
+-
+ if (asp->pdu->errstat < 0) {
+ asp->pdu->errstat = 0;
+ }
+@@ -2173,8 +2172,37 @@
+ r = 0;
+ asp->bulkcache = NULL;
+ } else {
++ int numresponses;
++ int maxbulk =
++ netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID,
++ NETSNMP_DS_AGENT_MAX_GETBULKREPEATS);
++ int maxresponses =
++ netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID,
++ NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES);
++
++ if (maxresponses == 0)
++ maxresponses = 100; /* more than reasonable default */
++
++ if (maxbulk == 0)
++ maxbulk = -1;
++
++ /* limit getbulk number of repeats to a configured size */
++ if (asp->pdu->errindex > maxbulk && maxbulk != -1) {
++ asp->pdu->errindex = maxbulk;
++ }
++
++ numresponses = asp->pdu->errindex * r;
++
++ /* limit getbulk number of getbulk responses to a configured size */
++ if (maxresponses != -1 && numresponses > maxresponses) {
++ /* attempt to truncate this */
++ asp->pdu->errindex = maxresponses/r;
++ numresponses = asp->pdu->errindex * r;
++ DEBUGMSGTL(("snmp_agent", "truncating number of getbulk repeats to %d\n", asp->pdu->errindex));
++ }
++
+ asp->bulkcache =
+- (netsnmp_variable_list **) malloc(asp->pdu->errindex * r *
++ (netsnmp_variable_list **) malloc(numresponses *
+ sizeof(struct
+ varbind_list *));
+ if (!asp->bulkcache) {
+@@ -2184,6 +2212,8 @@
+ }
+ DEBUGMSGTL(("snmp_agent", "GETBULK N = %d, M = %d, R = %d\n",
+ n, asp->pdu->errindex, r));
++ fprintf(stderr, "GETBULK N = %d, M = %d, R = %d\n",
++ n, asp->pdu->errindex, r);
+ }
+
+ /*
diff --git a/net-analyzer/net-snmp/net-snmp-5.4-r1.ebuild b/net-analyzer/net-snmp/net-snmp-5.4-r1.ebuild
new file mode 100644
index 000000000000..d9a40517c88e
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.4-r1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.4-r1.ebuild,v 1.1 2007/11/08 12:51:11 mjolnir Exp $
+
+inherit fixheadtails flag-o-matic perl-module
+
+DESCRIPTION="Software for generating and retrieving SNMP data"
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="as-is BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="diskio doc elf ipv6 lm_sensors mfd-rewrites minimal perl rpm selinux smux ssl tcpd X sendmail"
+
+DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ rpm? (
+ app-arch/rpm
+ dev-libs/popt
+ app-arch/bzip2
+ >=sys-libs/zlib-1.1.4
+ )
+ elf? ( dev-libs/elfutils )
+ lm_sensors? ( sys-apps/lm_sensors )"
+
+RDEPEND="${DEPEND}
+ perl? (
+ X? ( dev-perl/perl-tk )
+ !minimal? ( dev-perl/TermReadKey )
+ )
+ selinux? ( sec-policy/selinux-snmpd )"
+
+DEPEND="${DEPEND}
+ >=sys-apps/sed-4
+ doc? ( app-doc/doxygen )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-makefile.patch
+
+# For #198346 - from upstream. Commited 5/7/2007, so 5.4.1+ not affected
+ epatch "${FILESDIR}"/${PN}-maxreps.patch
+
+# The lm_sensors patch has a memory leak
+# If you can help, please attach a patch to bug 109785
+
+# if use lm_sensors; then
+# if use x86 || use amd64; then
+# epatch "${FILESDIR}"/${PN}-lm_sensors.patch
+# else
+# eerror "Unfortunatly you are trying to enable lm_sensors support for an unsupported arch."
+# eerror "please check the availability of sys-apps/lm_sensors - if it is available on"
+# eerror "your arch, please file a bug about this."
+# die "lm_sensors patch error: unsupported arch."
+# fi
+# fi
+
+ # fix access violation in make check
+ sed -i -e 's/\(snmpd.*\)-Lf/\1-l/' testing/eval_tools.sh || \
+ die "sed eval_tools.sh failed"
+ # fix path in fixproc
+ sed -i -e 's|\(database_file =.*\)/local\(.*\)$|\1\2|' local/fixproc || \
+ die "sed fixproc failed"
+
+ ht_fix_all
+}
+
+src_compile() {
+ local mibs
+
+ strip-flags
+
+ # filter for bug #145960
+ # as it seems that the option is not enough
+ filter-ldflags -Wl,--as-needed
+
+ mibs="host ucd-snmp/dlmod"
+ use smux && mibs="${mibs} smux"
+ use sendmail && mibs="${mibs} mibII/mta_sendmail"
+ use lm_sensors && mibs="${mibs} ucd-snmp/lmSensors"
+ use diskio && mibs="${mibs} ucd-snmp/diskio"
+
+ econf \
+ --with-install-prefix="${D}" \
+ --with-sys-location="Unknown" \
+ --with-sys-contact="root@Unknown" \
+ --with-default-snmp-version="3" \
+ --with-mib-modules="${mibs}" \
+ --with-logfile="/var/log/net-snmpd.log" \
+ --with-persistent-directory="/var/lib/net-snmp" \
+ --enable-ucd-snmp-compatibility \
+ --enable-shared \
+ --enable-as-needed \
+ $(use_enable mfd-rewrites) \
+ $(use_enable perl embedded-perl) \
+ $(use_enable ipv6) \
+ $(use_enable !ssl internal-md5) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd libwrap) \
+ $(use_with rpm) \
+ $(use_with rpm bzip2) \
+ $(use_with rpm zlib) \
+ $(use_with elf) \
+ || die "econf failed"
+
+ emake -j1 || die "emake failed"
+
+ if use perl ; then
+ emake perlmodules || die "compile perl modules problem"
+ fi
+
+ if use doc ; then
+ einfo "Building HTML Documentation"
+ make docsdox || die "failed to build docs"
+ fi
+}
+
+src_test() {
+ cd testing
+ if ! make test ; then
+ echo
+ einfo "Don't be alarmed if a few tests FAIL."
+ einfo "This could happen for several reasons:"
+ einfo " - You don't already have a working configuration."
+ einfo " - Your ethernet interface isn't properly configured."
+ echo
+ fi
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die "make install failed"
+
+ if use perl ; then
+ make DESTDIR="${D}" perlinstall || die "make perlinstall failed"
+ fixlocalpod
+
+ use X || rm -f "${D}/usr/bin/tkmib"
+ else
+ rm -f "${D}/usr/bin/mib2c" "${D}/usr/bin/tkmib" "${D}/usr/bin/snmpcheck"
+ fi
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ use doc && dohtml docs/html/*
+
+ keepdir /etc/snmp /var/lib/net-snmp
+
+ newinitd "${FILESDIR}"/snmpd.rc7 snmpd
+ newconfd "${FILESDIR}"/snmpd.conf snmpd
+
+ newinitd "${FILESDIR}"/snmptrapd.rc7 snmptrapd
+ newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
+
+ # Remove everything, keeping only the snmpd, snmptrapd, MIBs, libs, and includes.
+ if use minimal; then
+ elog "USE=minimal is set. Cleaning up excess cruft for a embedded/minimal/server only install."
+ rm -rf
+ "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,snmpcheck}}
+ rm -rf "${D}"/usr/share/snmp/snmpconf-data "${D}"/usr/share/snmp/*.conf
+ rm -rf "${D}"/usr/bin/{fixproc,traptoemail} "${D}"/usr/bin/snmpc{heck,onf}
+ find "${D}" -name '*.pl' -exec rm -f '{}' \;
+ use ipv6 || rm -rf "${D}"/usr/share/snmp/mibs/IPV6*
+ fi
+
+ # bug 113788, install example config
+ insinto /etc/snmp
+ newins "${S}"/EXAMPLE.conf snmpd.conf.example
+}
+
+pkg_postinst() {
+ elog "An example configuration file has been installed in"
+ elog "/etc/snmp/snmpd.conf.example."
+}