Bug 2013336 - Review Request: resalloc-aws - Resource allocator scripts for AWS
Summary: Review Request: resalloc-aws - Resource allocator scripts for AWS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-12 15:56 UTC by Pavel Raiskup
Modified: 2022-01-20 14:53 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-01-20 02:28:17 UTC
Type: ---
Embargoed:
jkadlcik: fedora-review+


Attachments (Terms of Use)

Description Pavel Raiskup 2021-10-12 15:56:23 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/praiskup/resalloc-aws-ci/fedora-34-x86_64/02885200-resalloc-aws/resalloc-aws.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/praiskup/resalloc-aws-ci/fedora-34-x86_64/02885200-resalloc-aws/resalloc-aws-1-1.fc34.src.rpm
Review: https://download.copr.fedorainfracloud.org/results/praiskup/resalloc-aws-ci/fedora-34-x86_64/02885200-resalloc-aws/fedora-review/review.txt

Description:
When allocating/removing machine in AWS/EC2 from command-line, there are many
non-trivial options in the 'aws-cli' command.  This project provides a
simplified wrapping command.

The 'resalloc-aws-new' script is able to (a) start the machine, (b) wait till
SSH is available and (c) run a specified playbook.

The 'resalloc-aws-delete' removes the machine started by 'resalloc-aws-new'
script.

These scripts are primarily designed to be used with 'resalloc-server', but they
might be used separately.

Fedora Account System Username: praiskup

Comment 1 Jakub Kadlčík 2021-10-13 19:13:08 UTC
The `%global srcname resalloc-aws` isn't used. Maybe you planned to use it somewhere or forgot to remove it?

A few minor grammar errors in the description

- "allocating/removing machine" should IMHO be "... a machine" or "... machines"
- "(a) start the machine" should IMHO be "start a machine"
- "removes the machine started" should IMHO also be "a machine"

In the %install section there is a couple of macros used as %foo while the rest of the spec uses %{foo}. This inconsistency is AFAIK pretty common, so I don't mind it very much but this I don't like

    mkdir -p %buildroot%_bindir

Please use %{buildroot}%{_bindir} or / as a separator.

This would maybe fit better a %setup phase instead of a %install phase?

    sed '1c#! /usr/bin/python3' -i %buildroot/%_bindir/resalloc-aws-wait-for-ssh

Also, maybe it would be better to use %{__python3} instead of /usr/bin/python3 directly, in case the path changes in the future?

In the %files section, I would rather be more specific than %{_bindir}/%{name}-* in case somebody provided additional commands in another package. It's very unlikely but the change is trivial.

Comment 2 Jakub Kadlčík 2021-10-13 19:20:25 UTC
I am not sure if `bash` should be specified as a runtime dependency or if it can be omitted. 
Do you know?

Comment 3 Jakub Kadlčík 2021-10-13 19:25:39 UTC
Rpmlint says `resalloc-aws.src: W: no-%build-section`, there probably should be a %build section, even if empty.
It also complains about missing manpages for the installed scripts. I don't see this as a blocker, we can live without them.

Comment 4 Jakub Kadlčík 2021-10-13 19:29:24 UTC
wait-for-ssh is a python script, so I think python should be specified as a runtime dependency as well.

Comment 5 Pavel Raiskup 2021-10-15 06:00:50 UTC
Spec URL: https://raw.githubusercontent.com/praiskup/resalloc-aws/main/resalloc-aws.spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/praiskup/resalloc-aws-ci/srpm-builds/02890437/resalloc-aws-1.1-1.fc35.src.rpm

> A few minor grammar errors in the description

Fixed.

> In the %install section there is a couple of macros used as %foo while the rest of the spec uses %{foo}. 

Fixed.

> Please use %{buildroot}%{_bindir} or / as a separator.

Fixed, but technically, %buildroot%_bindir is just OK (my preferred variant).

> This would maybe fit better a %setup phase instead of a %install phase?

Indeed.  I moved it to %build which is even better, which fixes the rpmlint
no-%build-section complaint.

> Also, maybe it would be better to use %{__python3} instead of /usr/bin/python3

Fixed.

