Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710434 - dev-python/awscli:2 new ebuild for the official branch "2", from AWS with all dependencies inside
Summary: dev-python/awscli:2 new ebuild for the official branch "2", from AWS with all...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
: 757957 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-21 18:45 UTC by Vitaly Zdanevich
Modified: 2022-06-29 14:53 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Zdanevich 2020-02-21 18:45:12 UTC
Quote from https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html:
"
The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell.

The AWS CLI is available in two versions:

    Version 2.x – The current, generally available release of the AWS CLI that is intended for use in production environments. This version does include some "breaking" changes from version 1 that might require you to change your scripts so that they continue to operate as you expect. For a list of new features and breaking changes in version 2, see Breaking Changes – Migrating from AWS CLI version 1 to version 2.

    Version 1.x – The previous version of the AWS CLI that is available for backwards compatiblity.

All installers for AWS CLI version 2 include and use an embedded copy of Python, independent of any other Python version that you might have installed. If you're using AWS CLI version 2, no changes are required.
"

Reproducible: Always




https://github.com/awslabs/aws-shell
Comment 1 Vitaly Zdanevich 2020-02-21 19:51:02 UTC
Sorry wrong link to the repo https://github.com/aws/aws-cli/tree/v2
Comment 2 Vitaly Zdanevich 2020-02-29 22:05:27 UTC
So long :(

Can I maintain awscli:2 for Gentoo?
Comment 3 Jan Henke 2020-04-07 15:01:58 UTC
Write an ebuild for it and submit it as a Pull Request (PR) on GitHub. Then you can become the proxy maintainer. But judging from the description, probably the ebuild needs some work, as just using an embedded python interpreter is bad (especially from a security point of view).
Comment 4 Piotr Karbowski (RETIRED) gentoo-dev 2020-09-19 20:14:16 UTC
Given the reasoning AWS is giving in https://github.com/aws/aws-cli/issues/4947#issuecomment-586046886 I do not feel like bringing awscli v2 into Gentoo tree anytime soon. They even started to distribute it as Docker image for crying out loud.
Comment 5 Piotr Karbowski (RETIRED) gentoo-dev 2020-09-19 20:18:21 UTC
It actually get even more ridiculous, awscli v2 requires botocore v2 that is not released to pypi, which also means it would break everything around botocore if we were to push it to the tree too. This, along with statement that v1 is going to continue to get updates, I am closing this as WONTFIX. Feel free to reopen it if you will find feasible way to bring awscli v2 without breaking everything around botocore v1.
Comment 6 Piotr Karbowski (RETIRED) gentoo-dev 2020-12-03 08:10:04 UTC
*** Bug 757957 has been marked as a duplicate of this bug. ***
Comment 7 Fabiano 2021-03-19 04:34:57 UTC
(In reply to Piotr Karbowski from comment #5)
> It actually get even more ridiculous, awscli v2 requires botocore v2 that is
> not released to pypi, which also means it would break everything around
> botocore if we were to push it to the tree too. This, along with statement
> that v1 is going to continue to get updates, I am closing this as WONTFIX.

    I understand the reasons for not to include this on the tree and I agree, their distribution model is indeed ridiculous.

    Their reasons AWS gives are mostly non-technical: apparently the tool is used widely by non developers and it is huge source of problems for their customers, so they decided they want the installer to be viewed as a self-contained binary and treat python as an implementation detail that they are free to change at any moment.

    With that being said, in real life many of us still need this crap to do some work that pays the bills, so to any one landing on this thread via google and that just wants it work and move on with life, here is a "quick fix" that installs awscliv2 at your local user without messing with your system:

1) Create folders ~/.local/bin and ~/.local/opt if don't have them already:
   $ mkdir -p ~/.local/bin ~/.local/opt

2) Add ~/.local/bin to your PATH if don't have it already (adapt to your shell if you don't use bash):
   $ echo "\$PATH:$HOME/.local/bin" >> ~/.bashrc

3) Download installer:
   $ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip"

4) Unzip installer to temp folder (you could use /tmp if you have exec mount)
   $ unzip /tmp/awscliv2.zip -d ~/.local/opt/tmp-aws-install

5) Install it at your .local:
   $ ~/.local/opt/tmp-aws-install/aws/install -i ~/.local/opt/awscliv2 -b ~/.local/bin

6) That's it, it should be working already, you can test installation with:
   $ aws --version
aws-cli/2.1.30 Python/3.8.8 Linux/5.11.7-gentoo-f1 exe/x86_64.gentoo.2 prompt/off

7) Remove temporary install files:
   $ rm -rf /tmp/awscliv2.zip ~/.local/opt/tmp-aws-install

8) Optional: in case you decide you don't want this crap anymore on your system you can uninstall it with:
   $ rm -rf ~/.local/bin/aws ~/.local/bin/aws_completer ~/.local/opt/awscliv2/


    The instructions above were slightly adapted from the official docs to make the install works for a non-privileged user as opposed to system wide install with sudo:
   - https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html#cliv2-linux-install
   - https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html#cliv2-linux-remove

 
    With that out of the way:

(In reply to Piotr Karbowski from comment #5)
> Feel free to reopen it if you will find feasible way to bring awscli v2
> without breaking everything around botocore v1.

    Well, I have an idea, not sure if it is worth but it could make the life of us poor gentoo users a bit easier:

   - We could create a bin version of the package, something like dev-util/awscli-v2-bin and treat it as a binary, just the way AWS wishes us to do. The install process could be similar to the above but of course would use /opt instead of /home/user/.local/opt -- just like other bin packages.

    Thoughts?

    If you guys find this option interesting I could give it a go on writing a first ebuild version for dev-util/awscli-v2-bin .
Comment 8 Carlos Konstanski 2021-12-13 16:18:20 UTC
While it sucks that AWS decided to package the new CLI in such a stupid way, a distro like Gentoo cannot afford to wash its hands of the matter. We have to support it or risk losing relevance.
Comment 9 William Hubbs gentoo-dev 2022-06-24 16:17:19 UTC
I am in a situation also where I'll need this to do a job to pay the
bills, so I'll take a look either today or over the weekend.
Comment 10 Larry the Git Cow gentoo-dev 2022-06-29 14:53:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fd0f28046c3a4c344b3a57d72631459021ea90b

commit 2fd0f28046c3a4c344b3a57d72631459021ea90b
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-06-29 14:47:29 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-06-29 14:52:54 +0000

    app-admin/awscli-bin: new package, add 2.7.11
    
    This is version 2 of the aws command line interface.
    
    I would like to thank arthurzam for testing this on arm64 so I could add
    that keyword immediately.
    
    Closes: https://bugs.gentoo.org/710434
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 app-admin/awscli-bin/Manifest                 |  2 +
 app-admin/awscli-bin/awscli-bin-2.7.11.ebuild | 86 +++++++++++++++++++++++++++
 app-admin/awscli-bin/metadata.xml             |  8 +++
 3 files changed, 96 insertions(+)