diff --git a/backport-fix-Add-get_connection_with_tls_context-for-requests.patch b/backport-fix-Add-get_connection_with_tls_context-for-requests.patch new file mode 100644 index 0000000000000000000000000000000000000000..e565026e2f9d2f3f1f1693db323e34c0bdebf107 --- /dev/null +++ b/backport-fix-Add-get_connection_with_tls_context-for-requests.patch @@ -0,0 +1,37 @@ +From 790d2291837de9c68ccc067cb2c88b11c60e69f9 Mon Sep 17 00:00:00 2001 +From: eaglegai <31752768+eaglegai@users.noreply.github.com> +Date: Fri, 28 Jun 2024 01:14:01 +0800 +Subject: [PATCH] fix: Add get_connection_with_tls_context() for requests + 2.32.2+ (#5435) + +get_connection() is deprecated in requests 2.32.2+ so this will +allow for the LXDSocketAdapter to avoid using a deprecated api. + +Fixes GH-5434 + +Signed-off-by: eaglegai +--- + cloudinit/sources/DataSourceLXD.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/cloudinit/sources/DataSourceLXD.py b/cloudinit/sources/DataSourceLXD.py +index 1e1e9e2..ce17f85 100644 +--- a/cloudinit/sources/DataSourceLXD.py ++++ b/cloudinit/sources/DataSourceLXD.py +@@ -137,6 +137,13 @@ def _maybe_remove_top_network(cfg): + LOG.debug(bmsg, "fixed by removing shifting network.", cfg) + return network_val + ++ # Fix for requests 2.32.2+: ++ # https://github.com/psf/requests/pull/6710 ++ def get_connection_with_tls_context( ++ self, request, verify, proxies=None, cert=None ++ ): ++ return self.get_connection(request.url, proxies) ++ + + def _raw_instance_data_to_dict(metadata_type: str, metadata_value) -> dict: + """Convert raw instance data from str, bytes, YAML to dict +-- +2.27.0 + diff --git a/cloud-init.spec b/cloud-init.spec index 348a205c450ebe1d9bd59e4f4da2b40f7dfb4af6..8b5979dc4c0a043103088586e5f5e9e354eda3b2 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 21.4 -Release: 36 +Release: 37 Summary: the defacto multi-distribution package that handles early initialization of a cloud instance. License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init @@ -95,6 +95,7 @@ Patch6061: backport-fix-typing-for-rsyslog-ubuntu_pro-power_state_change.patch Patch6062: fix-CVE-2024-6174-1.patch Patch6063: fix-CVE-2024-6174-2.patch Patch6064: backport-CVE-2024-11584.patch +Patch6065: backport-fix-Add-get_connection_with_tls_context-for-requests.patch BuildRequires: pkgconfig(systemd) python3-devel python3-setuptools systemd BuildRequires: iproute python3-configobj python3-httpretty >= 0.8.14-2 @@ -229,6 +230,12 @@ fi %exclude /usr/share/doc/* %changelog +* Mon Dec 01 2025 shixuantong - 21.4-37 +- Type:bugfix +- CVE: +- SUG:NA +- DESC:fix: Add get_connection_with_tls_context() for requests 2.32.2+ + * Mon Jul 07 2025 shixuantong - 21.4-36 - Type:CVE - CVE:CVE-2024-11584