diff --git a/.gitignore b/.gitignore index ace367d..f1a3000 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/awscrt-0.27.2.tar.gz +SOURCES/awscrt-0.31.1.tar.gz diff --git a/.python-awscrt.metadata b/.python-awscrt.metadata index d27518a..df371d4 100644 --- a/.python-awscrt.metadata +++ b/.python-awscrt.metadata @@ -1 +1 @@ -9951436161fdbf91db142b85d6aa208614dc2b0b SOURCES/awscrt-0.27.2.tar.gz +cf8ef99d3be196ac5b91aeb7deb36f9851b79044 SOURCES/awscrt-0.31.1.tar.gz diff --git a/SOURCES/der-c.patch b/SOURCES/der-c.patch deleted file mode 100644 index 80b739b..0000000 --- a/SOURCES/der-c.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/crt/aws-c-cal/source/der.c 2025-08-29 10:43:04.487705098 +0100 -+++ B/crt/aws-c-cal/source/der.c 2025-08-29 14:27:00.649373755 +0100 -@@ -80,21 +80,28 @@ - if (len_bytes & 0x80) { - len_bytes &= 0x7f; - switch (len_bytes) { -- case 1: -- if (!aws_byte_cursor_read_u8(cur, (uint8_t *)&len)) { -+ case 1: { -+ uint8_t len8; -+ if (!aws_byte_cursor_read_u8(cur, &len8)) { - return aws_raise_error(AWS_ERROR_CAL_MALFORMED_ASN1_ENCOUNTERED); - } -+ len = len8; - break; -- case 2: -- if (!aws_byte_cursor_read_be16(cur, (uint16_t *)&len)) { -+ } -+ case 2: { -+ uint16_t len16; -+ if (!aws_byte_cursor_read_be16(cur, &len16)) { - return aws_raise_error(AWS_ERROR_CAL_MALFORMED_ASN1_ENCOUNTERED); - } -+ len = len16; - break; -- case 4: -+ } -+ case 4: { - if (!aws_byte_cursor_read_be32(cur, &len)) { - return aws_raise_error(AWS_ERROR_CAL_MALFORMED_ASN1_ENCOUNTERED); - } - break; -+ } - default: - return aws_raise_error(AWS_ERROR_CAL_MALFORMED_ASN1_ENCOUNTERED); - } diff --git a/SOURCES/skip-SHA1-in-test_crypto.patch b/SOURCES/skip-SHA1-in-test_crypto.patch index c5030c7..5935942 100644 --- a/SOURCES/skip-SHA1-in-test_crypto.patch +++ b/SOURCES/skip-SHA1-in-test_crypto.patch @@ -55,4 +55,3 @@ index 628900f..7f2296d 100644 + h = Hash.sha256_new() h.update(b'totally original test string') digest = h.digest() - diff --git a/SOURCES/skip-tests-requiring-network.patch b/SOURCES/skip-tests-requiring-network.patch index da37539..9416586 100644 --- a/SOURCES/skip-tests-requiring-network.patch +++ b/SOURCES/skip-tests-requiring-network.patch @@ -1,8 +1,36 @@ +diff --git a/test/test_aiohttp_client.py b/test/test_aiohttp_client.py +index f3fa544..3b04218 100644 +--- a/test/test_aiohttp_client.py ++++ b/test/test_aiohttp_client.py +@@ -288,6 +288,7 @@ class TestAsyncClient(NativeResourceTest): + + return connection + ++ @unittest.skip("Requires network") + async def _test_h2_client(self): + url = urlparse("https://d1cz66xoahf9cl.cloudfront.net/http_test_doc.txt") + connection = await self._new_h2_client_connection(url) +@@ -309,6 +310,7 @@ class TestAsyncClient(NativeResourceTest): + + await connection.close() + ++ @unittest.skip("Requires network") + async def _test_h2_manual_write_exception(self): + url = urlparse("https://d1cz66xoahf9cl.cloudfront.net/http_test_doc.txt") + connection = await self._new_h2_client_connection(url) +@@ -428,6 +430,7 @@ class TestAsyncClient(NativeResourceTest): + finally: + self._stop_server() + ++ @unittest.skip("Requires network") + async def _test_cross_thread_http2_client(self): + """Test using an HTTP/2 client from a different thread/event loop.""" + url = urlparse("https://d1cz66xoahf9cl.cloudfront.net/http_test_doc.txt") diff --git a/test/test_http_client.py b/test/test_http_client.py -index f79f39a..7498a96 100644 +index 6aa9917..ad4b700 100644 --- a/test/test_http_client.py +++ b/test/test_http_client.py -@@ -353,6 +353,7 @@ class TestClient(NativeResourceTest): +@@ -354,6 +354,7 @@ class TestClient(NativeResourceTest): tls_connection_options=tls_conn_opt) return connection_future.result(self.timeout) @@ -10,7 +38,7 @@ index f79f39a..7498a96 100644 def test_h2_client(self): url = urlparse("https://d1cz66xoahf9cl.cloudfront.net/http_test_doc.txt") connection = self._new_h2_client_connection(url) -@@ -375,6 +376,7 @@ class TestClient(NativeResourceTest): +@@ -376,6 +377,7 @@ class TestClient(NativeResourceTest): self.assertEqual(None, connection.close().exception(self.timeout)) diff --git a/SOURCES/websockets.patch b/SOURCES/websockets.patch index 3b2334b..143d7b3 100644 --- a/SOURCES/websockets.patch +++ b/SOURCES/websockets.patch @@ -22,5 +22,3 @@ index fcbcedb..ebebbcb 100644 + sleep(0.01) + asyncio.run_coroutine_threadsafe(self._current_connection.send(msg), self._server_loop) - - diff --git a/SPECS/python-awscrt.spec b/SPECS/python-awscrt.spec index 49d7c96..1c78880 100644 --- a/SPECS/python-awscrt.spec +++ b/SPECS/python-awscrt.spec @@ -3,8 +3,8 @@ Python bindings for the AWS Common Runtime} Name: python-awscrt -Version: 0.27.2 -Release: 2%{?dist} +Version: 0.31.1 +Release: 1%{?dist} Summary: Python bindings for the AWS Common Runtime # All files are licensed under Apache-2.0, except: @@ -18,22 +18,18 @@ Source0: %{pypi_source awscrt} # two tests require internet connection, skip them Patch0: skip-tests-requiring-network.patch -# SHA1 is deprecated - remove it from tests +# skip SHA1 in test_crypto Patch1: skip-SHA1-in-test_crypto.patch -# https://github.com/awslabs/aws-c-cal/pull/225 -Patch2: der-c.patch # websockets test fail fix -Patch3: websockets.patch -# Remove FIPS version check to build with OpenSSL 3.x -Patch4: s2n-remove-fips-version-check.patch +Patch2: websockets.patch +# remove FIPS version check in s2n +Patch3: s2n-remove-fips-version-check.patch BuildRequires: python%{python3_pkgversion}-devel - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: openssl-devel - BuildRequires: python%{python3_pkgversion}-websockets @@ -53,13 +49,10 @@ Summary: %{summary} %autosetup -p1 -n awscrt-%{version} # relax version requirements -sed -i -e 's/setuptools>=75\.3\.1/setuptools/' -e 's/wheel>=0\.45\.1/wheel/' pyproject.toml - -# Remove websocket test for now -# TODO: fix the test properly -rm -f test/test_websocket.py - -# fix for osci.rpmdeplint test - package builds with the name 'unknown' +sed -i -e 's/"setuptools>=75\.3\.1",/"setuptools",\n "wheel",/' pyproject.toml +# fix bdist_wheel import for setuptools 70.0.0+ +sed -i -e 's/from setuptools\.command\.bdist_wheel import bdist_wheel/from wheel.bdist_wheel import bdist_wheel/' setup.py +# package builds with the name 'unknown' sed -i '/setuptools\.setup(/a\ name="awscrt",' setup.py @@ -86,6 +79,10 @@ PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" %{py %changelog +* Thu Apr 09 2026 Kseniia Nivnia - 0.31.1-1 +- Update to 0.31.1 + Resolves: RHEL-157871 + * Wed Nov 26 2025 Kseniia Nivnia - 0.27.2-2 - Add patch fixing FIPS mode crash in awscli2 Resolves: RHEL-131280