Bug 1993535

Summary: Review Request: auditwheel - Cross-distribution Linux wheels auditing and relabeling
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: Package ReviewAssignee: Petr Viktorin (pviktori) <pviktori>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: package-review, pviktori
Target Milestone: ---Flags: pviktori: 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: 2021-09-24 20:14:37 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:

Description Miro Hrončok 2021-08-13 18:40:14 UTC
Spec URL: https://churchyard.fedorapeople.org/SRPMS/auditwheel.spec
SRPM URL: https://churchyard.fedorapeople.org/SRPMS/auditwheel-4.0.0-1.fc33.src.rpm

Description:
auditwheel is a command-line tool to facilitate the creation of Python wheel
packages for Linux (containing pre-compiled binary extensions)
that are compatible with a wide variety of Linux distributions,
consistent with the PEP 600 manylinux_x_y, PEP 513 manylinux1,
PEP 571 manylinux2010 and PEP 599 manylinux2014 platform tags.

auditwheel show: shows external shared libraries that the wheel depends on
(beyond the libraries included in the manylinux policies),
and checks the extension modules for the use of versioned symbols that exceed
the manylinux ABI.

auditwheel repair: copies these external shared libraries into the wheel
itself, and automatically modifies the appropriate RPATH entries such that
these libraries will be picked up at runtime.
This accomplishes a similar result as if the libraries had been statically
linked without requiring changes to the build system.
Packagers are advised that bundling,
like static linking, may implicate copyright concerns.

Fedora Account System Username: churchyard

Comment 1 Petr Viktorin (pviktori) 2021-09-01 09:45:02 UTC
Issues
======

The package does not work due to an undeclared dependency on setuptools:

[root@08143f729efc /]# auditwheel 
Traceback (most recent call last):
  File "/usr/bin/auditwheel", line 5, in <module>
    from auditwheel.main import main
  File "/usr/lib/python3.10/site-packages/auditwheel/main.py", line 5, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

See upstream: https://github.com/pypa/auditwheel/pull/307


Suggestions
===========

- Do you want to check the bundled wheel version?
- Should tests be packaged separately?

Comment 2 Miro Hrončok 2021-09-01 09:59:55 UTC
> The package does not work due to an undeclared dependency on setuptools

Fixed by:

# There is an undeclared dependency on setuptools/pkg_resources,
# once https://github.com/pypa/auditwheel/pull/307 is released, this can be removed
grep 'import pkg_resources' auditwheel/main.py  # make sure this is still relevant
echo setuptools >> requirements.txt


> Do you want to check the bundled wheel version?

Done in check via:

# Assert the bundled wheel version
export PYTHONPATH=%{buildroot}%{python3_sitelib}
test "$(%{python3} -c 'from auditwheel._vendor import wheel; print(wheel.__version__)')" == "%{wheel_version}"


> Should tests be packaged separately?

I don't see them packaged:

$ rpm -qlp /var/lib/mock/fedora-rawhide-x86_64/result/auditwheel-4.0.0-1.fc36.noarch.rpm | grep test
(empty)

Comment 3 Petr Viktorin (pviktori) 2021-09-01 11:40:41 UTC
Approved. Thanks fot packaging it!

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

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


===== 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", "MIT License BSD (2 clause)", "*No
     copyright* MIT License", "MIT License". 123 files have unknown
     license.
[-]: 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.
[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 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: 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.
[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.
[?]: Final provides and requires are sane (see attachments).
     (I trust that this is fixed)
[?]: Package functions as described.
     (I trust that this is fixed)
[X]: Latest version is packaged.
[N]: Package does not include license text files separate from upstream.
[N]: 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.
[?]: %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: auditwheel-4.0.0-1.fc36.noarch.rpm
          auditwheel-4.0.0-1.fc36.src.rpm
auditwheel.noarch: W: spelling-error %description -l en_US pre -> per, ore, pee
auditwheel.noarch: W: spelling-error %description -l en_US manylinux -> mandolin
auditwheel.noarch: W: spelling-error %description -l en_US versioned -> version ed, version-ed, version
auditwheel.noarch: W: no-manual-page-for-binary auditwheel
auditwheel.src: W: spelling-error %description -l en_US pre -> per, ore, pee
auditwheel.src: W: spelling-error %description -l en_US manylinux -> mandolin
auditwheel.src: W: spelling-error %description -l en_US versioned -> version ed, version-ed, version
2 packages and 0 specfiles checked; 0 errors, 7 warnings.




Source checksums
----------------
https://files.pythonhosted.org/packages/source/a/auditwheel/auditwheel-4.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : 03a079fe273f42336acdb5953ff5ce7578f93ca6a832b16c835fe337a1e2bd4a
  CHECKSUM(SHA256) upstream package : 03a079fe273f42336acdb5953ff5ce7578f93ca6a832b16c835fe337a1e2bd4a


Requires
--------
auditwheel (rpmlib, GLIBC filtered):
    /usr/bin/python3
    patchelf
    python(abi)
    python3.10dist(pyelftools)



Provides
--------
auditwheel:
    auditwheel
    bundled(python3dist(wheel))
    python3.10dist(auditwheel)
    python3dist(auditwheel)

Comment 4 Miro Hrončok 2021-09-01 12:59:39 UTC
Thanks for the review. Repo requested in https://pagure.io/releng/fedora-scm-requests/issue/36653 and https://pagure.io/releng/fedora-scm-requests/issue/36654

Comment 5 Fedora Update System 2021-09-02 18:57:46 UTC
FEDORA-2021-ad2893566d has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-ad2893566d

Comment 6 Fedora Update System 2021-09-03 15:25:08 UTC
FEDORA-2021-ad2893566d has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-ad2893566d \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-ad2893566d

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

Comment 7 Fedora Update System 2021-09-24 20:14:37 UTC
FEDORA-2021-ad2893566d has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.