diff --git a/corosync-2.3.4-fix-bashisms.patch b/corosync-2.3.4-fix-bashisms.patch new file mode 100644 index 0000000..b9e5268 --- /dev/null +++ b/corosync-2.3.4-fix-bashisms.patch @@ -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 diff --git a/corosync.changes b/corosync.changes index e9ee5a2..7be37d4 100644 --- a/corosync.changes +++ b/corosync.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Nov 17 04:01:00 UTC 2014 - Led + +- 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 + +- fix bashism in preun script + ------------------------------------------------------------------- Mon Sep 1 08:01:50 UTC 2014 - xli@suse.com diff --git a/corosync.spec b/corosync.spec index c114f7b..64c892a 100644 --- a/corosync.spec +++ b/corosync.spec @@ -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