diff options
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/Manifest.gz | bin | 32788 -> 32786 bytes | |||
-rw-r--r-- | net-libs/libtorrent/Manifest | 3 | ||||
-rw-r--r-- | net-libs/libtorrent/files/libtorrent-0.13.8-configure-clang-16.patch | 22 | ||||
-rw-r--r-- | net-libs/libtorrent/libtorrent-0.13.8-r3.ebuild (renamed from net-libs/libtorrent/libtorrent-0.13.8-r2.ebuild) | 7 | ||||
-rw-r--r-- | net-libs/xdp-tools/Manifest | 4 | ||||
-rw-r--r-- | net-libs/xdp-tools/files/1.3.1-no-Werror.patch | 97 | ||||
-rw-r--r-- | net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch | 36 | ||||
-rw-r--r-- | net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild (renamed from net-libs/xdp-tools/xdp-tools-1.3.1-r1.ebuild) | 25 |
8 files changed, 190 insertions, 4 deletions
diff --git a/net-libs/Manifest.gz b/net-libs/Manifest.gz Binary files differindex b36c4d21ad3e..695e001871b0 100644 --- a/net-libs/Manifest.gz +++ b/net-libs/Manifest.gz diff --git a/net-libs/libtorrent/Manifest b/net-libs/libtorrent/Manifest index 154274e95504..3f369b395e4b 100644 --- a/net-libs/libtorrent/Manifest +++ b/net-libs/libtorrent/Manifest @@ -1,4 +1,5 @@ +AUX libtorrent-0.13.8-configure-clang-16.patch 747 BLAKE2B aa23475891da71904db18429a2831a09231ebdbe15b324b7767a8f9f72e66f21c3c78f2c9c1d42336881465eb3b869c67de8b9be966f7d6ba1d299851a14274b SHA512 1a399f5c6db94eeaa4defb98957bebb0671f80b3bee54c2e96fe1a7af51d5ebd24a02c894ad10bcdaf6798a70b70f07cbb9fc727ab76da7ad7795846bf278868 AUX libtorrent-0.13.8-sysroot.patch 851 BLAKE2B 17ee86d4f92e87b678b62a5c00c1ebba69dd2cfca8a09aa3dca7ba36801469281ad5cb47f1d3ea920b989d7c210f180c4d94bf23da6dac7ef078b7b1f4d07048 SHA512 883c02909863354f0450161d4a7e191ef90cc6692b7f0739693a9e3047cb0c23668aabc98bbb9d2a0986535f4416b3fe7d92809e3ef35116e261a06851f67625 DIST libtorrent-0.13.8.tar.gz 834027 BLAKE2B 374f33af52a45c244182d36bacd6b42eea9edc179e42fb40f4170a47a0cdd39cfb3f42f82fc26ab36718afb9a28a8dd72ca139b3646bbc1c2887444905438cdd SHA512 417177df5b27cd8c6a6317063b0846da2690de4633836466728605c2edad2de407d29d321cc481b8d1352dd0ff6dd89f4566a830424a8cf986f2fddb04704da4 -EBUILD libtorrent-0.13.8-r2.ebuild 1762 BLAKE2B ee26974c1b9ce4ea95e0bab1cc7dd1b53ba54cea94bad6ab7781aa5e4a57733b3b4fb82cdbfd48c818270b8aea9c2fe75ee6b8c40372f9e35ec9b4948171d4b6 SHA512 66d186c0791b0a634010cb8bbf7d515f9bbe5ed53d2b10df399738653afe17eedc93e2c3ba57492c73ba40e8bba3067dcccf9e6df582ae139b3e33d18bba38f7 +EBUILD libtorrent-0.13.8-r3.ebuild 1816 BLAKE2B d080cb6a3dd328df57d82138e8789c3cbd3ef85498a824be6170d72b0c3345256c272bde37c20cf224f56165c2a02b5c07690016a035a127b5fdf42ad329f467 SHA512 0c383794ae9ee8698a3304a949543acec9aca1326ebc42cbd940de719a0f321b205ced3d4c281a4c5eca7561e0658795b77fc8699acde61668cc0feb5ba52fb0 MISC metadata.xml 332 BLAKE2B 83ae91b4dea009d642d92334a5675f7adf861a1e623ef3f483d3ffdcdcce91f9b9b3ed0e5b164ea5c31c228fc4992638df50e221cd6b97e04b96d1518b901546 SHA512 2745495bd2d107326ab4ebeff7d7669b2706a130571ee4f2144ae67d92835acaf04d9ba4f45148f16b0138170ebe6d50019d5ee1b9ad66332338e9c02ecd3624 diff --git a/net-libs/libtorrent/files/libtorrent-0.13.8-configure-clang-16.patch b/net-libs/libtorrent/files/libtorrent-0.13.8-configure-clang-16.patch new file mode 100644 index 000000000000..0a23141a7e58 --- /dev/null +++ b/net-libs/libtorrent/files/libtorrent-0.13.8-configure-clang-16.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/899566 +https://github.com/rakshasa/libtorrent/pull/237 + +From e851a8657d2ef5c332260f1e3a3896f438dba255 Mon Sep 17 00:00:00 2001 +From: Florian Weimer <fweimer@redhat.com> +Date: Tue, 3 Jan 2023 14:41:11 +0100 +Subject: [PATCH] configure: Define _GNU_SOURCE when checking for + pthread_setname_np + +Previously, the test would always fail with compilers that do not +support implicit function declarations because the pthread_setname_np +function was not declared. +--- a/scripts/checks.m4 ++++ b/scripts/checks.m4 +@@ -469,6 +469,7 @@ AC_DEFUN([TORRENT_CHECK_PTHREAD_SETNAME_NP], [ + AC_MSG_CHECKING(for pthread_setname_np type) + + AC_TRY_LINK([ ++ #define _GNU_SOURCE + #include <pthread.h> + #include <sys/types.h> + ],[ diff --git a/net-libs/libtorrent/libtorrent-0.13.8-r2.ebuild b/net-libs/libtorrent/libtorrent-0.13.8-r3.ebuild index 5bb36208d46b..16ec5d67b750 100644 --- a/net-libs/libtorrent/libtorrent-0.13.8-r2.ebuild +++ b/net-libs/libtorrent/libtorrent-0.13.8-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -26,7 +26,10 @@ RDEPEND=" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" -PATCHES=( "${FILESDIR}"/${PN}-0.13.8-sysroot.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-0.13.8-sysroot.patch + "${FILESDIR}"/${PN}-0.13.8-configure-clang-16.patch +) src_prepare() { default diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest index debc5707450c..41a864e9c462 100644 --- a/net-libs/xdp-tools/Manifest +++ b/net-libs/xdp-tools/Manifest @@ -1,7 +1,9 @@ AUX 1.3.1-disable-stack-protector.patch 1085 BLAKE2B 2afb9ae8f79c2aa9c65d07a509c60b2377b949edd61703652c38bf30fa0fe12357d9cbb4257bd7b421ebebdfab2f8c60e06ab915bd9595aa8a839bc7f23effa2 SHA512 cbfb776915f1606c79510a8a8bdd7681d53c544ee66de15dd879f22df0ff2fe1c5716ef3da4221641f76dac5549d3f8de0b643b9a6fa100f609ff0c9f33e2634 AUX 1.3.1-fix-btf__type_cnt-detection.patch 1750 BLAKE2B 7086a709a02f7ea00c709373242cede140ff268c395afb97cba4754182e74e72bfdd300afba4cdc273168f78e63ecda5c58e957d66fa826fcb8ff4615714eded SHA512 27e3b4fe413230471aaffdd9c105ad739351b87914e48b01ed2fefd95213a60fc1ec237921036ca8115f48367d4c965b61002b33037955ba1c6447a497e42912 +AUX 1.3.1-no-Werror.patch 3445 BLAKE2B 9965ad3b07c789594a129178ed844b10f5c70dab713f204f99b520f4303481f27377ceb0ba4d30f19d747dba1ad9dd354604e632b6cf43697b90d51223ccc7b9 SHA512 81b2f9221fe40a2515d62866f8c207fb7f3e60b6cb4fe8da5df8477b5753d50cbbb259a537be41100344995e327411b32341031756bbd4ac7409a18b8bb7a773 +AUX 1.3.1-xdpdump-clang.patch 1381 BLAKE2B 860f505dbef740aded6440d53e864cb82714ccd2ca0d475f0c0faab7228c0f9ccc88ee627b4708732f49016fcc2507cf1d2470d17864a521218e4111332a420f SHA512 d380f948fdca80a5816432f39f54263c11a6d4589af10e85a9f25d8de1d0b8d1fb0f6c8fe0c424fbee9fb43b8bf8000f7d1fea1a0d5418bacc62c2321780d7f2 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 EBUILD xdp-tools-1.2.8.ebuild 1261 BLAKE2B 800efd8b697d0fe6e2e5fae5c34deb9b299aec42a4aa437b43a63cce77356c0d71107728a369287910f2d5948a24cf467518c3ce7809edbdf2baee27338b5d69 SHA512 40847494eeac46981c8a5beb41ea321a31656d37fd94b0cdeb010c1f084a6bd06d1bf61f3bc7ce319ba59b27eb82781e2922b4f33f317f4a26e42fcfca7a0faf -EBUILD xdp-tools-1.3.1-r1.ebuild 1424 BLAKE2B 0321e811841b9c08abf2b40288656544996e694d3953358bdc0acc380e3401ad8cc27a54f49ed717ae71afee53d3c499fb3a0999ab514814b7a242838914a3d9 SHA512 9f1ab01780a8a9f803bdc6eac5235d717e515b7d7c83efedec2e297b9324ba59b2ba7c3f30554c1bf442f76c942f44b5490047681f17894d58a3cbb8ba707c12 +EBUILD xdp-tools-1.3.1-r2.ebuild 2069 BLAKE2B 761dfd0222493a2597e2feba7bd2f6e0d4e269ba72e8b70b35c99b8818af6f380ba3ac3e8cb6f5f31e5606abccb1d3ad0eb7580cb446370be0b556395fd1f83e SHA512 f7f4eb70db2e26a2e61677f3e6cf7852d3dc3812893e47bf29fdd5c3dd9c125db97d5438e36b2754596c1ea83790d2989fd1f3c951174d1dbcb97b937212a5a1 MISC metadata.xml 448 BLAKE2B 5e76000a49c2578dc872010907deab803bf25d58e5383b81f8953f3ac8549f017895c7afa39a2b8c3eb47efb66c5c322177032542cdffec41de733502da41ce4 SHA512 4010fb44ad655a9c58e3328623652d2f6c10aee934daeaaa2c5738c44b086cc2674e011e5de0b6e6a058c24131a16be679e971a692800458492cf3addbd761c2 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 000000000000..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 b/net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch new file mode 100644 index 000000000000..3983c8c8f402 --- /dev/null +++ b/net-libs/xdp-tools/files/1.3.1-xdpdump-clang.patch @@ -0,0 +1,36 @@ + +From: https://github.com/xdp-project/xdp-tools/commit/344b241da22a5358c714d6db1ea6f225f951dbdb + +From 344b241da22a5358c714d6db1ea6f225f951dbdb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com> +Date: Wed, 8 Mar 2023 18:50:56 +0100 +Subject: [PATCH] xdpdump: fix build with clang +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When building all of xdp-tools with clang, the xdp-dump build fails +due to 'classic' use of variable-length arrays and -Werror. +Disable the warning and leave a breadcrumb to the discussion. + +Fixes: #304 +Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> +--- + xdp-dump/Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/xdp-dump/Makefile b/xdp-dump/Makefile +index 7ee1688e..a9ae0ae7 100644 +--- a/xdp-dump/Makefile ++++ b/xdp-dump/Makefile +@@ -4,6 +4,10 @@ XDP_TARGETS := xdpdump_bpf xdpdump_xdp + USER_TARGETS := xdpdump + TEST_FILE := tests/test-xdpdump.sh + ++# Disable warnings about VLAs not being at the end of a structure when building ++# with clang. The code is fine, but clang's complaint coupled with -Werror would ++# break the build. See https://github.com/xdp-project/xdp-tools/issues/304 ++CFLAGS += "-Wno-gnu-variable-sized-type-not-at-end" + LIB_DIR = ../lib + USER_LIBS = -lpcap + MAN_PAGE := xdpdump.8 diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1-r1.ebuild b/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild index 95efd4e44792..9bc3e28993a8 100644 --- a/net-libs/xdp-tools/xdp-tools-1.3.1-r1.ebuild +++ b/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild @@ -3,6 +3,8 @@ EAPI=8 +inherit flag-o-matic + DESCRIPTION="The libxdp library and various tools for use with XDP" HOMEPAGE="https://github.com/xdp-project/xdp-tools" SRC_URI="https://github.com/xdp-project/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" @@ -33,6 +35,8 @@ MAKEOPTS+=" V=1" PATCHES=( "${FILESDIR}"/1.3.1-disable-stack-protector.patch "${FILESDIR}"/1.3.1-fix-btf__type_cnt-detection.patch + "${FILESDIR}"/1.3.1-no-Werror.patch + "${FILESDIR}"/1.3.1-xdpdump-clang.patch ) src_configure() { @@ -42,6 +46,10 @@ src_configure() { export PRODUCTION=1 export DYNAMIC_LIBXDP=1 export FORCE_SYSTEM_LIBBPF=1 + + # bug 861587 + filter-lto + default } @@ -60,3 +68,20 @@ src_install() { # 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 +} |