Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1295127 - Review Request: awscli - Universal Command Line Environment for AWS
Summary: Review Request: awscli - Universal Command Line Environment for AWS
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Antonio T. (sagitter)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1294781
Blocks: 1295128
TreeView+ depends on / blocked
 
Reported: 2016-01-02 16:02 UTC by Fabio Alessandro Locati
Modified: 2016-05-25 23:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-25 23:18:46 UTC
Type: ---
Embargoed:
anto.trande: fedora-review+


Attachments (Terms of Use)

Description Fabio Alessandro Locati 2016-01-02 16:02:06 UTC
Spec URL: https://fale.fedorapeople.org/aws/awscli.spec
SRPM URL: https://fale.fedorapeople.org/aws/awscli-1.9.15-1.fc23.src.rpm
Description: Universal Command Line Environment for AWS
Fedora Account System Username: fale

Comment 1 Fabio Alessandro Locati 2016-01-02 16:03:45 UTC
I'm aware of the existance of #1123402 but it has been dead for almost a year.

Comment 2 Fabio Alessandro Locati 2016-01-07 23:24:53 UTC
New version available:

Spec URL: https://fale.fedorapeople.org/aws/awscli.spec
SRPM URL: https://fale.fedorapeople.org/aws/awscli-1.9.16-1.fc23.src.rpm

Comment 3 Antonio T. (sagitter) 2016-01-08 21:14:52 UTC
- Defining py2_build/py2_install macros on rhel is not need; you can use expanded form in all builds.

- python?-packages are not defined. See how is written an example SPEC file: 
  http://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

- See also how to avoid collisions between the python 2 and python 3 stacks

- Use macro as much as possible:

/usr/share/bash-completion/completions --> %{_datadir}/bash-completion/completions

- ??
%if 0%{?fedora}
BuildRequires: bash-completion
%endif # Fedora

In this way, bash-completion will be installed only on Fedora and it's not necessary for building, but as Requires package I think.

Like so 'zsh' is a Requires package because you install 'aws_zsh_completer.sh' in '/usr/share/zsh/site-functions'.

Comment 4 Fabio Alessandro Locati 2016-01-08 22:24:06 UTC
Thanks Andrea,
just few comments now and then tomorrow morning I'll work on the spec itself.

1. Ok, I'll do this way, thanks

