Bug 1812905 - Review Request: python-fb-re2 - python-fb-re2 is a Python extension that wraps Google's RE2 regular
Summary: Review Request: python-fb-re2 - python-fb-re2 is a Python extension that wrap...
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:
TreeView+ depends on / blocked
 
Reported: 2020-03-12 13:43 UTC by Fabien Boucher
Modified: 2020-05-05 13:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 13:45:37 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Description Fabien Boucher 2020-03-12 13:43:43 UTC
Spec URL: https://src.fedoraproject.org/rpms/python-re2/pull-request/2
SRPM URL: https://kojipkgs.fedoraproject.org//work/tasks/889/42430889/python-fb-re2-1.0.7-1.fc33.src.rpm
Description:
python-fb-re2 is a Python extension that wraps Google's RE2 regular expression
library.

This is Facebook's pyre2 Python extension that wraps Google's RE2 regular
expression library. It implements many of the features of Python's built-in re
module with compatible interfaces.

Fedora Account System Username: fbo

Comment 1 Fabien Boucher 2020-03-12 13:44:37 UTC
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=42430888

Comment 2 Miro Hrončok 2020-03-14 09:28:54 UTC
In order to run automated checks, the Spec URL must actually go to a plaintext spec file.

Comment 3 Miro Hrončok 2020-03-14 09:40:47 UTC
> Group:              Development/Libraries

Fedora packages should not use groups. 
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections





> # Remove bundled egg-info in case it exists
> rm -rf re2.egg-info

Is this actually needed nowadays?




