Skip to contentSkip to conversation

iproute2: backport version 4.9.0

PATCH Superseded Jacob Stiffler 2 participants 4 messages Jul 19, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 iproute2: backport version 4.9.0

* Backport iproute2 4.9.0 from oe-core.
* Recipes were directly copied from commit
eac08770b1ea3ca6640941dc8fd03fc3fa5ff869

---
 .../recipes-connectivity/iproute2/iproute2.inc     |  48 ++++++++
 .../iproute2/0001-iproute2-de-bash-scripts.patch   |  64 ++++++++++
 .../iproute2/iproute2/configure-cross.patch        |  32 +++++
 .../iproute2/iproute2/iproute2-4.9.0-musl.patch    | 131 +++++++++++++++++++++
 .../iproute2/iproute2_4.9.0.bb                     |  14 +++
 5 files changed, 289 insertions(+)
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/configure-cross.patch
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.9.0.bb
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +48 -0
new file mode 100644
index 0000000..ce64888
@@ -0,0 +1,48 @@
+SUMMARY = "TCP / IP networking and traffic control utilities"
+DESCRIPTION = "Iproute2 is a collection of utilities for controlling \
+TCP / IP networking and traffic control in Linux.  Of the utilities ip \
+and tc are the most important.  ip controls IPv4 and IPv6 \
+configuration and tc stands for traffic control."
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
+                    file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817"
+
+DEPENDS = "flex-native bison-native iptables elfutils"
+
+inherit update-alternatives bash-completion pkgconfig
+
+EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
+
+do_configure_append () {
+    sh configure ${STAGING_INCDIR}
+    # Explicitly disable ATM support
+    sed -i -e '/TC_CONFIG_ATM/d' Config
+}
+
+do_install () {
+    oe_runmake DESTDIR=${D} install
+    mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
+    install -d ${D}${datadir}
+    mv ${D}/share/* ${D}${datadir}/ || true
+    rm ${D}/share -rf || true
+}
+
+# The .so files in iproute2-tc are modules, not traditional libraries
+INSANE_SKIP_${PN}-tc = "dev-so"
+
+PACKAGES =+ "${PN}-tc ${PN}-lnstat ${PN}-ifstat ${PN}-genl ${PN}-rtacct ${PN}-nstat ${PN}-ss"
+FILES_${PN}-tc = "${base_sbindir}/tc* \
+                  ${libdir}/tc/*.so"
+FILES_${PN}-lnstat = "${base_sbindir}/lnstat ${base_sbindir}/ctstat ${base_sbindir}/rtstat"
+FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
+FILES_${PN}-genl = "${base_sbindir}/genl"
+FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
+FILES_${PN}-nstat = "${base_sbindir}/nstat"
+FILES_${PN}-ss = "${base_sbindir}/ss"
+
+ALTERNATIVE_${PN} = "ip"
+ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
+ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
+ALTERNATIVE_PRIORITY = "100"
meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch new file +64 -0

64 lines not on this page · raw message

meta-arago-distro/recipes-connectivity/iproute2/iproute2/configure-cross.patch new file +32 -0
new file mode 100644
index 0000000..866609c
@@ -0,0 +1,32 @@
+From 85b0589b4843c03e8e6fd9416d71ea449a73c5c0 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <[email protected]>
+Date: Thu, 3 Nov 2011 10:46:16 +0100
+Subject: [PATCH] make configure cross compile safe
+
+According to Kevin Tian:
+Upstream-Status: Pending
+
+Signed-off-by: Koen Kooi <[email protected]>
+Signed-off-by: Shane Wang <[email protected]>
+
+Index: iproute2-3.7.0/configure
+===================================================================
+--- iproute2-3.7.0.orig/configure
++++ iproute2-3.7.0/configure
+@@ -2,6 +2,7 @@
+ # This is not an autconf generated configure
+ #
+ INCLUDE=${1:-"$PWD/include"}
++SYSROOT=$1
+ 
+ # Make a temp directory in build tree.
+ TMPDIR=$(mktemp -d config.XXXXXX)
+@@ -158,7 +159,7 @@ check_ipt_lib_dir()
+ 		return
+ 	fi
+ 
+-	for dir in /lib /usr/lib /usr/local/lib
++	for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib
+ 	do
+ 		for file in $dir/{xtables,iptables}/lib*t_*so ; do
+ 			if [ -f $file ]; then
meta-arago-distro/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch new file +131 -0

131 lines not on this page · raw message

meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.9.0.bb new file +14 -0
new file mode 100644
index 0000000..808e550
@@ -0,0 +1,14 @@
+require iproute2.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
+           file://configure-cross.patch \
+           file://0001-iproute2-de-bash-scripts.patch \
+           file://iproute2-4.9.0-musl.patch \
+          "
+
+SRC_URI[md5sum] = "44a8371a4b2c40e48e4c9f98cbd41391"
+SRC_URI[sha256sum] = "c0f30f043f7767cc1b2cd2197b08d4e9b2392c95823fabe30bbce308c30116c4"
+
+# CFLAGS are computed in Makefile and reference CCOPTS
+#
+EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 iproute2: add hsr/prp support

---
 .../0001-ip-HSR-Fix-cut-and-paste-error.patch      |  27 +++
 .../0002-add-support-for-prp-similar-to-hsr.patch  | 221 +++++++++++++++++++++
 .../iproute2/iproute2_4.9.0.bb                     |   2 +
 3 files changed, 250 insertions(+)
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-ip-HSR-Fix-cut-and-paste-error.patch
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-add-support-for-prp-similar-to-hsr.patch
meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-ip-HSR-Fix-cut-and-paste-error.patch new file +27 -0
new file mode 100644
index 0000000..25249ab
@@ -0,0 +1,27 @@
+From 3f586aee3d617b1281d5c535caafd9f09d06f5fb Mon Sep 17 00:00:00 2001
+From: Ralf Baechle <[email protected]>
+Date: Mon, 6 Feb 2017 21:47:35 +0100
+Subject: [PATCH 1/2] ip: HSR: Fix cut and paste error
+
+Fixes: 5c0aec93a516 ("ip: Add HSR support")
+Signed-off-by: Ralf Baechle <[email protected]>
+---
+ ip/iplink_hsr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ip/iplink_hsr.c b/ip/iplink_hsr.c
+index cb744eb..696b2c9 100644
+--- a/ip/iplink_hsr.c
++++ b/ip/iplink_hsr.c
+@@ -144,7 +144,7 @@ static void hsr_print_help(struct link_util *lu, int argc, char **argv,
+ 
+ struct link_util hsr_link_util = {
+ 	.id		= "hsr",
+-	.maxattr	= IFLA_VLAN_MAX,
++	.maxattr	= IFLA_HSR_MAX,
+ 	.parse_opt	= hsr_parse_opt,
+ 	.print_opt	= hsr_print_opt,
+ 	.print_help	= hsr_print_help,
+-- 
+1.9.1
+
meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-add-support-for-prp-similar-to-hsr.patch new file +221 -0

221 lines not on this page · raw message

meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.9.0.bb +2 -0
index 808e550..f92ea31 100644
@@ -4,6 +4,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
            file://configure-cross.patch \
            file://0001-iproute2-de-bash-scripts.patch \
            file://iproute2-4.9.0-musl.patch \
+           file://0001-ip-HSR-Fix-cut-and-paste-error.patch \
+           file://0002-add-support-for-prp-similar-to-hsr.patch \
           "
 
 SRC_URI[md5sum] = "44a8371a4b2c40e48e4c9f98cbd41391"
Signature · 1 line
2.7.4
#2 lore raw
In reply to Jacob Stiffler

Thanks!
The pristine 4.9 updated recipe should probably go into meta-arago-extras and the followup patch as bbappend in meta-arago-distro.

Signature · 1 line
Denys
Quoted 344 lines · Jacob Stiffler

* Backport iproute2 4.9.0 from oe-core.
* Recipes were directly copied from commit
eac08770b1ea3ca6640941dc8fd03fc3fa5ff869

---
 .../recipes-connectivity/iproute2/iproute2.inc     |  48 ++++++++
 .../iproute2/0001-iproute2-de-bash-scripts.patch   |  64 ++++++++++
 .../iproute2/iproute2/configure-cross.patch        |  32 +++++
 .../iproute2/iproute2/iproute2-4.9.0-musl.patch    | 131 +++++++++++++++++++++
 .../iproute2/iproute2_4.9.0.bb                     |  14 +++
 5 files changed, 289 insertions(+)
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/configure-cross.patch
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch
 create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.9.0.bb
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +48 -0
new file mode 100644
index 0000000..ce64888
@@ -0,0 +1,48 @@
+SUMMARY = "TCP / IP networking and traffic control utilities"
+DESCRIPTION = "Iproute2 is a collection of utilities for controlling \
+TCP / IP networking and traffic control in Linux.  Of the utilities ip \
+and tc are the most important.  ip controls IPv4 and IPv6 \
+configuration and tc stands for traffic control."
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
+                    file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817"
+
+DEPENDS = "flex-native bison-native iptables elfutils"
+
+inherit update-alternatives bash-completion pkgconfig
+
+EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
+
+do_configure_append () {
+    sh configure ${STAGING_INCDIR}
+    # Explicitly disable ATM support
+    sed -i -e '/TC_CONFIG_ATM/d' Config
+}
+
+do_install () {
+    oe_runmake DESTDIR=${D} install
+    mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
+    install -d ${D}${datadir}
+    mv ${D}/share/* ${D}${datadir}/ || true
+    rm ${D}/share -rf || true
+}
+
+# The .so files in iproute2-tc are modules, not traditional libraries
+INSANE_SKIP_${PN}-tc = "dev-so"
+
+PACKAGES =+ "${PN}-tc ${PN}-lnstat ${PN}-ifstat ${PN}-genl ${PN}-rtacct ${PN}-nstat ${PN}-ss"
+FILES_${PN}-tc = "${base_sbindir}/tc* \
+                  ${libdir}/tc/*.so"
+FILES_${PN}-lnstat = "${base_sbindir}/lnstat ${base_sbindir}/ctstat ${base_sbindir}/rtstat"
+FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
+FILES_${PN}-genl = "${base_sbindir}/genl"
+FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
+FILES_${PN}-nstat = "${base_sbindir}/nstat"
+FILES_${PN}-ss = "${base_sbindir}/ss"
+
+ALTERNATIVE_${PN} = "ip"
+ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
+ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
+ALTERNATIVE_PRIORITY = "100"
meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch new file +64 -0
new file mode 100644
index 0000000..39c7d40
@@ -0,0 +1,64 @@
+Subject: [PATCH] iproute2: de-bash scripts
+
+de-bash these two scripts to make iproute2 not depend on bash.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <[email protected]>
+
+---
+ ip/ifcfg |   15 ++++++++-------
+ ip/rtpr  |    2 +-
+ 2 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/ip/ifcfg b/ip/ifcfg
+index 083d9df..60bcf1f 100644
+--- a/ip/ifcfg
++++ b/ip/ifcfg
+@@ -1,12 +1,13 @@
+-#! /bin/bash
++#! /bin/sh
+ 
+ CheckForwarding () {
+-  local sbase fwd
++  local sbase fwd forwarding
+   sbase=/proc/sys/net/ipv4/conf
+   fwd=0
+   if [ -d $sbase ]; then
+     for dir in $sbase/*/forwarding; do
+-      fwd=$[$fwd + `cat $dir`]
++      forwarding=`cat $dir`
++      fwd=$(($fwd+$forwarding))
+     done
+   else
+     fwd=2
+@@ -127,12 +128,12 @@ fi
+ arping -q -A -c 1 -I $dev $ipaddr
+ noarp=$?
+ ( sleep 2 ;
+-  arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null &
++  arping -q -U -c 1 -I $dev $ipaddr ) > /dev/null 2>&1 </dev/null &
+ 
+-ip route add unreachable 224.0.0.0/24 >& /dev/null
+-ip route add unreachable 255.255.255.255 >& /dev/null
++ip route add unreachable 224.0.0.0/24 > /dev/null 2>&1
++ip route add unreachable 255.255.255.255 > /dev/null 2>&1
+ if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then
+-  ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
++  ip route add 224.0.0.0/4 dev $dev scope global > /dev/null 2>&1
+ fi
+ 
+ if [ $fwd -eq 0 ]; then
+diff --git a/ip/rtpr b/ip/rtpr
+index c3629fd..674198d 100644
+--- a/ip/rtpr
++++ b/ip/rtpr
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /bin/sh
+ 
+ exec tr "[\\\\]" "[
+ ]"
+-- 
+1.7.9.5
+
meta-arago-distro/recipes-connectivity/iproute2/iproute2/configure-cross.patch new file +32 -0
new file mode 100644
index 0000000..866609c
@@ -0,0 +1,32 @@
+From 85b0589b4843c03e8e6fd9416d71ea449a73c5c0 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <[email protected]>
+Date: Thu, 3 Nov 2011 10:46:16 +0100
+Subject: [PATCH] make configure cross compile safe
+
+According to Kevin Tian:
+Upstream-Status: Pending
+
+Signed-off-by: Koen Kooi <[email protected]>
+Signed-off-by: Shane Wang <[email protected]>
+
+Index: iproute2-3.7.0/configure
+===================================================================
+--- iproute2-3.7.0.orig/configure
++++ iproute2-3.7.0/configure
+@@ -2,6 +2,7 @@
+ # This is not an autconf generated configure
+ #
+ INCLUDE=${1:-"$PWD/include"}
++SYSROOT=$1
+ 
+ # Make a temp directory in build tree.
+ TMPDIR=$(mktemp -d config.XXXXXX)
+@@ -158,7 +159,7 @@ check_ipt_lib_dir()
+ 		return
+ 	fi
+ 
+-	for dir in /lib /usr/lib /usr/local/lib
++	for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib
+ 	do
+ 		for file in $dir/{xtables,iptables}/lib*t_*so ; do
+ 			if [ -f $file ]; then
meta-arago-distro/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch new file +131 -0
new file mode 100644
index 0000000..737a90c
@@ -0,0 +1,131 @@
+Subject: [PATCH] Avoid in6_addr redefinition
+
+Due to both <netinet/in.h> and <linux/in6.h> being included, the 
+in6_addr is being redefined: once from the C library headers and once
+from the kernel headers. This causes some build failures with for 
+example the musl C library.
+
+In order to fix this, use just the C library header <netinet/in.h>.
+Original patch taken from
+http://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-fixes.patch.
+
+(Refreshed the patch for 4.9 release)
+
+Upstream-Status: Pending
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Signed-off-by: Maxin B. John <[email protected]>
+Signed-off-by: Zheng Ruoqin <[email protected]>
+---
+ include/libiptc/ipt_kernel_headers.h     | 1 -
+ include/linux/if_bridge.h                | 1 -
+ include/linux/if_tunnel.h                | 2 --
+ include/linux/netfilter.h                | 2 --
+ include/linux/netfilter_ipv4/ip_tables.h | 1 -
+ include/linux/xfrm.h                     | 1 -
+ include/utils.h                          | 1 +
+ ip/ip6tunnel.c                           | 1 -
+ 8 files changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h
+index a5963e9..42f8610 100644
+--- a/include/libiptc/ipt_kernel_headers.h
++++ b/include/libiptc/ipt_kernel_headers.h
+@@ -6,7 +6,6 @@
+ #include <limits.h>
+ 
+ #include <netinet/ip.h>
+-#include <netinet/in.h>
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+ #include <netinet/udp.h>
+diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
+index b7393dd..a7028ab 100644
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+ 
+ #include <linux/types.h>
+ #include <linux/if_ether.h>
+-#include <linux/in6.h>
+ 
+ #define SYSFS_BRIDGE_ATTR	"bridge"
+ #define SYSFS_BRIDGE_FDB	"brforward"
+diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
+index 4f975f5..2680646 100644
+--- a/include/linux/if_tunnel.h
++++ b/include/linux/if_tunnel.h
+@@ -2,9 +2,7 @@
+ #define _IF_TUNNEL_H_
+ 
+ #include <linux/types.h>
+-#include <linux/if.h>
+ #include <linux/ip.h>
+-#include <linux/in6.h>
+ #include <asm/byteorder.h>
+ 
+ 
+diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
+index b71b4c9..3e4e6ae 100644
+--- a/include/linux/netfilter.h
++++ b/include/linux/netfilter.h
+@@ -4,8 +4,6 @@
+ #include <linux/types.h>
+ 
+ #include <linux/sysctl.h>
+-#include <linux/in.h>
+-#include <linux/in6.h>
+ 
+ /* Responses from hook functions. */
+ #define NF_DROP 0
+diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
+index 456fb86..38542b4 100644
+--- a/include/linux/netfilter_ipv4/ip_tables.h
++++ b/include/linux/netfilter_ipv4/ip_tables.h
+@@ -17,7 +17,6 @@
+ 
+ #include <linux/types.h>
+ 
+-#include <linux/if.h>
+ #include <linux/netfilter_ipv4.h>
+ 
+ #include <linux/netfilter/x_tables.h>
+diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
+index d2dd1fd..8c72966 100644
+--- a/include/linux/xfrm.h
++++ b/include/linux/xfrm.h
+@@ -1,7 +1,6 @@
+ #ifndef _LINUX_XFRM_H
+ #define _LINUX_XFRM_H
+ 
+-#include <linux/in6.h>
+ #include <linux/types.h>
+ 
+ /* All of the structures in this file may not change size as they are
+diff --git a/include/utils.h b/include/utils.h
+index 1b4f939..d10840b 100644
+--- a/include/utils.h
++++ b/include/utils.h
+@@ -1,6 +1,7 @@
+ #ifndef __UTILS_H__
+ #define __UTILS_H__ 1
+ 
++#include <sys/param.h>  /* MAXPATHLEN */
+ #include <sys/types.h>
+ #include <asm/types.h>
+ #include <resolv.h>
+diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
+index b1c0ae6..8fa4eb2 100644
+--- a/ip/ip6tunnel.c
++++ b/ip/ip6tunnel.c
+@@ -28,7 +28,6 @@
+ #include <arpa/inet.h>
+ #include <sys/ioctl.h>
+ #include <linux/ip.h>
+-#include <linux/if.h>
+ #include <linux/if_arp.h>
+ #include <linux/if_tunnel.h>
+ #include <linux/ip6_tunnel.h>
+-- 
+2.7.4
+
meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.9.0.bb new file +14 -0
new file mode 100644
index 0000000..808e550
@@ -0,0 +1,14 @@
+require iproute2.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
+           file://configure-cross.patch \
+           file://0001-iproute2-de-bash-scripts.patch \
+           file://iproute2-4.9.0-musl.patch \
+          "
+
+SRC_URI[md5sum] = "44a8371a4b2c40e48e4c9f98cbd41391"
+SRC_URI[sha256sum] = "c0f30f043f7767cc1b2cd2197b08d4e9b2392c95823fabe30bbce308c30116c4"
+
+# CFLAGS are computed in Makefile and reference CCOPTS
+#
+EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
Signature · 6 lines
2.7.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
#3 lore raw

