* [PATCH 0/1] iproute2: de-bash its scripts to remove the bash dependency
@ 2013-11-01 8:21 Qi.Chen
2013-11-01 8:21 ` [PATCH 1/1] " Qi.Chen
0 siblings, 1 reply; 2+ messages in thread
From: Qi.Chen @ 2013-11-01 8:21 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
The following changes since commit 523f2a9ea970713fb775bc48f84b67420b1106a0:
cross-canadian: Improve comment (2013-10-30 18:01:34 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/iproute2
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/iproute2
Chen Qi (1):
iproute2: de-bash its scripts to remove the bash dependency
.../iproute2/0001-iproute2-de-bash-scripts.patch | 64 ++++++++++++++++++++
.../iproute2/iproute2_3.11.0.bb | 1 +
2 files changed, 65 insertions(+)
create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] iproute2: de-bash its scripts to remove the bash dependency
2013-11-01 8:21 [PATCH 0/1] iproute2: de-bash its scripts to remove the bash dependency Qi.Chen
@ 2013-11-01 8:21 ` Qi.Chen
0 siblings, 0 replies; 2+ messages in thread
From: Qi.Chen @ 2013-11-01 8:21 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <qi.chen@windriver.com>
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]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
.../iproute2/0001-iproute2-de-bash-scripts.patch | 64 ++++++++++++++++++++
.../iproute2/iproute2_3.11.0.bb | 1 +
2 files changed, 65 insertions(+)
create mode 100644 meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
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 0000000..39c7d40
--- /dev/null
+++ b/meta/recipes-connectivity/iproute2/iproute2/0001-iproute2-de-bash-scripts.patch
@@ -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 <Qi.Chen@windriver.com>
+
+---
+ 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
+
diff --git a/meta/recipes-connectivity/iproute2/iproute2_3.11.0.bb b/meta/recipes-connectivity/iproute2/iproute2_3.11.0.bb
index 98f5a80..469b2b0 100644
--- a/meta/recipes-connectivity/iproute2/iproute2_3.11.0.bb
+++ b/meta/recipes-connectivity/iproute2/iproute2_3.11.0.bb
@@ -2,6 +2,7 @@ require iproute2.inc
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BPN}-${PV}.tar.xz \
file://configure-cross.patch \
+ file://0001-iproute2-de-bash-scripts.patch \
"
SRC_URI[md5sum] = "d7ffb27bc9f0d80577b1f3fb9d1a7689"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-01 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-01 8:21 [PATCH 0/1] iproute2: de-bash its scripts to remove the bash dependency Qi.Chen
2013-11-01 8:21 ` [PATCH 1/1] " Qi.Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox