[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2024-03-26 Thread Ionen Wolkens
commit: de7384504de1af4ea9fa1d235de471599431f76b
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Tue Mar 26 20:14:40 2024 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Tue Mar 26 20:17:17 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de738450

net-libs/xdp-tools: forward ~ppc to 1.4.2

This was added in the interim after the bug was made
which specified an exact version, should be no reason
not to forward.

Signed-off-by: Ionen Wolkens  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.4.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.2.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.2.ebuild
index 6617263e054b..6861f5e2c969 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.2.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.2.ebuild
@@ -11,7 +11,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
 IUSE="+tools"
 
 DEPEND="



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2024-03-26 Thread Ionen Wolkens
commit: 72eb145d17bff778b282c7170ab4c4adc4e2b0c5
Author: Matoro Mahri  matoro  tk>
AuthorDate: Mon Mar 25 02:15:56 2024 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Tue Mar 26 20:17:16 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72eb145d

net-libs/xdp-tools: Keyword 1.4.1-r1 ppc, #924948

Signed-off-by: Matoro Mahri  matoro.tk>
Signed-off-by: Ionen Wolkens  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
index bcdc5f9e9180..62df6baaace5 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
@@ -11,7 +11,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
 IUSE="+tools"
 
 DEPEND="



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2024-03-20 Thread Sam James
commit: 78ced104bc8343e704d716b42a6c8a20f2e8dfb7
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Tue Jan 30 17:46:20 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Mar 21 02:39:29 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78ced104

net-libs/xdp-tools: add 1.4.2

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/Manifest   |  2 +-
 net-libs/xdp-tools/xdp-tools-1.4.2.ebuild | 96 +++
 2 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 5f1d1649aacb..dfdf3285fdf0 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1,2 +1,2 @@
-DIST xdp-tools-1.4.0.tar.gz 337221 BLAKE2B 
008dda0fcfd403e47ab2b8c801fc0a5c4e103fb3b9869f1d1bf5af258fc646dd5a0285d3126c012c9b81805408b9669da886b9fcf2fdf33b256f74bbf898222a
 SHA512 
c17bd6e9e6e4cf59c33f4b9ae4e3e0434863d147abf80f87b425215261b96d4574898fa09cc2b201a427a5e9d49ad64d0c70e50e3f72e3a18c6fbdf7f4cd4a3a
 DIST xdp-tools-1.4.1.tar.gz 339878 BLAKE2B 
30ed245dd0da8404cf67313ea4d5f9a148507d14bd7330bdac3b03c07d1cc0b38eb1a376636551cb8ea14c8a2e77d02527da363733a1059e1c2ebaee9ac90392
 SHA512 
9d2ad42713aa53c10ccbde2c344bf2696524e317544f3693114b343ab74240187699c3802cfc6efa05b3e9f9bfec80fd2537799aa3ae050717bb1f6aab435996
+DIST xdp-tools-1.4.2.tar.gz 340864 BLAKE2B 
c5197330ff917043e03a16346823acab760db5fe903f2e039bd2c178ad34bb04d96a0d6b321fd3565256c39422f3f1f7b475970bd22ab487e30468c96e11c711
 SHA512 
aedf79859872523d514f18e7a6e8b7999bd1942021968dbba9a7e86cde1c193e31b328bc56d6bf2b3fbc7f266c9df8d942d90a70bbd9d514ce38d56c07cd18ca

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.2.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.2.ebuild
new file mode 100644
index ..6617263e054b
--- /dev/null
+++ b/net-libs/xdp-tools/xdp-tools-1.4.2.ebuild
@@ -0,0 +1,96 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+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 ~loong ~ppc64 ~riscv ~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"
+
+src_prepare() {
+   # remove -Werror: #899744
+   sed -i 's/-Werror//g' lib/Makefile lib/defines.mk || die
+   sed -i '/-Werror/d' lib/common.mk lib/libxdp/Makefile \
+   lib/libxdp/tests/Makefile lib/util/Makefile || die
+
+   default
+}
+
+src_configure() {
+   # filter LTO: #861587
+   filter-lto
+
+   # filter LDFLAGS some more: #916591
+   filter-ldflags -Wl,--{icf,lto}*
+
+   # force ld.bfd: #916591
+   tc-ld-force-bfd
+
+   export CC="$(tc-getCC)"
+   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
+
+   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
+}



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/

2024-03-20 Thread Sam James
commit: dac30da69c00eadca3981403b1ef3b31b151d1ba
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Tue Jan 30 17:47:43 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Mar 21 02:39:30 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dac30da6

net-libs/xdp-tools: clean up old

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/35098
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/files/1.4.0-no-Werror.patch | 75 --
 net-libs/xdp-tools/files/1.4.0-toolchain.patch | 57 -
 net-libs/xdp-tools/xdp-tools-1.4.0.ebuild  | 87 --
 3 files changed, 219 deletions(-)

diff --git a/net-libs/xdp-tools/files/1.4.0-no-Werror.patch 
b/net-libs/xdp-tools/files/1.4.0-no-Werror.patch
deleted file mode 100644
index fb086f5122b9..
--- a/net-libs/xdp-tools/files/1.4.0-no-Werror.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-
-Bug: https://bugs.gentoo.org/899744
-
-diff --git a/lib/Makefile b/lib/Makefile
-index 5ee035d..5342ab3 100644
 a/lib/Makefile
-+++ b/lib/Makefile
-@@ -1,5 +1,5 @@
- 
--LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Werror -Wall) -fPIC
-+LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Wall) -fPIC
- 
- LIB_DIR = .
- include defines.mk
-diff --git a/lib/common.mk b/lib/common.mk
-index b680a75..8dbcb39 100644
 a/lib/common.mk
-+++ b/lib/common.mk
-@@ -116,7 +116,6 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) 
$(BPF_HEADERS) $(LIBMK)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 
-diff --git a/lib/defines.mk b/lib/defines.mk
-index 54b259f..ed246c0 100644
 a/lib/defines.mk
-+++ b/lib/defines.mk
-@@ -40,7 +40,7 @@ endif
- 
- DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
- 
--CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES)
-+CFLAGS += -std=gnu11 -Wextra $(DEFINES)
- BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS))
- 
- CONFIGMK := $(LIB_DIR)/../config.mk
-diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
-index 431932a..a0c625d 100644
 a/lib/libxdp/Makefile
-+++ b/lib/libxdp/Makefile
-@@ -142,7 +142,6 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 
-diff --git a/lib/libxdp/tests/Makefile b/lib/libxdp/tests/Makefile
-index 3c22901..a4463f3 100644
 a/lib/libxdp/tests/Makefile
-+++ b/lib/libxdp/tests/Makefile
-@@ -72,7 +72,6 @@ $(BPF_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK) $(EXTRA_DEPS)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 
-diff --git a/lib/util/Makefile b/lib/util/Makefile
-index 24070f0..37485b3 100644
 a/lib/util/Makefile
-+++ b/lib/util/Makefile
-@@ -26,7 +26,6 @@ $(UTIL_BPF_OBJS): %.o: %.c $(KERN_USER_H) $(BPF_HEADERS) 
$(LIBMK)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 

diff --git a/net-libs/xdp-tools/files/1.4.0-toolchain.patch 
b/net-libs/xdp-tools/files/1.4.0-toolchain.patch
deleted file mode 100644
index d4bcb511310f..
--- a/net-libs/xdp-tools/files/1.4.0-toolchain.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-
-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?= 
-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 

- 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)
- 

[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2024-02-18 Thread Sam James
commit: 16de6191a6a9f4c417c06bfa4d18de85ab9f663f
Author: Sam James  gentoo  org>
AuthorDate: Mon Feb 19 07:35:39 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Feb 19 07:35:39 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16de6191

net-libs/xdp-tools: Keyword 1.4.1-r1 ppc64, #924948

Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
index b4259fe438a4..1a024daa4407 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -11,7 +11,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~riscv ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
 IUSE="+tools"
 
 DEPEND="



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-12-27 Thread Sam James
commit: b923be7a4099bd8a50ca0991fe3c88f7966eab7d
Author: Sam James  gentoo  org>
AuthorDate: Wed Dec 27 15:47:40 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 27 15:47:40 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b923be7a

net-libs/xdp-tools: Stabilize 1.4.1-r1 amd64, #920750

Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
index 755f827fedfb..b4259fe438a4 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
@@ -11,7 +11,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~riscv ~x86"
 IUSE="+tools"
 
 DEPEND="



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-12-24 Thread Conrad Kostecki
commit: f71335c3e956d53dae1d7bd826442dd6b840f4bc
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Sun Dec 17 14:28:59 2023 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Sun Dec 24 23:04:11 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f71335c3

net-libs/xdp-tools: add missing toolchain-funcs inherit

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/34328
Signed-off-by: Conrad Kostecki  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.4.0.ebuild| 2 +-
 net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
index 400e2aa0f19e..fb70b301ec4d 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit flag-o-matic
+inherit flag-o-matic toolchain-funcs
 
 DESCRIPTION="The libxdp library and various tools for use with XDP"
 HOMEPAGE="https://github.com/xdp-project/xdp-tools;

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
index a56fcf10ba5b..755f827fedfb 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit flag-o-matic
+inherit flag-o-matic toolchain-funcs
 
 DESCRIPTION="The libxdp library and various tools for use with XDP"
 HOMEPAGE="https://github.com/xdp-project/xdp-tools;



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/

2023-11-22 Thread Sam James
commit: 08af5d6c5ee75d2e7cb6ddf254a15ea1c1924d49
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Thu Nov  2 11:14:21 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Nov 22 12:02:13 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08af5d6c

net-libs/xdp-tools: Use sed instead of patch for -Werror

Less fragile & easier to maintain.

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/files/1.4.1-no-Werror.patch | 75 --
 net-libs/xdp-tools/xdp-tools-1.4.1.ebuild  | 10 +++-
 2 files changed, 9 insertions(+), 76 deletions(-)

diff --git a/net-libs/xdp-tools/files/1.4.1-no-Werror.patch 
b/net-libs/xdp-tools/files/1.4.1-no-Werror.patch
deleted file mode 100644
index 52c50261f5d8..
--- a/net-libs/xdp-tools/files/1.4.1-no-Werror.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-
-Bug: https://bugs.gentoo.org/899744
-
-diff --git a/lib/Makefile b/lib/Makefile
-index 5ee035d..5342ab3 100644
 a/lib/Makefile
-+++ b/lib/Makefile
-@@ -1,5 +1,5 @@
- 
--LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Werror -Wall) -fPIC
-+LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Wall) -fPIC
- 
- LIB_DIR = .
- include defines.mk
-diff --git a/lib/common.mk b/lib/common.mk
-index b680a75..8dbcb39 100644
 a/lib/common.mk
-+++ b/lib/common.mk
-@@ -116,7 +116,6 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) 
$(BPF_HEADERS) $(LIBMK)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 
-diff --git a/lib/defines.mk b/lib/defines.mk
-index 54b259f..ed246c0 100644
 a/lib/defines.mk
-+++ b/lib/defines.mk
-@@ -40,7 +40,7 @@ endif
- 
- DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
- 
--CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES) $(ARCH_INCLUDES)
-+CFLAGS += -std=gnu11 -Wextra $(DEFINES) $(ARCH_INCLUDES)
- BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) 
$(ARCH_INCLUDES)
- 
- CONFIGMK := $(LIB_DIR)/../config.mk
-diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
-index 431932a..a0c625d 100644
 a/lib/libxdp/Makefile
-+++ b/lib/libxdp/Makefile
-@@ -142,7 +142,6 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 
-diff --git a/lib/libxdp/tests/Makefile b/lib/libxdp/tests/Makefile
-index 3c22901..a4463f3 100644
 a/lib/libxdp/tests/Makefile
-+++ b/lib/libxdp/tests/Makefile
-@@ -72,7 +72,6 @@ $(BPF_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK) $(EXTRA_DEPS)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 
-diff --git a/lib/util/Makefile b/lib/util/Makefile
-index 24070f0..37485b3 100644
 a/lib/util/Makefile
-+++ b/lib/util/Makefile
-@@ -26,7 +26,6 @@ $(UTIL_BPF_OBJS): %.o: %.c $(KERN_USER_H) $(BPF_HEADERS) 
$(LIBMK)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
index 53974f63d493..5fd0485f706d 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
@@ -33,9 +33,17 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 MAKEOPTS+=" V=1"
 
 PATCHES=(
-   "${FILESDIR}"/1.4.1-no-Werror.patch
 )
 
+src_prepare() {
+   # remove -Werror: #899744
+   sed -i 's/-Werror//g' lib/Makefile lib/defines.mk
+   sed -i '/-Werror/d' lib/common.mk lib/libxdp/Makefile \
+   lib/libxdp/tests/Makefile lib/util/Makefile
+
+   default
+}
+
 src_configure() {
export CC="$(tc-getCC)"
export LD="$(tc-getLD)"



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/

2023-11-22 Thread Sam James
commit: 9cc05971105585d9bcd9193b4373f3f806c3cb06
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Wed Nov 22 11:52:46 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Nov 22 12:02:14 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cc05971

net-libs/xdp-tools: add fix for memory leak in libxdp

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/33647
Signed-off-by: Sam James  gentoo.org>

 ...4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch | 34 ++
 ...ools-1.4.1.ebuild => xdp-tools-1.4.1-r1.ebuild} |  5 ++--
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git 
a/net-libs/xdp-tools/files/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch 
b/net-libs/xdp-tools/files/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch
new file mode 100644
index ..6c95a970f876
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch
@@ -0,0 +1,34 @@
+
+Patch from:
+https://github.com/xdp-project/xdp-tools/commit/cae9c91353cd3ed51753168203ed101905b9ac9e
+
+From cae9c91353cd3ed51753168203ed101905b9ac9e Mon Sep 17 00:00:00 2001
+From: Ric Li 
+Date: Tue, 21 Nov 2023 15:36:57 +0800
+Subject: [PATCH] libxdp: Fix xdp prog memory leak in xsk_setup_xdp_prog
+
+In the xsk_setup_xdp_prog function, the xsk structure
+temporarily takes ownership of an xdp_prog and stores it in
+ctx->xdp_prog. However, the allocated memory is not freed
+in xsk_destroy_xsk_struct, leading to a memory leak. This
+commit addresses the issue by adding a call to
+xdp_program_close to properly release the allocated
+xdp_prog memory.
+
+Signed-off-by: Ric Li 
+---
+ lib/libxdp/xsk.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/libxdp/xsk.c b/lib/libxdp/xsk.c
+index a854f771..b3527fb6 100644
+--- a/lib/libxdp/xsk.c
 b/lib/libxdp/xsk.c
+@@ -978,6 +978,7 @@ static struct xsk_ctx *xsk_create_ctx(struct xsk_socket 
*xsk,
+ 
+ static void xsk_destroy_xsk_struct(struct xsk_socket *xsk)
+ {
++  xdp_program__close(xsk->ctx->xdp_prog);
+   free(xsk->ctx);
+   free(xsk);
+ }

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
similarity index 92%
rename from net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
index 520357d07664..a56fcf10ba5b 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1-r1.ebuild
@@ -33,13 +33,14 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 MAKEOPTS+=" V=1"
 
 PATCHES=(
+   "${FILESDIR}"/1.4.1-fix-memory-leak-in-xsk_setup_xdp_prog.patch
 )
 
 src_prepare() {
# remove -Werror: #899744
-   sed -i 's/-Werror//g' lib/Makefile lib/defines.mk
+   sed -i 's/-Werror//g' lib/Makefile lib/defines.mk || die
sed -i '/-Werror/d' lib/common.mk lib/libxdp/Makefile \
-   lib/libxdp/tests/Makefile lib/util/Makefile
+   lib/libxdp/tests/Makefile lib/util/Makefile || die
 
default
 }



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-11-22 Thread Sam James
commit: 36b6b67f771d5ec4373578e1599c013b7e679b24
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Thu Nov  2 11:17:12 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Nov 22 12:02:14 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36b6b67f

net-libs/xdp-tools: force use of ld.bfd

lld needs special care for embeddings in object files and this is not (yet)
supported by upstream, so just force ld.bfd instead of creating more
complications.

Bug: https://bugs.gentoo.org/916591
Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.4.1.ebuild | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
index 5fd0485f706d..520357d07664 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
@@ -45,8 +45,16 @@ src_prepare() {
 }
 
 src_configure() {
+   # filter LTO: #861587
+   filter-lto
+
+   # filter LDFLAGS some more: #916591
+   filter-ldflags -Wl,--{icf,lto}*
+
+   # force ld.bfd: #916591
+   tc-ld-force-bfd
+
export CC="$(tc-getCC)"
-   export LD="$(tc-getLD)"
export PREFIX="${EPREFIX}/usr"
export LIBDIR="${PREFIX}/$(get_libdir)"
export BPF_OBJECT_DIR="${PREFIX}/lib/bpf"
@@ -54,9 +62,6 @@ src_configure() {
export DYNAMIC_LIBXDP=1
export FORCE_SYSTEM_LIBBPF=1
 
-   # bug 861587
-   filter-lto
-
default
 }
 



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/

2023-10-26 Thread Sam James
commit: 79fd37fcaf670fdcc399fa7e7ce2d6dc1b353b09
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Sat Oct 21 08:54:26 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Oct 27 02:53:15 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79fd37fc

net-libs/xdp-tools: add 1.4.1

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/33439
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/Manifest|  1 +
 net-libs/xdp-tools/files/1.4.1-no-Werror.patch | 75 ++
 net-libs/xdp-tools/xdp-tools-1.4.1.ebuild  | 86 ++
 3 files changed, 162 insertions(+)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 766e3e9c5f3c..5f1d1649aacb 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1 +1,2 @@
 DIST xdp-tools-1.4.0.tar.gz 337221 BLAKE2B 
008dda0fcfd403e47ab2b8c801fc0a5c4e103fb3b9869f1d1bf5af258fc646dd5a0285d3126c012c9b81805408b9669da886b9fcf2fdf33b256f74bbf898222a
 SHA512 
c17bd6e9e6e4cf59c33f4b9ae4e3e0434863d147abf80f87b425215261b96d4574898fa09cc2b201a427a5e9d49ad64d0c70e50e3f72e3a18c6fbdf7f4cd4a3a
+DIST xdp-tools-1.4.1.tar.gz 339878 BLAKE2B 
30ed245dd0da8404cf67313ea4d5f9a148507d14bd7330bdac3b03c07d1cc0b38eb1a376636551cb8ea14c8a2e77d02527da363733a1059e1c2ebaee9ac90392
 SHA512 
9d2ad42713aa53c10ccbde2c344bf2696524e317544f3693114b343ab74240187699c3802cfc6efa05b3e9f9bfec80fd2537799aa3ae050717bb1f6aab435996

diff --git a/net-libs/xdp-tools/files/1.4.1-no-Werror.patch 
b/net-libs/xdp-tools/files/1.4.1-no-Werror.patch
new file mode 100644
index ..52c50261f5d8
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.4.1-no-Werror.patch
@@ -0,0 +1,75 @@
+
+Bug: https://bugs.gentoo.org/899744
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 5ee035d..5342ab3 100644
+--- a/lib/Makefile
 b/lib/Makefile
+@@ -1,5 +1,5 @@
+ 
+-LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Werror -Wall) -fPIC
++LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Wall) -fPIC
+ 
+ LIB_DIR = .
+ include defines.mk
+diff --git a/lib/common.mk b/lib/common.mk
+index b680a75..8dbcb39 100644
+--- a/lib/common.mk
 b/lib/common.mk
