diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/booth.spec b/booth.spec index 8a7166e..8482165 100644 --- a/booth.spec +++ b/booth.spec @@ -22,6 +22,23 @@ %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 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}) +%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 @@ -39,12 +56,12 @@ %global test_path %{_datadir}/booth/tests Name: booth -Version: 1.2 -Release: 6%{?dist} +Version: %{booth_ver} +Release: %{booth_numcomm}.%{release}.%{booth_short_sha1}.git%{?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}/releases/download/v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/%{github_owner}/%{name}/archive/%{booth_short_sha1}/%{booth_archive_name}.tar.gz # direct build process dependencies BuildRequires: autoconf @@ -58,7 +75,7 @@ BuildRequires: asciidoctor BuildRequires: gcc BuildRequires: pkgconfig # linking dependencies -BuildRequires: gnutls-devel +BuildRequires: libgcrypt-devel BuildRequires: libxml2-devel ## just for include BuildRequires: pacemaker-libs-devel @@ -163,6 +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 @@ -172,7 +192,7 @@ Automated tests for running Booth, ticket manager for multi-site clusters. # BUILD # %prep -%autosetup -n %{name}-%{version} -S git_am +%autosetup -n %{name}-%{booth_sha1} -S git_am %build ./autogen.sh @@ -204,6 +224,10 @@ 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 @@ -286,41 +310,6 @@ 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) - -* 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 - -* 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 - -* 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 - -* 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 - 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 - * Tue Jun 06 2023 Jan Friesse - 1.0-283.3.9d4029a.git - migrated to SPDX license diff --git a/plans.fmf b/plans.fmf deleted file mode 100644 index eb36cda..0000000 --- a/plans.fmf +++ /dev/null @@ -1,13 +0,0 @@ -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/sources b/sources index 67b588e..7e9c107 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.2.tar.gz) = b63217e561fd5e8ede1ba432ec6b4ef6efb73dc16a501814cf07b82f87a23c3f734ebf09c56a5d521668ee57ed02be48d257aabb1d2e3c4840f1219ef13d3fde +SHA512 (booth-1.0-283-9d4029a.tar.gz) = 628a3e1e128d0fdcd4600d8d4b46220363575bda83c85cd43bfe940a2a29a9176490342261354138f8d4c593b611cf0282653c1e4b3d4b4841d99ef31ba45ada diff --git a/tests/main.fmf b/tests/main.fmf deleted file mode 100644 index 6e8835d..0000000 --- a/tests/main.fmf +++ /dev/null @@ -1,3 +0,0 @@ -/upstream: - summary: Run upstream tests - test: ./upstream/runtest.sh 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 old mode 100755 new mode 100644