https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Bug ID: 2304063 Summary: Review Request: python-zarr_checksum - Algorithms for calculating a zarr checksum against local or cloud storage Product: Fedora Version: rawhide Hardware: All OS: Linux Status: NEW Component: Package Review Severity: medium Assignee: nobody@fedoraproject.org Reporter: velurimithun38@gmail.com QA Contact: extras-qa@fedoraproject.org CC: package-review@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
Spec URL: https://copr-dist-git.fedorainfracloud.org/cgit/mithunveluri/python-zarr_che... SRPM URL: when creating copr review, it either takes spec file or rpm. Not both. Description: Algorithms for calculating a zarr checksum against local or cloud storage Fedora Account System Username: mithunveluri
copr build SUCCESS - https://copr.fedorainfracloud.org/coprs/mithunveluri/python-zarr_checksum/bu...
Related pagure issue - https://pagure.io/neuro-sig/NeuroFedora/issue/471
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Mithun Veluri velurimithun38@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Link ID| |Red Hat Bugzilla 177841
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Mithun Veluri velurimithun38@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1276941 | |(fedora-neuro,NeuroFedora), | |177841 (FE-NEEDSPONSOR)
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=177841 [Bug 177841] Tracker: Review requests from new Fedora packagers who need a sponsor https://bugzilla.redhat.com/show_bug.cgi?id=1276941 [Bug 1276941] Fedora NeuroImaging and NeuroScience tracking bug
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Mithun Veluri velurimithun38@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Review Request: |Review Request: |python-zarr_checksum - |python-zarr-checksum - |Algorithms for calculating |Algorithms for calculating |a zarr checksum against |a zarr checksum against |local or cloud storage |local or cloud storage
--- Comment #1 from Mithun Veluri velurimithun38@gmail.com --- Spec URL: https://download.copr.fedorainfracloud.org/results/mithunveluri/python-zarr_... SRPM URL: https://download.copr.fedorainfracloud.org/results/mithunveluri/python-zarr_... Description: Algorithms for calculating a zarr checksum against local or cloud storage Fedora Account System Username: mithunveluri
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Sandro gui1ty@penguinpee.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |fedora-review? Assignee|nobody@fedoraproject.org |gui1ty@penguinpee.nl Doc Type|--- |If docs needed, set a value CC| |gui1ty@penguinpee.nl Status|NEW |ASSIGNED
--- Comment #2 from Sandro gui1ty@penguinpee.nl --- It seems Fedora Review Service [1] is broken again. But since you have fedora-review enabled in your Copr repo, let's not worry about that.
The spec file looks good. Extra points for using forge macros [2]. However, the tests (%check) need some attention. You mention:
# required for pyproject_checkimport BuildRequires: python3dist(pytest)
That's not entirely true. Without `pytest` you'll get the following error:
File "/builddir/build/BUILD/python-zarr-checksum-0.4.2-build/BUILDROOT/usr/lib/python3.13/site-packages/zarr_checksum/tests/test_checksum.py", line 1, in <module> import pytest ModuleNotFoundError: No module named 'pytest'
That's because `%pyproject_check_import` is trying to import a test. Tests should be excluded from the wheel, so they do not get installed. But that's a packaging error upstream. We deal with that later.
You can exclude certain modules from the import check passing `-e` and a glob. See [3] for details. If you do that correctly, the import check will no longer require `pytest`.
However, running the tests with `%tox` will require `pytest`. Right now you are not actually running tests:
+ TOX_TESTENV_PASSENV='*' + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + PATH=/builddir/build/BUILD/python-zarr-checksum-0.4.2-build/BUILDROOT/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILD/python-zarr-checksum-0.4.2-build/BUILDROOT/usr/lib64/python3.13/site-packages:/builddir/build/BUILD/python-zarr-checksum-0.4.2-build/BUILDROOT/usr/lib/python3.13/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/python-zarr-checksum-0.4.2-build/zarr_checksum-0.4.2/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=2 + HOSTNAME=rpmbuild + /usr/bin/python3 -m tox --current-env -q --recreate -e py313 py313: OK (0.01 seconds) congratulations :) (0.06 seconds)
You should see some test results here.
Upstream defines tox environments in `tox.ini` [4] for various purposes. We are only interested in the tests. For each environment dependencies (extras) and jobs (commands) are defined. For the RPM macros to handle those dependencies, you need to pass the environment to `%pyproject_buildrequires` [5]. That environment will also be used by `%tox` for executing the associated jobs.
A word of caution, though. Quite often upstream likes to run linters and other jobs using `tox` as well. We are only interested in tests downstream. Thus it quickly becomes easier to run the tests directly using `%pytest`. In this case, however, using `%tox` works well.
Once you have made the required changes, please post updated 'Spec URL' and 'SRPM URL' in a new comment. You don't need to add 'Description' and 'Fedora Account System Username' again.
[1] https://github.com/FrostyX/fedora-review-service [2] I very much like using them rather than having to fiddle with URLs myself. [3] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#py3_check_... [4] https://github.com/dandi/zarr_checksum/blob/master/tox.ini [5] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#pyproject_...
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
--- Comment #3 from Mithun Veluri velurimithun38@gmail.com --- Spec URL: https://download.copr.fedorainfracloud.org/results/mithunveluri/python-zarr_... SRPM URL: https://download.copr.fedorainfracloud.org/results/mithunveluri/python-zarr_...
Thank a ton for the clear and comprehensive review Sandro. I've now modified 'tox' to trigger 'test' tox env checks written in upstream. They all are passing.
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
--- Comment #4 from Sandro gui1ty@penguinpee.nl --- I've looked into excluding the tests from the installation. Unfortunately, poetry, the build backend upstream is using, is broken in that regard [1]. So, let's leave that as is for now. It doesn't hurt having the tests installed and `%pyproject_check_import` also succeeds since `pytest` is installed anyway.
Two more things you might want to consider. Those are recommended, but not required.
1. Add a provides for `zarrsum`
Part of the package is an executable called `zarrsum`. In order for users to be able to install the package providing the executable, it is helpful to have a `Provides:` by the same name. You do that by adding
Provides: zarrsum = %{version}-%{release}
to the `python3-zarr-checksum` package. This will allow users to us `dnf install zarrsum` instead of having to know or figure out that `zarrsum` is part of `python3-zarr-checksum`.
2. Generate a man page for `zarrsum`
This optional and the usefulness depends on the output of the script's `--help` option. For inspiration see:
https://src.fedoraproject.org/rpms/fawltydeps/blob/rawhide/f/fawltydeps.spec
You will need to add a BR for `help2man` as well as adding the man pages to the `%files` section.
[1] https://github.com/python-poetry/poetry/issues/3380
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Sandro gui1ty@penguinpee.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|fedora-review? |fedora-review+
--- Comment #5 from Sandro gui1ty@penguinpee.nl --- This looks good! Package is APPROVED. Congratulations on your first package. Let's find you a sponsor.
Package Review ==============
Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed
Issues: ======= - Dist tag is present.
=> That's a false alarm due to fedora-review not understanding %autorelease
===== MUST items =====
Generic: [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [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. [x]: Package requires other packages for directories it uses. Note: No known owner of /usr/lib/python3.13, /usr/lib/python3.13/site- packages, /usr/lib, /usr/bin, /usr/share, /usr/share/licenses, /usr, /usr/share/doc
=> That's a known issue. Those directories are provided by other packages.
[x]: Package must own all directories that it creates. Note: Directories without known owners: /usr/lib/python3.13, /usr/lib/python3.13/site-packages, /usr/lib, /usr/bin, /usr/share, /usr/share/licenses, /usr, /usr/share/doc
=> Same as above.
[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. [?]: 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]: Package complies to the Packaging Guidelines [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]: The License field must be a valid SPDX expression. [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]: 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]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 1770 bytes in 2 files. [x]: Packages must not store files under /srv, /opt or /usr/local
Python: [-]: Python eggs must not download any dependencies during the build process. [-]: 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: [x]: Reviewer should test that the package builds in mock. [-]: 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). [?]: Package functions as described. [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. [?]: 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]: 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.
Rpmlint ------- Checking: python3-zarr-checksum-0.4.2-1.fc41.noarch.rpm python-zarr-checksum-0.4.2-1.fc41.src.rpm ============================ rpmlint session starts ============================ rpmlint: 2.5.0 configuration: /usr/lib/python3.12/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/tmppe_cq5g8')] checks: 32, packages: 2
python3-zarr-checksum.noarch: W: no-manual-page-for-binary zarrsum 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 9 filtered, 0 badness; has taken 0.2 s
=> man page could be provided as outlined above, but it's optional and this a warning not an error.
Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.5.0 configuration: /usr/lib/python3.13/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: 32, packages: 1
0 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 filtered, 0 badness; has taken 0.0 s (none): E: there is no installed rpm "python3-zarr-checksum". There are no files to process nor additional arguments. Nothing to do, aborting.
Source checksums ---------------- https://github.com/dandi/zarr_checksum/archive/v0.4.2/zarr_checksum-0.4.2.ta... : CHECKSUM(SHA256) this package : 8c75e9ed7e7961675b9245d0e12c674bc77f62a4ccb6dd9abf72ca48800e8662 CHECKSUM(SHA256) upstream package : 8c75e9ed7e7961675b9245d0e12c674bc77f62a4ccb6dd9abf72ca48800e8662
Requires -------- python3-zarr-checksum (rpmlib, GLIBC filtered): (python3.13dist(click) < 9~~ with python3.13dist(click) >= 8.1.3) (python3.13dist(tqdm) < 5~~ with python3.13dist(tqdm) >= 4.64.1) /usr/bin/python3 python(abi)
Provides -------- python3-zarr-checksum: python-zarr-checksum python3-zarr-checksum python3.13-zarr-checksum python3.13dist(zarr-checksum) python3dist(zarr-checksum)
Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/bin/fedora-review --no-colors --prebuilt --rpm-spec --name python-zarr-checksum --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg Buildroot used: fedora-rawhide-x86_64 Active plugins: Python, Shell-api, Generic Disabled plugins: R, Haskell, Java, Perl, PHP, Ocaml, C/C++, SugarActivity, fonts Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Ankur Sinha (FranciscoD) sanjay.ankur@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sanjay.ankur@gmail.com Blocks|177841 (FE-NEEDSPONSOR) |
--- Comment #6 from Ankur Sinha (FranciscoD) sanjay.ankur@gmail.com --- I've sponsored you to the packager group now Mithun. Welcome, and please ping me on any of the channels whenever required.
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=177841 [Bug 177841] Tracker: Review requests from new Fedora packagers who need a sponsor
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RELEASE_PENDING
--- Comment #7 from Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org --- The Pagure repository was created at https://src.fedoraproject.org/rpms/python-zarr-checksum
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RELEASE_PENDING |MODIFIED
--- Comment #8 from Fedora Update System updates@fedoraproject.org --- FEDORA-2024-dc47e3abec (python-zarr-checksum-0.4.2-1.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2024-dc47e3abec
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |ERRATA Last Closed| |2024-08-14 15:28:25
--- Comment #9 from Fedora Update System updates@fedoraproject.org --- FEDORA-2024-dc47e3abec (python-zarr-checksum-0.4.2-1.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- FEDORA-2024-8aee7fd13f (python-zarr-checksum-0.4.2-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-8aee7fd13f
https://bugzilla.redhat.com/show_bug.cgi?id=2304063
--- Comment #11 from Fedora Update System updates@fedoraproject.org --- FEDORA-2024-8aee7fd13f (python-zarr-checksum-0.4.2-1.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.
package-review@lists.fedoraproject.org