Bug 2168546 - ReviewRequest: python-sphinxygen - A script to read Doxygen XML output and emit ReST for Sphinx
Summary: ReviewRequest: python-sphinxygen - A script to read Doxygen XML output and em...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Maxwell G
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2167178
TreeView+ depends on / blocked
 
Reported: 2023-02-09 11:18 UTC by Benson Muite
Modified: 2023-02-24 13:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-24 13:04:31 UTC
Type: Bug
Embargoed:
maxwell: fedora-review+


Attachments (Terms of Use)

Description Benson Muite 2023-02-09 11:18:32 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/fed500/python-sphinxgen/fedora-rawhide-x86_64/05506790-python-sphinxygen/python-sphinxygen.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/fed500/python-sphinxgen/fedora-rawhide-x86_64/05506790-python-sphinxygen/python-sphinxygen-1.0.0-1.fc38.src.rpm

Description: Sphinxygen is a Python module/script that generates Sphinx markup to describe a C API, from an XML description extracted by Doxygen.

Fedora Account System Username: fed500

This is a documentation generation dependency of the next version of zix.

Comment 1 lichaoran 2023-02-16 06:21:33 UTC
Hi Benson, 
I'd like to take this ticket as my first review package, @Jaku

Comment 2 lichaoran 2023-02-16 06:39:50 UTC
> # All files under ISC, though some tests and
> # unpackaged files are under 0BSD
> License:        ISC

I think the license

Comment 3 lichaoran 2023-02-16 07:06:30 UTC
> I think the license
Sorry for may mistaken type :-

> # All files under ISC, though some tests and
> # unpackaged files are under 0BSD
> License:        ISC

I think the license should also contain 0BSD as the licensecheck says:
                                                                                                                                                                   
BSD 0-Clause License                                                                                                                                                                                                                        
--------------------                                                                                                                                                                                                                        
sphinxygen-v1.0.0/.clang-format                                                                                                                                                                                                             
sphinxygen-v1.0.0/LICENSES/0BSD.txt                                                                                                                                                                                                         
sphinxygen-v1.0.0/test/c/Doxyfile                                                                                                                                                                                                           
sphinxygen-v1.0.0/test/c/conf.py                                                                                                                                                                                                            
                                                                                                                                                                                                                                            
ISC License                                                                                                                                                                                                                                 
-----------                                                                                                                                                                                                                                 
sphinxygen-v1.0.0/doc/sphinxygen.1                                                                                                                                                                                                          
sphinxygen-v1.0.0/src/sphinxygen/sphinxygen.py                                                                                                                                                                                              
sphinxygen-v1.0.0/test/c/include/testlib.h                                                                                                                                                                                                  
sphinxygen-v1.0.0/test/c/index.rst                                                                                                                                                                                                          
sphinxygen-v1.0.0/test/test_sphinxygen.py                                                                                                                                                                                                   
                                                                                                                                                                                                                                            
ISC License BSD 0-Clause License                                                                                                                                                                                                            
--------------------------------                                                                                                                                                                                                            
sphinxygen-v1.0.0/.reuse/dep5                                                                                                                                                                                                               
sphinxygen-v1.0.0/meson.build                                                                                                                                                                                                               
sphinxygen-v1.0.0/pyproject.toml                                                                                                                                                                                                            
                                                                                                                                                                                                                                            
Unknown or generated                                                                                                                                                                                                                        
--------------------                                                                                                                                                                                                                        
sphinxygen-v1.0.0/.pylintrc                                                                                                                                                                                                                 
sphinxygen-v1.0.0/CONTRIBUTING.md                                                                                                                                                                                                           
sphinxygen-v1.0.0/LICENSE                                                                                                                                                                                                                   
sphinxygen-v1.0.0/MANIFEST.in                                                                                                                                                                                                               
sphinxygen-v1.0.0/NEWS                                                                                                                                                                                                                      
sphinxygen-v1.0.0/README.md 

so maybe update the License field to mention both, like this:

   License:        ISC AND 0BSD

Comment 4 lichaoran 2023-02-16 07:31:32 UTC
Some comments:

- python3-sphinxygen.noarch: W: spurious-executable-perm /usr/share/man/man1/sphinxygen.1.gz
- source0 cannot be downloaded, maybe it should be Source0: %{forgeurl}/-/archive/v%{version}/%{srcname}-v%{version}.tar.gz

------

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD 0-Clause License", "Unknown or generated", "ISC License
     BSD 0-Clause License", "ISC License". 6 files have unknown license.
     Detailed output of licensecheck in /root/python-
     sphinxygen/result/python-sphinxygen/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.
[x]: 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.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 2 files.
[x]: Package complies to the Packaging Guidelines
[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                                                                                                                                                               [71/1940]     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]: Reviewer should test that the package builds in mock.
[!]: Sources can be downloaded from URI in Source: tag
     Note: Could not download Source0:
     https://gitlab.com/drobilla/sphinxygen-/archive/v1.0.0/sphinxygen-v1.0.0.tar.gz
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/SourceURL/
[ ]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: Package does not include license text files separate from upstream.
[ ]: SourceX tarball generation or download is documented.
     Note: Package contains tarball without URL, check comments
[ ]: 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.
[ ]: %check is present and all tests pass.
[ ]: Packages should try to preserve timestamps of original installed
     files.
[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]: 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).


Rpmlint
-------
Checking: python3-sphinxygen-1.0.0-1.fc39.noarch.rpm
          python-sphinxygen-1.0.0-1.fc39.src.rpm
========================================================================================================== rpmlint session starts ==========================================================================================================rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmp45eiui7y')]
checks: 31, packages: 2

python3-sphinxygen.noarch: W: spurious-executable-perm /usr/share/man/man1/sphinxygen.1.gz
python3-sphinxygen.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/sphinxygen/sphinxygen.py 644 /usr/bin/env python3
=========================================================================== 2 packages and 0 specfiles checked; 1 errors, 1 warnings, 1 badness; has taken 0.1 s ===========================================================================




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 1

python3-sphinxygen.noarch: W: spurious-executable-perm /usr/share/man/man1/sphinxygen.1.gz
python3-sphinxygen.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/sphinxygen/sphinxygen.py 644 /usr/bin/env python3
 1 packages and 0 specfiles checked; 1 errors, 1 warnings, 1 badness; has taken 0.0 s


Requires
--------
python3-sphinxygen (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)



Provides
--------
python3-sphinxygen:
    python-sphinxygen
    python3-sphinxygen
    python3.11-sphinxygen
    python3.11dist(sphinxygen)
    python3dist(sphinxygen)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review --no-colors --prebuilt --rpm-spec --name python-sphinxygen --mock-config /etc/mock/fedora-rawhide-x86_64.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Python, Shell-api
Disabled plugins: Ocaml, PHP, Perl, R, fonts, SugarActivity, Haskell, C/C++, Java
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 5 Benson Muite 2023-02-16 09:08:26 UTC
Thanks for taking the review.

The licensing is ok, files with 0BSD are not packaged and do not end up in the binary RPM:
https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_field

Will update the file permissions.

Comment 6 Maxwell G 2023-02-16 15:33:01 UTC
Thanks, lichaoran, for preforming an informal review and completing the template. Here are some comments of my own:

> %global         srcname         sphinxygen
This macro is unnecessary and makes the specfile harder to read IMO. I'd use the
literal values, but that's up to you.

> %global         forgeurl        https://gitlab.com/drobilla/sphinxygen
> Version:        1.0.0
> %global         tag             %{version}
> %forgemeta

I'd avoid the forge macros outside of Go and Fonts packaging.
They aren't really maintained anymore.

> Name:           python-%{srcname}

Optionally, remove %{srcname} here.

> URL:            %forgeurl
> # Source from Pypi does not include all test files
> Source0:        %{forgeurl}-/archive/v%{version}/%{srcname}-v%{version}.tar.gz

Optionally, remove %forgeurl here.
Also, you can replace Source0 with Source.
Manually numbering sources is no longer required.


> BuildRequires:  gzip

No need to manually BuildRequire this.

> BuildRequires:  python3dist(setuptools)

This is generated by %pyproject_buildrequires. You should remove it.

> %package -n python3-%{srcname}

Optionally, remove %{srcname}.

> Summary:        %{summary}
> %{?python_provide:%python_provide python3-%{srcname}}

%python_provide is deprecated and unnecessary.
Let the generators handle this.

> %prep
> %autosetup -n %{srcname}-v%{version}

Optionally, remove %{srcname}.

> %build
> %pyproject_wheel
> #compress man page
> gzip doc/%{srcname}.1

Don't compress the manpage manually.

> 
> mkdir -p %{buildroot}%{_mandir}/man1
> install doc/%{srcname}.1.gz %{buildroot}%{_mandir}/man1/

You should preserve mtimes by using `-p`. You could use:

    install -Dpm 0644 doc/sphinxygen.1 -t %{builroot}%{_mandir}/man1/

> %files -n python3-%{srcname} -f %{pyproject_files}
> %doc README.md NEWS
> %{_bindir}/%{srcname}

Optionally, remove %{srcname}.

> %{_mandir}/man1/%{srcname}.1.gz

Replace this with

     %{_mandir}/man1/%{srcname}.1*

Comment 7 Maxwell G 2023-02-16 15:38:33 UTC
> python3-sphinxygen.noarch: E: non-executable-script /usr/lib/python3.11/site-packages/sphinxygen/sphinxygen.py 644 /usr/bin/env python3

You should both remove the executable bit and remove the shebang, it seems.

Comment 9 Maxwell G 2023-02-19 15:32:10 UTC
[fedora-review-service-build]

Comment 10 Maxwell G 2023-02-19 15:41:59 UTC
sed is part of the buildroot, so you don't really need to manually require it. Also, I'd add a comment saying that the license is handled by %pyproject_savefiles.

Anyways:

- License expression is valid and matches the sources.
- License file is included and marked with %license (handled by %pyproject_save_files.)
- License is allowed for Fedora.
- Package complies with the new Python Packaging Guidelines and the general Packaging Guidelines
- No relevant rpmlint errors
- No bundled content
- Package builds in mock
- Unit tests are run in %check

Package approved. Thanks to lichaoran for preforming the initial review.

Comment 11 Fedora Admin user for bugzilla script actions 2023-02-19 17:13:47 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-sphinxygen

Comment 12 Benson Muite 2023-02-19 17:19:34 UTC
Thanks for the review.


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