public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2017-08-26 11:33 Jeroen Roovers
  0 siblings, 0 replies; 10+ messages in thread
From: Jeroen Roovers @ 2017-08-26 11:33 UTC (permalink / raw
  To: gentoo-commits

commit:     b1e51e769ea330c59b24d3ea0f0590e2094efaf1
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 26 11:32:44 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Aug 26 11:33:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1e51e76

net-analyzer/net-snmp: Fix MySQL bindings by Peter Levine (bug #627588).

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 net-analyzer/net-snmp/Manifest                     |   1 +
 .../files/net-snmp-5.7.3-mariadb-10.2.patch        |  37 ++++
 .../net-snmp/files/net-snmp-5.7.3-perl524-2.patch  |  70 ++++++++
 net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild     | 197 +++++++++++++++++++++
 4 files changed, 305 insertions(+)

diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
index 021996c9aab..0d12b994b0e 100644
--- a/net-analyzer/net-snmp/Manifest
+++ b/net-analyzer/net-snmp/Manifest
@@ -1,4 +1,5 @@
 DIST net-snmp-5.7.3-patches-2.tar.xz 3312 SHA256 a72732f9e40988ef1d79b6750c7ef7f56accbf5a32543dd15c000e58b1e9054c SHA512 22ca6cc4dd1fd58a8cff53881d248155dbfdab765e9a3664320c8c4a5cfa35e741adfb0304bb38be7719ba1c7418f9b0f9178719951b82d70257c3c944c450ad WHIRLPOOL 509da418db4c380f431af1d2d342bea4bd18caad99f2fb8120466ffcbbe8d2e09702a28b43b59d2a633ae3566d599a82a221eae4e9ac601a545445c614d3459f
+DIST net-snmp-5.7.3-patches-3.tar.xz 3176 SHA256 0c3c307b4dc2d068d34f9743f8b8897a9dc53c19056dad809658aaedffff682d SHA512 d8a91b9668320a1e19d062eb86dd4d16beb7c2d15ac7ebbb9d2a4bd298af39bbb0a2613504dbb0057cccdec731f08f2308c5a15395e1fbc29bb0611ed8aca636 WHIRLPOOL e72cabfeada32a17e4962417466f5e19548a1ef3ab213ecb6d7865ad4f8d26f7b9a33b0c6db9996c70c947300037a0bbcae73d2793044f352bebb7849659aa49
 DIST net-snmp-5.7.3-perl524-2.patch.gz 523 SHA256 237e34a5de032c2173de836ef694583d144717b3441903a7c52f409c0038ca08 SHA512 bede47234b809d67f33c46654f3d09d0b255d835fb97eea23bfa888922dfb80ad287c305596a6b041ed03ec91dc7c647ecd54c3c79e0b4ce08978332de3cc007 WHIRLPOOL c81e8dd2234b090c48e1adfa075d5817263364ade0e39e59c2ecf99e1a3862e6eac70cbfc7eef592de12ecc02d66baf9ae651e2f085936dde4d38f975aef0aed
 DIST net-snmp-5.7.3-perl524.patch.gz 9072 SHA256 e8dfa8546aafc4afa03f8e26d330b92f22ded0674c68a4083bd3c8fb9ad5a418 SHA512 2d3184ac7c96f75af5bf8c8d23f33d5636c701e052a638e5403a8d5aa34985abc38f6a366ba09a1d8499a05fd71d939a7ed4d530661e56a726386603b6f6e6a4 WHIRLPOOL de180f600feeb94ae1cfd6b2e74f96c59618bc0696938e96d93163cd3b0a33c5426bbc2e6523b75cdaadf10018c07806cc8bd79f9c94593633915b33a2d6278a
 DIST net-snmp-5.7.3.tar.gz 6382428 SHA256 12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0 SHA512 0758bba5844cfd6c80959ac16b83906a2f830ba49fd0ab1bf9e191dc6a79d312a2e4760bd53b3e1a1c82759481f0064d088d5a3cf475d84b25679a6bd0f049bb WHIRLPOOL ee741c1278206dd8dae00e085629e7c13ce518ad1911af804872ccaba576ab4d234f7801dbb447ae1ddba8196d43d1dbcd46c4bd8f69aa9dc9eb1662ce5e718a

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
new file mode 100644
index 00000000000..8660a325756
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.7.3-mariadb-10.2.patch
@@ -0,0 +1,37 @@
+--- 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, &not_argc, &not_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();
+ 

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
new file mode 100644
index 00000000000..45855597a86
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch
@@ -0,0 +1,70 @@
+--- 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_p3.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild
new file mode 100644
index 00000000000..4175fec18f2
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2017 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-${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? ( 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 "${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 "${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
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2018-02-21 20:44 Anthony G. Basile
  0 siblings, 0 replies; 10+ messages in thread
From: Anthony G. Basile @ 2018-02-21 20:44 UTC (permalink / raw
  To: gentoo-commits

commit:     95a4d2e630d66a6042b0157b53b9452b3c7b9369
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 21 20:44:28 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Feb 21 20:44:46 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95a4d2e6

net-analyzer/net-snmp: add missing include <limits.h>

PATH_MAX and NAME_MAX requires <limits.h> according to POSIX.  This
problem shows up on non-glibc systems.

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../net-snmp/files/net-snmp-5.7.3-include-limits.patch    | 15 +++++++++++++++
 net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild            |  3 ++-
 net-analyzer/net-snmp/net-snmp-5.7.3-r6.ebuild            |  3 ++-
 net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild            |  3 ++-
 4 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch b/net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch
new file mode 100644
index 00000000000..04eafbbe9c5
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch
@@ -0,0 +1,15 @@
+POSIX requires <limits.h> for PATH_MAX and NAME_MAX
+
+Author: Anthony G. Basile <blueness@gentoo.org>
+
+diff -Naur net-snmp-5.7.3.orig/agent/mibgroup/util_funcs/get_pid_from_inode.c net-snmp-5.7.3/agent/mibgroup/util_funcs/get_pid_from_inode.c
+--- net-snmp-5.7.3.orig/agent/mibgroup/util_funcs/get_pid_from_inode.c	2014-12-08 15:23:22.000000000 -0500
++++ net-snmp-5.7.3/agent/mibgroup/util_funcs/get_pid_from_inode.c	2018-02-21 15:34:06.237028136 -0500
+@@ -6,6 +6,7 @@
+ 
+ #include <ctype.h>
+ #include <stdio.h>
++#include <limits.h>
+ #if HAVE_STDLIB_H
+ #include <stdlib.h>
+ #endif

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
index 00afce2aacf..11979c188f9 100644
--- a/net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.7.3-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -81,6 +81,7 @@ src_prepare() {
 
 	epatch "${WORKDIR}"/${P}-perl524.patch
 	epatch "${WORKDIR}"/${P}-perl524-2.patch
+	epatch "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
 
 	epatch "${WORKDIR}"/patches/*.patch
 

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
index 044f8d6bb31..b89ac3cf3f1 100644
--- a/net-analyzer/net-snmp/net-snmp-5.7.3-r6.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.7.3-r6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -81,6 +81,7 @@ src_prepare() {
 
 	epatch "${WORKDIR}"/${P}-perl524.patch
 	epatch "${WORKDIR}"/${P}-perl524-2.patch
+	epatch "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
 
 	epatch "${WORKDIR}"/patches/*.patch
 

diff --git a/net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild b/net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild
index 4175fec18f2..77645313cf3 100644
--- a/net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.7.3_p3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -82,6 +82,7 @@ src_prepare() {
 	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
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2019-08-19 20:38 Jeroen Roovers
  0 siblings, 0 replies; 10+ messages in thread
From: Jeroen Roovers @ 2019-08-19 20:38 UTC (permalink / raw
  To: gentoo-commits

commit:     5fc1dd13d685e60d88b767b4ea589f7072bc842c
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 19 20:36:02 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Aug 19 20:38:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fc1dd13

net-analyzer/net-snmp: Fix building against dev-db/mysql-connector-c-8.*

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Fixes: https://bugs.gentoo.org/692478
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../net-snmp/files/net-snmp-5.8-my_bool.patch      |  23 +++
 net-analyzer/net-snmp/net-snmp-5.8-r2.ebuild       | 199 +++++++++++++++++++++
 2 files changed, 222 insertions(+)

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch
new file mode 100644
index 00000000000..72127d053c0
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch
@@ -0,0 +1,23 @@
+commit 9f4af8c42d515e6b214738cc97212dfbe7f749cf
+Author: Andreas Hasenack <ahasenack2@users.sourceforge.net>
+Date:   Tue Feb 5 18:21:40 2019 -0800
+
+    apps/snmptrapd_sql: Fix build against MySQL 8
+    
+    See also https://sourceforge.net/p/net-snmp/bugs/2922/.
+    
+    [bvanassche: changed 'int' into 'char']
+
+diff --git a/apps/snmptrapd_sql.c b/apps/snmptrapd_sql.c
+index 6126ca916..32a3b1799 100644
+--- a/apps/snmptrapd_sql.c
++++ b/apps/snmptrapd_sql.c
+@@ -199,7 +199,7 @@ typedef struct sql_buf_t {
+  * static bind structures, plus 2 static buffers to bind to.
+  */
+ static MYSQL_BIND _tbind[TBIND_MAX], _vbind[VBIND_MAX];
+-static my_bool    _no_v3;
++static char       _no_v3;
+ 
+ static void _sql_process_queue(u_int dontcare, void *meeither);
+ 

diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r2.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r2.ebuild
new file mode 100644
index 00000000000..2452860409a
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.8-r2.ebuild
@@ -0,0 +1,199 @@
+# 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://www.net-snmp.org/"
+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 kmem 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 "${FILESDIR}"/${PN}-5.7.3-include-limits.patch
+	eapply "${FILESDIR}"/${PN}-5.8-my_bool.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 kmem kmem-usage) \
+		$(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
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2019-09-09  6:58 Jeroen Roovers
  0 siblings, 0 replies; 10+ messages in thread
From: Jeroen Roovers @ 2019-09-09  6:58 UTC (permalink / raw
  To: gentoo-commits

commit:     8174e41dd01d980e7ec9f6f2f5dd9d13ed4a4676
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  9 06:56:41 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Sep  9 06:58:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8174e41d

net-analyzer/net-snmp: Add IUSE=pcap

Package-Manager: Portage-2.3.75, Repoman-2.3.17
Bug: https://bugs.gentoo.org/693854
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../net-snmp/files/net-snmp-5.8-pcap.patch         |  41 +++++
 net-analyzer/net-snmp/metadata.xml                 |   3 +-
 net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild       | 205 +++++++++++++++++++++
 3 files changed, 248 insertions(+), 1 deletion(-)

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-pcap.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-pcap.patch
new file mode 100644
index 00000000000..43692240acb
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.8-pcap.patch
@@ -0,0 +1,41 @@
+--- a/configure.d/config_project_with_enable
++++ b/configure.d/config_project_with_enable
+@@ -1187,6 +1187,11 @@
+   [],
+   [with_bzip2="no"])
+ 
++AC_ARG_WITH([pcap],
++  [ --with-pcap[=DIR]          use libpcap in DIR],
++  [],
++  [with_pcap="no"])
++
+ NETSNMP_ARG_WITH(
+  [mnttab],
+  AS_HELP_STRING(
+--- a/configure.d/config_os_libs2
++++ b/configure.d/config_os_libs2
+@@ -583,14 +590,16 @@
+ ##
+ #   libpcap
+ ##
+-NETSNMP_BUILD_PCAP_PROG_TRUE='#'
+-NETSNMP_BUILD_PCAP_PROG_FALSE=''
+-AC_CHECK_LIB([pcap], [pcap_create], [
+-   AC_CHECK_HEADERS([pcap/pcap.h], [
+-      NETSNMP_BUILD_PCAP_PROG_TRUE=''
+-      NETSNMP_BUILD_PCAP_PROG_FALSE='#'
+-       ])
+-])
++if test "x$with_pcap" = "xyes" ; then
++  NETSNMP_BUILD_PCAP_PROG_TRUE='#'
++  NETSNMP_BUILD_PCAP_PROG_FALSE=''
++  AC_CHECK_LIB([pcap], [pcap_create], [
++     AC_CHECK_HEADERS([pcap/pcap.h], [
++        NETSNMP_BUILD_PCAP_PROG_TRUE=''
++        NETSNMP_BUILD_PCAP_PROG_FALSE='#'
++         ])
++  ])
++fi
+ AC_SUBST(NETSNMP_BUILD_PCAP_PROG_TRUE)
+ AC_SUBST(NETSNMP_BUILD_PCAP_PROG_FALSE)
+ 

diff --git a/net-analyzer/net-snmp/metadata.xml b/net-analyzer/net-snmp/metadata.xml
index 95e28946a27..f3f6819a536 100644
--- a/net-analyzer/net-snmp/metadata.xml
+++ b/net-analyzer/net-snmp/metadata.xml
@@ -10,10 +10,11 @@
 <flag name="kmem">Enable usage of /dev/kmem</flag>
 <flag name="mfd-rewrites">Use MFD rewrites of mib modules where available</flag>
 <flag name="netlink">Use <pkg>dev-libs/libnl</pkg> to fetch TCP statistics instead of using /proc/net/tcp (Linux only).</flag>
+<flag name="pcap">Install snmppcap which reads from PCAP files and writes to the SNMP transport</flag>
 <flag name="pci">Use libpci (from <pkg>sys-apps/pciutils</pkg>) to look up network interface description. This feature is only available on Linux.</flag>
 <flag name="rpm">Enable monitoring of <pkg>app-arch/rpm</pkg>. This flag requires the bzip2 and zlib flags to be enabled as well.</flag>
-<flag name="ucd-compat">Build UCD compatibility library. Increases significantly the install size.</flag>
 <flag name="smux">Enable support for the legacy smux protocol (superseded by agentx)</flag>
+<flag name="ucd-compat">Build UCD compatibility library. Increases significantly the install size.</flag>
 </use>
 <upstream>
 <remote-id type="sourceforge">net-snmp</remote-id>

diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild
new file mode 100644
index 00000000000..ff99cf4ad76
--- /dev/null
+++ b/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild
@@ -0,0 +1,205 @@
+# 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://www.net-snmp.org/"
+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 kmem ipv6 libressl lm_sensors mfd-rewrites minimal mysql
+	netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib
+"
+
+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? (
+		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 )
+"
+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-my_bool.patch
+	eapply "${FILESDIR}"/${PN}-5.8-pcap.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 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) \
+		--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
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2019-09-10  7:35 Jeroen Roovers
  0 siblings, 0 replies; 10+ messages in thread
From: Jeroen Roovers @ 2019-09-10  7:35 UTC (permalink / raw
  To: gentoo-commits

commit:     1dcbc73fd4041c63775fa227e3ba9e92d3a16b61
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 10 07:34:48 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Sep 10 07:35:08 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dcbc73f

net-analyzer/net-snmp: Fix `net-snmp-config --libs`

Package-Manager: Portage-2.3.75, Repoman-2.3.17
Bug: https://bugs.gentoo.org/693970
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 ...snmp-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch | 34 ++++++++++++++++++++++
 ...t-snmp-5.8-r3.ebuild => net-snmp-5.8-r4.ebuild} |  1 +
 2 files changed, 35 insertions(+)

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch
new file mode 100644
index 00000000000..4e3001e1e47
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch
@@ -0,0 +1,34 @@
+--- a/net-snmp-config.in
++++ b/net-snmp-config.in
+@@ -190,13 +190,13 @@
+     #################################################### client lib
+     --libs)
+       # use this one == --netsnmp-libs + --external-libs
+-      echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_SNMPLIBS $NSC_LIBS
++      echo $NSC_LIBDIR $NSC_SNMPLIBS $NSC_LIBS
+       ;;
+     --netsnmp-libs)
+       echo $NSC_LIBDIR $NSC_BASE_SNMP_LIBS
+       ;;
+     --external-libs)
+-      echo $NSC_LDFLAGS $NSC_LNETSNMPLIBS $NSC_LIBS @PERLLDOPTS_FOR_APPS@
++      echo $NSC_LNETSNMPLIBS $NSC_LIBS @PERLLDOPTS_FOR_APPS@
+       ;;
+     #################################################### agent lib
+     --base-agent-libs)
+@@ -207,13 +207,13 @@
+       ;;
+     --agent-libs)
+       # use this one == --netsnmp-agent-libs + --external-libs
+-      echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_AGENTLIBS $NSC_LIBS
++      echo $NSC_LIBDIR $NSC_AGENTLIBS $NSC_LIBS
+       ;;
+     --netsnmp-agent-libs)
+       echo $NSC_LIBDIR $NSC_BASE_AGENT_LIBS
+       ;;
+     --external-agent-libs)
+-      echo $NSC_LDFLAGS $NSC_LMIBLIBS $NSC_LAGENTLIBS $NSC_LNETSNMPLIBS $NSC_LIBS
++      echo $NSC_LMIBLIBS $NSC_LAGENTLIBS $NSC_LNETSNMPLIBS $NSC_LIBS
+       ;;
+     ####################################################
+     --version|--ver*)

diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild
similarity index 98%
rename from net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild
rename to net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild
index ff99cf4ad76..b3a807cc5e2 100644
--- a/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild
@@ -83,6 +83,7 @@ src_prepare() {
 	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-do-not-conflate-LDFLAGS-and-LIBS.patch
 	eapply "${FILESDIR}"/${PN}-5.8-my_bool.patch
 	eapply "${FILESDIR}"/${PN}-5.8-pcap.patch
 	eapply "${FILESDIR}"/${PN}-5.8-tinfo.patch


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2020-08-06  5:51 Jeroen Roovers
  0 siblings, 0 replies; 10+ messages in thread
From: Jeroen Roovers @ 2020-08-06  5:51 UTC (permalink / raw
  To: gentoo-commits

commit:     83fb218650770c9488f4623c7c5bbfa7e8469744
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  6 05:47:52 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Aug  6 05:51:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83fb2186

net-analyzer/net-snmp: Remove libdir from net-snmp-config/pkg-config

Package-Manager: Portage-3.0.1, Repoman-2.3.23
Bug: https://bugs.gentoo.org/686416
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../net-snmp-5.8.1-net-snmp-config-libdir.patch    | 37 ++++++++++++++++++++++
 .../net-snmp/files/net-snmp-5.8.1-pkg-config.patch | 12 ++++---
 net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild   |  1 +
 net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild    |  1 +
 net-analyzer/net-snmp/net-snmp-99999999.ebuild     |  1 +
 5 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8.1-net-snmp-config-libdir.patch b/net-analyzer/net-snmp/files/net-snmp-5.8.1-net-snmp-config-libdir.patch
new file mode 100644
index 00000000000..73d420531bb
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.8.1-net-snmp-config-libdir.patch
@@ -0,0 +1,37 @@
+--- a/net-snmp-config.in
++++ b/net-snmp-config.in
+@@ -193,10 +193,10 @@
+     #################################################### client lib
+     --libs)
+       # use this one == --netsnmp-libs + --external-libs
+-      echo $NSC_LIBDIR $NSC_SNMPLIBS $NSC_LIBS
++      echo $NSC_SNMPLIBS $NSC_LIBS
+       ;;
+     --netsnmp-libs)
+-      echo $NSC_LIBDIR $NSC_BASE_SNMP_LIBS
++      echo $NSC_BASE_SNMP_LIBS
+       ;;
+     --external-libs)
+       echo $NSC_LNETSNMPLIBS $NSC_LIBS @PERLLDOPTS_FOR_APPS@
+@@ -210,10 +210,10 @@
+       ;;
+     --agent-libs)
+       # use this one == --netsnmp-agent-libs + --external-libs
+-      echo $NSC_LIBDIR $NSC_AGENTLIBS $NSC_LIBS
++      echo $NSC_AGENTLIBS $NSC_LIBS
+       ;;
+     --netsnmp-agent-libs)
+-      echo $NSC_LIBDIR $NSC_BASE_AGENT_LIBS
++      echo $NSC_BASE_AGENT_LIBS
+       ;;
+     --external-agent-libs)
+       echo $NSC_LMIBLIBS $NSC_LAGENTLIBS $NSC_LNETSNMPLIBS $NSC_LIBS
+@@ -660,7 +660,7 @@
+         echo "Ack.  Can't create $tmpfile."
+ 	exit 1
+       fi
+-      cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS $ldflags"
++      cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $ldflags $NSC_LDFLAGS $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS"
+       echo "running: $cmd"
+       echo `$cmd`
+       result=$?

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8.1-pkg-config.patch b/net-analyzer/net-snmp/files/net-snmp-5.8.1-pkg-config.patch
index fd53973c2be..acda136a22c 100644
--- a/net-analyzer/net-snmp/files/net-snmp-5.8.1-pkg-config.patch
+++ b/net-analyzer/net-snmp/files/net-snmp-5.8.1-pkg-config.patch
@@ -1,16 +1,20 @@
 --- a/netsnmp-agent.pc.in
 +++ b/netsnmp-agent.pc.in
