summaryrefslogtreecommitdiff
path: root/net-analyzer/net-snmp
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/net-snmp')
-rw-r--r--net-analyzer/net-snmp/Manifest3
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.8-tinfo.patch10
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.8.ebuild197
3 files changed, 210 insertions, 0 deletions
diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
index dc9cd27b654f..4aef7c375040 100644
--- a/net-analyzer/net-snmp/Manifest
+++ b/net-analyzer/net-snmp/Manifest
@@ -2,6 +2,7 @@ AUX net-snmp-5.1.2-snmpconf-selinux.patch 189 BLAKE2B ca3ac3cc5786226ca5ed73997d
AUX net-snmp-5.7.3-include-limits.patch 578 BLAKE2B ae19f67f0e06a5010d8399e51f716cf7f2148ed9ed0737c00f195892346c2ec56985e2de9a12dbc111c98a012f591e69f6bac3d74ff8d83e36c56a9d0a21036e SHA512 47c27ac62c97a0b3ecfcfe05adeedd55436cc9cfc094a71f00df06cb5dece5f297c40fc255ad73e72a0c468a3c5f62afc98b79c0adc7d31a67813f25f1ec9415
AUX net-snmp-5.7.3-mariadb-10.2.patch 1292 BLAKE2B 6b445dd00096924b975327c948c20942be70c1797605c9af22ca0395c06d1e4129170254a4d6b1f03948c18ef5d0e88250490a601df67736fafca973f0a1f042 SHA512 43b8d39837af147edf66b322d8e75bc82acc243f9eb6bb7ab11ed2975442ee975292d61d953d862679027d5110198ee30347de6209feb2abf3a6ede8547c0de1
AUX net-snmp-5.7.3-perl524-2.patch 1776 BLAKE2B fdf872595094d83300ed950731b470db87b4cbf1eb584a109000d9af5fd329225d1d16f0509c6eabe6dae5602583f90dec7945596d912fb6137638a30d94e994 SHA512 ddd2ac301995114ea70890d89a320528e9009d9f49203ab9fa247b507e16dfa91cb517dd408290c530c1e0ca07f6ee431015958a625d68dd082d4c1e55d279ae
+AUX net-snmp-5.8-tinfo.patch 340 BLAKE2B 59b75cc89e83d59249921f92ca3b54e3a6fb943a956bb603c891a253f2d015b23ef00029d42bb799625bfd3af2eab5803474fad2dace5d2013f7004221c71e8d SHA512 94598dd39c0067a161beba68bfa09ef4c0dc09376c94a4b0b7346a718e75da173a8c9cb37349c79ec6909fb82a39552ca84b170c3f7f07927386991771b4568e
AUX snmpd.conf 552 BLAKE2B 9d2801b0ddc2148a62e332a1d355a9ddc050ec95aea2dde31f25413096c4b91dbab794c1e71b75f5baba1234d89729a6e8c50287098c04991a3eec4d9f512b3c SHA512 e64f93631e5cb2160d3fb26abb84fc74f5632d8875227d5c8dfa24809b25e8202dcf23251ea8f296aedf16298c31ce49b8e64fb6325c18775d8899a50b853bbc
AUX snmpd.init.2 680 BLAKE2B ce21b60980c2a0d74c810bb473c6b4c70eb11a2fc0636ec4af8a262ce412324ba80bc6c72b2544d359b4e2f536cf329df99e0be7d96035fa20c25f9ab7dc4a16 SHA512 10394f04dee23537a195f5aed63a3e758ca90227e269076ae9d13f883c7bd666c1c43823d1b869c43f232e97dc4138e52648cae995327f7a7f676ba416ee6fff
AUX snmpd.service 181 BLAKE2B e68aa957e78178c624faa41c93eee84dcadec817fd0b0fcba19eeded1b52d265923cfe69070d3fb71a03ba071fe10bc6b5ce0c99e3c9720521d2b37d04ce8ace SHA512 e8fe55538bf8c14ddb84c464bceddc33fdd0a03d303413783fb23d49c5d2417ead17fbcbbe460bf89738a5cff543f3ea0c7a4fd28e6f598dc9458da1d30d74ac
@@ -13,7 +14,9 @@ DIST net-snmp-5.7.3-patches-3.tar.xz 3176 BLAKE2B 1a71d6743afb841f664c6058e32c7c
DIST net-snmp-5.7.3-perl524-2.patch.gz 523 BLAKE2B 6762795cd6bcdccd5b49899cf572d5a498f3ab7fd20af69fad5f3fe45880e40f2aecfb0e9443a2a10773e25323ed5d0f271446d8fc03102e70fa8efd79e0d118 SHA512 bede47234b809d67f33c46654f3d09d0b255d835fb97eea23bfa888922dfb80ad287c305596a6b041ed03ec91dc7c647ecd54c3c79e0b4ce08978332de3cc007
DIST net-snmp-5.7.3-perl524.patch.gz 9072 BLAKE2B d870e195bccb8178827791c9bd495d5c13a8848d176ae72b1c6b54b38eabc3b5aa4842d1841f422e3a71d9e9129b2acf303e8961ce98f82f5d9310c3a65e671d SHA512 2d3184ac7c96f75af5bf8c8d23f33d5636c701e052a638e5403a8d5aa34985abc38f6a366ba09a1d8499a05fd71d939a7ed4d530661e56a726386603b6f6e6a4
DIST net-snmp-5.7.3.tar.gz 6382428 BLAKE2B df036da09658fdb4c52a99696fb6374cd582bc8da765e212285478ffb16c8725ddecd37842aba7835bc90ea74437ce00491dff569b1ce2c7499acf46968b3935 SHA512 0758bba5844cfd6c80959ac16b83906a2f830ba49fd0ab1bf9e191dc6a79d312a2e4760bd53b3e1a1c82759481f0064d088d5a3cf475d84b25679a6bd0f049bb
+DIST net-snmp-5.8.tar.gz 6591680 BLAKE2B ac1bff4152310da57818a00d752a08a7fc61d697b02479d9952ca12d024d3d68dc8bfa674571e93d6f3597605b2fe91513fb6839057a80f2c3dd8d0cce0077f2 SHA512 27895a583b23f3e14c48562bc32f3ba83513d81aa848e878be9a3650f0458d45950635c937ef627135f80b757b663e71fab9a3bde4fd91889153998ae3468fe7
EBUILD net-snmp-5.7.3-r5.ebuild 5123 BLAKE2B c6fdb0374d6860e846d4011e96e9928f6dc625d3a5fb87f241f98d9b13c2aac79c8dc6eef0d08069a4652d643c82ffc1e41af2233c815b3c0bbbf3e33b540a52 SHA512 638d77772285508a3cc2d990c1ae66e2b06be6af34e07f2a1ba6db04de6f71fb369c3c4d51ebb30eb4035776b073032a74d44093c6186adfd0d1b3ed2b239561
EBUILD net-snmp-5.7.3-r6.ebuild 5156 BLAKE2B b2b067fb782e94d50da0297bd01f31bfbfdaf0bd405385d66630494b1a597c037940ff7d982328abe40eb34355e02a689f2726b6d5f71c75f7d8055947591d7e SHA512 57771f89b6871f90d6195e12145d76e3116fd40f3c0f1aa871bdd3138026d32967e7f0d9a5eebbc7098b940be5c2a0bb06635e6402701e789c1dc35b6a3d99b7
EBUILD net-snmp-5.7.3_p3.ebuild 5221 BLAKE2B 810863641282b8a054e0f1fe587ead591a4a3ba7fa7d734b08e16856adae01e11de00e9ad06a0bfc19b17c3d0126b46ecb2a58ce5bc569c30cbe27be71160ead SHA512 f7e0564698e168a6d3365e4744d6776c70ca7a4def86740f19eef3d37f53b88fa231f6e53db004b95213ecd05098a60716b79d9f87ca7b90a44f26149d0357ac
+EBUILD net-snmp-5.8.ebuild 5232 BLAKE2B bb7c9c9b9d8e012b3af0c6420095ac33a1952f2968d467c495ea632c140b8a5a059eb49a4d2d54f5d2ede2d7998e949b84f7468886e79dca4552a3d280ecab98 SHA512 401f3df068e3fb5bd2450704653e41212f23413bba207fec095496cb7490769e25591c7f09bbc459443cf1083d1f3a70f71663fdb8a7d0f3fbcfd309904829f2
MISC metadata.xml 1142 BLAKE2B d026289018d327a888079b9c3cb7cf65dff58dd87735f7317d15d78698fe307d4dad2dfed10adab428eee0eb3abf357c82554b0861029a70fb60b82537601d84 SHA512 76efbc8444b344164960e671df273afaadbb4b64e73b136f559d4f039ee4b145f8ae989d271a8cc025edc917e4213828e0c77f6e5b0258b4c0eb9653c98c58c0
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-tinfo.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-tinfo.patch
new file mode 100644
index 000000000000..746575a9b7fb
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.8-tinfo.patch
@@ -0,0 +1,10 @@
+--- a/configure.d/config_os_libs2
++++ b/configure.d/config_os_libs2
+@@ -611,6 +611,7 @@
+ AC_CHECK_HEADERS([curses.h])
+ AC_CHECK_HEADERS([ncurses/curses.h])
+ NETSNMP_SEARCH_LIBS([endwin], [curses ncurses],,,,[LIBCURSES])
++NETSNMP_SEARCH_LIBS([cbreak], [tinfo],[LIBCURSES="$LIBCURSES -ltinfo"],,,)
+ AC_SUBST([LIBCURSES])
+
+ # libm for ceil
diff --git a/net-analyzer/net-snmp/net-snmp-5.8.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.ebuild
new file mode 100644
index 000000000000..692d3feef95c
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.8.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=yesplz
+DISTUTILS_OPTIONAL=yesplz
+WANT_AUTOMAKE=none
+PATCHSET=3
+GENTOO_DEPEND_ON_PERL=no
+
+inherit autotools distutils-r1 eutils perl-module systemd
+
+DESCRIPTION="Software for generating and retrieving SNMP data"
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="
+ mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}/${P/_p*/}.tar.gz
+ https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz
+"
+
+S=${WORKDIR}/${P/_/.}
+
+# GPL-2 for the init scripts
+LICENSE="HPND BSD GPL-2"
+SLOT="0/35"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="X bzip2 doc elf ipv6 libressl lm_sensors mfd-rewrites minimal mysql netlink pci perl python rpm selinux smux ssl tcpd ucd-compat zlib"
+
+COMMON_DEPEND="
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.6d:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ rpm? (
+ app-arch/rpm
+ dev-libs/popt
+ )
+ bzip2? ( app-arch/bzip2 )
+ zlib? ( >=sys-libs/zlib-1.1.4 )
+ elf? ( dev-libs/elfutils )
+ python? (
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ pci? ( sys-apps/pciutils )
+ lm_sensors? ( sys-apps/lm_sensors )
+ netlink? ( dev-libs/libnl:3 )
+ mysql? ( virtual/mysql )
+ perl? ( dev-lang/perl:= )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ perl? (
+ X? ( dev-perl/Tk )
+ !minimal? ( dev-perl/TermReadKey )
+ )
+ selinux? ( sec-policy/selinux-snmp )
+"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ rpm? ( bzip2 zlib )
+"
+S=${WORKDIR}/${P/_p*/}
+
+RESTRICT=test
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # snmpconf generates config files with proper selinux context
+ use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
+
+ eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
+ eapply "${FILESDIR}"/${PN}-5.8-tinfo.patch
+
+ mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die
+ mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die
+ eapply "${WORKDIR}"/patches/*.patch
+
+ eapply_user
+
+ eautoconf
+}
+
+src_configure() {
+ # keep this in the same line, configure.ac arguments are passed down to config.h
+ local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable"
+ use lm_sensors && mibs="${mibs} ucd-snmp/lmsensorsMib"
+ use smux && mibs="${mibs} smux"
+
+ # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136)
+ use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab
+
+ econf \
+ $(use_enable !ssl internal-md5) \
+ $(use_enable ipv6) \
+ $(use_enable mfd-rewrites) \
+ $(use_enable perl embedded-perl) \
+ $(use_enable ucd-compat ucd-snmp-compatibility) \
+ $(use_with bzip2) \
+ $(use_with elf) \
+ $(use_with mysql) \
+ $(use_with netlink nl) \
+ $(use_with pci) \
+ $(use_with perl perl-modules INSTALLDIRS=vendor) \
+ $(use_with python python-modules) \
+ $(use_with rpm) \
+ $(use_with ssl openssl) \
+ $(use_with tcpd libwrap) \
+ $(use_with zlib) \
+ --enable-shared --disable-static \
+ --with-default-snmp-version="3" \
+ --with-install-prefix="${D}" \
+ --with-ldflags="${LDFLAGS}" \
+ --with-logfile="/var/log/net-snmpd.log" \
+ --with-mib-modules="${mibs}" \
+ --with-persistent-directory="/var/lib/net-snmp" \
+ --with-sys-contact="root@Unknown" \
+ --with-sys-location="Unknown"
+}
+
+src_compile() {
+ for target in snmplib agent sedscript all; do
+ emake OTHERLDFLAGS="${LDFLAGS}" ${target}
+ done
+
+ use doc && emake docsdox
+}
+
+src_install () {
+ # bug #317965
+ emake -j1 DESTDIR="${D}" install
+
+ if use perl ; then
+ perl_delete_localpod
+ if ! use X; then
+ rm "${D}"/usr/bin/tkmib || die
+ fi
+ else
+ rm -f \
+ "${D}"/usr/bin/fixproc \
+ "${D}"/usr/bin/ipf-mod.pl \
+ "${D}"/usr/bin/mib2c \
+ "${D}"/usr/bin/net-snmp-cert \
+ "${D}"/usr/bin/snmp-bridge-mib \
+ "${D}"/usr/bin/snmpcheck \
+ "${D}"/usr/bin/snmpconf \
+ "${D}"/usr/bin/tkmib \
+ "${D}"/usr/bin/traptoemail \
+ "${D}"/usr/share/snmp/mib2c.perl.conf \
+ "${D}"/usr/share/snmp/snmp_perl_trapd.pl \
+ || die
+ fi
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ if use doc; then
+ docinto html
+ dodoc -r docs/html/*
+ fi
+
+ keepdir /var/lib/net-snmp
+
+ newinitd "${FILESDIR}"/snmpd.init.2 snmpd
+ newconfd "${FILESDIR}"/snmpd.conf snmpd
+
+ newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd
+ newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd
+
+ systemd_dounit "${FILESDIR}"/snmpd.service
+ systemd_dounit "${FILESDIR}"/snmptrapd.service
+
+ insinto /etc/snmp
+ newins "${S}"/EXAMPLE.conf snmpd.conf.example
+
+ # Remove everything not required for an agent.
+ # Keep only the snmpd, snmptrapd, MIBs, headers and libraries.
+ if use minimal; then
+ rm -rf \
+ "${D}"/**/*.pl \
+ "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \
+ "${D}"/usr/share/snmp/*.conf \
+ "${D}"/usr/share/snmp/snmpconf-data \
+ || die
+ fi
+
+ prune_libtool_files
+}