[Bug 2258167] Review Request: ruff-lsp - A Language Server Protocol implementation for Ruff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2258167



--- Comment #6 from Ben Beasley <code@xxxxxxxxxxxxxxxxxx> ---
Despite the verbose review below, this package looks good overall and is almost
ready for approval.

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

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

===== Notes (no change required for approval) =====

- Assuming you are targeting only Fedora (not EPEL9), you have the option to
  use the following syntax, which most people seem to find easier to read than
  the %bcond_with/%bcond_without syntax:

    %bcond check 1

- The inconsistent style in the manual test BR’s is odd:

    BuildRequires:  %{py3_dist pytest}
    BuildRequires:  python3-lsp-jsonrpc

  Consider this instead:

    BuildRequires:  %{py3_dist pytest}
    BuildRequires:  %{py3_dist python-lsp-jsonrpc}

  I agree with the decision not to use the dev extra to generate test
  dependencies, since it has unwanted pip-tools/mypy dependencies and mostly
  pins exact versions.

- Normally I would suggest generating a man page with help2man if the result is
  adequately useful. Indeed,

    install -d '%{buildroot}%{_mandir}/man1'
    %py3_test_envvars help2man --no-info \
          --output='%{buildroot}%{_mandir}/man1/ruff-lsp.1' ruff-lsp

  in %install would produce decent-quality output, but the ruff-lsp command
  isn’t really designed to be directly called by humans:

    # ruff-lsp --help
    usage: ruff-lsp [-h] [--version]

    options:
      -h, --help  show this help message and exit
      --version   show program's version number and exit

  Overall, then, I won’t ask you to generate a man page. It wouldn’t be wrong
  to do so, but it also wouldn’t be wrong to decide that the result would be
  too trivial to bother with.

  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages

- I think you should add

    BuildRequires:  ruff

  to go with the

    Requires:       ruff

  you already have.

  First, this keeps you (or someone else) from accidentally building a package
  that builds but doesn’t install somewhere that ruff isn’t available, like
  EPEL9.

  Second, I figure the test suite will start to actually use ruff at some
  point.

  However, there isn’t technically anything *wrong* here, so no change is
  required for approval.

===== Issues =====

- You can and should enable more tests (two out of four) by adding:

    BuildRequires:  %{py3_dist pytest-asyncio}

- Since %pyproject_save_files/%pyproject_files handles the LICENSE file in the
  .dist-info directory,

    $ rpm -qL -p results/ruff-lsp-0.0.49-1.fc40.noarch.rpm
   
/usr/lib/python3.12/site-packages/ruff_lsp-0.0.49.dist-info/licenses/LICENSE
    /usr/share/licenses/ruff-lsp/LICENSE

  which is enough to satisfy

   
https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text

  it would be better to drop the duplicate file by removing

    %license LICENSE

  and instead using the new -l option for %pyproject_save_files to assert that
  a license file is properly handled in the .dist-info directory:

    %pyproject_save_files -l ruff_lsp

- In case the “check” build conditional is toggled in the future, I think it
  would be better to make sure that at least an import test runs when the test
  suite is disabled:

    %check
    %if %{with check}
    %pytest
    %else
    %pyproject_check_import
    %endif

- The .src.rpm wasn’t updated to match the spec file when you added
  ExcludeArch: %{ix86}.

  That change makes sense and is done correctly per

   
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_noarch_with_unported_dependencies

  and

    https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval


===== 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", "*No copyright* MIT
     License". 22 files have unknown license. Detailed output of
     licensecheck in /home/ben/Downloads/review/2258167-ruff-
     lsp/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.
[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.
[-]: Package is not known to require an ExcludeArch tag.

     ExcludeArch: %{ix86} is required, and is present in the spec

[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 14397 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]: 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 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:
[-]: 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:
[-]: 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.

     Tests pass, but I haven’t attempted to plug this into something that
     actually speaks LSP.

[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.

     Package is correctly ExcludeArch: %{ix86}

[x]: %check is present and all tests pass.

     However, more tests can be easily enabled; see Issues.

[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:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).


Rpmlint
-------
Checking: ruff-lsp-0.0.49-1.fc40.noarch.rpm
          ruff-lsp-0.0.49-1.fc40.src.rpm
============================ rpmlint session starts
============================
rpmlint: 2.4.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/tmpcfn9othg')]
checks: 31, packages: 2

ruff-lsp.noarch: W: no-manual-page-for-binary ruff-lsp
 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken
0.4 s 




Rpmlint (installed packages)
----------------------------
============================ 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
checks: 32, packages: 1

ruff-lsp.noarch: E: spelling-error ('linter', '%description -l en_US linter ->
liner, liter, inter')
ruff-lsp.noarch: E: spelling-error ('formatter', '%description -l en_US
formatter -> formatted, for matter, for-matter')
ruff-lsp.noarch: E: spelling-error ('isort', '%description -l en_US isort ->
sort, i sort')
ruff-lsp.noarch: E: spelling-error ('pyupgrade', '%description -l en_US
pyupgrade -> upgrade')
ruff-lsp.noarch: E: spelling-error ('autocompletion', '%description -l en_US
autocompletion -> auto completion, auto-completion, completion')
ruff-lsp.noarch: W: python-missing-require lsprotocol
ruff-lsp.noarch: W: python-missing-require packaging
ruff-lsp.noarch: W: python-missing-require pygls
ruff-lsp.noarch: W: python-missing-require typing-extensions
ruff-lsp.noarch: W: no-manual-page-for-binary ruff-lsp
 1 packages and 0 specfiles checked; 5 errors, 5 warnings, 4 filtered, 5
badness; has taken 0.1 s 



Source checksums
----------------
https://github.com/astral-sh/ruff-lsp/archive/v0.0.49/ruff-lsp-0.0.49.tar.gz :
  CHECKSUM(SHA256) this package     :
adeb68274e34fbdb6ba0c2f9009950b617f54c2cbf0dd7b4f82c1677477e36d3
  CHECKSUM(SHA256) upstream package :
adeb68274e34fbdb6ba0c2f9009950b617f54c2cbf0dd7b4f82c1677477e36d3


Requires
--------
ruff-lsp (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3.12dist(lsprotocol)
    python3.12dist(packaging)
    python3.12dist(pygls)
    python3.12dist(ruff)
    python3.12dist(typing-extensions)
    ruff



Provides
--------
ruff-lsp:
    python3.12dist(ruff-lsp)
    python3dist(ruff-lsp)
    ruff-lsp



Diff spec file in url and in SRPM
---------------------------------
--- /home/ben/Downloads/review/2258167-ruff-lsp/srpm/ruff-lsp.spec     
2024-01-17 17:40:02.246709706 -0500
+++ /home/ben/Downloads/review/2258167-ruff-lsp/srpm-unpacked/ruff-lsp.spec    
2024-01-12 18:38:05.000000000 -0500
@@ -10,8 +10,4 @@
 Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

-# ruff is not built for %%{ix86}
-# See
https://src.fedoraproject.org/rpms/ruff/blob/c7b8ef7bdc8cb947fae7c1c67157c6fab8e9c417/f/ruff.spec#_47
-ExcludeArch:   %{ix86}
-
 BuildArch:      noarch
 BuildRequires:  python3-devel


Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review -b 2258167
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, Python
Disabled plugins: SugarActivity, fonts, Perl, R, Java, Haskell, PHP, C/C++,
Ocaml
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2258167

Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202258167%23c6
--
_______________________________________________
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




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux