From 24f19e416ecb9e73b8deb4f9c3bf1ffa8f941ab2 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Tue, 13 Feb 2024 22:58:07 +0100 Subject: [PATCH] Unbreak Podman's downstream Fedora CI ... and update the BuildRequires on golang to reflect reality. https://bugzilla.redhat.com/show_bug.cgi?id=2263968 Resolves: RHEL-30245 --- ...nbreak-Podman-s-downstream-Fedora-CI.patch | 47 +++++++++++++++++++ toolbox.spec | 14 +++++- 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 toolbox-test-system-Unbreak-Podman-s-downstream-Fedora-CI.patch diff --git a/toolbox-test-system-Unbreak-Podman-s-downstream-Fedora-CI.patch b/toolbox-test-system-Unbreak-Podman-s-downstream-Fedora-CI.patch new file mode 100644 index 0000000..92cebc8 --- /dev/null +++ b/toolbox-test-system-Unbreak-Podman-s-downstream-Fedora-CI.patch @@ -0,0 +1,47 @@ +From 6838e9347199e875f9869acd2afa64688161ca11 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Tue, 13 Feb 2024 21:56:06 +0100 +Subject: [PATCH] test/system: Unbreak Podman's downstream Fedora CI + +The paths to bats-assert and bats-support are broken, if bats(1) is +invoked from any other location than the parent directory of the 'tests' +directory. eg., Podman's downstream Fedora CI invokes the tests as: + $ cd /path/to/toolbox/test/system + $ bats . + +... and it led to [1]: + 1..306 + # test suite: Set up + # Missing dependencies + # Forgot to run 'git submodule init' and 'git submodule update' ? + # test suite: Tear down + not ok 1 setup_suite + # (from function `setup_suite' in test file ./setup_suite.bash, line 33) + # `return 1' failed + # bats warning: Executed 1 instead of expected 306 tests + +Fallout from 2c0960660330dc6be6861502988695f9812c475a + +[1] https://bugzilla.redhat.com/show_bug.cgi?id=2263968 + +https://github.com/containers/toolbox/pull/1448 +--- + test/system/setup_suite.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/system/setup_suite.bash b/test/system/setup_suite.bash +index 78507d660529..649018f01e96 100644 +--- a/test/system/setup_suite.bash ++++ b/test/system/setup_suite.bash +@@ -17,7 +17,7 @@ + + missing_dependencies=false + +-if [ -f test/system/libs/bats-assert/load.bash ] && [ -f test/system/libs/bats-support/load.bash ]; then ++if [ -f "$BATS_TEST_DIRNAME/libs/bats-assert/load.bash" ] && [ -f "$BATS_TEST_DIRNAME/libs/bats-support/load.bash" ]; then + load 'libs/helpers' + else + missing_dependencies=true +-- +2.43.0 + diff --git a/toolbox.spec b/toolbox.spec index a67f3e6..4cef378 100644 --- a/toolbox.spec +++ b/toolbox.spec @@ -17,7 +17,7 @@ Version: 0.0.99.5 %endif %endif -Release: 6%{?dist} +Release: 7%{?dist} Summary: Tool for interactive command line environments on Linux License: Apache-2.0 @@ -27,6 +27,9 @@ Source0: https://github.com/containers/%{name}/releases/download/%{version # RHEL specific Source1: %{name}.conf +# Upstream +Patch0: toolbox-test-system-Unbreak-Podman-s-downstream-Fedora-CI.patch + # Fedora specific Patch100: toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch Patch101: toolbox-Make-the-build-flags-match-Fedora-s-gobuild-for-PPC64.patch @@ -38,7 +41,7 @@ Patch202: toolbox-Add-migration-paths-for-coreos-toolbox-users.patch BuildRequires: gcc BuildRequires: go-md2man -BuildRequires: golang >= 1.20 +BuildRequires: golang >= 1.22 BuildRequires: meson >= 0.58.0 BuildRequires: pkgconfig(bash-completion) BuildRequires: shadow-utils-subid-devel @@ -107,6 +110,8 @@ The %{name}-tests package contains system tests for %{name}. %prep %setup -q +%patch -P0 -p1 + %if 0%{?fedora} %ifnarch ppc64 %patch -P100 -p1 @@ -183,6 +188,11 @@ install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf %changelog +* Tue Feb 13 2024 Debarshi Ray - 0.0.99.5-7 +- Unbreak Podman's downstream Fedora CI +- Update the BuildRequires on golang to reflect reality +Resolves: RHEL-30245 + * Sun Feb 11 2024 Maxwell G - 0.0.99.5-6 - Rebuild for golang 1.22.0