diff options
-rw-r--r-- | net-analyzer/net-snmp/Manifest | 4 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/net-snmp-5.7.3-mariadb-10.2.patch | 56 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch | 70 | ||||
-rw-r--r-- | net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild | 192 | ||||
-rw-r--r-- | net-analyzer/net-snmp/net-snmp-5.7.3-r6.ebuild | 194 | ||||
-rw-r--r-- | net-analyzer/net-snmp/net-snmp-5.7.3_p3-r1.ebuild | 198 |
6 files changed, 0 insertions, 714 deletions
diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest index c95764cf911e..bf783d7727a0 100644 --- a/net-analyzer/net-snmp/Manifest +++ b/net-analyzer/net-snmp/Manifest @@ -1,6 +1,2 @@ -DIST net-snmp-5.7.3-patches-2.tar.xz 3312 BLAKE2B 9cf2b3b5ec2f65dc8c017565666c148acb42354f8a03274f67c856fea530df27877026aa2c0477d90cd2f035503e15cd48c33b449a9522c34c9dca370f7ed7a6 SHA512 22ca6cc4dd1fd58a8cff53881d248155dbfdab765e9a3664320c8c4a5cfa35e741adfb0304bb38be7719ba1c7418f9b0f9178719951b82d70257c3c944c450ad DIST net-snmp-5.7.3-patches-3.tar.xz 3176 BLAKE2B 1a71d6743afb841f664c6058e32c7c411af62b0f36acd3bb9251804893ed12f462a0c5bab828e309eeec7824def2dca8fa866350b90a62ec4f0df1141b51ecae SHA512 d8a91b9668320a1e19d062eb86dd4d16beb7c2d15ac7ebbb9d2a4bd298af39bbb0a2613504dbb0057cccdec731f08f2308c5a15395e1fbc29bb0611ed8aca636 -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.7.3-mariadb-10.2.patch b/net-analyzer/net-snmp/files/net-snmp-5.7.3-mariadb-10.2.patch deleted file mode 100644 index dea1a0178531..000000000000 --- a/net-analyzer/net-snmp/files/net-snmp-5.7.3-mariadb-10.2.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/apps/snmptrapd_sql.c -+++ b/apps/snmptrapd_sql.c -@@ -54,6 +54,7 @@ - #include <my_sys.h> - #include <mysql.h> - #include <errmsg.h> -+#include <mysql_version.h> - - netsnmp_feature_require(container_fifo) - -@@ -437,6 +438,7 @@ netsnmp_mysql_init(void) - return -1; - } - -+#if MYSQL_VERSION_ID < 100000 - #ifdef HAVE_BROKEN_LIBMYSQLCLIENT - my_init(); - #else -@@ -445,6 +447,7 @@ netsnmp_mysql_init(void) - - /** load .my.cnf values */ - load_defaults ("my", _sql.groups, ¬_argc, ¬_argv); -+#endif - for(i=0; i < not_argc; ++i) { - if (NULL == not_argv[i]) - continue; -@@ -542,6 +545,10 @@ netsnmp_mysql_init(void) - return -1; - } - -+#if MYSQL_VERSION_ID > 100000 -+ mysql_options(_sql.conn, MYSQL_READ_DEFAULT_GROUP, "snmptrapd"); -+#endif -+ - /** try to connect; we'll try again later if we fail */ - (void) netsnmp_mysql_connect(); - ---- a/apps/snmptrapd_sql.c -+++ b/apps/snmptrapd_sql.c -@@ -50,11 +50,16 @@ - #undef PACKAGE_STRING - #undef PACKAGE_TARNAME - #undef PACKAGE_VERSION -+#ifdef HAVE_BROKEN_LIBMYSQLCLIENT -+#include <mysql.h> -+#include <errmsg.h> -+#else - #include <my_global.h> - #include <my_sys.h> - #include <mysql.h> - #include <errmsg.h> - #include <mysql_version.h> -+#endif - - netsnmp_feature_require(container_fifo) - diff --git a/net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch b/net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch deleted file mode 100644 index 45855597a867..000000000000 --- a/net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- a/perl/ASN/Makefile.PL -+++ b/perl/ASN/Makefile.PL -@@ -1,3 +1,4 @@ -+package ASN; - use ExtUtils::MakeMaker; - require 5; - use Config; ---- a/perl/AnyData_SNMP/Makefile.PL -+++ b/perl/AnyData_SNMP/Makefile.PL -@@ -1,3 +1,4 @@ -+package AnyData_SNMP; - use ExtUtils::MakeMaker; - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. ---- a/perl/OID/Makefile.PL -+++ b/perl/OID/Makefile.PL -@@ -1,3 +1,4 @@ -+package OID; - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. - ---- a/perl/SNMP/Makefile.PL -+++ b/perl/SNMP/Makefile.PL -@@ -1,3 +1,4 @@ -+package SNMP; - use ExtUtils::MakeMaker; - require 5; - use Config; ---- a/perl/TrapReceiver/Makefile.PL -+++ b/perl/TrapReceiver/Makefile.PL -@@ -1,3 +1,4 @@ -+package TrapReceiver; - use ExtUtils::MakeMaker; - require 5; - use Config; ---- a/perl/agent/Makefile.PL -+++ b/perl/agent/Makefile.PL -@@ -1,3 +1,4 @@ -+package agent; - use ExtUtils::MakeMaker; - require 5; - use Config; ---- a/perl/agent/Support/Makefile.PL -+++ b/perl/agent/Support/Makefile.PL -@@ -1,3 +1,4 @@ -+package agent_Support; - use ExtUtils::MakeMaker; - require 5; - use Config; ---- a/perl/agent/default_store/Makefile.PL -+++ b/perl/agent/default_store/Makefile.PL -@@ -1,3 +1,4 @@ -+package agent_default_store; - use ExtUtils::MakeMaker; - require 5; - use Config; ---- a/perl/default_store/Makefile.PL -+++ b/perl/default_store/Makefile.PL -@@ -1,3 +1,4 @@ -+package default_store; - use ExtUtils::MakeMaker; - require 5; - use Config; ---- a/perl/manager/Makefile.PL -+++ b/perl/manager/Makefile.PL -@@ -1,3 +1,4 @@ -+package manager; - use ExtUtils::MakeMaker; - # See lib/ExtUtils/MakeMaker.pm for details of how to influence - # the contents of the Makefile that is written. diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild deleted file mode 100644 index 8d923fa28d7b..000000000000 --- a/net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild +++ /dev/null @@ -1,192 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -PYTHON_COMPAT=( python2_7 ) -DISTUTILS_SINGLE_IMPL=yesplz -DISTUTILS_OPTIONAL=yesplz -WANT_AUTOMAKE=none -PATCHSET=2 -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}.tar.gz - https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-${PATCHSET}.tar.xz - https://dev.gentoo.org/~dilfridge/distfiles/${P}-perl524.patch.gz - https://dev.gentoo.org/~dilfridge/distfiles/${P}-perl524-2.patch.gz -" - -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 ) -" - -RESTRICT=test - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # snmpconf generates config files with proper selinux context - use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch - - epatch "${WORKDIR}"/${P}-perl524.patch - epatch "${WORKDIR}"/${P}-perl524-2.patch - epatch "${FILESDIR}"/${PN}-5.7.3-include-limits.patch - - epatch "${WORKDIR}"/patches/*.patch - - epatch_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 - - use doc && dohtml docs/html/* - - 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 -} diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3-r6.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3-r6.ebuild deleted file mode 100644 index 060479915394..000000000000 --- a/net-analyzer/net-snmp/net-snmp-5.7.3-r6.ebuild +++ /dev/null @@ -1,194 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -PYTHON_COMPAT=( python2_7 ) -DISTUTILS_SINGLE_IMPL=yesplz -DISTUTILS_OPTIONAL=yesplz -WANT_AUTOMAKE=none -PATCHSET=2 -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}.tar.gz - https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-${PATCHSET}.tar.xz - https://dev.gentoo.org/~dilfridge/distfiles/${P}-perl524.patch.gz - https://dev.gentoo.org/~dilfridge/distfiles/${P}-perl524-2.patch.gz -" - -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 ) -" - -RESTRICT=test - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - # snmpconf generates config files with proper selinux context - use selinux && epatch "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch - - epatch "${WORKDIR}"/${P}-perl524.patch - epatch "${WORKDIR}"/${P}-perl524-2.patch - epatch "${FILESDIR}"/${PN}-5.7.3-include-limits.patch - - epatch "${WORKDIR}"/patches/*.patch - - epatch_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 - - use doc && dohtml docs/html/* - - 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 -} diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3_p3-r1.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3_p3-r1.ebuild deleted file mode 100644 index 4add1e5486bb..000000000000 --- a/net-analyzer/net-snmp/net-snmp-5.7.3_p3-r1.ebuild +++ /dev/null @@ -1,198 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# 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-${PV/*_p/}.tar.xz - https://dev.gentoo.org/~dilfridge/distfiles/${P/_p*/}-perl524.patch.gz -" - -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? ( dev-db/mysql-connector-c:0= ) - 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 "${WORKDIR}"/${PN}-5.7.3-perl524.patch - eapply "${FILESDIR}"/${PN}-5.7.3-perl524-2.patch - eapply "${FILESDIR}"/${PN}-5.7.3-mariadb-10.2.patch - eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch - - 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 -} |