summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2018-08-20 10:39:51 +0200
committerJeroen Roovers <jer@gentoo.org>2018-08-20 10:40:07 +0200
commitdf805fdf5bdd562ea0537747d130aea6fd7950cc (patch)
tree3d5be3e1d5056423a0f353e0c1f19539656616ad
parentdev-libs/libmateweather: fix invalid dev-libs/glib[$PYTHON_USEDEP] deps (diff)
downloadgentoo-df805fdf5bdd562ea0537747d130aea6fd7950cc.tar.gz
gentoo-df805fdf5bdd562ea0537747d130aea6fd7950cc.tar.bz2
gentoo-df805fdf5bdd562ea0537747d130aea6fd7950cc.zip
net-analyzer/net-snmp: Version 5.8.
Package-Manager: Portage-2.3.47, Repoman-2.3.10
-rw-r--r--net-analyzer/net-snmp/Manifest1
-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, 208 insertions, 0 deletions
diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
index ed66e710bb7b..c95764cf911e 100644
--- a/net-analyzer/net-snmp/Manifest
+++ b/net-analyzer/net-snmp/Manifest
@@ -3,3 +3,4 @@ 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
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..e1ec5eaa5ea6
--- /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"
+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
+}