From 47534c0cc044b1812adcab761cc5709d32b180e6 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:40 +0100 Subject: [PATCH 01/57] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- booth.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/booth.spec b/booth.spec index fcd47ef..f64c975 100644 --- a/booth.spec +++ b/booth.spec @@ -59,7 +59,6 @@ Name: booth Version: %{boothver} Release: %{boothrel}%{dist} Summary: Ticket Manager for Multi-site Clusters -Group: System Environment/Daemons License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz @@ -124,7 +123,6 @@ clustering in Pacemaker. %package core Summary: Booth core files (executables, etc.) -Group: System Environment/Daemons # for booth-keygen (chown, dd) Requires: coreutils # deal with pre-split arrangement @@ -136,7 +134,6 @@ multi-site clusters. %package arbitrator Summary: Booth support for running as an arbitrator -Group: System Environment/Daemons BuildArch: noarch Requires: %{name}-core = %{version}-%{release} %{?systemd_requires} @@ -158,7 +155,6 @@ as an arbitrator. %package site Summary: Booth support for running as a full-fledged site -Group: System Environment/Daemons BuildArch: noarch Requires: %{name}-core = %{version}-%{release} # for crm_{resource,simulate,ticket} utilities @@ -174,7 +170,6 @@ as a full-fledged site. %package test Summary: Test scripts for Booth -Group: System Environment/Daemons BuildArch: noarch # runtests.py suite (for hostname and killall respectively) Requires: hostname psmisc From 19b5c9e14e92203b9ddb8e5271f0d3d7756823e1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 14:51:12 +0000 Subject: [PATCH 02/57] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index f64c975..b9376d0 100644 --- a/booth.spec +++ b/booth.spec @@ -57,7 +57,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{dist} +Release: %{boothrel}%{dist}.1 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -273,6 +273,9 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 1.0-3.f2d38ce.git.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Jan Pokorný - 1.0-3.f2d38ce.git - update for another, current snapshot beyond booth-1.0 (commit f2d38ce), including: From 0e519515be30061e72f97010ae11bffaed1751a3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 19:30:49 +0000 Subject: [PATCH 03/57] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index b9376d0..ef88c91 100644 --- a/booth.spec +++ b/booth.spec @@ -57,7 +57,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{dist}.1 +Release: %{boothrel}%{dist}.2 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -273,6 +273,9 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 1.0-3.f2d38ce.git.2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Jan 31 2019 Fedora Release Engineering - 1.0-3.f2d38ce.git.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 7b56628ebadd4d8c0c9400af7238e77df188dc13 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 13:13:06 +0000 Subject: [PATCH 04/57] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index ef88c91..927c3be 100644 --- a/booth.spec +++ b/booth.spec @@ -57,7 +57,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{dist}.2 +Release: %{boothrel}%{dist}.3 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -273,6 +273,9 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 1.0-3.f2d38ce.git.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Jul 24 2019 Fedora Release Engineering - 1.0-3.f2d38ce.git.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From c4b1800b74e152d16f3c237b2bed35f5715bb9a4 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 4 May 2020 10:50:58 +0200 Subject: [PATCH 05/57] New upstream release - Update to current snapshot (commit 5d837d2) to build with gcc10 - Pass full path of Python3 to configure Signed-off-by: Jan Friesse --- ...rfluous-shebangs-for-import-only-mod.patch | 158 ------ ...-mix-tabs-with-spaces-in-Python-code.patch | 60 --- ...-files-supported-_also_-with-Python-.patch | 510 ------------------ ...e-Python-invocations-in-the-shebangs.patch | 89 --- ...ualified-identifier-in-unittest-s-2..patch | 36 -- ...drop-comment-out-superfluous-imports.patch | 90 ---- ...ngerous-mutable-sticky-default-value.patch | 178 ------ ...y-daemon-will-not-stay-in-foreground.patch | 41 -- ...ncpy-may-miss-trailing-null-byte-war.patch | 50 -- booth.spec | 22 +- sources | 2 +- 11 files changed, 10 insertions(+), 1226 deletions(-) delete mode 100644 0000-test-remove-superfluous-shebangs-for-import-only-mod.patch delete mode 100644 0001-test-do-not-mix-tabs-with-spaces-in-Python-code.patch delete mode 100644 0002-test-make-Python-files-supported-_also_-with-Python-.patch delete mode 100644 0003-build-parametrize-Python-invocations-in-the-shebangs.patch delete mode 100644 0004-test-drop-underqualified-identifier-in-unittest-s-2..patch delete mode 100644 0005-test-drop-comment-out-superfluous-imports.patch delete mode 100644 0006-test-avoid-dangerous-mutable-sticky-default-value.patch delete mode 100644 0007-test-unit-test.py-daemon-will-not-stay-in-foreground.patch delete mode 100644 0008-Refactor-fix-strncpy-may-miss-trailing-null-byte-war.patch diff --git a/0000-test-remove-superfluous-shebangs-for-import-only-mod.patch b/0000-test-remove-superfluous-shebangs-for-import-only-mod.patch deleted file mode 100644 index d53772f..0000000 --- a/0000-test-remove-superfluous-shebangs-for-import-only-mod.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 9469ffc2d58a5673fffae8778b9c48f5605dda6a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Tue, 10 Jul 2018 18:41:18 +0200 -Subject: [PATCH] test: remove superfluous shebangs for import-only modules -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Consequently, there's no reason to have the affected files marked as -executable. - -Signed-off-by: Jan Pokorný ---- - test/arbtests.py | 2 -- - test/assertions.py | 2 -- - test/boothrunner.py | 2 -- - test/boothtestenv.py | 2 -- - test/clientenv.py | 2 -- - test/clienttests.py | 2 -- - test/serverenv.py | 2 -- - test/servertests.py | 2 -- - test/sitetests.py | 2 -- - test/utils.py | 2 -- - 10 files changed, 20 deletions(-) - mode change 100755 => 100644 test/arbtests.py - mode change 100755 => 100644 test/assertions.py - mode change 100755 => 100644 test/boothrunner.py - mode change 100755 => 100644 test/boothtestenv.py - mode change 100755 => 100644 test/clientenv.py - mode change 100755 => 100644 test/clienttests.py - mode change 100755 => 100644 test/serverenv.py - mode change 100755 => 100644 test/servertests.py - mode change 100755 => 100644 test/sitetests.py - mode change 100755 => 100644 test/utils.py - -diff --git a/test/arbtests.py b/test/arbtests.py -old mode 100755 -new mode 100644 -index caba010..ef7b7f9 ---- a/test/arbtests.py -+++ b/test/arbtests.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - from servertests import ServerTests - - class ArbitratorConfigTests(ServerTests): -diff --git a/test/assertions.py b/test/assertions.py -old mode 100755 -new mode 100644 -index 4396ab7..0b7f995 ---- a/test/assertions.py -+++ b/test/assertions.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - import re - - class BoothAssertions: -diff --git a/test/boothrunner.py b/test/boothrunner.py -old mode 100755 -new mode 100644 -index f9154e7..d981183 ---- a/test/boothrunner.py -+++ b/test/boothrunner.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - import os - import subprocess - import time -diff --git a/test/boothtestenv.py b/test/boothtestenv.py -old mode 100755 -new mode 100644 -index 89a484a..fcd0c4d ---- a/test/boothtestenv.py -+++ b/test/boothtestenv.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - import os - import subprocess - import time -diff --git a/test/clientenv.py b/test/clientenv.py -old mode 100755 -new mode 100644 -index fcd40fa..73b2791 ---- a/test/clientenv.py -+++ b/test/clientenv.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - from boothtestenv import BoothTestEnvironment - from boothrunner import BoothRunner - -diff --git a/test/clienttests.py b/test/clienttests.py -old mode 100755 -new mode 100644 -index 61b691b..c4b9d8a ---- a/test/clienttests.py -+++ b/test/clienttests.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - import string - - from clientenv import ClientTestEnvironment -diff --git a/test/serverenv.py b/test/serverenv.py -old mode 100755 -new mode 100644 -index d0467b9..c6d4e30 ---- a/test/serverenv.py -+++ b/test/serverenv.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - import os - import re - import time -diff --git a/test/servertests.py b/test/servertests.py -old mode 100755 -new mode 100644 -index f574f26..39a6ffc ---- a/test/servertests.py -+++ b/test/servertests.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - import copy - from pprint import pprint, pformat - import re -diff --git a/test/sitetests.py b/test/sitetests.py -old mode 100755 -new mode 100644 -index dfdf6b9..6944ffe ---- a/test/sitetests.py -+++ b/test/sitetests.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - from servertests import ServerTests - - class SiteConfigTests(ServerTests): -diff --git a/test/utils.py b/test/utils.py -old mode 100755 -new mode 100644 -index ceeef98..5b70cfc ---- a/test/utils.py -+++ b/test/utils.py -@@ -1,5 +1,3 @@ --#!/usr/bin/python -- - import subprocess - import re - --- -2.18.0.rc2 - diff --git a/0001-test-do-not-mix-tabs-with-spaces-in-Python-code.patch b/0001-test-do-not-mix-tabs-with-spaces-in-Python-code.patch deleted file mode 100644 index e495122..0000000 --- a/0001-test-do-not-mix-tabs-with-spaces-in-Python-code.patch +++ /dev/null @@ -1,60 +0,0 @@ -From a642a833e31a6bd1e71dc2045a16e494775b35e6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Thu, 12 Jul 2018 18:58:32 +0200 -Subject: [PATCH] test: do not mix tabs with spaces in Python code -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Beside being matter of a good style, it's also forbidden inside -a single, non-delimited block in Python 3. - -Signed-off-by: Jan Pokorný ---- - test/servertests.py | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/test/servertests.py b/test/servertests.py -index 39a6ffc..71e808e 100644 ---- a/test/servertests.py -+++ b/test/servertests.py -@@ -51,8 +51,8 @@ class ServerTests(ServerTestEnvironment): - config_text=self.working_config) - - def test_missing_quotes(self): -- # quotes no longer required -- return True -+ # quotes no longer required -+ return True - orig_lines = self.working_config.split("\n") - for i in xrange(len(orig_lines)): - new_lines = copy.copy(orig_lines) -@@ -97,8 +97,8 @@ class ServerTests(ServerTestEnvironment): - expected_exitcode=None, expected_daemon=True) - - def test_missing_transport(self): -- # UDP is default -- TODO? -- return True -+ # UDP is default -- TODO? -+ return True - config = re.sub('transport=.+\n', '', self.typical_config) - (pid, ret, stdout, stderr, runner) = \ - self.run_booth(config_text=config, expected_exitcode=1, expected_daemon=False) -@@ -141,10 +141,10 @@ class ServerTests(ServerTestEnvironment): - self.assertRegexpMatches(stderr, 'ticket name "' + ticket + '" invalid') - - def test_unreachable_peer(self): -- # what should this test do? daemon not expected, but no exitcode either? -- # booth would now just run, and try to reach that peer... -- # TCP reachability is not required during startup anymore. -- return True -+ # what should this test do? daemon not expected, but no exitcode either? -+ # booth would now just run, and try to reach that peer... -+ # TCP reachability is not required during startup anymore. -+ return True - config = re.sub('#(.+147.+)', lambda m: m.group(1), self.working_config) - self.run_booth(config_text=config, - expected_exitcode=None, expected_daemon=False) --- -2.18.0.rc2 - diff --git a/0002-test-make-Python-files-supported-_also_-with-Python-.patch b/0002-test-make-Python-files-supported-_also_-with-Python-.patch deleted file mode 100644 index f366aa8..0000000 --- a/0002-test-make-Python-files-supported-_also_-with-Python-.patch +++ /dev/null @@ -1,510 +0,0 @@ -From ab2229451827f530959d554920619d87daa34586 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Wed, 11 Jul 2018 16:18:25 +0200 -Subject: [PATCH] test: make Python files supported _also_ with Python 3.3+ -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- use "print" like a function rather than a statement - . where implicit newline is to be suppressed, don't do that - and rather strip it from the string to be printed instead -- use 2+3 compatible convention for parametrizing exceptions -- Python 3 doesn't recognize "basestring" class, and at the place - of use (pre Python 2.7 only), unicode string is really not expected - (also re.UNICODE flag is not used...) -- Python 3 doesn't recognize "xrange" function, but the surrounding - code can be reasonably simplified using "enumerate" function -- arrange dict treatment in a compatible way: - . d.has_key(k) -> k in d - . d.iteritems() -> custom "iter_items", always efficient wrapper - . d.iterkeys(), here incl. lazy mapping and filtering - -> rewrite while retaining laziness - . optimize UT.merge_dicts in script/unit-test.py along -- also in three instances, deal with string/uninterpreted bytes proper - dichotomy introduced in Python 3, and related to that, "string" - module only supports "ascii_lowercase" attribute in Python 3 - (as opposed to system-specific plain "lowercase" one) - -Note that script/unit-test.py has a pre-existing issue (regardless -of which Python version interpreter is used), so at least document -that in the header for now. - -Signed-off-by: Jan Pokorný ---- - script/unit-test.py | 65 ++++++++++++++++++++++++++------------------ - test/assertions.py | 4 +-- - test/boothrunner.py | 32 ++++++++++++---------- - test/boothtestenv.py | 6 ++-- - test/clienttests.py | 4 +-- - test/runtests.py | 2 +- - test/serverenv.py | 18 ++++++------ - test/servertests.py | 10 +++---- - test/utils.py | 10 +++++-- - 9 files changed, 84 insertions(+), 67 deletions(-) - -diff --git a/script/unit-test.py b/script/unit-test.py -index 6871930..399528e 100755 ---- a/script/unit-test.py -+++ b/script/unit-test.py -@@ -1,6 +1,8 @@ - #!/usr/bin/python - # vim: fileencoding=utf-8 - # see http://stackoverflow.com/questions/728891/correct-way-to-define-python-source-code-encoding -+# NOTE: setting the encoding is needed as non-ASCII characters are contained -+# FIXME: apparently, pexpect.EOF is not being excepted properly - - import os, sys, time, signal, tempfile, socket, posix, time - import re, shutil, pexpect, logging, pprint -@@ -16,6 +18,16 @@ default_log_format = '%(asctime)s: : %(message)s' - default_log_datefmt = '%b %d %H:%M:%S' - - -+# Compatibility with dictionary methods not present in Python 3; -+# https://www.python.org/dev/peps/pep-0469/#migrating-to-the-common-subset-of-python-2-and-3 -+try: -+ dict.iteritems -+except AttributeError: # Python 3 -+ iter_items = lambda d: iter(d.items()) -+else: # Python 2 -+ iter_items = lambda d: d.iteritems() -+ -+ - # {{{ pexpect-logging glue - # needed for use as pexpect.logfile, to relay into existing logfiles - class expect_logging(): -@@ -28,9 +40,12 @@ class expect_logging(): - - def flush(self, *arg): - pass -+ - def write(self, stg): - if self.test.dont_log_expect == 0: - # TODO: split by input/output, give program -+ if sys.version_info[0] >= 3: -+ stg = str(stg, 'UTF-8') - for line in re.split(r"[\r\n]+", stg): - if line == self.test.prompt: - continue -@@ -110,7 +125,7 @@ class UT(): - res = re.match(r"^\s*(\w+)\s*:(?:\s*(#.*?\S))?\s*$", line) - if res: - state = res.group(1) -- if not m.has_key(state): -+ if state not in m: - m[state] = dict_plus() - if res.group(2): - m[state].aux["comment"] = res.group(2) -@@ -188,17 +203,15 @@ class UT(): - name = re.sub(r".*/", "", bin) - # How to get stderr, too? - expct = pexpect.spawn(bin, -- env = dict( os.environ.items() + -- [('PATH', -- self.test_base + "/bin/:" + -- os.getenv('PATH')), -- ('UNIT_TEST_PATH', self.test_base), -- ('LC_ALL', 'C'), -- ('LANG', 'C')] + -- env_add ), -- timeout = 30, -- maxread = 32768, -- **args) -+ env=dict(os.environ, **dict({ -+ 'PATH': ':'.join((self.test_base + "/bin/", -+ os.getenv('PATH'))), -+ 'UNIT_TEST_PATH': self.test_base, -+ 'LC_ALL': 'C', -+ 'LANG': 'C'}, **dict(env_add))), -+ timeout=30, -+ maxread=32768, -+ **args) - expct.setecho(False) - expct.logfile_read = expect_logging("<- %s" % name, self) - expct.logfile_send = expect_logging(" -> %s" % name, self) -@@ -361,7 +374,7 @@ class UT(): - - self.current_nr = kv.aux.get("line") - #os.system("strace -f -tt -s 2000 -e write -p" + str(self.gdb.pid) + " &") -- for n, v in kv.iteritems(): -+ for n, v in iter_items(kv): - self.set_val( self.translate_shorthand(n, "ticket"), v) - logging.info("set state") - -@@ -372,7 +385,7 @@ class UT(): - if not sys.stdin.isatty(): - logging.error("Not a terminal, stopping.") - else: -- print "\n\nEntering interactive mode.\n\n" -+ print("\n\nEntering interactive mode.\n\n") - self.gdb.sendline("set prompt GDB> \n") - self.gdb.setecho(True) - # can't use send_cmd, doesn't reply with expected prompt anymore. -@@ -415,7 +428,7 @@ class UT(): - self.send_cmd("next") - - # push message. -- for (n, v) in msg.iteritems(): -+ for (n, v) in iter_items(msg): - self.set_val( self.translate_shorthand(n, "message"), v, "htonl") - - # set "received" length -@@ -426,7 +439,7 @@ class UT(): - def wait_outgoing(self, msg): - self.wait_for_function("booth_udp_send") - ok = True -- for (n, v) in msg.iteritems(): -+ for (n, v) in iter_items(msg): - if re.search(r"\.", n): - ok = self.check_value( self.translate_shorthand(n, "inject"), v) and ok - else: -@@ -438,14 +451,12 @@ class UT(): - #stopped_at = self.sync() - - def merge_dicts(self, base, overlay): -- return dict(base.items() + overlay.items()) -+ return dict(base, **overlay) - - - def loop(self, fn, data): -- matches = map(lambda k: re.match(r"^(outgoing|message)(\d+)$", k), data.iterkeys()) -- valid_matches = filter(None, matches) -- nums = map(lambda m: int(m.group(2)), valid_matches) -- loop_max = max(nums) -+ matches = (re.match(r"^(outgoing|message)(\d+)$", k) for k in data) -+ loop_max = max(int(m.group(2)) for m in matches if m) - for counter in range(0, loop_max+1): # incl. last message - - kmsg = 'message%d' % counter -@@ -471,14 +482,14 @@ class UT(): - logging.info("ticket change %s (%s:%d) %s" % (ktkt, fn, self.current_nr, comment)) - self.set_state(tkt) - if gdb: -- for (k, v) in gdb.iteritems(): -+ for (k, v) in iter_items(gdb): - self.send_cmd(k + " " + v.replace("§", "\n")) - if msg: - self.current_nr = msg.aux.get("line") - comment = msg.aux.get("comment", "") - logging.info("sending %s (%s:%d) %s" % (kmsg, fn, self.current_nr, comment)) - self.send_message(self.merge_dicts(data["message"], msg)) -- if data.has_key(kgdb) and len(gdb) == 0: -+ if kgdb in data and len(gdb) == 0: - self.user_debug("manual override") - if out: - self.current_nr = out.aux.get("line") -@@ -520,7 +531,7 @@ class UT(): - self.let_booth_go_a_bit() - - ok = True -- for (n, v) in data.iteritems(): -+ for (n, v) in iter_items(data): - ok = self.check_value( self.translate_shorthand(n, "ticket"), v) and ok - if not ok: - sys.exit(1) -@@ -529,8 +540,8 @@ class UT(): - def run(self, start_from="000", end_with="999"): - os.chdir(self.test_base) - # TODO: sorted, random order -- tests = filter( (lambda f: re.match(r"^\d\d\d_.*\.txt$", f)), glob.glob("*")) -- tests.sort() -+ tests = sorted(f for f in glob.glob("*") -+ if re.match(r"^\d\d\d_.*\.txt$", f)) - failed = 0 - for f in tests: - if f[0:3] < start_from: -@@ -561,7 +572,7 @@ class UT(): - except: - failed += 1 - logging.error(self.colored_string("Broke in %s:%s %s" % (f, self.current_nr, sys.exc_info()), self.RED)) -- for frame in traceback.format_tb(sys.exc_traceback): -+ for frame in traceback.format_tb(sys.exc_info()[2]): - logging.info(" - %s " % frame.rstrip()) - finally: - self.stop_processes() -diff --git a/test/assertions.py b/test/assertions.py -index 0b7f995..34333ca 100644 ---- a/test/assertions.py -+++ b/test/assertions.py -@@ -21,7 +21,7 @@ class BoothAssertions: - # backported from 2.7 just in case we're running on an older Python - def assertRegexpMatches(self, text, expected_regexp, msg=None): - """Fail the test unless the text matches the regular expression.""" -- if isinstance(expected_regexp, basestring): -+ if isinstance(expected_regexp, str): - expected_regexp = re.compile(expected_regexp) - if not expected_regexp.search(text, MULTILINE): - msg = msg or "Regexp didn't match" -@@ -30,7 +30,7 @@ class BoothAssertions: - - def assertNotRegexpMatches(self, text, unexpected_regexp, msg=None): - """Fail the test if the text matches the regular expression.""" -- if isinstance(unexpected_regexp, basestring): -+ if isinstance(unexpected_regexp, str): - unexpected_regexp = re.compile(unexpected_regexp) - match = unexpected_regexp.search(text) - if match: -diff --git a/test/boothrunner.py b/test/boothrunner.py -index d981183..347912b 100644 ---- a/test/boothrunner.py -+++ b/test/boothrunner.py -@@ -1,4 +1,5 @@ - import os -+import sys - import subprocess - import time - import unittest -@@ -37,14 +38,14 @@ class BoothRunner: - - def show_output(self, stdout, stderr): - if stdout: -- print "STDOUT:" -- print "------" -- print stdout, -+ print("STDOUT:") -+ print("------") -+ print(stdout.rstrip('\n')) - if stderr: -- print "STDERR: (N.B. crm_ticket failures indicate daemon started correctly)" -- print "------" -- print stderr, -- print "-" * 70 -+ print("STDERR: (N.B. crm_ticket failures indicate daemon started correctly)") -+ print("------") -+ print(stderr.rstrip('\n')) -+ print("-" * 70) - - def subproc_completed_within(self, p, timeout): - start = time.time() -@@ -55,7 +56,7 @@ class BoothRunner: - elapsed = time.time() - start - if elapsed + wait > timeout: - wait = timeout - elapsed -- print "Waiting on %d for %.1fs ..." % (p.pid, wait) -+ print("Waiting on %d for %.1fs ..." % (p.pid, wait)) - time.sleep(wait) - elapsed = time.time() - start - if elapsed >= timeout: -@@ -83,26 +84,29 @@ class BoothRunner: - return text - - def show_args(self): -- print "\n" -- print "-" * 70 -- print "Running", ' '.join(self.all_args()) -+ print("\n") -+ print("-" * 70) -+ print("Running", ' '.join(self.all_args())) - msg = "with config from %s" % self.config_file_used() - config_text = self.config_text_used() - if config_text is not None: - msg += ": [%s]" % config_text -- print msg -+ print(msg) - - def run(self): - p = subprocess.Popen(self.all_args(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if not p: -- raise RuntimeError, "failed to start subprocess" -+ raise RuntimeError("failed to start subprocess") - -- print "Started subprocess pid %d" % p.pid -+ print("Started subprocess pid %d" % p.pid) - - completed = self.subproc_completed_within(p, 2) - - if completed: - (stdout, stderr) = p.communicate() -+ if sys.version_info[0] >= 3: -+ # only expect ASCII/UTF-8 encodings for the obtained input bytes -+ stdout, stderr = str(stdout, 'UTF-8'), str(stderr, 'UTF-8') - self.show_output(stdout, stderr) - return (p.pid, p.returncode, stdout, stderr) - -diff --git a/test/boothtestenv.py b/test/boothtestenv.py -index fcd0c4d..59e25c3 100644 ---- a/test/boothtestenv.py -+++ b/test/boothtestenv.py -@@ -17,7 +17,7 @@ class BoothTestEnvironment(unittest.TestCase, BoothAssertions): - - def setUp(self): - if not self._testMethodName.startswith('test_'): -- raise RuntimeError, "unexpected test method name: " + self._testMethodName -+ raise RuntimeError("unexpected test method name: " + self._testMethodName) - self.test_name = self._testMethodName[5:] - self.test_path = os.path.join(self.test_run_path, self.test_name) - os.makedirs(self.test_path) -@@ -54,11 +54,11 @@ class BoothTestEnvironment(unittest.TestCase, BoothAssertions): - - def check_return_code(self, pid, return_code, expected_exitcode): - if return_code is None: -- print "pid %d still running" % pid -+ print("pid %d still running" % pid) - if expected_exitcode is not None: - self.fail("expected exit code %d, not long-running process" % expected_exitcode) - else: -- print "pid %d exited with code %d" % (pid, return_code) -+ print("pid %d exited with code %d" % (pid, return_code)) - if expected_exitcode is None: - msg = "should not exit" - else: -diff --git a/test/clienttests.py b/test/clienttests.py -index c4b9d8a..512620e 100644 ---- a/test/clienttests.py -+++ b/test/clienttests.py -@@ -7,14 +7,14 @@ class ClientConfigTests(ClientTestEnvironment): - - def test_site_buffer_overflow(self): - # https://bugzilla.novell.com/show_bug.cgi?id=750256 -- longfile = (string.lowercase * 3)[:63] -+ longfile = (string.ascii_lowercase * 3)[:63] - expected_error = "'%s' exceeds maximum site name length" % longfile - args = [ 'grant', '-s', longfile, '-t', 'ticket' ] - self._test_buffer_overflow(expected_error, args=args) - - def test_ticket_buffer_overflow(self): - # https://bugzilla.novell.com/show_bug.cgi?id=750256 -- longfile = (string.lowercase * 3)[:63] -+ longfile = (string.ascii_lowercase * 3)[:63] - expected_error = "'%s' exceeds maximum ticket name length" % longfile - args = [ 'grant', '-s', 'site', '-t', longfile ] - self._test_buffer_overflow(expected_error, args=args) -diff --git a/test/runtests.py b/test/runtests.py -index 0532c01..833b1a7 100755 ---- a/test/runtests.py -+++ b/test/runtests.py -@@ -53,5 +53,5 @@ if __name__ == '__main__': - shutil.rmtree(test_run_path) - sys.exit(0) - else: -- print "Left %s for debugging" % test_run_path -+ print("Left %s for debugging" % test_run_path) - sys.exit(1) -diff --git a/test/serverenv.py b/test/serverenv.py -index c6d4e30..5d6c6c4 100644 ---- a/test/serverenv.py -+++ b/test/serverenv.py -@@ -73,12 +73,10 @@ ticket="ticketB" - where return_code/stdout/stderr are None iff pid is still running. - ''' - if expected_daemon and expected_exitcode is not None and expected_exitcode != 0: -- raise RuntimeError, \ -- "Shouldn't ever expect daemon to start and then failure" -+ raise RuntimeError("Shouldn't ever expect daemon to start and then failure") - - if not expected_daemon and expected_exitcode == 0: -- raise RuntimeError, \ -- "Shouldn't ever expect success without starting daemon" -+ raise RuntimeError("Shouldn't ever expect success without starting daemon") - - self.init_log() - -@@ -122,9 +120,9 @@ ticket="ticketB" - return config_file - - def kill_pid(self, pid): -- print "killing %d ..." % pid -+ print("killing %d ..." % pid) - os.kill(pid, 15) -- print "killed" -+ print("killed") - - def check_daemon_handling(self, runner, expected_daemon): - ''' -@@ -154,7 +152,7 @@ ticket="ticketB" - Returns the pid contained in lock_file, or None if it doesn't exist. - ''' - if not os.path.exists(lock_file): -- print "%s does not exist" % lock_file -+ print("%s does not exist" % lock_file) - return None - - l = open(lock_file) -@@ -162,7 +160,7 @@ ticket="ticketB" - l.close() - self.assertEqual(len(lines), 1, "Lock file should contain one line") - pid = re.search('\\bbooth_pid="?(\\d+)"?', lines[0]).group(1) -- print "lockfile contains: <%s>" % pid -+ print("lockfile contains: <%s>" % pid) - return pid - - def is_pid_running_daemon(self, pid): -@@ -185,11 +183,11 @@ ticket="ticketB" - - c = open("/proc/%s/cmdline" % pid) - cmdline = "".join(c.readlines()) -- print cmdline -+ print(cmdline) - c.close() - - if cmdline.find('boothd') == -1: -- print 'no boothd in cmdline:', cmdline -+ print('no boothd in cmdline:', cmdline) - return False - - # self.assertRegexpMatches( -diff --git a/test/servertests.py b/test/servertests.py -index 71e808e..288d19f 100644 ---- a/test/servertests.py -+++ b/test/servertests.py -@@ -35,13 +35,13 @@ class ServerTests(ServerTestEnvironment): - - def test_config_file_buffer_overflow(self): - # https://bugzilla.novell.com/show_bug.cgi?id=750256 -- longfile = (string.lowercase * 5)[:127] -+ longfile = (string.ascii_lowercase * 5)[:127] - expected_error = "'%s' exceeds maximum config name length" % longfile - self._test_buffer_overflow(expected_error, config_file=longfile) - - def test_lock_file_buffer_overflow(self): - # https://bugzilla.novell.com/show_bug.cgi?id=750256 -- longfile = (string.lowercase * 5)[:127] -+ longfile = (string.ascii_lowercase * 5)[:127] - expected_error = "'%s' exceeds maximum lock file length" % longfile - self._test_buffer_overflow(expected_error, lock_file=longfile) - -@@ -54,12 +54,12 @@ class ServerTests(ServerTestEnvironment): - # quotes no longer required - return True - orig_lines = self.working_config.split("\n") -- for i in xrange(len(orig_lines)): -+ for (i, line) in enumerate(orig_lines): - new_lines = copy.copy(orig_lines) -- new_lines[i] = new_lines[i].replace('"', '') -+ new_lines[i] = line.replace('"', '') - new_config = "\n".join(new_lines) - -- line_contains_IP = re.search('^\s*(site|arbitrator)=.*[0-9]\.', orig_lines[i]) -+ line_contains_IP = re.search('^\s*(site|arbitrator)=.*[0-9]\.', line) - if line_contains_IP: - # IP addresses need to be surrounded by quotes, - # so stripping them should cause it to fail -diff --git a/test/utils.py b/test/utils.py -index 5b70cfc..aca3592 100644 ---- a/test/utils.py -+++ b/test/utils.py -@@ -1,5 +1,6 @@ - import subprocess - import re -+import sys - - def run_cmd(cmd): - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -@@ -9,8 +10,11 @@ def run_cmd(cmd): - def get_IP(): - (stdout, stderr, returncode) = run_cmd(['hostname', '-i']) - if returncode != 0: -- raise RuntimeError, "Failed to run hostname -i:\n" + stderr -+ raise RuntimeError("Failed to run hostname -i:\n" + stderr) - # in case multiple IP addresses are returned, use only the first -- # and also strip '%' part possibly present with IPv6 address -- ret = re.sub(r'\s.*', '', stdout) -+ # and also strip '%' part possibly present with IPv6 address; -+ # in Python 3 context, only expect ASCII/UTF-8 encodings for the -+ # obtained input bytes -+ ret = re.sub(r'\s.*', '', -+ stdout if sys.version_info[0] < 3 else str(stdout, 'UTF-8')) - return "::1" if '%' in ret else ret --- -2.18.0.rc2 - diff --git a/0003-build-parametrize-Python-invocations-in-the-shebangs.patch b/0003-build-parametrize-Python-invocations-in-the-shebangs.patch deleted file mode 100644 index a3ce25f..0000000 --- a/0003-build-parametrize-Python-invocations-in-the-shebangs.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 31133e8ac07c08b607ee7799c0074c1dce37a952 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Wed, 11 Jul 2018 14:18:50 +0200 -Subject: [PATCH] build: parametrize Python invocations in the shebangs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Consequently, there's no reason to have the affected files marked as -executable (processing the files by the means of AC_CONFIG_FILES will -get rid of any such permission bits, anyway), but at the very least, -test/runtests.py needs to be set executable afterwards so as no to -cause failures with the current "make check" arrangement that invokes -TESTS subtargets directly (i.e. no extension-based LOG_COMPILER set). - -Signed-off-by: Jan Pokorný ---- - configure.ac | 12 +++++++++++- - script/{unit-test.py => unit-test.py.in} | 2 +- - test/{runtests.py => runtests.py.in} | 2 +- - 3 files changed, 13 insertions(+), 3 deletions(-) - rename script/{unit-test.py => unit-test.py.in} (99%) - mode change 100755 => 100644 - rename test/{runtests.py => runtests.py.in} (98%) - mode change 100755 => 100644 - -diff --git a/configure.ac b/configure.ac -index 3bf41b3..a6ad86e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -97,6 +97,14 @@ CPPFLAGS="$CPPFLAGS $XML2HEAD" - - PKG_CHECK_MODULES(GLIB, [glib-2.0]) - -+# Python casing, prefer 3.3+ to 2.{6...} -+AM_PATH_PYTHON([3.3], , [PYTHON=:]) -+if test "x$PYTHON" = x:; then -+ AM_PATH_PYTHON([2.6]) -+fi -+PYTHON_SHEBANG="$PYTHON ${PYTHON_OPTS--Es}" -+AC_ARG_VAR([PYTHON_SHEBANG], [Python invocation used in shebangs]) -+ - # Checks for header files. - AC_FUNC_ALLOCA - AC_HEADER_DIRENT -@@ -157,7 +165,9 @@ AC_CONFIG_FILES([Makefile - docs/Makefile - conf/Makefile]) - AC_CONFIG_FILES([conf/booth-arbitrator.service conf/booth@.service]) -- -+AC_CONFIG_FILES([script/unit-test.py test/runtests.py], -+ dnl Following required at least for "make check" -+ [chmod +x test/runtests.py]) - AC_CONFIG_FILES([script/service-runnable], [chmod +x script/service-runnable]) - - # =============================================== -diff --git a/script/unit-test.py b/script/unit-test.py.in -old mode 100755 -new mode 100644 -similarity index 99% -rename from script/unit-test.py -rename to script/unit-test.py.in -index 399528e..4f3cf62 ---- a/script/unit-test.py -+++ b/script/unit-test.py.in -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!@PYTHON_SHEBANG@ - # vim: fileencoding=utf-8 - # see http://stackoverflow.com/questions/728891/correct-way-to-define-python-source-code-encoding - # NOTE: setting the encoding is needed as non-ASCII characters are contained -diff --git a/test/runtests.py b/test/runtests.py.in -old mode 100755 -new mode 100644 -similarity index 98% -rename from test/runtests.py -rename to test/runtests.py.in -index 833b1a7..ec59159 ---- a/test/runtests.py -+++ b/test/runtests.py.in -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!@PYTHON_SHEBANG@ - - import os - import re --- -2.18.0.rc2 - diff --git a/0004-test-drop-underqualified-identifier-in-unittest-s-2..patch b/0004-test-drop-underqualified-identifier-in-unittest-s-2..patch deleted file mode 100644 index b337059..0000000 --- a/0004-test-drop-underqualified-identifier-in-unittest-s-2..patch +++ /dev/null @@ -1,36 +0,0 @@ -From 541e6184fca60a01ff7e8c1bba794c083ac4245f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Tue, 10 Jul 2018 19:25:34 +0200 -Subject: [PATCH] test: drop underqualified identifier in unittest's 2.6 compat - "polyfill" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Specifically, in supplemented unittest.TestCase.assertRegexpMatches -method. In Python 2.7's implementation, there's no re.MULTILINE -modifier at that very place, either. - -Not sure what the original purpose of introducing that with c1c47f5 was. - -Signed-off-by: Jan Pokorný ---- - test/assertions.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/assertions.py b/test/assertions.py -index 34333ca..fafb291 100644 ---- a/test/assertions.py -+++ b/test/assertions.py -@@ -23,7 +23,7 @@ class BoothAssertions: - """Fail the test unless the text matches the regular expression.""" - if isinstance(expected_regexp, str): - expected_regexp = re.compile(expected_regexp) -- if not expected_regexp.search(text, MULTILINE): -+ if not expected_regexp.search(text): - msg = msg or "Regexp didn't match" - msg = '%s: %r not found in %r' % (msg, expected_regexp.pattern, text) - raise self.failureException(msg) --- -2.18.0.rc2 - diff --git a/0005-test-drop-comment-out-superfluous-imports.patch b/0005-test-drop-comment-out-superfluous-imports.patch deleted file mode 100644 index 45adf33..0000000 --- a/0005-test-drop-comment-out-superfluous-imports.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 6a6834a8110d9e6aff50cd6d6935976af4cbdb8f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Thu, 12 Jul 2018 20:18:07 +0200 -Subject: [PATCH] test: drop/comment out superfluous imports -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jan Pokorný ---- - test/boothrunner.py | 2 -- - test/boothtestenv.py | 1 - - test/runtests.py.in | 3 +-- - test/serverenv.py | 2 -- - test/servertests.py | 1 - - 5 files changed, 1 insertion(+), 8 deletions(-) - -diff --git a/test/boothrunner.py b/test/boothrunner.py -index 347912b..31c2213 100644 ---- a/test/boothrunner.py -+++ b/test/boothrunner.py -@@ -1,8 +1,6 @@ --import os - import sys - import subprocess - import time --import unittest - - class BoothRunner: - default_config_file = '/etc/booth/booth.conf' -diff --git a/test/boothtestenv.py b/test/boothtestenv.py -index 59e25c3..ba54360 100644 ---- a/test/boothtestenv.py -+++ b/test/boothtestenv.py -@@ -5,7 +5,6 @@ import tempfile - import unittest - - from assertions import BoothAssertions --from boothrunner import BoothRunner - - class BoothTestEnvironment(unittest.TestCase, BoothAssertions): - test_src_path = os.path.abspath(os.path.dirname(__file__)) -diff --git a/test/runtests.py.in b/test/runtests.py.in -index ec59159..73d70a3 100644 ---- a/test/runtests.py.in -+++ b/test/runtests.py.in -@@ -1,7 +1,6 @@ - #!@PYTHON_SHEBANG@ - - import os --import re - import shutil - import sys - import tempfile -@@ -10,7 +9,7 @@ import unittest - - from clienttests import ClientConfigTests - from sitetests import SiteConfigTests --from arbtests import ArbitratorConfigTests -+#from arbtests import ArbitratorConfigTests - - if __name__ == '__main__': - if os.geteuid() == 0: -diff --git a/test/serverenv.py b/test/serverenv.py -index 5d6c6c4..7b8915d 100644 ---- a/test/serverenv.py -+++ b/test/serverenv.py -@@ -1,9 +1,7 @@ - import os - import re - import time --import unittest - --from assertions import BoothAssertions - from boothrunner import BoothRunner - from boothtestenv import BoothTestEnvironment - from utils import get_IP -diff --git a/test/servertests.py b/test/servertests.py -index 288d19f..f72dbed 100644 ---- a/test/servertests.py -+++ b/test/servertests.py -@@ -1,5 +1,4 @@ - import copy --from pprint import pprint, pformat - import re - import string - --- -2.18.0.rc2 - diff --git a/0006-test-avoid-dangerous-mutable-sticky-default-value.patch b/0006-test-avoid-dangerous-mutable-sticky-default-value.patch deleted file mode 100644 index 88ba09c..0000000 --- a/0006-test-avoid-dangerous-mutable-sticky-default-value.patch +++ /dev/null @@ -1,178 +0,0 @@ -From 34cc2fcda6804d42ee66fa5a417fc42b64fe3806 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Tue, 10 Jul 2018 19:45:56 +0200 -Subject: [PATCH] test: avoid dangerous mutable/sticky default value -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Incl. slight refactoring towards more frequent use of tuples where -advantage of lists are dubious. - -Signed-off-by: Jan Pokorný ---- - script/unit-test.py.in | 34 ++++++++++++++++------------------ - test/assertions.py | 2 +- - test/boothrunner.py | 14 +++++++------- - test/clientenv.py | 4 ++-- - test/serverenv.py | 4 ++-- - 5 files changed, 28 insertions(+), 30 deletions(-) - -diff --git a/script/unit-test.py.in b/script/unit-test.py.in -index 4f3cf62..fc98bc1 100644 ---- a/script/unit-test.py.in -+++ b/script/unit-test.py.in -@@ -199,7 +199,7 @@ class UT(): - self.booth.close( force=self.booth.isalive() ) - - -- def start_a_process(self, bin, env_add=[], **args): -+ def start_a_process(self, bin, env_add=(), **args): - name = re.sub(r".*/", "", bin) - # How to get stderr, too? - expct = pexpect.spawn(bin, -@@ -220,16 +220,15 @@ class UT(): - - def start_processes(self, test): - self.booth = self.start_a_process(self.binary, -- args = [ "daemon", "-D", -- "-c", self.test_base + "/booth.conf", -- "-s", "127.0.0.1", -- "-l", self.lockfile, -- ], -- env_add=[ ('UNIT_TEST', test), -+ args = ["daemon", "-D", -+ "-c", self.test_base + "/booth.conf", -+ "-s", "127.0.0.1", -+ "-l", self.lockfile], -+ env_add=( ('UNIT_TEST', test), - ('UNIT_TEST_FILE', os.path.realpath(test)), - # provide some space, so that strcpy(getenv()) works - ('UNIT_TEST_AUX', "".zfill(1024)), -- ]); -+ )); - - logging.info("started booth with PID %d, lockfile %s" % (self.booth.pid, self.lockfile)) - self.booth.expect("BOOTH site \S+ \(build \S+\) daemon is starting", timeout=2) -@@ -237,16 +236,15 @@ class UT(): - - self.gdb = self.start_a_process("gdb", - args=["-quiet", -- "-p", str(self.booth.pid), -- # Don't use .gdbinit -- "-nx", "-nh", -- # Run until the defined point. -- # This is necessary so that ticket state setting doesn't -- # happen _before_ the call to pcmk_load_ticket() -- # (which would overwrite our data) -- "-ex", "break ticket_cron", -- "-ex", "continue", -- ]) -+ "-p", str(self.booth.pid), -+ # Don't use .gdbinit -+ "-nx", "-nh", -+ # Run until the defined point. -+ # This is necessary so that ticket state setting doesn't -+ # happen _before_ the call to pcmk_load_ticket() -+ # (which would overwrite our data) -+ "-ex", "break ticket_cron", -+ "-ex", "continue"]) - logging.info("started GDB with PID %d" % self.gdb.pid) - self.gdb.expect("(gdb)") - self.gdb.sendline("set pagination off\n") -diff --git a/test/assertions.py b/test/assertions.py -index fafb291..db6fcd8 100644 ---- a/test/assertions.py -+++ b/test/assertions.py -@@ -10,7 +10,7 @@ class BoothAssertions: - self.assertRegexpMatches(stderr, expected_error) - - def assertLockFileError(self, config_file=None, config_text=None, -- lock_file=True, args=[]): -+ lock_file=True, args=()): - (pid, ret, stdout, stderr, runner) = \ - self.run_booth(config_text=config_text, config_file=config_file, - lock_file=lock_file, args=args, expected_exitcode=1) -diff --git a/test/boothrunner.py b/test/boothrunner.py -index 31c2213..0285fe6 100644 ---- a/test/boothrunner.py -+++ b/test/boothrunner.py -@@ -8,14 +8,14 @@ class BoothRunner: - - def __init__(self, boothd_path, mode, args): - self.boothd_path = boothd_path -- self.args = [ mode ] -- self.final_args = args # will be appended to self.args -+ self.args = (mode, ) -+ self.final_args = tuple(args) # will be appended to self.args - self.mode = mode - self.config_file = None - self.lock_file = None - - def set_config_file_arg(self): -- self.args += [ '-c', self.config_file ] -+ self.args += ('-c', self.config_file) - - def set_config_file(self, config_file): - self.config_file = config_file -@@ -23,16 +23,16 @@ class BoothRunner: - - def set_lock_file(self, lock_file): - self.lock_file = lock_file -- self.args += [ '-l', self.lock_file ] -+ self.args += ('-l', self.lock_file) - - def set_debug(self): -- self.args += [ '-D' ] -+ self.args += ('-D', ) - - def set_foreground(self): -- self.args += [ '-S' ] -+ self.args += ('-S', ) - - def all_args(self): -- return [ self.boothd_path ] + self.args + self.final_args -+ return (self.boothd_path, ) + self.args + self.final_args - - def show_output(self, stdout, stderr): - if stdout: -diff --git a/test/clientenv.py b/test/clientenv.py -index 73b2791..141e33c 100644 ---- a/test/clientenv.py -+++ b/test/clientenv.py -@@ -4,8 +4,8 @@ from boothrunner import BoothRunner - class ClientTestEnvironment(BoothTestEnvironment): - mode = 'client' - -- def run_booth(self, config_text=None, config_file=None, lock_file=True, args=[], -- expected_exitcode=0, debug=False): -+ def run_booth(self, config_text=None, config_file=None, lock_file=True, -+ args=(), expected_exitcode=0, debug=False): - ''' - Runs boothd. - -diff --git a/test/serverenv.py b/test/serverenv.py -index 7b8915d..62c37d0 100644 ---- a/test/serverenv.py -+++ b/test/serverenv.py -@@ -29,7 +29,7 @@ ticket="ticketB" - - def run_booth(self, expected_exitcode, expected_daemon, - config_text=None, config_file=None, lock_file=True, -- args=[], debug=False, foreground=False): -+ args=(), debug=False, foreground=False): - ''' - Runs boothd. Defaults to using a temporary lock file and the - standard config file path. There are four possible types of -@@ -52,7 +52,7 @@ ticket="ticketB" - True: pass a temporary lockfile parameter to booth via -l - string: pass the given lockfile path to booth via -l - args -- array of extra args to pass to booth -+ iterable of extra args to pass to booth - expected_exitcode - an integer, or False if booth is not expected to terminate - within the timeout --- -2.18.0.rc2 - diff --git a/0007-test-unit-test.py-daemon-will-not-stay-in-foreground.patch b/0007-test-unit-test.py-daemon-will-not-stay-in-foreground.patch deleted file mode 100644 index 83058df..0000000 --- a/0007-test-unit-test.py-daemon-will-not-stay-in-foreground.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0a7b51d1eb6f948724c08e94148e8ff1f448d100 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Fri, 13 Jul 2018 14:10:28 +0200 -Subject: [PATCH] test: unit-test.py: daemon will not stay in foreground with - -D anymore -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit a66ac33 missed this impact (it may have missed impact on -test/boothrunner.py but it appears to be fine either way). - -Signed-off-by: Jan Pokorný ---- - script/unit-test.py.in | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/script/unit-test.py.in b/script/unit-test.py.in -index fc98bc1..74a014b 100644 ---- a/script/unit-test.py.in -+++ b/script/unit-test.py.in -@@ -2,7 +2,6 @@ - # vim: fileencoding=utf-8 - # see http://stackoverflow.com/questions/728891/correct-way-to-define-python-source-code-encoding - # NOTE: setting the encoding is needed as non-ASCII characters are contained --# FIXME: apparently, pexpect.EOF is not being excepted properly - - import os, sys, time, signal, tempfile, socket, posix, time - import re, shutil, pexpect, logging, pprint -@@ -220,7 +219,7 @@ class UT(): - - def start_processes(self, test): - self.booth = self.start_a_process(self.binary, -- args = ["daemon", "-D", -+ args = ["daemon", "-DS", - "-c", self.test_base + "/booth.conf", - "-s", "127.0.0.1", - "-l", self.lockfile], --- -2.18.0.rc2 - diff --git a/0008-Refactor-fix-strncpy-may-miss-trailing-null-byte-war.patch b/0008-Refactor-fix-strncpy-may-miss-trailing-null-byte-war.patch deleted file mode 100644 index bbb56f1..0000000 --- a/0008-Refactor-fix-strncpy-may-miss-trailing-null-byte-war.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d3bf9f5ced41ad0f4e8ae87e80c7e44df4157b61 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= -Date: Fri, 13 Jul 2018 14:40:07 +0200 -Subject: [PATCH] Refactor: fix "strncpy may miss trailing null byte" warnings - of GCC 8.1 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Verbatim warning: -> ‘strncpy’ specified bound 64 equals destination size [-Wstringop-truncation] - -Signed-off-by: Jan Pokorný ---- - src/config.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/src/config.c b/src/config.c -index 9df5767..e4d36ab 100644 ---- a/src/config.c -+++ b/src/config.c -@@ -75,7 +75,10 @@ static void hostname_to_ip(char * hostname) - - /* Return the first found address */ - if (addr_list[0] != NULL) { -- strncpy(hostname, inet_ntoa(*addr_list[0]), BOOTH_NAME_LEN); -+ strncpy(hostname, inet_ntoa(*addr_list[0]), BOOTH_NAME_LEN - 1); -+ /* buffer overflow will not happen (IPv6 notation < 63 chars), -+ but suppress the warnings */ -+ hostname[BOOTH_NAME_LEN - 1] = '\0'; - } - else { - log_error("no IP addresses found for the host \"%s\"", hostname); -@@ -106,7 +109,12 @@ static int add_site(char *addr_string, int type) - site->family = AF_INET; - site->type = type; - -- strncpy(site->addr_string, addr_string, sizeof(site->addr_string)); -+ /* buffer overflow will not hapen (we've already checked that -+ addr_string will fit incl. terminating '\0' above), but -+ suppress the warnings with copying everything but the boundary -+ byte, which is valid as-is, since this last byte will be safely -+ pre-zeroed from the struct booth_config initialization */ -+ strncpy(site->addr_string, addr_string, sizeof(site->addr_string) - 1); - - if (!(inet_pton(AF_INET, site->addr_string, &site->sa4.sin_addr) > 0) && - !(inet_pton(AF_INET6, site->addr_string, &site->sa6.sin6_addr) > 0)) { --- -2.18.0.rc2 - diff --git a/booth.spec b/booth.spec index 927c3be..405d229 100644 --- a/booth.spec +++ b/booth.spec @@ -25,11 +25,11 @@ # Disable automatic compilation of Python files in extra directories %global _python_bytecompile_extra 0 -%global specver 3 +%global specver 4 %global boothver 1.0 # set following to the actual commit or, for final release, concatenate # "boothver" macro to "v" (will yield a tag per the convention) -%global commit f2d38ce3d61502bda2a28e79db103737a691faf4 +%global commit 5d837d2b5bf1c240a5f1c5efe4e8d79f55727cca %global lparen ( %global rparen ) %global shortcommit %(c=%{commit}; case ${c} in @@ -57,20 +57,11 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{dist}.3 +Release: %{boothrel}%{dist} Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz -Patch0: 0000-test-remove-superfluous-shebangs-for-import-only-mod.patch -Patch1: 0001-test-do-not-mix-tabs-with-spaces-in-Python-code.patch -Patch2: 0002-test-make-Python-files-supported-_also_-with-Python-.patch -Patch3: 0003-build-parametrize-Python-invocations-in-the-shebangs.patch -Patch4: 0004-test-drop-underqualified-identifier-in-unittest-s-2..patch -Patch5: 0005-test-drop-comment-out-superfluous-imports.patch -Patch6: 0006-test-avoid-dangerous-mutable-sticky-default-value.patch -Patch7: 0007-test-unit-test.py-daemon-will-not-stay-in-foreground.patch -Patch8: 0008-Refactor-fix-strncpy-may-miss-trailing-null-byte-war.patch # direct build process dependencies BuildRequires: autoconf @@ -198,7 +189,8 @@ Automated tests for running Booth, ticket manager for multi-site clusters. --docdir=%{_pkgdocdir} \ --enable-user-flags \ %{!?with_html_man:--without-html_man} \ - %{!?with_glue:--without-glue} + %{!?with_glue:--without-glue} \ + PYTHON=%{__python3} %{make_build} %install @@ -273,6 +265,10 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Mon May 4 2020 Jan Friesse - 1.0-4.5d837d2.git +- Update to current snapshot (commit 5d837d2) to build with gcc10 +- Pass full path of Python3 to configure + * Tue Jan 28 2020 Fedora Release Engineering - 1.0-3.f2d38ce.git.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index f02d51a..5ca0e1e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-f2d38ce.tar.gz) = fb172b06640959e3f33953516fa7609a09a1b16467f1dee20cbd831e07597548f74fa1d6d162cbe2cdcbb8e4b15144beeae71a4d7528f259a995f4170bbc6be6 +SHA512 (booth-5d837d2.tar.gz) = 3118dd43796415c603ad200247c7905ccb3bcb71cc705848f0762f3dfeb5dcb7d3b1a935d2cee70da81328f0555d7b776eda7587c4c755fc570496a7a1dd8c49 From fb556c256485a3cfea3afe1adfc116297a0f08c6 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 4 May 2020 11:32:56 +0200 Subject: [PATCH 06/57] Add ?dist macro to release field Signed-off-by: Jan Friesse --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 405d229..69bd25e 100644 --- a/booth.spec +++ b/booth.spec @@ -57,7 +57,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{dist} +Release: %{boothrel}%{?dist}.1 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -265,6 +265,9 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Mon May 4 2020 Jan Friesse - 1.0-4.5d837d2.git.1 +- Add '?dist' macro to release field + * Mon May 4 2020 Jan Friesse - 1.0-4.5d837d2.git - Update to current snapshot (commit 5d837d2) to build with gcc10 - Pass full path of Python3 to configure From 6754bd09f1466d3deb83955476256389939a115b Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Wed, 13 May 2020 11:07:04 +0200 Subject: [PATCH 07/57] Rebuild for the new libqb Signed-off-by: Jan Friesse --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 69bd25e..fe7b259 100644 --- a/booth.spec +++ b/booth.spec @@ -57,7 +57,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.1 +Release: %{boothrel}%{?dist}.2 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -265,6 +265,9 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed May 13 2020 Jan Friesse - 1.0-4.5d837d2.git.2 +- Rebuild for the new libqb + * Mon May 4 2020 Jan Friesse - 1.0-4.5d837d2.git.1 - Add '?dist' macro to release field From 1c033bd3f0794bdbf480b73fc5060d8b8cb9e590 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Wed, 27 May 2020 18:56:27 +0200 Subject: [PATCH 08/57] New upstream release - Update to current snapshot (commit 385cc25) to fix build warnings Signed-off-by: Jan Friesse --- booth.spec | 11 ++++++++--- sources | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/booth.spec b/booth.spec index fe7b259..ffa2d54 100644 --- a/booth.spec +++ b/booth.spec @@ -25,11 +25,11 @@ # Disable automatic compilation of Python files in extra directories %global _python_bytecompile_extra 0 -%global specver 4 +%global specver 5 %global boothver 1.0 # set following to the actual commit or, for final release, concatenate # "boothver" macro to "v" (will yield a tag per the convention) -%global commit 5d837d2b5bf1c240a5f1c5efe4e8d79f55727cca +%global commit 385cc25a37694934848a8a7647471c82fcdad317 %global lparen ( %global rparen ) %global shortcommit %(c=%{commit}; case ${c} in @@ -57,7 +57,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.2 +Release: %{boothrel}%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -192,6 +192,8 @@ Automated tests for running Booth, ticket manager for multi-site clusters. %{!?with_glue:--without-glue} \ PYTHON=%{__python3} %{make_build} +# Build testsuite files +%{make_build} test/runtests.py %install %{make_install} @@ -265,6 +267,9 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed May 27 2020 Jan Friesse - 1.0-5.385cc25.git +- Update to current snapshot (commit 385cc25) to fix build warnings + * Wed May 13 2020 Jan Friesse - 1.0-4.5d837d2.git.2 - Rebuild for the new libqb diff --git a/sources b/sources index 5ca0e1e..3e18b8d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-5d837d2.tar.gz) = 3118dd43796415c603ad200247c7905ccb3bcb71cc705848f0762f3dfeb5dcb7d3b1a935d2cee70da81328f0555d7b776eda7587c4c755fc570496a7a1dd8c49 +SHA512 (booth-385cc25.tar.gz) = a8005eab1b12a5ab77284df3a1b7d7cdf2014f41640925133d1d7e63c4c88e9c09f778d54a1880ba0ede470121f87ccb5293e9e063854d79eb7d152421509227 From c6749637d0a832b4ea43ce21726ed03efc98ab0a Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 28 May 2020 14:02:32 +0200 Subject: [PATCH 09/57] Fix test subpackage generating Signed-off-by: Jan Friesse --- booth.spec | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/booth.spec b/booth.spec index ffa2d54..f5e16f6 100644 --- a/booth.spec +++ b/booth.spec @@ -57,7 +57,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist} +Release: %{boothrel}%{?dist}.1 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -90,6 +90,8 @@ BuildRequires: pkgconfig(libsystemd) # check scriptlet (for hostname and killall respectively) BuildRequires: hostname psmisc BuildRequires: python3-devel +# For generating tests +BuildRequires: sed # spec file specifics ## for _unitdir, systemd_requires and specific scriptlet macros BuildRequires: systemd @@ -192,8 +194,6 @@ Automated tests for running Booth, ticket manager for multi-site clusters. %{!?with_glue:--without-glue} \ PYTHON=%{__python3} %{make_build} -# Build testsuite files -%{make_build} test/runtests.py %install %{make_install} @@ -211,6 +211,7 @@ rm -rf %{buildroot}/%{_pkgdocdir}/README.upgrade-from-v0.1 rm -rf %{buildroot}/%{_pkgdocdir}/COPYING # tests mkdir -p %{buildroot}/%{test_path} +# Copy tests from tarball cp -a -t %{buildroot}/%{test_path} \ -- conf test unit-tests script/unit-test.py chmod +x %{buildroot}/%{test_path}/test/booth_path @@ -218,6 +219,18 @@ chmod +x %{buildroot}/%{test_path}/test/live_test.sh mkdir -p %{buildroot}/%{test_path}/src ln -s -t %{buildroot}/%{test_path}/src \ -- %{_sbindir}/boothd +# Generate runtests.py and boothtestenv.py +sed -e 's#PYTHON_SHEBANG#%{__python3}#g' \ + -e 's#TEST_SRC_DIR#%{test_path}/test#g' \ + -e 's#TEST_BUILD_DIR#%{test_path}/test#g' \ + %{buildroot}/%{test_path}/test/runtests.py.in > %{buildroot}/%{test_path}/test/runtests.py + +chmod +x %{buildroot}/%{test_path}/test/runtests.py + +sed -e 's#PYTHON_SHEBANG#%{__python3}#g' \ + -e 's#TEST_SRC_DIR#%{test_path}/test#g' \ + -e 's#TEST_BUILD_DIR#%{test_path}/test#g' \ + %{buildroot}/%{test_path}/test/boothtestenv.py.in > %{buildroot}/%{test_path}/test/boothtestenv.py # https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation %py_byte_compile %{__python3} %{buildroot}/%{test_path} @@ -267,6 +280,9 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu May 28 2020 Jan Friesse - 1.0-5.385cc25.git.1 +- Fix test subpackage generating + * Wed May 27 2020 Jan Friesse - 1.0-5.385cc25.git - Update to current snapshot (commit 385cc25) to fix build warnings From af206bf1990595be9dd9e4fec9b96b6c3db6e780 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 1 Jun 2020 15:05:28 +0200 Subject: [PATCH 10/57] Package /var/lib/booth where booth can chroot Signed-off-by: Jan Friesse --- booth.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index f5e16f6..ac660b8 100644 --- a/booth.spec +++ b/booth.spec @@ -22,6 +22,10 @@ %bcond_with html_man %bcond_with glue +## User and group to use for nonprivileged services (should be in sync with pacemaker) +%global uname hacluster +%global gname haclient + # Disable automatic compilation of Python files in extra directories %global _python_bytecompile_extra 0 @@ -57,7 +61,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.1 +Release: %{boothrel}%{?dist}.2 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -252,6 +256,9 @@ VERBOSE=1 make check %dir %{_sysconfdir}/booth %exclude %{_sysconfdir}/booth/booth.conf.example +%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/booth/ +%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/booth/cores + %files arbitrator %{_unitdir}/booth@.service %{_unitdir}/booth-arbitrator.service @@ -280,6 +287,9 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Mon Jun 1 2020 Jan Friesse - 1.0-5.385cc25.git.2 +- Package /var/lib/booth where booth can chroot + * Thu May 28 2020 Jan Friesse - 1.0-5.385cc25.git.1 - Fix test subpackage generating From de6dfc59840a097a4dbc15d914ed2f414706c41b Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 1 Jun 2020 17:37:10 +0200 Subject: [PATCH 11/57] Add rpmlint error whitelist Signed-off-by: Jan Friesse --- booth.rpmlintrc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 booth.rpmlintrc diff --git a/booth.rpmlintrc b/booth.rpmlintrc new file mode 100644 index 0000000..14f5ed5 --- /dev/null +++ b/booth.rpmlintrc @@ -0,0 +1,20 @@ +# no-documentation is fine for booth-arbitrator and booth (virtual package) +addFilter(r'booth-arbitrator\.[^:]+: W: no-documentation') +addFilter(r'booth\.[^:]+: W: no-documentation') + +# permissions for chroot +addFilter(r'booth-core\.[^:]+: (E|W): non-standard-dir-perm /var/lib/booth 750') +addFilter(r'booth-core\.[^:]+: (E|W): non-standard-dir-perm /var/lib/booth/cores 750') + +# booth is just metapackage +addFilter(r'booth\.[^:]+: (W|E): no-binary') + +# booth-(site|test) installs just scripts in /usr/lib +addFilter(r'booth-(site|test)\.[^:]+: (W|E): only-non-binary-in-usr-lib') + +# dangling symlink is ok for geostore and boothd (they actually points to booth binary) +addFilter(r'booth-site\.[^:]+: (W|E): dangling-symlink /usr/sbin/geostore /usr/sbin/boothd') +addFilter(r'booth-test\.[^:]+: (W|E): dangling-symlink /usr/share/booth/tests/src/boothd /usr/sbin/boothd') + +# booth unit test is distributed non-executable by upstream +addFilter(r'booth-test\.[^:]+: (W|E): non-executable-script /usr/share/booth/tests/unit-test.py') From 0c5606ae99a013af3ba152c568d1298ed0955f9c Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 1 Jun 2020 17:49:08 +0200 Subject: [PATCH 12/57] Add CI tests using the Standard Test Interface Signed-off-by: Jan Friesse --- tests/.gitignore | 3 +++ tests/tests.yml | 9 +++++++++ tests/upstream/runtest.sh | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 tests/.gitignore create mode 100644 tests/tests.yml create mode 100644 tests/upstream/runtest.sh diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..e6c79fd --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,3 @@ +# Ignore tests runs/artefacts. +artifacts/** +**/*.retry diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..8ee75ea --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,9 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - upstream + required_packages: + - booth-test diff --git a/tests/upstream/runtest.sh b/tests/upstream/runtest.sh new file mode 100644 index 0000000..0321369 --- /dev/null +++ b/tests/upstream/runtest.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -xe +set -o pipefail + +/usr/share/booth/tests/test/runtests.py --allow-root-user From fc8cacb1117e1f7500ac2ac8edde749afab9c397 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 1 Jun 2020 17:49:45 +0200 Subject: [PATCH 13/57] Enable gating Signed-off-by: Jan Friesse --- gating.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..f075ad7 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,15 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} + +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} From f5edfe7d503b4e5f7b1f2268338d05693acf69ef Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 1 Jun 2020 17:50:10 +0200 Subject: [PATCH 14/57] Test build with CI gating enabled Signed-off-by: Jan Friesse --- booth.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index ac660b8..93df525 100644 --- a/booth.spec +++ b/booth.spec @@ -61,7 +61,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.2 +Release: %{boothrel}%{?dist}.3 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -101,6 +101,8 @@ BuildRequires: sed BuildRequires: systemd ## for autosetup BuildRequires: git +# check scriptlet (for perl and netstat) +BuildRequires: perl-interpreter net-tools # this is for a composite-requiring-its-components arranged # as an empty package (empty files section) requiring subpackages @@ -179,6 +181,8 @@ Requires: %{name}-site = %{version}-%{release} Requires: gdb Requires: python3 Requires: python3-pexpect +# runtests.py suite (for perl and netstat) +Requires: perl-interpreter net-tools %description test Automated tests for running Booth, ticket manager for multi-site clusters. @@ -287,6 +291,10 @@ VERBOSE=1 make check /usr/lib/ocf/resource.d/booth/sharedrsc %changelog +* Mon Jun 1 2020 Jan Friesse - 1.0-5.385cc25.git.3 +- Add CI tests +- Enable gating + * Mon Jun 1 2020 Jan Friesse - 1.0-5.385cc25.git.2 - Package /var/lib/booth where booth can chroot From 3ab82c15957943c42357191251f8ec4ea4a83dd7 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 1 Jun 2020 17:52:35 +0200 Subject: [PATCH 15/57] Fix hardcoded-library-path Signed-off-by: Jan Friesse --- booth.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/booth.spec b/booth.spec index 93df525..b3d0812 100644 --- a/booth.spec +++ b/booth.spec @@ -270,15 +270,15 @@ VERBOSE=1 make check %files site # OCF (agent + a helper) ## /usr/lib/ocf/resource.d/pacemaker provided by pacemaker -/usr/lib/ocf/resource.d/pacemaker/booth-site -%dir /usr/lib/ocf/lib/booth - /usr/lib/ocf/lib/booth/geo_attr.sh +%{_usr}/lib/ocf/resource.d/pacemaker/booth-site +%dir %{_usr}/lib/ocf/lib/booth + %{_usr}/lib/ocf/lib/booth/geo_attr.sh # geostore (command + OCF agent) %{_sbindir}/geostore %{_mandir}/man8/geostore.8* ## /usr/lib/ocf/resource.d provided by resource-agents -%dir /usr/lib/ocf/resource.d/booth - /usr/lib/ocf/resource.d/booth/geostore +%dir %{_usr}/lib/ocf/resource.d/booth + %{_usr}/lib/ocf/resource.d/booth/geostore # helper (possibly used in the configuration hook) %dir %{_datadir}/booth %{_datadir}/booth/service-runnable @@ -288,12 +288,13 @@ VERBOSE=1 make check # /usr/share/booth provided by -site %{test_path} # /usr/lib/ocf/resource.d/booth provided by -site -/usr/lib/ocf/resource.d/booth/sharedrsc +%{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog * Mon Jun 1 2020 Jan Friesse - 1.0-5.385cc25.git.3 - Add CI tests - Enable gating +- Fix hardcoded-library-path * Mon Jun 1 2020 Jan Friesse - 1.0-5.385cc25.git.2 - Package /var/lib/booth where booth can chroot From 79f959b02c99c0c79ad98b8001759cebe45ba30e Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Tue, 2 Jun 2020 14:01:30 +0200 Subject: [PATCH 16/57] New upstream release Update to current snapshot (commit ac1d34c) to fix test suite Signed-off-by: Jan Friesse --- booth.spec | 9 ++++++--- sources | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/booth.spec b/booth.spec index b3d0812..32ffce0 100644 --- a/booth.spec +++ b/booth.spec @@ -29,11 +29,11 @@ # Disable automatic compilation of Python files in extra directories %global _python_bytecompile_extra 0 -%global specver 5 +%global specver 6 %global boothver 1.0 # set following to the actual commit or, for final release, concatenate # "boothver" macro to "v" (will yield a tag per the convention) -%global commit 385cc25a37694934848a8a7647471c82fcdad317 +%global commit ac1d34ce172678a8f5ba415e976cf2366d45e15e %global lparen ( %global rparen ) %global shortcommit %(c=%{commit}; case ${c} in @@ -61,7 +61,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.3 +Release: %{boothrel}%{?dist}.1 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -291,6 +291,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Jun 2 2020 Jan Friesse - 1.0-6.ac1d34c.git.1 +- Update to current snapshot (commit ac1d34c) to fix test suite + * Mon Jun 1 2020 Jan Friesse - 1.0-5.385cc25.git.3 - Add CI tests - Enable gating diff --git a/sources b/sources index 3e18b8d..750160d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-385cc25.tar.gz) = a8005eab1b12a5ab77284df3a1b7d7cdf2014f41640925133d1d7e63c4c88e9c09f778d54a1880ba0ede470121f87ccb5293e9e063854d79eb7d152421509227 +SHA512 (booth-ac1d34c.tar.gz) = 557bc42faceee65b272fefea6eaa8a6b2895f497fd0e20f2d29b15a967dc860cc0a518bae1c346fe5679714eb7b33ed14ff79ee087932c568b099529ec57fcfe From e9097d2ad082d36f4d6b0c35da50e978d117b104 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Tue, 2 Jun 2020 14:35:45 +0200 Subject: [PATCH 17/57] Require the Python interpreter directly ... instead of using the package name. Signed-off-by: Jan Friesse --- booth.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/booth.spec b/booth.spec index 32ffce0..a12840b 100644 --- a/booth.spec +++ b/booth.spec @@ -61,7 +61,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.1 +Release: %{boothrel}%{?dist}.2 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -179,7 +179,7 @@ Requires: %{name}-arbitrator = %{version}-%{release} ## (and /usr/lib/ocf/resource.d/booth) Requires: %{name}-site = %{version}-%{release} Requires: gdb -Requires: python3 +Requires: %{__python3} Requires: python3-pexpect # runtests.py suite (for perl and netstat) Requires: perl-interpreter net-tools @@ -291,6 +291,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Jun 2 2020 Jan Friesse - 1.0-6.ac1d34c.git.2 +- Require the Python interpreter directly instead of using the package name + * Tue Jun 2 2020 Jan Friesse - 1.0-6.ac1d34c.git.1 - Update to current snapshot (commit ac1d34c) to fix test suite From 6513e1ad33bef7fad33ee4e7ac9be22bc584c14a Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Wed, 3 Jun 2020 15:17:51 +0200 Subject: [PATCH 18/57] Small fixes - Do not link with the pcmk libraries - Generate runtests.py and boothtestenv.py with -Es as make check does Signed-off-by: Jan Friesse --- ...uild-Do-not-link-with-pcmk-libraries.patch | 33 +++++++++++++++++++ booth.spec | 11 +++++-- 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 0001-build-Do-not-link-with-pcmk-libraries.patch diff --git a/0001-build-Do-not-link-with-pcmk-libraries.patch b/0001-build-Do-not-link-with-pcmk-libraries.patch new file mode 100644 index 0000000..d731299 --- /dev/null +++ b/0001-build-Do-not-link-with-pcmk-libraries.patch @@ -0,0 +1,33 @@ +From 2f944ea46b1b39113a34ca586cd8e3cd8f0d1d70 Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Wed, 3 Jun 2020 15:04:56 +0200 +Subject: [PATCH] build: Do not link with pcmk libraries + +Patch 4205de05fe337d1b1127fae302e6e6c2f0613ccf introduced better way to +check for pacemaker headers but also usage of PCMK_LIBS when linking +boothd. + +This is not needed, because boothd uses just crm/services.h header file +for inclusion of OCF return codes, so patch removes the use of PCMK_LIBS. + +Signed-off-by: Jan Friesse +--- + src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 8598725..4023791 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -23,7 +23,7 @@ boothd_SOURCES += auth.c + endif + + boothd_LDFLAGS = $(OS_DYFLAGS) -L./ +-boothd_LDADD = -lm $(GLIB_LIBS) $(ZLIB_LIBS) $(PCMK_LIBS) ++boothd_LDADD = -lm $(GLIB_LIBS) $(ZLIB_LIBS) + boothd_CFLAGS = $(GLIB_CFLAGS) $(PCMK_CFLAGS) + + if !LOGGING_LIBQB +-- +2.18.2 + diff --git a/booth.spec b/booth.spec index a12840b..47fe8e4 100644 --- a/booth.spec +++ b/booth.spec @@ -61,11 +61,12 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.2 +Release: %{boothrel}%{?dist}.3 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +Patch0: 0001-build-Do-not-link-with-pcmk-libraries.patch # direct build process dependencies BuildRequires: autoconf @@ -228,14 +229,14 @@ mkdir -p %{buildroot}/%{test_path}/src ln -s -t %{buildroot}/%{test_path}/src \ -- %{_sbindir}/boothd # Generate runtests.py and boothtestenv.py -sed -e 's#PYTHON_SHEBANG#%{__python3}#g' \ +sed -e 's#PYTHON_SHEBANG#%{__python3} -Es#g' \ -e 's#TEST_SRC_DIR#%{test_path}/test#g' \ -e 's#TEST_BUILD_DIR#%{test_path}/test#g' \ %{buildroot}/%{test_path}/test/runtests.py.in > %{buildroot}/%{test_path}/test/runtests.py chmod +x %{buildroot}/%{test_path}/test/runtests.py -sed -e 's#PYTHON_SHEBANG#%{__python3}#g' \ +sed -e 's#PYTHON_SHEBANG#%{__python3} -Es#g' \ -e 's#TEST_SRC_DIR#%{test_path}/test#g' \ -e 's#TEST_BUILD_DIR#%{test_path}/test#g' \ %{buildroot}/%{test_path}/test/boothtestenv.py.in > %{buildroot}/%{test_path}/test/boothtestenv.py @@ -291,6 +292,10 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jun 3 2020 Jan Friesse - 1.0-6.ac1d34c.git.3 +- Do not link with the pcmk libraries +- Generate runtests.py and boothtestenv.py with -Es as make check does + * Tue Jun 2 2020 Jan Friesse - 1.0-6.ac1d34c.git.2 - Require the Python interpreter directly instead of using the package name From 51495343899ab04ab3eb6956c06d0b32e23bd0cf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 13:19:29 +0000 Subject: [PATCH 19/57] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 47fe8e4..853c327 100644 --- a/booth.spec +++ b/booth.spec @@ -61,7 +61,7 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.3 +Release: %{boothrel}%{?dist}.4 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} @@ -292,6 +292,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 1.0-6.ac1d34c.git.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jun 3 2020 Jan Friesse - 1.0-6.ac1d34c.git.3 - Do not link with the pcmk libraries - Generate runtests.py and boothtestenv.py with -Es as make check does From 5b57687bf6054f2fa49edf46cbe1ca93020290a8 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Tue, 29 Sep 2020 15:29:49 +0200 Subject: [PATCH 20/57] Fixes of tests - Remove net-tools (netstat) dependency and replace it with iproute (ss) - Disable running tests during build by default (conditional run_build_tests) Signed-off-by: Jan Friesse --- ...ompatibility-with-iproute-ss-command.patch | 41 +++++++++++++++++++ booth.spec | 20 ++++++--- 2 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 0002-test-Add-compatibility-with-iproute-ss-command.patch diff --git a/0002-test-Add-compatibility-with-iproute-ss-command.patch b/0002-test-Add-compatibility-with-iproute-ss-command.patch new file mode 100644 index 0000000..27e2125 --- /dev/null +++ b/0002-test-Add-compatibility-with-iproute-ss-command.patch @@ -0,0 +1,41 @@ +From eda7abe337e5e37ef8d1d8ff7abdce334fa9bd21 Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Tue, 29 Sep 2020 14:22:30 +0200 +Subject: [PATCH] test: Add compatibility with iproute ss command + +ensure_boothd_not_running is now exectured only when single instance is +used, but if so, it requires netstat command. Netstat is deprecated for +some time and it is slowly disappearing from distributions, so add +support for iproute ss command. + +Parameters for both ss and netstat are same, but sadly output differs so +both netstat and ss output is matched. + +Signed-off-by: Jan Friesse +--- + test/boothtestenv.py.in | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/test/boothtestenv.py.in b/test/boothtestenv.py.in +index 26a40cb..8a23615 100644 +--- a/test/boothtestenv.py.in ++++ b/test/boothtestenv.py.in +@@ -31,11 +31,13 @@ class BoothTestEnvironment(unittest.TestCase, BoothAssertions): + + def ensure_boothd_not_running(self): + # Need to redirect STDERR in case we're not root, in which +- # case netstat's -p option causes a warning. However we only ++ # case netstat's -p option causes a warning (ss doesn't). However we only + # want to kill boothd processes which we own; -p will list the + # pid for those and only those, which is exactly what we want + # here. +- subprocess.call("netstat -tpln 2>&1 | perl -lne 'm,LISTEN\s+(\d+)/boothd, and kill 15, $1'", shell=True) ++ subprocess.call("(netstat -tlnp || ss -tlnp) 2>&1 | " + ++ "perl -lne '(m,LISTEN\s+(\d+)/boothd, || /\"boothd\".*pid=(\d+)/) and kill 15, $1'", ++ shell=True) + + def get_tempfile(self, identity): + tf = tempfile.NamedTemporaryFile( +-- +2.18.2 + diff --git a/booth.spec b/booth.spec index 853c327..e416b77 100644 --- a/booth.spec +++ b/booth.spec @@ -21,6 +21,7 @@ %bcond_with html_man %bcond_with glue +%bcond_with run_build_tests ## User and group to use for nonprivileged services (should be in sync with pacemaker) %global uname hacluster @@ -61,12 +62,13 @@ Name: booth Version: %{boothver} -Release: %{boothrel}%{?dist}.4 +Release: %{boothrel}%{?dist}.5 Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Patch0: 0001-build-Do-not-link-with-pcmk-libraries.patch +Patch1: 0002-test-Add-compatibility-with-iproute-ss-command.patch # direct build process dependencies BuildRequires: autoconf @@ -102,8 +104,10 @@ BuildRequires: sed BuildRequires: systemd ## for autosetup BuildRequires: git -# check scriptlet (for perl and netstat) -BuildRequires: perl-interpreter net-tools +%if 0%{?with_run_build_tests} +# check scriptlet (for perl and ss) +BuildRequires: perl-interpreter iproute +%endif # this is for a composite-requiring-its-components arranged # as an empty package (empty files section) requiring subpackages @@ -182,8 +186,8 @@ Requires: %{name}-site = %{version}-%{release} Requires: gdb Requires: %{__python3} Requires: python3-pexpect -# runtests.py suite (for perl and netstat) -Requires: perl-interpreter net-tools +# runtests.py suite (for perl and ss) +Requires: perl-interpreter iproute %description test Automated tests for running Booth, ticket manager for multi-site clusters. @@ -246,7 +250,9 @@ sed -e 's#PYTHON_SHEBANG#%{__python3} -Es#g' \ %check # alternatively: test/runtests.py +%if 0%{?with_run_build_tests} VERBOSE=1 make check +%endif %files core %license COPYING @@ -292,6 +298,10 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Sep 29 2020 Jan Friesse - 1.0-6.ac1d34c.git.5 +- Remove net-tools (netstat) dependency and replace it with iproute (ss) +- Disable running tests during build by default (conditional run_build_tests) + * Mon Jul 27 2020 Fedora Release Engineering - 1.0-6.ac1d34c.git.4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 7052067601860135e003552ac6e96af1d6529395 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 15 Oct 2020 13:49:37 +0200 Subject: [PATCH 21/57] Implement new versioning scheme Signed-off-by: Jan Friesse --- booth.spec | 49 +++++++++++++++++++++++-------------------------- sources | 2 +- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/booth.spec b/booth.spec index e416b77..7bb4d9d 100644 --- a/booth.spec +++ b/booth.spec @@ -23,6 +23,22 @@ %bcond_with glue %bcond_with run_build_tests +# set following to the result of `git describe --abbrev=128 $commit` +# This will be used to fill booth_ver, booth_numcomm and booth_sha1. +# It is important to keep abbrev to get full length sha1! When updating source use +# `spectool -g booth.spec` to download source. +%global git_describe_str v1.0-199-gac1d34ce172678a8f5ba415e976cf2366d45e15e + +# Set this to 1 when rebasing (changing git_describe_str) and increase otherwise +%global release 1 + +# Run shell script to parse git_describe str into version, numcomm and sha1 hash +%global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) +%global booth_numcomm %(s=%{git_describe_str}; t=${s#*-}; echo ${t%%%%-*}) +%global booth_sha1 %(s=%{git_describe_str}; t=${s##*-}; echo ${t:1}) +%global booth_short_sha1 %(s=%{booth_sha1}; echo ${s:0:7}) +%global booth_archive_name %{name}-%{booth_ver}-%{booth_numcomm}-%{booth_short_sha1} + ## User and group to use for nonprivileged services (should be in sync with pacemaker) %global uname hacluster %global gname haclient @@ -30,30 +46,8 @@ # Disable automatic compilation of Python files in extra directories %global _python_bytecompile_extra 0 -%global specver 6 -%global boothver 1.0 -# set following to the actual commit or, for final release, concatenate -# "boothver" macro to "v" (will yield a tag per the convention) -%global commit ac1d34ce172678a8f5ba415e976cf2366d45e15e -%global lparen ( -%global rparen ) -%global shortcommit %(c=%{commit}; case ${c} in - v*%{rparen} echo ${c:1};; - *%{rparen} echo ${c:0:7};; esac) -%global pre_release %(s=%{shortcommit}; [ ${s: -3:2} != rc ]; echo $?) -%global post_release %([ %{commit} = v%{shortcommit} ]; echo $?) %global github_owner ClusterLabs -%if 0%{pre_release} -%global boothrel 0.%{specver}.%(s=%{shortcommit}; echo ${s: -3}) -%else -%if 0%{post_release} -%global boothrel %{specver}.%{shortcommit}.git -%else -%global boothrel %{specver} -%endif -%endif - %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}} # https://fedoraproject.org/wiki/EPEL:Packaging?rd=Packaging:EPEL#The_.25license_tag %{!?_licensedir:%global license %doc} @@ -61,12 +55,12 @@ %global test_path %{_datadir}/booth/tests Name: booth -Version: %{boothver} -Release: %{boothrel}%{?dist}.5 +Version: %{booth_ver} +Release: %{booth_numcomm}.%{release}.%{booth_short_sha1}.git%{dist} Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} -Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +Source0: https://github.com/%{github_owner}/%{name}/archive/%{booth_short_sha1}/%{booth_archive_name}.tar.gz Patch0: 0001-build-Do-not-link-with-pcmk-libraries.patch Patch1: 0002-test-Add-compatibility-with-iproute-ss-command.patch @@ -195,7 +189,7 @@ Automated tests for running Booth, ticket manager for multi-site clusters. # BUILD # %prep -%autosetup -n %{name}-%{commit} -S git_am +%autosetup -n %{name}-%{booth_sha1} -S git_am %build ./autogen.sh @@ -298,6 +292,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu Oct 15 2020 Jan Friesse - 1.0-199.1.ac1d34c.git +- Implement new versioning scheme + * Tue Sep 29 2020 Jan Friesse - 1.0-6.ac1d34c.git.5 - Remove net-tools (netstat) dependency and replace it with iproute (ss) - Disable running tests during build by default (conditional run_build_tests) diff --git a/sources b/sources index 750160d..8a5f453 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-ac1d34c.tar.gz) = 557bc42faceee65b272fefea6eaa8a6b2895f497fd0e20f2d29b15a967dc860cc0a518bae1c346fe5679714eb7b33ed14ff79ee087932c568b099529ec57fcfe +SHA512 (booth-1.0-199-ac1d34c.tar.gz) = 557bc42faceee65b272fefea6eaa8a6b2895f497fd0e20f2d29b15a967dc860cc0a518bae1c346fe5679714eb7b33ed14ff79ee087932c568b099529ec57fcfe From e5a92625e9892334a6869344c5b989956bcdfb19 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 15 Oct 2020 14:08:05 +0200 Subject: [PATCH 22/57] New upstream release Update to current snapshot (commit dd88847) to fix testsuite, use autotools generated makefiles and other improvements Signed-off-by: Jan Friesse --- booth.spec | 20 ++++++++++++++++---- sources | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/booth.spec b/booth.spec index 7bb4d9d..6eaf60a 100644 --- a/booth.spec +++ b/booth.spec @@ -27,7 +27,7 @@ # This will be used to fill booth_ver, booth_numcomm and booth_sha1. # It is important to keep abbrev to get full length sha1! When updating source use # `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-199-gac1d34ce172678a8f5ba415e976cf2366d45e15e +%global git_describe_str v1.0-237-gdd88847c8e7c55f18ace774cf70545aa137bd296 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise %global release 1 @@ -61,8 +61,6 @@ Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{booth_short_sha1}/%{booth_archive_name}.tar.gz -Patch0: 0001-build-Do-not-link-with-pcmk-libraries.patch -Patch1: 0002-test-Add-compatibility-with-iproute-ss-command.patch # direct build process dependencies BuildRequires: autoconf @@ -197,7 +195,7 @@ Automated tests for running Booth, ticket manager for multi-site clusters. --with-initddir=%{_initrddir} \ --docdir=%{_pkgdocdir} \ --enable-user-flags \ - %{!?with_html_man:--without-html_man} \ + %{?with_html_man:--with-html_man} \ %{!?with_glue:--without-glue} \ PYTHON=%{__python3} %{make_build} @@ -264,6 +262,12 @@ VERBOSE=1 make check %dir %attr (750, %{uname}, %{gname}) %{_var}/lib/booth/ %dir %attr (750, %{uname}, %{gname}) %{_var}/lib/booth/cores +# Generated html docs +%if 0%{?with_html_man} +%{_pkgdocdir}/booth-keygen.8.html +%{_pkgdocdir}/boothd.8.html +%endif + %files arbitrator %{_unitdir}/booth@.service %{_unitdir}/booth-arbitrator.service @@ -284,6 +288,11 @@ VERBOSE=1 make check %dir %{_datadir}/booth %{_datadir}/booth/service-runnable +# Generated html docs +%if 0%{?with_html_man} +%{_pkgdocdir}/geostore.8.html +%endif + %files test %doc %{_pkgdocdir}/README-testing # /usr/share/booth provided by -site @@ -292,6 +301,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu Oct 15 2020 Jan Friesse - 1.0-237.1.dd88847.git +- Rebase to newest upstream snapshot + * Thu Oct 15 2020 Jan Friesse - 1.0-199.1.ac1d34c.git - Implement new versioning scheme diff --git a/sources b/sources index 8a5f453..ad2c144 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-199-ac1d34c.tar.gz) = 557bc42faceee65b272fefea6eaa8a6b2895f497fd0e20f2d29b15a967dc860cc0a518bae1c346fe5679714eb7b33ed14ff79ee087932c568b099529ec57fcfe +SHA512 (booth-1.0-237-dd88847.tar.gz) = 889e67b3ce0d35800030f289eb9bca6d282ed75ab4def44910e35a1aa7b1bd9b1ccc65347222206542e1f7f49814a84e22e46dc004a0b19634a91954b0f89f88 From da88b3aa00129b8f59e17a235d27831b564c5621 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 15 Oct 2020 14:11:59 +0200 Subject: [PATCH 23/57] Remove unneeded patches Signed-off-by: Jan Friesse --- ...uild-Do-not-link-with-pcmk-libraries.patch | 33 --------------- ...ompatibility-with-iproute-ss-command.patch | 41 ------------------- 2 files changed, 74 deletions(-) delete mode 100644 0001-build-Do-not-link-with-pcmk-libraries.patch delete mode 100644 0002-test-Add-compatibility-with-iproute-ss-command.patch diff --git a/0001-build-Do-not-link-with-pcmk-libraries.patch b/0001-build-Do-not-link-with-pcmk-libraries.patch deleted file mode 100644 index d731299..0000000 --- a/0001-build-Do-not-link-with-pcmk-libraries.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2f944ea46b1b39113a34ca586cd8e3cd8f0d1d70 Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Wed, 3 Jun 2020 15:04:56 +0200 -Subject: [PATCH] build: Do not link with pcmk libraries - -Patch 4205de05fe337d1b1127fae302e6e6c2f0613ccf introduced better way to -check for pacemaker headers but also usage of PCMK_LIBS when linking -boothd. - -This is not needed, because boothd uses just crm/services.h header file -for inclusion of OCF return codes, so patch removes the use of PCMK_LIBS. - -Signed-off-by: Jan Friesse ---- - src/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 8598725..4023791 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -23,7 +23,7 @@ boothd_SOURCES += auth.c - endif - - boothd_LDFLAGS = $(OS_DYFLAGS) -L./ --boothd_LDADD = -lm $(GLIB_LIBS) $(ZLIB_LIBS) $(PCMK_LIBS) -+boothd_LDADD = -lm $(GLIB_LIBS) $(ZLIB_LIBS) - boothd_CFLAGS = $(GLIB_CFLAGS) $(PCMK_CFLAGS) - - if !LOGGING_LIBQB --- -2.18.2 - diff --git a/0002-test-Add-compatibility-with-iproute-ss-command.patch b/0002-test-Add-compatibility-with-iproute-ss-command.patch deleted file mode 100644 index 27e2125..0000000 --- a/0002-test-Add-compatibility-with-iproute-ss-command.patch +++ /dev/null @@ -1,41 +0,0 @@ -From eda7abe337e5e37ef8d1d8ff7abdce334fa9bd21 Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Tue, 29 Sep 2020 14:22:30 +0200 -Subject: [PATCH] test: Add compatibility with iproute ss command - -ensure_boothd_not_running is now exectured only when single instance is -used, but if so, it requires netstat command. Netstat is deprecated for -some time and it is slowly disappearing from distributions, so add -support for iproute ss command. - -Parameters for both ss and netstat are same, but sadly output differs so -both netstat and ss output is matched. - -Signed-off-by: Jan Friesse ---- - test/boothtestenv.py.in | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/test/boothtestenv.py.in b/test/boothtestenv.py.in -index 26a40cb..8a23615 100644 ---- a/test/boothtestenv.py.in -+++ b/test/boothtestenv.py.in -@@ -31,11 +31,13 @@ class BoothTestEnvironment(unittest.TestCase, BoothAssertions): - - def ensure_boothd_not_running(self): - # Need to redirect STDERR in case we're not root, in which -- # case netstat's -p option causes a warning. However we only -+ # case netstat's -p option causes a warning (ss doesn't). However we only - # want to kill boothd processes which we own; -p will list the - # pid for those and only those, which is exactly what we want - # here. -- subprocess.call("netstat -tpln 2>&1 | perl -lne 'm,LISTEN\s+(\d+)/boothd, and kill 15, $1'", shell=True) -+ subprocess.call("(netstat -tlnp || ss -tlnp) 2>&1 | " + -+ "perl -lne '(m,LISTEN\s+(\d+)/boothd, || /\"boothd\".*pid=(\d+)/) and kill 15, $1'", -+ shell=True) - - def get_tempfile(self, identity): - tf = tempfile.NamedTemporaryFile( --- -2.18.2 - From d68c8368e6e5d702d1a9d344772440f693084cc2 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 15 Oct 2020 14:34:55 +0200 Subject: [PATCH 24/57] Fix dist macro Signed-off-by: Jan Friesse --- booth.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 6eaf60a..ce3e80f 100644 --- a/booth.spec +++ b/booth.spec @@ -56,7 +56,7 @@ Name: booth Version: %{booth_ver} -Release: %{booth_numcomm}.%{release}.%{booth_short_sha1}.git%{dist} +Release: %{booth_numcomm}.%{release}.%{booth_short_sha1}.git%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} From f47046a5aff476c4c2fda02b9fe78f41dd0cd530 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 15 Oct 2020 14:47:45 +0200 Subject: [PATCH 25/57] Fix dist macro rebuild Signed-off-by: Jan Friesse --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index ce3e80f..c734653 100644 --- a/booth.spec +++ b/booth.spec @@ -30,7 +30,7 @@ %global git_describe_str v1.0-237-gdd88847c8e7c55f18ace774cf70545aa137bd296 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 1 +%global release 2 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -301,6 +301,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu Oct 15 2020 Jan Friesse - 1.0-237.2.dd88847.git +- Fix dist macro + * Thu Oct 15 2020 Jan Friesse - 1.0-237.1.dd88847.git - Rebase to newest upstream snapshot From 5b583f7517a35f64d841f4ec48eb38f07e4fb3cc Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 23 Nov 2020 11:05:13 +0100 Subject: [PATCH 26/57] New upstream release Signed-off-by: Jan Friesse --- booth.rpmlintrc | 3 +++ booth.spec | 11 ++++++++--- sources | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/booth.rpmlintrc b/booth.rpmlintrc index 14f5ed5..ae1945c 100644 --- a/booth.rpmlintrc +++ b/booth.rpmlintrc @@ -9,6 +9,9 @@ addFilter(r'booth-core\.[^:]+: (E|W): non-standard-dir-perm /var/lib/booth/cores # booth is just metapackage addFilter(r'booth\.[^:]+: (W|E): no-binary') +# pc should be in devel but it is not really devel file +addFilter(r'booth\.[^:]+: W: devel-file-in-non-devel-package /usr/share/pkgconfig/booth.pc') + # booth-(site|test) installs just scripts in /usr/lib addFilter(r'booth-(site|test)\.[^:]+: (W|E): only-non-binary-in-usr-lib') diff --git a/booth.spec b/booth.spec index c734653..a41218f 100644 --- a/booth.spec +++ b/booth.spec @@ -27,10 +27,10 @@ # This will be used to fill booth_ver, booth_numcomm and booth_sha1. # It is important to keep abbrev to get full length sha1! When updating source use # `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-237-gdd88847c8e7c55f18ace774cf70545aa137bd296 +%global git_describe_str v1.0-239-g52ec25539bc73fec37851bfe1eaa397251fa6487 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 2 +%global release 1 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -107,7 +107,9 @@ BuildRequires: perl-interpreter iproute Requires: %{name}-core%{?_isa} Requires: %{name}-site %files -# intentionally empty +%license COPYING +%dir %{_datadir}/pkgconfig +%{_datadir}/pkgconfig/booth.pc %description Booth manages tickets which authorize cluster sites located @@ -301,6 +303,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Mon Nov 23 2020 Jan Friesse - 1.0-239.1.52ec255.git +- Rebase to newest upstream snapshot + * Thu Oct 15 2020 Jan Friesse - 1.0-237.2.dd88847.git - Fix dist macro diff --git a/sources b/sources index ad2c144..f18d89b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-237-dd88847.tar.gz) = 889e67b3ce0d35800030f289eb9bca6d282ed75ab4def44910e35a1aa7b1bd9b1ccc65347222206542e1f7f49814a84e22e46dc004a0b19634a91954b0f89f88 +SHA512 (booth-1.0-239-52ec255.tar.gz) = 94242abc182c87d4ef748d972b1279d3a17a3011d52c3456c3e1e01e2581666138608a30c99e7e60dd2ba9d817804f2ca96475c21d7ac441996bbff2a7a104cc From 68d77bbd5eb86032a75ff23e143a2fd3c77989ea Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 01:19:33 +0000 Subject: [PATCH 27/57] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index a41218f..8059099 100644 --- a/booth.spec +++ b/booth.spec @@ -30,7 +30,7 @@ %global git_describe_str v1.0-239-g52ec25539bc73fec37851bfe1eaa397251fa6487 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 1 +%global release 2 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -303,6 +303,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 1.0-239.2.52ec255.git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Nov 23 2020 Jan Friesse - 1.0-239.1.52ec255.git - Rebase to newest upstream snapshot From bf4f3fab1dc1d150f805ab2cfd78a00a719acd65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:14:09 +0100 Subject: [PATCH 28/57] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- booth.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 8059099..ac133ff 100644 --- a/booth.spec +++ b/booth.spec @@ -30,7 +30,7 @@ %global git_describe_str v1.0-239-g52ec25539bc73fec37851bfe1eaa397251fa6487 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 2 +%global release 3 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -303,6 +303,10 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.0-239.3.52ec255.git +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Tue Jan 26 2021 Fedora Release Engineering - 1.0-239.2.52ec255.git - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 9919f4ac3198680882eb157e26dceb12540fe2d2 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 17 May 2021 17:19:29 +0200 Subject: [PATCH 29/57] Do not include unit-tests by default unit-test.py requires pexpect which may be not packaged. Signed-off-by: Jan Friesse --- booth.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index ac133ff..5964e21 100644 --- a/booth.spec +++ b/booth.spec @@ -22,6 +22,7 @@ %bcond_with html_man %bcond_with glue %bcond_with run_build_tests +%bcond_with include_unit_test # set following to the result of `git describe --abbrev=128 $commit` # This will be used to fill booth_ver, booth_numcomm and booth_sha1. @@ -179,7 +180,9 @@ Requires: %{name}-arbitrator = %{version}-%{release} Requires: %{name}-site = %{version}-%{release} Requires: gdb Requires: %{__python3} +%if 0%{?with_include_unit_test} Requires: python3-pexpect +%endif # runtests.py suite (for perl and ss) Requires: perl-interpreter iproute @@ -220,7 +223,11 @@ rm -rf %{buildroot}/%{_pkgdocdir}/COPYING mkdir -p %{buildroot}/%{test_path} # Copy tests from tarball cp -a -t %{buildroot}/%{test_path} \ - -- conf test unit-tests script/unit-test.py + -- conf test +%if 0%{?with_include_unit_test} +cp -a -t %{buildroot}/%{test_path} \ + -- unit-tests script/unit-test.py +%endif chmod +x %{buildroot}/%{test_path}/test/booth_path chmod +x %{buildroot}/%{test_path}/test/live_test.sh mkdir -p %{buildroot}/%{test_path}/src From f4d70ccf2bc5b8793ea8219a65dd4e270fff899a Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Tue, 18 May 2021 08:17:47 +0200 Subject: [PATCH 30/57] New upstream release Signed-off-by: Jan Friesse --- booth.spec | 8 ++++++-- sources | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/booth.spec b/booth.spec index 5964e21..9aef877 100644 --- a/booth.spec +++ b/booth.spec @@ -28,10 +28,10 @@ # This will be used to fill booth_ver, booth_numcomm and booth_sha1. # It is important to keep abbrev to get full length sha1! When updating source use # `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-239-g52ec25539bc73fec37851bfe1eaa397251fa6487 +%global git_describe_str v1.0-249-g977726e673b582cf609b352d80affba0480b22e4 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 3 +%global release 1 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -310,6 +310,10 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue May 18 2021 Jan Friesse - 1.0-249.1.977726e.git +- Do not include unit-test by default +- Rebase to newest upstream snapshot + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.0-239.3.52ec255.git - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. diff --git a/sources b/sources index f18d89b..6c37fcf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-239-52ec255.tar.gz) = 94242abc182c87d4ef748d972b1279d3a17a3011d52c3456c3e1e01e2581666138608a30c99e7e60dd2ba9d817804f2ca96475c21d7ac441996bbff2a7a104cc +SHA512 (booth-1.0-249-977726e.tar.gz) = d56768ef11d4250d8663d31d4bb4e1a8173683e37e50f53e27bc80389bb31962e1ba1733f465f988153064dff22c67a0375930c576fbe27b91213ee09803930c From 2605755c8c77f40e57882d395f8536e90a309d14 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 20 May 2021 10:02:32 +0200 Subject: [PATCH 31/57] Rebase to newest upstream snapshot Signed-off-by: Jan Friesse --- booth.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/booth.spec b/booth.spec index 9aef877..59d2023 100644 --- a/booth.spec +++ b/booth.spec @@ -28,7 +28,7 @@ # This will be used to fill booth_ver, booth_numcomm and booth_sha1. # It is important to keep abbrev to get full length sha1! When updating source use # `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-249-g977726e673b582cf609b352d80affba0480b22e4 +%global git_describe_str v1.0-251-gbfb2f924c07db823f5c934d1aafbc5181bb25148 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise %global release 1 @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu May 20 2021 Jan Friesse - 1.0-251.1.bfb2f92.git +- Rebase to newest upstream snapshot + * Tue May 18 2021 Jan Friesse - 1.0-249.1.977726e.git - Do not include unit-test by default - Rebase to newest upstream snapshot diff --git a/sources b/sources index 6c37fcf..86ae5b3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-249-977726e.tar.gz) = d56768ef11d4250d8663d31d4bb4e1a8173683e37e50f53e27bc80389bb31962e1ba1733f465f988153064dff22c67a0375930c576fbe27b91213ee09803930c +SHA512 (booth-1.0-251-bfb2f92.tar.gz) = 6b8038c531456c5a2f6918c797ba877e6ad5cdd2d59f69f9281f5243a0faafa6cba5d06d046ff7917b8508a68de43deb748d73146cf8dfdfc142af5f1167ac2e From 4bf848b9135a9c5353f3880fb4ece6e4721d4d72 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 13:51:12 +0000 Subject: [PATCH 32/57] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From f7cd75460aec3bdb1039445f483f307a1ca06641 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 18:48:22 +0000 Subject: [PATCH 33/57] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 59d2023..04bafbc 100644 --- a/booth.spec +++ b/booth.spec @@ -31,7 +31,7 @@ %global git_describe_str v1.0-251-gbfb2f924c07db823f5c934d1aafbc5181bb25148 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 1 +%global release 2 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 1.0-251.2.bfb2f92.git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu May 20 2021 Jan Friesse - 1.0-251.1.bfb2f92.git - Rebase to newest upstream snapshot From 167afa01db162f71c326e7aed4d27d386b4dfad8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 22:31:58 +0000 Subject: [PATCH 34/57] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 04bafbc..e8448f4 100644 --- a/booth.spec +++ b/booth.spec @@ -31,7 +31,7 @@ %global git_describe_str v1.0-251-gbfb2f924c07db823f5c934d1aafbc5181bb25148 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 2 +%global release 3 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 1.0-251.3.bfb2f92.git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jul 21 2021 Fedora Release Engineering - 1.0-251.2.bfb2f92.git - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 908d7749f7b0be03cde618d3ad4c5e82faf6a156 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 19 May 2022 17:14:15 +0200 Subject: [PATCH 35/57] Rebase to newest upstream snapshot Signed-off-by: Jan Friesse --- booth.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/booth.spec b/booth.spec index e8448f4..0a00d2a 100644 --- a/booth.spec +++ b/booth.spec @@ -28,10 +28,10 @@ # This will be used to fill booth_ver, booth_numcomm and booth_sha1. # It is important to keep abbrev to get full length sha1! When updating source use # `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-251-gbfb2f924c07db823f5c934d1aafbc5181bb25148 +%global git_describe_str v1.0-262-gd0ac26cc0c2fb4069c2d095cc0bbe3f94f02c05e # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 3 +%global release 1 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu May 19 2022 Jan Friesse - 1.0-262.1.d0ac26c.git +- Rebase to newest upstream snapshot + * Wed Jan 19 2022 Fedora Release Engineering - 1.0-251.3.bfb2f92.git - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index 86ae5b3..1b611a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-251-bfb2f92.tar.gz) = 6b8038c531456c5a2f6918c797ba877e6ad5cdd2d59f69f9281f5243a0faafa6cba5d06d046ff7917b8508a68de43deb748d73146cf8dfdfc142af5f1167ac2e +SHA512 (booth-1.0-262-d0ac26c.tar.gz) = 71f95d33e2c4351651b2e8daab151821eccbfb2f34d5cbb826f999c0c706cdc2c335698e479e63d2d852ed7cd360239b9eeb695533474c91c6681e6b8b5f7dbc From 19c989016e5f8ce4db9381ddd9ccd5637adcd6f6 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Wed, 20 Jul 2022 11:37:12 +0200 Subject: [PATCH 36/57] Rebase to newest upstream snapshot This version fixes a critical bug that caused the authfile directive to be ignored. After installing the patched version, nodes may stop communicating. Solution is to either remove authfile from configuration file or update all other nodes. Signed-off-by: Jan Friesse --- booth.spec | 9 ++++++++- sources | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/booth.spec b/booth.spec index 0a00d2a..3080019 100644 --- a/booth.spec +++ b/booth.spec @@ -28,7 +28,7 @@ # This will be used to fill booth_ver, booth_numcomm and booth_sha1. # It is important to keep abbrev to get full length sha1! When updating source use # `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-262-gd0ac26cc0c2fb4069c2d095cc0bbe3f94f02c05e +%global git_describe_str v1.0-266-gf288d5949073986a29d0286caec16c721e8e632a # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise %global release 1 @@ -310,6 +310,13 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jul 20 2022 Jan Friesse - 1.0-266.1.f288d59.git +- Rebase to newest upstream snapshot +- This version fixes a critical bug that caused the authfile directive + to be ignored. After installing the patched version, nodes may stop + communicating. Solution is to either remove authfile from configuration + file or update all other nodes. + * Thu May 19 2022 Jan Friesse - 1.0-262.1.d0ac26c.git - Rebase to newest upstream snapshot diff --git a/sources b/sources index 1b611a5..aa22c66 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-262-d0ac26c.tar.gz) = 71f95d33e2c4351651b2e8daab151821eccbfb2f34d5cbb826f999c0c706cdc2c335698e479e63d2d852ed7cd360239b9eeb695533474c91c6681e6b8b5f7dbc +SHA512 (booth-1.0-266-f288d59.tar.gz) = 83e62008c03497902787ca702a472890debdec8126848ac6fed164a925d7cfa57c3db173e045e34942723c3814cbe1fc91ad3de3c9a4b4988c27005f799942fc From b5637a2724ec98f4a77a0209f25095408e6d8a33 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 22:11:31 +0000 Subject: [PATCH 37/57] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 3080019..b436af4 100644 --- a/booth.spec +++ b/booth.spec @@ -31,7 +31,7 @@ %global git_describe_str v1.0-266-gf288d5949073986a29d0286caec16c721e8e632a # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 1 +%global release 2 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 1.0-266.2.f288d59.git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jul 20 2022 Jan Friesse - 1.0-266.1.f288d59.git - Rebase to newest upstream snapshot - This version fixes a critical bug that caused the authfile directive From 654dae39a92d7609ad8d90be40c9420eeff0e17c Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Tue, 9 Aug 2022 09:57:03 +0200 Subject: [PATCH 38/57] Remove template unit from systemd_* macro Signed-off-by: Jan Friesse --- booth.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/booth.spec b/booth.spec index b436af4..1153645 100644 --- a/booth.spec +++ b/booth.spec @@ -31,7 +31,7 @@ %global git_describe_str v1.0-266-gf288d5949073986a29d0286caec16c721e8e632a # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 2 +%global release 3 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -144,13 +144,13 @@ Support for running Booth, ticket manager for multi-site clusters, as an arbitrator. %post arbitrator -%systemd_post booth@.service booth-arbitrator.service +%systemd_post booth-arbitrator.service %preun arbitrator -%systemd_preun booth@.service booth-arbitrator.service +%systemd_preun booth-arbitrator.service %postun arbitrator -%systemd_postun_with_restart booth@.service booth-arbitrator.service +%systemd_postun_with_restart booth-arbitrator.service %package site Summary: Booth support for running as a full-fledged site @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Aug 09 2022 Jan Friesse - 1.0-266.3.f288d59.git +- Remove template unit from systemd_(post|preun|postun_with_restart) macro + * Wed Jul 20 2022 Fedora Release Engineering - 1.0-266.2.f288d59.git - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From e383d1fdf8f4ea99d68500faa881ea8a3328e136 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 29 Sep 2022 10:09:29 +0200 Subject: [PATCH 39/57] Remove Alias directive from booth@.service unit Signed-off-by: Jan Friesse --- 0001-unit-file-Remove-Alias-directive.patch | 30 +++++++++++++++++++++ booth.rpmlintrc | 4 +-- booth.spec | 6 ++++- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 0001-unit-file-Remove-Alias-directive.patch diff --git a/0001-unit-file-Remove-Alias-directive.patch b/0001-unit-file-Remove-Alias-directive.patch new file mode 100644 index 0000000..9457836 --- /dev/null +++ b/0001-unit-file-Remove-Alias-directive.patch @@ -0,0 +1,30 @@ +From dd090510d7fba88c41adc1b70804c1c79b036736 Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Tue, 27 Sep 2022 18:50:31 +0200 +Subject: [PATCH] unit file: Remove Alias directive + +Recent change in systemd made imposible to enable booth@.service any +longer - more details in BZ +https://bugzilla.redhat.com/show_bug.cgi?id=2128998. Solution is to +delete Alias directive. + +Signed-off-by: Jan Friesse +--- + conf/booth@.service.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/conf/booth@.service.in b/conf/booth@.service.in +index e516194..e4b8fbc 100644 +--- a/conf/booth@.service.in ++++ b/conf/booth@.service.in +@@ -8,7 +8,6 @@ ConditionFileNotEmpty=/etc/booth/%i.conf + Conflicts=pacemaker.service + + [Install] +-Alias=boothd + WantedBy=multi-user.target + + [Service] +-- +2.27.0 + diff --git a/booth.rpmlintrc b/booth.rpmlintrc index ae1945c..a123536 100644 --- a/booth.rpmlintrc +++ b/booth.rpmlintrc @@ -17,7 +17,7 @@ addFilter(r'booth-(site|test)\.[^:]+: (W|E): only-non-binary-in-usr-lib') # dangling symlink is ok for geostore and boothd (they actually points to booth binary) addFilter(r'booth-site\.[^:]+: (W|E): dangling-symlink /usr/sbin/geostore /usr/sbin/boothd') -addFilter(r'booth-test\.[^:]+: (W|E): dangling-symlink /usr/share/booth/tests/src/boothd /usr/sbin/boothd') +#addFilter(r'booth-test\.[^:]+: (W|E): dangling-symlink /usr/share/booth/tests/src/boothd /usr/sbin/boothd') # booth unit test is distributed non-executable by upstream -addFilter(r'booth-test\.[^:]+: (W|E): non-executable-script /usr/share/booth/tests/unit-test.py') +#addFilter(r'booth-test\.[^:]+: (W|E): non-executable-script /usr/share/booth/tests/unit-test.py') diff --git a/booth.spec b/booth.spec index 1153645..386d09f 100644 --- a/booth.spec +++ b/booth.spec @@ -31,7 +31,7 @@ %global git_describe_str v1.0-266-gf288d5949073986a29d0286caec16c721e8e632a # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 3 +%global release 4 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -62,6 +62,7 @@ Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{booth_short_sha1}/%{booth_archive_name}.tar.gz +Patch1: 0001-unit-file-Remove-Alias-directive.patch # direct build process dependencies BuildRequires: autoconf @@ -310,6 +311,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu Sep 29 2022 Jan Friesse - 1.0-266.4.f288d59.git +- Remove Alias directive from booth@.service unit file + * Tue Aug 09 2022 Jan Friesse - 1.0-266.3.f288d59.git - Remove template unit from systemd_(post|preun|postun_with_restart) macro From 57a42bb54e25fed1a08b356eec676d541bebe33c Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 29 Sep 2022 10:34:28 +0200 Subject: [PATCH 40/57] Improve rpmlintrc Signed-off-by: Jan Friesse --- booth.rpmlintrc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/booth.rpmlintrc b/booth.rpmlintrc index a123536..a0a2c1c 100644 --- a/booth.rpmlintrc +++ b/booth.rpmlintrc @@ -1,6 +1,7 @@ -# no-documentation is fine for booth-arbitrator and booth (virtual package) +# no-documentation is fine for booth-arbitrator and booth (virtual package) and debug packages addFilter(r'booth-arbitrator\.[^:]+: W: no-documentation') addFilter(r'booth\.[^:]+: W: no-documentation') +addFilter(r'booth-debugsource\.[^:]+: W: no-documentation') # permissions for chroot addFilter(r'booth-core\.[^:]+: (E|W): non-standard-dir-perm /var/lib/booth 750') @@ -17,7 +18,10 @@ addFilter(r'booth-(site|test)\.[^:]+: (W|E): only-non-binary-in-usr-lib') # dangling symlink is ok for geostore and boothd (they actually points to booth binary) addFilter(r'booth-site\.[^:]+: (W|E): dangling-symlink /usr/sbin/geostore /usr/sbin/boothd') -#addFilter(r'booth-test\.[^:]+: (W|E): dangling-symlink /usr/share/booth/tests/src/boothd /usr/sbin/boothd') +addFilter(r'booth-test\.[^:]+: (W|E): dangling-symlink /usr/share/booth/tests/src/boothd /usr/sbin/boothd') -# booth unit test is distributed non-executable by upstream -#addFilter(r'booth-test\.[^:]+: (W|E): non-executable-script /usr/share/booth/tests/unit-test.py') +# Ignore all errors in debuginfo packages +addFilter(r'booth-core-debuginfo\.[^:]+: (W|E):') + +# booth-arbitrator contains just unit files +addFilter(r'booth-arbitrator\.[^:]+: (W|E): only-non-binary-in-usr-lib') From 157c0b0f889edd03ee500f86eeec9f31d5f5f61d Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Fri, 30 Sep 2022 16:41:47 +0200 Subject: [PATCH 41/57] Rebase to newest upstream snapshot Signed-off-by: Jan Friesse --- 0001-unit-file-Remove-Alias-directive.patch | 30 --------------------- booth.spec | 8 +++--- sources | 2 +- 3 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 0001-unit-file-Remove-Alias-directive.patch diff --git a/0001-unit-file-Remove-Alias-directive.patch b/0001-unit-file-Remove-Alias-directive.patch deleted file mode 100644 index 9457836..0000000 --- a/0001-unit-file-Remove-Alias-directive.patch +++ /dev/null @@ -1,30 +0,0 @@ -From dd090510d7fba88c41adc1b70804c1c79b036736 Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Tue, 27 Sep 2022 18:50:31 +0200 -Subject: [PATCH] unit file: Remove Alias directive - -Recent change in systemd made imposible to enable booth@.service any -longer - more details in BZ -https://bugzilla.redhat.com/show_bug.cgi?id=2128998. Solution is to -delete Alias directive. - -Signed-off-by: Jan Friesse ---- - conf/booth@.service.in | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/conf/booth@.service.in b/conf/booth@.service.in -index e516194..e4b8fbc 100644 ---- a/conf/booth@.service.in -+++ b/conf/booth@.service.in -@@ -8,7 +8,6 @@ ConditionFileNotEmpty=/etc/booth/%i.conf - Conflicts=pacemaker.service - - [Install] --Alias=boothd - WantedBy=multi-user.target - - [Service] --- -2.27.0 - diff --git a/booth.spec b/booth.spec index 386d09f..e5e3be0 100644 --- a/booth.spec +++ b/booth.spec @@ -28,10 +28,10 @@ # This will be used to fill booth_ver, booth_numcomm and booth_sha1. # It is important to keep abbrev to get full length sha1! When updating source use # `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-266-gf288d5949073986a29d0286caec16c721e8e632a +%global git_describe_str v1.0-272-g7acb75787196c25e66a0f749f690888bad066bf4 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 4 +%global release 1 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -62,7 +62,6 @@ Summary: Ticket Manager for Multi-site Clusters License: GPLv2+ Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{booth_short_sha1}/%{booth_archive_name}.tar.gz -Patch1: 0001-unit-file-Remove-Alias-directive.patch # direct build process dependencies BuildRequires: autoconf @@ -311,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Fri Sep 30 2022 Jan Friesse - 1.0-272.1.7acb757.git +- Rebase to newest upstream snapshot + * Thu Sep 29 2022 Jan Friesse - 1.0-266.4.f288d59.git - Remove Alias directive from booth@.service unit file diff --git a/sources b/sources index aa22c66..ea7b2c5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-266-f288d59.tar.gz) = 83e62008c03497902787ca702a472890debdec8126848ac6fed164a925d7cfa57c3db173e045e34942723c3814cbe1fc91ad3de3c9a4b4988c27005f799942fc +SHA512 (booth-1.0-272-7acb757.tar.gz) = 08d8930e7a14756ddc18ff5bcbe7e51496826df0cdb744941107fb6f1b6c05eefc909f12fcb269076a5ecc1d38f4ad35c40f022cccc66e685be99408371310d9 From 7d7721ffa53fa6c8760bf83afca15bc08e7f4e16 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Mon, 21 Nov 2022 16:25:07 +0100 Subject: [PATCH 42/57] Rebase to newest upstream snapshot Signed-off-by: Jan Friesse --- booth.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/booth.spec b/booth.spec index e5e3be0..4ce0809 100644 --- a/booth.spec +++ b/booth.spec @@ -28,7 +28,7 @@ # This will be used to fill booth_ver, booth_numcomm and booth_sha1. # It is important to keep abbrev to get full length sha1! When updating source use # `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-272-g7acb75787196c25e66a0f749f690888bad066bf4 +%global git_describe_str v1.0-283-g9d4029aa14323a7f3b496215d25e40bd14f33632 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise %global release 1 @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Mon Nov 21 2022 Jan Friesse - 1.0-283.1.9d4029a.git +- Rebase to newest upstream snapshot + * Fri Sep 30 2022 Jan Friesse - 1.0-272.1.7acb757.git - Rebase to newest upstream snapshot diff --git a/sources b/sources index ea7b2c5..7e9c107 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-272-7acb757.tar.gz) = 08d8930e7a14756ddc18ff5bcbe7e51496826df0cdb744941107fb6f1b6c05eefc909f12fcb269076a5ecc1d38f4ad35c40f022cccc66e685be99408371310d9 +SHA512 (booth-1.0-283-9d4029a.tar.gz) = 628a3e1e128d0fdcd4600d8d4b46220363575bda83c85cd43bfe940a2a29a9176490342261354138f8d4c593b611cf0282653c1e4b3d4b4841d99ef31ba45ada From 60703dfc8c8c0aa802096dece5d9bdc695d1ab8a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 23:05:26 +0000 Subject: [PATCH 43/57] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 4ce0809..9e235c4 100644 --- a/booth.spec +++ b/booth.spec @@ -31,7 +31,7 @@ %global git_describe_str v1.0-283-g9d4029aa14323a7f3b496215d25e40bd14f33632 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 1 +%global release 2 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 1.0-283.2.9d4029a.git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Mon Nov 21 2022 Jan Friesse - 1.0-283.1.9d4029a.git - Rebase to newest upstream snapshot From 4e2392507fd3c734e594c1c25ef57e8d5777438e Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Tue, 6 Jun 2023 11:00:55 +0200 Subject: [PATCH 44/57] Migrated to SPDX license Signed-off-by: Jan Friesse --- booth.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/booth.spec b/booth.spec index 9e235c4..8482165 100644 --- a/booth.spec +++ b/booth.spec @@ -31,7 +31,7 @@ %global git_describe_str v1.0-283-g9d4029aa14323a7f3b496215d25e40bd14f33632 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 2 +%global release 3 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -59,7 +59,7 @@ Name: booth Version: %{booth_ver} Release: %{booth_numcomm}.%{release}.%{booth_short_sha1}.git%{?dist} Summary: Ticket Manager for Multi-site Clusters -License: GPLv2+ +License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} Source0: https://github.com/%{github_owner}/%{name}/archive/%{booth_short_sha1}/%{booth_archive_name}.tar.gz @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Jun 06 2023 Jan Friesse - 1.0-283.3.9d4029a.git +- migrated to SPDX license + * Wed Jan 18 2023 Fedora Release Engineering - 1.0-283.2.9d4029a.git - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From d1dc7ab52bff837ddfb255e1493d06b77a9a8a54 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 14:50:33 +0000 Subject: [PATCH 45/57] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 8482165..3d34ea3 100644 --- a/booth.spec +++ b/booth.spec @@ -31,7 +31,7 @@ %global git_describe_str v1.0-283-g9d4029aa14323a7f3b496215d25e40bd14f33632 # Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 3 +%global release 4 # Run shell script to parse git_describe str into version, numcomm and sha1 hash %global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) @@ -310,6 +310,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 1.0-283.4.9d4029a.git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jun 06 2023 Jan Friesse - 1.0-283.3.9d4029a.git - migrated to SPDX license From 3838e60516e2c4ada00e3e9df2be60b87e00dd06 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Wed, 18 Oct 2023 17:23:25 +0200 Subject: [PATCH 46/57] New upstream release Signed-off-by: Jan Friesse --- booth.spec | 29 +++++++++-------------------- sources | 2 +- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/booth.spec b/booth.spec index 3d34ea3..e66a21e 100644 --- a/booth.spec +++ b/booth.spec @@ -24,22 +24,6 @@ %bcond_with run_build_tests %bcond_with include_unit_test -# set following to the result of `git describe --abbrev=128 $commit` -# This will be used to fill booth_ver, booth_numcomm and booth_sha1. -# It is important to keep abbrev to get full length sha1! When updating source use -# `spectool -g booth.spec` to download source. -%global git_describe_str v1.0-283-g9d4029aa14323a7f3b496215d25e40bd14f33632 - -# Set this to 1 when rebasing (changing git_describe_str) and increase otherwise -%global release 4 - -# Run shell script to parse git_describe str into version, numcomm and sha1 hash -%global booth_ver %(s=%{git_describe_str}; vver=${s%%%%-*}; echo ${vver:1}) -%global booth_numcomm %(s=%{git_describe_str}; t=${s#*-}; echo ${t%%%%-*}) -%global booth_sha1 %(s=%{git_describe_str}; t=${s##*-}; echo ${t:1}) -%global booth_short_sha1 %(s=%{booth_sha1}; echo ${s:0:7}) -%global booth_archive_name %{name}-%{booth_ver}-%{booth_numcomm}-%{booth_short_sha1} - ## User and group to use for nonprivileged services (should be in sync with pacemaker) %global uname hacluster %global gname haclient @@ -56,12 +40,12 @@ %global test_path %{_datadir}/booth/tests Name: booth -Version: %{booth_ver} -Release: %{booth_numcomm}.%{release}.%{booth_short_sha1}.git%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} -Source0: https://github.com/%{github_owner}/%{name}/archive/%{booth_short_sha1}/%{booth_archive_name}.tar.gz +Source0: https://github.com/%{github_owner}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz # direct build process dependencies BuildRequires: autoconf @@ -192,7 +176,7 @@ Automated tests for running Booth, ticket manager for multi-site clusters. # BUILD # %prep -%autosetup -n %{name}-%{booth_sha1} -S git_am +%autosetup -n %{name}-%{version} -S git_am %build ./autogen.sh @@ -310,6 +294,11 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Oct 18 2023 Jan Friesse - 1.1-1 +- New upstream release +- Upstream releases should now be released regularly, so convert spec + to use them instead of git snapshots + * Wed Jul 19 2023 Fedora Release Engineering - 1.0-283.4.9d4029a.git - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 7e9c107..a79876c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.0-283-9d4029a.tar.gz) = 628a3e1e128d0fdcd4600d8d4b46220363575bda83c85cd43bfe940a2a29a9176490342261354138f8d4c593b611cf0282653c1e4b3d4b4841d99ef31ba45ada +SHA512 (booth-1.1.tar.gz) = dacc3258dd9a5f0dd72406eae753fb4900922bd2d906817a28c9ece7d7a1caaf5fd16959f8dff450382105358f2898c594171ae229ccd94e4d07f49668b0410d From aa5db6bc108fdf4f3b895a93c625735748f7a4d5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 14:37:10 +0000 Subject: [PATCH 47/57] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index e66a21e..faee685 100644 --- a/booth.spec +++ b/booth.spec @@ -41,7 +41,7 @@ Name: booth Version: 1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} @@ -294,6 +294,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Oct 18 2023 Jan Friesse - 1.1-1 - New upstream release - Upstream releases should now be released regularly, so convert spec From 30c181b1bf96dc0e0637e9fadd97e076372a82b1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 23 Jan 2024 00:42:48 +0000 Subject: [PATCH 48/57] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index faee685..6f7068f 100644 --- a/booth.spec +++ b/booth.spec @@ -41,7 +41,7 @@ Name: booth Version: 1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} @@ -294,6 +294,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Tue Jan 23 2024 Fedora Release Engineering - 1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 9bab0b35941cdf11e79311dbe5d5c8910b756636 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Fri, 7 Jun 2024 08:51:54 +0200 Subject: [PATCH 49/57] New upstream release Signed-off-by: Jan Friesse --- booth.spec | 14 ++++++-------- sources | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/booth.spec b/booth.spec index 6f7068f..f105247 100644 --- a/booth.spec +++ b/booth.spec @@ -22,7 +22,6 @@ %bcond_with html_man %bcond_with glue %bcond_with run_build_tests -%bcond_with include_unit_test ## User and group to use for nonprivileged services (should be in sync with pacemaker) %global uname hacluster @@ -40,8 +39,8 @@ %global test_path %{_datadir}/booth/tests Name: booth -Version: 1.1 -Release: 3%{?dist} +Version: 1.2 +Release: 1%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} @@ -59,7 +58,7 @@ BuildRequires: asciidoctor BuildRequires: gcc BuildRequires: pkgconfig # linking dependencies -BuildRequires: libgcrypt-devel +BuildRequires: gnutls-devel BuildRequires: libxml2-devel ## just for include BuildRequires: pacemaker-libs-devel @@ -208,10 +207,6 @@ mkdir -p %{buildroot}/%{test_path} # Copy tests from tarball cp -a -t %{buildroot}/%{test_path} \ -- conf test -%if 0%{?with_include_unit_test} -cp -a -t %{buildroot}/%{test_path} \ - -- unit-tests script/unit-test.py -%endif chmod +x %{buildroot}/%{test_path}/test/booth_path chmod +x %{buildroot}/%{test_path}/test/live_test.sh mkdir -p %{buildroot}/%{test_path}/src @@ -294,6 +289,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Fri Jun 07 2024 Jan Friesse - 1.2-1 +- New upstream release + * Tue Jan 23 2024 Fedora Release Engineering - 1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index a79876c..67b588e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.1.tar.gz) = dacc3258dd9a5f0dd72406eae753fb4900922bd2d906817a28c9ece7d7a1caaf5fd16959f8dff450382105358f2898c594171ae229ccd94e4d07f49668b0410d +SHA512 (booth-1.2.tar.gz) = b63217e561fd5e8ede1ba432ec6b4ef6efb73dc16a501814cf07b82f87a23c3f734ebf09c56a5d521668ee57ed02be48d257aabb1d2e3c4840f1219ef13d3fde From 10f558600c515975a487d1f24b64cd7f070a6890 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Fri, 7 Jun 2024 17:50:28 +0200 Subject: [PATCH 50/57] Remove include_unit_test leftover Signed-off-by: Jan Friesse --- booth.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/booth.spec b/booth.spec index f105247..46be67f 100644 --- a/booth.spec +++ b/booth.spec @@ -163,9 +163,6 @@ Requires: %{name}-arbitrator = %{version}-%{release} Requires: %{name}-site = %{version}-%{release} Requires: gdb Requires: %{__python3} -%if 0%{?with_include_unit_test} -Requires: python3-pexpect -%endif # runtests.py suite (for perl and ss) Requires: perl-interpreter iproute From 9cfe41e4cb76a06f7528811e7583c8267a1495c6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 18:31:15 +0000 Subject: [PATCH 51/57] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 46be67f..cc59bde 100644 --- a/booth.spec +++ b/booth.spec @@ -40,7 +40,7 @@ Name: booth Version: 1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} @@ -286,6 +286,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Jan Friesse - 1.2-1 - New upstream release From a5992c0c6ebf856968b7a5b236b93a9b81fb1f86 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 12:46:29 +0000 Subject: [PATCH 52/57] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index cc59bde..16a5a36 100644 --- a/booth.spec +++ b/booth.spec @@ -40,7 +40,7 @@ Name: booth Version: 1.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} @@ -286,6 +286,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 17 2024 Fedora Release Engineering - 1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 940a96107103cb4f35a0c239939c44712c61bd41 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 17:50:02 +0000 Subject: [PATCH 53/57] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 16a5a36..49124cc 100644 --- a/booth.spec +++ b/booth.spec @@ -40,7 +40,7 @@ Name: booth Version: 1.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} @@ -286,6 +286,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jan 16 2025 Fedora Release Engineering - 1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From b67eb9fd30eb83de8a4b84a6f0b167cacea24881 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 12:40:20 +0200 Subject: [PATCH 54/57] Rebuilt for Python 3.14.0rc2 bytecode --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index 49124cc..490a193 100644 --- a/booth.spec +++ b/booth.spec @@ -40,7 +40,7 @@ Name: booth Version: 1.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} @@ -286,6 +286,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Fri Aug 15 2025 Python Maint - 1.2-5 +- Rebuilt for Python 3.14.0rc2 bytecode + * Wed Jul 23 2025 Fedora Release Engineering - 1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 59251abe216a4ecb9fe7e068284032ed23b2e9e7 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Thu, 21 Aug 2025 19:19:14 +0200 Subject: [PATCH 55/57] Convert STI tests to TMT (rhbz#2382867) --- .fmf/version | 1 + booth.spec | 3 +++ plans.fmf | 13 +++++++++++++ tests/main.fmf | 3 +++ tests/tests.yml | 9 --------- 5 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 .fmf/version create mode 100644 plans.fmf create mode 100644 tests/main.fmf delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/booth.spec b/booth.spec index 490a193..ab74ba2 100644 --- a/booth.spec +++ b/booth.spec @@ -286,6 +286,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Thu Aug 21 2025 Cristian Le +- Convert STI tests to TMT (rhbz#2382867) + * Fri Aug 15 2025 Python Maint - 1.2-5 - Rebuilt for Python 3.14.0rc2 bytecode diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..eb36cda --- /dev/null +++ b/plans.fmf @@ -0,0 +1,13 @@ +summary: Run all tests +discover: + how: fmf +prepare: + - name: Disable installing everything from srpm + how: install + exclude: ".*" + - name: Install the main test package + how: install + package: + - booth-test +execute: + how: tmt diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..6e8835d --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,3 @@ +/upstream: + summary: Run upstream tests + test: ./upstream/runtest.sh diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 8ee75ea..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,9 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - tests: - - upstream - required_packages: - - booth-test From 676cc02d31e2f8338226be538e487b2af52f4816 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:09:18 +0200 Subject: [PATCH 56/57] Rebuilt for Python 3.14.0rc3 bytecode --- booth.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/booth.spec b/booth.spec index ab74ba2..8a7166e 100644 --- a/booth.spec +++ b/booth.spec @@ -40,7 +40,7 @@ Name: booth Version: 1.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0-or-later Url: https://github.com/%{github_owner}/%{name} @@ -286,6 +286,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Fri Sep 19 2025 Python Maint - 1.2-6 +- Rebuilt for Python 3.14.0rc3 bytecode + * Thu Aug 21 2025 Cristian Le - Convert STI tests to TMT (rhbz#2382867) From 48221721238cf603f4fa488ac84172eafb18e9a7 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Wed, 1 Oct 2025 14:27:04 +0200 Subject: [PATCH 57/57] Ensure test is executable --- tests/upstream/runtest.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/upstream/runtest.sh diff --git a/tests/upstream/runtest.sh b/tests/upstream/runtest.sh old mode 100644 new mode 100755