summaryrefslogtreecommitdiff
path: root/sys-apps/iproute2
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/iproute2')
-rw-r--r--sys-apps/iproute2/Manifest5
-rw-r--r--sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch83
-rw-r--r--sys-apps/iproute2/iproute2-5.2.0-r1.ebuild1
-rw-r--r--sys-apps/iproute2/iproute2-5.3.0.ebuild162
4 files changed, 250 insertions, 1 deletions
diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
index fe59e37485de..0c010c7aac64 100644
--- a/sys-apps/iproute2/Manifest
+++ b/sys-apps/iproute2/Manifest
@@ -4,11 +4,14 @@ AUX iproute2-4.17.0-configure-nomagic.patch 5654 BLAKE2B b56f7a3a02822c99a1f2c7c
AUX iproute2-4.20.0-configure-nomagic.patch 5835 BLAKE2B e21e79a5f804b4f3ebd82334541dd6d9e931308cfa218dfd7743f5a807126d6bf52d63e9e84f7683be41b2249ea8aa13991ea3f4d486702d3d4d2c4e9a51b238 SHA512 a41b87a11d71120c3f3df9f9dbecc789df0355de517700749ea0b9bb4fb9ffeb94dd9218f9b2edc75ffc865e63a9a00af381816b36b0a929c0c9c7828c949660
AUX iproute2-4.20.0-no-ipv6.patch 1334 BLAKE2B 612fa64a897fe8c601aca529a09508cc865f2f0fb7cb865ba28f3369748086622b6910f25052047c972f495b5e20014cdf6e9f73b230124f372cfe6301bc0bf2 SHA512 f4b42667d4433225b2e4272b6e629fc43b73ede02ac0e706d2e46d81ffcecd19ca45b8b9789904b4bd6d10d34c82239f9b3c33cfcf3f9e5b309d828a3494c864
AUX iproute2-5.1.0-portability.patch 1117 BLAKE2B 8e3a2f275ffb774a30165f46d85ad01f7cd3a932085519255f661dd898462ccb5e8f11c2a57e015d6c19d8c917c82eb76f4b9c779ff91b4cfb7b874fcdda3088 SHA512 5e46e5870e41c15213f04582f40bef18c081f5058f8b530c844fab4f42f56935386f461f0d46f33d17352eebd79a167bb9b6f1edc93bb62b805283cc3872f4f9
+AUX iproute2-5.2.0-fix-sys-queue-h-on-musl.patch 2579 BLAKE2B 86e81152b51a2566060469d4585ab092be0f5a62bad11a24e086bf2cdea78db7494dc5c4692e3c71ed108732ad3a59e444c423eaffd356c919ca82445de75f6a SHA512 9b0875781f20c0a3773d9c0b0f051ce455fcbf3cedb92a411ce9c873f162ca6b25ea8c564fa971d7c56e6e3effa3a9cb0a3057518a16de264b100b7b73a7d64c
DIST iproute2-4.19.0.tar.xz 720408 BLAKE2B 2d0ece5dd8f1beb7912d025c269a9edd2ecd87aea04971a28eca9f9b7ea82d0e4aa397c9338c0cb6cb463887678a541a5407644e82244ffbbae0eb8f6ac088e8 SHA512 47c750da2247705b1b1d1621f58987333e54370d0fff2f24106194022de793ff35dfd67fd1be127ce019008705702092d31dac49abf930a7c0dc5c7e7c0665b8
DIST iproute2-5.1.0.tar.xz 722412 BLAKE2B 06330b636d661df5e2128a87bb63455bcbb5c8cda0faab96928e2068bb23b3bc3b2e5a0daa68d2d112e66fa58d7b3360791c7d5a0d679fc01cecb3ca9ad8ea4d SHA512 5c8319b040bd0ba98cf1225b2a77efafc662741344c53877ee38cf108ca01906b03328e4f9b00b7557e301c6e64bca4e42e92af477b4d657bcbff5120c0c4e87
DIST iproute2-5.2.0.tar.xz 729540 BLAKE2B 72d082b4f39b6b9f0040149ea14d3c5c6d999eb4955b708ef49a3276f3c574eab757e2c81f10a11e2ce5f709c7849bbf6556e40c7f261fc72d498046f73eade4 SHA512 82bbeae29d98129d822c95ff7523186569e32c66132b8d781d501d61f396b04d122e3d13057dd4236455264008e5bfac7cb63c325908fc1c46d416cbde6ac7e1
+DIST iproute2-5.3.0.tar.xz 742660 BLAKE2B e2152eb6c7d443f54bad0aec0cba23656c1defafc53f10130b63288f070e6e77c27a78a3f9bf6f6d14be3490eadd583a779f5d44ec23d16535e14abe04feb848 SHA512 c20ce477cb3ec24194ea56d3d9037795e26975ffde188b63ba974a0aa671dd169f356e9446bf43dc56523e01c0bafa442b91d83da9b2302daee18e237f2f3157
EBUILD iproute2-4.19.0-r1.ebuild 4375 BLAKE2B 478751ceebaef4c53e975120662b7e5e35b845ca0568cd5866107265c976332661448c0fac1ea6277ef57392ab69ac8012d027e190508dc241821c8ad584f7b4 SHA512 630d8677750918d24be161edf6a8793f5c01ab120fd9b538cf3fde75704d52254e117782d30f70145f741a6d0cc6fd99025bfcb4714c8ce9466130c90f5ec277
EBUILD iproute2-5.1.0.ebuild 4425 BLAKE2B cd695ac496f8b0bb3e017b5b8d2f074902366fa3185db992070984a83300d72851cce584ad8446530d0f303358afe104ad41d640b1188a753aa25349ce267ecb SHA512 21fcf629dd959d8fea205fcb4fd0fcb1ffa1bfe249ddfc68247350a7c9ee5ec7cf9d6d1b36c0282ce0a5791c0f55ee594b465dfa944e05f7725bc00f5f480f7c
-EBUILD iproute2-5.2.0-r1.ebuild 4425 BLAKE2B cd695ac496f8b0bb3e017b5b8d2f074902366fa3185db992070984a83300d72851cce584ad8446530d0f303358afe104ad41d640b1188a753aa25349ce267ecb SHA512 21fcf629dd959d8fea205fcb4fd0fcb1ffa1bfe249ddfc68247350a7c9ee5ec7cf9d6d1b36c0282ce0a5791c0f55ee594b465dfa944e05f7725bc00f5f480f7c
+EBUILD iproute2-5.2.0-r1.ebuild 4482 BLAKE2B ac9ef5f32153c27d562bde81dca9178f72a511f0c6eac0974f3e6592e1e2d03173a196088080d2acba576fd31a769a91a0e49aa5f62633c0255c6a29ad1947af SHA512 d6585fdc96f7fe03e177a636edfbd2de98650d5fd28f4e7a1f9126e0f0b2a896fe52055d77f211a6808f91e82e98ead9c77e916e39cf132b9fa26c404e667ac1
+EBUILD iproute2-5.3.0.ebuild 4425 BLAKE2B cd695ac496f8b0bb3e017b5b8d2f074902366fa3185db992070984a83300d72851cce584ad8446530d0f303358afe104ad41d640b1188a753aa25349ce267ecb SHA512 21fcf629dd959d8fea205fcb4fd0fcb1ffa1bfe249ddfc68247350a7c9ee5ec7cf9d6d1b36c0282ce0a5791c0f55ee594b465dfa944e05f7725bc00f5f480f7c
EBUILD iproute2-9999.ebuild 4380 BLAKE2B 37d298a23f7a6906fcfb6738f37b01af7adf62e51d78200dea1dc21c4fa5ba6d90774b53824c78e3ac8f465df5a4f7aa78cbc1fa501bd87c42da54eafe0bc285 SHA512 642d47e5287d3c5253ae2908ddb47041e398a7460896458f22ca5ad5371511696a05d8dd7f96b0d04bb99336c2cdf72b04ee7a3520ef133678a3fc8fe0b788f3
MISC metadata.xml 672 BLAKE2B d27b6af84b177e8b12f64470dbac0e8fdcf45091681ced6d5ebd02414849c221e608a6a4bb8ce6aae305475e086cf140836b943a9e5380f10c368ac359397a98 SHA512 d71c5077fcf769520048a46b0fdd3563b974b65afdc68eb73fc0816d2c87dd9a73bca72e25d7e8f3c9f2ceb23c473bb92a1a92d8d5f43a7e15f965669226f0a2
diff --git a/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch b/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch
new file mode 100644
index 000000000000..6bc129fa31f6
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.2.0-fix-sys-queue-h-on-musl.patch
@@ -0,0 +1,83 @@
+From 33267017faf1a188d1286f5c423454a060517e39 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Fri, 26 Jul 2019 22:01:05 +0100
+Subject: iproute2: devlink: port from sys/queue.h to list.h
+
+sys/queue.h does not exist on linux-musl targets and fails build as:
+
+ devlink.c:28:10: fatal error: sys/queue.h: No such file or directory
+ 28 | #include <sys/queue.h>
+ | ^~~~~~~~~~~~~
+
+The change ports to list.h API and drops dependency of 'sys/queue.h'.
+The API maps one-to-one.
+
+Build-tested on linux-musl and linux-glibc.
+
+Bug: https://bugs.gentoo.org/690486
+CC: Stephen Hemminger <stephen@networkplumber.org>
+CC: netdev@vger.kernel.org
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
+---
+ devlink/devlink.c | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/devlink/devlink.c b/devlink/devlink.c
+index bb023c0c..0ea401ae 100644
+--- a/devlink/devlink.c
++++ b/devlink/devlink.c
+@@ -25,7 +25,6 @@
+ #include <linux/devlink.h>
+ #include <libmnl/libmnl.h>
+ #include <netinet/ether.h>
+-#include <sys/queue.h>
+
+ #include "SNAPSHOT.h"
+ #include "list.h"
+@@ -5981,13 +5980,13 @@ static int fmsg_value_show(struct dl *dl, int type, struct nlattr *nl_data)
+
+ struct nest_qentry {
+ int attr_type;
+- TAILQ_ENTRY(nest_qentry) nest_entries;
++ struct list_head nest_entries;
+ };
+
+ struct fmsg_cb_data {
+ struct dl *dl;
+ uint8_t value_type;
+- TAILQ_HEAD(, nest_qentry) qhead;
++ struct list_head qhead;
+ };
+
+ static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data,
+@@ -6001,13 +6000,13 @@ static int cmd_fmsg_nest_queue(struct fmsg_cb_data *fmsg_data,
+ return -ENOMEM;
+
+ entry->attr_type = *attr_value;
+- TAILQ_INSERT_HEAD(&fmsg_data->qhead, entry, nest_entries);
++ list_add(&fmsg_data->qhead, &entry->nest_entries);
+ } else {
+- if (TAILQ_EMPTY(&fmsg_data->qhead))
++ if (list_empty(&fmsg_data->qhead))
+ return MNL_CB_ERROR;
+- entry = TAILQ_FIRST(&fmsg_data->qhead);
++ entry = list_first_entry(&fmsg_data->qhead, struct nest_qentry, nest_entries);
+ *attr_value = entry->attr_type;
+- TAILQ_REMOVE(&fmsg_data->qhead, entry, nest_entries);
++ list_del(&entry->nest_entries);
+ free(entry);
+ }
+ return MNL_CB_OK;
+@@ -6116,7 +6115,7 @@ static int cmd_health_object_common(struct dl *dl, uint8_t cmd, uint16_t flags)
+ return err;
+
+ data.dl = dl;
+- TAILQ_INIT(&data.qhead);
++ INIT_LIST_HEAD(&data.qhead);
+ err = _mnlg_socket_sndrcv(dl->nlg, nlh, cmd_fmsg_object_cb, &data);
+ return err;
+ }
+--
+cgit 1.2-0.3.lf.el7
+
diff --git a/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild b/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild
index 5beda6e4bc4e..a9648404f627 100644
--- a/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild
+++ b/sys-apps/iproute2/iproute2-5.2.0-r1.ebuild
@@ -48,6 +48,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
"${FILESDIR}"/${PN}-4.20.0-configure-nomagic.patch # bug 643722
"${FILESDIR}"/${PN}-5.1.0-portability.patch
+ "${FILESDIR}"/${PN}-5.2.0-fix-sys-queue-h-on-musl.patch
)
src_prepare() {
diff --git a/sys-apps/iproute2/iproute2-5.3.0.ebuild b/sys-apps/iproute2/iproute2-5.3.0.ebuild
new file mode 100644
index 000000000000..5beda6e4bc4e
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-5.3.0.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs flag-o-matic multilib
+
+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="mirror://kernel/linux/utils/net/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~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 caps elf +iptables ipv6 minimal selinux"
+
+# We could make libmnl optional, but it's tiny, so eh
+RDEPEND="
+ !net-misc/arpd
+ dev-libs/libbsd
+ !minimal? ( net-libs/libmnl )
+ caps? ( sys-libs/libcap )
+ elf? ( virtual/libelf )
+ iptables? ( >=net-firewall/iptables-1.4.20:= )
+ berkdb? ( sys-libs/db:= )
+ atm? ( net-dialup/linux-atm )
+ selinux? ( sys-libs/libselinux )
+"
+# We require newer linux-headers for ipset support #549948 and some defines #553876
+DEPEND="
+ ${RDEPEND}
+ >=sys-kernel/linux-headers-3.16
+"
+BDEPEND="
+ app-arch/xz-utils
+ >=sys-devel/bison-2.4
+ sys-devel/flex
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.0-mtu.patch #291907
+ "${FILESDIR}"/${PN}-4.20.0-configure-nomagic.patch # bug 643722
+ "${FILESDIR}"/${PN}-5.1.0-portability.patch
+)
+
+src_prepare() {
+ if ! use ipv6 ; then
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-4.20.0-no-ipv6.patch #326849
+ )
+ fi
+
+ default
+
+ # echo -n is not POSIX compliant
+ sed 's@echo -n@printf@' -i 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
+
+ # Use /run instead of /var/run.
+ sed -i \
+ -e 's:/var/run:/run:g' \
+ include/namespace.h \
+ man/man8/ip-netns.8 || 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
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ popd >/dev/null
+
+ # run "configure" script first which will create "config.mk"...
+ econf
+
+ # ...now switch on/off requested features via USE flags
+ # this is only useful if the test did not set other things, per bug #643722
+ 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 #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_SELINUX := $(usex selinux y n)
+ IP_CONFIG_SETNS := ${setns}
+ # Use correct iptables dir, #144265 #293709
+ IPT_LIB_DIR := $(use iptables && ${PKG_CONFIG} xtables --variable=xtlibdir)
+ EOF
+}
+
+src_compile() {
+ emake V=1
+}
+
+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 #330115
+
+ dolib.a lib/libnetlink.a
+ insinto /usr/include
+ doins include/libnetlink.h
+ # This local header pulls in a lot of linux headers it
+ # doesn't directly need. Delete this header that requires
+ # linux-headers-3.8 until that goes stable. #467716
+ sed -i '/linux\/netconf.h/d' "${ED}"/usr/include/libnetlink.h || 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
+ fi
+}