Bug 2107355 - Review Request: python-railroad-diagrams - Library to generate railroad diagrams
Summary: Review Request: python-railroad-diagrams - Library to generate railroad diagrams
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2016781
TreeView+ depends on / blocked
 
Reported: 2022-07-14 19:11 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2022-07-19 12:46 UTC (History)
3 users (show)

Fixed In Version: python-railroad-diagrams-2.0.4-4.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-19 12:46:58 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2022-07-14 19:11:46 UTC
Spec URL: https://in.waw.pl/~zbyszek/fedora/python-railroad-diagrams.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-railroad-diagrams-2.0.4-2.fc37.src.rpm
Description: Library to generate railroad diagrams
Fedora Account System Username:
zbyszek

Comment 1 Benson Muite 2022-07-15 16:47:04 UTC
Unofficial review:

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

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



===== 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: "MIT License", "Unknown or generated", "*No copyright* MIT
     License". 10 files have unknown license. Detailed output of
     licensecheck in /home/FedoraPackaging/python-railroad-diagrams/2107355-
     python-railroad-diagrams/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.
[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 2 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]: 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:
[-]: 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:
[-]: 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]: 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
-------
Cannot parse rpmlint output:


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


Source checksums
----------------
https://files.pythonhosted.org/packages/source/r/railroad-diagrams/railroad-diag
rams-2.0.4.tar.gz :
  CHECKSUM(SHA256) this package     : 7413ffa194583bd510efc3e4668f61d5a38beeca18
6bb7c36eea6d0d6f03fb45
  CHECKSUM(SHA256) upstream package : 7413ffa194583bd510efc3e4668f61d5a38beeca18
6bb7c36eea6d0d6f03fb45


Requires
--------
python3-railroad-diagrams (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python3-railroad-diagrams:
    python-railroad-diagrams
    python3-railroad-diagrams
    python3.11-railroad-diagrams
    python3.11dist(railroad-diagrams)
    python3dist(railroad-diagrams)



Diff spec file in url and in SRPM
---------------------------------
--- /home/FedoraPackaging/python-railroad-diagrams/2107355-pytho
n-railroad-diagrams/srpm/python-railroad-diagrams.spec	2022-07-15 18:06:27.8418
50930 +0300
+++ /home/FedoraPackaging/python-railroad-diagrams/2107355-pytho
n-railroad-diagrams/srpm-unpacked/python-railroad-diagrams.spec	2022-07-14 22:20
:00.000000000 +0300
@@ -1,2 +1,11 @@
+## START: Set by rpmautospec
+## (rpmautospec version 0.2.6)
+%define autorelease(e:s:pb:) %{?-p:0.}%{lua:
+    release_number = 2;
+    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
+    print(release_number + base_release_number - 1);
+}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist}
+## END: Set by rpmautospec
+
 Name:           python-railroad-diagrams
 Version:        2.0.4
@@ -48,3 +57,7 @@
 
 %changelog
-%autochangelog
+* Thu Jul 14 2022 Zbigniew Jędrzejewski-Szmek <zbyszek.pl> 2.0.4-2
+- Uncommitted changes
+
+* Thu Jul 14 2022 Zbigniew Jędrzejewski-Szmek <zbyszek.pl> 2.0.4-1
+- Initial version


Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07
Command line :/usr/bin/fedora-review -b 2107355
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic, Python
Disabled plugins: R, SugarActivity, Haskell, PHP, Java, Ocaml, C/C++, Perl, font
s
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comments:
a) Would be helpful to have a Koji/Copr build
b) Ensure posted spec file matches that in the SRPM
c) Is this program likely to be used through an egg interface?

Comment 2 Zbigniew Jędrzejewski-Szmek 2022-07-15 17:05:31 UTC
Hi, thanks for the review.

a) Would be helpful to have a Koji/Copr build

It's a noarch build, so the mock build that fedora-review does is "good enough".
A build in copr:
https://copr.fedorainfracloud.org/coprs/zbyszek/pyparsing-3/build/4634236/

