Bug 1659286 - Review Request: python-openshift - Python client for the OpenShift API
Summary: Review Request: python-openshift - Python client for the OpenShift API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alfredo Moralejo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1654833 1659281 1659282
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-14 01:49 UTC by jkim
Modified: 2019-02-19 13:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-19 13:37:22 UTC
Type: ---
Embargoed:
amoralej: fedora-review+


Attachments (Terms of Use)

Description jkim 2018-12-14 01:49:54 UTC
Spec URL: https://raw.githubusercontent.com/johnkim76/rpmbuild_files/master/SPECS/python-openshift.spec
SRPM URL: https://github.com/johnkim76/rpmbuild_files/raw/master/SRPMS/python-openshift-0.8.1-1.el7.src.rpm
Description: Python client for the kubernetes API
Fedora Account System Username: jkim

Comment 1 Fabio Valentini 2018-12-14 15:58:18 UTC
(just fixing expected review bug title)

Comment 2 Alfredo Moralejo 2018-12-19 09:50:42 UTC
Some comments:

- Do we need epoch = 1, it's a bit weird to bump it for a new package (I guess it's for compatibility with builds for non-fedora).
- Line 74: "Provides: %{name}-doc" must be removed, subpackage name provides is automatic.
- Hidden directory /usr/share/doc/python-openshift-doc/html/.doctrees should be removed after doc building.

- There are errors related to shebang/permissions with file client.py:

python3-openshift.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/openshift/dynamic/client.py /usr/bin/env python
python3-openshift.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/openshift/dynamic/client.py 644 /usr/bin/env python


If those are intended to be used as scripts, fix shebang (/usr/bin/env python should not be used, but versioned one) and make them executable. Otherwise, shebang should be removed and permissions should be kept to 644.

Comment 3 Jason Montleon 2018-12-19 13:29:47 UTC
the python openshift restclient changed versions at one point from 1.0.0-RC1 to 0.x. While they're not in Fedora there are packages floating around in our Copr repo and brew that do have this old version. You'll find these in brew, for instance. If it's not a problem I'd prefer to leave it.

We'll work on fixing the rest of these.

