Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920763 - dev-python/pychroot-0.10.4 fails to compile (GCC-14-SYSTEM): ImportError: cannot import name distutils_extensions from snakeoil.dist __init__.py)
Summary: dev-python/pychroot-0.10.4 fails to compile (GCC-14-SYSTEM): ImportError: can...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2023-12-27 08:49 UTC by Agostino Sarubbo
Modified: 2024-02-02 16:39 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,43.01 KB, text/plain)
2023-12-27 08:49 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-12-27 08:49:52 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/pychroot-0.10.4 fails to compile (GCC-14-SYSTEM).
Discovered on: amd64 (internal ref: gcc14_tinderbox)

NOTE:
(GCC-14-SYSTEM) in the summary means that the bug was found on a machine that runs gcc-14 but this bug MAY or MAY NOT BE related to the new compiler
Comment 1 Agostino Sarubbo gentoo-dev 2023-12-27 08:49:54 UTC
Created attachment 880373 [details]
build.log

build log and emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2023-12-27 16:45:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c9b208802de168048568f1725d3f4a2cc7b9f62

commit 3c9b208802de168048568f1725d3f4a2cc7b9f62
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2023-12-27 16:44:36 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2023-12-27 16:44:36 +0000

    package.mask: Last rite dev-python/pychroot
    
    Bug: https://bugs.gentoo.org/920763
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 profiles/package.mask | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 3 John L. Poole 2024-01-18 04:08:55 UTC
I'm using on an AMD64:

   gcc (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826

and dev-python/pychroot, both 0.10.4 & 9999 failed to build.

>>> Compiling source in /var/tmp/portage/dev-python/pychroot-0.10.4/work/pychroot-0.10.4 ...
* python3_11: running distutils-r1_run_phase distutils-r1_python_compile
python3.11 setup.py build -j 8
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/pychroot-0.10.4/work/pychroot-0.10.4/setup.py", line 5, in <module>
from snakeoil.dist import distutils_extensions as pkgdist
ImportError: cannot import name 'distutils_extensions' from 'snakeoil.dist' (/usr/lib/python3.11/site-packages/snakeoil/dist/__init__.py)
* ERROR: dev-python/pychroot-0.10.4::gentoo failed (compile phase):
*   (no error message)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-18 04:10:26 UTC
Yes, it's known broken and being last rited as it's archived upstream.
Comment 5 John L. Poole 2024-01-18 04:12:37 UTC
Any suggestions for alternatives that chroot like pychroot for an OpenRC system?
Comment 6 John L. Poole 2024-01-18 04:19:36 UTC
The most recent fork of the project is 7 years old.  No hope in Fork Land.
Comment 7 John L. Poole 2024-01-18 05:09:25 UTC
I've been looking into why this package is broken.  I'm including what I found here in case someone else wants to follow the path I'm taking. The GenPi64 project (conceived by Sakaki) relies on chrooting on an openRC system, the Systemd version relies on an alternative: systemd-nspawn. 

The error dev-python/pychroot commits is:

    cannot import name 'distutils_extensions' from 'snakeoil.dist' 

pychroot relies on snakeoil.  Snakeoil, in turn, had the distutils in snakeoil.dist.distutils_extensions.  Important notes from the snakeoil news log documenting the decision to drop distutils which, in turn, has not broken the frozen dev-python/pychroot.

nakeoil/NEWS.rst:8:- remove deprecated ``distutils_extensions`` (Arthur Zamarin, #77)
snakeoil/NEWS.rst:29:- dist.sphinxext: mark ``distutils_extensions`` as deprecated. This module will
snakeoil/NEWS.rst:78:- ``dist.distutils_extensions`` is now **deprecated**, and will be removed in
snakeoil/NEWS.rst:104:- distutils_extensions: fix pip detection for editable installs (Arthur
snakeoil/NEWS.rst:121:- Fix distutils extension compatibility with setuptools. (Sam James, Arthur
snakeoil/NEWS.rst:130:- Fix distutils extension compatibility with setuptools 60.
snakeoil/NEWS.rst:149:- snakeoil.dist.distutils_extensions: Migrate to using distutils bundled with
snakeoil/NEWS.rst:150:  setuptools since distutils is now deprecated in py3.10 and will be removed in

So, what is happening here is that pychroot relied on snakeoil's distribution utilities which, in turn, relied on a package that was being deprecated in Python 3.10.  This looks to be all about *distribution* of the package and does not touch upon the ability of the pychroot scripts to do what they do best: change root.  The demise of pychroot is not due to bugs within its scripts, at least for purposes of its package in Gentoo.  Instead the fact that the package distribution relies on deprecated maintenance scripts *AND* the author has effectively abandoned this project by freezing it qualifies it for removal from Gentoo.

I suppose one might take the pychroot scripts and integrate them into one's own environment manually.  This will probably be the option I'll pursue.
Comment 8 John L. Poole 2024-01-18 05:22:53 UTC
On further thought, the problem is that snakeoil in December 2023 removed distutils_extensions.  Perhaps if I pull in an earlier version of snakeoil, the distutils_extensions will be present allow pychroot to install.  A window of opportunity.  With pychroot consigned for removal from Gentoo however, this approach will not be helpful after February, 2024.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-18 05:29:05 UTC
You would indeed be better off forking it then porting it to meson or filt or something.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-18 05:29:36 UTC
As for alternatives:
* sys-apps/arch-chroot
* dev-util/chroot-wrapper
* dev-util/schroot
at least..
Comment 11 John L. Poole 2024-01-18 16:26:35 UTC
I determined that snakeoil dropped the distribution package in December 2023, so I tried installing the earlier version of snakeoil which, in turn, brought with it the distribution_utilities package using this command:

     emerge =dev-python/snakeoil-0.10.5

Thereafter, pychroot installed.  A last glimmer of light before pychroot is banished.

Sam, thank you for the suggestions.
Comment 12 Larry the Git Cow gentoo-dev 2024-02-02 16:39:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d1b9dc770bb50443c8974f6680cf06118bfd238

commit 3d1b9dc770bb50443c8974f6680cf06118bfd238
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-02-02 16:35:27 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-02-02 16:38:56 +0000

    dev-python/pychroot: Remove last-rited pkg
    
    Closes: https://bugs.gentoo.org/920763
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pychroot/Manifest               |  1 -
 dev-python/pychroot/metadata.xml           |  9 ------
 dev-python/pychroot/pychroot-0.10.4.ebuild | 45 ------------------------------
 dev-python/pychroot/pychroot-9999.ebuild   | 45 ------------------------------
 profiles/package.mask                      |  6 ----
 5 files changed, 106 deletions(-)