From 67e1216aebf601e5c180817c287d893b27ea8c65 Mon Sep 17 00:00:00 2001 From: Rinku Kothiya Date: Thu, 28 Nov 2019 01:52:32 -0500 Subject: [PATCH] autobuild v6.0-24 Resolves: bz#1768786 Signed-off-by: Rinku Kothiya --- ...-and-return-exit-code-in-rpm-scripts.patch | 162 ++++++++++++++++++ glusterfs.spec | 61 ++++--- 2 files changed, 200 insertions(+), 23 deletions(-) create mode 100644 0336-spec-check-and-return-exit-code-in-rpm-scripts.patch diff --git a/0336-spec-check-and-return-exit-code-in-rpm-scripts.patch b/0336-spec-check-and-return-exit-code-in-rpm-scripts.patch new file mode 100644 index 0000000..df971b8 --- /dev/null +++ b/0336-spec-check-and-return-exit-code-in-rpm-scripts.patch @@ -0,0 +1,162 @@ +From 562283ad34021bbf4fc540127ee7072d5152d34d Mon Sep 17 00:00:00 2001 +From: Yuval Turgeman +Date: Wed, 24 Jul 2019 16:42:22 +0300 +Subject: [PATCH 336/336] spec: check and return exit code in rpm scripts + +lua's error() call expects a value as its second argument, and this is +taken from the `val` variable, while the `ok` is boolean. This causes +the rpm scripts to fail on: + +bad argument #2 to 'error' (number expected, got boolean) + +Label: DOWNSTREAM ONLY +BUG: 1768786 +Change-Id: I9c6b1f62ebf15dbc93196d018bc1fd628b36fc33 +>Signed-off-by: Yuval Turgeman +Reviewed-on: https://code.engineering.redhat.com/gerrit/186405 +Reviewed-by: Mohit Agrawal +Tested-by: RHGS Build Bot +Reviewed-by: Sunil Kumar Heggodu Gopala Acharya +--- + glusterfs.spec.in | 55 +++++++++++++++++++++++++++++++++---------------------- + 1 file changed, 33 insertions(+), 22 deletions(-) + +diff --git a/glusterfs.spec.in b/glusterfs.spec.in +index 91180db..1b975b2 100644 +--- a/glusterfs.spec.in ++++ b/glusterfs.spec.in +@@ -1572,8 +1572,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + + +@@ -1606,8 +1607,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + + +@@ -1640,8 +1642,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + + +@@ -1674,8 +1677,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + + +@@ -1707,8 +1711,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + + +@@ -1740,8 +1745,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + + +@@ -1775,8 +1781,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + %endif + +@@ -1810,8 +1817,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + + +@@ -1845,8 +1853,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + %endif + +@@ -1881,8 +1890,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + %endif + +@@ -1916,8 +1926,9 @@ fi + ]] + + ok, how, val = os.execute(script) +-if not (ok == 0) then +- error("Detected running glusterfs processes", ok) ++rc = val or ok ++if not (rc == 0) then ++ error("Detected running glusterfs processes", rc) + end + + %posttrans server +-- +1.8.3.1 + diff --git a/glusterfs.spec b/glusterfs.spec index 57699ad..ac3915a 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -231,7 +231,7 @@ Release: 0.1%{?prereltag:.%{prereltag}}%{?dist} %else Name: glusterfs Version: 6.0 -Release: 23%{?dist} +Release: 24%{?dist} ExcludeArch: i686 %endif License: GPLv2 or LGPLv3+ @@ -644,6 +644,7 @@ Patch0332: 0332-Removing-one-top-command-from-gluster-v-help.patch Patch0333: 0333-rpc-Synchronize-slot-allocation-code.patch Patch0334: 0334-dht-log-getxattr-failure-for-node-uuid-at-DEBUG.patch Patch0335: 0335-tests-RHEL8-test-failure-fixes-for-RHGS.patch +Patch0336: 0336-spec-check-and-return-exit-code-in-rpm-scripts.patch %description GlusterFS is a distributed file-system capable of scaling to several @@ -1982,8 +1983,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end @@ -2016,8 +2018,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end @@ -2050,8 +2053,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end @@ -2084,8 +2088,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end @@ -2117,8 +2122,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end @@ -2150,8 +2156,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end @@ -2185,8 +2192,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end %endif @@ -2220,8 +2228,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end @@ -2255,8 +2264,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end %endif @@ -2291,8 +2301,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end %endif @@ -2326,8 +2337,9 @@ fi ]] ok, how, val = os.execute(script) -if not (ok == 0) then - error("Detected running glusterfs processes", ok) +rc = val or ok +if not (rc == 0) then + error("Detected running glusterfs processes", rc) end %posttrans server @@ -2361,6 +2373,9 @@ fi %endif %changelog +* Thu Nov 28 2019 Rinku Kothiya - 6.0-24 +- fixes bugs bz#1768786 + * Thu Nov 21 2019 Rinku Kothiya - 6.0-23 - fixes bugs bz#1344758 bz#1599802 bz#1685406 bz#1686800 bz#1724021 bz#1726058 bz#1727755 bz#1731513 bz#1741193 bz#1758923 bz#1761326 bz#1761486