b) Ensure posted spec file matches that in the SRPM

That's just fedora-review not understanding autochangelog. That diff is stuff added
automatically by rpmautospec, and can be ignored.

c) Is this program likely to be used through an egg interface?

I don't have the least idea. There's a .dist-info directory, I hope that enough.
There's one consumer of this — pyparsing — and it seems happy with the current packaging.

Comment 3 Benson Muite 2022-07-16 06:31:11 UTC
Thanks for your responses.

a) Would be helpful to have a Koji/Copr build

> It's a noarch build, so the mock build that fedora-review does is "good enough".
> A build in copr:
> https://copr.fedorainfracloud.org/coprs/zbyszek/pyparsing-3/build/4634236/

Ok. Great.

b) Ensure posted spec file matches that in the SRPM

That's just fedora-review not understanding autochangelog. That diff is stuff added
automatically by rpmautospec, and can be ignored.

Ok.

c) >> Is this program likely to be used through an egg interface?

> I don't have the least idea. There's a .dist-info directory, I hope that enough.
> There's one consumer of this — pyparsing — and it seems happy with the current packaging.

Is it possible to use the %pyproject_wheel macro? See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_dist_info_metadata

d) There are tests upstream, https://github.com/tabatkins/railroad-diagrams/blob/gh-pages/test.py but the test used seems sufficient
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_tests

Comment 4 Benson Muite 2022-07-16 08:09:00 UTC
A slightly modified spec file can be found at:
https://download.copr.fedorainfracloud.org/results/fed500/python-railroad-diagrams/fedora-rawhide-x86_64/04637669-python-railroad-diagrams/python-railroad-diagrams.spec
This does not generate .egg_info though the macro is created again in the spec file.

Comment 5 Zbigniew Jędrzejewski-Szmek 2022-07-17 09:34:17 UTC
Thanks. The spec file with your changes:
Spec URL: https://in.waw.pl/~zbyszek/fedora/python-railroad-diagrams.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-railroad-diagrams-2.0.4-2.fc37.src.rpm

Comment 6 Benson Muite 2022-07-18 08:42:34 UTC
Unofficial review:

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

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



===== 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: "MIT License", "Unknown or generated", "*No copyright* MIT
     License". 10 files have unknown license. Detailed output of
     licensecheck in /home/FedoraPackaging/python-railroad-diagrams/2107355-
     python-railroad-diagrams/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.
[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 2 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]: 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.
[?]: 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.
[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]: 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]: 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
-------
Cannot parse rpmlint output:


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


Source checksums
----------------
https://files.pythonhosted.org/packages/source/r/railroad-diagrams/railroad-diag
rams-2.0.4.tar.gz :
  CHECKSUM(SHA256) this package     : 7413ffa194583bd510efc3e4668f61d5a38beeca18
6bb7c36eea6d0d6f03fb45
  CHECKSUM(SHA256) upstream package : 7413ffa194583bd510efc3e4668f61d5a38beeca18
6bb7c36eea6d0d6f03fb45


Requires
--------
python3-railroad-diagrams (rpmlib, GLIBC filtered):
    python(abi)



Provides
--------
python3-railroad-diagrams:
    python-railroad-diagrams
    python3-railroad-diagrams
    python3.11-railroad-diagrams
    python3.11dist(railroad-diagrams)
    python3dist(railroad-diagrams)



Diff spec file in url and in SRPM
---------------------------------
--- /home/FedoraPackaging/python-railroad-diagrams/2107355-python-railroad-diagrams/
srpm/python-railroad-diagrams.spec	2022-07-17 13:24:46.4090
56371 +0300
+++ /home/FedoraPackaging/python-railroad-diagrams/2107355-python-railroad-diagrams/
srpm-unpacked/python-railroad-diagrams.spec	2022-07-17 12:28
:54.000000000 +0300
@@ -1,2 +1,11 @@
+## START: Set by rpmautospec
+## (rpmautospec version 0.2.6)
+%define autorelease(e:s:pb:) %{?-p:0.}%{lua:
+    release_number = 2;
+    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
+    print(release_number + base_release_number - 1);
+}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist}
+## END: Set by rpmautospec
+
 Name:           python-railroad-diagrams
 Version:        2.0.4
