Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#80296 - [singularity] installs a "utils" subdirectory in /usr/lib/python3.11/site-packages

Attached to Project: Arch Linux
Opened by Evert Vorster (evorster) - Monday, 20 November 2023, 07:01 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Saturday, 25 November 2023, 05:43 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
This package installs a "utils" subdirectory in /usr/lib/python3.11/site-packages

As this is a fairly common name for a subdirectory, python then gets confused when it looks for a 'utils' directory further along its path statement because /usr/lib/python3.11/site-packages is included in the default path statement of python.

In short, let's not put a 'utils' subdirectory in the python path, because a lot of packages use that name because it is so generic and causes problems for everybody that uses a utils subdirectory in their own code.

Additional info:
* package version(s) 1.00-6
* config and/or log files etc.
* link to upstream bug report: https://github.com/singularity/singularity/issues/335

This issue has had be banging my head on a desk for a couple of days because for some reason the package that I was trying to build was not finding a file in its own 'utils' subdirectory, and eventually I figured out why. So,for now at least, singularity conflicts with audacity-local-git

This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Saturday, 25 November 2023, 05:43 GMT
Reason for closing:  Fixed
Comment by loqs (loqs) - Monday, 20 November 2023, 14:02 GMT
Have you tried replacing find_packages() with find_packages(exclude=['utils']) in setup.py [1]?

sed -i "s/find_packages()/find_packages(exclude=['utils'])/" setup.py

[1]: https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#custom-discovery
Comment by Evert Vorster (evorster) - Monday, 20 November 2023, 17:43 GMT
I am unable to build this PKGBUILD, as I am not the owner, and it's in extra.
We'll just have to wait for the package maintainer to get around to this one. It's not super serious, but the software author said that this utils directory should not be installed.
Comment by Evert Vorster (evorster) - Monday, 20 November 2023, 17:49 GMT
I've suggested your fix upstream, let's see what they get back with.
Comment by loqs (loqs) - Monday, 20 November 2023, 17:50 GMT
> I am unable to build this PKGBUILD, as I am not the owner, and it's in extra.
You can obtain the PKGBUILD using [1] apply the change then build the package [2]:

$ pkgctl repo clone --protocol=https singularity # obtain PKGBUILD
$ cd singularity/
$ curl -o PKGBUILD.diff http://ix.io/4M0a # obtain patch
$ git apply -v PKGBUILD.diff # apply patch
$ pkgctl build # build package
# pacman -U singularity-1.00-6.1-any.pkg.tar.zst # install generated package

[1]: https://wiki.archlinux.org/title/Arch_build_system#Using_the_pkgctl_tool
[2]: https://wiki.archlinux.org/title/Makepkg#Usage
Comment by Evert Vorster (evorster) - Tuesday, 21 November 2023, 07:31 GMT
Thanks for those instructions, but it still fails for me:
```
==> Verifying source file signatures with gpg...
singularity-1.00.tar.gz ... FAILED (unknown public key A65B78DBE67C7AAC)
==> ERROR: One or more PGP signatures could not be verified!
```
Comment by Evert Vorster (evorster) - Tuesday, 21 November 2023, 07:39 GMT
Nevermind, Google was my friend in this one, and I managed to get the package to build.
I can confirm that the utils is properly removed with this build:
```
-> Checking packages
usr/lib/python3.11/site-packages/utils/ <
usr/lib/python3.11/site-packages/utils/__init__.py <
usr/lib/python3.11/site-packages/utils/__pycache__/ <
usr/lib/python3.11/site-packages/utils/__pycache__/__init__.c <
usr/lib/python3.11/site-packages/utils/__pycache__/__init__.c <
usr/lib/python3.11/site-packages/utils/__pycache__/data-trans <
usr/lib/python3.11/site-packages/utils/__pycache__/data-trans <
usr/lib/python3.11/site-packages/utils/__pycache__/maketree.c <
usr/lib/python3.11/site-packages/utils/__pycache__/maketree.c <
usr/lib/python3.11/site-packages/utils/data-translations.py <
usr/lib/python3.11/site-packages/utils/maketree.py <
==> No soname differences for singularity.
```
Comment by Toolybird (Toolybird) - Friday, 24 November 2023, 21:13 GMT
Fix committed upstream [1]. Backport or wait for next release? PM to decide.

[1] https://github.com/singularity/singularity/commit/05a3b9199120fdea8d7bcee3752c3eb0ef764742

Loading...