-@@ -9,4 +9,4 @@
+@@ -8,5 +8,5 @@
+ URL: http://www.net-snmp.org
  Version: @PACKAGE_VERSION@
  Cflags: -I${includedir}
- Libs: -L${libdir} -lnetsnmpmibs -lnetsnmpagent -lnetsnmp
+-Libs: -L${libdir} -lnetsnmpmibs -lnetsnmpagent -lnetsnmp
 -Libs.private: @LDFLAGS@ @LMIBLIBS@ @LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@ @LNETSNMPLIBS@ @LIBS@
++Libs: -lnetsnmpmibs -lnetsnmpagent -lnetsnmp
 +Libs.private: @LMIBLIBS@ @LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@ @LNETSNMPLIBS@ @LIBS@
 --- a/netsnmp.pc.in
 +++ b/netsnmp.pc.in
-@@ -9,4 +9,4 @@
+@@ -8,5 +8,5 @@
+ URL: http://www.net-snmp.org
  Version: @PACKAGE_VERSION@
  Cflags: -I${includedir}
- Libs: -L${libdir} -lnetsnmp
+-Libs: -L${libdir} -lnetsnmp
 -Libs.private: @LDFLAGS@ @LNETSNMPLIBS@ @LIBS@ @PERLLDOPTS_FOR_APPS@
