Bug 1177009 - Review Request: python-tempest-lib - OpenStack Functional Testing Library
Summary: Review Request: python-tempest-lib - OpenStack Functional Testing Library
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mario Blättermann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-23 18:49 UTC by Steve Linabery
Modified: 2020-04-24 14:20 UTC (History)
4 users (show)

Fixed In Version: python-tempest-lib-0.0.4-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-24 14:20:52 UTC
Type: ---
mario.blaettermann: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Steve Linabery 2014-12-23 18:49:37 UTC
Spec URL: https://slinabery.fedorapeople.org/python-tempest-lib.spec
SRPM URL: https://slinabery.fedorapeople.org/python-tempest-lib-0.0.2-1.fc20.src.rpm
Description: OpenStack Functional Testing Library
Fedora Account System Username: slinabery

Comment 1 Miroslav Suchý 2014-12-27 12:46:50 UTC
Quick review for obvious problems:

* Remove that markup from %description. And do not repeat Summary in %description.

* Fedora 22 defaults to Python3. Therefore you should provide python3-subpackage unless there is strong reason.

* LICENSE file should be marked as:
  %license LICENSE

* subunit-trace is missing man page

* I would recommend moving sphinx documentation to -doc subpackage.

Comment 2 Mario Blättermann 2014-12-30 09:45:17 UTC
(In reply to Miroslav Suchý from comment #1)
> * Fedora 22 defaults to Python3. Therefore you should provide
> python3-subpackage unless there is strong reason.
> 
Obviously this package is not needed for any other software (there's nothing in the "Blocks:" field above), so it would be the simplest way to don't build a python2 version at all. Just replace the build requirements with those for python3, and replace the python2 macros with python3.

There remains just one problem: python-oslo-sphinx is not available for Python 3 yet. Well, this package is needed for building the docs only, but we won't get rid of the Python 2 dependency for the time being.

Comment 3 Mario Blättermann 2014-12-30 10:03:21 UTC
(In reply to Mario Blättermann from comment #2)
> There remains just one problem: python-oslo-sphinx is not available for
> Python 3 yet.

Just found a newer version:
https://pypi.python.org/pypi/oslosphinx

This still needs to be built for Fedora... Not sure if this can be used in python-tempest-lib without patching the sources.

Comment 4 Steve Linabery 2015-01-05 14:58:32 UTC
(In reply to Mario Blättermann from comment #2)
> (In reply to Miroslav Suchý from comment #1)
> > * Fedora 22 defaults to Python3. Therefore you should provide
> > python3-subpackage unless there is strong reason.
> > 
> Obviously this package is not needed for any other software (there's nothing
> in the "Blocks:" field above), so it would be the simplest way to don't
> build a python2 version at all. Just replace the build requirements with
> those for python3, and replace the python2 macros with python3.
> 
> There remains just one problem: python-oslo-sphinx is not available for
> Python 3 yet. Well, this package is needed for building the docs only, but
> we won't get rid of the Python 2 dependency for the time being.

python-tempest-lib will be a runtime Requires for package openstack-tempest, which has an epel7 build. So, we'll need python2 since iirc python3 is not in epel7 at this time (I don't see any epel branches in python package in git).

Comment 5 Miroslav Suchý 2015-01-05 17:08:39 UTC
you have python-foo and python3-foo together.

Try running:
 pyp2rpm -n tempest-lib -d ./ -b 2 -p 3 > python-tempest-lib.spec

Comment 6 Mario Blättermann 2015-01-05 18:03:16 UTC
(In reply to Miroslav Suchý from comment #5)
> you have python-foo and python3-foo together.
> 
> Try running:
>  pyp2rpm -n tempest-lib -d ./ -b 2 -p 3 > python-tempest-lib.spec

Very interesting, that way I get BuildRequires without python-oslo-sphinx:

BuildRequires:  python-devel
BuildRequires:  python-pbr
BuildRequires:  python-sphinx
 
%if %{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-pbr
BuildRequires:  python3-sphinx
%endif # if with_python3

Having a look at the file requirements.txt, I don't see oslo-sphinx anywhere: 

pbr>=0.8.1
Babel>=1.3
fixtures>=0.3.14
oslo.config>=1.4.0.0a3
iso8601>=0.1.9


But while attempting to build the package with the spec file generated by pyp2rpm, I get an error message:

+ sphinx-build doc/source html
Making output directory...
Running Sphinx v1.2.2

Extension error:
Could not import extension oslosphinx (exception: No module named oslosphinx)

pyp2rpm isn't aware of this extra BR ... We need python3-oslo-sphinx. Another idea: Let's build the docs with python2 for the time being and put them in a -common or -docs package, unless there would be a difference between the py2 and py2 docs for this package (the latter is rather unlikely). Only when Python 2 ultimately goes out of Fedora, we need another solution.

Comment 7 Steve Linabery 2015-01-05 18:34:30 UTC
(In reply to Mario Blättermann from comment #6)
> (In reply to Miroslav Suchý from comment #5)
> > you have python-foo and python3-foo together.
> > 
> > Try running:
> >  pyp2rpm -n tempest-lib -d ./ -b 2 -p 3 > python-tempest-lib.spec
> 
> Very interesting, that way I get BuildRequires without python-oslo-sphinx:
> 
> BuildRequires:  python-devel
> BuildRequires:  python-pbr
> BuildRequires:  python-sphinx
>  
> %if %{?with_python3}
> BuildRequires:  python3-devel
> BuildRequires:  python3-pbr
> BuildRequires:  python3-sphinx
> %endif # if with_python3
> 
> Having a look at the file requirements.txt, I don't see oslo-sphinx
> anywhere: 
> 
> pbr>=0.8.1
> Babel>=1.3
> fixtures>=0.3.14
> oslo.config>=1.4.0.0a3
> iso8601>=0.1.9
> 
> 
> But while attempting to build the package with the spec file generated by
> pyp2rpm, I get an error message:
> 
> + sphinx-build doc/source html
> Making output directory...
> Running Sphinx v1.2.2
> 
> Extension error:
> Could not import extension oslosphinx (exception: No module named oslosphinx)
> 
> pyp2rpm isn't aware of this extra BR ... We need python3-oslo-sphinx.
> Another idea: Let's build the docs with python2 for the time being and put
> them in a -common or -docs package, unless there would be a difference
> between the py2 and py2 docs for this package (the latter is rather
> unlikely). Only when Python 2 ultimately goes out of Fedora, we need another
> solution.

Also please note the workaround for building with sphinx in the original submission's spec file.

On a different point, the most compelling reason not to bother with python3 right now (apart from missing python3-oslo-sphinx) is that the package that will Requires python-tempest-lib (openstack-tempest) has no python3 package and is unlikely to have one in the near future.

Comment 8 Mario Blättermann 2015-01-05 19:19:32 UTC
(In reply to Steve Linabery from comment #7)
> On a different point, the most compelling reason not to bother with python3
> right now (apart from missing python3-oslo-sphinx) is that the package that
> will Requires python-tempest-lib (openstack-tempest) has no python3 package
> and is unlikely to have one in the near future.

OK, nobody needs the python3 version for now and in the foreseeable future. And we are still far from getting rid of python2 in Fedora. So I assume it is OK to don't build the python3 version.

Here's a scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=8532140

$ rpmlint -i -v *
python-tempest-lib.noarch: I: checking
python-tempest-lib.noarch: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/python-tempest-lib/html/_static/jquery.js
This file has wrong end-of-line encoding, usually caused by creation or
modification on a non-Unix system. It could prevent it from being displayed
correctly in some circumstances.

python-tempest-lib.noarch: E: non-executable-script /usr/lib/python2.7/site-packages/tempest_lib/cmd/subunit_trace.py 0644L /usr/bin/env
This text file contains a shebang or is located in a path dedicated for
executables, but lacks the executable bits and cannot thus be executed.  If
the file is meant to be an executable script, add the executable bits,
otherwise remove the shebang or move the file elsewhere.

python-tempest-lib.noarch: W: no-manual-page-for-binary subunit-trace
Each executable in standard binary directories should have a man page.

python-tempest-lib.src: I: checking
python-tempest-lib.src: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.src: I: checking-url https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-0.0.2.tar.gz (timeout 10 seconds)
python-tempest-lib.spec: I: checking
python-tempest-lib.spec: I: checking-url https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-0.0.2.tar.gz (timeout 10 seconds)
2 packages and 1 specfiles checked; 1 errors, 2 warnings.

The missing man page is not up to you to fix, but you could file this as an upstream bug.

Remove the shebang from /usr/lib/python2.7/site-packages/tempest_lib/cmd/subunit_trace.py, scripts in %{python2_sitelib} doesn't need a shebang.

As already mentioned by Miroslav Suchý, please use the %license macro:
http://fedoraproject.org/wiki/Changes/Use_license_macro_in_RPMs_for_packages_in_Cloud_Image

I take this for a full review.

Comment 9 Steve Linabery 2015-01-20 19:44:43 UTC
new spec and srpm (rebased to latest upstream tarball) including changes suggested in previous comment.

https://slinabery.fedorapeople.org/python-tempest-lib.spec
https://slinabery.fedorapeople.org/python-tempest-lib-0.0.4-1.fc20.src.rpm

Comment 10 Mario Blättermann 2015-01-24 19:43:47 UTC
$ rpmlint -i -v *
python-tempest-lib.src: I: checking
python-tempest-lib.src: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.src: I: checking-url https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-0.0.4.tar.gz (timeout 10 seconds)
python-tempest-lib.noarch: I: checking
python-tempest-lib.noarch: W: incoherent-version-in-changelog 0.0.2-1 ['0.0.4-1.fc22', '0.0.4-1']
The latest entry in %changelog contains a version identifier that is not
coherent with the epoch:version-release tuple of the package.

python-tempest-lib.noarch: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.noarch: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

python-tempest-lib.noarch: W: no-manual-page-for-binary subunit-trace
Each executable in standard binary directories should have a man page.

python-tempest-lib-doc.noarch: I: checking
python-tempest-lib-doc.noarch: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib-doc.noarch: W: wrong-file-end-of-line-encoding /usr/share/doc/python-tempest-lib-doc/html/_static/jquery.js
This file has wrong end-of-line encoding, usually caused by creation or
modification on a non-Unix system. It could prevent it from being displayed
correctly in some circumstances.

python-tempest-lib.spec: I: checking
python-tempest-lib.spec: I: checking-url https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-0.0.4.tar.gz (timeout 10 seconds)
3 packages and 1 specfiles checked; 0 errors, 4 warnings.


The %changelog problem needs to be addressed. I haven't found what it is... As far as I can see, the spec file is OK.

The wrong line ending in the Javascript file has to be fixed, for example using dos2unix.

Comment 11 Steve Linabery 2015-01-27 16:48:28 UTC
Strange, I did not see the error re: 'wrong-file-end-of-line-encoding' when I ran fedora-review.

Also, once I changed my changelog 0.0.2->0.0.4 that warning went away for me. I wonder if there is some odd caching going on with fedora-review?

I'll see if I can reproduce the warning about the encoding.

Comment 12 Mario Blättermann 2015-01-27 18:29:59 UTC
Running "file" on the appropriate file gives:

$ file jquery.js
jquery.js: ASCII text, with very long lines, with CRLF line terminators

Then I launch dos2unix:

$ dos2unix jquery.js
dos2unix: Datei jquery.js wird ins Unix-Format umgewandelt …

And finally I get:

$ file jquery.js
jquery.js: ASCII text, with very long lines


I don't use fedora-review at all. I prefer launching certain commands, I don't like the "automatic" way.


I'm a bit confused about the changelog warning:

python-tempest-lib.noarch: W: incoherent-version-in-changelog 0.0.2-1 ['0.0.4-1.fc22', '0.0.4-1']

This is for the noarch package only, but not for srpm or spec file... Any idea?


Regarding the missing docs for the base package: I had a look at the sources, and I've found some files which would be worth to be added there. The file README.rst (now in the -doc subpackage) contains some basic info about the package and should be moved to that, moreover HACKING.rst, AUTHORS, Changelog and CONTRIBUTING.rst. Although we have the -doc subpackage, we should also feed the user with docs without the need to have the -doc package installed. BTW, to let the docs depend on the base package is unusual:

%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}

Drop the "Requires:" line. Imagine, someone is searching for info about python-tempest-lib, let him be able to install the docs independently from the package itself. Actually there is no extra requirement to read the docs, just a text viewer and HTML browser.

Comment 13 Steve Linabery 2015-01-29 16:54:01 UTC
jquery.js
---------
The jquery.js file is a problem, because it is generated by sphinx. It's not in the tarball.

When I build from the srpm locally, using mock against f20, I get 
jquery.js: ASCII text, with very long lines

When I do a koji scratch build against f22 and install the resulting RPMs locally, I get
jquery.js: ASCII text, with very long lines, with CRLF line terminators

If I remove jquery.js, I can still browse the local html docs. So, I think it might be best to just exclude that file from the doc RPM.

changelog warning
-----------------
If I mock the srpm locally with fedora-20-x86_64 target, and run rpmlint against all three resulting RPMs (noarch, doc, srpm) I cannot reproduce that 'incoherent-version-in-changelog' error. Same with pkgs from koji scratch build.

http://koji.fedoraproject.org/koji/taskinfo?taskID=8769073

Comment 14 Steve Linabery 2015-01-29 19:02:23 UTC
Spec URL: https://slinabery.fedorapeople.org/python-tempest-lib.spec
SRPM URL: https://slinabery.fedorapeople.org/python-tempest-lib-0.0.4-1.fc22.src.rpm

Let's give this revision a try.
-Moved README.rst back to noarch pkg.
-rm the jquery.js file in %install
-removed the Requires on noarch from doc

Comment 15 Mario Blättermann 2015-01-31 21:19:26 UTC
Scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=8787639

$ rpmlint -i -v *
python-tempest-lib.noarch: I: checking
python-tempest-lib.noarch: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.noarch: W: no-documentation
The package contains no documentation (README, doc, etc). You have to include
documentation files.

python-tempest-lib.noarch: W: no-manual-page-for-binary subunit-trace
Each executable in standard binary directories should have a man page.

python-tempest-lib.src: I: checking
python-tempest-lib.src: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.src: I: checking-url https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-0.0.4.tar.gz (timeout 10 seconds)
python-tempest-lib-doc.noarch: I: checking
python-tempest-lib-doc.noarch: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.spec: I: checking
python-tempest-lib.spec: I: checking-url https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-0.0.4.tar.gz (timeout 10 seconds)
3 packages and 1 specfiles checked; 0 errors, 2 warnings.

Rpmlint is quite silent. But what about the mentioned documentation? I don't see any of the basic doc files in neither the spec nor the noarch package.

Instead of just remove the Javascript file, you should consider to fix it using dos2unix. As far as I understand, you are not really sure if it is important or superfluous.

Comment 16 Steve Linabery 2015-02-04 02:25:39 UTC
Updated spec and srpm, TIA.

Comment 17 Mario Blättermann 2015-02-04 15:28:35 UTC
Scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=8818591


$ rpmlint -i -v *
python-tempest-lib.noarch: I: checking
python-tempest-lib.noarch: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.noarch: W: no-manual-page-for-binary subunit-trace
Each executable in standard binary directories should have a man page.

python-tempest-lib.src: I: checking
python-tempest-lib.src: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.src: I: checking-url https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-0.0.4.tar.gz (timeout 10 seconds)
python-tempest-lib-doc.noarch: I: checking
python-tempest-lib-doc.noarch: I: checking-url http://www.openstack.org/ (timeout 10 seconds)
python-tempest-lib.spec: I: checking
python-tempest-lib.spec: I: checking-url https://pypi.python.org/packages/source/t/tempest-lib/tempest-lib-0.0.4.tar.gz (timeout 10 seconds)
3 packages and 1 specfiles checked; 0 errors, 1 warnings.


---------------------------------
key:

[+] OK
[.] OK, not applicable
[X] needs work
---------------------------------

[+] MUST: rpmlint must be run on the source rpm and all binary rpms the build produces. The output should be posted in the review.
[+] MUST: The package must be named according to the Package Naming Guidelines.
[+] MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption.
[+] MUST: The package must meet the Packaging Guidelines.
[+] MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines.
[+] MUST: The License field in the package spec file must match the actual license.
    ASL 2.0
[+] MUST: 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 must be included in %doc.
[+] MUST: The spec file must be written in American English.
[+] MUST: The spec file for the package MUST be legible.
[+] MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use sha256sum for this task as it is used by the sources file once imported into git. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this.
    $ sha256sum *
    225c7a054a3cef53f6abb6341e5fe40f0dffb26a75ed0875caabfca2862b205f  tempest-lib-0.0.4.tar.gz
    225c7a054a3cef53f6abb6341e5fe40f0dffb26a75ed0875caabfca2862b205f  tempest-lib-0.0.4.tar.gz.orig

[+] MUST: The package MUST successfully compile and build into binary rpms on at least one primary architecture.
[.] MUST: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line.
[+] MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.
[.] MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
[.] MUST: Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun.
[.] MUST: Packages must NOT bundle copies of system libraries.
[.] MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker.
[+] MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory.
[+] MUST: A Fedora package must not list a file more than once in the spec file's %files listings. (Notable exception: license texts in specific situations)
[+] MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example.
[+] MUST: Each package must consistently use macros.
[+] MUST: The package must contain code, or permissable content.
[+] MUST: Large documentation files must go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity).
[+] MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.
[.] MUST: Static libraries must be in a -static package.
[.] MUST: Development files must be in a -devel package.
[.] MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name}%{?_isa} = %{version}-%{release}
[.] MUST: Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built.
[.] MUST: Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation.
[+] MUST: Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time. 
[+] MUST: All filenames in rpm packages must be valid UTF-8.


[.] SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it.
[.] SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
[+] SHOULD: The reviewer should test that the package builds in mock.
    See Koji build above (which uses Mock anyway).
[+] SHOULD: The package should compile and build into binary rpms on all supported architectures.
[.] SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.
[.] SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.
[.] SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
[.] SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb.
[.] SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself.
[.] SHOULD: your package should contain man pages for binaries/scripts. If it doesn't, work with upstream to add them where they make sense.


----------------

PACKAGE APPROVED

----------------

Comment 18 Steve Linabery 2015-02-04 19:18:54 UTC
New Package SCM Request
=======================
Package Name: python-tempest-lib
Short Description: OpenStack Functional Testing Library
Upstream URL: https://github.com/openstack/tempest-lib
Owners: slinabery
Branches: f20 f21 epel7
InitialCC: slinabery

Comment 19 Gwyn Ciesla 2015-02-04 19:36:34 UTC
Git done (by process-git-requests).

Comment 20 Lukas Bezdicka 2015-09-23 13:48:32 UTC
ping, any update here? I don't see package built in koji.

Comment 21 Upstream Release Monitoring 2015-10-13 11:08:23 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.