public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libnl/, dev-libs/libnl/files/
@ 2015-08-19  5:11 Jeroen Roovers
  0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2015-08-19  5:11 UTC (permalink / raw
  To: gentoo-commits

commit:     c4456f9d089d84626a4ecb2a506dc9afaa77680f
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 19 05:10:06 2015 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Aug 19 05:10:06 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4456f9d

Old.

Package-Manager: portage-2.2.20.1

 dev-libs/libnl/Manifest                        |   2 -
 dev-libs/libnl/files/libnl-3.2.23-python.patch |  26 -------
 dev-libs/libnl/files/libnl-3.2.23-utils.h      |  41 ----------
 dev-libs/libnl/libnl-3.2.23.ebuild             |  82 --------------------
 dev-libs/libnl/libnl-3.2.24-r1.ebuild          | 102 -------------------------
 dev-libs/libnl/libnl-3.2.24.ebuild             |  80 -------------------
 6 files changed, 333 deletions(-)

diff --git a/dev-libs/libnl/Manifest b/dev-libs/libnl/Manifest
index fa99e15..8825f09 100644
--- a/dev-libs/libnl/Manifest
+++ b/dev-libs/libnl/Manifest
@@ -1,5 +1,3 @@
 DIST libnl-1.1.4.tar.gz 1174974 SHA256 4f80c21fe5bbcdde6e72b59b4f98306063a41421f909887c34e58d93e746d063 SHA512 25e26ddcc16540346ea34815ab6ac094177e5cee2eb3d843c4f8b30cd9d83390a3e87cb46046dc3bd9ae4d21f77e57bb3827c2cfc588eb18afe049921f2030b4 WHIRLPOOL eab5547dce7b11c86123fbcc9cd8e00100c7e78f48a4a9fef40f80f89407ea705b701f8f0eb7df63997866f17b0cf0924b43c69b29fa1f1b016fe997371b950e
-DIST libnl-3.2.23.tar.gz 766271 SHA256 8cc2cda9aa8cbbad384b9bb1ba0f6777ed9bf65e1cc3170d8c2ba5b3ee12f2b3 SHA512 b56dde135bf8e2a48bb7bb885351cf557b6a88c67dbc012c3c3f4008b8c6066f18442de772e7f8a41d6da8c80d4a38664393f131732870deae9da090b53045d8 WHIRLPOOL ef3f35edc77b7de1657e5ddd0f26e2e316d31ffb46353ab6c7345df5ff9b6d757b2d62fbaa5c58f4a7f5ed13859b00759971b22a069e381af519a82ffa8eb7a4
-DIST libnl-3.2.24.tar.gz 802068 SHA256 fb8d6e5dc8af5b85bc6d00a71582a68a01e6a3f7d1664d4a646e289a99dd6816 SHA512 d42c131d0be3bddfd65b9353f7193d355a0b5a7f0c32ee3db67ceeb9da2b04030f2dbc0d51f7f7cddbcc15fcc596b380e0c846dbe1c52212e50d06b7ee12fb10 WHIRLPOOL a90e9dcd08c7a2fb2bc883dd4f8b09e21afd55b10573bada84d1fb6425f5a9adff90bfd0c7572aef437719cfaaa106e5cc4b4aeed081d62e6723ba31c15f0edf
 DIST libnl-3.2.25.tar.gz 832513 SHA256 8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5 SHA512 3f9649577e9282cf41d2d4894aaecb2d53b4a1c51f9e674a6fb73393e9482f9f45e6f0ffa5815e606f972916e369774bfd85141a96c0e3d9d4ead3adea796286 WHIRLPOOL f151776fa1d1b9d23416408a315c0aa900928fa902322a0f4df3c90631ef54f281cf0cae6f69ec878a76f03a609f5fa2eb52d4c03db502c9972a70d864cdaf97
 DIST libnl-3.2.26.tar.gz 896005 SHA256 1323ff6cea47efe9f988893b09840942a8c36131f472a9f3b96eb68d8f8d7555 SHA512 5ab4a3a40244d71e0c8c50fcef30a67f814509d508e9537c85f2d710578a8a61513e7f26b2c0c29a9817484ca6ecd005e53b4f9054cd878274ae3b439abbe516 WHIRLPOOL 84854749fc312c867d9eec1e4d91bbeb5a132f79c004c5db0504a7d60136a2f39263b4efd4b0d1cd2e07f6cd363cc5e68f93089cb9b9dd58a45f416338c41a6f

diff --git a/dev-libs/libnl/files/libnl-3.2.23-python.patch b/dev-libs/libnl/files/libnl-3.2.23-python.patch
deleted file mode 100644
index 559376b..0000000
--- a/dev-libs/libnl/files/libnl-3.2.23-python.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/python/setup.py.in
-+++ b/python/setup.py.in
-@@ -9,6 +9,7 @@
-                          sources = ['netlink/capi.i'],
- 			 include_dirs = include,
- 			 swig_opts = opts,
-+			 library_dirs=['@top_builddir@/lib/.libs'],
- 			 libraries = ['nl-3'],
- 			)
- 
-@@ -16,6 +17,7 @@
-                          sources = ['netlink/route/capi.i'],
- 			 include_dirs = include,
- 			 swig_opts = opts,
-+			 library_dirs=['@top_builddir@/lib/.libs'],
- 			 libraries = ['nl-3', 'nl-route-3'],
- 			)
- 
-@@ -23,6 +25,7 @@
- 			 sources = ['netlink/genl/capi.i'],
- 			 include_dirs = include,
- 			 swig_opts = opts,
-+			 library_dirs=['@top_builddir@/lib/.libs'],
- 			 libraries = ['nl-3', 'nl-genl-3'],
- 			)
- 

diff --git a/dev-libs/libnl/files/libnl-3.2.23-utils.h b/dev-libs/libnl/files/libnl-3.2.23-utils.h
deleted file mode 100644
index 7836c30..0000000
--- a/dev-libs/libnl/files/libnl-3.2.23-utils.h
+++ /dev/null
@@ -1,41 +0,0 @@
-struct list_head {
-	struct list_head *next;
-};
-
-#define LIST_HEAD(name) \
-	struct list_head name = { &(name) }
-
-static inline int list_empty(const struct list_head *head)
-{
-	return head->next == head;
-}
-
-static inline void list_add(struct list_head *new, struct list_head *head)
-{
-	new->next = head->next;
-	head->next = new;
-}
-
-static inline void list_del(struct list_head *entry, struct list_head *prev)
-{
-	prev->next = entry->next;
-	entry->next = entry;
-}
-
-#define list_for_each_safe(pos, n, head) \
-	for (n = (head), pos = (head)->next; pos != (head); \
-	     n = pos, pos = n->next)
-
-#undef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-
-#define container_of(ptr, type, member) ({			\
-	const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
-	(type *)( (char *)__mptr - offsetof(type,member) );})
-
-#ifdef DEBUG
-#define pynl_dbg(fmt, ...) \
-	fprintf(stderr, "%s: " fmt, __func__, __VA_ARGS__)
-#else
-#define pynl_dbg(fmt, ...)
-#endif

diff --git a/dev-libs/libnl/libnl-3.2.23.ebuild b/dev-libs/libnl/libnl-3.2.23.ebuild
deleted file mode 100644
index 25cfb13..0000000
--- a/dev-libs/libnl/libnl-3.2.23.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 python3_3 )
-DISTUTILS_OPTIONAL=1
-inherit distutils-r1 eutils libtool multilib
-
-NL_P=${P/_/-}
-
-DESCRIPTION="A collection of libraries providing APIs to netlink protocol based Linux kernel interfaces"
-HOMEPAGE="http://www.infradead.org/~tgr/libnl/"
-SRC_URI="
-	http://www.infradead.org/~tgr/${PN}/files/${NL_P}.tar.gz
-"
-LICENSE="LGPL-2.1 utils? ( GPL-2 )"
-SLOT="3"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux"
-IUSE="static-libs python utils"
-
-RDEPEND="python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
-	python? ( dev-lang/swig )
-	sys-devel/flex
-	sys-devel/bison
-"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS=( ChangeLog )
-
-S=${WORKDIR}/${NL_P}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-1.1-vlan-header.patch
-	epatch "${FILESDIR}"/${PN}-3.2.20-rtnl_tc_get_ops.patch
-	epatch "${FILESDIR}"/${PN}-3.2.20-cache-api.patch
-	epatch "${FILESDIR}"/${PN}-3.2.23-python.patch
-
-	elibtoolize
-
-	if use python; then
-		cp "${FILESDIR}"/${P}-utils.h python/netlink/utils.h || die
-		cd "${S}"/python || die
-		distutils-r1_src_prepare
-	fi
-}
-
-src_configure() {
-	econf \
-		--disable-silent-rules \
-		$(use_enable static-libs static) \
-		$(use_enable utils cli)
-
-	if use python; then
-		cd "${S}"/python || die
-		distutils-r1_src_configure
-	fi
-}
-
-src_compile() {
-	default
-
-	if use python; then
-		cd "${S}"/python || die
-		distutils-r1_src_compile
-	fi
-}
-
-src_install() {
-	default
-
-	if use python; then
-		# Unset DOCS= since distutils-r1.eclass interferes
-		DOCS=''
-		cd "${S}"/python || die
-		distutils-r1_src_install
-	fi
-
-	prune_libtool_files $(usex static-libs --modules --all)
-}