2. This package does not provide any library, only binaries so (as for http://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin, "If the executables provide the same functionality independent of whether they are run on top of Python 2 or Python 3, then only one version of the executable should be packaged.") I think only one version should be packaged

3. See point 2

4. Technically, AWSCLI does not require bash nor zsh so they should not be a dependency. Those helpers are used only if AWSCLI is used with BASH or ZSH. This is a common thing in fact even if you do not have zsh installed (as in my computer) that folder is present

Thanks a lot,
Fabio

Comment 5 Antonio T. (sagitter) 2016-01-08 23:06:24 UTC
(In reply to Fabio Alessandro Locati from comment #4)
> Thanks Andrea,
> just few comments now and then tomorrow morning I'll work on the spec itself.
> 
> 1. Ok, I'll do this way, thanks
> 
> 2. This package does not provide any library, only binaries so (as for
> http://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin,
> "If the executables provide the same functionality independent of whether
> they are run on top of Python 2 or Python 3, then only one version of the
> executable should be packaged.") I think only one version should be packaged
> 
> 3. See point 2

I'm not totally sure; I'm not a Python expert, but I see awcli file in /usr/bin as is made with your package contains a Python3 shebang (indeed, your package builds only a Python3 awscli in Fedora).

When you will split awscli in python2-awscli and python3-awscli, it will need two different awscli in /usr/bin, one for Python2 and one for Python3.

> 
> 4. Technically, AWSCLI does not require bash nor zsh so they should not be a
> dependency. Those helpers are used only if AWSCLI is used with BASH or ZSH.
> This is a common thing in fact even if you do not have zsh installed (as in
> my computer) that folder is present
> 

They may be packaged separately so, as 'awscli-bash-completion' and 'awscli-zsh'.

Comment 6 Fabio Alessandro Locati 2016-01-08 23:48:52 UTC
(In reply to Antonio Trande from comment #5)
> (In reply to Fabio Alessandro Locati from comment #4)
> > Thanks Andrea,
> > just few comments now and then tomorrow morning I'll work on the spec itself.
> > 
> > 1. Ok, I'll do this way, thanks
> > 
> > 2. This package does not provide any library, only binaries so (as for
> > http://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin,
> > "If the executables provide the same functionality independent of whether
> > they are run on top of Python 2 or Python 3, t/var/lib/mock/fedora-23-x86_64/resulthen only one version of the
> > executable should be packaged.") I think only one version should be packaged
> > 
> > 3. See point 2
> 
> I'm not totally sure; I'm not a Python expert, but I see awcli file in
> /usr/bin as is made with your package contains a Python3 shebang (indeed,
> your package builds only a Python3 awscli in Fedora).
> 
> When you will split awscli in python2-awscli and python3-awscli, it will
> need two different awscli in /usr/bin, one for Python2 and one for Python3.

This would never happens as for specifics.
If you think about it, there a multiple softwares like ansible, dnf and so on that are written in python and could (potentially) be compiled as py2 and py3 binaries, but it does not mak any sense from a Fedora infrastructure since the user can care less if the program that is using is executed by py2 or py3 (and probably does not know and care if it is a python, perl, c, assemply program as well).
As for the package naming, it's the same case. In fact the ansible package is called simply "ansible" (and not python2-ansible) as well as dnf is "dnf" (and not python3-dnf), yum is "yum" (and not python2-yum) and so one.

> > 
> > 4. Technically, AWSCLI does not require bash nor zsh so they should not be a
> > dependency. Those helpers are used only if AWSCLI is used with BASH or ZSH.
> > This is a common thing in fact even if you do not have zsh installed (as in
> > my computer) that folder is present
> > 
> 
> They may be packaged separately so, as 'awscli-bash-completion' and
> 'awscli-zsh'.

If you take the dnf package as an example (pkgs.fedoraproject.org/cgit/rpms/dnf.git/tree/dnf.spec) they just recommended the installation of bash-completion in line 84. Other packages (like fedpkg http://pkgs.fedoraproject.org/cgit/rpms/fedpkg.git/tree/fedpkg.spec) don't bother of recommend any bash-completion line.
Now, I don't know what would be the best way to approach this (it's my first time with this those bash completion things and I have not found any documentation) so I would think that the DNF approach is the more "safe" since a recommend is not a hard requirement but it's still a notice.

Thanks a lot

Comment 7 Fabio Alessandro Locati 2016-01-09 00:28:12 UTC
In the mean time, I prepared an updated version with the first bullet solved and the last upstream version:

Spec URL: https://fale.fedorapeople.org/aws/awscli.spec
SRPM URL: https://fale.fedorapeople.org/aws/awscli-1.9.17-1.fc23.src.rpm

Comment 8 Antonio T. (sagitter) 2016-01-09 11:59:13 UTC
(In reply to Fabio Alessandro Locati from comment #6)
> (In reply to Antonio Trande from comment #5)
> > (In reply to Fabio Alessandro Locati from comment #4)
> > > Thanks Andrea,
> > > just few comments now and then tomorrow morning I'll work on the spec itself.
> > > 
> > > 1. Ok, I'll do this way, thanks
> > > 
> > > 2. This package does not provide any library, only binaries so (as for
> > > http://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin,
> > > "If the executables provide the same functionality independent of whether
> > > they are run on top of Python 2 or Python 3, t/var/lib/mock/fedora-23-x86_64/resulthen only one version of the
> > > executable should be packaged.") I think only one version should be packaged
> > > 
> > > 3. See point 2
> > 
> > I'm not totally sure; I'm not a Python expert, but I see awcli file in
> > /usr/bin as is made with your package contains a Python3 shebang (indeed,
> > your package builds only a Python3 awscli in Fedora).
> > 
> > When you will split awscli in python2-awscli and python3-awscli, it will
> > need two different awscli in /usr/bin, one for Python2 and one for Python3.
> 
> This would never happens as for specifics.
> If you think about it, there a multiple softwares like ansible, dnf and so
> on that are written in python and could (potentially) be compiled as py2 and
> py3 binaries, but it does not mak any sense from a Fedora infrastructure
> since the user can care less if the program that is using is executed by py2
> or py3 (and probably does not know and care if it is a python, perl, c,
> assemply program as well).
> As for the package naming, it's the same case. In fact the ansible package
> is called simply "ansible" (and not python2-ansible) as well as dnf is "dnf"
> (and not python3-dnf), yum is "yum" (and not python2-yum) and so one.
> 

Therefore do you prefer to use only a Python3 AWSCLI on Fedora and only Python2 AWSCLI on rhel6/7?

Did you noted that DNF (you taken DNF as reference) is split in Python2/3 and makes a symbolic link of unversioned '/usr/bin/dnf' respectively to dnf-2 (python2) and dnf-3 (python3)?
It's use Python2 DNF on Fedora<23 and Python3 DNF on Fedora>=23 but provides a 'dnf' package and 'python2-dnf' + 'python3-dnf' required sub-packages anyway.

> > > 
> > > 4. Technically, AWSCLI does not require bash nor zsh so they should not be a
> > > dependency. Those helpers are used only if AWSCLI is used with BASH or ZSH.
> > > This is a common thing in fact even if you do not have zsh installed (as in
> > > my computer) that folder is present
> > > 
> > 
> > They may be packaged separately so, as 'awscli-bash-completion' and
> > 'awscli-zsh'.
> 
> If you take the dnf package as an example
> (pkgs.fedoraproject.org/cgit/rpms/dnf.git/tree/dnf.spec) they just
> recommended the installation of bash-completion in line 84. Other packages
> (like fedpkg
> http://pkgs.fedoraproject.org/cgit/rpms/fedpkg.git/tree/fedpkg.spec) don't
> bother of recommend any bash-completion line.
> Now, I don't know what would be the best way to approach this (it's my first
> time with this those bash completion things and I have not found any
> documentation) so I would think that the DNF approach is the more "safe"
> since a recommend is not a hard requirement but it's still a notice.
> 

You can manage them at your discretion; in my opinion, you can package them separately. See also http://fedoraproject.org/wiki/Packaging:WeakDependencies

Comment 9 Fabio Alessandro Locati 2016-01-09 12:32:03 UTC
(In reply to Antonio Trande from comment #8)
> (In reply to Fabio Alessandro Locati from comment #6)
> > (In reply to Antonio Trande from comment #5)
> > > (In reply to Fabio Alessandro Locati from comment #4)
> > > > 2. This package does not provide any library, only binaries so (as for
> > > > http://fedoraproject.org/wiki/Packaging:Python#Executables_in_.2Fusr.2Fbin,
> > > > "If the executables provide the same functionality independent of whether
> > > > they are run on top of Python 2 or Python 3, t/var/lib/mock/fedora-23-x86_64/resulthen only one version of the
> > > > executable should be packaged.") I think only one version should be packaged
> > > > 
> > > > 3. See point 2
> > > 
> > > I'm not totally sure; I'm not a Python expert, but I see awcli file in
> > > /usr/bin as is made with your package contains a Python3 shebang (indeed,
> > > your package builds only a Python3 awscli in Fedora).
> > > 
> > > When you will split awscli in python2-awscli and python3-awscli, it will
> > > need two different awscli in /usr/bin, one for Python2 and one for Python3.
> > 
> > This would never happens as for specifics.
> > If you think about it, there a multiple softwares like ansible, dnf and so
> > on that are written in python and could (potentially) be compiled as py2 and
> > py3 binaries, but it does not mak any sense from a Fedora infrastructure
> > since the user can care less if the program that is using is executed by py2
> > or py3 (and probably does not know and care if it is a python, perl, c,
> > assemply program as well).
> > As for the package naming, it's the same case. In fact the ansible package
> > is called simply "ansible" (and not python2-ansible) as well as dnf is "dnf"
> > (and not python3-dnf), yum is "yum" (and not python2-yum) and so one.
> > 
> 
> Therefore do you prefer to use only a Python3 AWSCLI on Fedora and only
> Python2 AWSCLI on rhel6/7?

Yes

> Did you noted that DNF (you taken DNF as reference) is split in Python2/3
> and makes a symbolic link of unversioned '/usr/bin/dnf' respectively to
> dnf-2 (python2) and dnf-3 (python3)?
> It's use Python2 DNF on Fedora<23 and Python3 DNF on Fedora>=23 but provides
> a 'dnf' package and 'python2-dnf' + 'python3-dnf' required sub-packages
> anyway.

True, from what I read from the mailinglist (https://lists.fedoraproject.org/pipermail/packaging/2014-December/010360.html) the DNF thing is mainling caused by compatibility reasons needed by the fact that dnf entered Fedora before there was the policy change. Since awscli has never been in Fedora I think the legacy approach would not be necessary.

> > > > 
> > > > 4. Technically, AWSCLI does not require bash nor zsh so they should not be a
> > > > dependency. Those helpers are used only if AWSCLI is used with BASH or ZSH.
> > > > This is a common thing in fact even if you do not have zsh installed (as in
> > > > my computer) that folder is present
> > > > 
> > > 
> > > They may be packaged separately so, as 'awscli-bash-completion' and
> > > 'awscli-zsh'.
> > 
> > If you take the dnf package as an example
> > (pkgs.fedoraproject.org/cgit/rpms/dnf.git/tree/dnf.spec) they just
> > recommended the installation of bash-completion in line 84. Other packages
> > (like fedpkg
> > http://pkgs.fedoraproject.org/cgit/rpms/fedpkg.git/tree/fedpkg.spec) don't
> > bother of recommend any bash-completion line.
> > Now, I don't know what would be the best way to approach this (it's my first
> > time with this those bash completion things and I have not found any
> > documentation) so I would think that the DNF approach is the more "safe"
> > since a recommend is not a hard requirement but it's still a notice.
> > 
> 
> You can manage them at your discretion; in my opinion, you can package them
> separately. See also http://fedoraproject.org/wiki/Packaging:WeakDependencies

Thanks for the link :)

Comment 10 Antonio T. (sagitter) 2016-01-09 13:38:38 UTC
BuildRequires:  python-devel <--

Please, use python2-devel

Comment 11 Fabio Alessandro Locati 2016-01-09 16:14:56 UTC
Thanks for the suggestions :)

I've made a new version:

Spec URL: https://fale.fedorapeople.org/aws/awscli.spec
SRPM URL: https://fale.fedorapeople.org/aws/awscli-1.9.17-2.fc23.src.rpm

Comment 12 Antonio T. (sagitter) 2016-01-09 17:02:58 UTC
- topictags.py file is licensed with a MIT license.
  Please, update License tag.

- /usr/share/zsh/site-functions and /usr/share/zsh are directories already
  owned by 'zsh'. Since zsh is a recommended package, they can be co-owned
  by this package too.

  %dir /usr/share/zsh
  %dir /usr/share/zsh/site-functions

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Apache (v2.0)", "MIT/X11 (BSD like)", "Unknown or generated".
     862 files have unknown license. Detailed output of licensecheck in
     /home/sagitter/FedoraReview/1295127-awscli/licensecheck.txt
[x]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/lib/python3.5/site-packages,
     /usr/lib/python3.5
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/python3.5/site-
     packages, /usr/share/zsh/site-functions, /usr/lib/python3.5,
     /usr/share/zsh
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 1 files.
[!]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: awscli-1.9.17-2.fc24.noarch.rpm
          awscli-1.9.17-2.fc24.src.rpm
awscli.noarch: W: no-manual-page-for-binary aws_completer
awscli.noarch: W: no-manual-page-for-binary aws
2 packages and 0 specfiles checked; 0 errors, 2 warnings.




Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: No such file or directory
awscli.noarch: W: no-manual-page-for-binary aws_completer
awscli.noarch: W: no-manual-page-for-binary aws
1 packages and 0 specfiles checked; 0 errors, 2 warnings.



Requires
--------
awscli (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3-bcdoc
    python3-botocore
    python3-colorama
    python3-docutils
    python3-rsa



Provides
--------
awscli:
    awscli



Source checksums
----------------
https://pypi.python.org/packages/source/a/awscli/awscli-1.9.17.tar.gz :
  CHECKSUM(SHA256) this package     : 5144b7bf73e39a5c556e84493bd4556f8081dcd2d206bfa083a7e04b379647da
  CHECKSUM(SHA256) upstream package : 5144b7bf73e39a5c556e84493bd4556f8081dcd2d206bfa083a7e04b379647da


Generated by fedora-review 0.6.0 (7737a2a) last change: 2015-11-26
Command line :./try-fedora-review -m fedora-rawhide-x86_64 -b 1295127
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Comment 13 Fabio Alessandro Locati 2016-01-09 17:46:19 UTC
Thanks for the suggestions :)

I've made a new version:

Spec URL: https://fale.fedorapeople.org/aws/awscli.spec
SRPM URL: https://fale.fedorapeople.org/aws/awscli-1.9.17-3.fc23.src.rpm

Comment 14 Antonio T. (sagitter) 2016-01-09 17:52:17 UTC
Please, use macro %{_datadir} instead of /usr/share.

Package approved.

Comment 15 Fabio Alessandro Locati 2016-01-09 17:53:18 UTC
Thanks :)

Comment 16 Gwyn Ciesla 2016-01-09 18:44:02 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/awscli


Note You need to log in before you can comment on or make changes to this bug.