summaryrefslogtreecommitdiff
path: root/dev-libs/libnl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /dev-libs/libnl
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'dev-libs/libnl')
-rw-r--r--dev-libs/libnl/Manifest6
-rw-r--r--dev-libs/libnl/files/libnl-3.6.0-test-fixes-sandbox.patch160
-rw-r--r--dev-libs/libnl/files/libnl-99999999-2to3.patch42
-rw-r--r--dev-libs/libnl/libnl-3.6.0-r1.ebuild (renamed from dev-libs/libnl/libnl-3.6.0.ebuild)9
-rw-r--r--dev-libs/libnl/libnl-99999999.ebuild7
5 files changed, 170 insertions, 54 deletions
diff --git a/dev-libs/libnl/Manifest b/dev-libs/libnl/Manifest
index c18f93545f0a..46bc67af4543 100644
--- a/dev-libs/libnl/Manifest
+++ b/dev-libs/libnl/Manifest
@@ -1,8 +1,8 @@
AUX libnl-3.6.0-static-tests.patch 1100 BLAKE2B 1542484bd0e87fa20587f3f8507d9d1b9ee44b0aceecfb1358eb737140f42ac34c519da0585e65773d3bca27b6e4f73fc28d19cab6698c51178e9b73dfe8629e SHA512 eaf3f6cd77179cd4e6e0890443cb6fc6d572c71db1c48ce61729a06c6555bff414e1a5bf771eab01634e61686e9ebf7fa20ade6f9f1e96a3290345c95da6ca23
-AUX libnl-99999999-2to3.patch 1082 BLAKE2B d3749aa9cf5fd7a2e255ebf6e7ab6c59c81da86fe419ef36b58a9fb14173a9944e7252e64c1a72ccbf9ca9a42f558642548e5247f900344df1bf2f2d54ebac86 SHA512 75796506b16e0953d7fb22d600b747eb48c900badacda665740302002ce112e1cbebd44061158e0557e829c3c16a06917d2acfdb2f450211834de14643112a66
+AUX libnl-3.6.0-test-fixes-sandbox.patch 5394 BLAKE2B 96f4c5f9f0eab96f164aa04a68a28941962e0e25444c5731e1d040680b2466d440beaeab7831b658f72ff2b1b4d9779f75b9700891bbe79618d3f23cd2d34c17 SHA512 e09340c6a3a8a2e95582d474b56736db379cb72318906a97aa1d15e573c31d005cca6879680f121df5d28faa7c670803099fd29d22fc58a016ee6fb0f20fc664
DIST libnl-3.5.0.tar.gz 967835 BLAKE2B cf21c1ffa89799b91bf4bddb8833d5af5c62eb1c53a078ee55a2888bd8439e1ae6db8886c9c4f937297962faac6873b4cf5211ee3d1e5354d96b5dc545a6fc2d SHA512 9c94c09bac34297493b3ea482713d7c0865d2839b5042e5c7d1ed008e2402ab63df35a18e272f40b2cce27d0c31dc733fe7e4b2d376e7ca847a2b0d5e90de50c
DIST libnl-3.6.0.tar.gz 981921 BLAKE2B 4fbc1f6284dfbf0aaa855dfc3bb9774327254718257cf162c14574ece6b0da20f03a587830b21a2481d1da6e9c90482d71d8f9308f1eeafa605c90d0847a838c SHA512 7d1190ce94f43f5b18b1f7909221ca034d4ea5c8ed5735dbd27224d03e7f95d3c4e8ccdb611e33b58007729a21bfc0e23adc8758b112c712355664d87a81ce1b
EBUILD libnl-3.5.0.ebuild 2381 BLAKE2B e054756ad522c3cfe593baf45854e6e4a8e669d26ec2027adf30cb537442f14d77b06493fdab911503d4e08045b1c2c9c4302ce9f892e17e221e77d82eabf2b5 SHA512 c99854fbf768e9e5f140fa8f4c88a1549272ba3c9a8200318016b1dbcaa03502527caeb1d26ed917c38958216eb0f3141a722bfc543c9a969e477fc7febd68a1
-EBUILD libnl-3.6.0.ebuild 2606 BLAKE2B 9d14b7426d68b9ec4b847b207f09f40079bfc20f5c52d616ecfdbe7b7c80637af19e68e85b37ad4156aa9ed98b131215e0acbae2e32e1756a31d56f50ffa43fd SHA512 af09f8e9247961e4b5aa049a0087bced21da0a352bd38f736a5b7db4fde474cb518636b4073f9ed9ebdc5aab2ee0285f92226f5bcd53055c027656d6de46b67b
-EBUILD libnl-99999999.ebuild 2402 BLAKE2B 686bd0c10f0e881efe5587d244311f06efd6eb6ecc7a307f1be85c08b6b1173468b0e42576d7376ef08cafa3fda00956c63a07eeb29f036bdcbcd04299ecd623 SHA512 8f83dc6706a7ba4aa42b5411a36ed8d9d18b3db2de0b34405ae2d925bb5944550726ed2a35c32f1d4353628341c13065cbe3ddb69bc611e456e8ba6111706bf5
+EBUILD libnl-3.6.0-r1.ebuild 2637 BLAKE2B 147ee4f4e9e1aa98757c25118761bb2ca9910ee0b07c3452c026d177c0e4a71ac70a55fca49fe77b6d3ff6d1c9074277e1116593ce4a9bc9d349ab58da0111c5 SHA512 e926f00e85bdfa2f115a55ec22f8de09f842dad726c8b0298c445258fb173f2e66c3d54bd7ede5266f248b33037c9b19c0a08ad01fb2a0d61ba3947d78bd1d7c
+EBUILD libnl-99999999.ebuild 2387 BLAKE2B a353e62759550ccf4ef6423c72679aa9a233f202cee3bb0f96579d8fb69347a1c29ededa8facc67989c852c746307bf3fef6adb1d846c10b74ee91a36c8164f6 SHA512 284f5f2425994144ee479f64a99560b398c77771ba4c747bc1648411d8d68b345cce7c0fe578965910c18eedccb9e245660a8983bae8db49c9744cb2a0fcf8ed
MISC metadata.xml 525 BLAKE2B 62918f4b184a0636f9dbe24a31978ceccf354610b2b8d6db040440f5b519f5a7d710861b94671fd1c684da40e2a9df8563093509e7de9318c891e7c93567b7bf SHA512 076a06cff6803de3775cb295688cbe61831e79e3fa2d7a7e53b376a2c0a5137b349db153692b4cfa22ce6121d9e0579253dee06056076e9aec6f09aaf7a41387
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/files/libnl-99999999-2to3.patch b/dev-libs/libnl/files/libnl-99999999-2to3.patch
deleted file mode 100644
index 66a16406d780..000000000000
--- a/dev-libs/libnl/files/libnl-99999999-2to3.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- 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-3.6.0.ebuild b/dev-libs/libnl/libnl-3.6.0-r1.ebuild
index 5c1aeb096def..9d5b621e07b0 100644
--- a/dev-libs/libnl/libnl-3.6.0.ebuild
+++ b/dev-libs/libnl/libnl-3.6.0-r1.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 ~loong ~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
@@ -42,6 +39,7 @@ MULTILIB_WRAPPED_HEADERS=(
/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/mdb.h
/usr/include/libnl3/netlink/cli/neigh.h
/usr/include/libnl3/netlink/cli/qdisc.h
/usr/include/libnl3/netlink/cli/route.h
@@ -52,6 +50,7 @@ MULTILIB_WRAPPED_HEADERS=(
PATCHES=(
"${FILESDIR}"/${P}-static-tests.patch
+ "${FILESDIR}"/${P}-test-fixes-sandbox.patch
)
src_prepare() {
@@ -101,6 +100,8 @@ multilib_src_install() {
}
multilib_src_install_all() {
+ DOCS=( ChangeLog )
+
einstalldocs
find "${ED}" -name '*.la' -delete || die
diff --git a/dev-libs/libnl/libnl-99999999.ebuild b/dev-libs/libnl/libnl-99999999.ebuild
index 0afdbd9d360f..0cfee098abde 100644
--- a/dev-libs/libnl/libnl-99999999.ebuild
+++ b/dev-libs/libnl/libnl-99999999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -38,6 +38,7 @@ MULTILIB_WRAPPED_HEADERS=(
/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/mdb.h
/usr/include/libnl3/netlink/cli/neigh.h
/usr/include/libnl3/netlink/cli/qdisc.h
/usr/include/libnl3/netlink/cli/route.h
@@ -46,10 +47,6 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libnl3/netlink/cli/utils.h
)
-PATCHES=(
- "${FILESDIR}"/${PN}-99999999-2to3.patch
-)
-
src_prepare() {
default