+@@ -116,7 +116,6 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) 
$(BPF_HEADERS) $(LIBMK)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+diff --git a/lib/defines.mk b/lib/defines.mk
+index 54b259f..ed246c0 100644
+--- a/lib/defines.mk
 b/lib/defines.mk
+@@ -40,7 +40,7 @@ endif
+ 
+ DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ 
+-CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES) $(ARCH_INCLUDES)
++CFLAGS += -std=gnu11 -Wextra $(DEFINES) $(ARCH_INCLUDES)
+ BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) 
$(ARCH_INCLUDES)
+ 
+ CONFIGMK := $(LIB_DIR)/../config.mk
+diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
+index 431932a..a0c625d 100644
+--- a/lib/libxdp/Makefile
 b/lib/libxdp/Makefile
+@@ -142,7 +142,6 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+diff --git a/lib/libxdp/tests/Makefile b/lib/libxdp/tests/Makefile
+index 3c22901..a4463f3 100644
+--- a/lib/libxdp/tests/Makefile
 b/lib/libxdp/tests/Makefile
+@@ -72,7 +72,6 @@ $(BPF_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK) $(EXTRA_DEPS)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+diff --git a/lib/util/Makefile b/lib/util/Makefile
+index 24070f0..37485b3 100644
+--- a/lib/util/Makefile
 b/lib/util/Makefile
+@@ -26,7 +26,6 @@ $(UTIL_BPF_OBJS): %.o: %.c $(KERN_USER_H) $(BPF_HEADERS) 
$(LIBMK)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
new file mode 100644
index ..53974f63d493
--- /dev/null
+++ b/net-libs/xdp-tools/xdp-tools-1.4.1.ebuild
@@ -0,0 +1,86 @@
+# 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 

