Bug 1935255 - Review Request: python-jaraco-path - cross platform hidden file detection
Summary: Review Request: python-jaraco-path - cross platform hidden file detection
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: 1933046
TreeView+ depends on / blocked
 
Reported: 2021-03-04 14:57 UTC by Tomáš Hrnčiar
Modified: 2021-03-30 09:20 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-03-30 09:20:50 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Comment 1 Tomáš Hrnčiar 2021-03-05 07:04:35 UTC
I just realized I forgot to add a link to the patch. 

https://patch-diff.githubusercontent.com/raw/jaraco/jaraco.path/pull/1.patch

Comment 3 Karolina Surma 2021-03-05 10:19:59 UTC
Hi Tomas,

The package builds, but when built, it doesn't contain the actual file(s) it's supposed to have, there are only metadata and documentation.

There are also some changes that would be nice to include in the spec file:
- the patch name doesn't tell much about the contents, there could be additional comment including link to upstream patch
- styling suggestion: A line of comment in the %check section could be divided into two separate to increase readability

Comment 4 Karolina Surma 2021-03-05 10:23:48 UTC
Also as noted by Lumir, please make sure that the resulting package depends on python3-jaraco containing the paths you're excluding here.

Comment 6 Karolina Surma 2021-03-08 10:24:58 UTC
Hi Tomas,

The main issue was indeed solved.

There is a typo in %files section, in line: %exclude %dir %{python3_sitelib}/jaraco/__pychache__ (should be: __pycache__) resulting in both jaraco packages owning the directory. 
This is considered a blocker for approval.

Also, it would be still handy to have the patch file renamed, as "1.patch" doesn't really describe what the contents is.
As noted before, it's better when comments are of reasonable length, please consider splitting the extra-long line of comment above the patch.

After fixes, the next review iteration is likely to be approval as no other major issues were found. 
For details see summary below.



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

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

===== 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", "Expat License", "*No copyright* Expat
     License". 20 files have unknown license. Detailed output of
     licensecheck in /home/ksurma/tmp/1935255-python-jaraco-
     path/licensecheck.txt
[!]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/lib/python3.9/site-
     packages/jaraco/__pycache__(python3-jaraco)
[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.
[!]: 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: No rpmlint messages.
[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 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).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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.
[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: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.

Comment 7 Miro Hrončok 2021-03-08 10:42:56 UTC
Thanks Karolina for the detailed review. I'm here with just a few nit picks, nothing is critical:


1. Have you considered using this patch definition?

  Patch1:         https://github.com/jaraco/jaraco.path/pull/1.patch

Or is the patch manually rebased?

I find this beneficial, because the reader knows the patch is identical to this PR if this is the case.

If you'd like to both use this AND have a nicer filename, you can do:

  Patch1:         https://github.com/jaraco/jaraco.path/pull/1.patch#/better-filename.patch

(However I don't find it particularly useful, by using the URL you communicate "this patch is PR#1".)




2. Have you considered having a nicer source filename? E.g. this:

  Source0:        https://github.com/jaraco/jaraco.path/archive/v%{version}/jaraco.path-%{version}.tar.gz

This is useful when somebody works with this package in standard rpmbuild source directories (i.e. outside of dist-git), where all the sources are in one directory and v%{version}.tar.gz might clash with another package.




3. What is the benefit of defining the %pkg_name and %pypi_name macros? I find the spec file harder to read and it is not likely the values would change with time (unlike e.g. %version). IMHO it is much simpler if the values are used explicitly (especially since there are two different names used here).


4. The comment in %check seem pretty much copy-pasted from the referenced bugzilla. I'd change "if upstream sets https://docs.pytest.org/en/stable/reference.html#confval-norecursedirs ..." with something like "jaraco.path redefines norecursedirs without `.*`" -- the bugzilla text tries to explain a situation in general terms, but this is a specific package, so we can afford being more specific -- and hence shorter and easier to understand. Whoever want's to know the details can visit the referenced bugzilla.

Comment 8 Tomáš Hrnčiar 2021-03-08 11:52:50 UTC
(In reply to Miro Hrončok from comment #7) 
> 1. Have you considered using this patch definition?

That's a good idea, I will do it. 

> If you'd like to both use this AND have a nicer filename, you can do:
> 
>   Patch1:        
> https://github.com/jaraco/jaraco.path/pull/1.patch#/better-filename.patch

Thanks, I wondered how to do it. I'll stick to 1.patch with full URL.

> 2. Have you considered having a nicer source filename? E.g. this:
> 
>   Source0:       
> https://github.com/jaraco/jaraco.path/archive/v%{version}/jaraco.path-
> %{version}.tar.gz

I have to write this down :). I always struggle to use the correct GitHub URL's when working with archives.

> 3. What is the benefit of defining the %pkg_name and %pypi_name macros? I
> find the spec file harder to read and it is not likely the values would
> change with time (unlike e.g. %version). IMHO it is much simpler if the
> values are used explicitly (especially since there are two different names
> used here).

My spec file is based on the other jaraco packages and I was trying to be consistent. But since I used pyproject-rpm-macros this is probably the only "consistency" that left there so I'll just remove it.

Comment 9 Miro Hrončok 2021-03-08 11:59:54 UTC
> I always struggle to use the correct GitHub URL's when working with archives.

The URLs that work are:

https://github.com/<owner>/<repo>/archive/<tag>.zip
https://github.com/<owner>/<repo>/archive/<tag>.tar.gz
https://github.com/<owner>/<repo>/archive/<tag>/<whatever_you_want>.zip
https://github.com/<owner>/<repo>/archive/<tag>/<whatever_you_want>.tar.gz

I consider this one is the optimal one:

https://github.com/<owner>/<repo>/archive/<tag>/<pypi_name>-<version>.tar.gz

Comment 12 Karolina Surma 2021-03-09 07:32:03 UTC
All looks good to me. The package can be APPROVED.

Comment 13 Miro Hrončok 2021-03-09 09:31:23 UTC
Approving on behalf of Karolina, who is not yet a packager.

Comment 14 Tomas Hrcka 2021-03-16 10:56:55 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-jaraco-path

Comment 15 Petr Viktorin (pviktori) 2021-03-30 09:20:50 UTC
The package is built.


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