Bug 2061570 - Review Request: python-primecountpy - Python Primecount wrapper
Summary: Review Request: python-primecountpy - Python Primecount wrapper
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2022-03-07 21:09 UTC by Jerry James
Modified: 2022-05-07 04:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-05-07 04:12:00 UTC
Type: ---
sanjay.ankur: fedora-review+

Attachments (Terms of Use)

Description Jerry James 2022-03-07 21:09:31 UTC
Spec URL: https://jjames.fedorapeople.org/python-primecountpy/python-primecountpy.spec
SRPM URL: https://jjames.fedorapeople.org/python-primecountpy/python-primecountpy-0.1.0-1.fc37.src.rpm
Fedora Account System Username: jjames
Description: This package provides a Cython interface to the C++ library primecount.

Comment 1 Miro Hrončok 2022-03-12 10:41:56 UTC
Advanced Python macro-fu:

The BuildRequires (such as pip, setuptools, wheel) might be better generated (but I seem to recall that you know that, but prefer not to).

PYTHONPATH=$(ls -1d $PWD/build/lib.*)  -> PYTHONPATH=%{pyproject_build_lib}  (note that this macro is provisional, do report problems if you find them)

#%%check -> you can at least do %pyporject_check_import (requires %pypoject_save_files).

The LICENSE is not marked as LICENSE, consider using %pypoject_save_files and -f %{pyproject_files} to have this handled by the macros.

Comment 2 Jerry James 2022-03-14 15:02:55 UTC
Thank you, Miro.  I have made the changes you suggested except for generating the BuildRequires.  You are correct: I prefer not to do that.  I like having the ability to grep BuildRequires.

New URLs:
Spec URL: https://jjames.fedorapeople.org/python-primecountpy/python-primecountpy.spec
SRPM URL: https://jjames.fedorapeople.org/python-primecountpy/python-primecountpy-0.1.0-2.fc37.src.rpm

Comment 3 Ankur Sinha (FranciscoD) 2022-03-15 17:57:19 UTC
Looks very good. A few things to check:

Package Review
- doc subpackage needs to include license file
- -p0 can be removed from autosetup since no patches are currently included
- the sphinx docs are included and probably need unbundling of the js and fonts and all that. (I no longer build the sphinx docs because of this myself :/)
$ rpm -ql -p ./python-primecountpy-doc-0.1.0-2.fc37.noarch.rpm
- rpmlint says: python-primecountpy-doc.noarch: W: hidden-file-or-dir /usr/share/doc/python3-primecountpy/html/.buildinfo
  We can remove this file.
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed
===== MUST items =====
[-]: 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.
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[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* GNU General Public
     License, Version 3", "GNU General Public License v2.0 or later". 18
     files have unknown license. Detailed output of licensecheck in
[!]: License file installed when any subpackage combination is installed.
The license needs to be included in the doc subpackage:
$ rpm -ql --licensefiles -p ./python3-primecountpy-0.1.0-2.fc37.x86_64.rpm
$ rpm -ql --licensefiles -p ./python-primecountpy-doc-0.1.0-2.fc37.noarch.rpm
[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
[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.
[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.
[!]: 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]: 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
[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
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local
[x]: Python eggs must not download any dependencies during the build
[x]: A package which is used by another package via an egg interface should
     provide egg info.
     Includes distinfo
[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 =====
[-]: 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
[x]: Package functions as described.
    Import check passes
[x]: 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.
[x]: Package should compile and build into binary rpms on all supported
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
[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
[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 =====
[-]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[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.
Cannot parse rpmlint output:
Meh, ran manually:
$ rpmlint *rpm ../srpm-unpacked/python-primecountpy.spec
======================================================== rpmlint session starts ========================================================
rpmlint: 2.2.0
checks: 32, packages: 4
python-primecountpy-doc.noarch: W: hidden-file-or-dir /usr/share/doc/python3-primecountpy/html/.buildinfo
========================= 3 packages and 1 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 3.1 s ===
Rpmlint (installed packages)
Cannot parse rpmlint output:
Unversioned so-files
python3-primecountpy: /usr/lib64/python3.10/site-packages/primecountpy/primecount.cpython-310-x86_64-linux-gnu.so
False positive.
Source checksums
https://github.com/dimpase/primecountpy/archive/v0.1.0/primecountpy-0.1.0.tar.gz :
  CHECKSUM(SHA256) this package     : 42835b1ddfc2e95c2a48118c3a871d650146aae92a63dd4564dd1be171d09c15
  CHECKSUM(SHA256) upstream package : 42835b1ddfc2e95c2a48118c3a871d650146aae92a63dd4564dd1be171d09c15
python3-primecountpy (rpmlib, GLIBC filtered):
python-primecountpy-doc (rpmlib, GLIBC filtered):
python-primecountpy-debugsource (rpmlib, GLIBC filtered):
Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 2061570
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Shell-api, Generic
Disabled plugins: Perl, Ocaml, R, C/C++, PHP, SugarActivity, fonts, Java, Haskell

Comment 4 Jerry James 2022-03-15 21:13:58 UTC
- The LICENSE file has been added to the doc subpackage
- The python3-sphinx_rtd_theme package does not bundle fonts, but it does include references to local font files.  I have added the necessary Requires to the doc subpackage.  Since I made those changes to python3-sphinx_rtd_theme myself, you would think I would have remembered this.  In my defense, that was 15 months ago. :-)
- The hidden .buildinfo file has been removed from the doc subpackage
- Rather than attempt to unbundle js-jquery and js-underscore, and possibly end up with incompatible versions, I have added Provides: bundled(...) for both.  I can point to a number of other python doc packages that do likewise.  Is that good enough?

New URLs:

Spec URL: https://jjames.fedorapeople.org/python-primecountpy/python-primecountpy.spec
SRPM URL: https://jjames.fedorapeople.org/python-primecountpy/python-primecountpy-0.1.0-3.fc37.src.rpm

Comment 5 Ankur Sinha (FranciscoD) 2022-03-16 08:37:21 UTC
Yes, bundling them with the necessary provides should be fine. I think that the License field may need to be updated to include the licenses of the bundled bits, though?

Comment 6 Jerry James 2022-03-16 14:55:10 UTC
The license of the doc subpackage has been set to "GPLv3 and MIT" with an explanatory comment above it.  New URLs:

Spec URL: https://jjames.fedorapeople.org/python-primecountpy/python-primecountpy.spec
SRPM URL: https://jjames.fedorapeople.org/python-primecountpy/python-primecountpy-0.1.0-4.fc37.src.rpm

Comment 7 Ankur Sinha (FranciscoD) 2022-03-16 15:12:20 UTC

Comment 8 Jerry James 2022-03-16 17:07:58 UTC
Thanks for the review, Ankur.

Comment 9 Tomas Hrcka 2022-03-17 07:37:55 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-primecountpy

Comment 10 Fedora Update System 2022-03-28 01:41:06 UTC
FEDORA-2022-2569b55c7b has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2569b55c7b

Comment 11 Fedora Update System 2022-03-29 01:22:24 UTC
FEDORA-2022-2569b55c7b has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-2569b55c7b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-2569b55c7b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2022-03-31 18:24:23 UTC
FEDORA-2022-2569b55c7b has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-2569b55c7b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-2569b55c7b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2022-05-07 04:12:00 UTC
FEDORA-2022-2569b55c7b has been pushed to the Fedora 36 stable repository.
If problem still persists, 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.