Skip to content

Commit

Permalink
iproute2: update to 6.9.0
Browse files Browse the repository at this point in the history
Support for iptables action has been dropped. Remove tc-mod-iptables and related
patch (175-reduce-dynamic-syms.patch).

Include a patch to fix the build with GCC 14.

Fix 170-ip_tiny.patch, as the help text didn't match all the included functions.

All other patches automatically rebased.

Signed-off-by: Rui Salvaterra <[email protected]>
  • Loading branch information
rsalvaterra committed May 14, 2024
1 parent eb1b022 commit a2c40cb
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 80 deletions.
21 changes: 3 additions & 18 deletions package/network/utils/iproute2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=iproute2
PKG_VERSION:=6.7.0
PKG_VERSION:=6.9.0
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
PKG_HASH:=ff942dd9828d7d1f867f61fe72ce433078c31e5d8e4a78e20f02cb5892e8841d
PKG_HASH:=2f643d09ea11a4a2a043c92e2b469b5f73228cbf241ae806760296ed0ec413d0
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=iptables
PKG_LICENSE:=GPL-2.0
Expand Down Expand Up @@ -77,14 +77,7 @@ $(call Package/iproute2/Default)
VARIANT:=tcfull
PROVIDES:=tc
ALTERNATIVES:=400:/sbin/tc:/usr/libexec/tc-full
DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +libxtables +tc-mod-iptables
endef

define Package/tc-mod-iptables
$(call Package/iproute2/Default)
TITLE:=Traffic control module - iptables action
VARIANT:=tcfull
DEPENDS:=+libxtables +libbpf
DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +libxtables
endef

define Package/genl
Expand Down Expand Up @@ -232,11 +225,6 @@ define Package/tc-full/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full
endef

define Package/tc-mod-iptables/install
$(INSTALL_DIR) $(1)/usr/lib/tc
$(CP) $(PKG_BUILD_DIR)/tc/m_xt.so $(1)/usr/lib/tc
endef

define Package/genl/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
Expand Down Expand Up @@ -269,9 +257,6 @@ endef

$(eval $(call BuildPackage,ip-tiny))
$(eval $(call BuildPackage,ip-full))
# build tc-mod-iptables before its dependents, to avoid
# spurious rebuilds when building multiple variants.
$(eval $(call BuildPackage,tc-mod-iptables))
$(eval $(call BuildPackage,tc-tiny))
$(eval $(call BuildPackage,tc-bpf))
$(eval $(call BuildPackage,tc-full))
Expand Down
22 changes: 22 additions & 0 deletions package/network/utils/iproute2/patches/001-fix-gcc-14-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- a/include/json_print.h
+++ b/include/json_print.h
@@ -8,6 +8,8 @@
#ifndef _JSON_PRINT_H_
#define _JSON_PRINT_H_

+#include <sys/time.h>
+
#include "json_writer.h"
#include "color.h"

--- a/rdma/rdma.c
+++ b/rdma/rdma.c
@@ -4,6 +4,8 @@
* Authors: Leon Romanovsky <[email protected]>
*/

+#include <libgen.h>
+
#include "rdma.h"
#include "version.h"
#include "color.h"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -119,6 +119,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
@@ -107,6 +107,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
ifneq ($(IPT_LIB_DIR),)
CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/Makefile
+++ b/Makefile
@@ -68,9 +68,9 @@ WFLAGS += -Wmissing-declarations -Wold-s
@@ -69,9 +69,9 @@ WFLAGS += -Wmissing-declarations -Wold-s
CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
YACCFLAGS = -d -t -v

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -391,7 +391,7 @@ check_tirpc()
@@ -362,7 +362,7 @@ check_tirpc()

check_mnl()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -246,7 +246,7 @@ EOF
@@ -217,7 +217,7 @@ EOF

check_elf()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -449,7 +449,7 @@ EOF
@@ -421,7 +421,7 @@ EOF

check_cap()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -378,7 +378,7 @@ check_selinux()
@@ -349,7 +349,7 @@ check_selinux()

check_tirpc()
{
Expand Down
10 changes: 5 additions & 5 deletions package/network/utils/iproute2/patches/170-ip_tiny.patch
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
" ip [ -force ] -batch filename\n"
+#ifndef IPROUTE2_TINY
"where OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp |\n"
" link | macsec | maddress | monitor | mptcp | mroute | mrule |\n"
"where OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n"
" macsec | maddress | monitor | mptcp | mroute | mrule |\n"
" neighbor | neighbour | netconf | netns | nexthop | ntable |\n"
" ntbl | route | rule | sr | tap | tcpmetrics |\n"
" ntbl | route | rule | sr | stats | tap | tcpmetrics |\n"
" token | tunnel | tuntap | vrf | xfrm }\n"
+#else
+ "where OBJECT := { address | link | maddress | monitor |\n"
+ "where OBJECT := { address | help | link | maddress | monitor |\n"
+ " neighbor | neighbour | netns | route |\n"
+ " rule | token | tunnel }\n"
+ " rule | stats | token | tunnel }\n"
+#endif
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -270,7 +270,7 @@ int main(int argc, char **argv) {
@@ -241,7 +241,7 @@ int main(int argc, char **argv) {
}
EOF

Expand All @@ -9,7 +9,7 @@
local ret=$?

rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
@@ -288,7 +288,7 @@ int main(int argc, char **argv) {
@@ -259,7 +259,7 @@ int main(int argc, char **argv) {
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

--- a/tc/Makefile
+++ b/tc/Makefile
@@ -132,7 +132,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
@@ -120,7 +120,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic $< -o $@


-all: tc $(TCSO)
+all: $(findstring tc,$(BUILD_VARIANT)) $(TCSO)

tc: $(TCOBJ) $(LIBNETLINK) libtc.a
$(QUIET_LINK)$(CC) $(filter-out dynsyms.list, $^) $(LDFLAGS) $(LDLIBS) -o $@
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -435,14 +435,8 @@ EOF
@@ -407,14 +407,8 @@ EOF
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
echo "no"
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -365,7 +365,7 @@ check_libbpf()
@@ -336,7 +336,7 @@ check_libbpf()
check_selinux()
# SELinux is a compile time option in the ss utility
{
Expand Down

0 comments on commit a2c40cb

Please sign in to comment.