[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/

2023-10-26 Thread Sam James
commit: 954b98b84ca9d223f7ecbf807e08291e82d85aa9
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Sat Oct 21 08:57:59 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Oct 27 02:53:15 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=954b98b8

net-libs/xdp-tools: clean up obsolete versions

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/Manifest|  2 -
 .../files/1.3.1-disable-stack-protector.patch  | 32 
 .../files/1.3.1-fix-btf__type_cnt-detection.patch  | 36 -
 net-libs/xdp-tools/files/1.3.1-musl.patch  | 28 ---
 net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch | 36 -
 net-libs/xdp-tools/xdp-tools-1.2.8.ebuild  | 52 -
 net-libs/xdp-tools/xdp-tools-1.3.1-r3.ebuild   | 88 --
 7 files changed, 274 deletions(-)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 7cbae12d5e78..766e3e9c5f3c 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1,3 +1 @@
-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

diff --git a/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch 
b/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch
deleted file mode 100644
index 3a37b26efa14..
--- a/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-
-From: 
https://github.com/xdp-project/xdp-tools/commit/cb6d06219d1b49b07980b481a383e1dea74a0702
-Bug: https://bugs.gentoo.org/889842
-
-From cb6d06219d1b49b07980b481a383e1dea74a0702 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= 
-Date: Sat, 4 Mar 2023 20:08:25 +0100
-Subject: [PATCH] make: disable stack protector for BPF bits built by clang
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The clang toolchain might have stack-protection enabled by default
-(e.g. via platform configuration) and that won't work for BPF,
-so unconfitionally disable it via -fno-stack-protector.
-
-Signed-off-by: Holger Hoffstätte 

- lib/defines.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/defines.mk b/lib/defines.mk
-index f134c43b..54b259f2 100644
 a/lib/defines.mk
-+++ b/lib/defines.mk
-@@ -1,5 +1,5 @@
- CFLAGS ?= -O2 -g
--BPF_CFLAGS ?= -Wno-visibility
-+BPF_CFLAGS ?= -Wno-visibility -fno-stack-protector
- BPF_TARGET ?= bpf
- 
- HAVE_FEATURES :=

diff --git a/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch 
b/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch
deleted file mode 100644
index d805e1077c76..
--- a/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-
-From 
https://github.com/xdp-project/xdp-tools/commit/a7df567634af77381832a2212c5f5099b07734f3
-
-From a7df567634af77381832a2212c5f5099b07734f3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= 
-Date: Sat, 4 Mar 2023 20:07:39 +0100
-Subject: [PATCH] configure: Fix function detection for btf__type_cnt()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The configure check for btf__type_cnt() swapped two arguments in the
-check_libbpf_function() call in the configure script, leading to the check
-failing if LIBBPF_CFLAGS is non-empty. Make sure the arguments are in the
-right order, and also pass a proper NULL parameter in the check instead of
-a 0.
-
-Reported-by: Holger Hoffstätte 
-Signed-off-by: Toke Høiland-Jørgensen 

- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index 016c5bbd..62c2f883 100755
 a/configure
-+++ b/configure
-@@ -272,7 +272,7 @@ check_libbpf_functions()
- 
- check_libbpf_function "perf_buffer__consume" "(NULL)" "" "$LIBBPF_CFLAGS" 
"$LIBBPF_LDLIBS"
- check_libbpf_function "btf__load_from_kernel_by_id" "(0)" "" 
"$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
--

[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/

2023-10-26 Thread Sam James
commit: 330b58c14c48a1a3a5af2023a8afe83733536452
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Thu Oct 26 11:00:34 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Oct 27 02:53:14 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=330b58c1

net-libs/xdp-tools: rename patches for 1.4.0

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Signed-off-by: Sam James  gentoo.org>

 .../xdp-tools/files/{1.3.1-no-Werror.patch => 1.4.0-no-Werror.patch}  | 0
 net-libs/xdp-tools/xdp-tools-1.4.0.ebuild | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-libs/xdp-tools/files/1.3.1-no-Werror.patch 
b/net-libs/xdp-tools/files/1.4.0-no-Werror.patch
similarity index 100%
rename from net-libs/xdp-tools/files/1.3.1-no-Werror.patch
rename to net-libs/xdp-tools/files/1.4.0-no-Werror.patch

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
index 1e5a994e83ad..400e2aa0f19e 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
@@ -33,8 +33,8 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 MAKEOPTS+=" V=1"
 
 PATCHES=(
-   "${FILESDIR}"/1.3.1-no-Werror.patch
-   "${FILESDIR}"/${PV}-toolchain.patch
+   "${FILESDIR}"/1.4.0-no-Werror.patch
+   "${FILESDIR}"/1.4.0-toolchain.patch
 )
 
 src_configure() {



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-10-06 Thread Sam James
commit: f11e2629ded0e14c871bb36253ddcdc8b52947e8
Author: Sam James  gentoo  org>
AuthorDate: Fri Oct  6 18:08:29 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Oct  6 18:08:29 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f11e2629

net-libs/xdp-tools: Stabilize 1.4.0 amd64, #911998

Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.4.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
index 144070547dbc..1e5a994e83ad 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
@@ -11,7 +11,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+KEYWORDS="amd64 ~arm ~arm64 ~riscv ~x86"
 IUSE="+tools"
 
 DEPEND="



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-08-27 Thread Sam James
commit: bac41ff9df35552899581a2e4c5bd0f57bc8b00a
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Sun Aug 27 20:01:32 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Aug 27 20:27:46 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bac41ff9

net-libx/xdp-tools: add proxy maintainer

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/32479
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/metadata.xml | 8 
 1 file changed, 8 insertions(+)

diff --git a/net-libs/xdp-tools/metadata.xml b/net-libs/xdp-tools/metadata.xml
index 878714e41628..790067f24136 100644
--- a/net-libs/xdp-tools/metadata.xml
+++ b/net-libs/xdp-tools/metadata.xml
@@ -1,6 +1,14 @@
 
 https://www.gentoo.org/dtd/metadata.dtd;>
 
+  
+hol...@applied-asynchrony.com
+Holger Hoffstätte
+  
+  
+proxy-ma...@gentoo.org
+Proxy Maintainers
+  
   
 zx...@gentoo.org
 Jason A. Donenfeld



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-08-12 Thread Marek Szuba
commit: 5ef4c0b27ad6a9035505b059dd740ad200b45175
Author: Marek Szuba  gentoo  org>
AuthorDate: Sat Aug 12 20:48:06 2023 +
Commit: Marek Szuba  gentoo  org>
CommitDate: Sat Aug 12 21:07:07 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ef4c0b2

net-libs/xdp-tools: keyword 1.4.0 for ~riscv

Signed-off-by: Marek Szuba  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.4.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
index 9df2ff21f8ae..144070547dbc 100644
--- a/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.4.0.ebuild
@@ -11,7 +11,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
 IUSE="+tools"
 
 DEPEND="



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/

2023-07-09 Thread Sam James
commit: 5e7d98bc4aa5f3ffcb0e2aa2c15b76f3e309ddd0
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Sat Jul  8 11:14:18 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jul 10 05:30:16 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e7d98bc

net-libs/xdp-tools: bump to 1.4.0, add toolchain fixes

Bug: https://bugs.gentoo.org/899742
Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/31801
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/Manifest|  1 +
 net-libs/xdp-tools/files/1.4.0-toolchain.patch | 57 +
 net-libs/xdp-tools/xdp-tools-1.4.0.ebuild  | 87 ++
 3 files changed, 145 insertions(+)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 7cba3df6937e..7cbae12d5e78 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1,2 +1,3 @@
 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

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 ..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?= 
+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 
+---
+ 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 

[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/

2023-04-16 Thread Sam James
commit: c09f56693f0b6e739ac3d4d28933219600d1dd72
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Thu Apr 13 20:38:24 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Apr 16 06:54:55 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c09f5669

net-libs/xdp-tools: reinstate -Werror for configure

The patch to remove -Werror from the build was a little bit too thorough
and removed -Werror from the configure script, where it is required.

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/30586
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/files/1.3.1-no-Werror.patch | 22 --
 ...s-1.3.1-r2.ebuild => xdp-tools-1.3.1-r3.ebuild} |  0
 2 files changed, 22 deletions(-)

diff --git a/net-libs/xdp-tools/files/1.3.1-no-Werror.patch 
b/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
index 7545c49b1c2e..fb086f5122b9 100644
--- a/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
+++ b/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
@@ -1,28 +1,6 @@
 
 Bug: https://bugs.gentoo.org/899744
 
-diff --git a/configure b/configure
-index 62c2f88..230637f 100755
 a/configure
-+++ b/configure
-@@ -249,7 +249,7 @@ int main(int argc, char **argv) {
- return 0;
- }
- EOF
--compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS"
-+compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS"
- libbpf_err=$($compile_cmd 2>&1)
- if [ "$?" -eq "0" ]; then
- echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
-@@ -323,7 +323,7 @@ int main(int argc, char **argv) {
- }
- EOF
- 
--libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
-+libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
- if [ "$?" -eq "0" ]; then
- echo "SYSTEM_LIBBPF:=y" >>$CONFIG
- echo "LIBBPF_VERSION=$LIBBPF_VERSION" >>$CONFIG
 diff --git a/lib/Makefile b/lib/Makefile
 index 5ee035d..5342ab3 100644
 --- a/lib/Makefile

diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.3.1-r3.ebuild
similarity index 100%
rename from net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.3.1-r3.ebuild



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/

2023-03-28 Thread Sam James
commit: eb5fa24cb8025bab6db68cea47240a5968cd6021
Author: Sam James  gentoo  org>
AuthorDate: Wed Mar 29 01:32:10 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Mar 29 01:32:10 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb5fa24c

net-libs/xdp-tools: fix build w/ musl

Closes: https://bugs.gentoo.org/836708
Thanks-to: Stijn Tintel  linux-ipv6.be>
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/files/1.3.1-musl.patch| 28 
 net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild |  1 +
 2 files changed, 29 insertions(+)

diff --git a/net-libs/xdp-tools/files/1.3.1-musl.patch 
b/net-libs/xdp-tools/files/1.3.1-musl.patch
new file mode 100644
index ..e3238871b262
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.3.1-musl.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/836708
+https://github.com/xdp-project/xdp-tools/pull/309
+
+From c9956abbfbd238bd2eb98c67ea002bfce29063a4 Mon Sep 17 00:00:00 2001
+From: Stijn Tintel 
+Date: Wed, 29 Mar 2023 04:25:06 +0300
+Subject: [PATCH] libxdp: fix build on musl
+
+In musl, PATH_MAX is defined in limits.h. Include it in libxdp.c to fix
+building systems using musl libc.
+
+libxdp.c: In function 'find_bpffs':
+libxdp.c:406:33: error: 'PATH_MAX' undeclared (first use in this function)
+  406 | static char bpf_wrk_dir[PATH_MAX];
+  | ^~~~
+
+Signed-off-by: Stijn Tintel 
+--- a/lib/libxdp/libxdp.c
 b/lib/libxdp/libxdp.c
+@@ -22,6 +22,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include  /* ERR_PTR */
+ #include 
+

diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
index 9bc3e28993a8..543536b75ae6 100644
--- a/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
"${FILESDIR}"/1.3.1-fix-btf__type_cnt-detection.patch
"${FILESDIR}"/1.3.1-no-Werror.patch
"${FILESDIR}"/1.3.1-xdpdump-clang.patch
+   "${FILESDIR}"/1.3.1-musl.patch
 )
 
 src_configure() {



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/

2023-03-10 Thread Sam James
commit: 80fffaf8a1d422cbbb5d0984bc693128f8256a49
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Wed Mar  8 22:12:29 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Mar 10 12:06:23 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80fffaf8

net-libs/xdp-tools: various build improvements

- disable LTO
- remove -Werror from Makefiles
- fix xdpdump build error with clang
- add hint about mounting bpffs

Bug: https://bugs.gentoo.org/861587
Bug: https://bugs.gentoo.org/880919
Bug: https://bugs.gentoo.org/899744

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/30005
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/files/1.3.1-no-Werror.patch | 97 ++
 net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch | 36 
 ...s-1.3.1-r1.ebuild => xdp-tools-1.3.1-r2.ebuild} | 25 ++
 3 files changed, 158 insertions(+)

diff --git a/net-libs/xdp-tools/files/1.3.1-no-Werror.patch 
b/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
new file mode 100644
index ..7545c49b1c2e
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.3.1-no-Werror.patch
@@ -0,0 +1,97 @@
+
+Bug: https://bugs.gentoo.org/899744
+
+diff --git a/configure b/configure
+index 62c2f88..230637f 100755
+--- a/configure
 b/configure
+@@ -249,7 +249,7 @@ int main(int argc, char **argv) {
+ return 0;
+ }
+ EOF
+-compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS"
++compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS"
+ libbpf_err=$($compile_cmd 2>&1)
+ if [ "$?" -eq "0" ]; then
+ echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
+@@ -323,7 +323,7 @@ int main(int argc, char **argv) {
+ }
+ EOF
+ 
+-libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
++libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
+ if [ "$?" -eq "0" ]; then
+ echo "SYSTEM_LIBBPF:=y" >>$CONFIG
+ echo "LIBBPF_VERSION=$LIBBPF_VERSION" >>$CONFIG
+diff --git a/lib/Makefile b/lib/Makefile
+index 5ee035d..5342ab3 100644
+--- a/lib/Makefile
 b/lib/Makefile
+@@ -1,5 +1,5 @@
+ 
+-LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Werror -Wall) -fPIC
++LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Wall) -fPIC
+ 
+ LIB_DIR = .
+ include defines.mk
+diff --git a/lib/common.mk b/lib/common.mk
+index b680a75..8dbcb39 100644
+--- a/lib/common.mk
 b/lib/common.mk
+@@ -116,7 +116,6 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) 
$(BPF_HEADERS) $(LIBMK)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+diff --git a/lib/defines.mk b/lib/defines.mk
+index 54b259f..ed246c0 100644
+--- a/lib/defines.mk
 b/lib/defines.mk
+@@ -40,7 +40,7 @@ endif
+ 
+ DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ 
+-CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES)
++CFLAGS += -std=gnu11 -Wextra $(DEFINES)
+ BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS))
+ 
+ CONFIGMK := $(LIB_DIR)/../config.mk
+diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
+index 431932a..a0c625d 100644
+--- a/lib/libxdp/Makefile
 b/lib/libxdp/Makefile
+@@ -142,7 +142,6 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+diff --git a/lib/libxdp/tests/Makefile b/lib/libxdp/tests/Makefile
+index 3c22901..a4463f3 100644
+--- a/lib/libxdp/tests/Makefile
 b/lib/libxdp/tests/Makefile
