From ac6d36ad8216b09a4b593df99cd4faf0faae1d8f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 31 2019 14:52:15 +0000 Subject: import awscli-1.14.28-5.el7_5.1 --- diff --git a/.awscli.metadata b/.awscli.metadata new file mode 100644 index 0000000..4cd68ff --- /dev/null +++ b/.awscli.metadata @@ -0,0 +1,2 @@ +37649950791f3db6f5879205de658fa78075aae1 SOURCES/awscli-1.14.28.tar.gz +7310d6ddf680c524ad6b16f673a77a9defb5766e SOURCES/colorama-0.3.7.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a69681e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/awscli-1.14.28.tar.gz +SOURCES/colorama-0.3.7.tar.gz diff --git a/SOURCES/bundled-python-botocore.patch b/SOURCES/bundled-python-botocore.patch new file mode 100644 index 0000000..6b4895e --- /dev/null +++ b/SOURCES/bundled-python-botocore.patch @@ -0,0 +1,591 @@ +diff -uNr a/awscli/alias.py b/awscli/alias.py +--- a/awscli/alias.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/alias.py 2018-01-26 13:10:00.592942535 +0100 +@@ -15,6 +15,8 @@ + import shlex + import subprocess + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.configloader import raw_config_parse + + from awscli.compat import compat_shell_quote +diff -uNr a/awscli/argprocess.py b/awscli/argprocess.py +--- a/awscli/argprocess.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/argprocess.py 2018-01-26 13:10:20.958750211 +0100 +@@ -15,6 +15,8 @@ + import logging + from awscli.compat import six + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.compat import OrderedDict, json + + from awscli import SCALAR_TYPES, COMPLEX_TYPES +diff -uNr a/awscli/arguments.py b/awscli/arguments.py +--- a/awscli/arguments.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/arguments.py 2018-01-26 13:10:57.422405868 +0100 +@@ -38,6 +38,8 @@ + """ + import logging + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore import xform_name + from botocore.hooks import first_non_none_response + +diff -uNr a/awscli/clidocs.py b/awscli/clidocs.py +--- a/awscli/clidocs.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/clidocs.py 2018-01-26 13:09:41.085126755 +0100 +@@ -12,6 +12,8 @@ + # language governing permissions and limitations under the License. + import logging + import os ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore import xform_name + from botocore.docs.bcdoc.docevents import DOC_EVENTS + from botocore.model import StringShape +diff -uNr a/awscli/clidriver.py b/awscli/clidriver.py +--- a/awscli/clidriver.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/clidriver.py 2018-01-26 13:10:06.539886375 +0100 +@@ -14,6 +14,7 @@ + import signal + import logging + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + import botocore.session + from botocore import __version__ as botocore_version + from botocore.hooks import HierarchicalEmitter +diff -uNr a/awscli/compat.py b/awscli/compat.py +--- a/awscli/compat.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/compat.py 2018-01-26 13:11:17.419217029 +0100 +@@ -16,6 +16,7 @@ + import platform + import zipfile + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.compat import six + #import botocore.compat + +diff -uNr a/awscli/customizations/assumerole.py b/awscli/customizations/assumerole.py +--- a/awscli/customizations/assumerole.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/assumerole.py 2018-01-26 13:05:13.931649607 +0100 +@@ -1,6 +1,8 @@ + import os + import logging + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ProfileNotFound + from botocore.credentials import JSONFileCache + +diff -uNr a/awscli/customizations/awslambda.py b/awscli/customizations/awslambda.py +--- a/awscli/customizations/awslambda.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/awslambda.py 2018-01-26 13:07:06.376587737 +0100 +@@ -14,6 +14,8 @@ + import copy + from contextlib import closing + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.vendored import six + + from awscli.arguments import CustomArgument, CLIArgument +diff -uNr a/awscli/customizations/cloudformation/deployer.py b/awscli/customizations/cloudformation/deployer.py +--- a/awscli/customizations/cloudformation/deployer.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/cloudformation/deployer.py 2018-01-26 13:08:05.525029173 +0100 +@@ -14,6 +14,7 @@ + import sys + import time + import logging ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + import botocore + import collections + +diff -uNr a/awscli/customizations/cloudformation/package.py b/awscli/customizations/cloudformation/package.py +--- a/awscli/customizations/cloudformation/package.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/cloudformation/package.py 2018-01-26 13:07:59.865082622 +0100 +@@ -17,6 +17,7 @@ + + import json + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.client import Config + + from awscli.customizations.cloudformation.artifact_exporter import Template +diff -uNr a/awscli/customizations/cloudfront.py b/awscli/customizations/cloudfront.py +--- a/awscli/customizations/cloudfront.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/cloudfront.py 2018-01-26 13:07:51.406162504 +0100 +@@ -15,6 +15,7 @@ + from cryptography.hazmat.primitives import serialization, hashes + from cryptography.hazmat.primitives.asymmetric import padding + from cryptography.hazmat.backends import default_backend ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.utils import parse_to_aware_datetime + from botocore.signers import CloudFrontSigner + +diff -uNr a/awscli/customizations/cloudsearch.py b/awscli/customizations/cloudsearch.py +--- a/awscli/customizations/cloudsearch.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/cloudsearch.py 2018-01-26 13:09:14.013382406 +0100 +@@ -14,6 +14,8 @@ + import logging + + from awscli.customizations.flatten import FlattenArguments, SEP ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.compat import OrderedDict + + LOG = logging.getLogger(__name__) +diff -uNr a/awscli/customizations/cloudtrail/subscribe.py b/awscli/customizations/cloudtrail/subscribe.py +--- a/awscli/customizations/cloudtrail/subscribe.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/cloudtrail/subscribe.py 2018-01-26 13:09:31.120220859 +0100 +@@ -17,6 +17,7 @@ + from .utils import get_account_id + from awscli.customizations.commands import BasicCommand + from awscli.customizations.utils import s3_bucket_exists ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ClientError + + +diff -uNr a/awscli/customizations/cloudtrail/validation.py b/awscli/customizations/cloudtrail/validation.py +--- a/awscli/customizations/cloudtrail/validation.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/cloudtrail/validation.py 2018-01-26 13:09:24.109287066 +0100 +@@ -28,6 +28,7 @@ + from awscli.customizations.cloudtrail.utils import get_trail_by_arn, \ + get_account_id_from_arn + from awscli.customizations.commands import BasicCommand ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ClientError + + +diff -uNr a/awscli/customizations/codecommit.py b/awscli/customizations/codecommit.py +--- a/awscli/customizations/codecommit.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/codecommit.py 2018-01-26 13:07:32.888337376 +0100 +@@ -18,6 +18,7 @@ + import fileinput + import datetime + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.auth import SigV4Auth + from botocore.awsrequest import AWSRequest + from botocore.compat import urlsplit +diff -uNr a/awscli/customizations/codedeploy/deregister.py b/awscli/customizations/codedeploy/deregister.py +--- a/awscli/customizations/codedeploy/deregister.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/codedeploy/deregister.py 2018-01-26 13:08:35.275748222 +0100 +@@ -13,6 +13,7 @@ + + import sys + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ClientError + + from awscli.customizations.commands import BasicCommand +diff -uNr a/awscli/customizations/codedeploy/push.py b/awscli/customizations/codedeploy/push.py +--- a/awscli/customizations/codedeploy/push.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/codedeploy/push.py 2018-01-26 13:08:28.662810672 +0100 +@@ -18,6 +18,7 @@ + import contextlib + from datetime import datetime + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ClientError + + from awscli.compat import six +diff -uNr a/awscli/customizations/commands.py b/awscli/customizations/commands.py +--- a/awscli/customizations/commands.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/commands.py 2018-01-26 13:09:04.583471457 +0100 +@@ -1,6 +1,8 @@ + import logging + import os + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore import model + from botocore.compat import OrderedDict + from botocore.validate import validate_parameters +diff -uNr a/awscli/customizations/configure/addmodel.py b/awscli/customizations/configure/addmodel.py +--- a/awscli/customizations/configure/addmodel.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/configure/addmodel.py 2018-01-26 13:06:54.673698254 +0100 +@@ -13,6 +13,8 @@ + import json + import os + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.model import ServiceModel + + from awscli.customizations.commands import BasicCommand +diff -uNr a/awscli/customizations/configure/configure.py b/awscli/customizations/configure/configure.py +--- a/awscli/customizations/configure/configure.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/configure/configure.py 2018-01-26 13:06:42.425813916 +0100 +@@ -13,6 +13,8 @@ + import os + import logging + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ProfileNotFound + + from awscli.compat import compat_input +diff -uNr a/awscli/customizations/configure/__init__.py b/awscli/customizations/configure/__init__.py +--- a/awscli/customizations/configure/__init__.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/configure/__init__.py 2018-01-26 13:06:37.421861170 +0100 +@@ -11,6 +11,8 @@ + # ANY KIND, either express or implied. See the License for the specific + # language governing permissions and limitations under the License. + import string ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.vendored.six.moves import shlex_quote + + NOT_SET = '' +diff -uNr a/awscli/customizations/datapipeline/createdefaultroles.py b/awscli/customizations/datapipeline/createdefaultroles.py +--- a/awscli/customizations/datapipeline/createdefaultroles.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/datapipeline/createdefaultroles.py 2018-01-26 13:09:36.179173085 +0100 +@@ -24,6 +24,8 @@ + from awscli.customizations.commands import BasicCommand + from awscli.customizations.datapipeline.translator \ + import display_response, dict_to_string, get_region ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ClientError + + LOG = logging.getLogger(__name__) +diff -uNr a/awscli/customizations/ec2/addcount.py b/awscli/customizations/ec2/addcount.py +--- a/awscli/customizations/ec2/addcount.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/ec2/addcount.py 2018-01-26 13:08:09.954987338 +0100 +@@ -12,6 +12,8 @@ + # language governing permissions and limitations under the License. + import logging + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore import model + + from awscli.arguments import BaseCLIArgument +diff -uNr a/awscli/customizations/ec2/decryptpassword.py b/awscli/customizations/ec2/decryptpassword.py +--- a/awscli/customizations/ec2/decryptpassword.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/ec2/decryptpassword.py 2018-01-26 13:08:15.792932208 +0100 +@@ -16,6 +16,8 @@ + from cryptography.hazmat.primitives.asymmetric import padding + from awscli.compat import six + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore import model + + from awscli.arguments import BaseCLIArgument +diff -uNr a/awscli/customizations/emr/createcluster.py b/awscli/customizations/emr/createcluster.py +--- a/awscli/customizations/emr/createcluster.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/emr/createcluster.py 2018-01-26 13:04:05.229298393 +0100 +@@ -28,6 +28,8 @@ + from awscli.customizations.emr.command import Command + from awscli.customizations.emr.constants import EC2_ROLE_NAME + from awscli.customizations.emr.constants import EMR_ROLE_NAME ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.compat import json + + +diff -uNr a/awscli/customizations/emr/createdefaultroles.py b/awscli/customizations/emr/createdefaultroles.py +--- a/awscli/customizations/emr/createdefaultroles.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/emr/createdefaultroles.py 2018-01-26 13:04:47.028903661 +0100 +@@ -13,6 +13,8 @@ + + import logging + import re ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + import botocore.exceptions + from botocore import xform_name + +diff -uNr a/awscli/customizations/emr/describecluster.py b/awscli/customizations/emr/describecluster.py +--- a/awscli/customizations/emr/describecluster.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/emr/describecluster.py 2018-01-26 13:04:12.891226039 +0100 +@@ -16,6 +16,8 @@ + from awscli.customizations.emr import emrutils + from awscli.customizations.emr import helptext + from awscli.customizations.emr.command import Command ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import NoCredentialsError + + +diff -uNr a/awscli/customizations/emr/emrfsutils.py b/awscli/customizations/emr/emrfsutils.py +--- a/awscli/customizations/emr/emrfsutils.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/emr/emrfsutils.py 2018-01-26 13:03:57.650369965 +0100 +@@ -14,6 +14,8 @@ + from awscli.customizations.emr import constants + from awscli.customizations.emr import emrutils + from awscli.customizations.emr import exceptions ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.compat import OrderedDict + + +diff -uNr a/awscli/customizations/emr/emrutils.py b/awscli/customizations/emr/emrutils.py +--- a/awscli/customizations/emr/emrutils.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/emr/emrutils.py 2018-01-26 13:04:20.074158208 +0100 +@@ -19,6 +19,8 @@ + from awscli.clidriver import CLIOperationCaller + from awscli.customizations.emr import constants + from awscli.customizations.emr import exceptions ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import WaiterError, NoCredentialsError + from botocore import xform_name + +diff -uNr a/awscli/customizations/emr/sshutils.py b/awscli/customizations/emr/sshutils.py +--- a/awscli/customizations/emr/sshutils.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/emr/sshutils.py 2018-01-26 13:03:43.736501361 +0100 +@@ -16,6 +16,8 @@ + from awscli.customizations.emr import exceptions + from awscli.customizations.emr import emrutils + from awscli.customizations.emr import constants ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import WaiterError + + LOG = logging.getLogger(__name__) +diff -uNr a/awscli/customizations/generatecliskeleton.py b/awscli/customizations/generatecliskeleton.py +--- a/awscli/customizations/generatecliskeleton.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/generatecliskeleton.py 2018-01-26 13:08:42.166683149 +0100 +@@ -13,6 +13,7 @@ + import json + import sys + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore import xform_name + from botocore.stub import Stubber + from botocore.utils import ArgumentGenerator +diff -uNr a/awscli/customizations/globalargs.py b/awscli/customizations/globalargs.py +--- a/awscli/customizations/globalargs.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/globalargs.py 2018-01-26 13:08:21.690876511 +0100 +@@ -13,6 +13,7 @@ + import sys + import os + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.client import Config + from botocore.endpoint import DEFAULT_TIMEOUT + from botocore.handlers import disable_signing +diff -uNr a/awscli/customizations/history/db.py b/awscli/customizations/history/db.py +--- a/awscli/customizations/history/db.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/history/db.py 2018-01-26 13:07:46.435209447 +0100 +@@ -18,6 +18,8 @@ + import logging + from collections import MutableMapping + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.history import BaseHistoryHandler + + from awscli.compat import sqlite3 +diff -uNr a/awscli/customizations/history/__init__.py b/awscli/customizations/history/__init__.py +--- a/awscli/customizations/history/__init__.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/history/__init__.py 2018-01-26 13:07:39.310276730 +0100 +@@ -14,6 +14,7 @@ + import sys + import logging + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.history import get_global_history_recorder + from botocore.exceptions import ProfileNotFound + +diff -uNr a/awscli/customizations/opsworks.py b/awscli/customizations/opsworks.py +--- a/awscli/customizations/opsworks.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/opsworks.py 2018-01-26 13:05:52.174288464 +0100 +@@ -22,6 +22,8 @@ + import tempfile + import textwrap + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ClientError + + from awscli.compat import shlex_quote, urlopen, ensure_text_type +diff -uNr a/awscli/customizations/paginate.py b/awscli/customizations/paginate.py +--- a/awscli/customizations/paginate.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/paginate.py 2018-01-26 13:08:58.653527456 +0100 +@@ -26,6 +26,8 @@ + import logging + from functools import partial + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore import xform_name + from botocore.exceptions import DataNotFoundError, PaginationError + from botocore import model +diff -uNr a/awscli/customizations/s3/filegenerator.py b/awscli/customizations/s3/filegenerator.py +--- a/awscli/customizations/s3/filegenerator.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/s3/filegenerator.py 2018-01-26 13:03:20.538720427 +0100 +@@ -16,6 +16,7 @@ + + from dateutil.parser import parse + from dateutil.tz import tzlocal ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ClientError + + from awscli.customizations.s3.utils import find_bucket_key, get_file_stat +diff -uNr a/awscli/customizations/s3/subcommands.py b/awscli/customizations/s3/subcommands.py +--- a/awscli/customizations/s3/subcommands.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/s3/subcommands.py 2018-01-26 13:03:12.534796012 +0100 +@@ -14,6 +14,7 @@ + import logging + import sys + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.client import Config + from dateutil.parser import parse + from dateutil.tz import tzlocal +diff -uNr a/awscli/customizations/s3endpoint.py b/awscli/customizations/s3endpoint.py +--- a/awscli/customizations/s3endpoint.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/s3endpoint.py 2018-01-26 13:05:58.240231181 +0100 +@@ -26,6 +26,8 @@ + """ + from functools import partial + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.utils import fix_s3_host + + +diff -uNr a/awscli/customizations/s3uploader.py b/awscli/customizations/s3uploader.py +--- a/awscli/customizations/s3uploader.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/s3uploader.py 2018-01-26 13:06:04.494172122 +0100 +@@ -17,6 +17,7 @@ + import os + import sys + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + import botocore + import botocore.exceptions + from s3transfer.manager import TransferManager +diff -uNr a/awscli/customizations/scalarparse.py b/awscli/customizations/scalarparse.py +--- a/awscli/customizations/scalarparse.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/scalarparse.py 2018-01-26 13:05:00.167779585 +0100 +@@ -27,6 +27,8 @@ + in the future. + + """ ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.utils import parse_timestamp + from botocore.exceptions import ProfileNotFound + +diff -uNr a/awscli/customizations/servicecatalog/generateproduct.py b/awscli/customizations/servicecatalog/generateproduct.py +--- a/awscli/customizations/servicecatalog/generateproduct.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/servicecatalog/generateproduct.py 2018-01-26 13:07:18.521473049 +0100 +@@ -16,6 +16,7 @@ + from awscli.customizations.servicecatalog import helptext + from awscli.customizations.servicecatalog.generatebase \ + import GenerateBaseCommand ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.compat import json + + +diff -uNr a/awscli/customizations/servicecatalog/generateprovisioningartifact.py b/awscli/customizations/servicecatalog/generateprovisioningartifact.py +--- a/awscli/customizations/servicecatalog/generateprovisioningartifact.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/servicecatalog/generateprovisioningartifact.py 2018-01-26 13:07:12.858526527 +0100 +@@ -16,6 +16,7 @@ + from awscli.customizations.servicecatalog import helptext + from awscli.customizations.servicecatalog.generatebase \ + import GenerateBaseCommand ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.compat import json + + +diff -uNr a/awscli/customizations/streamingoutputarg.py b/awscli/customizations/streamingoutputarg.py +--- a/awscli/customizations/streamingoutputarg.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/streamingoutputarg.py 2018-01-26 13:07:00.862639809 +0100 +@@ -10,6 +10,8 @@ + # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + # ANY KIND, either express or implied. See the License for the specific + # language governing permissions and limitations under the License. ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.model import Shape + + from awscli.arguments import BaseCLIArgument +diff -uNr a/awscli/customizations/utils.py b/awscli/customizations/utils.py +--- a/awscli/customizations/utils.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/utils.py 2018-01-26 13:03:26.771661567 +0100 +@@ -17,6 +17,7 @@ + import copy + import sys + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.exceptions import ClientError + + +diff -uNr a/awscli/customizations/waiters.py b/awscli/customizations/waiters.py +--- a/awscli/customizations/waiters.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/waiters.py 2018-01-26 13:05:06.223722396 +0100 +@@ -10,6 +10,8 @@ + # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + # ANY KIND, either express or implied. See the License for the specific + # language governing permissions and limitations under the License. ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore import xform_name + from botocore.exceptions import DataNotFoundError + +diff -uNr a/awscli/formatter.py b/awscli/formatter.py +--- a/awscli/formatter.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/formatter.py 2018-01-26 13:10:13.129824143 +0100 +@@ -12,6 +12,8 @@ + # language governing permissions and limitations under the License. + import logging + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.compat import json + + from botocore.utils import set_value_from_jmespath +diff -uNr a/awscli/help.py b/awscli/help.py +--- a/awscli/help.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/help.py 2018-01-26 13:02:53.873972235 +0100 +@@ -20,6 +20,7 @@ + from docutils.core import publish_string + from docutils.writers import manpage + ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.docs.bcdoc import docevents + from botocore.docs.bcdoc.restdoc import ReSTDocument + from botocore.docs.bcdoc.textwriter import TextWriter +diff -uNr a/awscli/paramfile.py b/awscli/paramfile.py +--- a/awscli/paramfile.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/paramfile.py 2018-01-26 13:09:46.469075911 +0100 +@@ -13,6 +13,8 @@ + import logging + import os + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.vendored import requests + from awscli.compat import six + +diff -uNr a/awscli/plugin.py b/awscli/plugin.py +--- a/awscli/plugin.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/plugin.py 2018-01-26 13:11:22.716167007 +0100 +@@ -12,6 +12,8 @@ + # language governing permissions and limitations under the License. + import logging + ++import sys ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.hooks import HierarchicalEmitter + + log = logging.getLogger('awscli.plugin') +diff -uNr a/awscli/testutils.py b/awscli/testutils.py +--- a/awscli/testutils.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/testutils.py 2018-01-26 13:09:52.192021868 +0100 +@@ -47,6 +47,7 @@ + # different story. + mock = None + from awscli.compat import six ++sys.path.insert(0, '/usr/lib/fence-agents/bundled') + from botocore.hooks import HierarchicalEmitter + from botocore.session import Session + from botocore.exceptions import ClientError diff --git a/SOURCES/bz1581138-fix-unsupported-max_bandwidth.patch b/SOURCES/bz1581138-fix-unsupported-max_bandwidth.patch new file mode 100644 index 0000000..036a7c4 --- /dev/null +++ b/SOURCES/bz1581138-fix-unsupported-max_bandwidth.patch @@ -0,0 +1,11 @@ +diff -uNr a/awscli/customizations/s3/transferconfig.py b/awscli/customizations/s3/transferconfig.py +--- a/awscli/customizations/s3/transferconfig.py 2018-01-18 02:06:58.000000000 +0100 ++++ b/awscli/customizations/s3/transferconfig.py 2018-05-24 13:45:29.714544364 +0200 +@@ -109,7 +109,6 @@ + 'max_queue_size': 'max_request_queue_size', + 'multipart_threshold': 'multipart_threshold', + 'multipart_chunksize': 'multipart_chunksize', +- 'max_bandwidth': 'max_bandwidth', + } + kwargs = {} + for key, value in runtime_config.items(): diff --git a/SOURCES/python-rsa-to-cryptography.patch b/SOURCES/python-rsa-to-cryptography.patch new file mode 100644 index 0000000..f4fc4a0 --- /dev/null +++ b/SOURCES/python-rsa-to-cryptography.patch @@ -0,0 +1,98 @@ +diff -uNr a/awscli/customizations/cloudfront.py b/awscli/customizations/cloudfront.py +--- a/awscli/customizations/cloudfront.py 2017-08-12 01:39:00.000000000 +0200 ++++ b/awscli/customizations/cloudfront.py 2018-01-05 09:40:09.445445687 +0100 +@@ -14,7 +14,9 @@ + import time + import random + +-import rsa ++from cryptography.hazmat.primitives import serialization, hashes ++from cryptography.hazmat.primitives.asymmetric import padding ++from cryptography.hazmat.backends import default_backend + from botocore.utils import parse_to_aware_datetime + from botocore.signers import CloudFrontSigner + +@@ -254,7 +256,10 @@ + + class RSASigner(object): + def __init__(self, private_key): +- self.priv_key = rsa.PrivateKey.load_pkcs1(private_key.encode('utf8')) ++ self.priv_key = serialization.load_pem_private_key( ++ private_key.encode('utf8'), password=None, ++ backend=default_backend()) + + def sign(self, message): +- return rsa.sign(message, self.priv_key, 'SHA-1') ++ return self.priv_key.sign( ++ message, padding.PKCS1v15(), hashes.SHA1()) +diff -uNr a/awscli/customizations/cloudtrail/validation.py b/awscli/customizations/cloudtrail/validation.py +--- a/awscli/customizations/cloudtrail/validation.py 2017-08-12 01:39:00.000000000 +0200 ++++ b/awscli/customizations/cloudtrail/validation.py 2018-01-04 17:04:38.869212582 +0100 +@@ -22,8 +22,10 @@ + from datetime import datetime, timedelta + from dateutil import tz, parser + +-from pyasn1.error import PyAsn1Error +-import rsa ++from cryptography.hazmat.primitives import serialization, hashes ++from cryptography.hazmat.backends import default_backend ++from cryptography.hazmat.primitives.asymmetric import padding ++from cryptography.exceptions import InvalidSignature + + from awscli.customizations.cloudtrail.utils import get_trail_by_arn, \ + get_account_id_from_arn +@@ -530,20 +532,18 @@ + """ + try: + decoded_key = base64.b64decode(public_key) +- public_key = rsa.PublicKey.load_pkcs1(decoded_key, format='DER') ++ public_key = serialization.load_der_public_key(decoded_key, ++ backend=default_backend()) + to_sign = self._create_string_to_sign(digest_data, inflated_digest) + signature_bytes = binascii.unhexlify(digest_data['_signature']) +- rsa.verify(to_sign, signature_bytes, public_key) +- except PyAsn1Error: ++ public_key.verify(signature_bytes, to_sign, padding.PKCS1v15(), ++ hashes.SHA256()) ++ except (ValueError, TypeError): + raise DigestError( + ('Digest file\ts3://%s/%s\tINVALID: Unable to load PKCS #1 key' + ' with fingerprint %s') + % (bucket, key, digest_data['digestPublicKeyFingerprint'])) +- except rsa.pkcs1.VerificationError: +- # Note from the Python-RSA docs: Never display the stack trace of +- # a rsa.pkcs1.VerificationError exception. It shows where in the +- # code the exception occurred, and thus leaks information about +- # the key. ++ except InvalidSignature: + raise DigestSignatureError(bucket, key) + + def _create_string_to_sign(self, digest_data, inflated_digest): +diff -uNr a/awscli/customizations/ec2/decryptpassword.py b/awscli/customizations/ec2/decryptpassword.py +--- a/awscli/customizations/ec2/decryptpassword.py 2017-08-12 01:39:00.000000000 +0200 ++++ b/awscli/customizations/ec2/decryptpassword.py 2018-01-04 16:24:42.565140244 +0100 +@@ -13,7 +13,9 @@ + import logging + import os + import base64 +-import rsa ++from cryptography.hazmat.primitives import serialization ++from cryptography.hazmat.backends import default_backend ++from cryptography.hazmat.primitives.asymmetric import padding + from awscli.compat import six + + from botocore import model +@@ -109,9 +111,11 @@ + try: + with open(self._key_path) as pk_file: + pk_contents = pk_file.read() +- private_key = rsa.PrivateKey.load_pkcs1(six.b(pk_contents)) ++ private_key = serialization.load_pem_private_key( ++ six.b(pk_contents), password=None, ++ backend=default_backend()) + value = base64.b64decode(value) +- value = rsa.decrypt(value, private_key) ++ value = private_key.decrypt(value, padding.PKCS1v15()) + logger.debug(parsed) + parsed['PasswordData'] = value.decode('utf-8') + logger.debug(parsed) diff --git a/SPECS/awscli.spec b/SPECS/awscli.spec new file mode 100644 index 0000000..2704305 --- /dev/null +++ b/SPECS/awscli.spec @@ -0,0 +1,312 @@ +%if 0%{?rhel} && 0%{?rhel} <= 8 +%bcond_with python3 +%else +%bcond_without python3 +%endif + +%global botocore_version 1.4.43 + +# python-colorama +%global colorama_version 0.3.7 +%global bundled_lib_dir bundled +%global colorama_dir %{bundled_lib_dir}/colorama + +Name: awscli +Version: 1.14.28 +Release: 5%{?dist}.1 +Summary: Universal Command Line Environment for AWS + +License: ASL 2.0 +URL: http://aws.amazon.com/cli +Source0: %{name}/%{name}-%{version}.tar.gz +Source1: colorama-%{colorama_version}.tar.gz +Patch0: python-rsa-to-cryptography.patch +Patch1: bundled-python-botocore.patch +Patch2: bz1581138-fix-unsupported-max_bandwidth.patch +BuildArch: noarch +%if %{with python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-botocore = %{botocore_version} +Requires: python3-colorama >= 0.2.5 +Requires: python3-docutils >= 0.10 +Requires: python3-cryptography >= 1.7.2 +Requires: python3-s3transfer >= 0.1.9 +Requires: python3-PyYAML >= 3.10 +%else +BuildRequires: python-devel +BuildRequires: python-setuptools +# python-botocore bundled in python-s3transfer +#Requires: python-botocore >= %{botocore_version} +# python-colorama bundle +#Requires: python-colorama >= 0.2.5 +Provides: bundled(python-colorama) = %{colorama_version} +Requires: python-docutils >= 0.10 +Requires: python-cryptography >= 1.7.2 +Requires: python-s3transfer >= 0.1.9 +Requires: PyYAML >= 3.10 +%endif # with python3 +%if 0%{?fedora} +Recommends: bash-completion +Recommends: zsh +%endif # Fedora + +%if %{with python3} +%{?python_provide:%python_provide python3-%{name}} +%else +%{?python_provide:%python_provide python-%{name}} +%endif # with python3 + +%description +This package provides a unified +command line interface to Amazon Web Services. + +%prep +%setup -q -n %{name}-%{version} +rm -rf %{name}.egg-info + +# replace python-rsa with python-cryptography +%patch0 -p1 + +# python-botocore bundled in python-s3transfer +%patch1 -p1 + +# fix unsupported max_bandwidth +%patch2 -p1 + +# python-colorama bundle +mkdir -p %{bundled_lib_dir} +tar -xzf %SOURCE1 -C %{bundled_lib_dir} +mv %{bundled_lib_dir}/colorama-%{colorama_version} %{colorama_dir} +cp %{colorama_dir}/LICENSE.txt colorama_LICENSE.txt +cp %{colorama_dir}/README.rst colorama_README.rst + +pushd %{colorama_dir} +# remove bundled egg-info +rm -rf *.egg-info +popd +# python-colorama: append bundled-directory to search path +sed -i "/^from colorama/iimport sys\nsys.path.insert(0, '%{_libdir}/fence-agents/bundled')" scripts/performance/perfcmp +sed -i "/^import colorama/isys.path.insert(0, '%{_libdir}/fence-agents/bundled')" awscli/customizations/history/show.py awscli/table.py +# python-jmespath: append bundled-directory to search path +sed -i "/^import jmespath/iimport sys\nsys.path.insert(0, '%{_libdir}/fence-agents/bundled')" awscli/customizations/arguments.py + +%build +%if %{with python3} +%py3_build +%else +%py2_build +%endif # with python3 + +# python-colorama bundle +pushd %{colorama_dir} +%{__python2} setup.py build +popd + +%install +%if %{with python3} +%py3_install +%else +%py2_install +%endif # with python3 +# Fix path and permissions for bash completition +%global bash_completion_dir /etc/bash_completion.d +mkdir -p %{buildroot}%{bash_completion_dir} +mv %{buildroot}%{_bindir}/aws_bash_completer %{buildroot}%{bash_completion_dir} +chmod 644 %{buildroot}%{bash_completion_dir}/aws_bash_completer +# Fix path and permissions for zsh completition +%global zsh_completion_dir /usr/share/zsh/site-functions +mkdir -p %{buildroot}%{zsh_completion_dir} +mv %{buildroot}%{_bindir}/aws_zsh_completer.sh %{buildroot}%{zsh_completion_dir} +chmod 644 %{buildroot}%{zsh_completion_dir}/aws_zsh_completer.sh +ls -alh %{buildroot}%{zsh_completion_dir}/aws_zsh_completer.sh +# We don't need the Windows CMD script +rm %{buildroot}%{_bindir}/aws.cmd +# python-botocore bundle +pushd %{colorama_dir} +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-lib %{_libdir}/fence-agents/bundled +popd + +%files +%{!?_licensedir:%global license %doc} +%doc README.rst colorama_README.rst +%license LICENSE.txt colorama_LICENSE.txt +%{_bindir}/aws +%{_bindir}/aws_completer +%dir %{bash_completion_dir} +%{bash_completion_dir}/aws_bash_completer +%dir %{zsh_completion_dir} +%{zsh_completion_dir}/aws_zsh_completer.sh +%if %{with python3} +%{python3_sitelib}/awscli +%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info +%else +%{python2_sitelib}/awscli +%{python2_sitelib}/%{name}-%{version}-py?.?.egg-info +%endif # with python3 +# python-colorama bundle +%{_libdir}/fence-agents/bundled + +%changelog +* Thu May 24 2018 Oyvind Albrigtsen - 1.14.28-5.1 +- Fix unsupported max_bandwidth issue + + Resolves: rhbz#1581138 + +* Mon Feb 12 2018 Oyvind Albrigtsen - 1.14.28-5 +- Append python-botocore and python-jmespath bundled directory to + search path where needed + + Resolves: rhbz#1509434 + +* Wed Feb 7 2018 Oyvind Albrigtsen - 1.14.28-4 +- Bundle python-colorama + + Resolves: rhbz#1509434 + +* Fri Jan 19 2018 Oyvind Albrigtsen - 1.14.28-1 +- Update to 1.14.28 +- Replace python-rsa with python-cryptography + + Resolves: rhbz#1509434 + +* Sun Aug 13 2017 Fabio Alessandro Locati - 1.11.133-1 +- Update to 1.11.133 + +* Wed Jul 26 2017 Fedora Release Engineering - 1.11.109-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jun 21 2017 Fabio Alessandro Locati - 1.11.109-2 +- Forgot to update + +* Wed Jun 21 2017 Fabio Alessandro Locati - 1.11.109-1 +- Update to 1.11.109 + +* Tue May 23 2017 Fabio Alessandro Locati - 1.11.90-1 +- Update to 1.11.90 + +* Wed Mar 15 2017 Fabio Alessandro Locati - 1.11.63-1 +- Update to 1.11.63 + +* Sat Feb 25 2017 Fabio Alessandro Locati - 1.11.55-1 +- Update to 1.11.55 + +* Fri Feb 10 2017 Fedora Release Engineering - 1.11.40-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jan 20 2017 Fabio Alessandro Locati - 1.11.40-1 +- Update to 1.11.40 + +* Wed Dec 28 2016 Fabio Alessandro Locati - 1.11.34-2 +- Update to 1.11.34 + +* Mon Dec 19 2016 Miro HronĨok - 1.11.28-3 +- Rebuild for Python 3.6 + +* Tue Dec 13 2016 Fabio Alessandro Locati - 1.11.28-2 +- Add PyYAML dependency + +* Sun Dec 11 2016 Fabio Alessandro Locati - 1.11.28-1 +- Update to 1.11.28 + +* Sat Dec 03 2016 Fabio Alessandro Locati - 1.11.24-1 +- Update to 1.11.24 + +* Thu Nov 24 2016 Fabio Alessandro Locati - 1.11.21-1 +- Update to 1.11.21 + +* Mon Oct 10 2016 Fabio Alessandro Locati - 1.11.12-1 +- Update to 1.11.12 + +* Sun Oct 02 2016 Fabio Alessandro Locati - 1.11.0-1 +- Update to 1.11.0 + +* Wed Sep 28 2016 Fabio Alessandro Locati - 1.10.67-1 +- Update to 1.10.67 + +* Wed Sep 07 2016 Fabio Alessandro Locati - 1.10.62-1 +- Update to 1.10.62 + +* Wed Aug 24 2016 Fabio Alessandro Locati - 1.10.59-1 +- Update to current upstream version + +* Fri Aug 05 2016 Fabio Alessandro Locati - 1.10.53-1 +- Update to current upstream version + +* Tue Jul 19 2016 Fedora Release Engineering - 1.10.45-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Wed Jul 06 2016 Fabio Alessandro Locati - 1.10.45-1 +- Update to current upstream version + +* Wed Jun 08 2016 Fabio Alessandro Locati - 1.10.36-1 +- Update to current upstream version + +* Sat May 28 2016 Fabio Alessandro Locati - 1.10.34-1 +- Update to current upstream version + +* Wed Feb 24 2016 Fabio Alessandro Locati - 1.10.7-1 +- Update to current upstream version + +* Tue Feb 23 2016 Fabio Alessandro Locati - 1.10.6-2 +- Fix broken dependency + +* Fri Feb 19 2016 Fabio Alessandro Locati - 1.10.6-1 +- Update to current upstream version + +* Wed Feb 17 2016 Fabio Alessandro Locati - 1.10.5-1 +- Update to current upstream version + +* Fri Feb 12 2016 Fabio Alessandro Locati - 1.10.4-1 +- Update to current upstream version + +* Wed Feb 10 2016 Fabio Alessandro Locati - 1.10.3-1 +- Update to current upstream version + +* Tue Feb 09 2016 Fabio Alessandro Locati - 1.10.2-1 +- Update to current upstream version + +* Tue Feb 02 2016 Fabio Alessandro Locati - 1.10.1-1 +- Update to current upstream version + +* Fri Jan 22 2016 Fabio Alessandro Locati - 1.10.0-1 +- Update to current upstream version + +* Wed Jan 20 2016 Fabio Alessandro Locati - 1.9.21-1 +- Update to current upstream version +- Don't fix documentation permissions any more (pull request merged) + +* Fri Jan 15 2016 Fabio Alessandro Locati - 1.920-1 +- Update to current upstream version + +* Fri Jan 15 2016 Fabio Alessandro Locati - 1.9.19-1 +- Update to current upstream version +- Don't substitue the text of bin/aws_bash_completer anymore (pull request merged) +- Don't remove the shabang from awscli/paramfile.py anymore (pull request merged) + +* Wed Jan 13 2016 Fabio Alessandro Locati - 1.9.18-1 +- Update to current upstream version +- Fix completion for bash +- Remove bcdoc dependency that is not used anymore + +* Sun Jan 10 2016 Fabio Alessandro Locati - 1.9.17-1 +- Update to current upstream version +- Lock the botocore dependency version + +* Sat Jan 09 2016 Fabio Alessandro Locati - 1.9.16-1 +- Update to current upstream version +- Add dir /usr/share/zsh +- Add dir /usr/share/zsh/site-functions +- Add MIT license (topictags.py is MIT licensed) +- Move dependency from python-devel to python2-devel +- Add Recommends lines for zsh and bsah-completion for Fedora +- Remove BuildReuires: bash-completion +- Remove the macros py2_build and py2_install to prefer the extended form +- Force non-executable bit for documentation +- Remove shabang from awscli/paramfile.py +- Fix bash completion +- Fix zsh completion +- Remove aws.cmd + +* Tue Dec 29 2015 Fabio Alessandro Locati - 1.9.15-1 +- Initial package.