Blame SOURCES/metadata-add-missing-s-suffix.patch

05afe3
From 84083d83ff6049bcc99b959c00999496b3027317 Mon Sep 17 00:00:00 2001
05afe3
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
05afe3
Date: Fri, 21 Sep 2018 11:30:26 +0200
05afe3
Subject: [PATCH 1/4] IPv6Addr/nagios/sybaseASE: add missing "s"-suffix in
05afe3
 metadata
05afe3
05afe3
---
05afe3
 heartbeat/IPv6addr.c   | 12 ++++++------
05afe3
 heartbeat/nagios       |  2 +-
05afe3
 heartbeat/sybaseASE.in |  4 ++--
05afe3
 3 files changed, 9 insertions(+), 9 deletions(-)
05afe3
05afe3
diff --git a/heartbeat/IPv6addr.c b/heartbeat/IPv6addr.c
05afe3
index 68447de2e..d8562559b 100644
05afe3
--- a/heartbeat/IPv6addr.c
05afe3
+++ b/heartbeat/IPv6addr.c
05afe3
@@ -863,12 +863,12 @@ meta_data_addr6(void)
05afe3
 	"    </parameter>\n"
05afe3
 	"  </parameters>\n"
05afe3
 	"  <actions>\n"
05afe3
-	"    <action name=\"start\"   timeout=\"15\" />\n"
05afe3
-	"    <action name=\"stop\"    timeout=\"15\" />\n"
05afe3
-	"    <action name=\"status\"  timeout=\"15\" interval=\"15\" />\n"
05afe3
-	"    <action name=\"monitor\" timeout=\"15\" interval=\"15\" />\n"
05afe3
-	"    <action name=\"validate-all\"  timeout=\"5\" />\n"
05afe3
-	"    <action name=\"meta-data\"  timeout=\"5\" />\n"
05afe3
+	"    <action name=\"start\"   timeout=\"15s\" />\n"
05afe3
+	"    <action name=\"stop\"    timeout=\"15s\" />\n"
05afe3
+	"    <action name=\"status\"  timeout=\"15s\" interval=\"15s\" />\n"
05afe3
+	"    <action name=\"monitor\" timeout=\"15s\" interval=\"15s\" />\n"
05afe3
+	"    <action name=\"validate-all\"  timeout=\"5s\" />\n"
05afe3
+	"    <action name=\"meta-data\"  timeout=\"5s\" />\n"
05afe3
 	"  </actions>\n"
05afe3
 	"</resource-agent>\n";
05afe3
 	printf("%s\n",meta_data);