Alright, I'll make the change now.

Quoted 396 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Wednesday, July 19, 2017 1:21 PM
To: Stiffler, Jacob
Cc: [email protected]
Subject: Re: [meta-arago] [PATCH 1/2] iproute2: backport version 4.9.0

Thanks!
The pristine 4.9 updated recipe should probably go into meta-arago-extras and the followup patch as bbappend in meta-arago-distro.

--
Denys

Quoted 10 lines · Jacob Stiffler

* Backport iproute2 4.9.0 from oe-core.
* Recipes were directly copied from commit
eac08770b1ea3ca6640941dc8fd03fc3fa5ff869

---
 .../recipes-connectivity/iproute2/iproute2.inc     |  48 ++++++++
 .../iproute2/0001-iproute2-de-bash-scripts.patch   |  64 ++++++++++
 .../iproute2/iproute2/configure-cross.patch        |  32 +++++
 .../iproute2/iproute2/iproute2-4.9.0-musl.patch    | 131

+++++++++++++++++++++

Quoted 3 lines
 .../iproute2/iproute2_4.9.0.bb                     |  14 +++
 5 files changed, 289 insertions(+)
 create mode 100644 meta-arago-distro/recipes-

connectivity/iproute2/iproute2.inc

Quoted 1 line
 create mode 100644 meta-arago-distro/recipes-

connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch

Quoted 1 line
 create mode 100644 meta-arago-distro/recipes-

connectivity/iproute2/iproute2/configure-cross.patch

Quoted 1 line
 create mode 100644 meta-arago-distro/recipes-

connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch

Quoted 1 line
 create mode 100644 meta-arago-distro/recipes-

connectivity/iproute2/iproute2_4.9.0.bb

Review

Quoted 2 lines
(quoted diff) +0 -0

b/meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc

meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc line 6

Quoted 11 lines

new file mode 100644
index 0000000..ce64888

meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +6 -0
@@ -0,0 +1,48 @@
+SUMMARY = "TCP / IP networking and traffic control utilities"
+DESCRIPTION = "Iproute2 is a collection of utilities for controlling \
+TCP / IP networking and traffic control in Linux.  Of the utilities ip \
+and tc are the most important.  ip controls IPv4 and IPv6 \
+configuration and tc stands for traffic control."
+HOMEPAGE =

"http://www.linuxfoundation.org/collaborate/workgroups/networking/ipr oute2"

meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc

Quoted 3 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +3 -0
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM =

"file://COPYING;md5=eb723b61539feef013de476e68b5c50a \

meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc line 10

Quoted 1 line
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +1 -0
+

file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31 817"

meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc

Quoted 6 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +6 -0
+
+DEPENDS = "flex-native bison-native iptables elfutils"
+
+inherit update-alternatives bash-completion pkgconfig
+
+EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR}

DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"

Quoted 9 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +9 -0
+
+do_configure_append () {
+    sh configure ${STAGING_INCDIR}
+    # Explicitly disable ATM support
+    sed -i -e '/TC_CONFIG_ATM/d' Config
+}
+
+do_install () {
+    oe_runmake DESTDIR=${D} install

meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc

Quoted 10 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +10 -0
+    mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2
+    install -d ${D}${datadir}
+    mv ${D}/share/* ${D}${datadir}/ || true
+    rm ${D}/share -rf || true
+}
+
+# The .so files in iproute2-tc are modules, not traditional libraries
+INSANE_SKIP_${PN}-tc = "dev-so"
+
+PACKAGES =+ "${PN}-tc ${PN}-lnstat ${PN}-ifstat ${PN}-genl ${PN}-rtacct

${PN}-nstat ${PN}-ss"

meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc

Quoted 3 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +3 -0
+FILES_${PN}-tc = "${base_sbindir}/tc* \
+                  ${libdir}/tc/*.so"
+FILES_${PN}-lnstat = "${base_sbindir}/lnstat ${base_sbindir}/ctstat

${base_sbindir}/rtstat"

Review

Quoted 11 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2.inc new file +10 -0
+FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
+FILES_${PN}-genl = "${base_sbindir}/genl"
+FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
+FILES_${PN}-nstat = "${base_sbindir}/nstat"
+FILES_${PN}-ss = "${base_sbindir}/ss"
+
+ALTERNATIVE_${PN} = "ip"
+ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
+ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip"
+ALTERNATIVE_PRIORITY = "100"
(quoted diff) +0 -0

connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001- iproute2-de-bash-scripts.patch

meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-

Quoted 4 lines

new file mode 100644
index 0000000..39c7d40

meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001- new file +0 -0

iproute2-de-bash-scripts.patch

Review

Quoted 66 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001- new file +64 -0
@@ -0,0 +1,64 @@
+Subject: [PATCH] iproute2: de-bash scripts
+
+de-bash these two scripts to make iproute2 not depend on bash.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <[email protected]>
+
+---
+ ip/ifcfg |   15 ++++++++-------
+ ip/rtpr  |    2 +-
+ 2 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/ip/ifcfg b/ip/ifcfg
+index 083d9df..60bcf1f 100644
+--- a/ip/ifcfg
++++ b/ip/ifcfg
+@@ -1,12 +1,13 @@
+-#! /bin/bash
++#! /bin/sh
+
+ CheckForwarding () {
+-  local sbase fwd
++  local sbase fwd forwarding
+   sbase=/proc/sys/net/ipv4/conf
+   fwd=0
+   if [ -d $sbase ]; then
+     for dir in $sbase/*/forwarding; do
+-      fwd=$[$fwd + `cat $dir`]
++      forwarding=`cat $dir`
++      fwd=$(($fwd+$forwarding))
+     done
+   else
+     fwd=2
+@@ -127,12 +128,12 @@ fi
+ arping -q -A -c 1 -I $dev $ipaddr
+ noarp=$?
+ ( sleep 2 ;
+-  arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null &
++  arping -q -U -c 1 -I $dev $ipaddr ) > /dev/null 2>&1 </dev/null &
+
+-ip route add unreachable 224.0.0.0/24 >& /dev/null
+-ip route add unreachable 255.255.255.255 >& /dev/null
++ip route add unreachable 224.0.0.0/24 > /dev/null 2>&1
++ip route add unreachable 255.255.255.255 > /dev/null 2>&1
+ if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then
+-  ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
++  ip route add 224.0.0.0/4 dev $dev scope global > /dev/null 2>&1
+ fi
+
+ if [ $fwd -eq 0 ]; then
+diff --git a/ip/rtpr b/ip/rtpr
+index c3629fd..674198d 100644
+--- a/ip/rtpr
++++ b/ip/rtpr
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /bin/sh
+
+ exec tr "[\\\\]" "[
+ ]"
+--
+1.7.9.5
+
(quoted diff) +0 -0