diff --git a/dev-libs/libnl/libnl-3.2.24-r1.ebuild b/dev-libs/libnl/libnl-3.2.24-r1.ebuild
deleted file mode 100644
index 4e37f28..0000000
--- a/dev-libs/libnl/libnl-3.2.24-r1.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-DISTUTILS_OPTIONAL=1
-inherit distutils-r1 eutils libtool multilib multilib-minimal
-
-NL_P=${P/_/-}
-
-DESCRIPTION="A collection of libraries providing APIs to netlink protocol based Linux kernel interfaces"
-HOMEPAGE="http://www.infradead.org/~tgr/libnl/"
-SRC_URI="
-	http://www.infradead.org/~tgr/${PN}/files/${NL_P}.tar.gz
-"
-LICENSE="LGPL-2.1 utils? ( GPL-2 )"
-SLOT="3"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
-IUSE="static-libs python utils"
-
-RDEPEND="python? ( ${PYTHON_DEPS} )
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20140508-r5
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)"
-DEPEND="${RDEPEND}
-	python? ( dev-lang/swig )
-	sys-devel/flex
-	sys-devel/bison
-"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS=( ChangeLog )
-
-S=${WORKDIR}/${NL_P}
-
-MULTILIB_WRAPPED_HEADERS=(
-	# we do not install CLI stuff for non-native
-	/usr/include/libnl3/netlink/cli/addr.h
-	/usr/include/libnl3/netlink/cli/class.h
-	/usr/include/libnl3/netlink/cli/cls.h
-	/usr/include/libnl3/netlink/cli/ct.h
-	/usr/include/libnl3/netlink/cli/exp.h
-	/usr/include/libnl3/netlink/cli/link.h
-	/usr/include/libnl3/netlink/cli/neigh.h
-	/usr/include/libnl3/netlink/cli/qdisc.h
-	/usr/include/libnl3/netlink/cli/route.h
-	/usr/include/libnl3/netlink/cli/rule.h
-	/usr/include/libnl3/netlink/cli/tc.h
-	/usr/include/libnl3/netlink/cli/utils.h
-)
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-1.1-vlan-header.patch
-	epatch "${FILESDIR}"/${PN}-3.2.20-rtnl_tc_get_ops.patch
-	epatch "${FILESDIR}"/${PN}-3.2.20-cache-api.patch
-
-	elibtoolize
-
-	if use python; then
-		cd "${S}"/python || die
-		distutils-r1_src_prepare
-	fi
-
-	# out-of-source build broken
-	# https://github.com/thom311/libnl/pull/58
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	econf \
-		--disable-silent-rules \
-		$(use_enable static-libs static) \
-		$(multilib_native_use_enable utils cli)
-}
-
-multilib_src_compile() {
-	default
-
-	if multilib_is_native_abi && use python; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	emake DESTDIR="${D}" install
-
-	if multilib_is_native_abi && use python; then
-		# Unset DOCS= since distutils-r1.eclass interferes
-		local DOCS=()
-		cd python || die
-		distutils-r1_src_install
-	fi
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	prune_libtool_files --modules
-}

