public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ansible-collection-community-docker] epel10: Fix FTBFS. Closes rhbz#2215512.
@ 2026-11-10 21:12 Maxwell G
  0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-11-10 21:12 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/ansible-collection-community-docker
Branch : epel10
Commit : f4dcc0d58499079b0cd1048888dc99aede9c4034
Author : Maxwell G <maxwell@gtmx.me>
Date   : 2023-07-25T20:15:25+00:00
Stats  : +72/-1 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/ansible-collection-community-docker/c/f4dcc0d58499079b0cd1048888dc99aede9c4034?branch=epel10

Log:
Fix FTBFS. Closes rhbz#2215512.

---
diff --git a/ansible-collection-community-docker.spec b/ansible-collection-community-docker.spec
index 0edd78c..dc52d12 100644
--- a/ansible-collection-community-docker.spec
+++ b/ansible-collection-community-docker.spec
@@ -9,7 +9,7 @@
 
 Name:           ansible-collection-community-docker
 Version:        3.4.6
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Ansible modules and plugins for working with Docker
 
 # All files are GPL-3.0-or-later, except the following files, which are originally
@@ -65,6 +65,8 @@ URL:            %{ansible_collection_url community docker}
 %global forgeurl https://github.com/ansible-collections/community.docker
 Source0:        %{forgeurl}/archive/%{version}/community.docker-%{version}.tar.gz
 Patch0:         build_ignore-unnecessary-files.patch
+Patch1:         tests-import-match_hostname-from-urllib3.patch
+Patch2:         tests-remove-usage-of-deprecated-TestCase-methods.patch
 
 BuildArch:      noarch
 
@@ -109,6 +111,9 @@ find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{
 
 
 %changelog
+* Tue Jul 25 2023 Maxwell G <maxwell@gtmx.me> - 3.4.6-3
+- Fix FTBFS. Closes rhbz#2215512.
+
 * Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.6-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
 

diff --git a/tests-import-match_hostname-from-urllib3.patch b/tests-import-match_hostname-from-urllib3.patch
new file mode 100644
index 0000000..6a75571
--- /dev/null
+++ b/tests-import-match_hostname-from-urllib3.patch
@@ -0,0 +1,35 @@
+From b1c9a7ae922667742a1bb0dcce89ac372512d91a Mon Sep 17 00:00:00 2001
+From: Maxwell G <maxwell@gtmx.me>
+Date: Tue, 25 Jul 2023 20:11:11 +0000
+Subject: [PATCH] tests: import match_hostname() from urllib3
+
+It's been removed from the ssl module in Python 3.12.
+---
+ .../module_utils/_api/transport/test_ssladapter.py    | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py b/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
+index 428163e..751b896 100644
+--- a/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
++++ b/tests/unit/plugins/module_utils/_api/transport/test_ssladapter.py
+@@ -25,9 +25,14 @@ try:
+         match_hostname, CertificateError
+     )
+ except ImportError:
+-    from ssl import (
+-        match_hostname, CertificateError
+-    )
++    try:
++        from ssl import (
++            match_hostname, CertificateError
++        )
++    except ImportError:
++        from urllib3.util.ssl_match_hostname import (
++            match_hostname, CertificateError
++        )
+ 
+ try:
+     from ssl import OP_NO_SSLv3, OP_NO_SSLv2, OP_NO_TLSv1
+-- 
+2.41.0
+

diff --git a/tests-remove-usage-of-deprecated-TestCase-methods.patch b/tests-remove-usage-of-deprecated-TestCase-methods.patch
new file mode 100644
index 0000000..c305ef4
--- /dev/null
+++ b/tests-remove-usage-of-deprecated-TestCase-methods.patch
@@ -0,0 +1,31 @@
+From 076a13403c41f7f509403398d0e3dd24d7f7df82 Mon Sep 17 00:00:00 2001
+From: Maxwell G <maxwell@gtmx.me>
+Date: Tue, 25 Jul 2023 20:14:49 +0000
+Subject: [PATCH] tests: remove usage of deprecated TestCase methods
+
+---
+ tests/unit/plugins/connection/test_docker.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/unit/plugins/connection/test_docker.py b/tests/unit/plugins/connection/test_docker.py
+index 5ae6a8e..12a67ee 100644
+--- a/tests/unit/plugins/connection/test_docker.py
++++ b/tests/unit/plugins/connection/test_docker.py
+@@ -36,7 +36,7 @@ class TestDockerConnectionClass(unittest.TestCase):
+     def test_docker_connection_module_too_old(self, mock_new_docker_verison, mock_old_docker_version):
+         self.dc._version = None
+         self.dc.remote_user = 'foo'
+-        self.assertRaisesRegexp(AnsibleError, '^docker connection type requires docker 1.3 or higher$', self.dc._get_actual_user)
++        self.assertRaisesRegex(AnsibleError, '^docker connection type requires docker 1.3 or higher$', self.dc._get_actual_user)
+ 
+     @mock.patch('ansible_collections.community.docker.plugins.connection.docker.Connection._old_docker_version',
+                 return_value=('false', 'garbage', '', 1))
+@@ -54,4 +54,4 @@ class TestDockerConnectionClass(unittest.TestCase):
+     def test_docker_connection_module_wrong_cmd(self, mock_new_docker_version, mock_old_docker_version):
+         self.dc._version = None
+         self.dc.remote_user = 'foo'
+-        self.assertRaisesRegexp(AnsibleError, '^Docker version check (.*?) failed: ', self.dc._get_actual_user)
++        self.assertRaisesRegex(AnsibleError, '^Docker version check (.*?) failed: ', self.dc._get_actual_user)
+-- 
+2.41.0
+

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 21:12 [rpms/ansible-collection-community-docker] epel10: Fix FTBFS. Closes rhbz#2215512 Maxwell G

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