Bug 1249078 - Review Request: supernova - Use novaclient with multiple OpenStack nova environments the easy way
Summary: Review Request: supernova - Use novaclient with multiple OpenStack nova envir...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pete Travis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-31 13:04 UTC by Major Hayden 🤠
Modified: 2020-04-23 11:53 UTC (History)
4 users (show)

Fixed In Version: supernova-2.0.9-2.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-23 11:53:11 UTC
Type: ---
Embargoed:
me: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Major Hayden 🤠 2015-07-31 13:04:38 UTC
Spec URL: https://mhayden.fedorapeople.org/supernova-pkg-review/supernova.spec
SRPM URL: https://mhayden.fedorapeople.org/supernova-pkg-review/supernova-2.0.5-1.fc22.src.rpm
Description: supernova manages multiple nova environments without sourcing novarc's or mucking with environment variables.

Fedora Account System Username: mhayden

Comment 1 Major Hayden 🤠 2015-07-31 13:04:55 UTC
COPR builds: https://copr.fedoraproject.org/coprs/mhayden/supernova/

Comment 2 Pete Travis 2015-08-09 16:31:03 UTC
Hey, I use this!

I see you have a tox.ini upstream, it would be good to have that run in %check.  Otherwise, it looks like a fairly straightforward python packaging job.

Comment 4 Major Hayden 🤠 2015-08-10 02:31:31 UTC
Koji build for 2.0.8: http://koji.fedoraproject.org/koji/taskinfo?taskID=10658630

Comment 5 Pete Travis 2015-08-10 04:37:54 UTC
Okay, I've taken a closer look.  A few housekeeping items:

- s/novarc's/novarc files/ - or something.  Apostrophes are for possessives and  contractions.  Pet peeve, not a review issue :) but seriously, please don't.
- s/%{__python/%{__python2/g .  Not a dealbreaker, but good practice, and won't break your spec if the macro's defaults change.
  Also, using %{python2_version} instead of ?.? will make a py3 subpackage easier down the road.
- some missed opportunities for %{name} in %files/*egg-info.  
- This needs a populated %doc or -docs subpackage.  Speaking of which, I see the examples use rackspace auth - I'll put together a review for it.
- Use the %license macro for F21+.^FEPEL might need conditionals for this bit.

Comment 6 Carl George 2015-08-10 15:00:29 UTC
A good trick for the %license macro is to have this macro first in %files.

%{!?_licensedir:%global license %%doc}

Then %license falls back to %doc when building for EL5/6/7.

Comment 7 Pete Travis 2015-08-10 16:38:30 UTC
Nice trick, Carl!

The auth module is at https://bugzilla.redhat.com/show_bug.cgi?id=1251834 - reviews and comaintainers welcome.

Comment 9 Pete Travis 2015-08-27 17:13:11 UTC
I've reviewed test builds on F23 and rawhide as well, and tested functionality on F22 and F23.  There are only a few concerns:

- There's no %doc.  The docs/ and example_configs/ would be good to have, especially since there is no manpage.  Alternatively, you could do a -docs subpackage.

- The library files have shebangs.  These aren't executed directly - setuptools creates a wrapper executable and drops it in /usr/bin - so they can be stripped out with no ill effect.

- There's no py3 subpackage.  If the code works as a python3 build, you should ship it.

Comment 10 Major Hayden 🤠 2015-08-27 20:17:06 UTC
Thanks for digging into that, Pete.  I've added a doc subpackage, a python3 subpackage, and dropped the shebangs. ;)

https://mhayden.fedorapeople.org/supernova-pkg-review/supernova.spec
https://mhayden.fedorapeople.org/supernova-pkg-review/supernova-2.0.9-1.fc22.src.rpm
https://copr.fedoraproject.org/coprs/mhayden/supernova/build/111682/

$ rpmlint ~/rpmbuild/SRPMS/supernova-2.0.9-1.fc22.src.rpm 
supernova.src: W: spelling-error Summary(en_US) novaclient -> nova client, nova-client, clientele
supernova.src: W: spelling-error %description -l en_US novarc -> Novartis
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

Comment 11 Pete Travis 2015-08-28 20:52:26 UTC
 Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[+] = Manual review pass
[!] = manual review fail


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines


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

Generic:
[+]: 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)", "Unknown or generated". 5 files have unknown
     license. Detailed output of licensecheck in
     /home/pete/fedpkg/1249078-supernova/licensecheck.txt
[!]: License file installed when any subpackage combination is installed.
!!  - Add %license for doc subpackage

[+]: Package contains no bundled libraries without FPC exception.
[+]: Changelog in prescribed format.
[+]: 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
[+]: Package uses nothing in %doc for runtime.
[+]: Package consistently uses macros (instead of hard-coded directory
     names).
[+]: Package is named according to the Package Naming Guidelines.
[+]: Package does not generate any conflict.
[+]: Package obeys FHS, except libexecdir and /usr/target.
[+]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[+]: Requires correct, justified where necessary.
[+]: Spec file is legible and written in American English.
[+]: Package contains systemd file(s) if in need.
[+]: Package is not known to require an ExcludeArch tag.
[+]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[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]: 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[+]: Python eggs must not download any dependencies during the build
     process.
[+]: A package which is used by another package via an egg interface should
     provide egg info.
[+]: 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.
[+]: Final provides and requires are sane (see attachments).
[+]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-supernova , supernova-doc
[+]: Package functions as described.
[+]: Latest version is packaged.
[+]: 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.
[+]: 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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
# Lies! It builds, it works.
#
[x]: Spec file according to URL is the same as in SRPM.


Installation errors
-------------------
INFO: installing package(s): /home/pete/fedpkg/1249078-supernova/results/supernova-2.0.9-1.fc22.noarch.rpm /home/pete/fedpkg/1249078-supernova/results/python3-supernova-2.0.9-1.fc22.noarch.rpm /home/pete/fedpkg/1249078-supernova/results/supernova-doc-2.0.9-1.fc22.noarch.rpm
ERROR: Command failed. See logs for output.
 # /usr/bin/yum-deprecated --installroot /var/lib/mock/fedora-22-x86_64/root/ --releasever 22 install /home/pete/fedpkg/1249078-supernova/results/supernova-2.0.9-1.fc22.noarch.rpm /home/pete/fedpkg/1249078-supernova/results/python3-supernova-2.0.9-1.fc22.noarch.rpm /home/pete/fedpkg/1249078-supernova/results/supernova-doc-2.0.9-1.fc22.noarch.rpm --setopt=tsflags=nocontexts


Rpmlint
-------
Checking: supernova-2.0.9-1.fc22.noarch.rpm
          python3-supernova-2.0.9-1.fc22.noarch.rpm
          supernova-doc-2.0.9-1.fc22.noarch.rpm
          supernova-2.0.9-1.fc22.src.rpm
supernova.noarch: W: spelling-error Summary(en_US) novaclient -> nova client, nova-client, clientele
supernova.noarch: W: spelling-error %description -l en_US novarc -> Novartis
supernova.noarch: W: no-documentation
supernova.noarch: W: no-manual-page-for-binary supernova2
supernova.noarch: W: no-manual-page-for-binary supernova
supernova.noarch: W: no-manual-page-for-binary supernova-keyring2
supernova.noarch: W: no-manual-page-for-binary supernova-keyring
python3-supernova.noarch: W: spelling-error Summary(en_US) novaclient -> nova client, nova-client, clientele
python3-supernova.noarch: W: spelling-error %description -l en_US novarc -> Novartis
python3-supernova.noarch: W: no-documentation
python3-supernova.noarch: W: no-manual-page-for-binary supernova3.4
python3-supernova.noarch: W: no-manual-page-for-binary supernova-keyring3.4
supernova-doc.noarch: W: spelling-error %description -l en_US conifiguration -> configuration, transfiguration, figuration
supernova.src: W: spelling-error Summary(en_US) novaclient -> nova client, nova-client, clientele
supernova.src: W: spelling-error %description -l en_US novarc -> Novartis
4 packages and 0 specfiles checked; 0 errors, 15 warnings.




Requires
--------
python3-supernova (rpmlib, GLIBC filtered):
    /usr/bin/python3
    pycryptopp
    python(abi)
    python3-click
    python3-configobj
    python3-iso8601
    python3-keyring
    python3-novaclient
    python3-simplejson
    python3-six

supernova (rpmlib, GLIBC filtered):
    /usr/bin/python2
    pycryptopp
    python(abi)
    python-click
    python-configobj
    python-iso8601
    python-keyring
    python-novaclient
    python-simplejson
    python-six

supernova-doc (rpmlib, GLIBC filtered):



Provides
--------
python3-supernova:
    python3-supernova

supernova:
    supernova

supernova-doc:
    supernova-doc



Source checksums
----------------
https://pypi.python.org/packages/source/s/supernova/supernova-2.0.9.tar.gz :
  CHECKSUM(SHA256) this package     : c90518015b5bc12809e8b6a73907773764f0f1eebd5b85cfb06048ddacbffae9
  CHECKSUM(SHA256) upstream package : c90518015b5bc12809e8b6a73907773764f0f1eebd5b85cfb06048ddacbffae9


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/bin/fedora-review -b 1249078
Buildroot used: fedora-22-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

===========================================================

Two things here I probably should have caught earlier:

- No license for -doc subpackage
- missing python3-novaclient requirement for python3-supernova

Please add the license file and set %global with_python3 0 (for now) before import.

Package APPROVED.

Comment 13 Carl George 2015-08-28 21:34:59 UTC
Currently this spec file builds the main package with python2, and a subpackage with python3.  The with_python3 macro controls whether the python3 subpackage is built at all.

I'd like to suggest an alternative approach.

Supernova is a cli application, not a typical Python library.  I don't see the point in building it for two versions of Python.  For example, the mkdocs [1] package is a cli application that only builds against python3.  I think the python3 subpackage should be removed, and the with_python3 macro should control whether the main package is built with python2 or python3.

Feel free to tell me to buzz off if I am off base here.  I just can't seem to find any documentation specifically related to this scenario.

[1]: http://pkgs.fedoraproject.org/cgit/mkdocs.git/tree/mkdocs.spec

Comment 14 Pete Travis 2015-08-31 21:07:16 UTC
Building with python3 is categorically part of the general effort to migrate to python3.  The python packaging guidelines don't make a distinction between modules and executables, stating:

"""
In Fedora we have multiple Python runtimes, one for each supported major Python release. At this point that's one for python2.x and one for python3.x. If a piece of software supports python3, it must be packaged for python3. If it supports python2 as well, it may be packaged for python2. If it supports only python2 then (obviously) it must not be packaged for python3. 
"""

The overall tenor is that if upstream supports python3, the downstream package should also support python3.  There's no obligation on upstream to migrate their code, or for the packager to patch to support it.

Comment 15 Major Hayden 🤠 2015-08-31 22:05:37 UTC
New Package SCM Request
=======================
Package Name: supernova
Short Description: Use novaclient with multiple OpenStack nova environments the easy way
Upstream URL: https://github.com/major/supernova
Owners: mhayden
Branches: f22 f23
InitialCC:

Comment 16 Gwyn Ciesla 2015-09-01 14:12:58 UTC
Git done (by process-git-requests).

Comment 17 Upstream Release Monitoring 2015-10-13 11:08:08 UTC
social's scratch build of openstack-puppet-modules?#db4e135626252ebf0b23b8a0e6e98ce0dcf2f9e6 for git://pkgs.fedoraproject.org/openstack-puppet-modules?#db4e135626252ebf0b23b8a0e6e98ce0dcf2f9e6 and rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11426591


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