connectivity/iproute2/iproute2/configure-cross.patch b/meta-arago- distro/recipes-connectivity/iproute2/iproute2/configure-cross.patch

meta-arago-distro/recipes-

Quoted 4 lines

new file mode 100644
index 0000000..866609c

meta-arago-distro/recipes- new file +0 -0

connectivity/iproute2/iproute2/configure-cross.patch

meta-arago-distro/recipes- line 1

Quoted 2 lines
meta-arago-distro/recipes- new file +1 -0
@@ -0,0 +1,32 @@
+From 85b0589b4843c03e8e6fd9416d71ea449a73c5c0 Mon Sep 17 00:00:00

2001

meta-arago-distro/recipes- line 12

Quoted 12 lines
meta-arago-distro/recipes- new file +11 -0
+From: Koen Kooi <[email protected]>
+Date: Thu, 3 Nov 2011 10:46:16 +0100
+Subject: [PATCH] make configure cross compile safe
+
+According to Kevin Tian:
+Upstream-Status: Pending
+
+Signed-off-by: Koen Kooi <[email protected]>
+Signed-off-by: Shane Wang <[email protected]>
+
+Index: iproute2-3.7.0/configure

+==================================================================
=

Review

Quoted 20 lines
meta-arago-distro/recipes- new file +19 -0
+--- iproute2-3.7.0.orig/configure
++++ iproute2-3.7.0/configure
+@@ -2,6 +2,7 @@
+ # This is not an autconf generated configure
+ #
+ INCLUDE=${1:-"$PWD/include"}
++SYSROOT=$1
+
+ # Make a temp directory in build tree.
+ TMPDIR=$(mktemp -d config.XXXXXX)
+@@ -158,7 +159,7 @@ check_ipt_lib_dir()
+ 		return
+ 	fi
+
+-	for dir in /lib /usr/lib /usr/local/lib
++	for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib
+ 	do
+ 		for file in $dir/{xtables,iptables}/lib*t_*so ; do
+ 			if [ -f $file ]; then
(quoted diff) +0 -0

connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch b/meta-arago- distro/recipes-connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch

meta-arago-distro/recipes-

Quoted 4 lines

new file mode 100644
index 0000000..737a90c

meta-arago-distro/recipes- new file +0 -0

connectivity/iproute2/iproute2/iproute2-4.9.0-musl.patch

meta-arago-distro/recipes- line 10

Quoted 11 lines
meta-arago-distro/recipes- new file +10 -0
@@ -0,0 +1,131 @@
+Subject: [PATCH] Avoid in6_addr redefinition
+
+Due to both <netinet/in.h> and <linux/in6.h> being included, the
+in6_addr is being redefined: once from the C library headers and once
+from the kernel headers. This causes some build failures with for
+example the musl C library.
+
+In order to fix this, use just the C library header <netinet/in.h>.
+Original patch taken from
+http://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-

fixes.patch.

meta-arago-distro/recipes- line 16

Quoted 6 lines
meta-arago-distro/recipes- new file +6 -0
+
+(Refreshed the patch for 4.9 release)
+
+Upstream-Status: Pending
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-

electrons.com>

Quoted 4 lines
meta-arago-distro/recipes- new file +4 -0
+Signed-off-by: Maxin B. John <[email protected]>
+Signed-off-by: Zheng Ruoqin <[email protected]>
+---
+ include/libiptc/ipt_kernel_headers.h     | 1 -

