diff --git a/Fix-glib-hash_table-is-not-NULL-assert.patch b/Fix-glib-hash_table-is-not-NULL-assert.patch deleted file mode 100644 index 6314d7973021c4c433e598ff14c8aac64a71bdb6..0000000000000000000000000000000000000000 --- a/Fix-glib-hash_table-is-not-NULL-assert.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c642d0efb5606101b8ea0d30b95cb1b47af05e1d Mon Sep 17 00:00:00 2001 -From: bizhiyuan -Date: Tue, 17 Oct 2023 17:31:21 +0800 -Subject: [PATCH] Fix glib hash_table is not NULL assert - ---- - src/attr.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/attr.c b/src/attr.c -index 09c15bc..5f057ae 100644 ---- a/src/attr.c -+++ b/src/attr.c -@@ -357,6 +357,8 @@ static cmd_result_t attr_get(struct ticket_config *tk, int fd, struct boothc_att - * lookup attr - * send value - */ -+ if (!tk->attr) -+ return RLT_NO_SUCH_ATTR; - - a = (struct geo_attr *)g_hash_table_lookup(tk->attr, msg->attr.name); - if (!a) -@@ -392,6 +394,9 @@ static cmd_result_t attr_list(struct ticket_config *tk, int fd, struct boothc_at - return RLT_SYNC_FAIL; - } - g_hash_table_foreach(tk->attr, append_attr, data); -+ if (tk->attr) { -+ g_hash_table_foreach(tk->attr, append_attr, data); -+ } - - init_header(&hdr.header, ATTR_LIST, 0, 0, RLT_SUCCESS, 0, - sizeof(hdr) + data->len); --- -2.27.0 - diff --git a/booth-1.0-283-9d4029a.tar.gz b/booth-1.0-283-9d4029a.tar.gz deleted file mode 100644 index 0717e28887c94fc7c9ea7667fd18b6dd36dc2b57..0000000000000000000000000000000000000000 Binary files a/booth-1.0-283-9d4029a.tar.gz and /dev/null differ diff --git a/booth-1.1.tar.gz b/booth-1.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..86f416b8aa7fb1b538c6c5c2a9b83a8e784374a2 Binary files /dev/null and b/booth-1.1.tar.gz differ diff --git a/booth.spec b/booth.spec index eecabf1032b0a8816da5ac5a78cf2151f81e23f3..0c1872e89edca45cdc1f01019a3428ea2e47a992 100644 --- a/booth.spec +++ b/booth.spec @@ -1,23 +1,34 @@ +# RPMs are split as follows: +# * booth: +# - envelope package serving as a syntactic shortcut to install +# booth-site (with architecture reliably preserved) +# * booth-core: +# - package serving as a base for booth-{arbitrator,site}, +# carrying also basic documentation, license, etc. +# * booth-arbitrator: +# - package to be installed at a machine accessible within HA cluster(s), +# but not (necessarily) a member of any, hence no dependency +# on anything from cluster stack is required +# * booth-site: +# - package to be installed at a cluster member node +# (requires working cluster environment to be useful) +# * booth-test: +# - files for testing booth +# +# TODO: +# wireshark-dissector.lua currently of no use (rhbz#1259623), but if/when +# this no longer persists, add -wireshark package (akin to libvirt-wireshark) + %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. -# 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 9 +%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 # Disable automatic compilation of Python files in extra directories %global _python_bytecompile_extra 0 @@ -31,14 +42,12 @@ %global test_path %{_datadir}/booth/tests Name: booth -Version: %{booth_ver} +Version: 1.1 Release: %{release} 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 - -Patch0: Fix-glib-hash_table-is-not-NULL-assert.patch +Source0: https://github.com/%{github_owner}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz # direct build process dependencies BuildRequires: autoconf @@ -74,8 +83,10 @@ BuildRequires: sed BuildRequires: systemd ## for autosetup BuildRequires: git +%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 @@ -155,7 +166,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 @@ -165,7 +178,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 @@ -196,7 +209,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 @@ -220,7 +237,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 @@ -238,6 +257,12 @@ VERBOSE=1 make check %dir %attr (755, root, root) %{_var}/lib/booth/ %dir %attr (755, root, root) %{_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 @@ -258,6 +283,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 @@ -266,6 +296,9 @@ VERBOSE=1 make check %{_usr}/lib/ocf/resource.d/booth/sharedrsc %changelog +* Fri Nov 17 2023 bizhiyuan - 1.1-1 +- Update to version 1.1 + * Tue Oct 17 2023 bizhiyuan - 1.0-9 - Fix glib hash table is not NULL assert