diff options
author | Kurt Kanzenbach <kurt@kmk-computers.de> | 2021-04-24 12:38:29 +0200 |
---|---|---|
committer | Kurt Kanzenbach <kurt@kmk-computers.de> | 2021-04-24 12:40:30 +0200 |
commit | 10fdc366340d7e164747ecc6896ded7fb37c195b (patch) | |
tree | ef1a9de11deba1ae46c4a716c8ff22c27fbbb503 /dev-util/xdp-tools | |
parent | games-board/rmahjong: fix pass system CC and CFLAGS (diff) | |
download | guru-10fdc366340d7e164747ecc6896ded7fb37c195b.tar.gz guru-10fdc366340d7e164747ecc6896ded7fb37c195b.tar.bz2 guru-10fdc366340d7e164747ecc6896ded7fb37c195b.zip |
dev-util/xdp-tools: Bump to v1.1.1
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
Diffstat (limited to 'dev-util/xdp-tools')
-rw-r--r-- | dev-util/xdp-tools/Manifest | 1 | ||||
-rw-r--r-- | dev-util/xdp-tools/files/xdp-tools-1.1.1-install.patch | 23 | ||||
-rw-r--r-- | dev-util/xdp-tools/files/xdp-tools-1.1.1-readelf.patch | 51 | ||||
-rw-r--r-- | dev-util/xdp-tools/xdp-tools-1.1.1.ebuild | 75 |
4 files changed, 150 insertions, 0 deletions
diff --git a/dev-util/xdp-tools/Manifest b/dev-util/xdp-tools/Manifest index 2919fe527..0362a71ee 100644 --- a/dev-util/xdp-tools/Manifest +++ b/dev-util/xdp-tools/Manifest @@ -1 +1,2 @@ DIST xdp-tools-1.1.0.tar.gz 157577 BLAKE2B 219219898cf83c72dd07ef64b3eda889ca2825ae9f21ab7714020fbc467ef37a4df978ee0c7eef45c1ebd43370ff71f43d1dab0d11507d80de3cbf39d45cab16 SHA512 31165f932dcdf8181c012500e2dc27118860d8733932ab253d02dd07a436c0ef1f5bc3253e6def716b10ff50b37854bb5e9679cc38adec27c3366823c8656232 +DIST xdp-tools-1.1.1.tar.gz 171627 BLAKE2B 5a2009f8b171d23a0f9b91b119e4376aecdddeb6d84c4323f05c03b382d4161c0d0364ef7a34b55771fe76c920b5bb18fe46c12d15c5356db6dc34174c5e5438 SHA512 580e87d7bfa7ee5b48caebceac4928386c3e3157ebb8d5cf1dd11a98187b9d17d027ef99f6598ce9b74eed7eb9b307195c4baa199675233d06c76bc8dc4861e5 diff --git a/dev-util/xdp-tools/files/xdp-tools-1.1.1-install.patch b/dev-util/xdp-tools/files/xdp-tools-1.1.1-install.patch new file mode 100644 index 000000000..a02fb50f1 --- /dev/null +++ b/dev-util/xdp-tools/files/xdp-tools-1.1.1-install.patch @@ -0,0 +1,23 @@ +From 1de19829622cf394a6154834955379e7e45e0cb8 Mon Sep 17 00:00:00 2001 +From: Kurt Kanzenbach <kurt@kmk-computers.de> +Date: Fri, 10 Apr 2020 15:39:13 +0200 +Subject: [PATCH] lib: xdp: make: Don't install static libs + +Don't install static libs. + +Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> +--- + lib/libxdp/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/lib/libxdp/Makefile ++++ b/lib/libxdp/Makefile +@@ -49,7 +49,7 @@ install: all + $(Q)install -d -m 0755 $(DESTDIR)$(BPF_OBJECT_DIR) + $(Q)install -m 0644 $(LIB_HEADERS) $(DESTDIR)$(HDRDIR)/ + $(Q)install -m 0644 $(PC_FILE) $(DESTDIR)$(LIBDIR)/pkgconfig/ +- $(Q)cp -fpR $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR) ++ $(Q)cp -fpR $(SHARED_LIBS) $(DESTDIR)$(LIBDIR) + $(Q)install -m 0755 $(XDP_OBJS) $(DESTDIR)$(BPF_OBJECT_DIR) + $(if $(MAN_FILES),$(Q)install -m 0755 -d $(DESTDIR)$(MANDIR)/man3) + $(if $(MAN_FILES),$(Q)install -m 0644 $(MAN_FILES) $(DESTDIR)$(MANDIR)/man3) diff --git a/dev-util/xdp-tools/files/xdp-tools-1.1.1-readelf.patch b/dev-util/xdp-tools/files/xdp-tools-1.1.1-readelf.patch new file mode 100644 index 000000000..2330e549d --- /dev/null +++ b/dev-util/xdp-tools/files/xdp-tools-1.1.1-readelf.patch @@ -0,0 +1,51 @@ +From: Kurt Kanzenbach <kurt@kmk-computers.de> +Subject: lib: xdp: make: Fix hardcoded readelf + +Don't hardcode readelf. Allow to reuse something else. + +Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de> +--- + lib/libxdp/Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/lib/libxdp/Makefile ++++ b/lib/libxdp/Makefile +@@ -26,7 +26,7 @@ TEMPLATED_SOURCES := xdp-dispatcher.c + + CFLAGS += -I$(HEADER_DIR) -I$(LIB_DIR)/util + BPF_CFLAGS += -I$(HEADER_DIR) +- ++READELF ?= readelf + + ifndef BUILD_STATIC_ONLY + SHARED_LIBS := $(OBJDIR)/libxdp.so \ +@@ -89,12 +89,12 @@ $(SHARED_OBJDIR)/%.o: %.c $(EXTRA_LIB_DE + + XDP_IN_SHARED := $(SHARED_OBJDIR)/libxdp.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_abi +@@ -106,12 +106,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/dev-util/xdp-tools/xdp-tools-1.1.1.ebuild b/dev-util/xdp-tools/xdp-tools-1.1.1.ebuild new file mode 100644 index 000000000..694cfccfb --- /dev/null +++ b/dev-util/xdp-tools/xdp-tools-1.1.1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-info llvm multilib toolchain-funcs + +# version v1.1.1 is not tagged, use commit +MY_COMMIT="69827a07b395b78a2b577c3e1af6075f8c47fdd8" + +DESCRIPTION="Utilities and example programs for use with XDP" +HOMEPAGE="https://github.com/xdp-project/xdp-tools" +SRC_URI="https://github.com/xdp-project/${PN}/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +# skip strip for eBPF object files +# tests have to be run as root +RESTRICT="strip test" + +# skip QA check(s) for eBPF samples +QA_EXECSTACK="usr/lib*/bpf/*.o usr/share/xdp-tools/*.o" +QA_PREBUILT="usr/lib*/bpf/*.o usr/share/xdp-tools/*.o" + +# XDP should be enabled +CONFIG_CHECK="~XDP_SOCKETS" + +LLVM_MAX_SLOT=10 + +BDEPEND=" + virtual/pkgconfig +" +RDEPEND=" + >=dev-libs/libbpf-0.0.7 + net-libs/libpcap + sys-libs/zlib + virtual/libelf +" +DEPEND="${RDEPEND} + sys-devel/clang:10 + sys-devel/llvm:10 +" + +PATCHES=( + "${FILESDIR}/${P}-install.patch" + "${FILESDIR}/${P}-readelf.patch" +) + +S="${WORKDIR}/xdp-tools-${MY_COMMIT}" + +pkg_setup() { + llvm_pkg_setup +} + +src_configure() { + ./configure || die +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + READELF=$(tc-getREADELF) \ + PRODUCTION=1 \ + DYNAMIC_LIBXDP=1 \ + FORCE_SYSTEM_LIBBPF=1 \ + PREFIX=/usr \ + LIBDIR="/usr/$(get_libdir)" all +} + +src_install() { + emake PREFIX=/usr LIBDIR="/usr/$(get_libdir)" DESTDIR="${D}" install +} |