public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/snapm] rawhide: Apply workaround for missing profile auto-creation on ELN
@ 2026-11-18 12:28 Bryn M. Reeves
  0 siblings, 0 replies; only message in thread
From: Bryn M. Reeves @ 2026-11-18 12:28 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/snapm
            Branch : rawhide
            Commit : b288fe8522a30e60983b6c1cc188ce935244b707
            Author : Bryn M. Reeves <bmr@redhat.com>
            Date   : 2026-11-17T19:07:03+00:00
            Stats  : +81/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/snapm/c/b288fe8522a30e60983b6c1cc188ce935244b707?branch=rawhide

            Log:
            Apply workaround for missing profile auto-creation on ELN

Upstream boom-boot does not currently support automatic --uname-pattern
for Fedora ELN: skip the one test that relies on it when ELN is
detected.

---
diff --git a/0001-tests-update-test-exclusions-for-CentOS-and-ELN.patch b/0001-tests-update-test-exclusions-for-CentOS-and-ELN.patch
new file mode 100644
index 0000000..21cd80c
--- /dev/null
+++ b/0001-tests-update-test-exclusions-for-CentOS-and-ELN.patch
@@ -0,0 +1,79 @@
+From af9f215cdf94fa35a004678e59f186f4dc63d298 Mon Sep 17 00:00:00 2001
+From: "Bryn M. Reeves" <bmr@redhat.com>
+Date: Tue, 17 Nov 2026 18:27:18 +0000
+Subject: [PATCH] tests: update test exclusions for CentOS and ELN
+
+Add is_eln() to allow temporarily excluding Fedora ELN from the auto
+profile create boot tests due to boom-boot#427 (lack of automatic
+--uname-pattern support for Fedora ELN).
+
+The exclusion for CentOS stream via is_redhat() can now be dropped (the
+fix for boom-boot#59 shipped in 1.6.6 and all supported streams are now
+shipping boom-boot >= 1.6.8).
+
+Resolves: #1060
+
+Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
+---
+ tests/__init__.py  | 19 ++++++++++++++++---
+ tests/test_boot.py |  4 ++--
+ 2 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/tests/__init__.py b/tests/__init__.py
+index 989fc87..fe62f78 100644
+--- a/tests/__init__.py
++++ b/tests/__init__.py
+@@ -88,12 +88,25 @@ class MockPlugin(plugins.Plugin):
+         raise NotImplementedError
+ 
+ 
++def is_eln():
++    """
++    Return ``True`` if running on Fedora ELN, and ``False`` otherwise.
++    """
++    try:
++        with open("/etc/os-release", "r", encoding="utf8") as fp:
++            for line in fp.readlines():
++                if "Fedora ELN" in line:
++                    return True
++        return False
++    except OSError:
++        return False
++
++
+ def is_redhat():
+     """
+-    Return True for Red Hat derivatives (excluding CentOS pending boom-boot #59).
++    Return ``True`` for Red Hat derivatives, and ``False`` otherwise.
+     """
+-    return (os.path.exists("/etc/redhat-release")
+-            and not os.path.exists("/etc/centos-release"))
++    return os.path.exists("/etc/redhat-release")
+ 
+ 
+ def have_root():
+diff --git a/tests/test_boot.py b/tests/test_boot.py
+index 704ac0e..b40f20e 100644
+--- a/tests/test_boot.py
++++ b/tests/test_boot.py
+@@ -24,7 +24,7 @@ import boom.bootloader
+ import boom.cache
+ import boom.osprofile
+ 
+-from tests import have_root, is_redhat, BOOT_ROOT_TEST
++from tests import have_root, is_eln, is_redhat, BOOT_ROOT_TEST
+ from ._util import LvmLoopBacked, _VG_NAME
+ 
+ ETC_FSTAB = "/etc/fstab"
+@@ -318,7 +318,7 @@ class BootTestsWithRoot(BootTestsBase):
+         # Clean up boot entries
+         self.manager.delete_snapshot_sets(snapm.Selection(name="bootset0"))
+ 
+-    @unittest.skipIf(not is_redhat(), "profile auto-creation not supported")
++    @unittest.skipIf(not is_redhat() or is_eln(), "profile auto-creation not supported")
+     def test_auto_profile_create_boot_entry(self):
+         """Test automatic boom osprofile and boot entry creation."""
+         boot_dir = self._populate_boom_root_path()
+-- 
+2.56.0
+

diff --git a/snapm.spec b/snapm.spec
index 1ce3a30..cc61249 100644
--- a/snapm.spec
+++ b/snapm.spec
@@ -9,6 +9,8 @@ License:	Apache-2.0
 URL:		https://github.com/snapshotmanager/%{name}
 Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz
 
+Patch0: 0001-tests-update-test-exclusions-for-CentOS-and-ELN.patch
+
 BuildArch:	noarch
 
 BuildRequires:	boom-boot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18 12:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 12:28 [rpms/snapm] rawhide: Apply workaround for missing profile auto-creation on ELN Bryn M. Reeves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox