Unbreak the tests with Podman 5.0
... and make them show the Bats version. Resolves: RHEL-36170
This commit is contained in:
		
							parent
							
								
									5c4f313cc3
								
							
						
					
					
						commit
						067963eddf
					
				
							
								
								
									
										161
									
								
								toolbox-playbooks-test-system-bats-1.11-podman-5.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										161
									
								
								toolbox-playbooks-test-system-bats-1.11-podman-5.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,161 @@ | |||||||
|  | From 6626b11e1565412e411f585657ebe9615ec58cad Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Debarshi Ray <rishi@fedoraproject.org> | ||||||
|  | Date: Wed, 17 Apr 2024 16:58:32 +0200 | ||||||
|  | Subject: [PATCH 1/2] playbooks: Show the Bats version | ||||||
|  | 
 | ||||||
|  | Ansible's built-in 'package' module doesn't show any details when | ||||||
|  | installing the RPMs.  All that can be seen is: | ||||||
|  |   TASK [Install RPM packages] | ||||||
|  |   fedora-rawhide | changed | ||||||
|  | 
 | ||||||
|  | Therefore, there's no way to know what version of the packages got | ||||||
|  | installed. | ||||||
|  | 
 | ||||||
|  | In this case, not knowing the Bats version being used by the CI makes it | ||||||
|  | difficult to know why the tests are generating this spew on Fedora
 | ||||||
|  | Rawhide [1]: | ||||||
|  |   TASK [Run system tests] | ||||||
|  |   test/system/libs/helpers.bash: line 7: TEMP_BASE_DIR: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 8: TEMP_STORAGE_DIR: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 10: IMAGE_CACHE_DIR: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 11: ROOTLESS_PODMAN_STORE_DIR: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 12: ROOTLESS_PODMAN_RUNROOT_DIR: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 13: PODMAN_STORE_CONFIG_FILE: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 14: DOCKER_REG_ROOT: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 15: DOCKER_REG_CERTS_DIR: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 16: DOCKER_REG_AUTH_DIR: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 17: DOCKER_REG_URI: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 18: DOCKER_REG_NAME: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 21: PODMAN: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 22: TOOLBX: readonly variable | ||||||
|  |   test/system/libs/helpers.bash: line 23: SKOPEO: readonly variable | ||||||
|  |   ... | ||||||
|  |   fedora-rawhide | 1..340 | ||||||
|  | 
 | ||||||
|  | [1] https://github.com/bats-core/bats-core/pull/904 | ||||||
|  | 
 | ||||||
|  | https://github.com/containers/toolbox/pull/1482 | ||||||
|  | ---
 | ||||||
|  |  playbooks/dependencies-centos-9-stream.yaml | 2 +- | ||||||
|  |  playbooks/dependencies-fedora.yaml          | 2 +- | ||||||
|  |  2 files changed, 2 insertions(+), 2 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/playbooks/dependencies-centos-9-stream.yaml b/playbooks/dependencies-centos-9-stream.yaml
 | ||||||
|  | index ffbc6d9903cb..d058d314b7b3 100644
 | ||||||
|  | --- a/playbooks/dependencies-centos-9-stream.yaml
 | ||||||
|  | +++ b/playbooks/dependencies-centos-9-stream.yaml
 | ||||||
|  | @@ -54,7 +54,7 @@
 | ||||||
|  |      chdir: '{{ zuul.project.src_dir }}' | ||||||
|  |   | ||||||
|  |  - name: Check versions of crucial packages | ||||||
|  | -  command: rpm -qa ShellCheck codespell *kernel* gcc *glibc* golang golang-github-cpuguy83-md2man shadow-utils-subid-devel podman conmon containernetworking-plugins containers-common container-selinux crun fuse-overlayfs flatpak-session-helper skopeo
 | ||||||
|  | +  command: rpm -qa ShellCheck bats codespell *kernel* gcc *glibc* golang golang-github-cpuguy83-md2man shadow-utils-subid-devel podman conmon containernetworking-plugins containers-common container-selinux crun fuse-overlayfs flatpak-session-helper skopeo
 | ||||||
|  |   | ||||||
|  |  - name: Show podman versions | ||||||
|  |    command: podman version | ||||||
|  | diff --git a/playbooks/dependencies-fedora.yaml b/playbooks/dependencies-fedora.yaml
 | ||||||
|  | index d493bd0729ea..ade169917cbe 100644
 | ||||||
|  | --- a/playbooks/dependencies-fedora.yaml
 | ||||||
|  | +++ b/playbooks/dependencies-fedora.yaml
 | ||||||
|  | @@ -54,7 +54,7 @@
 | ||||||