meta-arago-distro/recipes- line 30

Quoted 10 lines
meta-arago-distro/recipes- new file +10 -0
+ include/linux/if_bridge.h                | 1 -
+ include/linux/if_tunnel.h                | 2 --
+ include/linux/netfilter.h                | 2 --
+ include/linux/netfilter_ipv4/ip_tables.h | 1 -
+ include/linux/xfrm.h                     | 1 -
+ include/utils.h                          | 1 +
+ ip/ip6tunnel.c                           | 1 -
+ 8 files changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/include/libiptc/ipt_kernel_headers.h

b/include/libiptc/ipt_kernel_headers.h

Quoted 41 lines
meta-arago-distro/recipes- new file +41 -0
+index a5963e9..42f8610 100644
+--- a/include/libiptc/ipt_kernel_headers.h
++++ b/include/libiptc/ipt_kernel_headers.h
+@@ -6,7 +6,6 @@
+ #include <limits.h>
+
+ #include <netinet/ip.h>
+-#include <netinet/in.h>
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+ #include <netinet/udp.h>
+diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
+index b7393dd..a7028ab 100644
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+
+ #include <linux/types.h>
+ #include <linux/if_ether.h>
+-#include <linux/in6.h>
+
+ #define SYSFS_BRIDGE_ATTR	"bridge"
+ #define SYSFS_BRIDGE_FDB	"brforward"
+diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
+index 4f975f5..2680646 100644
+--- a/include/linux/if_tunnel.h
++++ b/include/linux/if_tunnel.h
+@@ -2,9 +2,7 @@
+ #define _IF_TUNNEL_H_
+
+ #include <linux/types.h>
+-#include <linux/if.h>
+ #include <linux/ip.h>
+-#include <linux/in6.h>
+ #include <asm/byteorder.h>
+
+
+diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
+index b71b4c9..3e4e6ae 100644
+--- a/include/linux/netfilter.h
++++ b/include/linux/netfilter.h

