https://bugzilla.redhat.com/show_bug.cgi?id=2164882 --- Comment #5 from Ben Beasley <code@xxxxxxxxxxxxxxxxxx> --- Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated ===== Issues ===== - This is not needed and should be removed: BuildRequires: python3-setuptools - The Summary should not end with a period: Summary: The request rate limiter using Leaky-bucket algorithm. This is flagged by rpmlint: python-pyrate_limiter.src: W: summary-ended-with-dot The request rate limiter using Leaky-bucket algorithm. python3-PyrateLimiter.noarch: W: summary-ended-with-dot The request rate limiter using Leaky-bucket algorithm. - The LICENSE file installed directly in site-packages is an upstream packaging error and should be removed. Try: %install %pyproject_install %pyproject_save_files pyrate_limiter # LICENSE file is installed directly in site-packages # https://github.com/vutran1710/PyrateLimiter/issues/92 rm '%{buildroot}%{python3_sitelib}/LICENSE' and omit from %files: %{python3_sitelib}/LICENSE - You should add: %doc CHANGELOG.md - A nicer source URL would be: Source0: https://github.com/vutran1710/PyrateLimiter/archive/v%{version}/PyrateLimiter-%{version}.tar.gz which, if you liked, you could shorten to: Source0: %{url}/archive/v%{version}/PyrateLimiter-%{version}.tar.gz - The package SHOULD be named using the canonical project name: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_library_naming In this case, that means the base package really ought to be python-pyrate-limiter instead of python-pyrate_limiter, and the subpackage for the binary RPM should be python3-pyrate-limiter instead of python3-PyrateLimiter. - Wherever possible, you should have metapackages for the Extras: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Extras You would use: %pyproject_buildrequires -x all and add: %pyproject_extras_subpkg -n python3-pyrate-limiter all However, in this case redis is pinned to an old version and redis-py-cluster is not packaged, so you don’t actually need to change anything. At most, you might add a comment about the dependency problem. Problem 1: nothing provides requested (python3dist(redis) < 4~~ with python3dist(redis) >= 3.3) Problem 2: nothing provides requested (python3dist(redis-py-cluster) < 3~~ with python3dist(redis-py-cluster) >= 2.1.3) - We can run the upstream tests. I added: # Test dependencies, taken from [tool.poetry.dev-dependencies]: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters # Don’t BR: coverage, flake8_polyfill, pre-commit, pytest-cov. # # We use pytest directly, so we don’t need: nox, nox-poetry # # Upstream runs tests in parallel, but we find there are race conditions; # therefore, we do not need: pytest-xdist # # These appear to be unused: logzero, PyYAML, schedule # Since we can only work with what’s packaged, let’s convert SemVer pins to # lower bounds for test dependencies, dealing with possible future test # failures if and when they happen. # Django = "^3.2.8" BuildRequires: %{py3_dist Django} >= 3.2.8 # django-redis = "^5.0.0" # Currently too old: # https://bugzilla.redhat.com/show_bug.cgi?id=1445556 # BuildRequires: %%{py3_dist django-redis} >= 5 # fakeredis = "^1.1.0" # Not yet packaged: # BuildRequires: %%{py3_dist fakeredis} >= 1.1 # pytest = "^6.2" BuildRequires: %{py3_dist pytest} >= 6.2 # pytest-asyncio = "^0.12" BuildRequires: %{py3_dist pytest-asyncio} >= 0.12 Then I replaced: %pyproject_check_import pyrate_limiter with: # Needs python3dist(fakeredis) ignore="${ignore-} --ignore=tests/test_02.py" # Needs python3dist(django-redis) ignore="${ignore-} --ignore=tests/test_with_django.py" %pytest -v ${ignore-} I also needed a patch: # Allow for sleep to be called more times than expected # https://github.com/vutran1710/PyrateLimiter/pull/93 Patch: %{url}/pull/93.patch https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_tests - You can package the latest version even without the git tag: Version: 2.8.5 Release: 1%{?dist} and # Missing git tag: # Build on pypi is not on github? # https://github.com/vutran1710/PyrateLimiter/issues/91 # It is clear which commit corresponds to the PyPI release. We eschew the # snapinfo field that would normally be needed for packaging from a particular # commit, since this is equivalent to packaging from the missing tag. %global commit 103252ca8d5336dc19b69fda6b65798eac932fd2 Source0: %{url}/archive/%{commit}/PyrateLimiter-%{commit}.tar.gz and %autosetup -p1 -n PyrateLimiter-%{commit} ===== 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", "MIT License". 32 files have unknown license. Detailed output of licensecheck in /home/ben/Downloads/2164882-python-pyrate_limiter/licensecheck.txt Confirmed the LICENSE file matches SPDX MIT. [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. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 20480 bytes in 1 files. [x]: Package complies to the Packaging Guidelines (unless otherwise mentioned) [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 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]: Package functions as described. (When I add tests, they pass.) [!]: Latest version is packaged. Adequately justified due to missing git tags, but packaging from the commit should be possible. [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. [x]: Package should compile and build into binary rpms on all supported architectures. [x]: %check is present and all tests pass. However, we should run the upstream tests. [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: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python3-PyrateLimiter-2.8.2-1.fc38.noarch.rpm python-pyrate_limiter-2.8.2-1.fc38.src.rpm =========================================== rpmlint session starts =========================================== rpmlint: 2.4.0 configuration: /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-legacy-licenses.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmpzlyy_2ej')] checks: 31, packages: 2 python-pyrate_limiter.src: W: summary-ended-with-dot The request rate limiter using Leaky-bucket algorithm. python3-PyrateLimiter.noarch: W: summary-ended-with-dot The request rate limiter using Leaky-bucket algorithm. ============ 2 packages and 0 specfiles checked; 0 errors, 2 warnings, 0 badness; has taken 0.7 s ============ Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.4.0 configuration: /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-legacy-licenses.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 31, packages: 1 python3-PyrateLimiter.noarch: W: summary-ended-with-dot The request rate limiter using Leaky-bucket algorithm. 1 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.0 s Source checksums ---------------- https://github.com/vutran1710/PyrateLimiter/archive/refs/tags/v2.8.2.tar.gz : CHECKSUM(SHA256) this package : f027a43952e9f121647969e8ef67549d31c6f645cc2bd109a63d77997595ae33 CHECKSUM(SHA256) upstream package : f027a43952e9f121647969e8ef67549d31c6f645cc2bd109a63d77997595ae33 Requires -------- python3-PyrateLimiter (rpmlib, GLIBC filtered): python(abi) Provides -------- python3-PyrateLimiter: python-PyrateLimiter python3-PyrateLimiter python3.11-PyrateLimiter python3.11dist(pyrate-limiter) python3dist(pyrate-limiter) Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23 Command line :/usr/bin/fedora-review -b 2164882 -o --no-cleanup-after --no-clean --enablerepo=local Buildroot used: fedora-rawhide-x86_64 Active plugins: Python, Generic, Shell-api Disabled plugins: fonts, Perl, Ocaml, SugarActivity, R, Java, Haskell, PHP, C/C++ Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH -- You are receiving this mail because: You are on the CC list for the bug. You are always notified about changes to this product and component https://bugzilla.redhat.com/show_bug.cgi?id=2164882 _______________________________________________ package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue