summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChen Qi <qi.chen@windriver.com>2014-03-07 01:39:27 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-11 07:56:39 -0700
commit8d326e6728b7a6dceb683e610a0b81c5e4933747 (patch)
treecd0845bca1b8d7c16ffb4518ff7225e4eda0b66b /meta
parent6c9133d88735a6d08098517088e7dfe59184f90e (diff)
downloadpoky-8d326e6728b7a6dceb683e610a0b81c5e4933747.tar.gz
iproute2: de-bash its scripts to remove the bash dependency
If we build a minimal image with iproute2 installed, the following error will appear during rootfs. error: Can't install iproute2-3.10.0-r0.0@i586: no package provides /bin/bash The problem is that iproute2 has an implicit dependency on 'bash'. This dependency is from per-file dependency checking. Patch two scripts, ifcfg and rtpr, from iproute2 to remove the bash specific syntax. [YOCTO #5415] (From OE-Core master rev: 1132c4210eddd59b22b2640935ab0bb8f48c0124) (From OE-Core rev: ca55e7321f0c52fbe13d301d0dfe3adff5435639) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch64
-rw-r--r--meta/recipes-connectivity/iproute2/iproute2_3.10.0.bb1
2 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
new file mode 100644
index 0000000000..39c7d40319
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
@@ -0,0 +1,64 @@
1Subject: [PATCH] iproute2: de-bash scripts
2
3de-bash these two scripts to make iproute2 not depend on bash.
4
5Upstream-Status: Pending
6
7Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
8
9---
10 ip/ifcfg | 15 ++++++++-------
11 ip/rtpr | 2 +-
12 2 files changed, 9 insertions(+), 8 deletions(-)
13
14diff --git a/ip/ifcfg b/ip/ifcfg
15index 083d9df..60bcf1f 100644
16--- a/ip/ifcfg
17+++ b/ip/ifcfg
18@@ -1,12 +1,13 @@
19-#! /bin/bash
20+#! /bin/sh
21
22 CheckForwarding () {
23- local sbase fwd
24+ local sbase fwd forwarding
25 sbase=/proc/sys/net/ipv4/conf
26 fwd=0
27 if [ -d $sbase ]; then
28 for dir in $sbase/*/forwarding; do
29- fwd=$[$fwd + `cat $dir`]
30+ forwarding=`cat $dir`
31+ fwd=$(($fwd+$forwarding))
32 done
33 else
34 fwd=2
35@@ -127,12 +128,12 @@ fi
36 arping -q -A -c 1 -I $dev $ipaddr
37 noarp=$?
38 ( sleep 2 ;
39- arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null &
40+ arping -q -U -c 1 -I $dev $ipaddr ) > /dev/null 2>&1 </dev/null &
41
42-ip route add unreachable 224.0.0.0/24 >& /dev/null
43-ip route add unreachable 255.255.255.255 >& /dev/null
44+ip route add unreachable 224.0.0.0/24 > /dev/null 2>&1
45+ip route add unreachable 255.255.255.255 > /dev/null 2>&1
46 if [ `ip link ls $dev | grep -c MULTICAST` -ge 1 ]; then
47- ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null
48+ ip route add 224.0.0.0/4 dev $dev scope global > /dev/null 2>&1
49 fi
50
51 if [ $fwd -eq 0 ]; then
52diff --git a/ip/rtpr b/ip/rtpr
53index c3629fd..674198d 100644
54--- a/ip/rtpr
55+++ b/ip/rtpr
56@@ -1,4 +1,4 @@
57-#! /bin/bash
58+#! /bin/sh
59
60 exec tr "[\\\\]" "[
61 ]"
62--
631.7.9.5
64
diff --git a/meta/recipes-connectivity/iproute2/iproute2_3.10.0.bb b/meta/recipes-connectivity/iproute2/iproute2_3.10.0.bb
index 2220467c87..721fa55c7b 100644
--- a/meta/recipes-connectivity/iproute2/iproute2_3.10.0.bb
+++ b/meta/recipes-connectivity/iproute2/iproute2_3.10.0.bb
@@ -2,6 +2,7 @@ require iproute2.inc
2 2
3SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BPN}-${PV}.tar.xz \ 3SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BPN}-${PV}.tar.xz \
4 file://configure-cross.patch \ 4 file://configure-cross.patch \
5 file://0001-iproute2-de-bash-scripts.patch \
5 " 6 "
6 7
7SRC_URI[md5sum] = "45fb5427fc723a0001c72b92c931ba02" 8SRC_URI[md5sum] = "45fb5427fc723a0001c72b92c931ba02"