Bug 1408868

Summary: Review Request: python-case - Python unittest Utilities
Product: [Fedora] Fedora Reporter: Matthias Runge <mrunge>
Component: Package ReviewAssignee: Raphael Groner <projects.rg>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: cstratak, package-review, projects.rg
Target Milestone: ---Flags: projects.rg: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-12 05:23:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1314754, 1408869    

Description Matthias Runge 2016-12-27 20:53:56 UTC
Spec URL: http://www.matthias-runge.de/fedora/python-case.spec
SRPM URL: http://www.matthias-runge.de/fedora/python-case-1.5.2-1.fc25.src.rpm
Description: Python unittest Utilities 
Fedora Account System Username: mrunge

Comment 1 Raphael Groner 2017-01-01 22:10:12 UTC
I can not verify the compatibility with python 3.6, there are issues about failed dependency generation and rpmlint (wrong magic value):


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: "Unknown or generated", "BSD (3 clause) CC by-sa (v4.0)". 40
     files have unknown license. Detailed output of licensecheck in
     /home/builder/fedora-review/1408868-python-case/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
=> Hint: Please add LICENSE to doc subpackage when you enable it.

[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/lib/python3.6/site-packages,
     /usr/lib/python3.6
=> Maybe we need explict 'Requires: python3'. See also next errors.

[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/python3.6/site-
     packages, /usr/lib/python3.6
[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.
[?]: 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 4 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.
[?]: 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
     python2-case , python3-case
[?]: Package functions as described.
[!]: Latest version is packaged.
=> Version 1.5.2 is a snapshot of GitHub, which commit? There's no
   official tag on GitHub. You should use Release to properly show that.
   https://github.com/celery/case/issues/5
   https://fedoraproject.org/wiki/Packaging:Versioning#Snapshot_packages

[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:
[!]: 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: python2-case-1.5.2-1.fc26.noarch.rpm
          python3-case-1.5.2-1.fc26.noarch.rpm
          python-case-1.5.2-1.fc26.src.rpm
python2-case.noarch: W: spelling-error Summary(en_US) unittest -> unit test, unit-test, unities
python2-case.noarch: W: spelling-error %description -l en_US unittest -> unit test, unit-test, unities
python3-case.noarch: W: spelling-error Summary(en_US) unittest -> unit test, unit-test, unities
python3-case.noarch: W: spelling-error %description -l en_US unittest -> unit test, unit-test, unities
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/mock.cpython-36.opt-1.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/skip.cpython-36.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/tests/__pycache__/__init__.cpython-36.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/utils.cpython-36.opt-1.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/case.cpython-36.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/case.cpython-36.opt-1.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/__init__.cpython-36.opt-1.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/skip.cpython-36.opt-1.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/pytest.cpython-36.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/__init__.cpython-36.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/mock.cpython-36.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/pytest.cpython-36.opt-1.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/tests/__pycache__/__init__.cpython-36.opt-1.pyc expected 3361 (3.6), found 3379 (unknown)
python3-case.noarch: E: python-bytecode-wrong-magic-value /usr/lib/python3.6/site-packages/case/__pycache__/utils.cpython-36.pyc expected 3361 (3.6), found 3379 (unknown)
python-case.src: W: spelling-error Summary(en_US) unittest -> unit test, unit-test, unities
python-case.src: W: spelling-error %description -l en_US unittest -> unit test, unit-test, unities
3 packages and 0 specfiles checked; 14 errors, 6 warnings.




Rpmlint (installed packages)
----------------------------
python2-case.noarch: W: spelling-error Summary(en_US) unittest -> unit test, unit-test, unities
python2-case.noarch: W: spelling-error %description -l en_US unittest -> unit test, unit-test, unities
python3-case.noarch: W: spelling-error Summary(en_US) unittest -> unit test, unit-test, unities
python3-case.noarch: W: spelling-error %description -l en_US unittest -> unit test, unit-test, unities
2 packages and 0 specfiles checked; 0 errors, 4 warnings.
=> IMHO okay because unittest is a commonly used python module.


Requires
--------
python2-case (rpmlib, GLIBC filtered):
    python(abi)
    python-nose
    python-setuptools
    python-six

python3-case (rpmlib, GLIBC filtered):
    python(abi)
=> That seems to be a bug in rpmbuild and can explain why the dependency to python3 fails.

    python3-nose
    python3-setuptools
    python3-six



Provides
--------
python2-case:
    python-case
    python2-case
    python2.7dist(case)
    python2dist(case)

python3-case:
    python3-case
    python3.6dist(case)
    python3dist(case)



Source checksums
----------------
https://files.pythonhosted.org/packages/source/c/case/case-1.5.2.tar.gz :
  CHECKSUM(SHA256) this package     : 8a0dcf26d382b407c71b185720f414fa26938f12833cbc73929dfd78105f70fd
  CHECKSUM(SHA256) upstream package : 8a0dcf26d382b407c71b185720f414fa26938f12833cbc73929dfd78105f70fd


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -v -m fedora-rawhide-x86_64 -b 1408868
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

Comment 2 Raphael Groner 2017-01-01 22:32:52 UTC
FTBFS on koji:

+ /usr/bin/python2 setup.py test
running test
Searching for unittest2>=0.5.1
Reading https://pypi.python.org/simple/unittest2/
Download error on https://pypi.python.org/simple/unittest2/: [Errno -2] Name or service not known -- Some packages may not be found!
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Couldn't find index page for 'unittest2' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for unittest2>=0.5.1
error: Could not find suitable distribution for Requirement.parse('unittest2>=0.5.1')

https://koji.fedoraproject.org/koji/taskinfo?taskID=17139617

You may want to add (no clue if that omits the network access in the build run):

Requires: python2-unittest2
Requires: python3-unittest2

Comment 3 Raphael Groner 2017-01-01 22:34:43 UTC
BuildRequires: python2-unittest2
BuildRequires: python3-unittest2

… of course, got confused too.

Comment 4 Matthias Runge 2017-01-02 06:42:02 UTC
Thank you, added them both (and python[23]-nose) as well.
Now they build fine on koji, I have no idea why that wasn't caught by mockbuild.

https://koji.fedoraproject.org/koji/taskinfo?taskID=17144008

SPEC: http://www.matthias-runge.de/fedora/python-case.spec
SRPM: http://www.matthias-runge.de/fedora/python-case-1.5.2-2.fc25.src.rpm

Comment 5 Charalampos Stratakis 2017-01-02 12:41:11 UTC
rpmlint has been fixed for the bytecode warnings

https://github.com/rpm-software-management/rpmlint/commit/9adab06c47c81d0f6268f89c0a2271bc83b2334a

Comment 6 Matthias Runge 2017-01-02 13:10:41 UTC
(In reply to Charalampos Stratakis from comment #5)
> rpmlint has been fixed for the bytecode warnings
> 
> https://github.com/rpm-software-management/rpmlint/commit/
> 9adab06c47c81d0f6268f89c0a2271bc83b2334a

Thank you, I would probably have missed that change.

Comment 7 Raphael Groner 2017-01-02 16:42:11 UTC
ok, APPROVED

Scratch build now shows me for python3-case:

Requires: python(abi) = 3.6

Comment 8 Kevin Fenzi 2017-01-02 21:19:14 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/python-case

Comment 9 Fedora Update System 2017-01-03 05:52:58 UTC
python-case-1.5.2-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0523eb8ea0

Comment 10 Fedora Update System 2017-01-03 22:21:04 UTC
python-case-1.5.2-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-0523eb8ea0

Comment 11 Fedora Update System 2017-01-12 05:23:34 UTC
python-case-1.5.2-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.