Bug 2050552 - Review Request: python-elasticsearch7 - Client for Elasticsearch
Summary: Review Request: python-elasticsearch7 - Client for Elasticsearch
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dan Čermák
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/elasticsearch/elas...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-04 08:54 UTC by Steve Traylen
Modified: 2023-08-21 02:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
redhat-developer: fedora-review?
cermak.daniel: needinfo-


Attachments (Terms of Use)

Description Steve Traylen 2022-02-04 08:54:29 UTC
Spec URL: https://cern.ch/straylen/rpms/python-elasticsearch7/python-elasticsearch7.spec
SRPM URL: https://cern.ch/straylen/rpms/python-elasticsearch7/python-elasticsearch7-7.17.0-1.el8.src.rpm
Description: Client for Elasticsearch
Fedora Account System Username: stevetraylen

This will be EPEL only package.

rpmlint shows.

python3-elasticsearch7.noarch: E: zero-length /usr/lib/python3.6/site-packages/elasticsearch7/py.typed
1 packages and 0 specfiles checked; 1 errors, 0 warnings.

but this is file is correct and type checking will be performed.

Comment 1 Matthew Davis 2022-02-10 04:01:57 UTC
Package Review
==============

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


Issues:
=======
- 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.
  Note: License file license.cpython-36.opt-1.pyc is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text

- %check is present and all tests pass.
  Note: The source file listed in the SPEC file does not contain test.
  However the project URL/GIT project does contain tests. Additionally
  the setup.py has test defined.

- RPMLINT has a false error.  The py.typed file is supposed to be an empty
  file.
  See: https://mypy.readthedocs.io/en/stable/installed_packages.html#making-pep-561-compatible-packages

- Package will not build on rawhide.
  RPM build errors:
  File not found: /builddir/build/BUILDROOT/python-elasticsearch7-7.17.0-1.fc36.x86_64/usr/lib/python3.10/site-packages/elasticsearch7-7.17.0-py3.?.egg-info

  suggest replacing the following int the specfile:
    - %{python3_sitelib}/%{pypi_name}-%{version}-py3.?.egg-info
  with:
    + %{python3_sitelib}/%{pypi_name}-%{version}-py%{python_version}.egg-info



===== 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: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[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.
[-]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[-]: 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 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.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[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]: Binary eggs must be removed in %prep
     Note: Cannot find any build in BUILD directory (--prebuilt option?)
[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

===== SHOULD items =====

Generic:
[x]: 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.
[x]: 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: The source file listed in the SPEC file does not contain test.
     However the project URL/GIT project does contain tests. Additionally
     the setup.py has test defined.
[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
-------
Cannot parse rpmlint output:


Rpmlint (installed packages)
----------------------------
python3-elasticsearch7.noarch: E: zero-length /usr/lib/python3.6/site-packages/elasticsearch7/py.typed
1 packages and 0 specfiles checked; 1 errors, 0 warnings.



Source checksums
----------------
https://pypi.python.org/packages/source/e/elasticsearch7/elasticsearch7-7.17.0.tar.gz :
  CHECKSUM(SHA256) this package     : 5be9aa0bfa15793ca82760c2199f042c87cd34323e9165470cccd16c3ee4c1c9
  CHECKSUM(SHA256) upstream package : 5be9aa0bfa15793ca82760c2199f042c87cd34323e9165470cccd16c3ee4c1c9


Requires
--------
python3-elasticsearch7 (rpmlib, GLIBC filtered):
    python(abi)
    python3-urllib3
    python3.6dist(certifi)
    python3.6dist(urllib3)



Provides
--------
python3-elasticsearch7:
    python3-elasticsearch7
    python3.6dist(elasticsearch7)
    python3dist(elasticsearch7)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 2050552 -m epel-8-x86_64 --mock-options=--dnf
Buildroot used: rocky-epel-8-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: fonts, Ocaml, Java, SugarActivity, C/C++, Perl, R, PHP, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

/CC @defolos as my sponsor.

Comment 2 Steve Traylen 2022-02-11 06:41:51 UTC
Thankyou for the review.

Updated packages:

Spec URL: https://cern.ch/straylen/rpms/python-elasticsearch7/python-elasticsearch7.spec
SRPM URL: https://cern.ch/straylen/rpms/python-elasticsearch7/python-elasticsearch7-7.17.0-2.el9.src.rpm


Comments:

>suggest replacing the following int the specfile:
>    - %{python3_sitelib}/%{pypi_name}-%{version}-py3.?.egg-info
>  with:
>    + %{python3_sitelib}/%{pypi_name}-%{version}-py%{python_version}.egg-info

Absolutely , got lucky on EPEL8.


> license.cpython-36.opt-1.pyc is not marked as %license
It's just a library file that happens to be called license. It reads the elasticsearch license of the server you are talking to.

> The %checks

All the upstream tests require that you have a running elasticsearch server. I've added to a comment to that effect and
also added a simple module import of elasticsearch7 which I should have done in the first place.

I believe that addresses everything.

Comment 3 Matthew Davis 2022-02-11 08:21:56 UTC
Confirmed.  All issues have been addresses successfully.

Comment 4 Dan Čermák 2022-02-24 22:26:12 UTC
This looks good overall, thanks for packaging it and thanks for the informal review Matthew!

There's the following issues that I'd like to get addressed:
- I would suggest that you use the `%py3_build` and `%py3_install` macros in %build & %install instead of the manual version. Unless this causes issues on Stream 9 of course.
- upstream published version 8, please upgrade to that, especially for Stream 9 which will live for a long time

Also, if it is not too much work, you might want to build the documentation and ship a %doc subpackage.


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

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


Issues:
=======
- 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.
  Note: License file license.cpython-310.opt-1.pyc is not marked as
  %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text


===== 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", "*No copyright* Apache License 2.0",
     "Apache License 2.0". 10 files have unknown license. Detailed output
     of licensecheck in /home/dan/fedora-scm/2050552-python-
     elasticsearch7/licensecheck.txt
[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.
[-]: 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.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[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).
[?]: 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.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %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: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Cannot parse rpmlint output:


Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://pypi.python.org/packages/source/e/elasticsearch7/elasticsearch7-7.17.0.tar.gz :
  CHECKSUM(SHA256) this package     : 5be9aa0bfa15793ca82760c2199f042c87cd34323e9165470cccd16c3ee4c1c9
  CHECKSUM(SHA256) upstream package : 5be9aa0bfa15793ca82760c2199f042c87cd34323e9165470cccd16c3ee4c1c9


Requires
--------
python3-elasticsearch7 (rpmlib, GLIBC filtered):
    (python3.10dist(urllib3) < 2~~ with python3.10dist(urllib3) >= 1.21.1)
    python(abi)
    python3-urllib3
    python3.10dist(certifi)



Provides
--------
python3-elasticsearch7:
    python-elasticsearch7
    python3-elasticsearch7
    python3.10-elasticsearch7
    python3.10dist(elasticsearch7)
    python3dist(elasticsearch7)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 2050552
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Shell-api, Generic
Disabled plugins: PHP, Ocaml, Perl, R, fonts, SugarActivity, C/C++, Haskell, Java
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 5 Package Review 2023-02-25 00:45:25 UTC
This is an automatic check from review-stats script.

This review request ticket hasn't been updated for some time, but it seems
that the review is still being working out by you. If this is right, please
respond to this comment clearing the NEEDINFO flag and try to reach out the
submitter to proceed with the review.

If you're not interested in reviewing this ticket anymore, please clear the
fedora-review flag and reset the assignee, so that a new reviewer can take
this ticket.

Without any reply, this request will shortly be resetted.

Comment 6 Dan Čermák 2023-02-25 16:13:28 UTC
Steve, could you please address the issues that I raised?

Comment 7 Steve Traylen 2023-03-02 09:01:38 UTC
Spec URL: https://cern.ch/straylen/rpms/python-elasticsearch7/python-elasticsearch7.spec
SRPM URL: https://cern.ch/straylen/rpms/python-elasticsearch7/python-elasticsearch7-7.17.9-1.el9.src.rpm

Switches to the %py3_build and _install macros - thanks.

As for doing elasticsearch8 this would be a seperate review. elasticsearch7 and elasticsearch8 are distinct pypi names and
can co-exist on EPEL9 for instance.

Steve

Comment 8 Jakub Kadlčík 2023-03-02 09:07:36 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5585468
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2050552-python-elasticsearch7/fedora-rawhide-x86_64/05585468-python-elasticsearch7/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.


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