diff --git a/dev-libs/libnl/libnl-3.2.24.ebuild b/dev-libs/libnl/libnl-3.2.24.ebuild
deleted file mode 100644
index 54069f0..0000000
--- a/dev-libs/libnl/libnl-3.2.24.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 python3_{3,4} )
-DISTUTILS_OPTIONAL=1
-inherit distutils-r1 eutils libtool multilib
-
-NL_P=${P/_/-}
-
-DESCRIPTION="A collection of libraries providing APIs to netlink protocol based Linux kernel interfaces"
-HOMEPAGE="http://www.infradead.org/~tgr/libnl/"
-SRC_URI="
-	http://www.infradead.org/~tgr/${PN}/files/${NL_P}.tar.gz
-"
-LICENSE="LGPL-2.1 utils? ( GPL-2 )"
-SLOT="3"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
-IUSE="static-libs python utils"
-
-RDEPEND="python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
-	python? ( dev-lang/swig )
-	sys-devel/flex
-	sys-devel/bison
-"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS=( ChangeLog )
-
-S=${WORKDIR}/${NL_P}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${PN}-1.1-vlan-header.patch
-	epatch "${FILESDIR}"/${PN}-3.2.20-rtnl_tc_get_ops.patch
-	epatch "${FILESDIR}"/${PN}-3.2.20-cache-api.patch
-
-	elibtoolize
-
-	if use python; then
-		cd "${S}"/python || die
-		distutils-r1_src_prepare
-	fi
-}
-
-src_configure() {
-	econf \
-		--disable-silent-rules \
-		$(use_enable static-libs static) \
-		$(use_enable utils cli)
-
-	if use python; then
-		cd "${S}"/python || die
-		distutils-r1_src_configure
-	fi
-}
-
-src_compile() {
-	default
-
-	if use python; then
-		cd "${S}"/python || die
-		distutils-r1_src_compile
-	fi
-}
-
-src_install() {
-	default
-
-	if use python; then
-		# Unset DOCS= since distutils-r1.eclass interferes
-		DOCS=''
-		cd "${S}"/python || die
-		distutils-r1_src_install
-	fi
-
-	prune_libtool_files $(usex static-libs --modules --all)
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libnl/, dev-libs/libnl/files/
@ 2020-09-20 13:01 Jeroen Roovers
  0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2020-09-20 13:01 UTC (permalink / raw
  To: gentoo-commits

commit:     517511aef659389b22436c428726f022d1f74c9b
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 13:00:52 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 13:01:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=517511ae

dev-libs/libnl: Fix python byte-compiling

Package-Manager: Portage-3.0.7, Repoman-3.0.1
Fixes: 78ae57786c33fa78e0932185e30a8a0ab9faa75f
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 dev-libs/libnl/files/libnl-99999999-2to3.patch | 42 ++++++++++++++++++++++++++
 dev-libs/libnl/libnl-99999999.ebuild           | 28 +++++++++++------
 2 files changed, 61 insertions(+), 9 deletions(-)

diff --git a/dev-libs/libnl/files/libnl-99999999-2to3.patch b/dev-libs/libnl/files/libnl-99999999-2to3.patch
new file mode 100644
index 00000000000..66a16406d78
--- /dev/null
+++ b/dev-libs/libnl/files/libnl-99999999-2to3.patch
@@ -0,0 +1,42 @@
+--- a/python/netlink/route/links/bridge.py
++++ b/python/netlink/route/links/bridge.py
+@@ -6,7 +6,7 @@
+ 
+ """
+ 
+-from __future__ import absolute_import
++
+ 
+ from ... import core as netlink
+ from ..  import capi as capi
+@@ -19,10 +19,10 @@
+ 
+     def bridge_assert_ext_info(self):
+         if self._has_ext_info == False:
+-            print """
++            print("""
+             Please update your kernel to be able to call this method.
+             Your current kernel bridge version is too old to support this extention.
+-            """
++            """)
+             raise RuntimeWarning()
+ 
+     def port_state2str(self, state):
+--- a/doc/resolve-asciidoc-refs.py
++++ b/doc/resolve-asciidoc-refs.py
+@@ -22,4 +22,4 @@
+ 
+ rc = re.compile('|'.join(map(re.escape, sorted(refs, reverse=True))))
+ for line in open(sys.argv[1], 'r'):
+-	print rc.sub(translate, line),
++	print(rc.sub(translate, line), end=' ')
+--- a/doc/doxygen-link.py
++++ b/doc/doxygen-link.py
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env python
+ 
+-from __future__ import print_function
++
+ import fileinput
+ import re
+ import sys

diff --git a/dev-libs/libnl/libnl-99999999.ebuild b/dev-libs/libnl/libnl-99999999.ebuild
index 52f318b2f91..cf078de887a 100644
--- a/dev-libs/libnl/libnl-99999999.ebuild
+++ b/dev-libs/libnl/libnl-99999999.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 PYTHON_COMPAT=( python3_{6,7,8} )
 DISTUTILS_OPTIONAL=1
-inherit autotools distutils-r1 git-r3 libtool multilib multilib-minimal
+inherit autotools distutils-r1 git-r3 multilib-minimal
 
 DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
 HOMEPAGE="http://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl"
@@ -23,19 +23,16 @@ DEPEND="
 "
 BDEPEND="
 	${RDEPEND}
-	python? ( dev-lang/swig )
 	sys-devel/bison
 	sys-devel/flex
+	python? ( dev-lang/swig )
 "
-
 REQUIRED_USE="
 	python? ( ${PYTHON_REQUIRED_USE} )
 "
-
 DOCS=(
 	ChangeLog
 )
-
 MULTILIB_WRAPPED_HEADERS=(
 	# we do not install CLI stuff for non-native
 	/usr/include/libnl3/netlink/cli/addr.h
@@ -51,6 +48,9 @@ MULTILIB_WRAPPED_HEADERS=(
 	/usr/include/libnl3/netlink/cli/tc.h
 	/usr/include/libnl3/netlink/cli/utils.h
 )
+PATCHES=(
+	"${FILESDIR}"/${PN}-99999999-2to3.patch
+)
 
 src_prepare() {
 	default
@@ -58,8 +58,9 @@ src_prepare() {
 	eautoreconf
 
 	if use python; then
-		cd "${S}"/python || die
+		pushd "${S}"/python > /dev/null || die
 		distutils-r1_src_prepare
+		popd > /dev/null || die
 	fi
 
 	# out-of-source build broken
@@ -72,15 +73,17 @@ multilib_src_configure() {
 		$(multilib_native_use_enable utils cli) \
 		$(use_enable debug) \
 		$(use_enable static-libs static) \
-		$(use_enable threads)
+		$(use_enable threads) \
+		--disable-doc
 }
 
 multilib_src_compile() {
 	default
 
 	if multilib_is_native_abi && use python; then
-		cd python || die
+		pushd python > /dev/null || die
 		distutils-r1_src_compile
+		popd > /dev/null || die
 	fi
 }
 
@@ -90,8 +93,15 @@ multilib_src_install() {
 	if multilib_is_native_abi && use python; then
 		# Unset DOCS= since distutils-r1.eclass interferes
 		local DOCS=()
-		cd python || die
+
+		pushd python > /dev/null || die
+
 		distutils-r1_src_install
+
+		# For no obvious reason this is not done automatically
+		python_foreach_impl python_optimize
+
+		popd > /dev/null || die
 	fi
 }
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libnl/, dev-libs/libnl/files/
@ 2022-04-16  2:09 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-04-16  2:09 UTC (permalink / raw
  To: gentoo-commits

commit:     c7d8da15ca9547f2a88df43fa995e335e7a0c7fd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 16 02:07:53 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 02:09:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7d8da15

dev-libs/libnl: add 3.6.0 (unkeyworded)

Unkeyworded for now until test failure investigated (reported
upstream).

Bug: https://github.com/thom311/libnl/issues/308
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/libnl/Manifest                            |   1 +
 .../libnl/files/libnl-3.6.0-static-tests.patch     |  37 +++++++
 dev-libs/libnl/libnl-3.6.0.ebuild                  | 107 +++++++++++++++++++++
 3 files changed, 145 insertions(+)

diff --git a/dev-libs/libnl/Manifest b/dev-libs/libnl/Manifest
index a9a95c9c88d1..94fe71f27f45 100644
--- a/dev-libs/libnl/Manifest
+++ b/dev-libs/libnl/Manifest
@@ -1 +1,2 @@
 DIST libnl-3.5.0.tar.gz 967835 BLAKE2B cf21c1ffa89799b91bf4bddb8833d5af5c62eb1c53a078ee55a2888bd8439e1ae6db8886c9c4f937297962faac6873b4cf5211ee3d1e5354d96b5dc545a6fc2d SHA512 9c94c09bac34297493b3ea482713d7c0865d2839b5042e5c7d1ed008e2402ab63df35a18e272f40b2cce27d0c31dc733fe7e4b2d376e7ca847a2b0d5e90de50c
+DIST libnl-3.6.0.tar.gz 981921 BLAKE2B 4fbc1f6284dfbf0aaa855dfc3bb9774327254718257cf162c14574ece6b0da20f03a587830b21a2481d1da6e9c90482d71d8f9308f1eeafa605c90d0847a838c SHA512 7d1190ce94f43f5b18b1f7909221ca034d4ea5c8ed5735dbd27224d03e7f95d3c4e8ccdb611e33b58007729a21bfc0e23adc8758b112c712355664d87a81ce1b

diff --git a/dev-libs/libnl/files/libnl-3.6.0-static-tests.patch b/dev-libs/libnl/files/libnl-3.6.0-static-tests.patch
new file mode 100644
index 000000000000..be406705e1d7
--- /dev/null
+++ b/dev-libs/libnl/files/libnl-3.6.0-static-tests.patch
@@ -0,0 +1,37 @@
+From: Thomas Haller <thaller@redhat.com>
+Date: Fri, 15 Apr 2022 13:29:49 +0200
+Subject: [PATCH] build: avoid building check-direct with --disable-static
+
+"check-direct" needs to statically link with the libraries, because
+it wants to test internal ABI, which is hidden in the share libraries.
+When configuring with "--disable-static", static libs are not build
+and the test tool cannot be build.
+
+Just skip the test in that case.
+
+https://github.com/thom311/libnl/issues/306
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -984,8 +984,10 @@ tests_check_all_LDADD = \
+ 	$(NULL)
+ 
+ if WITH_CHECK
++if ENABLE_STATIC
+ check_programs += tests/check-direct
+ endif
++endif
+ 
+ tests_check_direct_SOURCES = \
+ 	tests/check-direct.c \
+--- a/configure.ac
++++ b/configure.ac
+@@ -107,6 +107,8 @@ else
+     AC_CHECK_LIB([pthread], [pthread_mutex_lock], [], AC_MSG_ERROR([libpthread is required]))
+ fi
+ 
++AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" != "no"])
++
+ AC_ARG_ENABLE([debug],
+ 	AS_HELP_STRING([--disable-debug], [Do not include debugging statements]),
+ 	[enable_debug="$enableval"], [enable_debug="yes"])
+

diff --git a/dev-libs/libnl/libnl-3.6.0.ebuild b/dev-libs/libnl/libnl-3.6.0.ebuild
new file mode 100644
index 000000000000..5c1aeb096def
--- /dev/null
+++ b/dev-libs/libnl/libnl-3.6.0.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_OPTIONAL=1
+inherit autotools distutils-r1 multilib-minimal
+
+LIBNL_P=${P/_/-}
+LIBNL_DIR=${PV/_/}
+LIBNL_DIR=${LIBNL_DIR//./_}
+
+DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
+HOMEPAGE="https://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl"
+SRC_URI="https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz"
+S="${WORKDIR}/${LIBNL_P}"
+
+LICENSE="LGPL-2.1 utils? ( GPL-2 )"
+SLOT="3"
+# Test failure: https://github.com/thom311/libnl/issues/308
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+debug python test utils"
+RESTRICT="!test? ( test )"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}
+	sys-devel/bison
+	sys-devel/flex
+	python? ( dev-lang/swig )
+	test? ( dev-libs/check )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DOCS=( ChangeLog )
+
+MULTILIB_WRAPPED_HEADERS=(
+	# we do not install CLI stuff for non-native
+	/usr/include/libnl3/netlink/cli/addr.h
+	/usr/include/libnl3/netlink/cli/class.h
+	/usr/include/libnl3/netlink/cli/cls.h
+	/usr/include/libnl3/netlink/cli/ct.h
+	/usr/include/libnl3/netlink/cli/exp.h
+	/usr/include/libnl3/netlink/cli/link.h
+	/usr/include/libnl3/netlink/cli/neigh.h
+	/usr/include/libnl3/netlink/cli/qdisc.h
+	/usr/include/libnl3/netlink/cli/route.h
+	/usr/include/libnl3/netlink/cli/rule.h
+	/usr/include/libnl3/netlink/cli/tc.h
+	/usr/include/libnl3/netlink/cli/utils.h
+)
+
+PATCHES=(
+	"${FILESDIR}"/${P}-static-tests.patch
+)
+
+src_prepare() {
+	default
+
+	eautoreconf
+
+	if use python; then
+		pushd "${S}"/python > /dev/null || die
+		distutils-r1_src_prepare
+		popd > /dev/null || die
+	fi
+}
+
+multilib_src_configure() {
+	ECONF_SOURCE="${S}" econf \
+		$(multilib_native_use_enable utils cli) \
+		$(use_enable debug)
+}
+
+multilib_src_compile() {
+	default
+
+	if multilib_is_native_abi && use python ; then
+		pushd python > /dev/null || die
+		distutils-r1_src_compile
+		popd > /dev/null || die
+	fi
+}
+
+multilib_src_install() {
+	default
+
+	if multilib_is_native_abi && use python ; then
+		# Unset DOCS= since distutils-r1.eclass interferes
+		local DOCS=()
+
+		pushd python > /dev/null || die
+
+		distutils-r1_src_install
+
+		# For no obvious reason this is not done automatically
+		python_foreach_impl python_optimize
+
+		popd > /dev/null || die
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	find "${ED}" -name '*.la' -delete || die
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libnl/, dev-libs/libnl/files/
@ 2022-04-21 23:02 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-04-21 23:02 UTC (permalink / raw
  To: gentoo-commits

commit:     4d6d5918a4ed8600271110fcc9e3fe5e96062af6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 21 23:01:49 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 23:01:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d6d5918

dev-libs/libnl: keyword 3.6.0 (w/ test fixes)

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libnl-3.6.0-test-fixes-sandbox.patch     | 160 +++++++++++++++++++++
 dev-libs/libnl/libnl-3.6.0.ebuild                  |   8 +-
 2 files changed, 164 insertions(+), 4 deletions(-)

diff --git a/dev-libs/libnl/files/libnl-3.6.0-test-fixes-sandbox.patch b/dev-libs/libnl/files/libnl-3.6.0-test-fixes-sandbox.patch
new file mode 100644
index 000000000000..deb60069955c
--- /dev/null
+++ b/dev-libs/libnl/files/libnl-3.6.0-test-fixes-sandbox.patch
@@ -0,0 +1,160 @@
+https://github.com/thom311/libnl/issues/308
+https://github.com/thom311/libnl/commit/85e3c5d423a0ab8f8414f892998323c886484725
+https://github.com/thom311/libnl/commit/ec712a4514e667b6f7fc3a54a10d4d4f65d1b5c7
+https://github.com/thom311/libnl/commit/7577266c03ddbf42257f6c43f42e5837a2671038
+
+From 85e3c5d423a0ab8f8414f892998323c886484725 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Thu, 21 Apr 2022 08:39:51 +0200
+Subject: [PATCH] tests: add _assert_nltst_netns() helper
+
+--- a/tests/nl-test-util.c
++++ b/tests/nl-test-util.c
+@@ -25,6 +25,14 @@ struct nltst_netns {
+ 
+ /*****************************************************************************/
+ 
++#define _assert_nltst_netns(nsdata)                                            \
++	do {                                                                   \
++		const struct nltst_netns *_nsdata = (nsdata);                  \
++                                                                               \
++		ck_assert_ptr_nonnull(_nsdata);                                \
++		ck_assert_int_eq(_nsdata->canary, _CANARY);                    \
++	} while (0)
++
+ static struct {
+ 	struct nltst_netns *nsdata;
+ } _netns_fixture_global;
+@@ -34,12 +42,12 @@ void nltst_netns_fixture_setup(void)
+ 	ck_assert(!_netns_fixture_global.nsdata);
+ 
+ 	_netns_fixture_global.nsdata = nltst_netns_enter();
+-	ck_assert(_netns_fixture_global.nsdata);
++	_assert_nltst_netns(_netns_fixture_global.nsdata);
+ }
+ 
+ void nltst_netns_fixture_teardown(void)
+ {
+-	ck_assert(_netns_fixture_global.nsdata);
++	_assert_nltst_netns(_netns_fixture_global.nsdata);
+ 	_nl_clear_pointer(&_netns_fixture_global.nsdata, nltst_netns_leave);
+ }
+ 
+From ec712a4514e667b6f7fc3a54a10d4d4f65d1b5c7 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Thu, 21 Apr 2022 08:41:03 +0200
+Subject: [PATCH] tests: cleanup unshare_user() and use _nltst_fclose()
+
+--- a/tests/nl-test-util.c
++++ b/tests/nl-test-util.c
+@@ -65,24 +65,27 @@ static void unshare_user(void)
+ 	_nltst_assert_errno(r == 0);
+ 
+ 	/* Since Linux 3.19 we have to disable setgroups() in order to map users.
+-     * Just proceed if the file is not there. */
++	 * Just proceed if the file is not there. */
+ 	f = fopen("/proc/self/setgroups", "we");
+ 	if (f) {
+-		fprintf(f, "deny");
+-		fclose(f);
++		r = fprintf(f, "deny");
++		_nltst_assert_errno(r > 0);
++		_nltst_fclose(f);
+ 	}
+ 
+ 	/* Map current UID to root in NS to be created. */
+ 	f = fopen("/proc/self/uid_map", "we");
+-	ck_assert(f);
+-	fprintf(f, "0 %d 1", uid);
+-	fclose(f);
++	_nltst_assert_errno(f);
++	r = fprintf(f, "0 %d 1", uid);
++	_nltst_assert_errno(r > 0);
++	_nltst_fclose(f);
+ 
+ 	/* Map current GID to root in NS to be created. */
+ 	f = fopen("/proc/self/gid_map", "we");
+-	ck_assert(f);
+-	fprintf(f, "0 %d 1", gid);
+-	fclose(f);
++	_nltst_assert_errno(f);
++	r = fprintf(f, "0 %d 1", gid);
++	_nltst_assert_errno(r > 0);
++	_nltst_fclose(f);
+ }
+ 
+ struct nltst_netns *nltst_netns_enter(void)
+--- a/tests/nl-test-util.h
++++ b/tests/nl-test-util.h
+@@ -34,6 +34,14 @@
+ 		_nltst_assert_errno(_r == 0);                                  \
+ 	} while (0)
+ 
++#define _nltst_fclose(f)                                                       \
++	do {                                                                   \
++		int _r;                                                        \
++                                                                               \
++		_r = fclose((f));                                              \
++		_nltst_assert_errno(_r == 0);                                  \
++	} while (0)
++
+ /*****************************************************************************/
+ 
+ void nltst_netns_fixture_setup(void);
+From 7577266c03ddbf42257f6c43f42e5837a2671038 Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Thu, 21 Apr 2022 08:42:35 +0200
+Subject: [PATCH] tests: silently ignore EACCES for setting uid_map for test
+ namespace
+
+Seems this can happen, but we probably can just continue with the
+unit test. Just ignore the error.
+
+https://github.com/thom311/libnl/issues/ ## 308
+--- a/tests/nl-test-util.c
++++ b/tests/nl-test-util.c
+@@ -53,7 +53,7 @@ void nltst_netns_fixture_teardown(void)
+ 
+ /*****************************************************************************/
+ 
+-static void unshare_user(void)
++static bool unshare_user(void)
+ {
+ 	const uid_t uid = geteuid();
+ 	const gid_t gid = getegid();
+@@ -75,7 +75,11 @@ static void unshare_user(void)
+ 
+ 	/* Map current UID to root in NS to be created. */
+ 	f = fopen("/proc/self/uid_map", "we");
+-	_nltst_assert_errno(f);
++	if (!f) {
++		if (errno == EACCES)
++			return false;
++		_nltst_assert_errno(f);
++	}
+ 	r = fprintf(f, "0 %d 1", uid);
+ 	_nltst_assert_errno(r > 0);
+ 	_nltst_fclose(f);
+@@ -86,6 +90,7 @@ static void unshare_user(void)
+ 	r = fprintf(f, "0 %d 1", gid);
+ 	_nltst_assert_errno(r > 0);
+ 	_nltst_fclose(f);
++	return true;
+ }
+ 
+ struct nltst_netns *nltst_netns_enter(void)
+@@ -96,8 +101,12 @@ struct nltst_netns *nltst_netns_enter(void)
+ 	nsdata = calloc(1, sizeof(struct nltst_netns));
+ 	ck_assert(nsdata);
+ 
+-	nsdata->canary = _CANARY;
++	*nsdata = (struct nltst_netns){
++		.canary = _CANARY,
++	};
+ 
++	/* unshare_user() might fail to set uid_map/gid_map due to sandboxing.
++	 * We ignore that error and proceed. The test will possibly still work. */
+ 	unshare_user();
+ 
+ 	r = unshare(CLONE_NEWNET | CLONE_NEWNS);
+

diff --git a/dev-libs/libnl/libnl-3.6.0.ebuild b/dev-libs/libnl/libnl-3.6.0.ebuild
index 5c1aeb096def..ab759e51347b 100644
--- a/dev-libs/libnl/libnl-3.6.0.ebuild
+++ b/dev-libs/libnl/libnl-3.6.0.ebuild
@@ -18,8 +18,7 @@ S="${WORKDIR}/${LIBNL_P}"
 
 LICENSE="LGPL-2.1 utils? ( GPL-2 )"
 SLOT="3"
-# Test failure: https://github.com/thom311/libnl/issues/308
-#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
 IUSE="+debug python test utils"
 RESTRICT="!test? ( test )"
 
@@ -32,8 +31,6 @@ BDEPEND="${RDEPEND}
 	test? ( dev-libs/check )"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
-DOCS=( ChangeLog )
-
 MULTILIB_WRAPPED_HEADERS=(
 	# we do not install CLI stuff for non-native
 	/usr/include/libnl3/netlink/cli/addr.h
@@ -52,6 +49,7 @@ MULTILIB_WRAPPED_HEADERS=(
 
 PATCHES=(
 	"${FILESDIR}"/${P}-static-tests.patch
+	"${FILESDIR}"/${P}-test-fixes-sandbox.patch
 )
 
 src_prepare() {
@@ -101,6 +99,8 @@ multilib_src_install() {
 }
 
 multilib_src_install_all() {
+	DOCS=( ChangeLog )
+
 	einstalldocs
 
 	find "${ED}" -name '*.la' -delete || die


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

end of thread, other threads:[~2022-04-21 23:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19  5:11 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libnl/, dev-libs/libnl/files/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2020-09-20 13:01 Jeroen Roovers
2022-04-16  2:09 Sam James
2022-04-21 23:02 Sam James

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