+@@ -72,7 +72,6 @@ $(BPF_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK) $(EXTRA_DEPS)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+diff --git a/lib/util/Makefile b/lib/util/Makefile
+index 24070f0..37485b3 100644
+--- a/lib/util/Makefile
 b/lib/util/Makefile
+@@ -26,7 +26,6 @@ $(UTIL_BPF_OBJS): %.o: %.c $(KERN_USER_H) $(BPF_HEADERS) 
$(LIBMK)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 

diff --git a/net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch 

[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-03-06 Thread Sam James
commit: 358434363326de24d0560133386f2359521a519d
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Mon Mar  6 15:16:51 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Mar  6 21:30:33 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35843436

net-libs/xdp-tools: properly configure PREFIX/LIBDIR/BPF_OBJECT_DIR

The helper objects were installed correctly, but libxdp had the
wrong search path compiled in; this broke xdp-loader.

Closes: https://bugs.gentoo.org/899910
Bug: https://github.com/xdp-project/xdp-tools/issues/303

Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/29959
Signed-off-by: Sam James  gentoo.org>

 .../xdp-tools/{xdp-tools-1.3.1.ebuild => xdp-tools-1.3.1-r1.ebuild} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.3.1-r1.ebuild
similarity index 100%
rename from net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.3.1-r1.ebuild
index 79e00d6eee96..95efd4e44792 100644
--- a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1-r1.ebuild
@@ -36,6 +36,9 @@ PATCHES=(
 )
 
 src_configure() {
+   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
@@ -45,9 +48,6 @@ src_configure() {
 src_test() { :; }
 
 src_install() {
-   export PREFIX="${EPREFIX}/usr"
-   export LIBDIR="${PREFIX}/$(get_libdir)"
-   export BPF_OBJECT_DIR="${PREFIX}/lib/bpf"
default
 
# To remove the scripts/testing files that are installed.



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-03-06 Thread Arthur Zamarin
commit: 0359b8d7ee8947182fb2e3eb23f8870d5f7e286a
Author: Arthur Zamarin  gentoo  org>
AuthorDate: Mon Mar  6 13:44:04 2023 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Mon Mar  6 13:44:04 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0359b8d7

net-libs/xdp-tools: Keyword 1.3.1 arm64, #899688

Signed-off-by: Arthur Zamarin  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.3.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
index a5ed57f06a08..79e00d6eee96 100644
--- a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
@@ -9,7 +9,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 IUSE="+tools"
 
 DEPEND="



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-03-06 Thread Arthur Zamarin
commit: 7fd088001879dbb68a6ae3d51b7903488bd818d5
Author: Arthur Zamarin  gentoo  org>
AuthorDate: Mon Mar  6 12:51:04 2023 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Mon Mar  6 12:51:04 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fd08800

net-libs/xdp-tools: Keyword 1.3.1 arm, #899688

Signed-off-by: Arthur Zamarin  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.3.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
index 99a0ac49879d..a5ed57f06a08 100644
--- a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
@@ -9,7 +9,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~x86"
 IUSE="+tools"
 
 DEPEND="



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-03-05 Thread Sam James
commit: fa369e7cae03f9e3668ae3e44cfaab8168784fee
Author: Sam James  gentoo  org>
AuthorDate: Sun Mar  5 14:37:50 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Mar  5 14:38:15 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa369e7c

net-libs/xdp-tools: restore 1.2.8

Needed because bpftool isn't keyworded everywhere. Rescued from
8eea55ff639c63ce54f5feba1d3300e40d4814b9.

Bug: https://bugs.gentoo.org/899684
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/Manifest   |  1 +
 net-libs/xdp-tools/xdp-tools-1.2.8.ebuild | 52 +++
 2 files changed, 53 insertions(+)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 2fda18e4cc09..7cba3df6937e 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1 +1,2 @@
+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

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.8.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.8.ebuild
new file mode 100644
index ..e881553d3eed
--- /dev/null
+++ b/net-libs/xdp-tools/xdp-tools-1.2.8.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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:=
+   sys-libs/zlib
+   net-libs/libpcap
+   virtual/libelf"
+RDEPEND="${DEPEND}"
+BDEPEND=">=sys-devel/clang-10.0.0"
+
+# Not prebuilt -- we build them -- but they're not ordinary ELF objects either.
+QA_PREBUILT="usr/lib/bpf/*.o"
+
+MAKEOPTS+=" V=1"
+
+src_configure() {
+   export PRODUCTION=1
+   export DYNAMIC_LIBXDP=1
+   export FORCE_SYSTEM_LIBBPF=1
+   default
+}
+
+src_install() {
+   export PREFIX="${EPREFIX}/usr"
+   export LIBDIR="${PREFIX}/$(get_libdir)"
+   export BPF_OBJECT_DIR="${PREFIX}/lib/bpf"
+   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
+}
+
+src_test() { :; }



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-03-05 Thread Sam James
commit: 8623eed52d39d90a4340cc60dd61c8e04183af1b
Author: Sam James  gentoo  org>
AuthorDate: Sun Mar  5 14:35:24 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Mar  5 14:36:35 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8623eed5

net-libs/xdp-tools: needs grep[pcre] for -P in configure

Closes: https://bugs.gentoo.org/899686
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.3.1.ebuild | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
index e4761fe80cbc..99a0ac49879d 100644
--- a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
@@ -20,7 +20,10 @@ DEPEND="
virtual/libelf
 "
 RDEPEND="${DEPEND}"
-BDEPEND=">=sys-devel/clang-11.0.0"
+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"



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2023-03-05 Thread Sam James
commit: 9ab962ab16855ce94236098f802219a5fab279a0
Author: Sam James  gentoo  org>
AuthorDate: Sun Mar  5 14:34:11 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Mar  5 14:36:34 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ab962ab

net-libs/xdp-tools: add bpftool dep

Closes: https://bugs.gentoo.org/899684
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.3.1.ebuild | 18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
index fdc4068a030e..e4761fe80cbc 100644
--- a/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1.ebuild
@@ -9,16 +9,18 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
+KEYWORDS="~amd64 ~x86"
 IUSE="+tools"
 
-DEPEND="dev-libs/libbpf:=
-   sys-libs/zlib
+DEPEND="
+   dev-libs/libbpf:=
+   dev-util/bpftool
net-libs/libpcap
-   virtual/libelf"
+   sys-libs/zlib
+   virtual/libelf
+"
 RDEPEND="${DEPEND}"
-BDEPEND=">=sys-devel/clang-10.0.0"
+BDEPEND=">=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"
@@ -37,6 +39,8 @@ src_configure() {
default
 }
 
+src_test() { :; }
+
 src_install() {
export PREFIX="${EPREFIX}/usr"
export LIBDIR="${PREFIX}/$(get_libdir)"
@@ -53,5 +57,3 @@ src_install() {
# These are ELF objects but BPF ones.
dostrip -x /usr/lib/bpf
 }
-
-src_test() { :; }



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/

2023-03-05 Thread Sam James
commit: 8eea55ff639c63ce54f5feba1d3300e40d4814b9
Author: Holger Hoffstätte  applied-asynchrony  com>
AuthorDate: Sat Mar  4 15:16:10 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Mar  5 11:19:19 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8eea55ff

net-libs/xdp-tools: bump to 1.3.1 & add build fixes

- fix configure to properly detect libbpf features
- fix clang build with default-enabled stack protector

Closes: https://bugs.gentoo.org/889842
Signed-off-by: Holger Hoffstätte  applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/29926
Signed-off-by: Sam James  gentoo.org>

 net-libs/xdp-tools/Manifest|  2 +-
 .../files/1.3.1-disable-stack-protector.patch  | 32 +++
 .../files/1.3.1-fix-btf__type_cnt-detection.patch  | 36 ++
 ...p-tools-1.2.8.ebuild => xdp-tools-1.3.1.ebuild} |  7 -
 4 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 9e3d03e1cffd..2fda18e4cc09 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1 +1 @@
-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

diff --git a/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch 
b/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch
new file mode 100644
index ..3a37b26efa14
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.3.1-disable-stack-protector.patch
@@ -0,0 +1,32 @@
+
+From: 
https://github.com/xdp-project/xdp-tools/commit/cb6d06219d1b49b07980b481a383e1dea74a0702
+Bug: https://bugs.gentoo.org/889842
+
+From cb6d06219d1b49b07980b481a383e1dea74a0702 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= 
+Date: Sat, 4 Mar 2023 20:08:25 +0100
+Subject: [PATCH] make: disable stack protector for BPF bits built by clang
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The clang toolchain might have stack-protection enabled by default
+(e.g. via platform configuration) and that won't work for BPF,
+so unconfitionally disable it via -fno-stack-protector.
+
+Signed-off-by: Holger Hoffstätte 
+---
+ lib/defines.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/defines.mk b/lib/defines.mk
+index f134c43b..54b259f2 100644
+--- a/lib/defines.mk
 b/lib/defines.mk
+@@ -1,5 +1,5 @@
+ CFLAGS ?= -O2 -g
+-BPF_CFLAGS ?= -Wno-visibility
++BPF_CFLAGS ?= -Wno-visibility -fno-stack-protector
+ BPF_TARGET ?= bpf
+ 
+ HAVE_FEATURES :=

diff --git a/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch 
b/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch
new file mode 100644
index ..d805e1077c76
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.3.1-fix-btf__type_cnt-detection.patch
@@ -0,0 +1,36 @@
+
+From 
https://github.com/xdp-project/xdp-tools/commit/a7df567634af77381832a2212c5f5099b07734f3
+
+From a7df567634af77381832a2212c5f5099b07734f3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= 
+Date: Sat, 4 Mar 2023 20:07:39 +0100
+Subject: [PATCH] configure: Fix function detection for btf__type_cnt()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The configure check for btf__type_cnt() swapped two arguments in the
+check_libbpf_function() call in the configure script, leading to the check
+failing if LIBBPF_CFLAGS is non-empty. Make sure the arguments are in the
+right order, and also pass a proper NULL parameter in the check instead of
+a 0.
+
+Reported-by: Holger Hoffstätte 
+Signed-off-by: Toke Høiland-Jørgensen 
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 016c5bbd..62c2f883 100755
+--- a/configure
 b/configure
+@@ -272,7 +272,7 @@ check_libbpf_functions()
+ 
+ check_libbpf_function "perf_buffer__consume" "(NULL)" "" "$LIBBPF_CFLAGS" 
"$LIBBPF_LDLIBS"
+ check_libbpf_function "btf__load_from_kernel_by_id" "(0)" "" 
"$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
+-check_libbpf_function "btf__type_cnt" "(0)" "$LIBBPF_CFLAGS" "" 
"$LIBBPF_LDLIBS"
++check_libbpf_function "btf__type_cnt" "(NULL)" "" "$LIBBPF_CFLAGS" 
"$LIBBPF_LDLIBS"
+ check_libbpf_function "bpf_object__next_map" "(NULL, NULL)" "" 
"$LIBBPF_CFLAGS" "$LIBBPF_LDLIBS"
+ check_libbpf_function 

[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/, net-libs/xdp-tools/files/

2022-09-20 Thread Jason A. Donenfeld
commit: 92e472251bcceb07300ab3cd9f1eeb51ce81d159
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Tue Sep 20 22:48:32 2022 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Tue Sep 20 22:53:40 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92e47225

net-libs/xdp-tools: bump to 1.2.8

Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/Manifest|  2 +-
 .../files/xdp-tools-1.2.3-no-werror.patch  | 73 --
 ...p-tools-1.2.3.ebuild => xdp-tools-1.2.8.ebuild} |  4 --
 3 files changed, 1 insertion(+), 78 deletions(-)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 9336fa35d31d..9e3d03e1cffd 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1 +1 @@
-DIST xdp-tools-1.2.3.tar.gz 252515 BLAKE2B 
26c1bfd5b6c3457794801db64d020b8d6eb254661a0a44fa89dde6a1ff7c04dec1207d38a755029c8caaa955cabec70f196e37257f337cf484b8e3525261119e
 SHA512 
588cda7010592f34ac600993ea528b76be4a8786c1b4e4599c92c5683a80848a11ae90db825f56b67adec60bd8c684bb4ced21dc1bc1b750cbd5d0704d67390d
+DIST xdp-tools-1.2.8.tar.gz 253786 BLAKE2B 
f745085b73da5193c3cdaf60c20dfa5de62f3d83487413c87b4c3d07b755dcf91cfbeb4ba970b4e04eef74b4cec4238057f4462074f49b7139d7652cb0f22998
 SHA512 
6ada9e433fcbefd13cebdffe93c3ce9159e9e09f1498d1615918ca6ecc4f11f03fcd9096980e8ceb7de126d4d8b953fa64917e777d54b5a3dfd1a9556de81626

diff --git a/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch 
b/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch
deleted file mode 100644
index 6d7d7fd955a3..
--- a/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-https://bugs.gentoo.org/831339
-https://bugs.gentoo.org/846938
 a/lib/Makefile
-+++ b/lib/Makefile
-@@ -1,5 +1,5 @@
- 
--LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Werror -Wall) -fPIC
-+LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Wall) -fPIC
- 
- LIB_DIR = .
- include defines.mk
 a/lib/common.mk
-+++ b/lib/common.mk
-@@ -113,7 +113,6 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) 
$(BPF_HEADERS) $(LIBMK)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 
 a/lib/defines.mk
-+++ b/lib/defines.mk
-@@ -39,7 +39,7 @@ endif
- 
- DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
- 
--CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES)
-+CFLAGS += -std=gnu11 -Wextra $(DEFINES)
- BPF_CFLAGS += $(DEFINES)
- 
- CONFIGMK := $(LIB_DIR)/../config.mk
 a/lib/libxdp/Makefile