|  |      chdir: '{{ zuul.project.src_dir }}' | ||||||
|  |   | ||||||
|  |  - name: Check versions of crucial packages | ||||||
|  | -  command: rpm -qa ShellCheck codespell *kernel* gcc *glibc* shadow-utils-subid-devel golang golang-github-cpuguy83-md2man podman conmon containernetworking-plugins containers-common container-selinux crun fuse-overlayfs flatpak-session-helper skopeo
 | ||||||
|  | +  command: rpm -qa ShellCheck bash bats codespell *kernel* gcc *glibc* shadow-utils-subid-devel golang golang-github-cpuguy83-md2man podman conmon containernetworking-plugins containers-common container-selinux crun fuse-overlayfs flatpak-session-helper skopeo
 | ||||||
|  |   | ||||||
|  |  - name: Show podman versions | ||||||
|  |    command: podman version | ||||||
|  | -- 
 | ||||||
|  | 2.44.0 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | From b58f9a51088afbfc22edb0b25776cfa2c4d8cc40 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Debarshi Ray <rishi@fedoraproject.org> | ||||||
|  | Date: Mon, 25 Mar 2024 23:04:23 +0100 | ||||||
|  | Subject: [PATCH 2/2] playbooks, test/system: Work around bug in pasta(1) | ||||||
|  |  networks | ||||||
|  | 
 | ||||||
|  | Podman 5.0 switched to using pasta(1), instead of slirp4netns(1), by | ||||||
|  | default for rootless containers.  This change has led to a regression | ||||||
|  | causing 'skopeo copy' to get stuck uploading an OCI image to the local | ||||||
|  | temporary Docker registry run by the tests as a Podman container [1], | ||||||
|  | which breaks the test suite on Fedora 40 onwards. | ||||||
|  | 
 | ||||||
|  | Work around this by forcing the use of slirp4netns(1). | ||||||
|  | 
 | ||||||
|  | Note that the slirp4nets package needs to be explicitly installed on | ||||||
|  | Fedora 40 onwards, because the dependency in containers-common-extra | ||||||
|  | changed from Recommends to Suggests [2]. | ||||||
|  | 
 | ||||||
|  | [1] https://github.com/containers/podman/issues/22575 | ||||||
|  | 
 | ||||||
|  | [2] Fedora containers-common commit 17934d87b2686ab5 | ||||||
|  |     Fedora containers-common commit 13c232f064113860 | ||||||
|  |     https://src.fedoraproject.org/rpms/containers-common/c/17934d87b2686ab5 | ||||||
|  |     https://src.fedoraproject.org/rpms/containers-common/c/13c232f064113860 | ||||||
|  | 
 | ||||||
|  | https://github.com/containers/toolbox/pull/1468 | ||||||
|  | ---
 | ||||||
|  |  playbooks/dependencies-centos-9-stream.yaml | 3 ++- | ||||||
|  |  playbooks/dependencies-fedora.yaml          | 3 ++- | ||||||
|  |  test/system/libs/helpers.bash               | 1 + | ||||||
|  |  3 files changed, 5 insertions(+), 2 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/playbooks/dependencies-centos-9-stream.yaml b/playbooks/dependencies-centos-9-stream.yaml
 | ||||||
|  | index d058d314b7b3..5c1194c03583 100644
 | ||||||
|  | --- a/playbooks/dependencies-centos-9-stream.yaml
 | ||||||
|  | +++ b/playbooks/dependencies-centos-9-stream.yaml
 | ||||||
|  | @@ -13,6 +13,7 @@
 | ||||||
|  |        - podman | ||||||
|  |        - shadow-utils-subid-devel | ||||||
|  |        - skopeo | ||||||
|  | +      - slirp4netns
 | ||||||
|  |        - systemd | ||||||
|  |        - udisks2 | ||||||
|  |   | ||||||
|  | @@ -54,7 +55,7 @@
 | ||||||
|  |      chdir: '{{ zuul.project.src_dir }}' | ||||||
|  |   | ||||||
|  |  - name: Check versions of crucial packages | ||||||
|  | -  command: rpm -qa ShellCheck bats codespell *kernel* gcc *glibc* golang golang-github-cpuguy83-md2man shadow-utils-subid-devel podman conmon containernetworking-plugins containers-common container-selinux crun fuse-overlayfs flatpak-session-helper skopeo
 | ||||||
|  | +  command: rpm -qa ShellCheck bats codespell *kernel* gcc *glibc* golang golang-github-cpuguy83-md2man shadow-utils-subid-devel podman conmon containernetworking-plugins containers-common container-selinux crun fuse-overlayfs flatpak-session-helper skopeo slirp4netns
 | ||||||
|  |   | ||||||
|  |  - name: Show podman versions | ||||||
|  |    command: podman version | ||||||
|  | diff --git a/playbooks/dependencies-fedora.yaml b/playbooks/dependencies-fedora.yaml
 | ||||||
|  | index ade169917cbe..76ce655bf9d3 100644
 | ||||||
