Bug 1316186 - Review Request: python-librosa - a python package for music and audio analysis
Review Request: python-librosa - a python package for music and audio analysis
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Miro Hrončok
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-09 10:36 EST by Dominika Krejčí
Modified: 2016-05-04 14:54 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-04 14:54:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mhroncok: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Dominika Krejčí 2016-03-09 10:36:04 EST
Spec URL: https://raw.githubusercontent.com/Krejdom/librosa-specfile/master/python3-librosa.spec

SRPM URL: https://copr-be.cloud.fedoraproject.org/results/dkrejci/librosa/fedora-rawhide-x86_64/00166853-python3-librosa/python3-librosa-0.4.2-2.fc25.src.rpm

Description: LibROSA is a python package for music and audio analysis. It provides the building blocks necessary to create music information retrieval systems.

Fedora Account System Username: dkrejci

Copr link: https://copr.fedorainfracloud.org/coprs/dkrejci/librosa/build/166853/
(There is a problem with arch fedora-24-x86_64.)
Comment 1 Tomas Orsava 2016-03-16 07:40:38 EDT
Hi! So here's the review:

- rpmlint says:
python3-librosa.src: E: description-line-too-long C LibROSA is a python package for music and audio analysis. It provides the building blocks necessary to create music information retrieval systems.  Your description lines must not exceed 80 characters. If a line is exceeding this number, cut it to fit in two lines.

- start with Release number 1, not 2.

- Please include all relevant files as %doc: AUTHORS, CHANGELOG, CONTRIBUTING

- Try to add %check section to run tests provided by the package if possible.

- rpmlint:
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/effects.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/core/time_frequency.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/util/files.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/onset.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/util/decorators.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/core/__init__.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/output.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/util/deprecation.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/feature/__init__.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/util/exceptions.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/decompose.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/display.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/core/audio.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/feature/utils.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/beat.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/segment.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/util/utils.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/version.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/util/__init__.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/core/constantq.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/feature/rhythm.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/core/pitch.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/core/spectrum.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/__init__.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/filters.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/util/feature_extractor.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/cache.py 644 /usr/bin/env
python3-librosa.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/librosa/feature/spectral.py 644 /usr/bin/env
* Suggestion: remove shebang lines (which is the first line of a file when it starts with #!) from these files as they are unnecessary since these scripts aren't executable.
* For an inspiration how to do this, you can look at http://pkgs.fedoraproject.org/cgit/rpms/qutebrowser.git/tree/qutebrowser.spec lines 42-45, I'll gladly show you how it works in person.
Comment 3 Tomas Orsava 2016-03-17 06:49:45 EDT
Almost perfect. :)

One last thing: the bash command that removes the shebangs needs to be put before the line "%py3_build". You need to alter the files before they are used to build the package, after that it's too late.
Comment 4 Antonio Trande 2016-03-17 07:46:31 EDT
Is Python2 not supported ?
Documentation ?
Comment 5 Miro Hrončok 2016-03-17 07:48:22 EDT
Thanks Tomáš for the good hints, as Dominika needs a sponsor I step in to do the formal review, so I can sponsor her later. (I'm not a sponsor yet, but it seems I will be soon.)

I'm setting this bug to block FE-NEEDSPONSOR, to indicate Dominka doesn't have a sponsor yet.
Comment 6 Miro Hrončok 2016-03-17 08:39:41 EDT
So my first concerns are (as Tomáš and Antonio already pointed out):

1) Upstream clearly supports both Pythons, see https://pypi.python.org/pypi/librosa (categories section). In that case, as this is a Python library, you should package both versions as subpackages of python-librosa, see https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file about an idea how to do it.

2) The shebang manipulation should be done in %prep section, because you are preparing the sources. As Tomáš pointed out, you also need to do it before %py3_build - doing it in %prep accomplishes that.

