diff --git a/.gitignore b/.gitignore index 7cdbcbc..182ff9b 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,4 @@ /osbuild-119.tar.gz /osbuild-122.tar.gz /osbuild-123.tar.gz +/osbuild-124.tar.gz diff --git a/PR1824.patch b/PR1824.patch deleted file mode 100644 index c091e17..0000000 --- a/PR1824.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2a69d10da676d067bf42b936114d3785fd1c37da Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= -Date: Thu, 25 Jul 2024 10:27:44 +0200 -Subject: [PATCH] Test: fix dnf4.mark stage test with DNF5 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -DNF5 contains a breaking change in the repoquery --qf output, -specifically it does not include the trailing newline. This breaks the -test case e.g. on the latest Fedora Rawhide [1]. - -As a fix, explicitly use 'dnf4' for now, until the inconsistency is -fixed in the upstream [2]. - -[1] https://artifacts.dev.testing-farm.io/3a3a2898-0a6a-42eb-8792-660f03c35c3c/ -[2] https://github.com/rpm-software-management/dnf5/issues/709 - -Signed-off-by: Tomáš Hozza ---- - test/run/test_stages.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/test/run/test_stages.py b/test/run/test_stages.py -index a4d78b7e..ca224f07 100644 ---- a/test/run/test_stages.py -+++ b/test/run/test_stages.py -@@ -537,9 +537,12 @@ class TestStages(test.TestBase): - assert os.path.isdir(tree) - - # we're going to verify that packages in the tree are marked according to -+ # Explicitly use 'dnf4' for now, because 'dnf5' contains a breaking change -+ # in the repoquery --qf output, specifically it does not add a trailing newline. -+ # We can use plan 'dnf' again once https://github.com/rpm-software-management/dnf5/issues/709 is fixed. - r = subprocess.run( - [ -- "dnf", -+ "dnf4", - "--installroot", tree, - "repoquery", "--installed", - "--qf", "%{name},%{reason}" --- -2.45.2 - diff --git a/PR1825.patch b/PR1825.patch deleted file mode 100644 index 66ce787..0000000 --- a/PR1825.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 1f628f20d75472e2e629c637dec0dec1d82769eb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= -Date: Mon, 29 Jul 2024 10:17:02 +0200 -Subject: [PATCH 1/2] Test/dnf4.mark: make the test compatible with all dnf - versions -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Let's revert to using plain 'dnf', add an explicit newline in the query -format and skip empty lines when processing the output. This makes the -test case compatible with all DNF versions, even with dnf5 once this -issue gets fixed. - -The previous approach didn't work on c9s / el9, because there is no -'/usr/bin/dnf4 -> dnf-3' symlink. - -Also see: -https://github.com/osbuild/osbuild/actions/runs/10136827918/job/28026181824 - -Co-authored-by: Michael Vogt -Signed-off-by: Tomáš Hozza ---- - test/run/test_stages.py | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/test/run/test_stages.py b/test/run/test_stages.py -index ca224f07..476be949 100644 ---- a/test/run/test_stages.py -+++ b/test/run/test_stages.py -@@ -537,15 +537,12 @@ class TestStages(test.TestBase): - assert os.path.isdir(tree) - - # we're going to verify that packages in the tree are marked according to -- # Explicitly use 'dnf4' for now, because 'dnf5' contains a breaking change -- # in the repoquery --qf output, specifically it does not add a trailing newline. -- # We can use plan 'dnf' again once https://github.com/rpm-software-management/dnf5/issues/709 is fixed. - r = subprocess.run( - [ -- "dnf4", -+ "dnf", - "--installroot", tree, - "repoquery", "--installed", -- "--qf", "%{name},%{reason}" -+ "--qf", "%{name},%{reason}\n" - ], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, -@@ -554,6 +551,12 @@ class TestStages(test.TestBase): - ) - - for line in r.stdout.splitlines(): -+ # 'dnf5' contains a breaking change in the repoquery --qf output, specifically it does not add -+ # a trailing newline. For this reason, we add it explicitly in the query format above. This however -+ # means that there are empty lines in the output, if 'dnf' points to 'dnf4'. -+ # Upstream bug https://github.com/rpm-software-management/dnf5/issues/709 -+ if not line: -+ continue - package, mark = line.strip().split(",") - - if package == "dnf": --- -2.45.2 - - -From 4c4a23e5f628e9553328bc8342212e3272c7ab3f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= -Date: Mon, 29 Jul 2024 10:19:13 +0200 -Subject: [PATCH 2/2] Test/dnf4.mark: make failures to parse dnf output easier - to debug -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The test case still fails on RHEL-10.0 Beta, even when not using dnf5, -with: - -``` - for line in r.stdout.splitlines(): -> package, mark = line.strip().split(",") -E ValueError: not enough values to unpack (expected 2, got 1) -``` - -Make debugging of failures like this easier by printing the line when -the issue happens. - -Signed-off-by: Tomáš Hozza ---- - test/run/test_stages.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/test/run/test_stages.py b/test/run/test_stages.py -index 476be949..dc91bf8f 100644 ---- a/test/run/test_stages.py -+++ b/test/run/test_stages.py -@@ -557,7 +557,12 @@ class TestStages(test.TestBase): - # Upstream bug https://github.com/rpm-software-management/dnf5/issues/709 - if not line: - continue -- package, mark = line.strip().split(",") -+ -+ try: -+ package, mark = line.strip().split(",") -+ except ValueError: -+ print(f"Failed to parse line: {line}") -+ raise - - if package == "dnf": - assert mark == "user" --- -2.45.2 - diff --git a/osbuild.spec b/osbuild.spec index a42b62e..7ea8da3 100644 --- a/osbuild.spec +++ b/osbuild.spec @@ -1,7 +1,7 @@ %global forgeurl https://github.com/osbuild/osbuild %global selinuxtype targeted -Version: 123 +Version: 124 %forgemeta @@ -9,7 +9,7 @@ Version: 123 %global pkgdir %{_prefix}/lib/%{pypi_name} Name: %{pypi_name} -Release: 2%{?dist} +Release: 1%{?dist} License: Apache-2.0 URL: %{forgeurl} @@ -18,11 +18,6 @@ Source0: %{forgesource} BuildArch: noarch Summary: A build system for OS images -# https://github.com/osbuild/osbuild/pull/1824 -Patch0: PR1824.patch -# https://github.com/osbuild/osbuild/pull/1825 -Patch1: PR1825.patch - BuildRequires: make BuildRequires: python3-devel BuildRequires: python3-docutils @@ -291,6 +286,9 @@ fi %{_libexecdir}/osbuild-depsolve-dnf %changelog +* Thu Aug 01 2024 imagebuilder-bot - 124-1 +- New upstream release + * Mon Jul 29 2024 Tomáš Hozza - Backport upstream fix for unit test diff --git a/sources b/sources index 4cfc846..c4bfb23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (osbuild-123.tar.gz) = e76d93aa11370cf9ef768c1895c09c358ed2f57384b3194c9781d03c6d0053646e13138c1e3349f4ec87f0b5f419d071c008de93f552793ee7dd41248b9e7949 +SHA512 (osbuild-124.tar.gz) = 8cbed21abca5950a58a85e49f5ea78ec60b988cc62e98c3b1bd3351689f7c720636aee9c08087b7119ea4016616a6efbd58714ef0aa2b044e08f7a28f6ca2d0f