> %{python3_sitearch}/re2.py
> ...
> %{python3_sitearch}/__pycache__/*

Replace the two lines with one:

  %pycached %{python3_sitearch}/re2.py

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



> %{python3_sitearch}/fb_re2-*.egg-info

If this is a directory (like in this case), I suggest ending it in / to make sure it remains a directory (there are known cases where just by changing the buildroot content, that "file" can change to be or not be a directory, RPM is very broken when replacing a directory with a file in an update).




The package uses setuptools at buildtime:

https://github.com/facebook/pyre2/blob/v1.0.7/setup.py#L3

But it does not BR python3-setuptools. That happens to work via a transitive dependency only (which might in fact be removed in the future).
(See https://src.fedoraproject.org/rpms/python3/blob/master/f/python3.spec#_438 for details.)

Comment 4 Miro Hrončok 2020-03-14 09:41:29 UTC
Also, there is no %license with https://github.com/facebook/pyre2/blob/master/LICENSE

Comment 5 Miro Hrončok 2020-03-14 10:02:44 UTC
The package requires libre2.so.0a()(64bit), so the manual requirement of re2 is not needed.

Comment 6 Fabien Boucher 2020-03-16 10:52:50 UTC
(In reply to Miro Hrončok from comment #4)
> Also, there is no %license with
> https://github.com/facebook/pyre2/blob/master/LICENSE

No license in the sdist: https://github.com/facebook/pyre2/issues

Comment 8 Fabien Boucher 2020-03-16 10:56:41 UTC
(In reply to Miro Hrončok from comment #3)
> > Group:              Development/Libraries
> 
> Fedora packages should not use groups. 
> https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections
> 
Fixed
> 
> 
> 
> > # Remove bundled egg-info in case it exists
> > rm -rf re2.egg-info
> 
> Is this actually needed nowadays?
> 
Fixed
> 
> 
> > %{python3_sitearch}/re2.py
> > ...
> > %{python3_sitearch}/__pycache__/*
> 
> Replace the two lines with one:
> 
>   %pycached %{python3_sitearch}/re2.py
> 
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> #_byte_compiling
> 
Done
> 
> > %{python3_sitearch}/fb_re2-*.egg-info
> 
> If this is a directory (like in this case), I suggest ending it in / to make
> sure it remains a directory (there are known cases where just by changing
> the buildroot content, that "file" can change to be or not be a directory,
> RPM is very broken when replacing a directory with a file in an update).
> 
Done
> 
> 
> The package uses setuptools at buildtime:
> 
> https://github.com/facebook/pyre2/blob/v1.0.7/setup.py#L3
> 
> But it does not BR python3-setuptools. That happens to work via a transitive
> dependency only (which might in fact be removed in the future).
> (See
> https://src.fedoraproject.org/rpms/python3/blob/master/f/python3.spec#_438
> for details.)

Comment 9 Miro Hrončok 2020-03-16 11:26:51 UTC
Spec looks sane. Running automated checks.

Comment 10 Miro Hrončok 2020-03-16 11:29:00 UTC
One more thing: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_python_provide_macro is missing.

Comment 11 Miro Hrončok 2020-03-16 11:43:57 UTC
Package Review
==============

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

Package APPROVED.


Please add https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_python_provide_macro

Please continue working with upstream to contain the LICENSE file.

Consider providing python3-re2 if you think it's useful.


===== 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.
[-]: 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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD 3-clause "New" or "Revised"
     License". 8 files have unknown license.
[-]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[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]: Useful -debuginfo package or justification otherwise.
[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: No rpmlint messages.
[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:
[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).
[-]: Fully versioned dependency in subpackages if applicable.
[?]: 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.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[?]: 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).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: python3-fb-re2-1.0.7-1.fc33.x86_64.rpm
          python-fb-re2-debugsource-1.0.7-1.fc33.x86_64.rpm
          python-fb-re2-1.0.7-1.fc33.src.rpm
3 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
python3-fb-re2.x86_64: W: invalid-url URL: https://github.com/facebook/pyre2 <urlopen error [Errno -2] Name or service not known>
python-fb-re2-debugsource.x86_64: W: invalid-url URL: https://github.com/facebook/pyre2 <urlopen error [Errno -2] Name or service not known>
2 packages and 0 specfiles checked; 0 errors, 2 warnings.

That's a false warning.


Source checksums
----------------
https://files.pythonhosted.org/packages/source/f/fb-re2/fb-re2-1.0.7.tar.gz :
  CHECKSUM(SHA256) this package     : 83b2c2cd58d3874e6e3a784cf4cf2f1a57ce1969e50180f92b010eea24ef26cf
  CHECKSUM(SHA256) upstream package : 83b2c2cd58d3874e6e3a784cf4cf2f1a57ce1969e50180f92b010eea24ef26cf


Requires
--------
python3-fb-re2 (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libre2.so.0a()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.8)(64bit)
    python(abi)
    rtld(GNU_HASH)

python-fb-re2-debugsource (rpmlib, GLIBC filtered):



Provides
--------
python3-fb-re2:
    python3-fb-re2
    python3-fb-re2(x86-64)
    python3.8dist(fb-re2)
    python3dist(fb-re2)

python-fb-re2-debugsource:
    python-fb-re2-debugsource
    python-fb-re2-debugsource(x86-64)



Diff spec file in url and in SRPM
---------------------------------
--- /home/churchyard/rpmbuild/FedoraReview/1812905-python-fb-re2/srpm/python-fb-re2.spec	2020-03-16 12:27:09.096741534 +0100
+++ /home/churchyard/rpmbuild/FedoraReview/1812905-python-fb-re2/srpm-unpacked/python-fb-re2.spec	2020-03-16 11:06:10.000000000 +0100
@@ -25,4 +25,5 @@
 BuildRequires:      re2-devel
 BuildRequires:      gcc-c++
+#Requires:           re2
 
 %description -n python3-%{srcname} %_description


Generated by fedora-review 0.7.0 (fed5495) last change: 2019-03-17
Command line :try-fedora-review -b 1812905 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic, Python
Disabled plugins: SugarActivity, Java, Ocaml, C/C++, fonts, Haskell, Ruby, Perl, R, PHP
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 12 Fabien Boucher 2020-03-16 11:46:05 UTC
(In reply to Miro Hrončok from comment #10)
> One more thing:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> #_the_python_provide_macro is missing.

Thanks. Done.

Comment 13 Gwyn Ciesla 2020-03-17 13:08:31 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-fb-re2


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