From daef69885f27bd1a1a20c8e0d3a75466e241b520 Mon Sep 17 00:00:00 2001 From: Mikle Kolyada Date: Thu, 27 May 2021 16:13:47 +0300 Subject: profiles: move awscli to app-admin Signed-off-by: Mikle Kolyada --- app-admin/awscli/Manifest | 5 ++ app-admin/awscli/awscli-1.19.47-r1.ebuild | 56 ++++++++++++++++++++++ app-admin/awscli/awscli-1.19.78.ebuild | 58 +++++++++++++++++++++++ app-admin/awscli/awscli-1.19.79.ebuild | 58 +++++++++++++++++++++++ app-admin/awscli/awscli-1.19.80.ebuild | 58 +++++++++++++++++++++++ app-admin/awscli/awscli-1.19.82.ebuild | 58 +++++++++++++++++++++++ app-admin/awscli/files/awscli-1.19.47-py39.patch | 60 ++++++++++++++++++++++++ app-admin/awscli/metadata.xml | 20 ++++++++ 8 files changed, 373 insertions(+) create mode 100644 app-admin/awscli/Manifest create mode 100644 app-admin/awscli/awscli-1.19.47-r1.ebuild create mode 100644 app-admin/awscli/awscli-1.19.78.ebuild create mode 100644 app-admin/awscli/awscli-1.19.79.ebuild create mode 100644 app-admin/awscli/awscli-1.19.80.ebuild create mode 100644 app-admin/awscli/awscli-1.19.82.ebuild create mode 100644 app-admin/awscli/files/awscli-1.19.47-py39.patch create mode 100644 app-admin/awscli/metadata.xml (limited to 'app-admin') diff --git a/app-admin/awscli/Manifest b/app-admin/awscli/Manifest new file mode 100644 index 000000000000..0bc5e2b9f088 --- /dev/null +++ b/app-admin/awscli/Manifest @@ -0,0 +1,5 @@ +DIST awscli-1.19.47.tar.gz 1990843 BLAKE2B c894aaf84d5fe7cb8998fcd682783a1f2e75dd9273a2aa22babe4d57175a1716aefccda50edb96a1203f010dbb2af29cd47d43b5d5f94adfdee1730ab98345af SHA512 7d51022e13609f5f5ab3155e3ac09670c7e49508d67eca8cb477e556e4b06b7643e86bdfe5fa8db59360f6d73e5774b433cb7093c25d6b688f98847b502872b7 +DIST awscli-1.19.78.tar.gz 2006020 BLAKE2B 6def90848e033413136865b0176c8d435fb70465f700a82673e9b20378be3792c8e3e59715466a93199358d698c9b58daaa88d6c2e921474460fdef0a214fdba SHA512 ff48f06158d401bf27e2f63c86ade91009dd9a48edf20156d3511ec2685a2dc93e8129a766eb0cc979e81121804dff9f18524e72f8ac1cffc43c4d3ed3595c83 +DIST awscli-1.19.79.tar.gz 2006413 BLAKE2B 40b806b7987dcbb83f0d5f7411dd36c5acfddf3927bff00d396724ed178dd114b91a6852fce9f1f1dea44644c3be26c2d1b63f114b5a9eb9b1832cc2f7e5c69e SHA512 1255b2439ba5061987af7f7b418e564c8bccd6d837614405512628a259c2f89acee3a41386b2507c596d9f52b432fa34c615d06ad15787a131bd06397a3b2aab +DIST awscli-1.19.80.tar.gz 2006767 BLAKE2B 9840d8068d10048ff043b43cb3e2dc49ee55f38a177ec32b0e061eb4ef3e7503864d05b4a886995ba25a716e82300d20a0c5678bd8f0b8f211bc1ba8785312b2 SHA512 3ca91745075cd46aeb5853fe5979b4c9e9ebb4e7ccae03f2f59d4817fd2e5089747dcb48bff496fcfdccc81d7832a203144364ef0ae716b347222c2226743295 +DIST awscli-1.19.82.tar.gz 2007776 BLAKE2B aaa065a555c481733a3bece914cc84d97845be52a6d254b74494b8f3fc554dbaf33a5cddedd45fdd1f5811e9fad2ce9172939dfa352ba693576dc8554e0d7283 SHA512 87e4b4449d05dd01480c74b992c25163761dc4b495f0414c46631bc547d6b7d2b3b0805205c6d0b641b33f1a8ec98ccb821fdcb18bd2f672695b431505792e18 diff --git a/app-admin/awscli/awscli-1.19.47-r1.ebuild b/app-admin/awscli/awscli-1.19.47-r1.ebuild new file mode 100644 index 000000000000..b5ba7214649c --- /dev/null +++ b/app-admin/awscli/awscli-1.19.47-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7,8,9} ) + +inherit bash-completion-r1 distutils-r1 + +DESCRIPTION="Universal Command Line Environment for AWS" +HOMEPAGE="https://pypi.org/project/awscli/" +#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/aws-cli-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" + +RDEPEND=" + =dev-python/botocore-1.20*[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/rsa[${PYTHON_USEDEP}] + >=dev-python/s3transfer-0.3.0[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests --install nose + +PATCHES=( + "${FILESDIR}"/awscli-1.19.47-py39.patch +) + +python_test() { + distutils_install_for_testing + # integration tests require AWS credentials and Internet access + nosetests -v tests/{functional,unit} || + die "Tests failed for ${EPYTHON}" +} + +python_install_all() { + newbashcomp bin/aws_bash_completer aws + + insinto /usr/share/zsh/site-functions + newins bin/aws_zsh_completer.sh _aws + + distutils-r1_python_install_all + + rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die +} diff --git a/app-admin/awscli/awscli-1.19.78.ebuild b/app-admin/awscli/awscli-1.19.78.ebuild new file mode 100644 index 000000000000..d57c79858b9f --- /dev/null +++ b/app-admin/awscli/awscli-1.19.78.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit bash-completion-r1 distutils-r1 + +DESCRIPTION="Universal Command Line Environment for AWS" +HOMEPAGE="https://pypi.org/project/awscli/" +#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/aws-cli-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +# botocore is x.(y+1).z +BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)" +RDEPEND=" + >=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/rsa[${PYTHON_USEDEP}] + >=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests --install nose + +PATCHES=( + "${FILESDIR}"/awscli-1.19.47-py39.patch +) + +python_test() { + distutils_install_for_testing + # integration tests require AWS credentials and Internet access + nosetests -v tests/{functional,unit} || + die "Tests failed for ${EPYTHON}" +} + +python_install_all() { + newbashcomp bin/aws_bash_completer aws + + insinto /usr/share/zsh/site-functions + newins bin/aws_zsh_completer.sh _aws + + distutils-r1_python_install_all + + rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die +} diff --git a/app-admin/awscli/awscli-1.19.79.ebuild b/app-admin/awscli/awscli-1.19.79.ebuild new file mode 100644 index 000000000000..d57c79858b9f --- /dev/null +++ b/app-admin/awscli/awscli-1.19.79.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit bash-completion-r1 distutils-r1 + +DESCRIPTION="Universal Command Line Environment for AWS" +HOMEPAGE="https://pypi.org/project/awscli/" +#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/aws-cli-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +# botocore is x.(y+1).z +BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)" +RDEPEND=" + >=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/rsa[${PYTHON_USEDEP}] + >=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests --install nose + +PATCHES=( + "${FILESDIR}"/awscli-1.19.47-py39.patch +) + +python_test() { + distutils_install_for_testing + # integration tests require AWS credentials and Internet access + nosetests -v tests/{functional,unit} || + die "Tests failed for ${EPYTHON}" +} + +python_install_all() { + newbashcomp bin/aws_bash_completer aws + + insinto /usr/share/zsh/site-functions + newins bin/aws_zsh_completer.sh _aws + + distutils-r1_python_install_all + + rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die +} diff --git a/app-admin/awscli/awscli-1.19.80.ebuild b/app-admin/awscli/awscli-1.19.80.ebuild new file mode 100644 index 000000000000..d57c79858b9f --- /dev/null +++ b/app-admin/awscli/awscli-1.19.80.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit bash-completion-r1 distutils-r1 + +DESCRIPTION="Universal Command Line Environment for AWS" +HOMEPAGE="https://pypi.org/project/awscli/" +#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/aws-cli-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +# botocore is x.(y+1).z +BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)" +RDEPEND=" + >=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/rsa[${PYTHON_USEDEP}] + >=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests --install nose + +PATCHES=( + "${FILESDIR}"/awscli-1.19.47-py39.patch +) + +python_test() { + distutils_install_for_testing + # integration tests require AWS credentials and Internet access + nosetests -v tests/{functional,unit} || + die "Tests failed for ${EPYTHON}" +} + +python_install_all() { + newbashcomp bin/aws_bash_completer aws + + insinto /usr/share/zsh/site-functions + newins bin/aws_zsh_completer.sh _aws + + distutils-r1_python_install_all + + rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die +} diff --git a/app-admin/awscli/awscli-1.19.82.ebuild b/app-admin/awscli/awscli-1.19.82.ebuild new file mode 100644 index 000000000000..d57c79858b9f --- /dev/null +++ b/app-admin/awscli/awscli-1.19.82.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit bash-completion-r1 distutils-r1 + +DESCRIPTION="Universal Command Line Environment for AWS" +HOMEPAGE="https://pypi.org/project/awscli/" +#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/aws-cli-${PV}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +# botocore is x.(y+1).z +BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)" +RDEPEND=" + >=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}] + dev-python/colorama[${PYTHON_USEDEP}] + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/rsa[${PYTHON_USEDEP}] + >=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests --install nose + +PATCHES=( + "${FILESDIR}"/awscli-1.19.47-py39.patch +) + +python_test() { + distutils_install_for_testing + # integration tests require AWS credentials and Internet access + nosetests -v tests/{functional,unit} || + die "Tests failed for ${EPYTHON}" +} + +python_install_all() { + newbashcomp bin/aws_bash_completer aws + + insinto /usr/share/zsh/site-functions + newins bin/aws_zsh_completer.sh _aws + + distutils-r1_python_install_all + + rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die +} diff --git a/app-admin/awscli/files/awscli-1.19.47-py39.patch b/app-admin/awscli/files/awscli-1.19.47-py39.patch new file mode 100644 index 000000000000..4d1be8eab6d4 --- /dev/null +++ b/app-admin/awscli/files/awscli-1.19.47-py39.patch @@ -0,0 +1,60 @@ +From 85361123d2fa12eaedf912c046ffe39aebdd2bad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sat, 22 May 2021 19:42:14 +0200 +Subject: [PATCH] Replace use of deprecated base64.encodestring() + +Replace the uses of deprecated base64.encodestring() in favor +of botocore.compat.encodebytes(). This fixes incompatibility with +Python 3.9 where the former function has finally been removed. +--- + awscli/customizations/ec2/bundleinstance.py | 4 +++- + tests/functional/ec2/test_bundle_instance.py | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/awscli/customizations/ec2/bundleinstance.py b/awscli/customizations/ec2/bundleinstance.py +index f704ec301..775e75718 100644 +--- a/awscli/customizations/ec2/bundleinstance.py ++++ b/awscli/customizations/ec2/bundleinstance.py +@@ -17,6 +17,8 @@ import hmac + import base64 + import datetime + ++from botocore.compat import encodebytes ++ + from awscli.compat import six + + from awscli.arguments import CustomArgument +@@ -135,7 +137,7 @@ def _generate_signature(params): + policy = base64.b64encode(six.b(policy)).decode('utf-8') + new_hmac = hmac.new(sak.encode('utf-8'), digestmod=sha1) + new_hmac.update(six.b(policy)) +- ps = base64.encodestring(new_hmac.digest()).strip().decode('utf-8') ++ ps = encodebytes(new_hmac.digest()).strip().decode('utf-8') + params['UploadPolicySignature'] = ps + del params['_SAK'] + +diff --git a/tests/functional/ec2/test_bundle_instance.py b/tests/functional/ec2/test_bundle_instance.py +index 3eee363da..ca36d7cd5 100644 +--- a/tests/functional/ec2/test_bundle_instance.py ++++ b/tests/functional/ec2/test_bundle_instance.py +@@ -17,6 +17,8 @@ import datetime + import mock + from six.moves import cStringIO + ++from botocore.compat import encodebytes ++ + import awscli.customizations.ec2.bundleinstance + from awscli.compat import six + from awscli.testutils import BaseAWSCommandParamsTest +@@ -70,7 +72,7 @@ class TestBundleInstance(BaseAWSCommandParamsTest): + + def test_policy_provided(self): + policy = '{"notarealpolicy":true}' +- base64policy = base64.encodestring(six.b(policy)).strip().decode('utf-8') ++ base64policy = encodebytes(six.b(policy)).strip().decode('utf-8') + policy_signature = 'a5SmoLOxoM0MHpOdC25nE7KIafg=' + args = ' --instance-id i-12345678 --owner-akid AKIAIOSFODNN7EXAMPLE' + args += ' --owner-sak wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY' +-- +2.31.1 + diff --git a/app-admin/awscli/metadata.xml b/app-admin/awscli/metadata.xml new file mode 100644 index 000000000000..c82a19f28fa1 --- /dev/null +++ b/app-admin/awscli/metadata.xml @@ -0,0 +1,20 @@ + + + + + slashbeast@gentoo.org + Piotr Karbowski + + + patrick@gentoo.org + Patrick Lauer + + + python@gentoo.org + Python + + + + awscli + + -- cgit v1.2.3-65-gdbad