-+++ b/lib/libxdp/Makefile
-@@ -19,7 +19,7 @@ MAN_OBJ := ${MAN_PAGE:.3=.man}
- MAN_FILES := $(MAN_PAGE)
- TEST_DIR := tests
- TEST_FILE := $(TEST_DIR)/test-libxdp.sh
--TEST_CFLAGS := $(CFLAGS) -I$(realpath $(HEADER_DIR)) -L$(realpath $(OBJDIR)) 
-Wall -Werror $(LDFLAGS)
-+TEST_CFLAGS := $(CFLAGS) -I$(realpath $(HEADER_DIR)) -L$(realpath $(OBJDIR)) 
-Wall $(LDFLAGS)
- TEST_LDLIBS := $(LDLIBS)
- 
- SHARED_CFLAGS += -fPIC -DSHARED
-@@ -144,7 +144,6 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK)
-   -Wno-unused-value \
-   -Wno-pointer-sign \
-   -Wno-compare-distinct-pointer-types \
--  -Werror \
-   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
-   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
- 
-diff --git a/configure b/configure
-index 0a17eae..fd251b7 100755
 a/configure
-+++ b/configure
-@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
- return 0;
- }
- EOF
--libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
-+libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
- if [ "$?" -eq "0" ]; then
- echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
- echo "yes"
-@@ -254,7 +254,7 @@ int main(int argc, char **argv) {
- }
- EOF
- 
--libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
-+libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
- if [ "$?" -eq "0" ]; then
- echo "SYSTEM_LIBBPF:=y" >>$CONFIG
- echo "LIBBPF_VERSION=$LIBBPF_VERSION" >>$CONFIG

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.8.ebuild
similarity index 95%
rename from net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.2.8.ebuild
index 4077d16404d0..0dd14f1dc39b 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.8.ebuild
@@ -25,10 +25,6 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 
 MAKEOPTS+=" V=1"
 
-PATCHES=(
-   "${FILESDIR}"/${PN}-1.2.3-no-werror.patch
-)
-
 src_configure() {

[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/files/, net-libs/xdp-tools/

2022-06-10 Thread Sam James
commit: 81f78148645a266219e9a3e72663f7473e0de6c6
Author: Sam James  gentoo  org>
AuthorDate: Sat Jun 11 05:34:14 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jun 11 05:36:03 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81f78148

net-libs/xdp-tools: drop Werror

Closes: https://bugs.gentoo.org/846938
Closes: https://bugs.gentoo.org/831339
Signed-off-by: Sam James  gentoo.org>

 .../files/xdp-tools-1.2.3-no-werror.patch  | 73 ++
 net-libs/xdp-tools/xdp-tools-1.2.3.ebuild  |  4 ++
 2 files changed, 77 insertions(+)

diff --git a/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch 
b/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch
new file mode 100644
index ..6d7d7fd955a3
--- /dev/null
+++ b/net-libs/xdp-tools/files/xdp-tools-1.2.3-no-werror.patch
@@ -0,0 +1,73 @@
+https://bugs.gentoo.org/831339
+https://bugs.gentoo.org/846938
+--- a/lib/Makefile
 b/lib/Makefile
+@@ -1,5 +1,5 @@
+ 
+-LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Werror -Wall) -fPIC
++LIBBPF_CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-g -O2 -Wall) -fPIC
+ 
+ LIB_DIR = .
+ include defines.mk
+--- a/lib/common.mk
 b/lib/common.mk
+@@ -113,7 +113,6 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) 
$(BPF_HEADERS) $(LIBMK)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+--- a/lib/defines.mk
 b/lib/defines.mk
+@@ -39,7 +39,7 @@ endif
+ 
+ DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ 
+-CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES)
++CFLAGS += -std=gnu11 -Wextra $(DEFINES)
+ BPF_CFLAGS += $(DEFINES)
+ 
+ CONFIGMK := $(LIB_DIR)/../config.mk
+--- a/lib/libxdp/Makefile
 b/lib/libxdp/Makefile
