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/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.rpmlintrc b/booth.rpmlintrc index a0a2c1c..14f5ed5 100644 --- a/booth.rpmlintrc +++ b/booth.rpmlintrc @@ -1,7 +1,6 @@ -# no-documentation is fine for booth-arbitrator and booth (virtual package) and debug packages +# no-documentation is fine for booth-arbitrator and booth (virtual package) 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') @@ -10,9 +9,6 @@ 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') @@ -20,8 +16,5 @@ addFilter(r'booth-(site|test)\.[^:]+: (W|E): only-non-binary-in-usr-lib') 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') -# 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') +# 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') diff --git a/booth.spec b/booth.spec index 8a7166e..853c327 100644 --- a/booth.spec +++ b/booth.spec @@ -21,7 +21,6 @@ %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 @@ -30,8 +29,30 @@ # 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} @@ -39,12 +60,13 @@ %global test_path %{_datadir}/booth/tests Name: booth -Version: 1.2 -Release: 6%{?dist} +Version: %{boothver} +Release: %{boothrel}%{?dist}.4 Summary: Ticket Manager for Multi-site Clusters -License: GPL-2.0-or-later +License: GPLv2+ 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/%{commit}/%{name}-%{shortcommit}.tar.gz +Patch0: 0001-build-Do-not-link-with-pcmk-libraries.patch # direct build process dependencies BuildRequires: autoconf @@ -58,7 +80,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 @@ -80,10 +102,8 @@ 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 +# 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 @@ -91,9 +111,7 @@ BuildRequires: perl-interpreter iproute Requires: %{name}-core%{?_isa} Requires: %{name}-site %files -%license COPYING -%dir %{_datadir}/pkgconfig -%{_datadir}/pkgconfig/booth.pc +# intentionally empty %description Booth manages tickets which authorize cluster sites located @@ -127,13 +145,13 @@ Support for running Booth, ticket manager for multi-site clusters, as an arbitrator. %post arbitrator -%systemd_post booth-arbitrator.service +%systemd_post booth@.service booth-arbitrator.service %preun arbitrator -%systemd_preun booth-arbitrator.service +%systemd_preun booth@.service booth-arbitrator.service %postun arbitrator -%systemd_postun_with_restart booth-arbitrator.service +%systemd_postun_with_restart booth@.service booth-arbitrator.service %package site Summary: Booth support for running as a full-fledged site @@ -163,8 +181,9 @@ Requires: %{name}-arbitrator = %{version}-%{release} Requires: %{name}-site = %{version}-%{release} Requires: gdb Requires: %{__python3} -# runtests.py suite (for perl and ss) -Requires: perl-interpreter iproute +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. @@ -172,7 +191,7 @@ Automated tests for running Booth, ticket manager for multi-site clusters. # BUILD # %prep -%autosetup -n %{name}-%{version} -S git_am +%autosetup -n %{name}-%{commit} -S git_am %build ./autogen.sh @@ -180,7 +199,7 @@ Automated tests for running Booth, ticket manager for multi-site clusters. --with-initddir=%{_initrddir} \ --docdir=%{_pkgdocdir} \ --enable-user-flags \ - %{?with_html_man:--with-html_man} \ + %{!?with_html_man:--without-html_man} \ %{!?with_glue:--without-glue} \ PYTHON=%{__python3} %{make_build} @@ -203,7 +222,7 @@ rm -rf %{buildroot}/%{_pkgdocdir}/COPYING mkdir -p %{buildroot}/%{test_path} # Copy tests from tarball cp -a -t %{buildroot}/%{test_path} \ - -- conf test + -- conf test unit-tests script/unit-test.py chmod +x %{buildroot}/%{test_path}/test/booth_path chmod +x %{buildroot}/%{test_path}/test/live_test.sh mkdir -p %{buildroot}/%{test_path}/src @@ -227,9 +246,7 @@ 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 @@ -247,12 +264,6 @@ 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 @@ -273,11 +284,6 @@ 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 @@ -286,108 +292,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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 - -* 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 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..750160d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (booth-1.2.tar.gz) = b63217e561fd5e8ede1ba432ec6b4ef6efb73dc16a501814cf07b82f87a23c3f734ebf09c56a5d521668ee57ed02be48d257aabb1d2e3c4840f1219ef13d3fde +SHA512 (booth-ac1d34c.tar.gz) = 557bc42faceee65b272fefea6eaa8a6b2895f497fd0e20f2d29b15a967dc860cc0a518bae1c346fe5679714eb7b33ed14ff79ee087932c568b099529ec57fcfe 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