Update to 109
Also backport https://github.com/osbuild/osbuild/pull/1610 Skip one unit test - https://github.com/osbuild/osbuild/issues/1611 Resolves: RHEL-1770
This commit is contained in:
parent
f49493e47e
commit
5c44fcfd3a
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ SOURCES/osbuild-80.tar.gz
|
||||
/osbuild-104.tar.gz
|
||||
/osbuild-105.tar.gz
|
||||
/osbuild-106.tar.gz
|
||||
/osbuild-109.tar.gz
|
||||
|
27
PR1539.patch
27
PR1539.patch
@ -1,27 +0,0 @@
|
||||
From 01446c54110e929d5b1a315003cdcce5032a7427 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Vogt <michael.vogt@gmail.com>
|
||||
Date: Wed, 17 Jan 2024 08:45:19 +0100
|
||||
Subject: [PATCH] test: export schemas in testing_libdir_fixture
|
||||
|
||||
When constructing a minimal environment for osbuild the exported
|
||||
dirs lacked "schemas" so the test_exports.py test failed on RHEL8.
|
||||
|
||||
This commit adds it (and also "assemblers" for good measure). With
|
||||
that the test will pass.
|
||||
---
|
||||
test/run/test_exports.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/run/test_exports.py b/test/run/test_exports.py
|
||||
index 12b4cfe73..d89096494 100644
|
||||
--- a/test/run/test_exports.py
|
||||
+++ b/test/run/test_exports.py
|
||||
@@ -58,7 +58,7 @@ def testing_libdir_fixture(tmpdir_factory):
|
||||
# in buildroot.py
|
||||
(fake_libdir_path / "osbuild").mkdir()
|
||||
# construct minimal viable libdir from current checkout
|
||||
- for d in ["stages", "runners", ]:
|
||||
+ for d in ["stages", "runners", "schemas", "assemblers"]:
|
||||
subprocess.run(
|
||||
["cp", "-a", os.fspath(project_path / d), f"{fake_libdir_path}"],
|
||||
check=True)
|
24
PR1540.patch
24
PR1540.patch
@ -1,24 +0,0 @@
|
||||
From 49d9cc5897ec2b47ee5ef3254e5d93c7aecb3a52 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Vogt <michael.vogt@gmail.com>
|
||||
Date: Wed, 17 Jan 2024 09:05:13 +0100
|
||||
Subject: [PATCH] test: check that `mkfs.fat` has the `-g` option in `test_fat`
|
||||
|
||||
Older versions of RHEL/Centos do not have `mkfs.fat -g` yet so
|
||||
this test will fail. Detect this and skip the test if mkfs.fat
|
||||
is too old (see 7af2f1a for the original commit).
|
||||
---
|
||||
test/run/test_stages.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/test/run/test_stages.py b/test/run/test_stages.py
|
||||
index bc6d8b31c..f6156369d 100644
|
||||
--- a/test/run/test_stages.py
|
||||
+++ b/test/run/test_stages.py
|
||||
@@ -573,6 +573,7 @@ def test_btrfs(self):
|
||||
assert "path home" in subvols[1]
|
||||
|
||||
@unittest.skipUnless(test.TestBase.has_filesystem_support("fat"), "FAT needed")
|
||||
+ @unittest.skipUnless("-g GEOM" in subprocess.getoutput("mkfs.fat"), "mkfs.fat -g GEOM missing")
|
||||
def test_fat(self):
|
||||
def _get_file_fields(image: str) -> List[str]:
|
||||
r = subprocess.run(
|
43
PR1541.patch
43
PR1541.patch
@ -1,43 +0,0 @@
|
||||
From 0cdf98b1008161e5c07b9a4c578c7cecda4050ca Mon Sep 17 00:00:00 2001
|
||||
From: Michael Vogt <michael.vogt@gmail.com>
|
||||
Date: Wed, 17 Jan 2024 09:29:26 +0100
|
||||
Subject: [PATCH] test: fix `test_libc_futimes_works`
|
||||
|
||||
The test_libc_futimes_works() is failing under RHEL/Centos right
|
||||
now. To make it more robust a tiny sleep and rounding of the
|
||||
timestamps is introduced to ensure that we are not run into
|
||||
floating point comaparison funnines.
|
||||
|
||||
The second part of the fix is to open the stamp_file in read-only
|
||||
mode to ensure that the mtime is not modified by the open itself
|
||||
which is what lead to the actual test failure.
|
||||
---
|
||||
test/mod/test_util_linux.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/mod/test_util_linux.py b/test/mod/test_util_linux.py
|
||||
index be31723d3..518a4bfa2 100644
|
||||
--- a/test/mod/test_util_linux.py
|
||||
+++ b/test/mod/test_util_linux.py
|
||||
@@ -6,6 +6,7 @@
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
+import time
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -255,10 +256,11 @@ def test_libc_futimes_works(tmpdir):
|
||||
with open(stamp_file, "wb") as fp:
|
||||
fp.write(b"meep")
|
||||
mtime1 = os.stat(stamp_file).st_mtime
|
||||
- with open(stamp_file, "wb") as fp:
|
||||
+ time.sleep(0.1)
|
||||
+ with open(stamp_file, "rb") as fp:
|
||||
libc.futimens(fp.fileno(), ctypes.byref(linux.c_timespec_times2(
|
||||
atime=linux.c_timespec(tv_sec=3, tv_nsec=300 * 1000 * 1000),
|
||||
mtime=linux.c_timespec(tv_sec=0, tv_nsec=libc.UTIME_OMIT),
|
||||
)))
|
||||
assert os.stat(stamp_file).st_atime == 3.3
|
||||
- assert os.stat(stamp_file).st_mtime == mtime1
|
||||
+ assert round(os.stat(stamp_file).st_mtime, 3) == round(mtime1, 3)
|
37
PR1610.patch
Normal file
37
PR1610.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From bdbecf4a695750abc4488e893241df80389c2aa6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= <thozza@redhat.com>
|
||||
Date: Thu, 22 Feb 2024 20:47:03 +0100
|
||||
Subject: [PATCH] Sources/containers-storage: make the code Python 3.6
|
||||
compliant
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The source implementation used `subprocess.run()` argument
|
||||
`capture_output`, which was added in Python 3.7. Since the minimum
|
||||
supported Python version for osbuild on RHEL-8 is 3.6, the stage fails
|
||||
with TypeError.
|
||||
|
||||
Example failure: https://artifacts.dev.testing-farm.io/c147b608-c40e-46ed-bf11-6b15ecf718dc/
|
||||
|
||||
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
|
||||
---
|
||||
sources/org.osbuild.containers-storage | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sources/org.osbuild.containers-storage b/sources/org.osbuild.containers-storage
|
||||
index f83eb4fa..ea18e08c 100755
|
||||
--- a/sources/org.osbuild.containers-storage
|
||||
+++ b/sources/org.osbuild.containers-storage
|
||||
@@ -77,7 +77,7 @@ class ContainersStorageSource(sources.SourceService):
|
||||
image_id = checksum.split(":")[1]
|
||||
source = self.local_image_name(image_id)
|
||||
res = sp.run(["skopeo", "inspect", "--raw", "--config", source],
|
||||
- check=False, capture_output=True, universal_newlines=True)
|
||||
+ check=False, stdout=sp.PIPE, stderr=sp.PIPE, universal_newlines=True)
|
||||
|
||||
# fail early if the user hasn't imported the container into
|
||||
# containers-storage
|
||||
--
|
||||
2.43.2
|
||||
|
14
osbuild.spec
14
osbuild.spec
@ -1,7 +1,7 @@
|
||||
%global forgeurl https://github.com/osbuild/osbuild
|
||||
%global selinuxtype targeted
|
||||
|
||||
Version: 106
|
||||
Version: 109
|
||||
|
||||
%forgemeta
|
||||
|
||||
@ -18,6 +18,9 @@ Source0: %{forgesource}
|
||||
BuildArch: noarch
|
||||
Summary: A build system for OS images
|
||||
|
||||
# https://github.com/osbuild/osbuild/pull/1610
|
||||
Patch0: PR1610.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-docutils
|
||||
@ -39,6 +42,12 @@ Requires: util-linux
|
||||
Requires: python3-%{pypi_name} = %{version}-%{release}
|
||||
Requires: (%{name}-selinux if selinux-policy-%{selinuxtype})
|
||||
|
||||
# This is required for `osbuild`, for RHEL-10 and above
|
||||
# the stdlib toml package can be used instead
|
||||
%if 0%{?rhel} < 10
|
||||
Requires: python3-tomli
|
||||
%endif
|
||||
|
||||
# Turn off dependency generators for runners. The reason is that runners are
|
||||
# tailored to the platform, e.g. on RHEL they are using platform-python. We
|
||||
# don't want to pick up those dependencies on other platform.
|
||||
@ -290,6 +299,9 @@ fi
|
||||
%{_libexecdir}/osbuild-depsolve-dnf
|
||||
|
||||
%changelog
|
||||
* Thu Feb 22 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 109-1
|
||||
- New upstream release
|
||||
|
||||
* Thu Feb 01 2024 imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> - 106-1
|
||||
- New upstream release
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (osbuild-106.tar.gz) = d814e1e5431dd7309aecfa50c00a92663162c8d7476eb24416e84b44f9bdd11db9c3e92abe466d6039a225ae756b02f1ec62d30fbb52f571258bdf90a83532bd
|
||||
SHA512 (osbuild-109.tar.gz) = cde2f81adad1429c9ef25a5402da1999045a8a311dbb724e1bf4d98996dcbd809978ffd7165ec3175a5906c28a9bd58199cf8f3596db72b928ed2aa4e350f892
|
||||
|
@ -97,6 +97,8 @@ if ([ "${ID}" == "rhel" ] || [ "${ID}" == "centos" ]) && [ "${VERSION_ID%%.*}" =
|
||||
# qemu-img info in RHEL-8 produces "raw" as the image format for "vdi" images, which causes tests to fail. Skip it.
|
||||
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (test_qemu[ext4-vdi] or test_qemu[xfs-vdi])"
|
||||
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (TestStages and test_qemu)"
|
||||
# https://github.com/osbuild/osbuild/issues/1611
|
||||
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (TestStages and test_skopeo_with_localstorage)"
|
||||
fi
|
||||
|
||||
sudo python3 -m pytest \
|
||||
|
Loading…
Reference in New Issue
Block a user