diff --git a/pkg/iproute2/0001.patch b/pkg/iproute2/0001.patch deleted file mode 100644 index 88972d8..0000000 --- a/pkg/iproute2/0001.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -12,22 +12,22 @@ ifeq ($(VERBOSE),0) - MAKEFLAGS += --no-print-directory - endif - --PREFIX?=/usr --LIBDIR?=$(PREFIX)/lib --SBINDIR?=/sbin --CONFDIR?=/etc/iproute2 -+PREFIX= -+LIBDIR=/lib -+SBINDIR=/bin -+CONFDIR=/etc/iproute2 - NETNS_RUN_DIR?=/var/run/netns - NETNS_ETC_DIR?=/etc/netns --DATADIR?=$(PREFIX)/share --HDRDIR?=$(PREFIX)/include/iproute2 -+DATADIR=/share -+HDRDIR=/include/iproute2 - DOCDIR?=$(DATADIR)/doc/iproute2 - MANDIR?=$(DATADIR)/man - ARPDDIR?=/var/lib/arpd --KERNEL_INCLUDE?=/usr/include -+KERNEL_INCLUDE=$(SYSROOT)/include - BASH_COMPDIR?=$(DATADIR)/bash-completion/completions - - # Path to db_185.h include --DBM_INCLUDE:=$(DESTDIR)/usr/include -+DBM_INCLUDE:=$(SYSROOT)/include - - SHARED_LIBS = y - diff --git a/pkg/iproute2/0002.patch b/pkg/iproute2/0002.patch deleted file mode 100644 index 69c1cbb..0000000 --- a/pkg/iproute2/0002.patch +++ /dev/null @@ -1,196 +0,0 @@ ---- a/rdma/include/uapi/rdma/rdma_user_cm.h -+++ b/rdma/include/uapi/rdma/rdma_user_cm.h -@@ -37,5 +37,5 @@ - #include - #include --#include -+#include - #include - #include ---- a/include/uapi/linux/if_tunnel.h -+++ b/include/uapi/linux/if_tunnel.h -@@ -3,7 +3,6 @@ - #define _IF_TUNNEL_H_ - - #include --#include - #include - #include - #include ---- a/include/uapi/linux/ip6_tunnel.h -+++ b/include/uapi/linux/ip6_tunnel.h -@@ -3,7 +3,6 @@ - #define _IP6_TUNNEL_H - - #include --#include /* For IFNAMSIZ. */ - #include /* For struct in6_addr. */ - - #define IPV6_TLV_TNL_ENCAP_LIMIT 4 ---- a/include/uapi/linux/kernel.h -+++ b/include/uapi/linux/kernel.h -@@ -2,7 +2,9 @@ - #ifndef _LINUX_KERNEL_H - #define _LINUX_KERNEL_H - -+#ifdef __GLIBC__ - #include -+#endif - - /* - * 'kernel.h' contains some often-used function prototypes etc ---- a/include/uapi/linux/libc-compat.h -+++ b/include/uapi/linux/libc-compat.h -@@ -50,8 +50,8 @@ - #define _LIBC_COMPAT_H - - /* We have included glibc headers... */ --#if defined(__GLIBC__) -+#if !defined(__KERNEL__) - - /* Coordinate with glibc net/if.h header. */ --#if defined(_NET_IF_H) && defined(__USE_MISC) -+#if defined(_NET_IF_H) - -@@ -65,9 +65,13 @@ - /* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 - /* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */ -+#if !defined(__GLIBC__) -+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 -+#else - #ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 - #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ -+#endif /* !defined(__GLIBC__) */ - - #else /* _NET_IF_H */ - -@@ -86,6 +90,13 @@ - - #endif /* _NET_IF_H */ - -+#ifdef _NETINET_IF_ETHER_H -+#define __UAPI_DEF_ETHHDR 0 -+#else -+/* glibc uses __NETINET_IF_ETHER_H and uses the uapi header */ -+#define __UAPI_DEF_ETHHDR 1 -+#endif /* _NETINET_IF_ETHER_H */ -+ - /* Coordinate with glibc netinet/in.h header. */ - #if defined(_NETINET_IN_H) - -@@ -99,15 +110,7 @@ - #define __UAPI_DEF_IN_CLASS 0 - - #define __UAPI_DEF_IN6_ADDR 0 --/* The exception is the in6_addr macros which must be defined -- * if the glibc code didn't define them. This guard matches -- * the guard in glibc/inet/netinet/in.h which defines the -- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ --#if defined(__USE_MISC) || defined (__USE_GNU) - #define __UAPI_DEF_IN6_ADDR_ALT 0 --#else --#define __UAPI_DEF_IN6_ADDR_ALT 1 --#endif - #define __UAPI_DEF_SOCKADDR_IN6 0 - #define __UAPI_DEF_IPV6_MREQ 0 - #define __UAPI_DEF_IPPROTO_V6 0 -@@ -194,6 +197,9 @@ - #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 - #endif - -+/* Definitions for if/ether.h */ -+#define __UAPI_DEF_ETHHDR 1 -+ - /* Definitions for in.h */ - #ifndef __UAPI_DEF_IN_ADDR - #define __UAPI_DEF_IN_ADDR 1 ---- a/include/uapi/linux/netfilter_ipv4/ip_tables.h -+++ b/include/uapi/linux/netfilter_ipv4/ip_tables.h -@@ -18,7 +18,6 @@ - - #include - --#include - #include - - #include ---- a/tc/f_flower.c -+++ b/tc/f_flower.c -@@ -15,6 +15,7 @@ - #include - #include --#include -+#include -+#include - #include - #include - #include ---- a/tc/tc_util.h -+++ b/tc/tc_util.h -@@ -4,7 +4,7 @@ - - #define MAX_MSG 16384 - #include --#include -+#include - - #include - #include ---- a/tc/f_u32.c -+++ b/tc/f_u32.c -@@ -19,8 +19,7 @@ - #include - #include - #include --#include - #include - - #include "utils.h" - ---- a/tc/f_fw.c -+++ b/tc/f_fw.c -@@ -19,5 +19,4 @@ - #include - #include --#include /* IFNAMSIZ */ - #include "utils.h" - #include "tc_util.h" ---- a/tc/f_basic.c -+++ b/tc/f_basic.c -@@ -18,6 +18,5 @@ - #include - #include - #include --#include - - #include "utils.h" ---- a/tc/m_ife.c -+++ b/tc/m_ife.c -@@ -19,5 +19,5 @@ - #include - #include --#include -+#include - - #include "rt_names.h" ---- a/tc/m_skbmod.c -+++ b/tc/m_skbmod.c -@@ -18,6 +18,6 @@ - #include - #include - #include --#include -+#include - - #include "rt_names.h" ---- a/tc/f_matchall.c -+++ b/tc/f_matchall.c -@@ -18,6 +18,5 @@ - #include - #include - #include --#include - - #include "utils.h" diff --git a/pkg/iproute2/CREDITS b/pkg/iproute2/CREDITS deleted file mode 100644 index 347f817..0000000 --- a/pkg/iproute2/CREDITS +++ /dev/null @@ -1,6 +0,0 @@ -Thanks a lot to Alpine Linux for the musl-fixes.patch on which 0002.patch -is based. - -Original version: - -https://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-fixes.patch diff --git a/pkg/iproute2/build b/pkg/iproute2/build index 5a64b8a..99d481f 100755 --- a/pkg/iproute2/build +++ b/pkg/iproute2/build @@ -1,13 +1,13 @@ -VERSION="4.20.0" +VERSION="5.2.0" SRCDIR="iproute2-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="https://www.kernel.org/pub/linux/utils/net/iproute2/" -SHA256SUM="c8adaa6a40f888476b23acb283cfa30c0dd55f07b5aa20663ed5ba2ef1f6fda8" +SHA256SUM="a5b95dec26353fc71dba9bb403e9343fad2a06bd69fb154a22a2aa2914f74da8" DEPENDS="toolchain libmnl-dev" SUBPKG="iproute2 iproute2-dev" prepare() { - apply_patches + return } build() { @@ -23,11 +23,15 @@ build() { make CCOPTS="-O2 $cflags" LDFLAGS="$ldflags" \ HOSTCC="gcc" AR="${TARGET}-ar" LD="${TARGET}-ld" \ - CC="${TARGET}-gcc" SYSROOT="$TCDIR/$TARGET" + CC="${TARGET}-gcc" PREFIX="" SBINDIR="/bin" \ + KERNEL_INCLUDE="$TCDIR/$TARGET/include" \ + DBM_INCLUDE="$TCDIR/$TARGET/include" } deploy() { - make DESTDIR="$PKGDEPLOYDIR" SYSROOT="$TCDIR/$TARGET" install + make DESTDIR="$PKGDEPLOYDIR" PREFIX="" SBINDIR="/bin" \ + KERNEL_INCLUDE="$TCDIR/$TARGET/include" \ + DBM_INCLUDE="$TCDIR/$TARGET/include" install cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR" } diff --git a/pkg/iproute2/iproute2.files b/pkg/iproute2/iproute2.files index e25fed7..60773d1 100644 --- a/pkg/iproute2/iproute2.files +++ b/pkg/iproute2/iproute2.files @@ -1,3 +1,4 @@ +dir bin 0755 0 0 file bin/ip 0755 0 0 file bin/rtmon 0755 0 0 file bin/ifcfg 0755 0 0 @@ -17,6 +18,7 @@ file bin/genl 0755 0 0 file bin/tipc 0755 0 0 file bin/devlink 0755 0 0 file bin/rdma 0755 0 0 +dir etc 0755 0 0 dir etc/iproute2 0755 0 0 file etc/iproute2/bpf_pinning 0644 0 0 file etc/iproute2/ematch_map 0644 0 0 @@ -27,9 +29,11 @@ file etc/iproute2/rt_protos 0644 0 0 file etc/iproute2/rt_realms 0644 0 0 file etc/iproute2/rt_scopes 0644 0 0 file etc/iproute2/rt_tables 0644 0 0 +dir share 0755 0 0 dir share/bash-completion 0755 0 0 dir share/bash-completion/completions 0755 0 0 file share/bash-completion/completions/tc 0644 0 0 +dir lib 0755 0 0 dir lib/tc 0755 0 0 file lib/tc/normal.dist 0644 0 0 file lib/tc/pareto.dist 0644 0 0