summaryrefslogtreecommitdiff
path: root/sys-apps/iproute2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-25 01:25:44 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-25 01:25:44 +0100
commitc25088d4fc442a7d6dc3a8d0498b43024888318d (patch)
treefdb19b6a9b3a20669ecb49f0ba8d9f435fbb4b1a /sys-apps/iproute2
parentd80b870c42fbe218389ffaf86f0f2a39404deca1 (diff)
gentoo auto-resync : 25:09:2024 - 01:25:44
Diffstat (limited to 'sys-apps/iproute2')
-rw-r--r--sys-apps/iproute2/Manifest4
-rw-r--r--sys-apps/iproute2/files/iproute2-6.11.0-musl-fixes.patch35
-rw-r--r--sys-apps/iproute2/iproute2-6.11.0-r1.ebuild214
-rw-r--r--sys-apps/iproute2/iproute2-9999.ebuild1
4 files changed, 252 insertions, 2 deletions
diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index 7ab84f9f7477..3b64e6f695e9 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -1,6 +1,7 @@
AUX iproute2-5.7.0-mix-signal.h-include.patch 213 BLAKE2B ad6def6d017ff1d78587d1bfb9d92379983d989d9d4a396e773f02c655ac14c57cc25c5d4e37fbdb0e0d1cb1d35fc94ee70077b81d1285ac2d58cb1b19fa69db SHA512 09a9d450179b06c434a41b7bdd8d4a47b8ca2303de3d08b2b101e8695aec28e5d1e454a8c62e1b71d66b6e776dc6975f2837acc0a0f8a2a3f1e31b1eb56b71e3
AUX iproute2-6.10.0-musl-1.patch 1243 BLAKE2B 66853640dec036026b4c9dce0e1ecd3278492a5ebda55a36e2098404ffab12e4606f796c6fa00765a6cc37dbbb87fd42c841b442561a85397491bde7181cef86 SHA512 b89ade7182ef09ac3bd99fdfc15c36ebf1911941d9f967f88d62738a646795998d17082147a649a32d390a015465d2e8fe7cbbc8dfdd4d5d5bd9d54be67ce9a3
AUX iproute2-6.10.0-musl-2.patch 1452 BLAKE2B b20f3a0769379339651a9c781b5a53e41f0678ad1493878ec0523698e86dd9f702a527cc3c09a5c9607309e750a19798346ee5f3ddf580739bd6d949f05ce671 SHA512 1958e1d4ee92092d169d87de8a8983aaf656b78b4f0ba7188b449768250457ad4f2266876d0077f39d9c0dc27e2531c4a76f6b13f44095c614d88ec7c1e0c302
+AUX iproute2-6.11.0-musl-fixes.patch 763 BLAKE2B c7cf3f2c47152636b4560a84ffcaf7eb7b1dc205f188a9c4e84c2caf9e091fc1bb69909dfe62ac011e374d72fcae617ccd707d2c50113663c91870b921e91598 SHA512 ed5d30fb3637e7ee1a2ff3cd3180f80f0aa578ac383e86ae0d35a6bfc733e87174eae8603aade7f32573d200258f3baa52b35e81ef43a7daad887522f0d8b522
AUX iproute2-6.4.0-disable-libbsd-fallback.patch 843 BLAKE2B b7b27ce8ee0f7961932cfdba071e4062688dd4ae0cd4aad742f3fdc66fd76a70dd0eea97e59efa7d94a8dd3713bcb0b2aae72c46853a3c7be50acf50af7538e6 SHA512 0610d4fc282575c6c78d02362492dda9ae79de24a4024c64a7cfa8138b94f11ea4dd50fcd741475992dfb88861e672f96854111d23bd690a8949adbbf5378970
AUX iproute2-6.5.0-configure-nomagic-nolibbsd.patch 6966 BLAKE2B bc2da6f561ebd10aa40438b9bfd9d6b25db2edee844ff31e7e8726b3b3a282db7e7bd1ee3955642608a03d9d11b900e4fb26b35f0bec7f07d844337424f2da8a SHA512 84ab38bebb1687ba743a1d4ed5eafc484b02b6ba96e8650b988a30456c9b936718dee7640ef97cecc07565b7e0ddcc7cad5002961b3ff0cfcefddd87eb64d067
AUX iproute2-6.5.0-mtu.patch 1719 BLAKE2B ef2dc2f3ce23432464b778584c53b3a204a05e7dac1d87969563d89b94bbcd04ff080f21d9809e43f75751b63b49ea506e0ae8191a6170b9c76dae043f861621 SHA512 4057309aaa53e97fa8ed0a410e42e4cf1f70e20a278a299b49261ef00ad8050bfad903e1a91b123a7c99e041732e23088274a8b79c0b2290482acf9735fd8cc1
@@ -17,11 +18,12 @@ DIST iproute2-6.6.0.tar.xz 917964 BLAKE2B 9d20f19c04c2bbde7a3ae53e61e4623b119570
DIST iproute2-6.8.0.tar.xz 913512 BLAKE2B d30cdff8522627c27c9165f068f42adbec38f15548a8f2cd31276f283880dc402e10c5989e7227e80cdc891bcc4a574b330d634ae550e689758b849c0506c31f SHA512 54e50340a73c8810d69bfd54704b469149731634a97d94da08b5a305592a812131a441e5b646e32b480d61840e2ade29387e54b934effeee8ded4f06e557a5c0
DIST iproute2-6.9.0.tar.xz 918144 BLAKE2B a7434a2537a55b4875db0e3cc35383dfe4d0c8a118a8a1102c4076bfb154c9c2ab0781dcff324fa18ce7cfde798bf332a9e0ff08003ff39acbb8129b597a93a6 SHA512 1cbb234cb8f94213c3529f0b74fed5a575ff1fb838e783b8d2b440643c2e91246eda42e9b26e9775897aadb8b8133d199b2851b8ea0df06a899dc02acf403325
EBUILD iproute2-6.10.0.ebuild 6012 BLAKE2B f467ff5d31c3574c838dadc1e881f74d9703e6019ab068d0a9091fc330e3dc20022fe2173735b3e576c53484cb58c1f639c58c2dcb0c8d69a3a9e6f0b821bd2f SHA512 a213cedbd8184d2f99acfb3d76b3cbb890281446b5aecdd9d73be6db2cf9c4590574798e00f115ac643345c34f6a396c2c35b2afd4dfdaa9336fb5140cfaafde
+EBUILD iproute2-6.11.0-r1.ebuild 6061 BLAKE2B c5911049a3c6d939ea1765c7844c1900a9ffb1b059e3ec6b9fd892421e6489b8d6579196238d09981e9323416411040ad84ce0d5358bbb952c25aad6a8826b3b SHA512 e95e6f9c1adc9671e648b43cc9602fe93794c036ea5f8c8ccccdf22ed5381be5bc38165316d8d07160c4823a53ba7072590d9fe11e440b46a488b2065e8251a7
EBUILD iproute2-6.11.0.ebuild 6018 BLAKE2B df1906f4a87a8d5cea3630393faedf8b6e086e8a679b90a81e576bdc0f145005d3cafb27e3ed154968963b126d16d043e03070d395227ac8d96b89aea18a8482 SHA512 2384eeb4b71201f2ed4c378ad7a20c3ec9659fe1ce53b25f8276f185b3ee6f1ddad1f3ed91acb49bcd65880fcd843b9e2e5b2e28f716a87247f9a237bc2806ca
EBUILD iproute2-6.6.0-r1.ebuild 5999 BLAKE2B 9cbd67178215e76aeba681b6e3f03f5227606d3d267b97d7a3ea958ff34c2665e0490e18bfc5733c027fe00e1112c7840e3078dad0f227d50202ab9d0570d3e8 SHA512 e89982f8f99b6288d816cf4303cf86ae634f48fc772f543eae6189f88517aa748e141bc594e37469bb8e5e2a1c878df3c36ed7ffb6f193cc48d38758b8ca0a4a
EBUILD iproute2-6.6.0-r3.ebuild 5964 BLAKE2B 9b320266330abe11e474c9b14042bd6ded1f1c29c60cf0383bf3b486d60c1b04fa00c5bb9fb400cce63e437daf1954e1170d8b91c7dc8666c9cb9f4e25f9f718 SHA512 9a7fdfa63120d27e23b878b509c84e1c2aec96416475a1e49b80255bd0a5f20e4fd7ef506370316294dc1c1849b8dab446f660ddafef316033f9ba349ccdfaf3
EBUILD iproute2-6.6.0.ebuild 5906 BLAKE2B 7294a3867a2ece9c5184cdd2d2268b828f867b40f56bf8e7b415696ca955c48b38c14883ab7582b85bc0984a4786605ff5f52b7ffc8f3aeae759bd3b11f47faa SHA512 7f08d99c733083ad1210b0c86d6b3184ba3e3899dafe099c408207906178e2caae3faacf5672f29ecff233be20f3bed9343eebe69b354423749b305c2043095e
EBUILD iproute2-6.8.0-r2.ebuild 6004 BLAKE2B ca9e1eb347e4c3bde3d04bb0e0a1be9b08ebddabff0605ff3a494d48b3e2efd72e7a4da1059314cf1d9cf29c51094102353a34c09065084b072dbdb8c7f69037 SHA512 62ee1d358b3b279436a31e41d4ee4c8afbd41a0073249f0764a3e3558abb3bda4a059b32da42ba3c6f507b81b335718a3c2539f80615ae3dcad5527704e87b9b
EBUILD iproute2-6.9.0.ebuild 5961 BLAKE2B 3d0ac07598de171cb5e717bfd7ff6501ac05635021e6c622e78fb43ec4c1bafd1b6ff189fb8329c112b0401898c9c401446135642bbc2470104dd1c957162051 SHA512 3b3625ff6835532c9c665727f775eb02c92b3aa71d00393b286466f9f993704b864c13a5c786f8c6e30849f5a87ef75468680263922bd7a3fbbc1f279c179fcb
-EBUILD iproute2-9999.ebuild 6018 BLAKE2B df1906f4a87a8d5cea3630393faedf8b6e086e8a679b90a81e576bdc0f145005d3cafb27e3ed154968963b126d16d043e03070d395227ac8d96b89aea18a8482 SHA512 2384eeb4b71201f2ed4c378ad7a20c3ec9659fe1ce53b25f8276f185b3ee6f1ddad1f3ed91acb49bcd65880fcd843b9e2e5b2e28f716a87247f9a237bc2806ca
+EBUILD iproute2-9999.ebuild 6002 BLAKE2B 1a8e642b5f45cd810244fa3c3cd8aea6dc8cb6006e16062f325130fdff275c267860c008ddfce6d028a10a24cb039b1cd7b60a22837b46b0102d7fce6076a265 SHA512 956d0c2d917d8e698eb118b4d68aa1c8cdbc1c2488407697406d68ffb484cfb459741a516cb5d5d058b5aec79acbae8fbe9bb5f659f916836e16da925cfd33ce
MISC metadata.xml 887 BLAKE2B 28f816c12d798665f2e32e22ffd69dfda03e251bc6447a34e3ddbf0d5d00046c561b7f8282f73ed8609b3d9397da9bc2b1bf54d23bc82d5395af141e2448a3e3 SHA512 e5cafc242c2e4fe64df7456b3e001285933a680b674400ef53b2fc5f966f0c8551fc2ad7d07798d56eed365331ae01536d7b6d41fa5a710c1c2257900ce45d3e
diff --git a/sys-apps/iproute2/files/iproute2-6.11.0-musl-fixes.patch b/sys-apps/iproute2/files/iproute2-6.11.0-musl-fixes.patch
new file mode 100644
index 000000000000..cc1370a3a6af
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-6.11.0-musl-fixes.patch
@@ -0,0 +1,35 @@
+From https://bugs.gentoo.org/939811
+From: Holger Hoffstätte <holger@applied-asynchrony.com>
+
+--- a/bridge/mst.c
++++ b/bridge/mst.c
+@@ -4,8 +4,6 @@
+ */
+
+ #include <stdio.h>
+-#include <linux/if_bridge.h>
+-#include <net/if.h>
+
+ #include "libnetlink.h"
+ #include "json_print.h"
+@@ -13,6 +11,9 @@
+
+ #include "br_common.h"
+
++#include <linux/if_bridge.h>
++#include <net/if.h>
++
+ #define MST_ID_LEN 9
+
+ #define __stringify_1(x...) #x
+--- a/include/json_print.h
++++ b/include/json_print.h
+@@ -11,6 +11,8 @@
+ #include "json_writer.h"
+ #include "color.h"
+
++struct timeval;
++
+ #define _IS_JSON_CONTEXT(type) (is_json_context() && (type & PRINT_JSON || type & PRINT_ANY))
+ #define _IS_FP_CONTEXT(type) (!is_json_context() && (type & PRINT_FP || type & PRINT_ANY))
+
diff --git a/sys-apps/iproute2/iproute2-6.11.0-r1.ebuild b/sys-apps/iproute2/iproute2-6.11.0-r1.ebuild
new file mode 100644
index 000000000000..c5c0744b82f8
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-6.11.0-r1.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs flag-o-matic
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
+ inherit git-r3
+else
+ SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="atm berkdb bpf caps elf +iptables minimal nfs selinux"
+# Needs root
+RESTRICT="test"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+ !minimal? ( net-libs/libmnl:= )
+ atm? ( net-dialup/linux-atm )
+ berkdb? ( sys-libs/db:= )
+ bpf? ( >=dev-libs/libbpf-0.6:= )
+ caps? ( sys-libs/libcap )
+ elf? ( virtual/libelf:= )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ nfs? ( net-libs/libtirpc:= )
+ selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support (bug #549948) and some defines (bug #553876)
+DEPEND="
+ ${RDEPEND}
+ >=sys-kernel/linux-headers-3.16
+"
+BDEPEND="
+ app-arch/xz-utils
+ >=sys-devel/bison-2.4
+ app-alternatives/lex
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.10.0-musl-1.patch # bug #936234
+ "${FILESDIR}"/${PN}-6.10.0-musl-2.patch # bug #926341
+ "${FILESDIR}"/${PN}-6.9.0-mtu.patch # bug #291907
+ "${FILESDIR}"/${PN}-6.8.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727
+ "${FILESDIR}"/${PN}-6.8.0-disable-libbsd-fallback.patch # bug #911727
+ "${FILESDIR}"/${PN}-6.11.0-musl-fixes.patch # bug #939811
+)
+
+src_prepare() {
+ default
+
+ # Fix version if necessary
+ local versionfile="include/version.h"
+ if [[ ${PV} != 9999 ]] && ! grep -Fq "${PV}" ${versionfile} ; then
+ einfo "Fixing version string"
+ sed -i "s@\"[[:digit:]\.]\+\"@\"${PV}\"@" \
+ ${versionfile} || die
+ fi
+
+ # echo -n is not POSIX compliant
+ sed -i 's@echo -n@printf@' configure || die
+
+ sed -i \
+ -e '/^CC :\?=/d' \
+ -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
+ -e "s|-O2|${CFLAGS} ${CPPFLAGS}|" \
+ -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \
+ -e "/^DBM_INCLUDE/s:=.*:=${T}:" \
+ Makefile || die
+
+ # Build against system headers
+ rm -r include/netinet || die #include/linux include/ip{,6}tables{,_common}.h include/libiptc
+ sed -i 's:TCPI_OPT_ECN_SEEN:16:' misc/ss.c || die
+
+ if use minimal ; then
+ sed -i -e '/^SUBDIRS=/s:=.*:=lib tc ip:' Makefile || die
+ fi
+}
+
+src_configure() {
+ tc-export AR CC PKG_CONFIG
+
+ # This sure is ugly. Should probably move into toolchain-funcs at some point.
+ local setns
+ pushd "${T}" >/dev/null || die
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c || die
+ if ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null ; then
+ setns=y
+ else
+ setns=n
+ fi
+
+ echo 'int main(){return 0;}' > test.c || die
+ if ! ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null ; then
+ sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile || die
+ fi
+ popd >/dev/null || die
+
+ # build system does not pass CFLAGS to LDFLAGS, as is recommended by GCC upstream
+ # https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-flto
+ # https://bugs.gentoo.org/929233
+ append-ldflags ${CFLAGS}
+
+ # run "configure" script first which will create "config.mk"...
+ # Using econf breaks since 5.14.0 (a9c3d70d902a0473ee5c13336317006a52ce8242)
+ edo ./configure --color=auto --libbpf_force $(usex bpf on off)
+
+ # Remove the definitions made by configure and allow them to be overridden
+ # by USE flags below.
+ # We have to do the cheesy only-sed-if-disabled because otherwise
+ # the *_FLAGS etc stuff found by configure will be used but result
+ # in a broken build.
+ if ! use berkdb ; then
+ sed -i -e '/HAVE_BERKELEY_DB/d' config.mk || die
+ fi
+
+ if ! use caps ; then
+ sed -i -e '/HAVE_CAP/d' config.mk || die
+ fi
+
+ if use minimal ; then
+ sed -i -e '/HAVE_MNL/d' config.mk || die
+ fi
+
+ if ! use elf ; then
+ sed -i -e '/HAVE_ELF/d' config.mk || die
+ fi
+
+ if ! use nfs ; then
+ sed -i -e '/HAVE_RPC/d' config.mk || die
+ fi
+
+ if ! use selinux ; then
+ sed -i -e '/HAVE_SELINUX/d' config.mk || die
+ fi
+
+ # ...Now switch on/off requested features via USE flags
+ # this is only useful if the test did not set other things, per bug #643722
+ # Keep in sync with ifs above, or refactor to be unified.
+ cat <<-EOF >> config.mk
+ TC_CONFIG_ATM := $(usex atm y n)
+ TC_CONFIG_XT := $(usex iptables y n)
+ TC_CONFIG_NO_XT := $(usex iptables n y)
+ # We've locked in recent enough kernel headers, bug #549948
+ TC_CONFIG_IPSET := y
+ HAVE_BERKELEY_DB := $(usex berkdb y n)
+ HAVE_CAP := $(usex caps y n)
+ HAVE_MNL := $(usex minimal n y)
+ HAVE_ELF := $(usex elf y n)
+ HAVE_RPC := $(usex nfs y n)
+ HAVE_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, bug #144265, bug #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_compile() {
+ emake V=1 NETNS_RUN_DIR=/run/netns
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc
+ dobin ip/ip
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}"/$(get_libdir) \
+ SBINDIR="${EPREFIX}"/sbin \
+ CONFDIR="${EPREFIX}"/etc/iproute2 \
+ DOCDIR="${EPREFIX}"/usr/share/doc/${PF} \
+ MANDIR="${EPREFIX}"/usr/share/man \
+ ARPDDIR="${EPREFIX}"/var/lib/arpd \
+ install
+
+ dodir /bin
+ mv "${ED}"/{s,}bin/ip || die # bug #330115
+ mv "${ED}"/{s,}bin/ss || die # bug #547264
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+
+ # Collides with net-analyzer/ifstat
+ # https://bugs.gentoo.org/868321
+ mv "${ED}"/sbin/ifstat{,-iproute2} || die
+
+ if use berkdb ; then
+ keepdir /var/lib/arpd
+ # bug #47482, arpd doesn't need to be in /sbin
+ dodir /usr/bin
+ mv "${ED}"/sbin/arpd "${ED}"/usr/bin/ || die
+ elif [[ -d "${ED}"/var/lib/arpd ]]; then
+ rmdir --ignore-fail-on-non-empty -p "${ED}"/var/lib/arpd || die
+ fi
+}
diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild
index 26b79a0d0847..e650e4f2e1ca 100644
--- a/sys-apps/iproute2/iproute2-9999.ebuild
+++ b/sys-apps/iproute2/iproute2-9999.ebuild
@@ -24,7 +24,6 @@ RESTRICT="test"
# We could make libmnl optional, but it's tiny, so eh
RDEPEND="
- !net-misc/arpd
!minimal? ( net-libs/libmnl:= )
atm? ( net-dialup/linux-atm )
berkdb? ( sys-libs/db:= )