Comment 4 Alfredo Moralejo 2018-12-19 14:27:54 UTC
(In reply to Jason Montleon from comment #3)
> the python openshift restclient changed versions at one point from 1.0.0-RC1
> to 0.x. While they're not in Fedora there are packages floating around in
> our Copr repo and brew that do have this old version. You'll find these in
> brew, for instance. If it's not a problem I'd prefer to leave it.

ok, let's keep it, no problem.

> 
> We'll work on fixing the rest of these.

Comment 5 Fabian von Feilitzsch 2018-12-19 19:50:44 UTC
Added a PR removing shebang + main function: https://github.com/openshift/openshift-restclient-python/pull/252

Comment 6 Alfredo Moralejo 2018-12-20 14:50:18 UTC
ok, i think we can live with it until it's fixed upstream, could you update the spec with the rest of fixes so that i can re-run fedora-review?

Comment 7 Daniel Mellado 2018-12-20 15:42:02 UTC
I've created PR addressing the changes besides the ones from Fabian at https://github.com/johnkim76/rpmbuild_files/pull/3

Thanks!

Comment 9 Alfredo Moralejo 2018-12-21 09:31:43 UTC
Note that,  we need to get all requires and buildrequires in rawhide before approving python-openshift, in this case python-dictdiffer and python-string_utils need to be added first.

Comment 12 Alfredo Moralejo 2019-01-29 17:31:26 UTC
Some comments:

- Directories /usr/lib/python3.7/site-packages/openshift are orphaned. Lines %{python2_sitelib}/%{library}/* and %{python3_sitelib}/%{library}/* should be %{python2_sitelib}/%{library} and %{python3_sitelib}/%{library} (without "/*") so that the directory itself is included in the package.

Could this be fixed?, fedora-review is complaining about it.

Also some other comments (not blocking approval):

- It'd be great to run unit tests in %check. What deps are missing to be able to run them?, it'd be nice to fix it as follow up.
- About requirements.txt and adding deps to setup.py, they could be totally removed and rely on rpm requires for dependencies management.

Comment 13 Jason Montleon 2019-01-29 18:57:34 UTC
I think the missing deps for tests were bdd and kubernetes. We have kubernetes now and we don't need bdd for unit tests.

So I've added unit tests, removed the /* to stop orphaning the dirs, and cleaned up the sed for EL7.

http://people.redhat.com/jmontleo/pk-epel/python-openshift.spec
http://people.redhat.com/jmontleo/pk-epel/python-openshift-0.8.4-2.fc29.src.rpm

Comment 14 Alfredo Moralejo 2019-01-30 14:40:05 UTC
(In reply to Jason Montleon from comment #13)
> I think the missing deps for tests were bdd and kubernetes. We have
> kubernetes now and we don't need bdd for unit tests.
> 
> So I've added unit tests, removed the /* to stop orphaning the dirs, and
> cleaned up the sed for EL7.
> 
> http://people.redhat.com/jmontleo/pk-epel/python-openshift.spec
> http://people.redhat.com/jmontleo/pk-epel/python-openshift-0.8.4-2.fc29.src.
> rpm

Thanks for all those fixes.

Comment 15 Alfredo Moralejo 2019-01-30 14:41:25 UTC
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.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "*No copyright* Apache License (v2.0)", "Unknown or generated",
     "Apache License (v2.0)". 818 files have unknown license. Detailed
     output of licensecheck in /tmp/1659286-python-
     openshift/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[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]: 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 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:
[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).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-openshift , python-openshift-doc
[x]: 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.
[x]: %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: python3-openshift-0.8.4-2.fc30.noarch.rpm
          python-openshift-doc-0.8.4-2.fc30.noarch.rpm
          python-openshift-0.8.4-2.fc30.src.rpm
python3-openshift.noarch: W: no-documentation
python3-openshift.noarch: E: wrong-script-interpreter /usr/lib/python3.7/site-packages/openshift/dynamic/client.py /usr/bin/env python
python3-openshift.noarch: E: non-executable-script /usr/lib/python3.7/site-packages/openshift/dynamic/client.py 644 /usr/bin/env python
python3-openshift.noarch: W: no-manual-page-for-binary openshift-ansible-gen
python-openshift-doc.noarch: W: summary-ended-with-dot C Documentation for python-openshift.
3 packages and 0 specfiles checked; 2 errors, 3 warnings.




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


Requires
--------
python-openshift-doc (rpmlib, GLIBC filtered):

python3-openshift (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3
    python3-dictdiffer
    python3-jinja2
    python3-kubernetes
    python3-requests
    python3-ruamel-yaml
    python3-six
    python3-string_utils
    python3.7dist(dictdiffer)
    python3.7dist(jinja2)
    python3.7dist(kubernetes)
    python3.7dist(python-string-utils)
    python3.7dist(ruamel.yaml)
    python3.7dist(six)



Provides
--------
python-openshift-doc:
    python-openshift-doc

python3-openshift:
    python3-openshift
    python3.7dist(openshift)
    python3dist(openshift)



Source checksums
----------------
https://github.com/openshift/openshift-restclient-python/archive/v0.8.4.tar.gz :
  CHECKSUM(SHA256) this package     : 0a2a19953a766aead72ab1cc01432be7d0b54c8ed6303f068bb68b3da7231d0d
  CHECKSUM(SHA256) upstream package : 0a2a19953a766aead72ab1cc01432be7d0b54c8ed6303f068bb68b3da7231d0d


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -m fedora-rawhide-x86_64 -b 1659286
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Java, C/C++, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6


Notes:

- About shebang issue in openshift/dynamic/client.py , it has been fixed upstream but not released yet so it will be fixed in new release.

Package is APPROVED

Comment 16 Jason Tibbitts 2019-01-30 21:35:31 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-openshift

Comment 17 Jason Montleon 2019-02-01 13:34:48 UTC
Fedora 29 and 30 builds are done:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1185100
https://koji.fedoraproject.org/koji/buildinfo?buildID=1184872

The Fedora 29 package is in testing now. 

python-kubernetes, needed to run tests, just became possible to push to stable in EPEL today. Once there we can complete the EL7 build.


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