Bug 2133438 - Review Request: python-scikit-misc - Miscellaneous tools for data analysis and scientific computing
Summary: Review Request: python-scikit-misc - Miscellaneous tools for data analysis an...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-neuro, NeuroFedora 2133439
TreeView+ depends on / blocked
 
Reported: 2022-10-10 12:15 UTC by Sandro
Modified: 2022-10-21 16:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-21 16:27:17 UTC
Type: Bug
Embargoed:
manisandro: fedora-review+


Attachments (Terms of Use)

Comment 1 Ben Beasley 2022-10-11 14:15:26 UTC
The following is a little messy, but seems to work.

>   mkdir empty
>   pushd empty
>   ln -s ../pytest.ini ../tox.ini %{buildroot}/%{python3_sitearch}/skmisc/ ./
>   %{pytest}
>   popd

The tests do fail with

> ______________ ERROR collecting skmisc/loess/tests/test_loess.py _______________
> ImportError while importing test module '/builddir/build/BUILD/scikit-misc-0.1.4/empty/skmisc/loess/tests/test_loess.py'.
> Hint: make sure your test modules/packages have valid Python names.
> Traceback:
> /usr/lib64/python3.11/importlib/__init__.py:126: in import_module
>     return _bootstrap._gcd_import(name[level:], package, level)
> skmisc/loess/__init__.py:51: in <module>
>     from ._loess import (loess, loess_model, loess_inputs, loess_control,
> E   ImportError: /builddir/build/BUILD/scikit-misc-0.1.4/empty/skmisc/loess/_loess.cpython-311-x86_64-linux-gnu.so: undefined symbol: drot_

but this seems to be a real linking issue, and can be reproduced without running the tests by removing the “-t” from %pyproject_check_imports (which I think you should do, because the only reason for adding it seems to be to mask the import error).

Note that “drot_” is a BLAS function, and you will need to meddle with the BLAS linking anyway in order to use FlexiBLAS instead of using OpenBLAS directly: https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager

That’s as much investigation as I had time for at the moment!

Comment 2 Sandro 2022-10-13 21:28:19 UTC
(In reply to Ben Beasley from comment #1)
> The following is a little messy, but seems to work.

If it works, it works. ;) Will use it as suggested and move on to solving the linking issue.

> The tests do fail with
> 
> > ______________ ERROR collecting skmisc/loess/tests/test_loess.py _______________
> > ImportError while importing test module '/builddir/build/BUILD/scikit-misc-0.1.4/empty/skmisc/loess/tests/test_loess.py'.
> > Hint: make sure your test modules/packages have valid Python names.
> > Traceback:
> > /usr/lib64/python3.11/importlib/__init__.py:126: in import_module
> >     return _bootstrap._gcd_import(name[level:], package, level)
> > skmisc/loess/__init__.py:51: in <module>
> >     from ._loess import (loess, loess_model, loess_inputs, loess_control,
> > E   ImportError: /builddir/build/BUILD/scikit-misc-0.1.4/empty/skmisc/loess/_loess.cpython-311-x86_64-linux-gnu.so: undefined symbol: drot_
> 
> but this seems to be a real linking issue, and can be reproduced without
> running the tests by removing the “-t” from %pyproject_check_imports (which
> I think you should do, because the only reason for adding it seems to be to
> mask the import error).

You are kind of right. I wanted to get this build, so I could move on. The intention has always been to get the tests working to the extend possible.

> Note that “drot_” is a BLAS function, and you will need to meddle with the
> BLAS linking anyway in order to use FlexiBLAS instead of using OpenBLAS
> directly:
> https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
> 
> That’s as much investigation as I had time for at the moment!

Thanks for your expertise. Looks like I've signed up for some real science...

Comment 3 Sandro 2022-10-14 22:17:35 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/gui1ty/neuro-sig/fedora-rawhide-x86_64/04944130-python-scikit-misc/python-scikit-misc.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/gui1ty/neuro-sig/fedora-rawhide-x86_64/04944130-python-scikit-misc/python-scikit-misc-0.1.4-7.20220927gitv0.1.4.fc38.src.rpm

(In reply to Sandro from comment #2)
> (In reply to Ben Beasley from comment #1)
> > 
> > That’s as much investigation as I had time for at the moment!
> 
> Thanks for your expertise. Looks like I've signed up for some real science...

I guess the ways in science are paved with human error as is the way of this package. With the help of upstream it finally dawned on me: OpenBLAS != FlexiBLAS.

The tests now succeed.

Comment 4 Sandro Mani 2022-10-20 15:18:58 UTC
Taking this

Comment 5 Sandro Mani 2022-10-21 10:54:47 UTC
Full review below:

Some minor issues:
[!]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
=> Document breakdown

[!]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define autorelease(e:s:pb:n)
     %{?-p:0.}%{lua:
=> Not sure whether %global can be used here, in case add a justification comment for %define


Approved, but please address these issues before importing.

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

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


===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[-]: Development (unversioned) .so files in -devel subpackage, if present.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[-]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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.
[x]: License file installed when any subpackage combination is installed.
[!]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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]: 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]: 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.
[-]: 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).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-scikit-misc
[?]: 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.
[x]: 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.
[!]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define autorelease(e:s:pb:n)
     %{?-p:0.}%{lua:
[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.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-scikit-misc-0.1.4-7.20220927gitv0.1.4.fc38.x86_64.rpm
          python-scikit-misc-debugsource-0.1.4-7.20220927gitv0.1.4.fc38.x86_64.rpm
          python-scikit-misc-0.1.4-7.20220927gitv0.1.4.fc38.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/tmpixorij6v')]
checks: 31, packages: 3

============================================================================ 3 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 1.7 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: 2

 2 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.1 s 



Unversioned so-files
--------------------
python3-scikit-misc: /usr/lib64/python3.11/site-packages/skmisc/loess/_loess.cpython-311-x86_64-linux-gnu.so

Source checksums
----------------
https://github.com/has2k1/scikit-misc/archive/v0.1.4/scikit-misc-0.1.4.tar.gz :
  CHECKSUM(SHA256) this package     : 4fbc48e2f1e7dd614967234fe927a68a229458c8d198c93c9226c36edfa12199
  CHECKSUM(SHA256) upstream package : 4fbc48e2f1e7dd614967234fe927a68a229458c8d198c93c9226c36edfa12199


Requires
--------
python3-scikit-misc (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libflexiblas.so.3()(64bit)
    python(abi)
    python3.11dist(numpy)
    rtld(GNU_HASH)

python-scikit-misc-debugsource (rpmlib, GLIBC filtered):



Provides
--------
python3-scikit-misc:
    python-scikit-misc
    python3-scikit-misc
    python3-scikit-misc(x86-64)
    python3.11-scikit-misc
    python3.11dist(scikit-misc)
    python3dist(scikit-misc)

python-scikit-misc-debugsource:
    python-scikit-misc-debugsource
    python-scikit-misc-debugsource(x86-64)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2133438
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, C/C++, Generic, Shell-api
Disabled plugins: Ocaml, Perl, Haskell, fonts, PHP, Java, R, SugarActivity
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 6 Sandro 2022-10-21 15:37:27 UTC
I just checked the RPMs with rpmlint:

python3-scikit-misc-debuginfo.x86_64: E: shared-library-without-dependency-information /usr/lib/debug/usr/lib64/python3.11/site-packages/skmisc/loess/_loess.cpython-311-x86_64-linux-gnu.so-0.1.4-1.20220927gitv0.1.4.fc38.x86_64.debug

Also:

python3-scikit-misc-debuginfo.x86_64: W: unstripped-binary-or-object /usr/lib/debug/usr/lib64/python3.11/site-packages/skmisc/loess/_loess.cpython-311-x86_64-linux-gnu.so-0.1.4-1.20220927gitv0.1.4.fc38.x86_64.debug
python3-scikit-misc-debuginfo.x86_64: W: dangling-relative-symlink /usr/lib/debug/.build-id/97/1a434e83960233a3a83f1a978d55eff094419f ../../../.build-id/97/1a434e83960233a3a83f1a978d55eff094419f

Do I need to take any action on these (especially the error)?

Comment 7 Sandro Mani 2022-10-21 15:39:20 UTC
No I believe these are false positives for debug symbols.

Comment 8 Gwyn Ciesla 2022-10-21 15:46:04 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-scikit-misc

Comment 9 Fedora Update System 2022-10-21 16:24:15 UTC
FEDORA-2022-e5c608611a has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e5c608611a

Comment 10 Fedora Update System 2022-10-21 16:27:17 UTC
FEDORA-2022-e5c608611a has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


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