3) There is some documentation in the GitHub repository, you *should* get it in a separate Source and rebuilt it and package it in %doc. It is also a good idea to contact upstream about a possibility to include the doc and test in the source tarball, maybe post a pullrequest with such change. I would say this is definitly not a *must* thing.
Comment 7 Miro Hrončok 2016-03-17 08:41:40 EDT
You also require some packages as BuildRequires, but you don't use them when not creating the docs and running the tests:

BuildRequires:  python3-numpydoc
BuildRequires:  python3-seaborn
BuildRequires:  python3-sphinx_rtd_theme
Comment 9 Miro Hrončok 2016-03-18 10:14:18 EDT
    %define debug_package %{nil}

This is useless as the package is noarch.


When you say Python in summary/description, please capitalize the P, also it is a good idea to use Python 2 or Python 3 in the summaries of subpackages.


You install to %{_mandir}/man1/librosa.1* - did you chack the manual page, what is it about? Man pages in man1 usually refer to executables in /usr/bin (user commands), while this package brings no executable.
Comment 10 Miro Hrončok 2016-03-18 10:27:36 EDT
Plesa always provide both spec and srpm in the same form as in the bug description, otherwise fedora-review is unhappy.
Comment 11 Miro Hrončok 2016-03-18 10:34:13 EDT
When I build the docs, I see a lot of errors about joblib, maybe python3-joblib should be added to BR?
Comment 13 Miro Hrončok 2016-03-23 13:12:27 EDT
Here comes the formal review. Once you fix the issues, please indicate in your comment what you
have fixed so I can see if you forget something, or if the fix didn't work as expected.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated


Issues:
=======
- The package installs ogg file with another license
  Note: See /usr/lib/pythonX.Y/site-packages/librosa/util/example_data/Kevin_MacLeod_-_Vibe_Ace.ogg
  The metadata clearly says:
  http://freemusicarchive.org/music/Kevin_MacLeod/Jazz_Sampler/Vibe_Ace
  Copyright: Creative Commons Attribution: http://creativecommons.org/licenses/by/3.0/

  This requires you to put ""ISC and CC-BY"" in the license field.

- The version number in Source0 is hardcoded, please use %{version} instead

