| Summary: | aws cli tool is unusable after aws-cli installation | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Sandro CAZZANIGA <cazzaniga.sandro> |
| Component: | RPM Packages | Assignee: | Buchan Milne <bgmilne> |
| Status: | RESOLVED OLD | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | 7 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | aws-cli-1.16.163-1.mga7.src.rpm | CVE: | |
| Status comment: | |||
| Attachments: | patch to add colorama as a requirement | ||
There's a patch in the SRPM that I didn't understand fully, it seems related to the requires and remove colorama. But it seems to remove it only because the package required as a newer version in the distribution. --- From 2f783815e6ae04f6d8eb68ee40207cc383e9416e Mon Sep 17 00:00:00 2001 From: Buchan Milne <bgmilne@gmail.com> Date: Tue, 20 Aug 2019 21:16:36 +0200 Subject: [PATCH] Only require platform specific dependencies/versions on those platforms Most current linux distributions ship newer versions than the current dependencies permit of: * colorama (only used/required on Windows) * rsa (e.g. 4.0, which doesn't support python 2.6) * PyYAML (e.g. 5.1 which doesn't support python 2.6) This change makes the legacy dependencies only take effect on those legacy platforms that can't use the modern versions. Fixes aws/aws-cli#3660 Fixes aws/aws-cli#3828 --- setup.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index f8387942..b663ef51 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import codecs import os.path import re import sys +import platform from setuptools import setup, find_packages @@ -24,23 +25,25 @@ def find_version(*file_paths): requires = ['botocore==1.12.211', - 'colorama>=0.2.5,<=0.3.9', 'docutils>=0.10,<0.16', - 'rsa>=3.1.2,<=3.5.0', - 's3transfer>=0.2.0,<0.3.0'] [...] @Sandro : thank you for this report, and your detective work to find the reason. $ urpmq --requires-recursive aws-cli | grep colorama returns nothing. Assigning to Buchan as the registered maintainer for 'aws-cli'. Assignee:
bugsquad =>
bgmilne Hi, Here's a patch, tell me what you think about it. Created attachment 11300 [details]
patch to add colorama as a requirement
Ok, it looks like I must have had colorama installed and didn't test with removing it. From https://pypi.org/project/colorama/ "Makes ANSI escape character sequences (for producing colored terminal text and cursor positioning) work under MS Windows. ANSI escape character sequences have long been used to produce colored terminal text and cursor positioning on Unix and Macs. Colorama makes this work on Windows, too, by wrapping stdout, stripping ANSI sequences it finds (which would appear as gobbledygook in the output), and converting them into the appropriate win32 calls to modify the state of the terminal. On other platforms, Colorama does nothing." > Maybe we can add it as a requirement in the spec file ? The dependency is auto-generated, so I would prefer we fix setup.py in a way that can be accepted upstream (so we can stop conflict-merging the pull request). I'll take a look and update the pull request to upstream, and include it in an update. Status:
NEW =>
ASSIGNED Mageia 7 is EOL since July 1st 2021. There will not have any further bugfix for this release. You are encouraged to upgrade to Mageia 8 as soon as possible. @reporter, if this bug still apply with Mageia 8, please let us know it. @packager, if you work on the Mageia 7 version of your package, please check the Mageia 8 package if issue is also present. In this case, please fix the Mageia 8 version instead. This bug report will be closed OLD if there is no further notice within 1st September 2021. Hi bug reporter and hi assignee and others involved, Please reopen this bug report if it is still valid for Mageia 8 or 9(cauldron), and change "Version:" in the upper left of this report accordingly. This report is being closed as OLD because it was filed against Mageia 7, for which support ended on June 30th 2021. Thanks, Marja Status:
ASSIGNED =>
RESOLVED |
Description of problem: After installing the package aws-cli, you cannot use it because a python dependencie, python-colorama, whether you use output text, json or table. Version-Release number of selected component (if applicable): aws-cli-1.16.163-1 How reproducible: You just have to install aws-cli and set up a right set of IAM credentials in your ~/.aws/config. Steps to Reproduce: 1. dnf install aws-cli 2. set up correct AWS IAM credentials in ~/.aws/config 3. try a command like : aws ec2 describe-regions 4. output error : Traceback (most recent call last): File "/usr/bin/aws", line 19, in <module> import awscli.clidriver File "/usr/lib/python3.7/site-packages/awscli/clidriver.py", line 28, in <module> from awscli.formatter import get_formatter File "/usr/lib/python3.7/site-packages/awscli/formatter.py", line 20, in <module> from awscli.table import MultiTable, Styler, ColorizedStyler File "/usr/lib/python3.7/site-packages/awscli/table.py", line 17, in <module> import colorama ModuleNotFoundError: No module named 'colorama' easy way to fix : 1. dnf install python3-colorama Maybe we can add it as a requirement in the spec file ? Please share your thoughts. Thanks.