Accepting request 261986 from home:Ledest:bashisms

fix bashisms in mem_leak_test.sh script and preun script

OBS-URL: https://build.opensuse.org/request/show/261986
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=59
This commit is contained in:
Lidong Zhong 2014-11-21 02:58:32 +00:00 committed by Git OBS Bridge
parent cdcaa01206
commit f7574462ba
3 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,34 @@
diff -Ndur corosync-2.3.4/cts/agents/mem_leak_test.sh corosync-2.3.4-fix-bashisms/cts/agents/mem_leak_test.sh
--- corosync-2.3.4/cts/agents/mem_leak_test.sh 2014-08-12 10:27:36.000000000 +0300
+++ corosync-2.3.4-fix-bashisms/cts/agents/mem_leak_test.sh 2014-11-17 05:57:38.986640342 +0200
@@ -41,14 +41,14 @@
find $f | sed "s|\.|_|g" | sed "s|/|.|g" | while read l
do
echo $l.count u64 $COUNT >> $temp_file
- let COUNT="$COUNT+1"
+ COUNT=$((COUNT + 1))
done
corosync-cmapctl -p $temp_file
corosync-cmapctl -D usr
done
AFTER=$(get_mem $TYPE)
- let DIFF="$AFTER - $BEFORE"
+ DIFF=$((AFTER - BEFORE))
rm -f $temp_file
#echo $f diff $TYPE $DIFF
echo $DIFF
@@ -76,11 +76,11 @@
find /usr/bin | sed "s|\.|_|g" | sed "s|/|.|g" | while read l
do
corosync-cmapctl -s $l u32 $COUNT
- let COUNT="$COUNT+1"
+ COUNT=$((COUNT + 1))
done
corosync-cmapctl -D usr
AFTER=$(get_mem $TYPE)
- let DIFF="$AFTER - $BEFORE"
+ DIFF=$((AFTER - BEFORE))
echo $DIFF
exit 0

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Nov 17 04:01:00 UTC 2014 - Led <ledest@gmail.com>
- fix bashisms in mem_leak_test.sh script
- add patches:
* corosync-2.3.4-fix-bashisms.patch
-------------------------------------------------------------------
Mon Nov 17 04:00:00 UTC 2014 - Led <ledest@gmail.com>
- fix bashism in preun script
-------------------------------------------------------------------
Mon Sep 1 08:01:50 UTC 2014 - xli@suse.com

View File

@ -52,6 +52,7 @@ Source2: baselibs.conf
Patch1: corosync-init-lockfile-path-error.patch
Patch2: bnc#872651-stop-cluster.patch
Patch3: bnc#882449-corosync-conf-example.patch
Patch4: corosync-2.3.4-fix-bashisms.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# openais is indeed gone and should be uninstalled. Yes, we do not
# provide openais on purpose, the package has been deleted.
@ -99,6 +100,7 @@ Requires: libxslt
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
#%if 0%{?buildtrunk} == 1
@ -199,7 +201,7 @@ fi
%service_del_preun corosync.service corosync-notifyd.service
%else
if [ $1 -eq 0 ]; then
/sbin/service corosync stop &>/dev/null || :
/sbin/service corosync stop >/dev/null 2>&1 ||:
/sbin/chkconfig --del corosync || :
fi
%endif