++Libs: -lnetsnmp
 +Libs.private: @LNETSNMPLIBS@ @LIBS@ @PERLLDOPTS_FOR_APPS@

diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild
index 1418de67f9f..01b3f5ccf53 100644
--- a/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild
@@ -79,6 +79,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-5.8-pcap.patch
 	"${FILESDIR}"/${PN}-5.8-tinfo.patch
 	"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch
+	"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch
 )
 
 pkg_setup() {

diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild
index 4c3850d0345..885006e7fa2 100644
--- a/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild
@@ -78,6 +78,7 @@ PATCHES=(
 	"${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}-99999999-tinfo.patch
 )
 

diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-99999999.ebuild
index f1bee66a6ca..bc7fc206a2d 100644
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-99999999.ebuild
@@ -77,6 +77,7 @@ PATCHES=(
 	"${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}-99999999-tinfo.patch
 )
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2020-08-15 13:18 Jeroen Roovers
  0 siblings, 0 replies; 10+ messages in thread
From: Jeroen Roovers @ 2020-08-15 13:18 UTC (permalink / raw
  To: gentoo-commits

commit:     41ce6d213a8daee9d1d607a836bec31a4b975085
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 13:18:04 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 13:18:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41ce6d21

net-analyzer/net-snmp: Version 5.9

Package-Manager: Portage-3.0.2, Repoman-2.3.23
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-analyzer/net-snmp/Manifest                     |  1 +
 .../net-snmp/files/net-snmp-5.9-MakeMaker.patch    | 10 +++++++
 ...et-snmp-99999999.ebuild => net-snmp-5.9.ebuild} | 31 +++++++++-------------
 net-analyzer/net-snmp/net-snmp-99999999.ebuild     | 20 +++++++-------
 4 files changed, 34 insertions(+), 28 deletions(-)

diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
index 810f50fdabf..49e33a99e38 100644
--- a/net-analyzer/net-snmp/Manifest
+++ b/net-analyzer/net-snmp/Manifest
@@ -3,3 +3,4 @@ DIST net-snmp-5.8.1.pre1.tar.gz 6630615 BLAKE2B 32ae7177fc08a773928da7f19cd06617
 DIST net-snmp-5.8.1.pre2.tar.gz 6642893 BLAKE2B 4b2a1e87738c3bde49354f0cca84628f2953ee14f6b08ca53cf0bc5c320052cb4fe0f6eeb46551eaf2d45ba9c17f86ce06b64c00c1629b2d17bc351c0ccb37a8 SHA512 78cd9a29cc89ff7fa170ee767db3ca2077fc1d877f207c018887c2ea0148ffaf01eb013efc21b47f14c893a6ca48b3b439210ccd27dfc77f8c8e56bf9546f23e
 DIST net-snmp-5.8.1.rc1.tar.gz 6690067 BLAKE2B 35f9547de7b40c8a6f4a046e5cdb9b4a28650f0d87d51572659c5cbb0759503b9d328fc227fa2061f18a733ceaa8c22aa771fabe685a97fab1dc9b5ff98c2648 SHA512 294f2c5656bfc5141ef6aa5826f79b886094ea702ec20918c0ff20aa4100c8503b33a21086c6c028cff25c05504b9f8ed29533c89745586e32d63839345e2331
 DIST net-snmp-5.8.tar.gz 6591680 BLAKE2B ac1bff4152310da57818a00d752a08a7fc61d697b02479d9952ca12d024d3d68dc8bfa674571e93d6f3597605b2fe91513fb6839057a80f2c3dd8d0cce0077f2 SHA512 27895a583b23f3e14c48562bc32f3ba83513d81aa848e878be9a3650f0458d45950635c937ef627135f80b757b663e71fab9a3bde4fd91889153998ae3468fe7
+DIST net-snmp-5.9.tar.gz 37424919 BLAKE2B 673c7f5e05b5562821b907e9e06e7dd80e6f3c08521cdd71321cbe9774f0f60993682670b1188b89a39ba560d10f2234ca0fb4e76e867ab26f2c82799621e8de SHA512 ddba2c2fc220ee18e3f8b6756a754e206d0d7dc9b9615c92596cd16b38557bd2c7327d7bb8164fa67d85a4c757eb4f7a7dad9584e4af13facfec6b1ccae7961b

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.9-MakeMaker.patch b/net-analyzer/net-snmp/files/net-snmp-5.9-MakeMaker.patch
new file mode 100644
index 00000000000..1c6a3fd1eaf
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.9-MakeMaker.patch
@@ -0,0 +1,10 @@
+--- a/perl/Makefile.PL
++++ b/perl/Makefile.PL
+@@ -3,6 +3,7 @@
+ use ExtUtils::MakeMaker;
+ use Config;
+ require 5;
++use lib '.';
+ use MakefileSubs;
+ 
+ # Prevent that MakeMaker complains about unknown parameter names.

diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-5.9.ebuild
similarity index 92%
copy from net-analyzer/net-snmp/net-snmp-99999999.ebuild
copy to net-analyzer/net-snmp/net-snmp-5.9.ebuild
index d75684cc5af..5f50c7d5aff 100644
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.9.ebuild
@@ -2,26 +2,25 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
-DISTUTILS_SINGLE_IMPL=yesplz
 DISTUTILS_OPTIONAL=yesplz
-WANT_AUTOMAKE=none
-PATCHSET=3
+DISTUTILS_SINGLE_IMPL=yesplz
 GENTOO_DEPEND_ON_PERL=no
-
-inherit autotools distutils-r1 git-r3 perl-module systemd
+PATCHSET=3
+PYTHON_COMPAT=( python3_{6,7,8} )
+WANT_AUTOMAKE=none
+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="
+	mirror://sourceforge/project/${PN}/${PN}/${PV/_rc*/}/${P/_rc/.rc}.tar.gz
 	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=""
+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
@@ -69,8 +68,6 @@ RDEPEND="
 	)
 	selinux? ( sec-policy/selinux-snmp )
 "
-S=${WORKDIR}/${P/_/.}
-S=${WORKDIR}/${P/_p*/}
 RESTRICT=test
 PATCHES=(
 	"${FILESDIR}"/${PN}-5.7.3-include-limits.patch
@@ -79,6 +76,7 @@ PATCHES=(
 	"${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}-99999999-tinfo.patch
 )
 
@@ -86,11 +84,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
@@ -132,7 +125,8 @@ src_configure() {
 		$(use_with ssl openssl) \
 		$(use_with tcpd libwrap) \
 		$(use_with zlib) \
-		--enable-shared --disable-static \
+		--disable-static \
+		--enable-shared \
 		--with-default-snmp-version="3" \
 		--with-install-prefix="${D}" \
 		--with-ldflags="${LDFLAGS}" \
@@ -144,8 +138,9 @@ src_configure() {
 }
 
 src_compile() {
-	for target in snmplib agent sedscript all; do
-		emake OTHERLDFLAGS="${LDFLAGS}" ${target}
+	local subdir
+	for subdir in snmplib agent/mibgroup agent apps .; do
+		emake OTHERLDFLAGS="${LDFLAGS}" -C ${subdir} all
 	done
 
 	use doc && emake docsdox

diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-99999999.ebuild
index d75684cc5af..b3478934c9a 100644
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-99999999.ebuild
@@ -2,13 +2,12 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
-DISTUTILS_SINGLE_IMPL=yesplz
 DISTUTILS_OPTIONAL=yesplz
-WANT_AUTOMAKE=none
-PATCHSET=3
+DISTUTILS_SINGLE_IMPL=yesplz
 GENTOO_DEPEND_ON_PERL=no
-
+PATCHSET=3
+PYTHON_COMPAT=( python3_{6,7,8} )
+WANT_AUTOMAKE=none
 inherit autotools distutils-r1 git-r3 perl-module systemd
 
 DESCRIPTION="Software for generating and retrieving SNMP data"
@@ -69,8 +68,6 @@ RDEPEND="
 	)
 	selinux? ( sec-policy/selinux-snmp )
 "
-S=${WORKDIR}/${P/_/.}
-S=${WORKDIR}/${P/_p*/}
 RESTRICT=test
 PATCHES=(
 	"${FILESDIR}"/${PN}-5.7.3-include-limits.patch
@@ -79,6 +76,7 @@ PATCHES=(
 	"${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}-99999999-tinfo.patch
 )
 
@@ -132,7 +130,8 @@ src_configure() {
 		$(use_with ssl openssl) \
 		$(use_with tcpd libwrap) \
 		$(use_with zlib) \
-		--enable-shared --disable-static \
+		--disable-static \
+		--enable-shared \
 		--with-default-snmp-version="3" \
 		--with-install-prefix="${D}" \
 		--with-ldflags="${LDFLAGS}" \
@@ -144,8 +143,9 @@ src_configure() {
 }
 
 src_compile() {
-	for target in snmplib agent sedscript all; do
-		emake OTHERLDFLAGS="${LDFLAGS}" ${target}
+	local subdir
+	for subdir in snmplib agent/mibgroup agent apps .; do
+		emake OTHERLDFLAGS="${LDFLAGS}" -C ${subdir} all
 	done
 
 	use doc && emake docsdox


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2021-02-27  7:46 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-02-27  7:46 UTC (permalink / raw
  To: gentoo-commits

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 <bvanassche@acm.org>
+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"
 }
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2022-07-01  8:41 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-07-01  8:41 UTC (permalink / raw
  To: gentoo-commits

commit:     b2f6635d7773958a92d502d57fabd9edfa185d59
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  1 08:38:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul  1 08:40:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2f6635d

net-analyzer/net-snmp: add 5.9.2

Bug: https://bugs.gentoo.org/855500
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/net-snmp/Manifest                     |  1 +
 .../files/net-snmp-5.9.2-fix-LDFLAGS.patch         | 18 ++++++++++++++
 ...-snmp-99999999.ebuild => net-snmp-5.9.2.ebuild} | 29 +++++++++++++++-------
 ...t-snmp-99999999.ebuild => net-snmp-9999.ebuild} | 29 +++++++++++++++-------
 4 files changed, 59 insertions(+), 18 deletions(-)

diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest
index b4a54d47a08d..ebce48029c46 100644
--- a/net-analyzer/net-snmp/Manifest
+++ b/net-analyzer/net-snmp/Manifest
@@ -1,2 +1,3 @@
 DIST net-snmp-5.7.3-patches-3.tar.xz 3176 BLAKE2B 1a71d6743afb841f664c6058e32c7c411af62b0f36acd3bb9251804893ed12f462a0c5bab828e309eeec7824def2dca8fa866350b90a62ec4f0df1141b51ecae SHA512 d8a91b9668320a1e19d062eb86dd4d16beb7c2d15ac7ebbb9d2a4bd298af39bbb0a2613504dbb0057cccdec731f08f2308c5a15395e1fbc29bb0611ed8aca636
 DIST net-snmp-5.9.1.tar.gz 6781346 BLAKE2B 4242ca77372005f995dfd228bec51d35b6b0f8c0ab0e44ed40cdb3cc0578b64e97444ffcb074dceca30739deadb46e68f1c75e87d3f1768d81b5e084b0fc0f5f SHA512 ae158ab41961ee2064d85187337979e6ff6ba90f3136b8a960e9ae46ee1408d9d2f0c5c4dfc3a3302e6dbb357cddf1221489435288c4f52182a03e94a9e450c3
+DIST net-snmp-5.9.2.tar.gz 6646200 BLAKE2B 95af69d530d3f5267bb75165cc2cf72128547a14fe4148d20610a45d42298475fb4c553c1e4eff1ffb4a368b609868b0ca36530c0f3a98800cf6290707bb3fb7 SHA512 d67810b15c4956a28ccb4d9a3870604bc94e71247d9a8d3a9959041268122b3500cf68a7912cfb01a6cff27f3f4364cbd106629ab80c12974f694b6c548bde59

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.9.2-fix-LDFLAGS.patch b/net-analyzer/net-snmp/files/net-snmp-5.9.2-fix-LDFLAGS.patch
new file mode 100644
index 000000000000..158d8f1b5bee
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.9.2-fix-LDFLAGS.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile.top b/Makefile.top
+index d6394ca..f5119b5 100644
+--- a/Makefile.top
++++ b/Makefile.top
+@@ -86,11 +86,11 @@ LIBCURRENT  = 41
+ LIBAGE      = 2
+ LIBREVISION = 0
+ 
+-LIB_LD_CMD      = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) @LD_NO_UNDEFINED@ -o
++LIB_LD_CMD      = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) $(LDFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) @LD_NO_UNDEFINED@ -o
+ LIB_EXTENSION   = la
+ LIB_VERSION     =
+ LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir)
+-LINK		= $(LIBTOOL) --mode=link $(LINKCC)
++LINK		= $(LIBTOOL) --mode=link $(LINKCC) $(LDFLAGS)
+ # RANLIB 	= @RANLIB@
+ RANLIB		= :
+ 

diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-5.9.2.ebuild
similarity index 86%
copy from net-analyzer/net-snmp/net-snmp-99999999.ebuild
copy to net-analyzer/net-snmp/net-snmp-5.9.2.ebuild
index 80a7944c40df..ca95665fcf9a 100644
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.9.2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 DISTUTILS_OPTIONAL=yes
 DISTUTILS_SINGLE_IMPL=yes
@@ -9,12 +9,21 @@ GENTOO_DEPEND_ON_PERL=no
 PYTHON_COMPAT=( python3_{8..10} )
 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/~jsmolic/distfiles/${PN}-5.7.3-patches-3.tar.xz"
+HOMEPAGE="https://www.net-snmp.org/"
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/net-snmp/net-snmp"
+	inherit git-r3
+else
+	# https://github.com/net-snmp/net-snmp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+	SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz"
+
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+SRC_URI+=" https://dev.gentoo.org/~jsmolic/distfiles/${PN}-5.7.3-patches-3.tar.xz"
 
 # GPL-2 for the init scripts
 LICENSE="HPND BSD GPL-2"
@@ -67,13 +76,13 @@ RDEPEND="
 "
 
 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.2-fix-LDFLAGS.patch
 	"${FILESDIR}"/${PN}-99999999-tinfo.patch
 )
 