meta-arago-distro/recipes- line 81

Quoted 10 lines
meta-arago-distro/recipes- new file +10 -0
+@@ -4,8 +4,6 @@
+ #include <linux/types.h>
+
+ #include <linux/sysctl.h>
+-#include <linux/in.h>
+-#include <linux/in6.h>
+
+ /* Responses from hook functions. */
+ #define NF_DROP 0
+diff --git a/include/linux/netfilter_ipv4/ip_tables.h

b/include/linux/netfilter_ipv4/ip_tables.h

Review

Quoted 51 lines
meta-arago-distro/recipes- new file +50 -0
+index 456fb86..38542b4 100644
+--- a/include/linux/netfilter_ipv4/ip_tables.h
++++ b/include/linux/netfilter_ipv4/ip_tables.h
+@@ -17,7 +17,6 @@
+
+ #include <linux/types.h>
+
+-#include <linux/if.h>
+ #include <linux/netfilter_ipv4.h>
+
+ #include <linux/netfilter/x_tables.h>
+diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
+index d2dd1fd..8c72966 100644
+--- a/include/linux/xfrm.h
++++ b/include/linux/xfrm.h
+@@ -1,7 +1,6 @@
+ #ifndef _LINUX_XFRM_H
+ #define _LINUX_XFRM_H
+
+-#include <linux/in6.h>
+ #include <linux/types.h>
+
+ /* All of the structures in this file may not change size as they are
+diff --git a/include/utils.h b/include/utils.h
+index 1b4f939..d10840b 100644
+--- a/include/utils.h
++++ b/include/utils.h
+@@ -1,6 +1,7 @@
+ #ifndef __UTILS_H__
+ #define __UTILS_H__ 1
+
++#include <sys/param.h>  /* MAXPATHLEN */
+ #include <sys/types.h>
+ #include <asm/types.h>
+ #include <resolv.h>
+diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
+index b1c0ae6..8fa4eb2 100644
+--- a/ip/ip6tunnel.c
++++ b/ip/ip6tunnel.c
+@@ -28,7 +28,6 @@
+ #include <arpa/inet.h>
+ #include <sys/ioctl.h>
+ #include <linux/ip.h>
+-#include <linux/if.h>
+ #include <linux/if_arp.h>
+ #include <linux/if_tunnel.h>
+ #include <linux/ip6_tunnel.h>
+--
+2.7.4
+
(quoted diff) +0 -0

connectivity/iproute2/iproute2_4.9.0.bb b/meta-arago-distro/recipes- connectivity/iproute2/iproute2_4.9.0.bb

Quoted 5 lines

new file mode 100644
index 0000000..808e550

meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.9.0.bb line 10

Quoted 10 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.9.0.bb new file +10 -0
@@ -0,0 +1,14 @@
+require iproute2.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
+           file://configure-cross.patch \
+           file://0001-iproute2-de-bash-scripts.patch \
+           file://iproute2-4.9.0-musl.patch \
+          "
+
+SRC_URI[md5sum] = "44a8371a4b2c40e48e4c9f98cbd41391"
+SRC_URI[sha256sum] =

"c0f30f043f7767cc1b2cd2197b08d4e9b2392c95823fabe30bbce308c30116c4"

Quoted 11 lines
meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.9.0.bb new file +4 -1
+
+# CFLAGS are computed in Makefile and reference CCOPTS
+#
+EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
--

2.7.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago