From d99093fb4bb5652015c06274d64083daa2439e4f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 3 Mar 2021 10:28:17 +0000 Subject: gentoo resync : 03.03.2021 --- net-analyzer/net-snmp/Manifest | 4 +- .../net-snmp/files/net-snmp-5.9-r3-f2fs.patch | 40 ++++ net-analyzer/net-snmp/net-snmp-5.9-r3.ebuild | 213 +++++++++++++++++++++ net-analyzer/net-snmp/net-snmp-99999999.ebuild | 27 ++- 4 files changed, 269 insertions(+), 15 deletions(-) create mode 100644 net-analyzer/net-snmp/files/net-snmp-5.9-r3-f2fs.patch create mode 100644 net-analyzer/net-snmp/net-snmp-5.9-r3.ebuild (limited to 'net-analyzer/net-snmp') diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest index 1a0efb72f804..e119c460756d 100644 --- a/net-analyzer/net-snmp/Manifest +++ b/net-analyzer/net-snmp/Manifest @@ -6,6 +6,7 @@ AUX net-snmp-5.8.1-mysqlclient.patch 785 BLAKE2B 932b635c9a86f5637be849713f18636 AUX net-snmp-5.8.1-net-snmp-config-libdir.patch 1395 BLAKE2B d22fa136b32cab28ffff0f9ba47f7f16823313309504bdc3d36979648d2cb697dd061c8c048e03241d897f39652b35d27db6080eab1f003dbdd9e72499bd2b83 SHA512 082b0befa290c917271acca3bfa5a6258a0712c9f1fb42990db3e4858af6be500317bc12efbd51ca3da76d53d0924e034f8d77d1be79dc1cf90f7196a7830bb8 AUX net-snmp-5.8.1-pkg-config.patch 744 BLAKE2B bdcd74073b174fdf208f44bbe17546ab5e61420927e34cb1c9ecad5a208d00b52d3577cf686baf2ffb515c28ae6caa1d88696a3ddd6fde8eeabed17170d057c0 SHA512 10a1fcc115fdf19e03ba04651cd90063b9c05a6d075a5c79bcea5074145b22c65ab5a6974aade3072349b1f3b2543fff5000467d30526d02e22762ea9af5ff86 AUX net-snmp-5.9-MakeMaker.patch 215 BLAKE2B 72b8b903d89bb7eff1dd69f9a212f6b1dcd13fcdc2a38650b3ffaadaae0ffe042bbb4ee3b2a8badb10c43f8179d405de45ff7dae42d83dc29f0929388bd0046d SHA512 2ade984435766624c2dcf3755644760d123745feaf9283f9f94230647df6fdc92cd27af7a8e144377ff17a6812b50c80d660d9a050e0a346b5260ec7963e0300 +AUX net-snmp-5.9-r3-f2fs.patch 1594 BLAKE2B 41dbc49ec2b67831e1fa0965052e3eae88140512a2584e4bfac0ae52a1c575c59c48022c1c97838e7d05a3b849c6bb85810bf208e629a57cc78a982a3b6d6a67 SHA512 067fb5d58512852deffe53ce5fe2bdb905a13e4e2add3fd7f889b8e5806e2e29eb38ac04abed5fd099355b76dd3f9b6413f973ff04be5599189decf4f8d71cf1 AUX net-snmp-99999999-tinfo.patch 280 BLAKE2B 4a762bb037beb054d6afa1d3047e9bfa9df7746bdbcbf3ee4050377deee5d4107433e983f1e443a801adcabcd7f13c71f27e14ab49b729850beeb06a096d4c2b SHA512 19c65a7f80eea80fbe88bb5653dadb46f36b4921123aa7c7874c71ab82c6b14b5331b2d697a3d273d3bf93a961b80bf0a9252d833c21f81aa6f73d7e2a4a39d7 AUX snmpd.conf 552 BLAKE2B 9d2801b0ddc2148a62e332a1d355a9ddc050ec95aea2dde31f25413096c4b91dbab794c1e71b75f5baba1234d89729a6e8c50287098c04991a3eec4d9f512b3c SHA512 e64f93631e5cb2160d3fb26abb84fc74f5632d8875227d5c8dfa24809b25e8202dcf23251ea8f296aedf16298c31ce49b8e64fb6325c18775d8899a50b853bbc AUX snmpd.init.2 680 BLAKE2B ce21b60980c2a0d74c810bb473c6b4c70eb11a2fc0636ec4af8a262ce412324ba80bc6c72b2544d359b4e2f536cf329df99e0be7d96035fa20c25f9ab7dc4a16 SHA512 10394f04dee23537a195f5aed63a3e758ca90227e269076ae9d13f883c7bd666c1c43823d1b869c43f232e97dc4138e52648cae995327f7a7f676ba416ee6fff @@ -16,5 +17,6 @@ AUX snmptrapd.service 190 BLAKE2B 6994e2f82e0ba03b31c2f079844a23c0070ff70726dd3c DIST net-snmp-5.7.3-patches-3.tar.xz 3176 BLAKE2B 1a71d6743afb841f664c6058e32c7c411af62b0f36acd3bb9251804893ed12f462a0c5bab828e309eeec7824def2dca8fa866350b90a62ec4f0df1141b51ecae SHA512 d8a91b9668320a1e19d062eb86dd4d16beb7c2d15ac7ebbb9d2a4bd298af39bbb0a2613504dbb0057cccdec731f08f2308c5a15395e1fbc29bb0611ed8aca636 DIST net-snmp-5.9.tar.xz 4082580 BLAKE2B 9dfd5a7dfe4ca18b16c71c9f5cb70c540d16aa36a0b2dacd3ddc465934f96ac473f77490af78d202bf6dad4eddea5d75665a770df74132aafda39f5f3a87d835 SHA512 3f1e27caa8e5306d451b61b08c2daf007929a850661962fcd29b528a80332a980184303a7e87c96d8d2774181758889dc825cb08e3c3b353c5e7ca1ebcc09173 EBUILD net-snmp-5.9-r2.ebuild 5667 BLAKE2B 002d2abbfe7c999dd14df3f36d2068cb846498fa582116c5ae7656a494dd69fb208f0d52590e47aaa3ab96edc3635cc3942f6be3d2881ff62b7b28e28cdb3cc0 SHA512 f39979dabbb37cac0d6c318c3205ed8b6fafba80ef392a2f21ab31cdd931e708287b6f38f2220f6c105ece8073e6f0d11e2c585d6ca27a0edc089bbadd26dd2e -EBUILD net-snmp-99999999.ebuild 5667 BLAKE2B 2a1d78c1425552a505acc9b0252f07cb69e43d0c682c72b49e13cb356d09fa7da1bec0988fe68731990592fc6b9daeb55457221af4a1997a01f626175ec2392d SHA512 5611a026169cedb8a5659817b9fc2464ec2081374d2c177990ada057aff6aecb3d2051084b24a319b0be4b53ce16c6608a96723211ec9aee116afe85097d6cb2 +EBUILD net-snmp-5.9-r3.ebuild 5702 BLAKE2B 5f85c9eb2eb0e2fec3bff02f7aa822ab9c2b5bdd12a4305ce582b3de383b7944b5b48ba2b3b1f8434870e4401eda360cd20da281e12ff6e9f7e83a0952decf39 SHA512 c28204e6bb8831cd2ac5bbe5718799251fb18d5d573a55aded2ab4c6682e7551b622e53fdbc93c1fdb9f30b2c276fc055b01167bfc2ebc0e3af1d2dbd31a9566 +EBUILD net-snmp-99999999.ebuild 5642 BLAKE2B c42d9d6d4fb53bccf863a4d6a7fe0882c3ae28365ac55e2de52e211d4aa7dcb0460e385fa5faff980dbee1bc0048f225828ec3409825c30ea1d69b37befb2d06 SHA512 816497802a2b8f07edc0307b0a31dfddac946c23bbd1861357306e2aa13aefab181d2f2250970299bcfb446b03db72b1d745d0d318103af294d230c3a1de2601 MISC metadata.xml 1296 BLAKE2B 76a0264baf629293eac4127e3dbaf167b5af236e53e0de9cb1c65869242d13e6d5f3c90d47856d5f8c63eba34661698637dd7da56b307d9e6e07403bf91df320 SHA512 ff45396992b1804f3774bd532438b8e64327dfa71c109cde9073f6a5a17f6c3dcc2ba1278359fa10d5eb00c3ead0368706d29178466e9b8586b66e0219d7e4b0 diff --git a/net-analyzer/net-snmp/files/net-snmp-5.9-r3-f2fs.patch b/net-analyzer/net-snmp/files/net-snmp-5.9-r3-f2fs.patch new file mode 100644 index 000000000000..c06c94ff7ace --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.9-r3-f2fs.patch @@ -0,0 +1,40 @@ +https://bugs.gentoo.org/729224 +https://github.com/net-snmp/net-snmp/commit/5a18e300bd085c6ba5967d7b00cc3f57fe83f665 + +From 5a18e300bd085c6ba5967d7b00cc3f57fe83f665 Mon Sep 17 00:00:00 2001 +From: Bart Van Assche +Date: Thu, 8 Oct 2020 20:12:44 -0700 +Subject: [PATCH] HOST-RESOURCES-MIB: Add support for f2fs + +See also https://github.com/net-snmp/net-snmp/issues/111 . +--- + agent/mibgroup/hardware/fsys/fsys_mntent.c | 1 + + agent/mibgroup/hardware/fsys/mnttypes.h | 3 +++ + 2 files changed, 4 insertions(+) + +diff --git a/agent/mibgroup/hardware/fsys/fsys_mntent.c b/agent/mibgroup/hardware/fsys/fsys_mntent.c +index abdc63ed6..75e2782f7 100644 +--- a/agent/mibgroup/hardware/fsys/fsys_mntent.c ++++ b/agent/mibgroup/hardware/fsys/fsys_mntent.c +@@ -146,6 +146,7 @@ _fsys_type( char *typename ) + !strcmp(typename, MNTTYPE_CVFS) || + !strcmp(typename, MNTTYPE_SIMFS) || + !strcmp(typename, MNTTYPE_BTRFS) || ++ !strcmp(typename, MNTTYPE_F2FS) || + !strcmp(typename, MNTTYPE_ZFS) || + !strcmp(typename, MNTTYPE_NVMFS) || + !strcmp(typename, MNTTYPE_ACFS) || +diff --git a/agent/mibgroup/hardware/fsys/mnttypes.h b/agent/mibgroup/hardware/fsys/mnttypes.h +index cda42420d..3540cf31b 100644 +--- a/agent/mibgroup/hardware/fsys/mnttypes.h ++++ b/agent/mibgroup/hardware/fsys/mnttypes.h +@@ -154,6 +154,9 @@ + #ifndef MNTTYPE_BTRFS + #define MNTTYPE_BTRFS "btrfs" + #endif ++#ifndef MNTTYPE_F2FS ++#define MNTTYPE_F2FS "f2fs" ++#endif + #ifndef MNTTYPE_ZFS + #define MNTTYPE_ZFS "zfs" + #endif diff --git a/net-analyzer/net-snmp/net-snmp-5.9-r3.ebuild b/net-analyzer/net-snmp/net-snmp-5.9-r3.ebuild new file mode 100644 index 000000000000..2ded43695310 --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.9-r3.ebuild @@ -0,0 +1,213 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_OPTIONAL=yes +DISTUTILS_SINGLE_IMPL=yes +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python3_{7,8,9} ) +WANT_AUTOMAKE=none + +inherit autotools distutils-r1 perl-module systemd + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://www.net-snmp.org/" +SRC_URI=" + https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz + https://dev.gentoo.org/~jer/${P}.tar.xz +" + +# GPL-2 for the init scripts +LICENSE="HPND BSD GPL-2" +SLOT="0/40" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE=" + X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql + netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib +" +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + rpm? ( bzip2 zlib ) +" +RESTRICT="test" + +COMMON_DEPEND=" + bzip2? ( app-arch/bzip2 ) + elf? ( dev-libs/elfutils ) + lm-sensors? ( sys-apps/lm-sensors ) + mysql? ( dev-db/mysql-connector-c:0= ) + netlink? ( dev-libs/libnl:3 ) + pcap? ( net-libs/libpcap ) + pci? ( sys-apps/pciutils ) + perl? ( dev-lang/perl:= ) + python? ( + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_USEDEP}] + ') + ${PYTHON_DEPS} + ) + rpm? ( + app-arch/rpm + dev-libs/popt + ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6d:0= ) + libressl? ( dev-libs/libressl:= ) + ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + zlib? ( >=sys-libs/zlib-1.1.4 ) +" +BDEPEND="doc? ( app-doc/doxygen )" +DEPEND="${COMMON_DEPEND}" +RDEPEND=" + ${COMMON_DEPEND} + perl? ( + X? ( dev-perl/Tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmp ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-5.7.3-include-limits.patch + "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch + "${FILESDIR}"/${PN}-5.8-pcap.patch + "${FILESDIR}"/${PN}-5.8.1-pkg-config.patch + "${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch + "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch + "${FILESDIR}"/${PN}-5.9-MakeMaker.patch + "${FILESDIR}"/${PN}-5.9-r3-f2fs.patch + "${FILESDIR}"/${PN}-99999999-tinfo.patch +) + +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 + + 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 + + default + + 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 kmem kmem-usage) \ + $(use_with mysql) \ + $(use_with netlink nl) \ + $(use_with pcap) \ + $(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) \ + --disable-static \ + --enable-shared \ + --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() { + emake sedscript + + local subdir + for subdir in snmplib agent/mibgroup agent apps .; do + emake OTHERLDFLAGS="${LDFLAGS}" -C ${subdir} all + done + + use doc && emake docsdox +} + +src_install() { + # bug #317965 + emake -j1 DESTDIR="${D}" install + + use python && python_optimize + + 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 + + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-99999999.ebuild index a24bf6edffd7..4a58da93c990 100644 --- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild +++ b/net-analyzer/net-snmp/net-snmp-99999999.ebuild @@ -2,34 +2,35 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -DISTUTILS_OPTIONAL=yesplz -DISTUTILS_SINGLE_IMPL=yesplz + +DISTUTILS_OPTIONAL=yes +DISTUTILS_SINGLE_IMPL=yes GENTOO_DEPEND_ON_PERL=no -PATCHSET=3 PYTHON_COMPAT=( python3_{7,8,9} ) WANT_AUTOMAKE=none + inherit autotools distutils-r1 git-r3 perl-module systemd DESCRIPTION="Software for generating and retrieving SNMP data" HOMEPAGE="http://www.net-snmp.org/" EGIT_REPO_URI="https://github.com/net-snmp/net-snmp" -SRC_URI=" - https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz -" +SRC_URI="https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz" # GPL-2 for the init scripts LICENSE="HPND BSD GPL-2" SLOT="0/40" -KEYWORDS="" IUSE=" X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib " + REQUIRED_USE=" python? ( ${PYTHON_REQUIRED_USE} ) rpm? ( bzip2 zlib ) " +RESTRICT="test" + COMMON_DEPEND=" bzip2? ( app-arch/bzip2 ) elf? ( dev-libs/elfutils ) @@ -41,7 +42,7 @@ COMMON_DEPEND=" perl? ( dev-lang/perl:= ) python? ( $(python_gen_cond_dep ' - dev-python/setuptools[${PYTHON_MULTI_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] ') ${PYTHON_DEPS} ) @@ -56,10 +57,8 @@ COMMON_DEPEND=" tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) zlib? ( >=sys-libs/zlib-1.1.4 ) " -DEPEND=" - ${COMMON_DEPEND} - doc? ( app-doc/doxygen ) -" +BDEPEND="doc? ( app-doc/doxygen )" +DEPEND="${COMMON_DEPEND}" RDEPEND=" ${COMMON_DEPEND} perl? ( @@ -68,7 +67,7 @@ RDEPEND=" ) selinux? ( sec-policy/selinux-snmp ) " -RESTRICT=test + PATCHES=( "${FILESDIR}"/${PN}-5.7.3-include-limits.patch "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch @@ -138,7 +137,7 @@ src_configure() { --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-contact="root@unknown" \ --with-sys-location="Unknown" } -- cgit v1.2.3