summaryrefslogtreecommitdiff
path: root/net-libs/xdp-tools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-10 10:26:59 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-10 10:26:59 +0100
commit870be9524d5a85e6be7803b3f4eae71fd93cb530 (patch)
tree69e71d2202044c302e1f9209a0a40d7418d8e48d /net-libs/xdp-tools
parent9e8f96c1b33dc01bc5dfbed0cfb2702bb299f1e0 (diff)
gentoo auto-resync : 10:07:2023 - 10:26:59
Diffstat (limited to 'net-libs/xdp-tools')
-rw-r--r--net-libs/xdp-tools/Manifest3
-rw-r--r--net-libs/xdp-tools/files/1.4.0-toolchain.patch57
-rw-r--r--net-libs/xdp-tools/xdp-tools-1.4.0.ebuild87
3 files changed, 147 insertions, 0 deletions
diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 76b16ce4d846..f7c74acbbf62 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -3,8 +3,11 @@ AUX 1.3.1-fix-btf__type_cnt-detection.patch 1750 BLAKE2B 7086a709a02f7ea00c70937
AUX 1.3.1-musl.patch 869 BLAKE2B bfa1d267d6e9129943a3f6ac2c92d43d301d642435e756537324565b7a0f7d49ca77a966a4c2cb76a9300d189cf376da2aeed1ec5340ed92e03b230a48602378 SHA512 5e729cf3f75467a865c75cd0087a44179007df420d48e7658a5e6b9b15f10d97c9ff592bb951f83bced408602f068d15458dc35c2f7ada21a843c2aa3c454609
AUX 1.3.1-no-Werror.patch 2521 BLAKE2B e424b9fb203b78d45f49c5a1264c01509b6da2a95914ca713e43d9e444a5a3b360323b44bdba547035dff46d880197626eb0999532772c5f2757205c280ff272 SHA512 06a10e5c7bf4bf841dfab692c9dc18b8d1a1730426f4ef92de278a604a98aa7833dff547fd6ecc284d0f0111c0e1011bd8d14315451f0e5963ca64264e8891b7
AUX 1.3.1-xdpdump-clang.patch 1381 BLAKE2B 860f505dbef740aded6440d53e864cb82714ccd2ca0d475f0c0faab7228c0f9ccc88ee627b4708732f49016fcc2507cf1d2470d17864a521218e4111332a420f SHA512 d380f948fdca80a5816432f39f54263c11a6d4589af10e85a9f25d8de1d0b8d1fb0f6c8fe0c424fbee9fb43b8bf8000f7d1fea1a0d5418bacc62c2321780d7f2
+AUX 1.4.0-toolchain.patch 2479 BLAKE2B c907fa98fff2ad93d0f72d75237bff6fc7aab05e10e76d5b30555b0a7d64f6012f1555d806acf0127019d0ec2f39eeeb7741d62bf858ab1d9da5e9c85fc33c48 SHA512 6321960eca342a2d89e2118c0c8826dd415871e79e9f7685e1d4b44d1e2af987cc7a4c893c1b98578df8075e0705d1279131c6e2356ca5fd86d4c3d8ba22495d
DIST xdp-tools-1.2.8.tar.gz 253786 BLAKE2B f745085b73da5193c3cdaf60c20dfa5de62f3d83487413c87b4c3d07b755dcf91cfbeb4ba970b4e04eef74b4cec4238057f4462074f49b7139d7652cb0f22998 SHA512 6ada9e433fcbefd13cebdffe93c3ce9159e9e09f1498d1615918ca6ecc4f11f03fcd9096980e8ceb7de126d4d8b953fa64917e777d54b5a3dfd1a9556de81626
DIST xdp-tools-1.3.1.tar.gz 330516 BLAKE2B 89a61f47ba26efe6d0630d971e913e034d111d05c896e5af1bb28e6cb4e94133e6ecd827a10ee12a935ae2e6856f04556ac564ded1bcc65182766d656f8d0c5f SHA512 9dd434095a043158d14fb6829fa632fc4a0714dc0b6e08c219dfb55cb9f34005300db750115e08bd54210e90142bd499904616da077b8aa827e4de28c31be637
+DIST xdp-tools-1.4.0.tar.gz 337221 BLAKE2B 008dda0fcfd403e47ab2b8c801fc0a5c4e103fb3b9869f1d1bf5af258fc646dd5a0285d3126c012c9b81805408b9669da886b9fcf2fdf33b256f74bbf898222a SHA512 c17bd6e9e6e4cf59c33f4b9ae4e3e0434863d147abf80f87b425215261b96d4574898fa09cc2b201a427a5e9d49ad64d0c70e50e3f72e3a18c6fbdf7f4cd4a3a
EBUILD xdp-tools-1.2.8.ebuild 1261 BLAKE2B 800efd8b697d0fe6e2e5fae5c34deb9b299aec42a4aa437b43a63cce77356c0d71107728a369287910f2d5948a24cf467518c3ce7809edbdf2baee27338b5d69 SHA512 40847494eeac46981c8a5beb41ea321a31656d37fd94b0cdeb010c1f084a6bd06d1bf61f3bc7ce319ba59b27eb82781e2922b4f33f317f4a26e42fcfca7a0faf
EBUILD xdp-tools-1.3.1-r3.ebuild 2101 BLAKE2B c6cc87b206a6f3c52bf983a6c82c934b35d5007059eac8051744fa4e95ea9759660301e7d38b4319e614482ad1562196c384794c7143e314439824dec4d2aab4 SHA512 530d8daa9a09c01edbf33d5c429cf623e7f72e8305c526e71aeac0b463abfa25f7872025f0f8081a41bbd91499745debe07f42161cbed3219d94fa785e1b23f5
+EBUILD xdp-tools-1.4.0.ebuild 2009 BLAKE2B d9fc071173beee1fa14bcbdc442961efdac56327561861b3f7286958a53120ed7402837825c2b2a2debd6d423a6b2a3e4ac24425cf9ffeb412882dbacbd6d691 SHA512 40bcce099c33ea3877c48256f184d1779a0c3ae0710ffd4e400dc77f924f4cc6773987b507f7f20b7a563b12be7c63d212162cb62aa16cd92ae8df7459732ff9
MISC metadata.xml 448 BLAKE2B 5e76000a49c2578dc872010907deab803bf25d58e5383b81f8953f3ac8549f017895c7afa39a2b8c3eb47efb66c5c322177032542cdffec41de733502da41ce4 SHA512 4010fb44ad655a9c58e3328623652d2f6c10aee934daeaaa2c5738c44b086cc2674e011e5de0b6e6a058c24131a16be679e971a692800458492cf3addbd761c2
diff --git a/net-libs/xdp-tools/files/1.4.0-toolchain.patch b/net-libs/xdp-tools/files/1.4.0-toolchain.patch
new file mode 100644
index 000000000000..d4bcb511310f
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.4.0-toolchain.patch
@@ -0,0 +1,57 @@
+
+Patch from: https://github.com/xdp-project/xdp-tools/pull/341
+
+From b1377b35cd05daf4d3afc3d59839e9889a642ffb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
+Date: Sat, 8 Jul 2023 12:34:20 +0200
+Subject: [PATCH] libxdp: don't use direct call to readelf for symbol table
+ comparison
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Gentoo CI previously reported symbol mismatches in libxdp
+(see #302 and https://bugs.gentoo.org/899742). This was
+caused by a direct call to 'readelf' instead of using the
+command injected by the environment/toolchain.
+The fix is simple: use $(READELF).
+
+Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
+---
+ lib/libxdp/Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
+index 43de3e8a..532e0687 100644
+--- a/lib/libxdp/Makefile
++++ b/lib/libxdp/Makefile
+@@ -93,12 +93,12 @@ $(SHARED_OBJDIR)/%.o: %.c $(EXTRA_LIB_DEPS) | $(SHARED_OBJDIR)
+
+ XDP_IN_SHARED := $(SHARED_OBJDIR)/libxdp.o $(SHARED_OBJDIR)/xsk.o
+
+-GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(XDP_IN_SHARED) | \
++GLOBAL_SYM_COUNT = $(shell $(READELF) -s --wide $(XDP_IN_SHARED) | \
+ cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | \
+ sed 's/\[.*\]//' | \
+ awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \
+ sort -u | wc -l)
+-VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OBJDIR)/libxdp.so | \
++VERSIONED_SYM_COUNT = $(shell $(READELF) --dyn-syms --wide $(OBJDIR)/libxdp.so | \
+ grep -Eo '[^ ]+@LIBXDP_' | cut -d@ -f1 | sort -u | wc -l)
+
+ check: $(CHECK_RULES)
+@@ -110,12 +110,12 @@ check_abi: $(OBJDIR)/libxdp.so
+ "versioned symbols in $^ ($(VERSIONED_SYM_COUNT))." \
+ "Please make sure all symbols are" \
+ "versioned in $(VERSION_SCRIPT)." >&2; \
+- readelf -s --wide $(XDP_IN_SHARED) | \
++ $(READELF) -s --wide $(XDP_IN_SHARED) | \
+ cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | \
+ sed 's/\[.*\]//' | \
+ awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'| \
+ sort -u > $(OUTPUT)libxdp_global_syms.tmp; \
+- readelf --dyn-syms --wide $(OUTPUT)libxdp.so | \
++ $(READELF) --dyn-syms --wide $(OUTPUT)libxdp.so | \
+ grep -Eo '[^ ]+@LIBXDP_' | cut -d@ -f1 | \
+ sort -u > $(OUTPUT)libxdp_versioned_syms.tmp; \
+ diff -u $(OUTPUT)libxdp_global_syms.tmp \
diff --git a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
new file mode 100644
index 000000000000..9df2ff21f8ae
--- /dev/null
+++ b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic
+
+DESCRIPTION="The libxdp library and various tools for use with XDP"
+HOMEPAGE="https://github.com/xdp-project/xdp-tools"
+SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="+tools"
+
+DEPEND="
+ dev-libs/libbpf:=
+ dev-util/bpftool
+ net-libs/libpcap
+ sys-libs/zlib
+ virtual/libelf
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ sys-apps/grep[pcre]
+ >=sys-devel/clang-11.0.0
+"
+
+# Not prebuilt -- we build them -- but they're not ordinary ELF objects either.
+QA_PREBUILT="usr/lib/bpf/*.o"
+
+MAKEOPTS+=" V=1"
+
+PATCHES=(
+ "${FILESDIR}"/1.3.1-no-Werror.patch
+ "${FILESDIR}"/${PV}-toolchain.patch
+)
+
+src_configure() {
+ export CC="$(tc-getCC)"
+ export LD="$(tc-getLD)"
+ export PREFIX="${EPREFIX}/usr"
+ export LIBDIR="${PREFIX}/$(get_libdir)"
+ export BPF_OBJECT_DIR="${PREFIX}/lib/bpf"
+ export PRODUCTION=1
+ export DYNAMIC_LIBXDP=1
+ export FORCE_SYSTEM_LIBBPF=1
+
+ # bug 861587
+ filter-lto
+
+ default
+}
+
+src_test() { :; }
+
+src_install() {
+ default
+
+ # To remove the scripts/testing files that are installed.
+ rm -r "${ED}/usr/share/xdp-tools" || die
+ # We can't control static archive generation yet.
+ rm "${ED}/usr/$(get_libdir)/libxdp.a" || die
+
+ use tools || { rm "${ED}/usr/sbin"/* || die; }
+
+ # These are ELF objects but BPF ones.
+ dostrip -x /usr/lib/bpf
+}
+
+pkg_postinst() {
+ elog
+ elog "Many BPF utilities need access to a mounted bpffs virtual file system."
+ elog "Either mount it manually like this:"
+ elog
+ elog " mount bpffs /sys/fs/bpf -t bpf -o nosuid,nodev,noexec,relatime,mode=700"
+ elog
+ elog "or add the following line to your /etc/fstab to always mount it at boot time:"
+ elog
+ elog " bpffs /sys/fs/bpf bpf nosuid,nodev,noexec,relatime,mode=700 0 0"
+ elog
+ elog "You can verify that bpffs is mounted with:"
+ elog
+ elog " mount | grep /sys/fs/bpf"
+ elog
+}