+@@ -19,7 +19,7 @@ MAN_OBJ := ${MAN_PAGE:.3=.man}
+ MAN_FILES := $(MAN_PAGE)
+ TEST_DIR := tests
+ TEST_FILE := $(TEST_DIR)/test-libxdp.sh
+-TEST_CFLAGS := $(CFLAGS) -I$(realpath $(HEADER_DIR)) -L$(realpath $(OBJDIR)) 
-Wall -Werror $(LDFLAGS)
++TEST_CFLAGS := $(CFLAGS) -I$(realpath $(HEADER_DIR)) -L$(realpath $(OBJDIR)) 
-Wall $(LDFLAGS)
+ TEST_LDLIBS := $(LDLIBS)
+ 
+ SHARED_CFLAGS += -fPIC -DSHARED
+@@ -144,7 +144,6 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(LIBMK)
+   -Wno-unused-value \
+   -Wno-pointer-sign \
+   -Wno-compare-distinct-pointer-types \
+-  -Werror \
+   -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+   $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+diff --git a/configure b/configure
+index 0a17eae..fd251b7 100755
+--- a/configure
 b/configure
+@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
+ return 0;
+ }
+ EOF
+-libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
++libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
+ if [ "$?" -eq "0" ]; then
+ echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
+ echo "yes"
+@@ -254,7 +254,7 @@ int main(int argc, char **argv) {
+ }
+ EOF
+ 
+-libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
++libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c 
$LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
+ if [ "$?" -eq "0" ]; then
+ echo "SYSTEM_LIBBPF:=y" >>$CONFIG
+ echo "LIBBPF_VERSION=$LIBBPF_VERSION" >>$CONFIG

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
index 0dd14f1dc39b..4077d16404d0 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
@@ -25,6 +25,10 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 
 MAKEOPTS+=" V=1"
 
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.2.3-no-werror.patch
+)
+
 src_configure() {
export PRODUCTION=1
export DYNAMIC_LIBXDP=1



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2022-04-07 Thread Jason A. Donenfeld
commit: 3b3589a62ce52a3c212a8396aa316abfb5dd5975
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Thu Apr  7 16:25:12 2022 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Thu Apr  7 16:25:12 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b3589a6

net-libs/xdp-tools: prevent broken test from running

The test suite wasn't meant to be run in this context, so just nop it
out of src_test().

Closes: https://bugs.gentoo.org/837080
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.2.3.ebuild | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
index 91e600e4adc3..0dd14f1dc39b 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
@@ -48,3 +48,5 @@ src_install() {
# These are ELF objects but BPF ones.
dostrip -x /usr/lib/bpf
 }
+
+src_test() { :; }



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2022-04-04 Thread Jason A. Donenfeld
commit: 741d8a988d5a203c8cd03421356d1c966a47b349
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Mon Apr  4 23:31:35 2022 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Tue Apr  5 00:21:48 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=741d8a98

net-libs/xdp-tools: bump to 1.2.3

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/Manifest   | 2 +-
 net-libs/xdp-tools/{xdp-tools-1.2.2.ebuild => xdp-tools-1.2.3.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index ea4cbad8d43e..9336fa35d31d 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1 +1 @@
-DIST xdp-tools-1.2.2.tar.gz 250875 BLAKE2B 
dc390587caa1702148a47203a53703d3d9f7e65d7503e8f8307cbec60d5b52f6c150fdc51f257463e22eaa2e897eb68f20ba7a8d7f7bc0fac47cbaf8072fd5cf
 SHA512 
ec2fe34f820e324af044968c62440ba40cae46012c6e39d23cffc392ff190675d8a43240049b2c0467db391073469045aaa3d559cfb8a48d86fb2305fb9f45ad
+DIST xdp-tools-1.2.3.tar.gz 252515 BLAKE2B 
26c1bfd5b6c3457794801db64d020b8d6eb254661a0a44fa89dde6a1ff7c04dec1207d38a755029c8caaa955cabec70f196e37257f337cf484b8e3525261119e
 SHA512 
588cda7010592f34ac600993ea528b76be4a8786c1b4e4599c92c5683a80848a11ae90db825f56b67adec60bd8c684bb4ced21dc1bc1b750cbd5d0704d67390d

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.2.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.3.ebuild
similarity index 100%
rename from net-libs/xdp-tools/xdp-tools-1.2.2.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.2.3.ebuild



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2022-02-05 Thread Jason A. Donenfeld
commit: 2ebba702392e863393740e6cf00b77dd3ebdfb1d
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Sat Feb  5 23:47:25 2022 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Sat Feb  5 23:49:44 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ebba702

net-libs/xdp-tools: bump to 1.2.2

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/Manifest|  2 +-
 ...p-tools-1.2.0.ebuild => xdp-tools-1.2.2.ebuild} | 23 +++---
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 5ecf7cd4b235..ea4cbad8d43e 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1 +1 @@
-DIST xdp-tools-1.2.0.tar.gz 233676 BLAKE2B 
488bd24c5b0c25cb90cc434c0d7cecaf0cf2818d949008fabf4a1245f773e1a1e7a6520c4155df5a6364b0cc8ce2ae49b7b428209b762ecd11f9d6adc10cc57b
 SHA512 
484e5aed6d695665e9e7edec8033b6034281fb215c758a8a8600b5b2215c7decb538efbafa4204306497197a329c3ad7c51beb33717fbe0296a345a1aca8c0a9
+DIST xdp-tools-1.2.2.tar.gz 250875 BLAKE2B 
dc390587caa1702148a47203a53703d3d9f7e65d7503e8f8307cbec60d5b52f6c150fdc51f257463e22eaa2e897eb68f20ba7a8d7f7bc0fac47cbaf8072fd5cf
 SHA512 
ec2fe34f820e324af044968c62440ba40cae46012c6e39d23cffc392ff190675d8a43240049b2c0467db391073469045aaa3d559cfb8a48d86fb2305fb9f45ad

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.2.ebuild
similarity index 71%
rename from net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.2.2.ebuild
index f15f1f30f4f4..91e600e4adc3 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021 Gentoo Authors
+# Copyright 2021-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -11,15 +11,14 @@ LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 
-IUSE="+doc +tools"
+IUSE="+tools"
 
 DEPEND="dev-libs/libbpf:=
sys-libs/zlib
net-libs/libpcap
virtual/libelf"
 RDEPEND="${DEPEND}"
-BDEPEND=">=sys-devel/clang-10.0.0
-   doc? ( app-editors/emacs )"
+BDEPEND=">=sys-devel/clang-10.0.0"
 
 # Not prebuilt -- we build them -- but they're not ordinary ELF objects either.
 QA_PREBUILT="usr/lib/bpf/*.o"
@@ -29,21 +28,23 @@ MAKEOPTS+=" V=1"
 src_configure() {
export PRODUCTION=1
export DYNAMIC_LIBXDP=1
-   export FORCE_EMACS=$(usex doc 1 0)
-   use doc || export EMACS=false
export FORCE_SYSTEM_LIBBPF=1
default
-   {
-   echo "PREFIX := ${EPREFIX}/usr"
-   echo "LIBDIR := \$(PREFIX)/$(get_libdir)"
-   echo "BPF_OBJECT_DIR := \$(PREFIX)/lib/bpf"
-   } >> config.mk
 }
 
 src_install() {
+   export PREFIX="${EPREFIX}/usr"
+   export LIBDIR="${PREFIX}/$(get_libdir)"
+   export BPF_OBJECT_DIR="${PREFIX}/lib/bpf"
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
 }



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2021-12-27 Thread Arthur Zamarin
commit: bf936dc20ccdf561786752328e35210636a43c5c
Author: Arthur Zamarin  gentoo  org>
AuthorDate: Mon Dec 27 17:38:17 2021 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Mon Dec 27 17:38:17 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf936dc2

net-libs/xdp-tools: Keyword 1.2.0 arm64, #821133

Signed-off-by: Arthur Zamarin  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.2.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
index 3aa124b5203c..f15f1f30f4f4 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
@@ -9,7 +9,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 
 IUSE="+doc +tools"
 



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2021-12-27 Thread Arthur Zamarin
commit: 5ba1ff83b9a7c3a8d51260db78acd63d84e00547
Author: Arthur Zamarin  gentoo  org>
AuthorDate: Mon Dec 27 17:36:52 2021 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Mon Dec 27 17:36:52 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ba1ff83

net-libs/xdp-tools: Keyword 1.2.0 arm, #821133

Signed-off-by: Arthur Zamarin  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.2.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
index 1c7f80eb7c0d..3aa124b5203c 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
@@ -9,7 +9,7 @@ 
SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz ->
 
 LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~x86"
 
 IUSE="+doc +tools"
 



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2021-10-29 Thread Jason A. Donenfeld
commit: fcada308100f6567488516556f1942558cbbabf7
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Fri Oct 29 12:25:43 2021 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Fri Oct 29 12:25:59 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcada308

net-libs/xdp-tools: forbid use of emacs if -doc

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.2.0.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
index d4fa6749732..1c7f80eb7c0 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
@@ -30,6 +30,7 @@ src_configure() {
export PRODUCTION=1
export DYNAMIC_LIBXDP=1
export FORCE_EMACS=$(usex doc 1 0)
+   use doc || export EMACS=false
export FORCE_SYSTEM_LIBBPF=1
default
{



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2021-10-29 Thread Jason A. Donenfeld
commit: 6d99df4f1157e23c300ad18f50512e718d8795c3
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Fri Oct 29 12:15:52 2021 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Fri Oct 29 12:18:03 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d99df4f

net-libs/xdp-tools: incorporate suggestions from QA

Thanks sam@.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/xdp-tools-1.2.0.ebuild | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
index c3baff158c9..d4fa6749732 100644
--- a/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
@@ -11,9 +11,9 @@ LICENSE="GPL-2 LGPL-2.1 BSD-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
-IUSE="+doc +tools static-libs"
+IUSE="+doc +tools"
 
-DEPEND="dev-libs/libbpf
+DEPEND="dev-libs/libbpf:=
sys-libs/zlib
net-libs/libpcap
virtual/libelf"
@@ -41,8 +41,8 @@ src_configure() {
 
 src_install() {
default
-   rm -rf "${D}/${EPREFIX}/usr/share/xdp-tools"
-   use static-libs || rm -f "${D}/${EPREFIX}/usr/$(get_libdir)/libxdp.a"
-   use tools || rm -f "${D}/${EPREFIX}/usr/"{sbin,bin}/*
+   rm -r "${ED}/usr/share/xdp-tools" || die
+   rm "${ED}/usr/$(get_libdir)/libxdp.a" || die
+   use tools || { rm "${ED}/usr/sbin"/* || die; }
dostrip -x /usr/lib/bpf
 }



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2021-10-29 Thread Jason A. Donenfeld
commit: 0413d2b898a1af51702744e6df3c7293b7971177
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Fri Oct 29 12:09:44 2021 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Fri Oct 29 12:10:09 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0413d2b8

net-libs/xdp-tools: bump to 1.2.0

Github shows both "releases" (unmaintained) and "tags" (maintained).
Choose the latter and bump this package.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/Manifest|  2 +-
 .../{xdp-tools-0.0.3.ebuild => xdp-tools-1.2.0.ebuild} | 10 +++---
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
index 1ce4a87a70a..5ecf7cd4b23 100644
--- a/net-libs/xdp-tools/Manifest
+++ b/net-libs/xdp-tools/Manifest
@@ -1 +1 @@
-DIST xdp-tools-0.0.3.tar.gz 381386 BLAKE2B 
1160d9a7cc2b6cf7b49e7223acdbeba72046c00ec710c21140da0607cac1e8a1231992a8967b2f8f2a964da593dfe0af08b28abbc3b13818ddafebbc2c3961a7
 SHA512 
c2a4278db41af020cf42b1139c93786a49ad2a071b2002177ac39e8d6b74203d251bd7823399d9e156c969d2ae741b0ecd4178edf446fe5c7270e53295458fce
+DIST xdp-tools-1.2.0.tar.gz 233676 BLAKE2B 
488bd24c5b0c25cb90cc434c0d7cecaf0cf2818d949008fabf4a1245f773e1a1e7a6520c4155df5a6364b0cc8ce2ae49b7b428209b762ecd11f9d6adc10cc57b
 SHA512 
484e5aed6d695665e9e7edec8033b6034281fb215c758a8a8600b5b2215c7decb538efbafa4204306497197a329c3ad7c51beb33717fbe0296a345a1aca8c0a9

diff --git a/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild 
b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
similarity index 79%
rename from net-libs/xdp-tools/xdp-tools-0.0.3.ebuild
rename to net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
index 0966087d398..c3baff158c9 100644
--- a/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 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}/releases/download/v${PV}/${P}.tar.gz;
+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"
@@ -26,16 +26,11 @@ QA_PREBUILT="usr/lib/bpf/*.o"
 
 MAKEOPTS+=" V=1"
 
-src_prepare() {
-   # A form of this kludge is upstream but hasn't yet been released:
-   sed -i 's/install -m 0755 \$(SHARED_LIBS)/cp -fpR \$(SHARED_LIBS)/' 
lib/libxdp/Makefile || die
-   default
-}
-
 src_configure() {
export PRODUCTION=1
export DYNAMIC_LIBXDP=1
export FORCE_EMACS=$(usex doc 1 0)
+   export FORCE_SYSTEM_LIBBPF=1
default
{
echo "PREFIX := ${EPREFIX}/usr"
@@ -46,6 +41,7 @@ src_configure() {
 
 src_install() {
default
+   rm -rf "${D}/${EPREFIX}/usr/share/xdp-tools"
use static-libs || rm -f "${D}/${EPREFIX}/usr/$(get_libdir)/libxdp.a"
use tools || rm -f "${D}/${EPREFIX}/usr/"{sbin,bin}/*
dostrip -x /usr/lib/bpf



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2021-10-29 Thread Jason A. Donenfeld
commit: 93fc1739ba1faa265e42081e6f01865122b10681
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Fri Oct 29 12:01:03 2021 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Fri Oct 29 12:01:03 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93fc1739

net-libs/xdp-tools: use proper gentoo email in metadata

Why did the template default to this one?

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/metadata.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-libs/xdp-tools/metadata.xml b/net-libs/xdp-tools/metadata.xml
index 51fa02b96ae..878714e4162 100644
--- a/net-libs/xdp-tools/metadata.xml
+++ b/net-libs/xdp-tools/metadata.xml
@@ -2,7 +2,7 @@
 https://www.gentoo.org/dtd/metadata.dtd;>
 
   
-ja...@zx2c4.com
+zx...@gentoo.org
 Jason A. Donenfeld
   
   



[gentoo-commits] repo/gentoo:master commit in: net-libs/xdp-tools/

2021-10-29 Thread Jason A. Donenfeld
commit: bd569b9a6ef8d9e1e34a97116999e2345a16408b
Author: Jason A. Donenfeld  gentoo  org>
AuthorDate: Fri Oct 29 11:53:31 2021 +
Commit: Jason A. Donenfeld  gentoo  org>
CommitDate: Fri Oct 29 11:54:09 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd569b9a

net-libs/xdp-tools: add version 0.0.3

A bit rough around the edges, given the bespoke build system of
xdp-tools is a little bit immature, and there's a bit of weirdness
around installing BPF ELF objects. But hopefully this is a solid start.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld  gentoo.org>

 net-libs/xdp-tools/Manifest   |  1 +
 net-libs/xdp-tools/metadata.xml   | 14 +
 net-libs/xdp-tools/xdp-tools-0.0.3.ebuild | 52 +++
 3 files changed, 67 insertions(+)

diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
new file mode 100644
index 000..1ce4a87a70a
--- /dev/null
+++ b/net-libs/xdp-tools/Manifest
@@ -0,0 +1 @@
+DIST xdp-tools-0.0.3.tar.gz 381386 BLAKE2B 
1160d9a7cc2b6cf7b49e7223acdbeba72046c00ec710c21140da0607cac1e8a1231992a8967b2f8f2a964da593dfe0af08b28abbc3b13818ddafebbc2c3961a7
 SHA512 
c2a4278db41af020cf42b1139c93786a49ad2a071b2002177ac39e8d6b74203d251bd7823399d9e156c969d2ae741b0ecd4178edf446fe5c7270e53295458fce

diff --git a/net-libs/xdp-tools/metadata.xml b/net-libs/xdp-tools/metadata.xml
new file mode 100644
index 000..51fa02b96ae
--- /dev/null
+++ b/net-libs/xdp-tools/metadata.xml
@@ -0,0 +1,14 @@
+
+https://www.gentoo.org/dtd/metadata.dtd;>
+
+  
+ja...@zx2c4.com
+Jason A. Donenfeld
+  
+  
+xdp-project/xdp-tools
+  
+  
+Install various helper tools rather than just 
libxdp.
+  
+

diff --git a/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild 
b/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild
new file mode 100644
index 000..0966087d398
--- /dev/null
+++ b/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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}/releases/download/v${PV}/${P}.tar.gz;
+
+LICENSE="GPL-2 LGPL-2.1 BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+doc +tools static-libs"
+
+DEPEND="dev-libs/libbpf
+   sys-libs/zlib
+   net-libs/libpcap
+   virtual/libelf"
+RDEPEND="${DEPEND}"
+BDEPEND=">=sys-devel/clang-10.0.0
+   doc? ( app-editors/emacs )"
+
+# Not prebuilt -- we build them -- but they're not ordinary ELF objects either.
+QA_PREBUILT="usr/lib/bpf/*.o"
+
+MAKEOPTS+=" V=1"
+
+src_prepare() {
+   # A form of this kludge is upstream but hasn't yet been released:
+   sed -i 's/install -m 0755 \$(SHARED_LIBS)/cp -fpR \$(SHARED_LIBS)/' 
lib/libxdp/Makefile || die
+   default
+}
+
+src_configure() {
+   export PRODUCTION=1
+   export DYNAMIC_LIBXDP=1
+   export FORCE_EMACS=$(usex doc 1 0)
+   default
+   {
+   echo "PREFIX := ${EPREFIX}/usr"
+   echo "LIBDIR := \$(PREFIX)/$(get_libdir)"
+   echo "BPF_OBJECT_DIR := \$(PREFIX)/lib/bpf"
+   } >> config.mk
+}
+
+src_install() {
+   default
+   use static-libs || rm -f "${D}/${EPREFIX}/usr/$(get_libdir)/libxdp.a"
+   use tools || rm -f "${D}/${EPREFIX}/usr/"{sbin,bin}/*
+   dostrip -x /usr/lib/bpf
+}