@@ -50,3 +59,7 @@
 
 %changelog
-%autochangelog
+* Sat Jul 16 2022 Benson Muite <benson_muite> 2.0.4-2
+- Convert to %%pyproject_wheel
+
+* Thu Jul 14 2022 Zbigniew Jędrzejewski-Szmek <zbyszek.pl> 2.0.4-1
+- Initial version


Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07
Command line :/usr/bin/fedora-review -b 2107355
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: Ocaml, R, Java, PHP, Haskell, C/C++, Perl, fonts, SugarActivit
y
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comments:
a) The pyparsing railroad example https://github.com/pyparsing/pyparsing/blob/master/examples/railroad_diagram_demo.py works
b) Not sure how to remove the rpmautospec macro. Possibly related issue https://pagure.io/fedora-infra/rpmautospec/issue/238

Comment 7 Miro Hrončok 2022-07-18 09:13:40 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #2)
> c) Is this program likely to be used through an egg interface?
> 
> I don't have the least idea. There's a .dist-info directory, I hope that
> enough.


AFAIK there is no "egg interface", that is just fedora-review using strange terminology. A dist-info directory supersedes egg-info.

Comment 8 Miro Hrončok 2022-07-18 09:20:49 UTC
Benson, your review is unofficial, as you are not yet sponsored?

Is somebody needed to take this over?

Comment 9 Benson Muite 2022-07-18 09:27:07 UTC
Yes. Someone would need to take this over.

Comment 10 Miro Hrončok 2022-07-18 09:40:54 UTC
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!

Comment 11 Zbigniew Jędrzejewski-Szmek 2022-07-18 10:45:14 UTC
Spec URL: https://in.waw.pl/~zbyszek/fedora/python-railroad-diagrams.spec
SRPM URL: https://in.waw.pl/~zbyszek/fedora/python-railroad-diagrams-2.0.4-3.fc37.src.rpm

> - remove %license LICENSE
> - URL: https://github.com/tabatkins/railroad-diagrams
> - expand the %description
Done.

> - chmod a+r python-railroad-diagrams.spec
That's also an artifact of rpmautospec. It rewrites the spec file from the srpm and saves
it in this mode.

This check is also stopped being useful when we moved to dist-git. Git does not store
permissions for other users. It only stores 'x' as one bit. During checkout, permissions on
files are set using umask and sharing configuration (which are both settings on the side
of the user doing the checkout). Thus it 0o077 part of the mask does not matter, because
it's ephemeral and local. Once the file is imported into dist-git, this will be "reset".

Comment 12 Miro Hrončok 2022-07-18 11:16:11 UTC
I wasn't aware git does not store full permission but I am going to trust you on that.

Package APPRVOED.


One more curiosity thing:

%check
cat >test.py <<EOF
from railroad import Diagram, Choice
d = Diagram("foo", Choice(0, "bar", "baz"))
d.writeSvg(sys.stdout.write)
EOF
%python3 railroad.py


I assumed upstream has no tests, but then I noticed it's %python3 railroad.py, not %python3 test.py here, so I've checked railroad.py and it executes test.py.
Why we don't use the upstream test.py? Would that reason justify a comment here?

Comment 13 Zbigniew Jędrzejewski-Szmek 2022-07-18 18:23:55 UTC
test.py is missing from the pypi package. I just created something based on the docs.
But I guess the file from github would be better. I'll try to switch to that when
importing the package.

Comment 14 Zbigniew Jędrzejewski-Szmek 2022-07-19 12:46:58 UTC
Built in a side tag.

Thank you for the review!


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