commit:     0e0a18433f6c6031f05149fb52b06ccabe9b3511
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 27 07:42:08 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 27 07:42:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e0a1843

net-analyzer/net-snmp: add f2fs patch

Closes: https://bugs.gentoo.org/729224
Package-Manager: Portage-3.0.15, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../net-snmp/files/net-snmp-5.9-r3-f2fs.patch      | 40 ++++++++++++++++++++++
 ...snmp-99999999.ebuild => net-snmp-5.9-r3.ebuild} | 32 ++++++++---------
 net-analyzer/net-snmp/net-snmp-99999999.ebuild     | 27 +++++++--------
 3 files changed, 67 insertions(+), 32 deletions(-)

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 00000000000..c06c94ff7ac
--- /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 <[email protected]>
+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-99999999.ebuild 
b/net-analyzer/net-snmp/net-snmp-5.9-r3.ebuild
similarity index 92%
copy from net-analyzer/net-snmp/net-snmp-99999999.ebuild
copy to net-analyzer/net-snmp/net-snmp-5.9-r3.ebuild
index a24bf6edffd..2ded4369531 100644
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.9-r3.ebuild
@@ -2,25 +2,26 @@
 # 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
+
+inherit autotools distutils-r1 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
+       https://dev.gentoo.org/~jer/${P}.tar.xz
 "
 
 # GPL-2 for the init scripts
 LICENSE="HPND BSD GPL-2"
 SLOT="0/40"
-KEYWORDS=""
+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
@@ -29,6 +30,7 @@ REQUIRED_USE="
        python? ( ${PYTHON_REQUIRED_USE} )
        rpm? ( bzip2 zlib )
 "
+RESTRICT="test"
 
 COMMON_DEPEND="
        bzip2? ( app-arch/bzip2 )
@@ -41,7 +43,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 +58,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 +68,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
@@ -77,6 +77,7 @@ PATCHES=(
        "${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
 )
 
@@ -84,11 +85,6 @@ pkg_setup() {
        use python && python-single-r1_pkg_setup
 }
 
-src_unpack() {
-       default
-       git-r3_src_unpack
-}
-
 src_prepare() {
        # snmpconf generates config files with proper selinux context
        use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch
@@ -138,7 +134,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"
 }
 

diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild 
b/net-analyzer/net-snmp/net-snmp-99999999.ebuild
index a24bf6edffd..4a58da93c99 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"
 }
 

Reply via email to