@@ -83,15 +92,18 @@ pkg_setup() {
 
 src_unpack() {
 	default
-	git-r3_src_unpack
+
+	[[ ${PV} == 9999 ]] && 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
 
+	mv "${WORKDIR}"/patches/0001-Fix-toolchain-quadruplet-detection-Gentoo-bug-432004.patch{,.disabled} || die
 	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
+	mv "${WORKDIR}"/patches/0005-Respect-LDFLAGS-properly.patch{,.disabled} || die
 	eapply "${WORKDIR}"/patches/*.patch
 
 	default
@@ -127,7 +139,6 @@ src_configure() {
 		$(use_with ssl openssl) \
 		$(use_with tcpd libwrap) \
 		$(use_with zlib) \
-		--disable-static \
 		--enable-shared \
 		--with-default-snmp-version="3" \
 		--with-ldflags="${LDFLAGS}" \

diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-9999.ebuild
similarity index 86%
rename from net-analyzer/net-snmp/net-snmp-99999999.ebuild
rename to net-analyzer/net-snmp/net-snmp-9999.ebuild
index 80a7944c40df..ca95665fcf9a 100644
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 DISTUTILS_OPTIONAL=yes
 DISTUTILS_SINGLE_IMPL=yes
@@ -9,12 +9,21 @@ GENTOO_DEPEND_ON_PERL=no
 PYTHON_COMPAT=( python3_{8..10} )
 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/~jsmolic/distfiles/${PN}-5.7.3-patches-3.tar.xz"
+HOMEPAGE="https://www.net-snmp.org/"
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/net-snmp/net-snmp"
+	inherit git-r3
+else
+	# https://github.com/net-snmp/net-snmp/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
+	SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz"
+
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+SRC_URI+=" https://dev.gentoo.org/~jsmolic/distfiles/${PN}-5.7.3-patches-3.tar.xz"
 
 # GPL-2 for the init scripts
 LICENSE="HPND BSD GPL-2"
@@ -67,13 +76,13 @@ RDEPEND="
 "
 
 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.2-fix-LDFLAGS.patch
 	"${FILESDIR}"/${PN}-99999999-tinfo.patch
 )
 
@@ -83,15 +92,18 @@ pkg_setup() {
 
 src_unpack() {
 	default
-	git-r3_src_unpack
+
+	[[ ${PV} == 9999 ]] && 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
 
+	mv "${WORKDIR}"/patches/0001-Fix-toolchain-quadruplet-detection-Gentoo-bug-432004.patch{,.disabled} || die
 	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
+	mv "${WORKDIR}"/patches/0005-Respect-LDFLAGS-properly.patch{,.disabled} || die
 	eapply "${WORKDIR}"/patches/*.patch
 
 	default
@@ -127,7 +139,6 @@ src_configure() {
 		$(use_with ssl openssl) \
 		$(use_with tcpd libwrap) \
 		$(use_with zlib) \
-		--disable-static \
 		--enable-shared \
 		--with-default-snmp-version="3" \
 		--with-ldflags="${LDFLAGS}" \


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/
@ 2022-11-19 19:36 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-11-19 19:36 UTC (permalink / raw
  To: gentoo-commits

commit:     be240aefac66f023742421eba6775a8f106a19ab
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 19 19:29:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 19 19:29:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be240aef

net-analyzer/net-snmp: fix configure w/ clang 16

Closes: https://bugs.gentoo.org/879715
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/net-snmp-5.9.3-configure-clang16.patch   | 160 +++++++++++++++++++++
 ...-snmp-5.9.3.ebuild => net-snmp-5.9.3-r1.ebuild} |   1 +
 2 files changed, 161 insertions(+)

diff --git a/net-analyzer/net-snmp/files/net-snmp-5.9.3-configure-clang16.patch b/net-analyzer/net-snmp/files/net-snmp-5.9.3-configure-clang16.patch
new file mode 100644
index 000000000000..1eb880bb9604
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.9.3-configure-clang16.patch
@@ -0,0 +1,160 @@
+https://bugs.gentoo.org/879715
+https://github.com/net-snmp/net-snmp/commit/ddec5fa0ed1c76fde5eea9b974442faeec008526
+https://github.com/net-snmp/net-snmp/commit/fec0f9ee59d5d89c28d70bb35fad29a0013d048c
+https://github.com/net-snmp/net-snmp/commit/f362b354ce993d7394bf77db41bb27cfe8d1e307
+
+From ddec5fa0ed1c76fde5eea9b974442faeec008526 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 17 Nov 2022 00:10:09 +0000
+Subject: [PATCH] configure.d: fix compatibility with Clang 16
+
+Clang 16 makes -Wimplicit-function-declaration and -Wimplicit-int an error by
+default. Unfortunately, this can lead to misconfiguration or miscompilation of
+software as configure tests may then return the wrong result.
+
+We also fix -Wstrict-prototypes while here as it's easy to do and it prepares
+us for C23.
+
+For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki
+[2], or the (new) c-std-porting mailing list [3].
+
+[0] https://lwn.net/Articles/913505/
+[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
+[2] https://wiki.gentoo.org/wiki/Modern_C_porting
+[3] hosted at lists.linux.dev.
+
+Bug: https://bugs.gentoo.org/879715
+Signed-off-by: Sam James <sam@gentoo.org>
+[ bvanassche: removed two header file guards ]
+--- a/configure
++++ b/configure
+@@ -28483,7 +28483,14 @@ else
+ #ifdef HAVE_SYS_FS_TYPES_H
+ #include <sys/fs_types.h>
+ #endif
+-int main ()
++#ifdef HAVE_SYS_STATFS_H
++#include <sys/statfs.h>
++#endif
++#ifdef HAVE_SYS_STATVFS_H
++#include <sys/statvfs.h>
++#endif
++
++int main(void)
+ {
+ struct fs_data fsd;
+ /* Ultrix's statfs returns 1 for success,
+@@ -31851,8 +31858,10 @@ else
+ #if HAVE_SYS_SYSCTL_H
+ # include <sys/sysctl.h>
+ #endif
++#include <stddef.h>
++#include <stdlib.h>
+ 
+-int main(int argc, char **argv)
++int main(void)
+ {
+   int                 mib[2];
+   size_t              len;
+--- a/configure.d/config_os_functions
++++ b/configure.d/config_os_functions
+@@ -216,7 +216,14 @@ AC_CACHE_VAL(
+ #ifdef HAVE_SYS_FS_TYPES_H
+ #include <sys/fs_types.h>
+ #endif
+-int main ()
++#ifdef HAVE_SYS_STATFS_H
++#include <sys/statfs.h>
++#endif
++#ifdef HAVE_SYS_STATVFS_H
++#include <sys/statvfs.h>
++#endif
++
++int main(void)
+ {
+ struct fs_data fsd;
+ /* Ultrix's statfs returns 1 for success,
+--- a/configure.d/config_os_misc4
++++ b/configure.d/config_os_misc4
+@@ -185,8 +185,10 @@ else
+ #if HAVE_SYS_SYSCTL_H
+ # include <sys/sysctl.h>
+ #endif
++#include <stddef.h>
++#include <stdlib.h>
+ 
+-int main(int argc, char **argv)
++int main(void)
+ {
+   int                 mib[2];
+   size_t              len;
+
+From fec0f9ee59d5d89c28d70bb35fad29a0013d048c Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 17 Nov 2022 00:13:55 +0000
+Subject: [PATCH] agent/mibgroup: fix -Wstrict-prototypes
+
+Clang 16 warns on this. Fix it in preparation for C23.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+[ bvanassche: minor formatting changes ]
+--- a/agent/mibgroup/agentx/protocol.c
++++ b/agent/mibgroup/agentx/protocol.c
+@@ -1895,7 +1895,7 @@ agentx_parse(netsnmp_session * session, netsnmp_pdu *pdu, u_char * data,
+ 
+ #ifdef TESTING
+ 
+-testit(netsnmp_pdu *pdu1)
++void testit(netsnmp_pdu *pdu1)
+ {
+     char            packet1[BUFSIZ];
+     char            packet2[BUFSIZ];
+@@ -1964,7 +1964,7 @@ testit(netsnmp_pdu *pdu1)
+ 
+ 
+ 
+-main()
++int main(void)
+ {
+     netsnmp_pdu     pdu1;
+     oid             oid_buf[] = { 1, 3, 6, 1, 2, 1, 10 };
+--- a/agent/mibgroup/header_complex.c
++++ b/agent/mibgroup/header_complex.c
+@@ -569,7 +569,7 @@ header_complex_dump(struct header_complex_index *thestuff)
+     }
+ }
+ 
+-main()
++int main(void)
+ {
+     oid             oidsave[MAX_OID_LEN];
+     int             len = MAX_OID_LEN, len2;
+
+From f362b354ce993d7394bf77db41bb27cfe8d1e307 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 17 Nov 2022 00:20:04 +0000
+Subject: [PATCH] agent: fix -Wincompatible-function-pointer-types
+
+Clang 16 makes -Wincompatible-function-pointer-types an error by default.
+
+Fixes the following error:
+```
+mibgroup/if-mib/data_access/interface_linux.c:159:23: error: incompatible function pointer types assigning to 'void (*)(char *, ...) __attribute__((noreturn))' from 'void (char *, ...)' [-Wincompatible-function-pointer-types]
+    pci_access->error = netsnmp_pci_error;
+                      ^ ~~~~~~~~~~~~~~~~~
+1 error generated.
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/agent/mibgroup/if-mib/data_access/interface_linux.c
++++ b/agent/mibgroup/if-mib/data_access/interface_linux.c
+@@ -31,7 +31,7 @@ static struct pci_access *pci_access;
+ /* Avoid letting libpci call exit(1) when no PCI bus is available. */
+ static int do_longjmp =0;
+ static jmp_buf err_buf;
+-static void
++PCI_NONRET static void
+ netsnmp_pci_error(char *msg, ...)
+ {
+     va_list args;
+

diff --git a/net-analyzer/net-snmp/net-snmp-5.9.3.ebuild b/net-analyzer/net-snmp/net-snmp-5.9.3-r1.ebuild
similarity index 99%
rename from net-analyzer/net-snmp/net-snmp-5.9.3.ebuild
rename to net-analyzer/net-snmp/net-snmp-5.9.3-r1.ebuild
index c5817c51719d..77d049d11aed 100644
--- a/net-analyzer/net-snmp/net-snmp-5.9.3.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.9.3-r1.ebuild
@@ -91,6 +91,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch
 	"${FILESDIR}"/${PN}-5.9-MakeMaker.patch
 	"${FILESDIR}"/${PN}-5.9.2-fix-LDFLAGS.patch
+	"${FILESDIR}"/${P}-configure-clang16.patch
 	"${FILESDIR}"/${PN}-99999999-tinfo.patch
 )
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-19 19:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-19 19:36 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/net-snmp/files/, net-analyzer/net-snmp/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2022-07-01  8:41 Sam James
2021-02-27  7:46 Sam James
2020-08-15 13:18 Jeroen Roovers
2020-08-06  5:51 Jeroen Roovers
2019-09-10  7:35 Jeroen Roovers
2019-09-09  6:58 Jeroen Roovers
2019-08-19 20:38 Jeroen Roovers
2018-02-21 20:44 Anthony G. Basile
2017-08-26 11:33 Jeroen Roovers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox