[Bug 2107355] Review Request: python-railroad-diagrams - Library to generate railroad diagrams

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

 



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



--- Comment #10 from Miro Hrončok <mhroncok@xxxxxxxxxx> ---
First of all, the output you posted has:

"Cannot parse rpmlint output"

As a reviewer, you are supposed to run rpmlint and see if there are any real
problems. Fedora-Review is a nice tool, but it sometimes requires manual steps
as well.


On the spec and SRPM:


$ rpmlint ./python-railroad-diagrams*
============================ rpmlint session starts
============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 2

python-railroad-diagrams.src: W: strange-permission
python-railroad-diagrams.spec 600
 1 packages and 1 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken
1.2 s 


I don't know if this actually breaks any rules, but the spec file permission is
indeed a tad weird. Usually, a spec file should have 0644 permissions.


Built package

$ rpmlint ./python3-railroad-diagrams-2.0.4-2.fc37.noarch.rpm 
============================ rpmlint session starts
============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken
0.0 s 


Installed package:

$ rpmlint --installed python3-railroad-diagrams
============================ rpmlint session starts
============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken
0.0 s 






Next things I like to check in Python packages are versioned requires and
provides (as Fedora-Review strips the versions):

$ rpm -qRp python3-railroad-diagrams-2.0.4-2.fc37.noarch.rpm 
python(abi) = 3.11
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1

$ rpm -qPp python3-railroad-diagrams-2.0.4-2.fc37.noarch.rpm 
python-railroad-diagrams = 2.0.4-2.fc37
python3-railroad-diagrams = 2.0.4-2.fc37
python3.11-railroad-diagrams = 2.0.4-2.fc37
python3.11dist(railroad-diagrams) = 2.0.4
python3dist(railroad-diagrams) = 2.0.4


Both look good. Sometimes, Python packages tend to provide e.g. version 0,
which would be a bad thing.



Another thing are BuildRequires. I check them for linters, coverage and
deprecated Python packages:

$ rpm -qRp python-railroad-diagrams-2.0.4-2.fc37.src.rpm 
pyproject-rpm-macros
python3-devel
python3-devel
python3dist(packaging)
python3dist(pip) >= 19
python3dist(setuptools) >= 40.8
python3dist(wheel)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(DynamicBuildRequires) <= 4.15.0-1
rpmlib(FileDigests) <= 4.6.0-1


All good.


Finally, the license files:


$ rpm -qpl --licensefiles python3-railroad-diagrams-2.0.4-2.fc37.noarch.rpm 
/usr/lib/python3.11/site-packages/railroad_diagrams-2.0.4.dist-info/LICENSE
/usr/share/licenses/python3-railroad-diagrams/LICENSE


And I see that the `%license LICENSE` line in %files is duplicated.



I also read the spec line by line to see if something strikes me as weird.


I found:

URL:            https://pypi.org/project/railroad-diagrams/

Upstream lists https://github.com/tabatkins/railroad-diagrams as their homepage
and I belive this URL will serve our users and package maintainers better than
a link to the package index.



I also found:

%global _description %{expand:
%{summary}.}

That seems rather... lazy? Upstream has a nice description in their README,
with a bit of final touches:

This is a small Python library for generating railroad diagrams using SVG.

%global _description %{expand:
Railroad diagrams are a way of visually representing a grammar in a form
that is more readable than using regular expressions or BNF.
They can easily represent any context-free grammar,
and some more powerful grammars.}





The rest was checked by Benson.



---------------------

tl;dr:

 - remove %license LICENSE
 - URL: https://github.com/tabatkins/railroad-diagrams
 - expand the %description
 - chmod a+r python-railroad-diagrams.spec

Thanks!


-- 
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=2107355
_______________________________________________
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 on the list, report it: https://pagure.io/fedora-infrastructure




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

  Powered by Linux