Bug 1310145 - Review Request: python-igor - Parser for Igor Binary Waves (.ibw) and Packed Experiment (.pxp) files
Review Request: python-igor - Parser for Igor Binary Waves (.ibw) and Packed ...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jonathan Underwood
Fedora Extras Quality Assurance
:
Depends On:
Blocks: fedora-neuro
  Show dependency treegraph
 
Reported: 2016-02-19 10:11 EST by Zbigniew Jędrzejewski-Szmek
Modified: 2016-02-29 13:55 EST (History)
2 users (show)

See Also:
Fixed In Version: python-igor-0.2-4.20150408git2c2a79d.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-29 13:55:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jonathan.underwood: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Zbigniew Jędrzejewski-Szmek 2016-02-19 10:11:25 EST
Spec URL: https://in.waw.pl/~zbyszek/fedora/python-igor.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-igor-0.2-1.fc24.src.rpm
Fedora Account System Username: zbyszek
Description: 
Python parsers for Igor Binary Waves (.ibw) and Packed Experiment
(.pxp) files written by WaveMetrics’ IGOR Pro software.

Note that this package is unrelated to igor (Automated distribution
life-cycle testing).
Comment 1 Jonathan Underwood 2016-02-28 08:12:13 EST
$ fedora-review -m fedora-rawhide-x86_64 -b 1310145
INFO: Processing bugzilla bug: 1310145
INFO: Getting .spec and .srpm Urls from : 1310145
INFO:   --> SRPM url: https://in.waw.pl/~zbyszek/fedora/python-igor-0.2-1.fc24.src.rpm
INFO:   --> Spec url: https://in.waw.pl/~zbyszek/fedora/python-igor.spec
INFO: Using review directory: /home/jgu/Fedora/1310145-python-igor
WARNING: unable to delete selinux filesystems (/tmp/mock-selinux-plugin.rflps6lr): [Errno 1] Operation not permitted: '/tmp/mock-selinux-plugin.rflps6lr'
INFO: Downloading .spec and .srpm files
ERROR: 'Error [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) downloading https://in.waw.pl/~zbyszek/fedora/python-igor-0.2-1.fc24.src.rpm' (logs in /home/jgu/.cache/fedora-review.log)


Dude... please sort out your https situation, or upload your package to fedorapeople.org.
Comment 2 Jonathan Underwood 2016-02-28 08:36:26 EST
Also, building fails:

+ cd /builddir/build/BUILD
+ cd igor-0.2
+ nosetests-2.7 --with-doctest --doctest-tests igor test
/var/tmp/rpm-tmp.jGiA96: line 31: nosetests-2.7: command not found

Your Requires for python[3]-nose should in fact by BuildRequires.

Please fix (and it would be helpful to confirm your package builds in mock before uploading the new vesion).

Also, your subpackages need to use the %python_provide macro:

https://fedoraproject.org/wiki/Packaging:Python

Regarding  the failing tests - you should be able to use sed to convert the b'' strings to something suitable - it would be better to have these tests passing, and a patch sent upstream.
Comment 3 Jonathan Underwood 2016-02-28 08:41:44 EST
Also, the files in the project have the LGPLv3 header, but the COPYING file is the GPLv3 file, not the LGPLv3 file. So, the licensing situation is unclear - please contact upstream to clarify, and ask them to ensure the correct license file is shipped with the software.
Comment 4 Jonathan Underwood 2016-02-28 08:48:12 EST
Also, this file:

%{_bindir}/igorbinarywave

should be part of the python3 package, rather than the python2 package, unless there's a very good reason otherwise - if so, a comment needs adding to the spec file stating why.

[Actually, even better might be to have a separate subpackage with that utility in it - the python[2,3]- sub-packages are really python library packages. But, this is not mandated by the python packaging guidelines, so I'll leave it up to you].
Comment 5 Jonathan Underwood 2016-02-28 08:52:00 EST
Also, should the igorpackedexperiment.py script also not be packaged?

Both the igorpackedexperiment.py and igorbinarywave.py scripts have /usr/bin/env shebangs at the top. They should be patched to call python3 directly, rather than via env.
Comment 6 Jonathan Underwood 2016-02-28 12:59:21 EST
Here's a nice recipe for fixing up a shebang (taken from the python-pillow package):

find -name '*.py' | xargs sed -i '1s|^#!.*python|#!%{__python3}|'
Comment 7 Upstream Release Monitoring 2016-02-28 13:19:52 EST
zbyszek's scratch build of python-igor-0.2-3.20150408git2c2a79d.fc25.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=13166009
Comment 8 Zbigniew Jędrzejewski-Szmek 2016-02-28 13:30:15 EST
Thanks for the review.

Package is updated to a git snapshot, it has some fixes, and in particular:
- also installs /usr/bin/igorbinarywave
- clears up the licensing in favour of LGPLv3+

I patched the test output by hand to pass the tests under Python3. I would love to use the same sources for 2 and 3, but this seems to be one of those packages where this is very hard. Python 2 and 3 simply have different outputs and behaviour for binary structures and I don't see a way around this.

Here I get proper shebangs with /usr/bin/python2. I added a test in %check to verify that this remains true.

I decided to keep the executable running under python2. If the python3 version works properly, I can switch later. I added a comment in the spec file.

My HTTPS certificate works in firefox... Too bad that the set of CAs is not shared between system tools and the most popular browser. But you are right, I should use a certificate that is widely accepted.

I changed the BR and Provides. Seems to build fine in mock now.

New urls:
spec: https://zbyszek.fedorapeople.org/python-igor.spec
srpm: https://zbyszek.fedorapeople.org/python-igor-0.2-3.20150408git2c2a79d.fc25.src.rpm
Comment 9 Upstream Release Monitoring 2016-02-28 13:31:23 EST
zbyszek's scratch build of python-igor-0.2-3.20150408git2c2a79d.fc25.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=13166178
Comment 10 Jonathan Underwood 2016-02-29 06:01:57 EST
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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "LGPL (v3 or later)", "Unknown or generated", "*No copyright*
     Public domain". 9 files have unknown license. Detailed output of
     licensecheck in /home/jgu/Fedora/1310145-python-igor/licensecheck.txt

Public Domain needs adding to the License field in the spec.

[x]: License file installed when any subpackage combination is installed.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 2 files.
[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 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.
[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:
[x]: 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).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python2-igor , python3-igor
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[!]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
This needs addressing by adding comments to spec file. Have you
submitted these patches upstream?



[x]: 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]: 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:
[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: python2-igor-0.2-3.20150408git2c2a79d.fc25.noarch.rpm
          python3-igor-0.2-3.20150408git2c2a79d.fc25.noarch.rpm
          python-igor-0.2-3.20150408git2c2a79d.fc25.src.rpm
python2-igor.noarch: E: explicit-lib-dependency python-matplotlib

Bogus.

python2-igor.noarch: W: spelling-error Summary(en_US) ibw -> lbw, Ibo
python2-igor.noarch: W: spelling-error Summary(en_US) pxp -> pp, pep, exp
python2-igor.noarch: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python2-igor.noarch: W: spelling-error %description -l en_US ibw -> lbw, Ibo
python2-igor.noarch: W: spelling-error %description -l en_US pxp -> pp, pep, exp
python2-igor.noarch: W: no-manual-page-for-binary igorpackedexperiment
python2-igor.noarch: W: no-manual-page-for-binary igorbinarywave
python3-igor.noarch: E: explicit-lib-dependency python3-matplotlib

Bogus

python3-igor.noarch: W: spelling-error Summary(en_US) ibw -> lbw, Ibo
python3-igor.noarch: W: spelling-error Summary(en_US) pxp -> pp, pep, exp
python3-igor.noarch: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python3-igor.noarch: W: spelling-error %description -l en_US ibw -> lbw, Ibo
python3-igor.noarch: W: spelling-error %description -l en_US pxp -> pp, pep, exp
python-igor.src: W: spelling-error Summary(en_US) ibw -> lbw, Ibo
python-igor.src: W: spelling-error Summary(en_US) pxp -> pp, pep, exp
python-igor.src: W: spelling-error %description -l en_US parsers -> parser, parses, parers
python-igor.src: W: spelling-error %description -l en_US ibw -> lbw, Ibo
python-igor.src: W: spelling-error %description -l en_US pxp -> pp, pep, exp
3 packages and 0 specfiles checked; 2 errors, 17 warnings.




Rpmlint (installed packages)
----------------------------
INFO: mock.py version 1.2.15 starting (python version = 3.4.3)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
Mock Version: 1.2.15
INFO: Mock Version: 1.2.15
Finish: chroot init
INFO: installing package(s): rpmlint
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 25 --disableplugin=local --setopt=deltarpm=false install rpmlint --setopt=tsflags=nocontexts
WARNING: unable to delete selinux filesystems (/tmp/mock-selinux-plugin.z397rcrl): [Errno 1] Operation not permitted: '/tmp/mock-selinux-plugin.z397rcrl'

Seems to be a problem with mock.

Requires
--------
python3-igor (rpmlib, GLIBC filtered):
    python(abi)
    python3-matplotlib
    python3-numpy

python2-igor (rpmlib, GLIBC filtered):
    /usr/bin/python2
    numpy
    python(abi)
    python-matplotlib



Provides
--------
python3-igor:
    python3-igor

python2-igor:
    python-igor
    python2-igor



Source checksums
----------------
https://github.com/wking/igor/archive/2c2a79d85508c8988b6d4ecfd4d0f55cff35ef11.tar.gz#/igor-2c2a79d.tar.gz :
  CHECKSUM(SHA256) this package     : 5cb8d2dc6526001f5c6460dbd40df67b226259bc8e10f3db5c026432119cbb1e
  CHECKSUM(SHA256) upstream package : 5cb8d2dc6526001f5c6460dbd40df67b226259bc8e10f3db5c026432119cbb1e


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -m fedora-rawhide-x86_64 -b 1310145
Buildroot used: fedora-rawhide-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
Comment 11 Jonathan Underwood 2016-02-29 06:03:18 EST
So, please address the following:

1) Add Public Domain to license field

2) Add comments about the patches, and submit upstream where appropriate, giving a link in a comment for each patch.
Comment 12 Jonathan Underwood 2016-02-29 06:04:02 EST
APPROVED

I'll trust you to make those minor changes. Thanks for the contribution to Fedora.
Comment 13 Zbigniew Jędrzejewski-Szmek 2016-02-29 09:02:39 EST
Thanks!

I updated License and opened a PR upstream: https://github.com/wking/igor/pull/1
Comment 14 Gwyn Ciesla 2016-02-29 11:05:03 EST
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/python-igor
Comment 15 Zbigniew Jędrzejewski-Szmek 2016-02-29 13:55:33 EST
Built in rawhide, F24, F23, F22. Updates submitted.

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