- Fonts are bundled into the documentation. Those are also probably not ISC licensed.
     /usr/share/doc/pythonX-librosa/html/_static/fonts/*

- Hidden file in docs, see rpmlint output bellow.

- Large documentation must go in a -doc subpackage. Large could be size
  (~1MB) or number of files.
  Note: Documentation size is 66641920 bytes in 1024 files.
  See:
  http://fedoraproject.org/wiki/Packaging/Guidelines#PackageDocumentation
  
  I suggest to create python-librosa-doc with the HTML docs and use Suggest: to bring it with
  both packages (2 and 3), see https://fedoraproject.org/wiki/Packaging:WeakDependencies

- The docs build still screams about joblib, could you add it as BR, as suggested before?
  ImportError: No module named 'joblib'

===== 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.
[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.
[!]: 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.
[?]: Package complies to the Packaging Guidelines
     Note: Skipping this, because there are other issues
[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.
[-]: 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:
[!]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[-]: 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.
[?]: 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.
[!]: %check is present and all tests pass.
     Note: Reasonable.
[?]: 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.

Rpmlint
-------
Checking: python2-librosa-0.4.2-1.fc23.noarch.rpm
          python3-librosa-0.4.2-1.fc23.noarch.rpm
          python-librosa-0.4.2-1.fc23.src.rpm
python2-librosa.noarch: E: explicit-lib-dependency python2-joblib
False alarm.

python2-librosa.noarch: E: explicit-lib-dependency python2-matplotlib
False alarm.

python2-librosa.noarch: W: hidden-file-or-dir /usr/share/doc/python2-librosa/html/.buildinfo
Should go away.

python3-librosa.noarch: E: explicit-lib-dependency python3-joblib
False alarm.

python3-librosa.noarch: E: explicit-lib-dependency python3-matplotlib
False alarm.

python3-librosa.noarch: W: hidden-file-or-dir /usr/share/doc/python3-librosa/html/.buildinfo
Should go away.

3 packages and 0 specfiles checked; 4 errors, 2 warnings.


Requires
--------
python2-librosa (rpmlib, GLIBC filtered):
    python(abi) = 3.5
    python2-audioread
    python2-decorator
    python2-joblib
    python2-matplotlib
    python2-numpy
    python2-scikit-learn
    python2-scipy
    python2-six

python3-librosa (rpmlib, GLIBC filtered):
    python(abi) = 2.7
    python3-audioread
    python3-decorator
    python3-joblib
    python3-matplotlib
    python3-numpy
    python3-scikit-learn
    python3-scipy
    python3-six



Provides
--------
python2-librosa:
    python-librosa
    python2-librosa

python3-librosa:
    python3-librosa



Source checksums
----------------
https://github.com/bmcfee/librosa/archive/0.4.2.tar.gz :
  CHECKSUM(SHA256) this package     : af3318fa77f7b829d49c7e9719ce0acc4d2252a6f14cfd6bbcaad163144dea0a
  CHECKSUM(SHA256) upstream package : af3318fa77f7b829d49c7e9719ce0acc4d2252a6f14cfd6bbcaad163144dea0a
Comment 14 Miro Hrončok 2016-03-23 13:17:35 EDT
And of course, if you need help, feel free to ping me on IRC.
Comment 15 Dominika Krejčí 2016-04-06 04:15:02 EDT
Hi, this should work.

I fixed licences of ogg file and fonts, used macro for version, removed hidden file, created subpackage for docs and corrected names of Python2 packages (joblib added).


Spec URL: https://raw.githubusercontent.com/Krejdom/librosa-specfile/master/python-librosa.spec

SRPM URL: https://copr-be.cloud.fedoraproject.org/results/dkrejci/librosa/fedora-rawhide-x86_64/00172584-python-librosa/python-librosa-0.4.2-1.fc25.src.rpm

Copr link: https://copr.fedorainfracloud.org/coprs/dkrejci/librosa/build/172584/
Comment 16 Miro Hrončok 2016-04-06 08:08:33 EDT
It would be better to remove the bundled fonts, not to add their license to the metadata.

See https://fedoraproject.org/wiki/Packaging:Guidelines#Avoid_bundling_of_fonts_in_other_packages
Comment 17 Tomas Orsava 2016-04-06 08:24:15 EDT
Besides that, everything else checks out?
Comment 18 Dominika Krejčí 2016-04-06 10:00:25 EDT
Is it ok just delete fonts after the build of the documentation?
Comment 19 Miro Hrončok 2016-04-06 10:27:48 EDT
I think it's ok. Also delete .buildinfo.

Once done, I'll recheck all other issues, but other than that, it seems OK. Didn't try to build it yet.
Comment 21 Miro Hrončok 2016-04-08 08:40:31 EDT
Don't forget to remove the previously added licenses.
Comment 24 Miro Hrončok 2016-04-13 08:14:53 EDT
Looks good. Will wait for the build in Copr to finish and run rpmlint on the result juts to be sure.
Comment 25 Miro Hrončok 2016-04-13 10:48:53 EDT
Package is APPROVED. I've just added you to the packager group, continue with https://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Add_Package_to_Source_Code_Management_.28SCM.29_system_and_Set_Owner
Comment 26 Fedora Update System 2016-04-22 04:13:26 EDT
python-librosa-0.4.2-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-13db7afc5d
Comment 27 Fedora Update System 2016-04-22 04:13:34 EDT
python-librosa-0.4.2-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-edea31c6fc
Comment 28 Fedora Update System 2016-04-23 17:23:35 EDT
python-librosa-0.4.2-1.fc24 has been pushed to the Fedora 24 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-2016-edea31c6fc
Comment 29 Fedora Update System 2016-04-24 02:23:16 EDT
python-librosa-0.4.2-1.fc23 has been pushed to the Fedora 23 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-2016-13db7afc5d
Comment 30 Fedora Update System 2016-05-04 14:54:06 EDT
python-librosa-0.4.2-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

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