Bug 1815154

Summary: Review Request: python-sphinx-press-theme - A Sphinx-doc theme based on Vuepress
Product: [Fedora] Fedora Reporter: José Matos <jamatos>
Component: Package ReviewAssignee: Fabian Affolter <mail>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mail, mhroncok, package-review
Target Milestone: ---Flags: mail: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-01 00:17:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1782357    

Description José Matos 2020-03-19 16:14:44 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/jamatos/nikola-playground/fedora-rawhide-x86_64/01311963-python-sphinx-press-theme/python-sphinx-press-theme.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/jamatos/nikola-playground/fedora-rawhide-x86_64/01311963-python-sphinx-press-theme/python-sphinx-press-theme-0.5.1-1.fc33.src.rpm

Description:
A modern responsive theme for python's Sphinx documentation generator.
See it in action on Press Theme own website.
This theme is based on VuePress. It uses Vue.js & Stylus managed by webpack (through vue-cli).

Fedora Account System Username:

Comment 1 José Matos 2020-03-19 16:21:29 UTC
FWIW I have updated the description in the spec file to be the same as the one above.

This package is required to update python-doit to the latest version. It is used to build its documentation.

Comment 2 Fabian Affolter 2020-03-19 19:07:46 UTC
- The URL in Source0: could be replaced with %{pypi_source}
- Please remove the formatting from %description
- For python3dist(sphinx) >= 2.0.0 the restriction can be removed as F31, F32 and Rawhide already are shipping more recent releases.
- Fix the ownership in the %files section please.
- License file is missing. Get in touch with upstream about the addition of it.
- Some files are licensed under BSD

Comment 3 José Matos 2020-03-19 20:05:38 UTC
Thanks Fabian for taking the review.

(In reply to Fabian Affolter from comment #2)
> - The URL in Source0: could be replaced with %{pypi_source}

Done.

> - Please remove the formatting from %description

Sure.

> - For python3dist(sphinx) >= 2.0.0 the restriction can be removed as F31,
> F32 and Rawhide already are shipping more recent releases.

Actually I removed the manual provided Requires since they will be autogenerated.

> - Fix the ownership in the %files section please.

What do you mean here? I searched the the generated rpm and I do not see any problem in the ownership of the files. Apologies if this question looks dumb but I am at loss here. :-)

> - License file is missing. Get in touch with upstream about the addition of
> it.
> - Some files are licensed under BSD

You are right.
There is already and issue open at the project 
https://github.com/schettino72/sphinx_press_theme/issues/32

New spec file and srpm below:

Spec URL: https://download.copr.fedorainfracloud.org/results/jamatos/nikola-playground/fedora-rawhide-x86_64/01312124-python-sphinx-press-theme/python-sphinx-press-theme.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/jamatos/nikola-playground/fedora-rawhide-x86_64/01312124-python-sphinx-press-theme/python-sphinx-press-theme-0.5.1-2.fc33.src.rpm

Comment 4 Fabian Affolter 2020-03-20 10:13:35 UTC
- Wrong URL, it's the other one ;-)

  URL:            https://schettino72.github.io/sphinx_press_site/
  Source0:        %{pypi_source}

- From my point of view both licenses must be mentioned -> https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_multiple_licensing_scenarios

  License:        MIT and BSD

- The package must own the directories that are created.

  %{python3_sitelib}/sphinx_press_theme/
  %{python3_sitelib}/sphinx_press_theme-%{version}-py%{python3_version}.egg-info/

Comment 5 José Matos 2020-03-20 18:05:38 UTC
(In reply to Fabian Affolter from comment #4)
> - Wrong URL, it's the other one ;-)
> 
>   URL:            https://schettino72.github.io/sphinx_press_site/
>   Source0:        %{pypi_source}

Actually it is not possible because the source and pypi names are different:

sphinx_press_theme <- source name
sphinx-press-theme <- pypi name

Note the difference between them by swapping the underscores by dashes.

> - From my point of view both licenses must be mentioned ->
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> LicensingGuidelines/#_multiple_licensing_scenarios
> 
>   License:        MIT and BSD

You are right and I have added in the new spec.

> - The package must own the directories that are created.
> 
>   %{python3_sitelib}/sphinx_press_theme/
>  
> %{python3_sitelib}/sphinx_press_theme-%{version}-py%{python3_version}.egg-
> info/

But it is already there. By placing the directory name with the final slash (/) it means the directory and all its files.
One reference I found
https://stackoverflow.com/questions/57385249/in-an-rpm-files-section-is-it-possible-to-specify-a-directory-and-all-of-its-fi

Searching more in detail I found it:
http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list.html

while the first paragraph here clearly states that placing the name of the directory includes the directory and all its files:
http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-DIR-DIRECTIVE

Spec URL: https://jamatos.fedorapeople.org/python-sphinx-press-theme.spec
SRPM URL: https://jamatos.fedorapeople.org/python-sphinx-press-theme-0.5.1-3.fc32.src.rpm

Comment 6 Fabian Affolter 2020-03-20 20:07:22 UTC
(In reply to José Matos from comment #5)
> (In reply to Fabian Affolter from comment #4)
> > - Wrong URL, it's the other one ;-)
> > 
> >   URL:            https://schettino72.github.io/sphinx_press_site/
> >   Source0:        %{pypi_source}
> 
> Actually it is not possible because the source and pypi names are different:
> 
> sphinx_press_theme <- source name
> sphinx-press-theme <- pypi name

%{pypi_source} can take multiple argument -> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_source_files_from_pypi

Could work with  %{pypi_source sphinx_press_theme}

> > - The package must own the directories that are created.
> > 
> >   %{python3_sitelib}/sphinx_press_theme/
> >  
> > %{python3_sitelib}/sphinx_press_theme-%{version}-py%{python3_version}.egg-
> > info/
> 
> But it is already there. By placing the directory name with the final slash
> (/) it means the directory and all its files.

See https://fedoraproject.org/wiki/Packaging:UnownedDirectories#Common_Mistakes

Comment 7 Miro Hrončok 2020-03-20 20:54:05 UTC
Fabian, what directories the package doesn't own but should?

Comment 8 José Matos 2020-03-20 22:56:55 UTC
(In reply to Fabian Affolter from comment #6)
> (In reply to José Matos from comment #5)
> > (In reply to Fabian Affolter from comment #4)
> > > - Wrong URL, it's the other one ;-)
> > > 
> > >   URL:            https://schettino72.github.io/sphinx_press_site/
> > >   Source0:        %{pypi_source}
> > 
> > Actually it is not possible because the source and pypi names are different:
> > 
> > sphinx_press_theme <- source name
> > sphinx-press-theme <- pypi name
> 
> %{pypi_source} can take multiple argument ->
> https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> #_source_files_from_pypi
> 
> Could work with  %{pypi_source sphinx_press_theme}

Thanks for the reminder, that is neat.
Yet when I did that change and rebuilt the rpm I got:

$ rpmbuild -ba python-sphinx-press-theme.spec 
error: line 2: Unknown tag: https://files.pythonhosted.org/packages/source/s/sphinx_press_theme/sphinx_press_theme-%version.tar.gz

The %version was not expanded. I am using Fedora 32.

@Miro: was this to be expected?

> > > - The package must own the directories that are created.
> > > 
> > >   %{python3_sitelib}/sphinx_press_theme/
> > >  
> > > %{python3_sitelib}/sphinx_press_theme-%{version}-py%{python3_version}.egg-
> > > info/
> > 
> > But it is already there. By placing the directory name with the final slash
> > (/) it means the directory and all its files.
> 
> See
> https://fedoraproject.org/wiki/Packaging:UnownedDirectories#Common_Mistakes

I understand and share you concern regarding unowned directories but the page above does not warn about the usage done in the spec.

If I remember correctly (I can be wrong naturally) this line in %files
%{python3_sitelib}/sphinx_press_theme

is equivalent to
%dir %{python3_sitelib}/sphinx_press_theme
%{python3_sitelib}/sphinx_press_theme/

I even tried to install and remove the corresponding rpm and the directories are correctly removed when the package is uninstalled.

Comment 9 Miro Hrončok 2020-03-21 00:29:01 UTC
(In reply to José Matos from comment #8)
> (In reply to Fabian Affolter from comment #6)
> > (In reply to José Matos from comment #5)
> > > (In reply to Fabian Affolter from comment #4)
> > > > - Wrong URL, it's the other one ;-)
> > > > 
> > > >   URL:            https://schettino72.github.io/sphinx_press_site/
> > > >   Source0:        %{pypi_source}
> > > 
> > > Actually it is not possible because the source and pypi names are different:
> > > 
> > > sphinx_press_theme <- source name
> > > sphinx-press-theme <- pypi name
> > 
> > %{pypi_source} can take multiple argument ->
> > https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
> > #_source_files_from_pypi
> > 
> > Could work with  %{pypi_source sphinx_press_theme}
> 
> Thanks for the reminder, that is neat.
> Yet when I did that change and rebuilt the rpm I got:
> 
> $ rpmbuild -ba python-sphinx-press-theme.spec 
> error: line 2: Unknown tag:
> https://files.pythonhosted.org/packages/source/s/sphinx_press_theme/
> sphinx_press_theme-%version.tar.gz
> 
> The %version was not expanded. I am using Fedora 32.
> 
> @Miro: was this to be expected?


This is missing the Source tag, you need something like:

Source0: %{pypi_source sphinx_press_theme}


> > > > - The package must own the directories that are created.
> > > > 
> > > >   %{python3_sitelib}/sphinx_press_theme/
> > > >  
> > > > %{python3_sitelib}/sphinx_press_theme-%{version}-py%{python3_version}.egg-
> > > > info/
> > > 
> > > But it is already there. By placing the directory name with the final slash
> > > (/) it means the directory and all its files.
> > 
> > See
> > https://fedoraproject.org/wiki/Packaging:UnownedDirectories#Common_Mistakes
> 
> I understand and share you concern regarding unowned directories but the
> page above does not warn about the usage done in the spec.
> 
> If I remember correctly (I can be wrong naturally) this line in %files
> %{python3_sitelib}/sphinx_press_theme
> 
> is equivalent to
> %dir %{python3_sitelib}/sphinx_press_theme
> %{python3_sitelib}/sphinx_press_theme/
> 
> I even tried to install and remove the corresponding rpm and the directories
> are correctly removed when the package is uninstalled.

The trailing slashes are optional. However I consider them better: It is clear that it is a directory (and the build fails if it is not a directory).

However, even without the slashes, it contains the entire directory and the content in it.

Comment 10 José Matos 2020-03-21 10:45:34 UTC
Actually I had at the header:

%{pypi_source sphinx_press_theme}

and then later:

Source0:  %{pypi_source}

There is new version with a working pypy_source:

Spec URL: https://jamatos.fedorapeople.org/python-sphinx-press-theme.spec
SRPM URL: https://jamatos.fedorapeople.org/python-sphinx-press-theme-0.5.1-4.fc32.src.rpm

Comment 11 Fabian Affolter 2020-03-21 19:50:23 UTC
(In reply to Miro Hrončok from comment #9)
> However, even without the slashes, it contains the entire directory and the
> content in it.

Looks like that I missed that changes or was mixing up things.

Comment 12 José Matos 2020-03-23 10:16:24 UTC
(In reply to José Matos from comment #10)
>
> Spec URL: https://jamatos.fedorapeople.org/python-sphinx-press-theme.spec
> SRPM URL: https://jamatos.fedorapeople.org/python-sphinx-press-theme-0.5.1-4.fc32.src.rpm

Hi Fabian, is there any issue that you would like to get addressed in the last version?

Comment 13 Fabian Affolter 2020-03-23 13:47:52 UTC
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]: 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 (unspecified)", "Expat License".
     26 files have unknown license. Detailed output of licensecheck in
     /home/fab/Documents/repos/reviews/1815154-python-sphinx-press-
     theme/licensecheck.txt
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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 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).
[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.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %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: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-sphinx-press-theme-0.5.1-4.fc33.noarch.rpm
          python-sphinx-press-theme-0.5.1-4.fc33.src.rpm
2 packages and 0 specfiles checked; 0 errors, 0 warnings.




Rpmlint (installed packages)
----------------------------
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
python3-sphinx-press-theme.noarch: W: invalid-url URL: https://schettino72.github.io/sphinx_press_site/ <urlopen error [Errno -2] Name or service not known>
1 packages and 0 specfiles checked; 0 errors, 1 warnings.



Source checksums
----------------
https://files.pythonhosted.org/packages/source/s/sphinx_press_theme/sphinx_press_theme-0.5.1.tar.gz :
  CHECKSUM(SHA256) this package     : bbb8b52b7c5721114ed230efbd97dbdc78c06097d1f8b16dddc9295d7bd09618
  CHECKSUM(SHA256) upstream package : bbb8b52b7c5721114ed230efbd97dbdc78c06097d1f8b16dddc9295d7bd09618


Requires
--------
python3-sphinx-press-theme (rpmlib, GLIBC filtered):
    python(abi)
    python3.8dist(sphinx)



Provides
--------
python3-sphinx-press-theme:
    python-sphinx-press-theme
    python3-sphinx-press-theme
    python3.8dist(sphinx-press-theme)
    python3dist(sphinx-press-theme)



Generated by fedora-review 0.7.5 (5fa5b7e) last change: 2020-02-16
Command line :/usr/bin/fedora-review -b 1815154
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, Python
Disabled plugins: SugarActivity, PHP, Java, R, Perl, fonts, C/C++, Ocaml, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH


Package APPROVED.

Comment 14 José Matos 2020-03-23 14:17:08 UTC
Thank you for the review. :-)

Comment 15 Gwyn Ciesla 2020-03-23 14:46:34 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-sphinx-press-theme

Comment 16 Fedora Update System 2020-03-23 17:21:31 UTC
FEDORA-2020-92c812f0b5 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-92c812f0b5

Comment 17 Fedora Update System 2020-03-23 17:22:36 UTC
FEDORA-2020-c4844514fd has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-c4844514fd

Comment 18 Fedora Update System 2020-03-24 01:52:23 UTC
FEDORA-2020-92c812f0b5 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-92c812f0b5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-92c812f0b5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2020-03-24 09:41:04 UTC
FEDORA-2020-c4844514fd has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c4844514fd`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c4844514fd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2020-03-24 10:13:13 UTC
FEDORA-2020-4f421b75d0 has been pushed to the Fedora 30 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-4f421b75d0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4f421b75d0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2020-04-01 00:17:21 UTC
FEDORA-2020-92c812f0b5 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2020-04-01 01:55:10 UTC
FEDORA-2020-c4844514fd has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2020-04-01 16:32:19 UTC
FEDORA-2020-92c812f0b5 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.