|  | --- a/playbooks/dependencies-fedora.yaml
 | ||||||
|  | +++ b/playbooks/dependencies-fedora.yaml
 | ||||||
|  | @@ -35,6 +35,7 @@
 | ||||||
|  |        - podman | ||||||
|  |        - shadow-utils-subid-devel | ||||||
|  |        - skopeo | ||||||
|  | +      - slirp4netns
 | ||||||
|  |        - systemd | ||||||
|  |        - udisks2 | ||||||
|  |   | ||||||
|  | @@ -54,7 +55,7 @@
 | ||||||
|  |      chdir: '{{ zuul.project.src_dir }}' | ||||||
|  |   | ||||||
|  |  - name: Check versions of crucial packages | ||||||
|  | -  command: rpm -qa ShellCheck bash bats codespell *kernel* gcc *glibc* shadow-utils-subid-devel golang golang-github-cpuguy83-md2man podman conmon containernetworking-plugins containers-common container-selinux crun fuse-overlayfs flatpak-session-helper skopeo
 | ||||||
|  | +  command: rpm -qa ShellCheck bash bats codespell *kernel* gcc *glibc* shadow-utils-subid-devel golang golang-github-cpuguy83-md2man podman conmon containernetworking-plugins containers-common container-selinux crun fuse-overlayfs flatpak-session-helper skopeo slirp4netns
 | ||||||
|  |   | ||||||
|  |  - name: Show podman versions | ||||||
|  |    command: podman version | ||||||
|  | diff --git a/test/system/libs/helpers.bash b/test/system/libs/helpers.bash
 | ||||||
|  | index 66278888cbe2..c056c601ab94 100644
 | ||||||
|  | --- a/test/system/libs/helpers.bash
 | ||||||
|  | +++ b/test/system/libs/helpers.bash
 | ||||||
|  | @@ -202,6 +202,7 @@ function _setup_docker_registry() {
 | ||||||
|  |      -e REGISTRY_HTTP_ADDR=0.0.0.0:443 \ | ||||||
|  |      -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \ | ||||||
|  |      -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \ | ||||||
|  | +    --network slirp4netns \
 | ||||||
|  |      -p 50000:443 \ | ||||||
|  |      "${IMAGES[docker-reg]}" | ||||||
|  |    assert_success | ||||||
|  | -- 
 | ||||||
|  | 2.44.0 | ||||||
|  | 
 | ||||||
| @ -31,7 +31,7 @@ Version:       0.0.99.5 | |||||||
| %endif | %endif | ||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| Release:       10%{?dist} | Release:       11%{?dist} | ||||||
| Summary:       Tool for interactive command line environments on Linux | Summary:       Tool for interactive command line environments on Linux | ||||||
| 
 | 
 | ||||||
| License:       Apache-2.0 | License:       Apache-2.0 | ||||||
| @ -44,6 +44,7 @@ Source1:       %{name}.conf | |||||||
| # Upstream | # Upstream | ||||||
| Patch0:        toolbox-test-system-new.patch | Patch0:        toolbox-test-system-new.patch | ||||||
| Patch1:        toolbox-test-system-Unbreak-Podman-s-downstream-Fedora-CI.patch | Patch1:        toolbox-test-system-Unbreak-Podman-s-downstream-Fedora-CI.patch | ||||||
|  | Patch2:        toolbox-playbooks-test-system-bats-1.11-podman-5.patch | ||||||
| 
 | 
 | ||||||
| # Fedora specific | # Fedora specific | ||||||
| Patch100:      toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch | Patch100:      toolbox-Make-the-build-flags-match-Fedora-s-gobuild.patch | ||||||
| @ -127,6 +128,7 @@ The %{name}-tests package contains system tests for %{name}. | |||||||
| 
 | 
 | ||||||
| %patch -P0 -p1 | %patch -P0 -p1 | ||||||
| %patch -P1 -p1 | %patch -P1 -p1 | ||||||
|  | %patch -P2 -p1 | ||||||
| 
 | 
 | ||||||
| %if 0%{?fedora} | %if 0%{?fedora} | ||||||
| %ifnarch ppc64 | %ifnarch ppc64 | ||||||
| @ -204,6 +206,10 @@ install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Tue May 07 2024 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.5-11 | ||||||
|  | - Unbreak the tests with Podman 5.0 | ||||||
|  | Resolves: RHEL-36170 | ||||||
|  | 
 | ||||||
| * Tue Mar 26 2024 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.5-10 | * Tue Mar 26 2024 Debarshi Ray <rishi@fedoraproject.org> - 0.0.99.5-10 | ||||||
| - Specify the golang versions for RHEL 9 and 10 | - Specify the golang versions for RHEL 9 and 10 | ||||||
| Resolves: RHEL-30245 | Resolves: RHEL-30245 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user