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/.gitignore b/.gitignore index 8503141..7911fc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -/snapm-0.4.0.tar.gz -/snapm-0.4.3.tar.gz -/snapm-0.5.1.tar.gz +snapm-0.4.3.tar.gz diff --git a/0001-tests-skip-test_create_snapshot_set_no_provider-if-i.patch b/0001-tests-skip-test_create_snapshot_set_no_provider-if-i.patch deleted file mode 100644 index c33c565..0000000 --- a/0001-tests-skip-test_create_snapshot_set_no_provider-if-i.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a25c448e741870d8baaff2d32e7afb47fc031857 Mon Sep 17 00:00:00 2001 -From: "Bryn M. Reeves" -Date: Wed, 5 Nov 2025 11:16:23 +0000 -Subject: [PATCH] tests: skip test_create_snapshot_set_no_provider if - !ismount("/boot") - -Resolves: #588 - -Signed-off-by: Bryn M. Reeves ---- - tests/test_manager.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tests/test_manager.py b/tests/test_manager.py -index 62c0603..5dc8ea4 100644 ---- a/tests/test_manager.py -+++ b/tests/test_manager.py -@@ -8,6 +8,7 @@ - import unittest - import logging - import os -+import os.path - from uuid import UUID - from json import loads - import tempfile -@@ -506,6 +507,7 @@ class ManagerTests(unittest.TestCase): - with self.assertRaises(snapm.SnapmPathError) as cm: - self.manager.create_snapshot_set("testset0", [non_mount]) - -+ @unittest.skipIf(not os.path.ismount("/boot"), "no suitable mount path") - def test_create_snapshot_set_no_provider(self): - with self.assertRaises(snapm.SnapmNoProviderError): - self.manager.create_snapshot_set("testset0", ["/boot"]) --- -2.51.0 - diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index 4ca9235..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-10 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plans/main.fmf b/plans/main.fmf deleted file mode 100644 index 22ce2f3..0000000 --- a/plans/main.fmf +++ /dev/null @@ -1,32 +0,0 @@ -summary: Run snapm unit tests from dist-git sources -discover: - how: fmf - dist-git-source: true - -execute: - how: tmt - -prepare: - - name: Install packages - how: install - package: - - stratisd - - stratis-cli - - lvm2 - - python3-boom - - python3-pytest - - boom-boot - - rpmdevtools - - name: Enable Stratisd - how: shell - script: | - systemctl enable --now stratisd - - name: Enable CRB - how: shell - script: | - dnf install -y "dnf-command(config-manager)" ; - dnf config-manager --set-enabled crb || true - - name: Create boom OsProfile - how: shell - script: | - boom profile create --from-host diff --git a/snapm.spec b/snapm.spec index a13a971..0607150 100644 --- a/snapm.spec +++ b/snapm.spec @@ -1,14 +1,13 @@ %global summary A set of tools for managing snapshots Name: snapm -Version: 0.5.1 -Release: %autorelease +Version: 0.4.3 +Release: 1%{?dist} Summary: %{summary} License: Apache-2.0 URL: https://github.com/snapshotmanager/%{name} Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch1: 0001-tests-skip-test_create_snapshot_set_no_provider-if-i.patch BuildArch: noarch @@ -17,12 +16,8 @@ BuildRequires: lvm2 BuildRequires: make BuildRequires: stratis-cli BuildRequires: stratisd -BuildRequires: systemd-rpm-macros BuildRequires: python3-devel BuildRequires: python3-sphinx -%if 0%{?fedora} -BuildRequires: libfaketime -%endif Requires: python3-snapm = %{version}-%{release} Recommends: boom-boot @@ -70,32 +65,8 @@ rm -f doc/*.rst doc/Makefile doc/conf.py %install %pyproject_install -mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name}/plugins.d -mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name}/schedule.d -%{__install} -p -m 644 etc/%{name}/snapm.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name} -%{__install} -p -m 644 etc/%{name}/plugins.d/lvm2-cow.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name}/plugins.d -%{__install} -p -m 644 etc/%{name}/plugins.d/lvm2-thin.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name}/plugins.d -%{__install} -p -m 644 etc/%{name}/plugins.d/stratis.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name}/plugins.d - -mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man8 -mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man5 -%{__install} -p -m 644 man/man8/snapm.8 ${RPM_BUILD_ROOT}/%{_mandir}/man8 -%{__install} -p -m 644 man/man5/snapm.conf.5 ${RPM_BUILD_ROOT}/%{_mandir}/man5 -%{__install} -p -m 644 man/man5/snapm-plugins.d.5 ${RPM_BUILD_ROOT}/%{_mandir}/man5 -%{__install} -p -m 644 man/man5/snapm-schedule.d.5 ${RPM_BUILD_ROOT}/%{_mandir}/man5 - -mkdir -p ${RPM_BUILD_ROOT}/%{_unitdir} -%{__install} -p -m 644 systemd/snapm-create@.service ${RPM_BUILD_ROOT}/%{_unitdir} -%{__install} -p -m 644 systemd/snapm-create@.timer ${RPM_BUILD_ROOT}/%{_unitdir} -%{__install} -p -m 644 systemd/snapm-gc@.service ${RPM_BUILD_ROOT}/%{_unitdir} -%{__install} -p -m 644 systemd/snapm-gc@.timer ${RPM_BUILD_ROOT}/%{_unitdir} - -mkdir -p ${RPM_BUILD_ROOT}/%{_tmpfilesdir} -%{__install} -p -m 644 systemd/tmpfiles.d/%{name}.conf ${RPM_BUILD_ROOT}/%{_tmpfilesdir}/ - -%{__install} -d -m 0700 ${RPM_BUILD_ROOT}/%{_rundir}/%{name} -%{__install} -d -m 0700 ${RPM_BUILD_ROOT}/%{_rundir}/%{name}/mounts -%{__install} -d -m 0700 ${RPM_BUILD_ROOT}/%{_rundir}/%{name}/lock +mkdir -p %{buildroot}/%{_mandir}/man8 +%{__install} -p -m 644 man/man8/snapm.8 %{buildroot}/%{_mandir}/man8 %check %pytest --log-level=debug -v tests/ @@ -105,18 +76,7 @@ mkdir -p ${RPM_BUILD_ROOT}/%{_tmpfilesdir} %license LICENSE %doc README.md %{_bindir}/snapm -%doc %{_mandir}/man*/snapm* -%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/snapm.conf -%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/plugins.d/* -%dir %attr(755, -, -) %{_sysconfdir}/%{name}/schedule.d -%attr(644, -, -) %{_unitdir}/snapm-create@.service -%attr(644, -, -) %{_unitdir}/snapm-create@.timer -%attr(644, -, -) %{_unitdir}/snapm-gc@.service -%attr(644, -, -) %{_unitdir}/snapm-gc@.timer -%attr(644, -, -) %{_tmpfilesdir}/%{name}.conf -%dir %{_rundir}/%{name}/ -%dir %{_rundir}/%{name}/mounts -%dir %{_rundir}/%{name}/lock +%doc %{_mandir}/man*/snapm.* %files -n python3-snapm # license for snapm (Apache-2.0) @@ -132,4 +92,13 @@ mkdir -p ${RPM_BUILD_ROOT}/%{_tmpfilesdir} %doc doc %changelog -%autochangelog +* Mon May 12 2025 Bryn M. Reeves - 0.4.3-1 +- Update to upstream 0.4.3 + Resolves: RHEL-80365 + Resolves: RHEL-76129 +* Thu Jan 09 2025 Bryn M. Reeves - 0.4.0-2 +- Bump release and rebuild + Resolves: RHEL-59006 +* Wed Dec 18 2024 Bryn M. Reeves - 0.4.0-1 +- Initial commit on c10s + Resolves: RHEL-59006 diff --git a/sources b/sources index 960fde9..eebae8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (snapm-0.5.1.tar.gz) = 30bec3d65c24732ad88ddc04ead12b2fafc96ca2e740283bae02b1214bd77f4d108cf1c597aaf27a487eec334243afac83b6ff8202adfe5224694302f40d7a99 +SHA512 (snapm-0.4.3.tar.gz) = 2a481781f1275fbbb6a5052fbc69379aa85b79f05b860e15aef7826ce75627cbfa6717a93c5a9b538f30ba01900fd70e856b8d5d7a417f010af6b4ec58fb377c diff --git a/tests/help/main.fmf b/tests/help/main.fmf deleted file mode 100644 index bd50be1..0000000 --- a/tests/help/main.fmf +++ /dev/null @@ -1,2 +0,0 @@ -summary: Test snapm --help output -test: ./test.sh diff --git a/tests/help/test.sh b/tests/help/test.sh deleted file mode 100755 index 1e7770f..0000000 --- a/tests/help/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -eux - -echo $TMT_SOURCE_DIR -ls $TMT_SOURCE_DIR -tmp=$(mktemp) -snapm --help > "$tmp" -grep 'Snapshot Manager' "$tmp" -rm "$tmp" diff --git a/tests/upstream/main.fmf b/tests/upstream/main.fmf deleted file mode 100644 index e1c137e..0000000 --- a/tests/upstream/main.fmf +++ /dev/null @@ -1,6 +0,0 @@ -summary: Run snapm upstream test suite -test: ./prepare-host-environment.sh; ./run-unit-tests.sh -require: -- python3-pytest -- python3-devel -duration: 90m diff --git a/tests/upstream/prepare-host-environment.sh b/tests/upstream/prepare-host-environment.sh deleted file mode 100755 index ff0c6cd..0000000 --- a/tests/upstream/prepare-host-environment.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/bash -# Prepare the host environment for running the snapm tests. -# This includes installing missing dependencies and tools. - -set -euxo pipefail - -# Move to the checked out git repo with the test plans -# this should be the root of the dist-git repo -cd "${TMT_TREE}" - -sudo dnf builddep -y snapm.spec diff --git a/tests/upstream/run-unit-tests.sh b/tests/upstream/run-unit-tests.sh deleted file mode 100755 index 7b3e7c0..0000000 --- a/tests/upstream/run-unit-tests.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/bash -# Execute snapm unit tests from a checked out dist-git repo - -set -euxo pipefail - -source /etc/os-release - -# Move to the directory with sources -cd ${TMT_SOURCE_DIR} - -# Extract the Source0 basename without extension -SRC_DIR=$(spectool --source 0 snapm.spec | sed 's/.\+\(snapm-[0-9.]\+\)\.tar\.gz/\1/') - -# Move to the extracted sources directory (patches are applied by default) -cd "${SRC_DIR}" - -# Configure snapm -cp -r etc/snapm/ /etc -cp systemd/*.service systemd/*.timer /usr/lib/systemd/system -cp systemd/tmpfiles.d/snapm.conf /usr/lib/tmpfiles.d -systemctl daemon-reload -systemd-tmpfiles --create /usr/lib/tmpfiles.d/snapm.conf - -# Run tests -sudo pytest -v --log-level=debug tests/ diff --git a/tests/version/main.fmf b/tests/version/main.fmf deleted file mode 100644 index e437edf..0000000 --- a/tests/version/main.fmf +++ /dev/null @@ -1,2 +0,0 @@ -summary: Test snapm --version output -test: ./test.sh diff --git a/tests/version/test.sh b/tests/version/test.sh deleted file mode 100755 index 8ce65b9..0000000 --- a/tests/version/test.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -eux - -tmp=$(mktemp) -snapm --version > "$tmp" -grep '0.5.1' "$tmp" -rm "$tmp"