> I am not sure if `bash` should be specified as a runtime dependency or if it can be omitted. 
> Do you know?
> wait-for-ssh is a python script, so I think python should be specified as a runtime dependency as well.

There's an automatic "Requires: /usr/bin/bash" and "Requires: /usr/bin/python3".

Thank you for the review, Jakube!

Comment 6 Jakub Kadlčík 2021-10-25 21:51:50 UTC
Package Review
==============

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



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

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "GNU General Public License, Version
     2", "GNU General Public License v2.0 or later". 6 files have unknown
     license. Detailed output of licensecheck in /var/lib/copr-
     rpmbuild/results/resalloc-aws/licensecheck.txt
[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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[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 requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[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 must not depend on deprecated() packages.
[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

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

Generic:
[x]: Reviewer should test that the package builds in mock.
[-]: 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.
[x]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[?]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %check is present and all tests pass.
[?]: Packages should try to preserve timestamps of original installed
     files.
[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).


Rpmlint
-------
Checking: resalloc-aws-1.1-1.fc36.noarch.rpm
          resalloc-aws-1.1-1.fc36.src.rpm
resalloc-aws.noarch: W: spelling-error Summary(en_US) allocator -> allocate, locator, calculator
resalloc-aws.noarch: W: spelling-error %description -l en_US cli -> cl, clii, clip
resalloc-aws.noarch: W: no-manual-page-for-binary resalloc-aws-delete
resalloc-aws.noarch: W: no-manual-page-for-binary resalloc-aws-new
resalloc-aws.noarch: W: no-manual-page-for-binary resalloc-aws-wait-for-ssh
resalloc-aws.src: W: spelling-error Summary(en_US) allocator -> allocate, locator, calculator
resalloc-aws.src: W: spelling-error %description -l en_US cli -> cl, clii, clip
resalloc-aws.src: W: invalid-url Source0: resalloc-aws-1.1.tar.gz
2 packages and 0 specfiles checked; 0 errors, 8 warnings.




Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://raw.githubusercontent.com/praiskup/wait-for-ssh/main/wait-for-ssh :
  CHECKSUM(SHA256) this package     : 453defd97c27086be002d3dc217fbd46ec64b7b1f4b5e490b424fe9b3c3b2acd
  CHECKSUM(SHA256) upstream package : 453defd97c27086be002d3dc217fbd46ec64b7b1f4b5e490b424fe9b3c3b2acd


Requires
--------
resalloc-aws (rpmlib, GLIBC filtered):
    /usr/bin/bash
    /usr/bin/python3
    awscli



Provides
--------
resalloc-aws:
    resalloc-aws



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review --no-colors --prebuilt --rpm-spec --name resalloc-aws --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic
Disabled plugins: R, Perl, fonts, Java, Python, Ocaml, Haskell, PHP, SugarActivity, C/C++
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 8 Gwyn Ciesla 2022-01-12 14:16:42 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/resalloc-aws

Comment 9 Fedora Update System 2022-01-12 15:25:08 UTC
FEDORA-EPEL-2022-a47c99b0b1 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-a47c99b0b1

Comment 10 Fedora Update System 2022-01-12 15:25:08 UTC
FEDORA-EPEL-2022-2e8fc79f96 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-2e8fc79f96

Comment 11 Fedora Update System 2022-01-12 15:25:09 UTC
FEDORA-2022-07a45b1cc9 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-07a45b1cc9

Comment 12 Fedora Update System 2022-01-13 01:11:39 UTC
FEDORA-2022-07a45b1cc9 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-07a45b1cc9 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-07a45b1cc9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2022-01-13 01:52:49 UTC
FEDORA-EPEL-2022-2e8fc79f96 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-2e8fc79f96

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2022-01-13 02:03:28 UTC
FEDORA-EPEL-2022-a47c99b0b1 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-a47c99b0b1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2022-01-20 02:28:17 UTC
FEDORA-EPEL-2022-a47c99b0b1 has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2022-01-20 12:08:12 UTC
FEDORA-EPEL-2022-2e8fc79f96 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2022-01-20 14:53:05 UTC
FEDORA-2022-07a45b1cc9 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


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