Spec URL: http://www.jdekloe.nl/Fedora/python-eccodes.spec SRPM URL: http://www.jdekloe.nl/Fedora/python-eccodes-0.9.5-1.fc31.src.rpm Description: Python 3 interface to encode and decode GRIB and BUFR files via the ECMWF ecCodes library. It allows reading and writing of GRIB 1 and 2 files and BUFR 3 and 4 files. Fedora Account System Username: jdekloe
First of all, thank you for the submission, I extensively use this library and an official package will be very useful. I have tried the package and run some test scripts on Fedora 31 and everything works fine. Some notes: * eccodes-devel requires eccodes, then I think that "BuildRequires: eccodes" can be removed. * python-eccodes >= 0.9.5 requires at least eccodes 2.16.0, otherwise the following exception is thrown: > AttributeError: function/symbol 'codes_bufr_extract_headers_malloc' not found in library 'libeccodes.so.0.1': /lib64/libeccodes.so.0.1: undefined symbol: codes_bufr_extract_headers_malloc * From python.eccodes 0.9.4, the module gribapi checks the eccodes version and prints a warning if it's lower than the recommended one (see gribapi/__init__.py): - python-eccodes 0.9.4 requires at least eccodes 2.15.0 - python-eccodes 0.9.5 requires at least eccodes 2.16.0 * python-eccodes 0.9.3 is the most recent version of python-eccodes that is built successfully on Fedora 30, CentOS 7 and CentOS 8 (eccodes 2.14), Then, the recommended version could be made explicit in the spec file, e.g. for python-eccodes 0.9.5 it could be: BuildRequires: eccodes-devel >= 2.16.0 Requires: eccodes >= 2.16.0
I will take this review.
Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated ===== ISSUES ===== 1. License file is missing. Add this to %files: %license LICENSE 2. The __provides_exclude_from setting at the top of the spec file is not necessary. RPM already filters out that directory. 3. The formatting of %_description seems odd. Why a short line between two longer lines? Why is there a backtick at the beginning of the second line? Wouldn't it look more natural if the lines were flowed like this? %global _description \ Python 3 interface to encode and decode GRIB and BUFR files via the \ ECMWF ecCodes library. It allows reading and writing of GRIB 1 and 2 \ files and BUFR 3 and 4 files. 4. As Emanuele pointed out, "BuildRequires: eccodes" is not necessary. 5. Remove "Requires: eccodes" from the python3 package. Library dependencies must not be specified manually like this. See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_explicit_requires Note that the automatic dependency generator already generates a dependency similar to: Requires: libeccodes.so.0.1()(64bit) 6. Do not use the %{__mv} and %{__rm} macros. Just invoke mv and rm directly. See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_macros 7. The mv command in %install does not work on 32-bit platforms: mv: cannot move '%{buildroot}/usr/lib' to a subdirectory of itself, '%{buildroto}/usr/lib/lib'. If you want to use this approach, you should execute the mv only inside a conditional that checks for 64-bit platforms or %{_libdir} != "/usr/lib"; e.g., %if 0%{?__isa_bit} == 64 ... %endif I think it would be better to patch setup.py so that it installs into the architecture-specific directory in the first place. 8. Have you thought about using the pyproject macros? See https://src.fedoraproject.org/rpms/pyproject-rpm-macros. At least, the %tox macro could be used in %check. 9. Have you considered building the documentation with sphinx? 10. Version 0.9.5 is not the latest version. Version 0.9.7 has been released. ===== MUST items ===== C/C++: [x]: Development (unversioned) .so files in -devel subpackage, if present. Note: Unversioned so-files in private %_libdir subdirectory (see attachment). Verify they are not in ld path. 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. [!]: 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]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated", "*No copyright* Apache License (v2.0)", "Apache License (v2.0)". 44 files have unknown license. Detailed output of licensecheck in /home/jamesjer/1808878-python- eccodes/licensecheck.txt [!]: License file installed when any subpackage combination is installed. [x]: %build honors applicable compiler flags or justifies otherwise. [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]: Useful -debuginfo package or justification otherwise. [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 10240 bytes in 1 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: No rpmlint messages. [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]: 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 must not depend on deprecated() packages. [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]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [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). [x]: Fully versioned dependency in subpackages if applicable. [?]: Package functions as described. [!]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [-]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [!]: 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: No rpmlint messages. [x]: Large data in /usr/share should live in a noarch subpackage if package is arched. [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python3-eccodes-0.9.5-1.fc33.x86_64.rpm python-eccodes-debugsource-0.9.5-1.fc33.x86_64.rpm python-eccodes-0.9.5-1.fc33.src.rpm 3 packages and 0 specfiles checked; 0 errors, 0 warnings. Rpmlint (installed packages) ---------------------------- 3 packages and 0 specfiles checked; 0 errors, 0 warnings. Unversioned so-files -------------------- python3-eccodes: /usr/lib64/python3.8/site-packages/gribapi/_bindings.cpython-38-x86_64-linux-gnu.so Source checksums ---------------- https://files.pythonhosted.org/packages/source/e/eccodes-python/eccodes-python-0.9.5.tar.gz : CHECKSUM(SHA256) this package : c2a8d554b936ae1b4591a9e46a01ea66be50d43a12dad219111e04ba269530a9 CHECKSUM(SHA256) upstream package : c2a8d554b936ae1b4591a9e46a01ea66be50d43a12dad219111e04ba269530a9 Requires -------- python3-eccodes (rpmlib, GLIBC filtered): eccodes libc.so.6()(64bit) libeccodes.so.0.1()(64bit) python(abi) python3.8dist(attrs) python3.8dist(cffi) python3.8dist(numpy) rtld(GNU_HASH) python-eccodes-debugsource (rpmlib, GLIBC filtered): Provides -------- python3-eccodes: python-eccodes python3-eccodes python3-eccodes(x86-64) python3.8dist(eccodes-python) python3dist(eccodes-python) python-eccodes-debugsource: python-eccodes-debugsource python-eccodes-debugsource(x86-64) Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16 Command line :/usr/bin/fedora-review -b 1808878 -m fedora-rawhide-x86_64 Buildroot used: fedora-rawhide-x86_64 Active plugins: Python, Shell-api, Generic Disabled plugins: Java, Ruby, fonts, PHP, R, Perl, Haskell, SugarActivity, C/C++, Ocaml Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
Thanks for being thorough as well! My next attempt is here: Spec URL: http://www.jdekloe.nl/Fedora/python-eccodes-rev2/python-eccodes.spec SRPM URL: http://www.jdekloe.nl/Fedora/python-eccodes-rev2/python-eccodes-0.9.7-1.fc31.src.rpm My responses to your issues are: 1. License file is missing. Add this to %files: %license LICENSE done 2. The __provides_exclude_from setting at the top of the spec file is not necessary. RPM already filters out that directory. removed 3. The formatting of %_description seems odd. corrected 4. As Emanuele pointed out, "BuildRequires: eccodes" is not necessary. removed 5. Remove "Requires: eccodes" from the python3 package. removed 6. Do not use the %{__mv} and %{__rm} macros. corrected 7. The mv command in %install does not work on 32-bit platforms... I think it would be better to patch setup.py so that it installs into the architecture-specific directory in the first place. I patched the setup file 8. Have you thought about using the pyproject macros? See https://src.fedoraproject.org/rpms/pyproject-rpm-macros. At least, the %tox macro could be used in %check. I tried it for %check, but could not get %tox to work. I am not familiar with tox, but it seems that the tox config files do not yet account for python version 3.8 as used in rawhide. 9. Have you considered building the documentation with sphinx? added sphinx documentaiton generation 10. Version 0.9.5 is not the latest version. Version 0.9.7 has been released. moved to the latest release.
Okay, that looks good. I have one final suggestion, which you are free to ignore: do not remove objects.inv. That file is used by sphinx to create cross-links between documentation for different modules. If some other python module someday wants to refer to the eccodes documentation, it will need objects.inv to do so. Of course, there may not be any such python module, so I'm leaving this up to you. This package is APPROVED.
Thanks for your work. I only removed objects.inv because rpmlint complained about it. If the presence of this file is not a problem, and even desired, then I'll skip the removal and add an rpmlint exception for it.
Note: it seems the package name and package description MUST be separated by a dash surrounded by spaces in the bugzilla title of this review request (is this anywhere in the documentation?). Without this dash, the "fedpkg request-repo" call returns with an error like this: Could not execute request_repo: Invalid title for this Bugzilla bug (no "-" present)
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/python-eccodes
(In reply to Jos de Kloe from comment #7) > Note: it seems the package name and package description MUST be separated by > a dash surrounded by spaces in the bugzilla title of this review request (is > this anywhere in the documentation?). I don't think I knew that either. That's good information to file away for future use. :-)
Package is in repos
thanks for cleaning up, and sorry. I should have closed this when the repo was created.