[packages/iproute2] replace bashisms
glen
glen at pld-linux.org
Sat Nov 23 12:11:08 CET 2013
commit 2b81c316b233597877394d6ec31cede0596ac8bd
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Nov 23 13:10:47 2013 +0200
replace bashisms
fix-bashisms.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
iproute2.spec | 9 ++++-----
2 files changed, 46 insertions(+), 5 deletions(-)
---
diff --git a/iproute2.spec b/iproute2.spec
index 7729a4b..efb2326 100644
--- a/iproute2.spec
+++ b/iproute2.spec
@@ -2,9 +2,6 @@
# TODO:
# - fix build @ uClibc
# - fix iface_descr patch
-# - iproute2-3.11.0-2.x86_64 marks bash-4.2.45-2.x86_64 (cap /bin/bash)
-# - /sbin/ifcfg
-# - /sbin/rtpr
#
# Conditional build
%bcond_without doc # don't build documentation
@@ -19,7 +16,7 @@ Summary(pl.UTF-8): Narzędzie do konfigurowania sieci
Summary(pt_BR.UTF-8): Ferramentas para roteamento avançado e configuração de interfaces de rede
Name: iproute2
Version: 3.12.0
-Release: 1
+Release: 2
License: GPL v2+
Group: Networking/Admin
Source0: https://www.kernel.org/pub/linux/utils/net/iproute2/%{name}-%{version}.tar.xz
@@ -28,6 +25,8 @@ Patch0: %{name}-arp.patch
Patch1: %{name}-iptables.patch
Patch2: %{name}-iptables64.patch
Patch3: %{name}-LDFLAGS.patch
+Patch4: fix-bashisms.patch
+Patch16: %{name}-build.patch
# extensions
Patch10: %{name}-2.2.4-wrr.patch
Patch11: esfq-%{name}.patch
@@ -35,7 +34,6 @@ Patch12: 001-net-dev-iface-descr-0.1.diff
Patch13: %{name}-q_atm_c.patch
Patch14: %{name}-q_srr.v0.4.patch
Patch15: %{name}-ip_route_get.patch
-Patch16: %{name}-build.patch
URL: http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
BuildRequires: bison
BuildRequires: db-devel
@@ -124,6 +122,7 @@ Dokumentacja do iproute zawiera "howto" oraz przykłady ustawień.
%patch1 -p1
%endif
%patch3 -p1
+%patch4 -p1
# extensions:
%patch10 -p1
%patch11 -p1
diff --git a/fix-bashisms.patch b/fix-bashisms.patch
new file mode 100644
index 0000000..ad7fa41
--- /dev/null
+++ b/fix-bashisms.patch
@@ -0,0 +1,42 @@
+--- iproute2-3.12.0/ip/ifcfg~ 2013-11-23 13:08:41.000000000 +0200
++++ iproute2-3.12.0/ip/ifcfg 2013-11-23 13:08:46.796879511 +0200
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /bin/sh
+
+ CheckForwarding () {
+ local sbase fwd
+@@ -6,7 +6,7 @@
+ fwd=0
+ if [ -d $sbase ]; then
+ for dir in $sbase/*/forwarding; do
+- fwd=$[$fwd + `cat $dir`]
++ fwd=$(($fwd + `cat $dir`))
+ done
+ else
+ fwd=2
+@@ -127,12 +127,12 @@
+ 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
+--- iproute2-3.12.0/ip/rtpr~ 2013-11-23 03:10:33.000000000 +0200
++++ iproute2-3.12.0/ip/rtpr 2013-11-23 13:10:03.780255410 +0200
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#! /bin/sh
+
+ exec tr "[\\\\]" "[
+ ]"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/iproute2.git/commitdiff/2b81c316b233597877394d6ec31cede0596ac8bd
More information about the pld-cvs-commit
mailing list