bump patch

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1562 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2009-10-17 05:31:09 +00:00
parent fb070df65b
commit 79a12a36fd
7 changed files with 1663 additions and 0 deletions

View File

@ -1,3 +1,4 @@
AUX CVE-2008-6123.patch 867 RMD160 1e8b6521ae0955681493c1ba594eb0344183e147 SHA1 3742c405fab9ac829acc93383bc39ba5b39962e9 SHA256 31a9b72b252582cd84e7f673b670ebbd2153dc719894aa668a48b24d6ba516f6
AUX net-snmp-5.1.2-snmpconf-selinux.patch 286 RMD160 c78fd9d2a563ebafd21aa85a582b989a805eb645 SHA1 159990e855cfeb50ac3657d1b97eda181d4ffb9e SHA256 70b4bdaa243efd5ae5703b3272063314fc56b6e2333f7c650b635ddab141f874 AUX net-snmp-5.1.2-snmpconf-selinux.patch 286 RMD160 c78fd9d2a563ebafd21aa85a582b989a805eb645 SHA1 159990e855cfeb50ac3657d1b97eda181d4ffb9e SHA256 70b4bdaa243efd5ae5703b3272063314fc56b6e2333f7c650b635ddab141f874
AUX net-snmp-5.4-exec-crash.patch 567 RMD160 fe110ace0ae451a8cf25d18d4133fb0d85dcaf5c SHA1 4a4538958e4c805981e1f0da4d6f1980a03aeab6 SHA256 2c4d3d281380d394d0d349c37839bb89f3d82d3e1c43513e042d24126441741c AUX net-snmp-5.4-exec-crash.patch 567 RMD160 fe110ace0ae451a8cf25d18d4133fb0d85dcaf5c SHA1 4a4538958e4c805981e1f0da4d6f1980a03aeab6 SHA256 2c4d3d281380d394d0d349c37839bb89f3d82d3e1c43513e042d24126441741c
AUX net-snmp-5.4-makefile.patch 597 RMD160 90f8e6db0a05fd21c06e98b65b4bbd377f931fe9 SHA1 2ff51b2ab2df2224dd34ca1af16430fbf0b97927 SHA256 fd8c6ceda9c5d99cd92f81a7977d2134960ee14fac3ab9f1f8c6d03c6a69edb1 AUX net-snmp-5.4-makefile.patch 597 RMD160 90f8e6db0a05fd21c06e98b65b4bbd377f931fe9 SHA1 2ff51b2ab2df2224dd34ca1af16430fbf0b97927 SHA256 fd8c6ceda9c5d99cd92f81a7977d2134960ee14fac3ab9f1f8c6d03c6a69edb1
@ -7,17 +8,22 @@ AUX net-snmp-5.4.1-incorrect-hrFSStorageIndex.patch 16053 RMD160 1d33a23b165946f
AUX net-snmp-5.4.1-ipAddressTable-crash-with-double-free.patch 4740 RMD160 305f962976c6afc39b0ee37706f34d05ea768874 SHA1 93b806c407048cba4f5c63137df1e819c83d0010 SHA256 0872a11f48106f1a2a9c4a8a894abe31b04ee607bdfd44b8207c8e659213ef31 AUX net-snmp-5.4.1-ipAddressTable-crash-with-double-free.patch 4740 RMD160 305f962976c6afc39b0ee37706f34d05ea768874 SHA1 93b806c407048cba4f5c63137df1e819c83d0010 SHA256 0872a11f48106f1a2a9c4a8a894abe31b04ee607bdfd44b8207c8e659213ef31
AUX net-snmp-5.4.1-perl-asneeded.patch 1219 RMD160 caced600c35165603069e62a17a664d7a0180586 SHA1 89bedb2424d65176a9bfba8c9b318b1d50b5b3ed SHA256 42640b545363cd5c6c7eef6b17b10c1d256e189ceb7b7c874baa4041de24e151 AUX net-snmp-5.4.1-perl-asneeded.patch 1219 RMD160 caced600c35165603069e62a17a664d7a0180586 SHA1 89bedb2424d65176a9bfba8c9b318b1d50b5b3ed SHA256 42640b545363cd5c6c7eef6b17b10c1d256e189ceb7b7c874baa4041de24e151
AUX net-snmp-5.4.1-process-count-race.patch 1489 RMD160 221f218270b83afec95d1efd260109b8baf05626 SHA1 3986f4789c145dd7182bf5f7d94a1cda0504ce5c SHA256 74a6e001de7a855079be988dd0cb23190095082e1a9adaefb9a9cac677ffa116 AUX net-snmp-5.4.1-process-count-race.patch 1489 RMD160 221f218270b83afec95d1efd260109b8baf05626 SHA1 3986f4789c145dd7182bf5f7d94a1cda0504ce5c SHA256 74a6e001de7a855079be988dd0cb23190095082e1a9adaefb9a9cac677ffa116
AUX net-snmp-5.4.1-sensors3-version_detect.patch 1391 RMD160 eba5c1cba2fc5d0484143eb4b41f656f5f72bee4 SHA1 8c8ebcc9e4725e91cc7b07cdd45cbcf6e2ed806e SHA256 e18f7bd358c4f587793f9e9250489200d2708b50529dfe222f04b71617fa1e59
AUX net-snmp-5.4.1-sensors3.patch 48401 RMD160 9899c587eb252cf9edac758133a420ef0307c315 SHA1 cd5adc2fab5c1d58c8a318d34aa3fcd4fd25c455 SHA256 e74e06a5f23350a2851fdc9f419335767d898ec66dd809e1c0413e39034d6f53
AUX net-snmp-5.4.1-suppresssuppress-annoying.patch 800 RMD160 aa23a30241ae64aeed6a08a630326fd7c2e0f9fe SHA1 2b99c56d1f659f324c5676d48ab257ea3b55467f SHA256 f5249b782079be96256ab6e7a0d398c04dfbcabffa7f4c716fe1abd39897aabe AUX net-snmp-5.4.1-suppresssuppress-annoying.patch 800 RMD160 aa23a30241ae64aeed6a08a630326fd7c2e0f9fe SHA1 2b99c56d1f659f324c5676d48ab257ea3b55467f SHA256 f5249b782079be96256ab6e7a0d398c04dfbcabffa7f4c716fe1abd39897aabe
AUX net-snmp-5.4.1.1-rpm5-1.patch 2258 RMD160 e29716d03c86874579c1fb2f3edafd5867991286 SHA1 3a403ef15bb2edf151531b5fd291df6937ef216e SHA256 ad958fcf18565930e428027e6ea60546865947b149255b2e166e9fe2a8726ee5 AUX net-snmp-5.4.1.1-rpm5-1.patch 2258 RMD160 e29716d03c86874579c1fb2f3edafd5867991286 SHA1 3a403ef15bb2edf151531b5fd291df6937ef216e SHA256 ad958fcf18565930e428027e6ea60546865947b149255b2e166e9fe2a8726ee5
AUX net-snmp-lm_sensors.patch 13686 RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed194 SHA1 3e795339fc93306a4d662feeaa16faca2509a058 SHA256 51dc2363a687d9f4e65b0a59e767b33129d07623a0b4da07b685e406d2576b86 AUX net-snmp-lm_sensors.patch 13686 RMD160 b2e67c6f5a5347442fbaa97c9ce209f1d9bed194 SHA1 3e795339fc93306a4d662feeaa16faca2509a058 SHA256 51dc2363a687d9f4e65b0a59e767b33129d07623a0b4da07b685e406d2576b86
AUX rpm514-netsnmp-5.4.1.1.patch 11813 RMD160 de2ed34c72280d2da308a0f1e0b293d51f2c391c SHA1 5856bc7531c40e7b9be267b5cd117d6ddf7dc043 SHA256 801039ba6a484fe83c7e1940e4227fccafe4c7cf1962f9fcda01e70869abaa28 AUX rpm514-netsnmp-5.4.1.1.patch 11813 RMD160 de2ed34c72280d2da308a0f1e0b293d51f2c391c SHA1 5856bc7531c40e7b9be267b5cd117d6ddf7dc043 SHA256 801039ba6a484fe83c7e1940e4227fccafe4c7cf1962f9fcda01e70869abaa28
AUX snmpd.conf 598 RMD160 c72a20fe6d4682ceea533587762782d62906b630 SHA1 51ebdca93c68ca04b7f402fad4f504422ec2c6cf SHA256 1f4f07b831c3227588fd546423137ed5c60a602fbee13b0d66edd801e4e7d598 AUX snmpd.conf 598 RMD160 c72a20fe6d4682ceea533587762782d62906b630 SHA1 51ebdca93c68ca04b7f402fad4f504422ec2c6cf SHA256 1f4f07b831c3227588fd546423137ed5c60a602fbee13b0d66edd801e4e7d598
AUX snmpd.init 1054 RMD160 6cc814d19524e1899b4bb9539ee9752304451bc9 SHA1 ed2b1a4bd7da84ca6294c0df66cace2e7c0ffe72 SHA256 824ae327db4d76fe4cdc882f06ac989e510ee1ee96c90137ab84bc18446ba8b6
AUX snmpd.rc7 706 RMD160 137d85e5f2b7cae62e214141aabcec495777007e SHA1 8d94d3bb2d3b43e20604030dc585c735685cf99b SHA256 93337ebeac92ec0073c896db0a4384beebf84ee17365bdc2594285fd33ac7dfe AUX snmpd.rc7 706 RMD160 137d85e5f2b7cae62e214141aabcec495777007e SHA1 8d94d3bb2d3b43e20604030dc585c735685cf99b SHA256 93337ebeac92ec0073c896db0a4384beebf84ee17365bdc2594285fd33ac7dfe
AUX snmptrapd.conf 635 RMD160 aba7b7196835bd359174156a527e13188f76e248 SHA1 0d296caa01c789455c3cd4c67cd81aca5547681d SHA256 902d73cb44446df060bf20e0c8ef0f8815d5b846f96d93894913d3309a3841b3 AUX snmptrapd.conf 635 RMD160 aba7b7196835bd359174156a527e13188f76e248 SHA1 0d296caa01c789455c3cd4c67cd81aca5547681d SHA256 902d73cb44446df060bf20e0c8ef0f8815d5b846f96d93894913d3309a3841b3
AUX snmptrapd.init 624 RMD160 799faf488a62bc219d3765ed6d6283ca7764ad1c SHA1 1fdef5a0a29f181c2df31b9d7adc4d4ebb8b018c SHA256 0e6dae4ca0213be9f9311c8dacdf36e7fea05150db48d15660506d53abda5a39
AUX snmptrapd.rc7 557 RMD160 e67117fbcb0a6f8668cb1abbc8fcfcb548ebfdb5 SHA1 dcaac6c0f9e086e49f653f100e0c3f9a7f65db1d SHA256 3594345cdf3c9a5a04073ec11a54e4a19881b27288cdbf22874cca5d0a0f624c AUX snmptrapd.rc7 557 RMD160 e67117fbcb0a6f8668cb1abbc8fcfcb548ebfdb5 SHA1 dcaac6c0f9e086e49f653f100e0c3f9a7f65db1d SHA256 3594345cdf3c9a5a04073ec11a54e4a19881b27288cdbf22874cca5d0a0f624c
DIST net-snmp-5.4.1.1.tar.gz 5123861 RMD160 870b6a3e4eb28df3cbdf0df34d23f46bd7de8961 SHA1 cfeef748f242a7b25ad8eea95977ff277984e368 SHA256 b22ecb5e7f0907c20cc7fc9f1e1f31b1b4b2dd81abdc3e2e0bfddf8d060008a2 DIST net-snmp-5.4.1.1.tar.gz 5123861 RMD160 870b6a3e4eb28df3cbdf0df34d23f46bd7de8961 SHA1 cfeef748f242a7b25ad8eea95977ff277984e368 SHA256 b22ecb5e7f0907c20cc7fc9f1e1f31b1b4b2dd81abdc3e2e0bfddf8d060008a2
DIST net-snmp-5.4.2.1.tar.gz 5185390 RMD160 2148c42d486ed88f9cfc3ca1d50c68abcd7e3d63 SHA1 4f2df9ea62344fe840f493d0e08abe5de3697862 SHA256 11a8baf167f7bfff60d2590e050991400a3a082923dbcdbf85e0e0ce46eb247c DIST net-snmp-5.4.2.1.tar.gz 5185390 RMD160 2148c42d486ed88f9cfc3ca1d50c68abcd7e3d63 SHA1 4f2df9ea62344fe840f493d0e08abe5de3697862 SHA256 11a8baf167f7bfff60d2590e050991400a3a082923dbcdbf85e0e0ce46eb247c
EBUILD net-snmp-5.4.1.1-r1.ebuild 6268 RMD160 25fec5abaf38e6e75d14e4f939f4357b0c69303f SHA1 37fdffe833d285f3ea7aaddecfe65b02df58c831 SHA256 90f3bbdfce52ded6cae0435f7b7a703765740110562838f5be94dfdf72be8f0b EBUILD net-snmp-5.4.1.1-r1.ebuild 6268 RMD160 25fec5abaf38e6e75d14e4f939f4357b0c69303f SHA1 37fdffe833d285f3ea7aaddecfe65b02df58c831 SHA256 90f3bbdfce52ded6cae0435f7b7a703765740110562838f5be94dfdf72be8f0b
EBUILD net-snmp-5.4.2.1-r1.ebuild 5507 RMD160 cbd1e959c886c16b2f6b10b0630d9962d851feec SHA1 cc2e52453d6bef2348f4bc61389d1214a10cefe3 SHA256 458fd9137cb1f72e616e164aac6d36264c774edd845ffdf1e67f7a323253b3cd EBUILD net-snmp-5.4.2.1-r1.ebuild 5507 RMD160 cbd1e959c886c16b2f6b10b0630d9962d851feec SHA1 cc2e52453d6bef2348f4bc61389d1214a10cefe3 SHA256 458fd9137cb1f72e616e164aac6d36264c774edd845ffdf1e67f7a323253b3cd
EBUILD net-snmp-5.4.2.1-r2.ebuild 5595 RMD160 b309b1e9d039575b5150a48869c9d7d9107cd621 SHA1 1646884a4ba6105ad25b06e75158c9f0f837d530 SHA256 87b29159a16852dfbb45965f2790deb0585f2abb555f86d8ccf9f485bb4bdeb9
MISC ChangeLog 330 RMD160 f08e45d855cbc97dc85d92d8b0b623d0af5fa7dc SHA1 3bcbbb0443295101f405c034bbe35981589743a0 SHA256 00f865659c797c793f6a316b93c821f819f5ff3c36c982d23280ade6d95a5e9c MISC ChangeLog 330 RMD160 f08e45d855cbc97dc85d92d8b0b623d0af5fa7dc SHA1 3bcbbb0443295101f405c034bbe35981589743a0 SHA256 00f865659c797c793f6a316b93c821f819f5ff3c36c982d23280ade6d95a5e9c
MISC metadata.xml 674 RMD160 102cd7df943ef25f0f462f2520fa77ceac3b5680 SHA1 90b51daab27e161a48feed336a348a8ecf0865c2 SHA256 233feade72f1b013bb5b0739478ab7200727db25a1d06977d0d122862565de24 MISC metadata.xml 674 RMD160 102cd7df943ef25f0f462f2520fa77ceac3b5680 SHA1 90b51daab27e161a48feed336a348a8ecf0865c2 SHA256 233feade72f1b013bb5b0739478ab7200727db25a1d06977d0d122862565de24

View File

@ -0,0 +1,19 @@
diff -Naur snmplib.orig/snmpUDPDomain.c snmplib/snmpUDPDomain.c
--- snmplib.orig/snmpUDPDomain.c 2007-10-11 22:46:30.000000000 +0200
+++ snmplib/snmpUDPDomain.c 2009-07-10 23:41:37.000000000 +0200
@@ -104,12 +110,12 @@
char tmp[64];
to = (struct sockaddr_in *) &(addr_pair->remote_addr);
if (to == NULL) {
- sprintf(tmp, "UDP: [%s]->unknown",
+ sprintf(tmp, "UDP: unknown->[%s]",
inet_ntoa(addr_pair->local_addr));
} else {
- sprintf(tmp, "UDP: [%s]->", inet_ntoa(addr_pair->local_addr));
- sprintf(tmp + strlen(tmp), "[%s]:%hd",
+ sprintf(tmp, "UDP: [%s]:%hu->",
inet_ntoa(to->sin_addr), ntohs(to->sin_port));
+ sprintf(tmp + strlen(tmp), "[%s]", inet_ntoa(addr_pair->local_addr));
}
return strdup(tmp);
}

View File

@ -0,0 +1,56 @@
From: Gordon Malm <gengor@gentoo.org>
Detect lm_sensors version and build accordingly.
--- a/agent/mibgroup/hardware/sensors.h
+++ b/agent/mibgroup/hardware/sensors.h
@@ -1,13 +1,21 @@
config_require(hardware/sensors/hw_sensors)
#if defined(solaris)
+
# if defined(HAVE_PICL_H)
config_require(hardware/sensors/picld_sensors)
# else
config_require(hardware/sensors/kstat_sensors)
# endif
+
#else
+
+# if defined(HAVE_LMSENSORS_V2)
+config_require(hardware/sensors/lmsensors_v2)
+# else
config_require(hardware/sensors/lmsensors_v3)
+# endif
+
#endif
//config_require(hardware/sensors/dummy_sensors)
--- a/configure.in
+++ b/configure.in
@@ -1909,6 +1909,25 @@ done
AC_MSG_RESULT([$new_module_list.])
+echo " $new_module_list " | $GREP "ucd-snmp/lmsensorsMib" > /dev/null
+if test $? -eq 0 ; then
+ case $target_os in
+ linux*)
+ AC_CHECK_HEADER(sensors/sensors.h,,[AC_MSG_ERROR([asked to use lm_sensors but I couldn't find sensors/sensors.h])])
+
+ AC_MSG_CHECKING([lm_sensors version])
+ AC_EGREP_CPP(lmsensors_v2,[
+#include <sensors/sensors.h>
+#if SENSORS_API_VERSION < 0x400
+lmsensors_v2
+#endif
+ ], [AC_DEFINE([HAVE_LMSENSORS_V2], [1], [Define if lm_sensors version 2.x])]
+ have_lmsensors_ver="2.x", have_lmsensors_ver="3.x or higher")
+ AC_MSG_RESULT([$have_lmsensors_ver])
+ ;;
+ esac
+fi
+
#---------------------
# loop over module list
#

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,47 @@
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmpd.init,v 1.1 2009/10/16 08:51:05 gengor Exp $
opts="${opts} reload"
depend() {
use logger
need net
}
SNMPD_PIDFILE="${SNMPD_PIDFILE:-/var/run/snmpd.pid}"
checkconfig() {
if [ ! -e /etc/snmp/snmpd.conf ] ; then
eerror "${SVCNAME} requires an /etc/snmp/snmpd.conf configuration file"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --quiet --exec /usr/sbin/snmpd \
-- -p ${SNMPD_PIDFILE} ${SNMPD_FLAGS}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --quiet --pidfile ${SNMPD_PIDFILE}
eend $?
}
reload() {
checkconfig || return 1
if [ ! -f ${SNMPD_PIDFILE} ]; then
eerror "Cannot reload configuration, ${SVCNAME} is not running"
eend 1
return 1
fi
ebegin "Reloading ${SVCNAME} configuration"
kill -HUP $(< ${SNMPD_PIDFILE}) &>/dev/null
eend $?
}

View File

@ -0,0 +1,24 @@
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/files/snmptrapd.init,v 1.1 2009/10/16 08:51:05 gengor Exp $
depend() {
use logger
need net
}
SNMPTRAPD_PIDFILE="${SNMPTRAPD_PIDFILE:-/var/run/snmptrapd.pid}"
start() {
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --quiet --exec /usr/sbin/snmptrapd \
-- -p ${SNMPTRAPD_PIDFILE} ${SNMPTRAPD_FLAGS}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --quiet --pidfile ${SNMPTRAPD_PIDFILE}
eend $?
}

View File

@ -0,0 +1,197 @@
# Copyright 1999-2009 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.2.1-r2.ebuild,v 1.1 2009/10/16 08:51:06 gengor Exp $
EAPI=2
inherit fixheadtails flag-o-matic perl-module python autotools
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="bzip2 diskio doc elf extensible ipv6 kernel_linux lm_sensors mfd-rewrites minimal perl python rpm selinux sendmail smux ssl tcpd X zlib"
COMMON="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
)
bzip2? ( app-arch/bzip2 )
zlib? ( >=sys-libs/zlib-1.1.4 )
elf? ( dev-libs/elfutils )
lm_sensors? (
kernel_linux? ( sys-apps/lm_sensors )
)
python? ( dev-python/setuptools )"
RDEPEND="${COMMON}
perl? (
X? ( dev-perl/perl-tk )
!minimal? ( dev-perl/TermReadKey )
)
selinux? ( sec-policy/selinux-snmpd )"
# Dependency on autoconf due to bug #225893
DEPEND="${COMMON}
>=sys-devel/autoconf-2.61-r2
>=sys-apps/sed-4
doc? ( app-doc/doxygen )"
src_prepare() {
# Fix CVE-2008-6123
epatch "${FILESDIR}"/CVE-2008-6123.patch
# lm_sensors-3 support
if use lm_sensors ; then
epatch "${FILESDIR}"/${PN}-5.4.1-sensors3.patch \
"${FILESDIR}"/${PN}-5.4.1-sensors3-version_detect.patch
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"
if use python ; then
python_version
PYTHON_MODNAME="netsnmp"
PYTHON_DIR="/usr/$(get_libdir)/python${PYVER}/site-packages"
sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${D}':" Makefile.in || \
die "sed python failed"
fi
# snmpconf generates config files with proper selinux context
use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
use rpm && epatch "${FILESDIR}"/${PN}-5.4.1.1-rpm5-1.patch #202399
# Fix version number:
sed -i -e "s:NetSnmpVersionInfo = \".*\":NetSnmpVersionInfo = \"${PV}\":" snmplib/snmp_version.c
eautoreconf
ht_fix_all
}
src_configure() {
strip-flags
local mibs="host ucd-snmp/dlmod"
use diskio && mibs="${mibs} ucd-snmp/diskio"
use extensible && mibs="${mibs} ucd-snmp/extensible"
use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
use sendmail && mibs="${mibs} mibII/mta_sendmail"
use smux && mibs="${mibs} smux"
local myconf="$(use_enable ipv6) \
$(use_enable mfd-rewrites) \
$(use_enable perl embedded-perl) \
$(use_enable !ssl internal-md5) \
$(use_with elf) \
$(use_with perl perl-modules) \
$(use_with python python-modules) \
$(use_with ssl openssl) \
$(use_with tcpd libwrap)"
if use rpm ; then
myconf="${myconf} \
--with-rpm \
--with-bzip2 \
--with-zlib"
else
myconf="${myconf} \
$(use_with bzip2) \
$(use_with zlib)"
fi
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 \
${myconf}
}
src_compile() {
emake -j1 || die "emake failed"
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
fixlocalpod
use X || rm -f "${D}"/usr/bin/tkmib
else
rm -f "${D}"/usr/bin/mib2c "${D}"/usr/bin/snmpcheck "${D}"/usr/bin/tkmib
fi
dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO || die
newdoc EXAMPLE.conf.def EXAMPLE.conf || die
use doc && { dohtml docs/html/* || die ; }
keepdir /etc/snmp /var/lib/net-snmp
newinitd "${FILESDIR}"/snmpd.init snmpd || die
newconfd "${FILESDIR}"/snmpd.conf snmpd || die
newinitd "${FILESDIR}"/snmptrapd.init snmptrapd || die
newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd || die
# Remove everything not required for an agent.
# Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
if use minimal; then
elog "USE='minimal' is set. Removing excess/non-minimal components."
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 || die
}
pkg_postrm() {
use python && python_mod_cleanup
}
pkg_postinst() {
elog "An example configuration file has been installed in"
elog "/etc/snmp/snmpd.conf.example."
}