05afe3
diff --git a/heartbeat/nagios b/heartbeat/nagios
05afe3
index 4cb462f6a..3d07b141c 100755
05afe3
--- a/heartbeat/nagios
05afe3
+++ b/heartbeat/nagios
05afe3
@@ -114,7 +114,7 @@ nagios_meta_data() {
05afe3
 <action name="start" timeout="20s" />
05afe3
 <action name="stop" timeout="20s" />
05afe3
 <action name="status" timeout="20s" />
05afe3
-<action name="monitor" depth="0" timeout="20s" interval="10s" start-delay="10" />
05afe3
+<action name="monitor" depth="0" timeout="20s" interval="10s" start-delay="10s" />
05afe3
 <action name="validate-all" timeout="20s" />
05afe3
 <action name="meta-data" timeout="20s" />
05afe3
 </actions>
05afe3
diff --git a/heartbeat/sybaseASE.in b/heartbeat/sybaseASE.in
05afe3
index b4809ea23..9ddd429be 100755
05afe3
--- a/heartbeat/sybaseASE.in
05afe3
+++ b/heartbeat/sybaseASE.in
05afe3
@@ -234,8 +234,8 @@ meta_data()
05afe3
 		<action name="monitor" interval="30s" timeout="100s" />
05afe3
 
05afe3
 		
05afe3
-		<action name="status" depth="10" timeout="100" interval="120s" />
05afe3
-		<action name="monitor" depth="10" timeout="100" interval="120s" />
05afe3
+		<action name="status" depth="10" timeout="100s" interval="120s" />
05afe3
+		<action name="monitor" depth="10" timeout="100s" interval="120s" />
05afe3
 
05afe3
 		<action name="meta-data" timeout="5s" />
05afe3
 		<action name="validate-all" timeout="5s" />
05afe3
05afe3
From d4bba27b171cb87698359dd300313ba5a6600cca Mon Sep 17 00:00:00 2001
05afe3
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
05afe3
Date: Fri, 21 Sep 2018 11:34:41 +0200
05afe3
Subject: [PATCH 2/4] CI: improvements
05afe3
05afe3
- added "check"-command to skip build-process
05afe3
- added check for "s"-suffix in agents
05afe3
- added additional file-types to also check ocf-* and C agents
05afe3
---
05afe3
 ci/build.sh | 20 +++++++++++++++-----
05afe3
 1 file changed, 15 insertions(+), 5 deletions(-)
05afe3
05afe3
diff --git a/ci/build.sh b/ci/build.sh
05afe3
index c331e9ab4..22f4472d3 100755
05afe3
--- a/ci/build.sh
05afe3
+++ b/ci/build.sh
05afe3
@@ -51,7 +51,7 @@ find_prunes() {
05afe3
 }
05afe3
 
05afe3
 find_cmd() {
05afe3
-	echo "find heartbeat -type f -and \( -perm /111 -or -name '*.sh' \) $(find_prunes)"
05afe3
+	echo "find heartbeat -type f -and \( -perm /111 -or -name '*.sh' -or -name '*.c' -or -name '*.in' \) $(find_prunes)"
05afe3
 }
05afe3
 
05afe3
 check_all_executables() {
05afe3
@@ -59,6 +59,12 @@ check_all_executables() {
05afe3
 	while read -r script; do
05afe3
 		file --mime "$script" | grep 'charset=binary' >/dev/null 2>&1 && continue
05afe3
 		file --mime "$script" | grep 'text/x-python' >/dev/null 2>&1 && continue
05afe3
+		file --mime "$script" | grep 'text/x-makefile' >/dev/null 2>&1 && continue
05afe3
+
05afe3
+		if grep -qE "\
05afe3
+			fail "$script: \"s\"-suffix missing in timeout, interval or delay"
05afe3
+		fi
05afe3
+
05afe3
 		head=$(head -n1 "$script")
05afe3
 		[[ "$head" =~ .*ruby.* ]] && continue
05afe3
 		[[ "$head" =~ .*zsh.* ]] && continue
05afe3
@@ -67,6 +73,7 @@ check_all_executables() {
05afe3
 		[[ "$script" =~ ^.*\.orig ]] && continue
05afe3
 		[[ "$script" =~ ^ldirectord.in ]] && continue
05afe3
 		check "$script"
05afe3
+
05afe3
 	done < <(eval "$(find_cmd)")
05afe3
 	if [ $failed -gt 0 ]; then
05afe3
 		echo "ci/build.sh: $failed failure(s) detected."
05afe3
@@ -75,8 +82,11 @@ check_all_executables() {
05afe3
 	exit 0
05afe3
 }
05afe3
 
05afe3
-./autogen.sh
05afe3
-./configure
05afe3
-make check
05afe3
-[ $? -eq 0 ] || failed=$((failed + 1))
05afe3
+if [ "$1" != "check" ]; then
05afe3
+	./autogen.sh
05afe3
+	./configure
05afe3
+	make check
05afe3
+	[ $? -eq 0 ] || failed=$((failed + 1))
05afe3
+fi
05afe3
+
05afe3
 check_all_executables
05afe3
05afe3
From 6c5f5442b4d03448aa585bf62f83876f667a76f8 Mon Sep 17 00:00:00 2001
05afe3
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
05afe3
Date: Fri, 21 Sep 2018 11:41:40 +0200
05afe3
Subject: [PATCH 3/4] ocf-shellfuncs: fixes caught when improving CI
05afe3
05afe3
---
05afe3
 heartbeat/ocf-shellfuncs.in | 4 ++--
05afe3
 1 file changed, 2 insertions(+), 2 deletions(-)
05afe3
05afe3
diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in
05afe3
index 8e44f09eb..043ab9bf2 100644
05afe3
--- a/heartbeat/ocf-shellfuncs.in
05afe3
+++ b/heartbeat/ocf-shellfuncs.in
05afe3
@@ -457,7 +457,7 @@ ocf_pidfile_status() {
05afe3
 	return 2
05afe3
     fi
05afe3
     pid=`cat $pidfile`
05afe3
-    kill -0 $pid 2>&1 > /dev/null
05afe3
+    kill -0 $pid > /dev/null 2>&1
05afe3
     if [ $? = 0 ]; then
05afe3
 	return 0
05afe3
     fi
05afe3
@@ -761,7 +761,7 @@ maketempfile()
05afe3
 {
05afe3
 	if [ $# = 1 -a "$1" = "-d" ]; then
05afe3
 		mktemp -d
05afe3
-		return -0
05afe3
+		return 0
05afe3
 	elif [ $# != 0 ]; then
05afe3
 		return 1
05afe3
 	fi
05afe3
05afe3
From d1579996d6f5aec57ece2bc31b106891d0bbb964 Mon Sep 17 00:00:00 2001
05afe3
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
05afe3
Date: Fri, 21 Sep 2018 11:50:08 +0200
05afe3
Subject: [PATCH 4/4] CI: fix upstream CI not detecting MIME-format correctly
05afe3
 for Makefiles
05afe3
05afe3
---
05afe3
 ci/build.sh | 3 ++-
05afe3
 1 file changed, 2 insertions(+), 1 deletion(-)
05afe3
05afe3
diff --git a/ci/build.sh b/ci/build.sh
05afe3
index 22f4472d3..b900ddc05 100755
05afe3
--- a/ci/build.sh
05afe3
+++ b/ci/build.sh
05afe3
@@ -59,7 +59,8 @@ check_all_executables() {
05afe3
 	while read -r script; do
05afe3
 		file --mime "$script" | grep 'charset=binary' >/dev/null 2>&1 && continue
05afe3
 		file --mime "$script" | grep 'text/x-python' >/dev/null 2>&1 && continue
05afe3
-		file --mime "$script" | grep 'text/x-makefile' >/dev/null 2>&1 && continue
05afe3
+		# upstream CI doesnt detect MIME-format correctly for Makefiles
05afe3
+		[[ "$script" =~ .*/Makefile.in ]] && continue
05afe3
 
05afe3
 		if grep -qE "\
05afe3
 			fail "$script: \"s\"-suffix missing in timeout, interval or delay"