From 7eedf20dcd9e369e8ccc4bc497dd0ecf4f8b7a63 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 12 May 2025 20:17:08 +0100 Subject: [PATCH] Update to upstream 0.4.3 Resolves: RHEL-89836 Resolves: RHEL-78813 --- .gitignore | 1 + ...y-exclude-CentOS-from-test_boot.is_r.patch | 38 ------- snapm.spec | 107 ++++++------------ sources | 2 +- 4 files changed, 35 insertions(+), 113 deletions(-) delete mode 100644 0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch diff --git a/.gitignore b/.gitignore index aacd5b2..4295503 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /snapm-0.4.0.tar.gz +/snapm-0.4.3.tar.gz diff --git a/0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch b/0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch deleted file mode 100644 index 0e5264a..0000000 --- a/0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5b96245740eb8ee94ff744edb9cacd1d161ddec0 Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Fri, 20 Dec 2024 20:32:14 +0000 -Subject: [PATCH] tests: temporarily exclude CentOS from test_boot.is_redhat() - check - -The current version of boom-boot in CentOS Stream does not support -automatic --uname-pattern for CentOS installations: - - # boom profile create --from-host - Could not determine uname pattern for 'CentOS Stream' - -Exclude CentOS temporarily from the profile auto-creation test until -https://github.com/snapshotmanager/boom-boot/issues/59 is fixed and -available in the CentOS repos. ---- - tests/test_boot.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/tests/test_boot.py b/tests/test_boot.py -index a15ce5f..e8d76ee 100644 ---- a/tests/test_boot.py -+++ b/tests/test_boot.py -@@ -39,7 +39,10 @@ _VAR_TMP = "/var/tmp" - - - def is_redhat(): -- return os.path.exists("/etc/redhat-release") -+ # Exclude CentOS for now until the fix for boom-boot #59 is available -+ # in the CentOS repositories. -+ return (os.path.exists("/etc/redhat-release") -+ and not os.path.exists("/etc/centos-release")) - - - class BootTestsSimple(unittest.TestCase): --- -2.47.1 - diff --git a/snapm.spec b/snapm.spec index 1cdb86f..ed0d782 100644 --- a/snapm.spec +++ b/snapm.spec @@ -1,53 +1,32 @@ %global summary A set of tools for managing snapshots -%global sphinx_docs 1 Name: snapm -Version: 0.4.0 -Release: 2%{?dist} +Version: 0.4.3 +Release: 1%{?dist} Summary: %{summary} -License: GPL-2.0-only AND Apache-2.0 -URL: https://github.com/snapshotmanager/snapm +License: Apache-2.0 +URL: https://github.com/snapshotmanager/%{name} Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch1: 0001-tests-temporarily-exclude-CentOS-from-test_boot.is_r.patch BuildArch: noarch -BuildRequires: make -BuildRequires: python3-setuptools -BuildRequires: python3-devel -BuildRequires: python3-pip -BuildRequires: python3-wheel -BuildRequires: python3-boom -BuildRequires: python3-dbus-client-gen -BuildRequires: python3-dbus-python-client-gen -BuildRequires: python3-justbytes -BuildRequires: python3-packaging -BuildRequires: python3-dateutil -BuildRequires: python3-wcwidth -BuildRequires: python3-psutil -BuildRequires: python3-pytest -BuildRequires: lvm2 -BuildRequires: stratisd -BuildRequires: stratis-cli -%if 0%{?sphinx_docs} -BuildRequires: python3-sphinx BuildRequires: boom-boot -%endif +BuildRequires: lvm2 +BuildRequires: make +BuildRequires: stratis-cli +BuildRequires: stratisd +BuildRequires: python3-devel +BuildRequires: python3-sphinx Requires: python3-snapm = %{version}-%{release} Recommends: boom-boot %package -n python3-snapm Summary: %{summary} -%{?python_provide:%python_provide python3-snapm} -Requires: %{__python3} -Requires: python3-boom >= 1.6.4 -%if 0%{?sphinx_docs} %package -n python3-snapm-doc Summary: %{summary} -%endif %description Snapshot manager (snapm) is a tool for managing sets of snapshots on Linux @@ -61,83 +40,63 @@ the same time, representing the system state at the time the set was created. This package provides the python3 snapm module. -%if 0%{?sphinx_docs} %description -n python3-snapm-doc Snapshot manager (snapm) is a tool for managing sets of snapshots on Linux systems. The snapm tool allows snapshots of multiple volumes to be captured at the same time, representing the system state at the time the set was created. This package provides the python3 snapm module documentation in HTML format. -%endif %prep -%autosetup -p1 -n snapm-%{version} +%autosetup -p1 -n %{name}-%{version} + +%generate_buildrequires +%pyproject_buildrequires %build -%if 0%{?sphinx_docs} -make %{?_smp_mflags} -C doc html +%pyproject_wheel + +%{make_build} -C doc html rm doc/_build/html/.buildinfo mv doc/_build/html doc/html -rm -rf doc/html/_sources -rm -rf doc/_build -rm -f doc/*.rst -%endif - -%if 0%{?centos} || 0%{?rhel} -%py3_build -%else -%pyproject_wheel -%endif +rm -rf doc/html/_sources doc/_build +rm -f doc/*.rst doc/Makefile doc/conf.py %install -%if 0%{?centos} || 0%{?rhel} -%py3_install -%else %pyproject_install -%endif -mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man8 -install -m 644 man/man8/snapm.8 ${RPM_BUILD_ROOT}/%{_mandir}/man8 - -rm doc/Makefile -rm doc/conf.py +mkdir -p %{buildroot}/%{_mandir}/man8 +%{__install} -p -m 644 man/man8/snapm.8 %{buildroot}/%{_mandir}/man8 %check -pytest-3 --log-level=debug -v +%pytest --log-level=debug -v tests/ %files -# Main license for snapm (GPLv2) -%license COPYING -# License for snapm.manager.plugins.stratislib (Apache 2.0) -%license COPYING.stratislib +# Main license for snapm (Apache-2.0) +%license LICENSE %doc README.md %{_bindir}/snapm %doc %{_mandir}/man*/snapm.* %files -n python3-snapm -# Main license for snapm (GPLv2) -%license COPYING -# License for snapm.manager.plugins.stratislib (Apache 2.0) -%license COPYING.stratislib +# license for snapm (Apache-2.0) +%license LICENSE %doc README.md %{python3_sitelib}/%{name}/ -%if 0%{?centos} || 0%{?rhel} -%{python3_sitelib}/%{name}-*.egg-info/ -%else %{python3_sitelib}/%{name}*.dist-info/ -%endif -%if 0%{?sphinx_docs} %files -n python3-snapm-doc -# Main license for snapm (GPLv2) -%license COPYING -# License for snapm.manager.plugins.stratislib (Apache 2.0) -%license COPYING.stratislib +# license for snapm (Apache-2.0) +%license LICENSE %doc README.md %doc doc -%endif %changelog +* Mon May 12 2025 Bryn M. Reeves - 0.4.3-1 +- Update to upstream 0.4.3 + Resolves: RHEL-89836 + Resolves: RHEL-78813 + * Thu Jan 09 2025 Bryn M. Reeves - 0.4.0-2 - Bump release and rebuild Resolves: RHEL-59005 diff --git a/sources b/sources index 45c1aca..eebae8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (snapm-0.4.0.tar.gz) = d4829bef312212e0b122c241235cce6520dc1c37e11dbe32d1882485a2d81e94aa396d0957c13fee848e472ab3efcad18b262c5bfbb9a7fd08f74497d34f97ba +SHA512 (snapm-0.4.3.tar.gz) = 2a481781f1275fbbb6a5052fbc69379aa85b79f05b860e15aef7826ce75627cbfa6717a93c5a9b538f30ba01900fd70e856b8d5d7a417f010af6b4ec58fb377c