From 20258e0b59bc118f8e437e6a6aa7b99982427591 Mon Sep 17 00:00:00 2001 From: ccowman Date: Fri, 20 Dec 2024 17:43:40 +0000 Subject: [PATCH] Revise patches and update to 2.22.9 Update to 2.22.9 and revise patches to reflect code changes Remove patch hunks that fixed whitespace errors which are no longer present in release Remove patch hunk which stops the initialization of io.BufferedIOBase with arbitrary binary data. The latest code post adding support for python 3.12 instantiates a BufferedStream class which requires initialization Stop applying assertions.patch to fix EKS test suite. This test suite is no longer broken: https://github.com/aws/aws-cli/pull/8917 Resolves: RHEL-66152 Signed-off-by: ccowman --- .gitignore | 1 + awscli2.spec | 6 ++--- python312.patch | 60 ++----------------------------------------------- sources | 2 +- 4 files changed, 6 insertions(+), 63 deletions(-) diff --git a/.gitignore b/.gitignore index 3c75c0b..c9bc162 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ /aws-cli-2.17.6.tar.gz /aws-cli-2.17.13.tar.gz /aws-cli-2.17.18.tar.gz +/aws-cli-2.22.9.tar.gz diff --git a/awscli2.spec b/awscli2.spec index e84784e..0012bf7 100644 --- a/awscli2.spec +++ b/awscli2.spec @@ -1,7 +1,7 @@ %global pkgname aws-cli Name: awscli2 -Version: 2.17.18 +Version: 2.22.9 Release: %autorelease Summary: Universal Command Line Environment for AWS, version 2 @@ -17,12 +17,10 @@ Source0: https://github.com/aws/aws-cli/archive/%{version}/%{pkgname} Patch0: ruamel-yaml-0.17.32.patch # fix Python 3.12 incompatibilities Patch1: python312.patch -# fix incorrect assertions in TestKubeconfigLoader -Patch2: assertions.patch # Bump ceiling for botocore memory leak tests # https://github.com/aws/aws-cli/pull/8744 # https://github.com/boto/botocore/issues/3205 -Patch3: 0001-Bump-the-ceiling-for-botocore-memory-leak-tests-to-1.patch +Patch2: 0001-Bump-the-ceiling-for-botocore-memory-leak-tests-to-1.patch BuildArch: noarch diff --git a/python312.patch b/python312.patch index 99348af..bd2c9a6 100644 --- a/python312.patch +++ b/python312.patch @@ -712,41 +712,6 @@ index 19d559ac..e7db8d8b 100644 def tearDown(self): self.datetime_patcher.stop() -diff --git a/tests/unit/botocore/test_client.py b/tests/unit/botocore/test_client.py -index 464cc354..2455fc5f 100644 ---- a/tests/unit/botocore/test_client.py -+++ b/tests/unit/botocore/test_client.py -@@ -969,7 +969,7 @@ class TestAutoGeneratedClient(unittest.TestCase): - lines = [ - (' Creates an iterator that will paginate through responses ' - 'from :py:meth:`MyService.Client.test_operation`.'), -- ' **Request Syntax** ', -+ ' **Request Syntax**', - ' ::', - ' response_iterator = paginator.paginate(', - " Foo='string',", -@@ -985,17 +985,17 @@ class TestAutoGeneratedClient(unittest.TestCase): - ' :type Bar: string', - ' :param Bar: Documents Bar', - ' :type PaginationConfig: dict', -- ' :param PaginationConfig: ', -+ ' :param PaginationConfig:', - (' A dictionary that provides parameters to control ' - 'pagination.'), -- ' - **MaxItems** *(integer) --* ', -+ ' - **MaxItems** *(integer) --*', - (' The total number of items to return. If the total ' - 'number of items available is more than the value specified ' - 'in max-items then a ``NextToken`` will be provided in the ' - 'output that you can use to resume pagination.'), -- ' - **PageSize** *(integer) --* ', -+ ' - **PageSize** *(integer) --*', - ' The size of each page.', -- ' - **StartingToken** *(string) --* ', -+ ' - **StartingToken** *(string) --*', - (' A token to specify where to start paginating. This is ' - 'the ``NextToken`` from a previous response.'), - ' :returns: None', diff --git a/tests/unit/botocore/test_credentials.py b/tests/unit/botocore/test_credentials.py index b9931216..7fdcf4ba 100644 --- a/tests/unit/botocore/test_credentials.py @@ -862,16 +827,7 @@ index b4699c6c..2d128bf1 100644 DT_FORMAT = "%Y-%m-%dT%H:%M:%SZ" -@@ -1052,7 +1052,7 @@ class TestSwitchToChunkedEncodingForNonSeekableObjects(unittest.TestCase): - def test_switch_to_chunked_encodeing_for_stream_like_object(self): - request = AWSRequest( - method='POST', headers={}, -- data=io.BufferedIOBase(b"some initial binary data"), -+ data=io.BufferedIOBase(), - url='https://foo.amazonaws.com/bucket/key.txt' - ) - prepared_request = request.prepare() -@@ -2867,7 +2867,7 @@ class TestInstanceMetadataFetcher(unittest.TestCase): +@@ -2913,7 +2913,7 @@ class TestInstanceMetadataFetcher(unittest.TestCase): self, dt=None, offset=None, offset_func=operator.add ): if dt is None: @@ -880,19 +836,7 @@ index b4699c6c..2d128bf1 100644 if offset is not None: dt = offset_func(dt, offset) -diff --git a/tests/unit/botocore/test_waiters.py b/tests/unit/botocore/test_waiters.py -index c5876f5b..ea393ae9 100644 ---- a/tests/unit/botocore/test_waiters.py -+++ b/tests/unit/botocore/test_waiters.py -@@ -646,7 +646,7 @@ class TestCreateWaiter(unittest.TestCase): - (' Polls :py:meth:`MyService.Client.foo` every 1 ' - 'seconds until a successful state is reached. An error ' - 'is returned after 1 failed checks.'), -- ' **Request Syntax** ', -+ ' **Request Syntax**', - ' ::', - ' waiter.wait(', - " bar='string'", + diff --git a/tests/unit/customizations/eks/test_get_token.py b/tests/unit/customizations/eks/test_get_token.py index 9575aa0d..2664e1fe 100644 --- a/tests/unit/customizations/eks/test_get_token.py diff --git a/sources b/sources index 155eb76..a6f8408 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (aws-cli-2.17.18.tar.gz) = 33fd535deefdd214c1b92f4941a83225969b33230dcfa70fea2114be06a92161a97e641fe8bb43bb0f57249ab17593a197b678a3d1dd7d68d244fd8dd64fbb3c +SHA512 (aws-cli-2.22.9.tar.gz) = 36869662105f0aa10f294f96777c9be52c4603d3ce69f57713a225f38a975cebf0d4102d520a9378a9c88d5104eff7003b64c72628059f286b4f592dcdfeca20