Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2209022 - setroubleshoot fails to build with pip 23.1.2
Summary: setroubleshoot fails to build with pip 23.1.2
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL: https://copr.fedorainfracloud.org/cop...
Whiteboard:
Depends On:
Blocks: F39FTBFS F40FTBFS 2186979
TreeView+ depends on / blocked
 
Reported: 2023-05-22 10:17 UTC by Miro Hrončok
Modified: 2024-01-02 14:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-01-02 14:21:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2023-05-22 10:17:33 UTC
When checking the impact of upgradign pip from 23.0.1 to 23.1.2 in https://src.fedoraproject.org/rpms/python-pip/pull-request/123 I realized setroubleshoot repeatedly fails with the new pip but succeeds with the old one.

The error is:

/usr/bin/python3 -m pip install `test -n "/builddir/build/BUILDROOT/setroubleshoot-3.3.32-2.fc39.x86_64" && echo --root /builddir/build/BUILDROOT/setroubleshoot-3.3.32-2.fc39.x86_64` \
`test -n "/usr" && echo --prefix /usr` .
Processing /builddir/build/BUILD/setroubleshoot-3.3.32/src
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f577dc891d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f577de00a90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f577f7fcd90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f577de69450>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f577de68710>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/
      ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
      ERROR: No matching distribution found for setuptools>=40.8.0
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
make[5]: Leaving directory '/builddir/build/BUILD/setroubleshoot-3.3.32/src'
make[5]: *** [Makefile:1076: install-exec-hook] Error 1
make[4]: *** [Makefile:975: install-exec-am] Error 2
make[4]: Leaving directory '/builddir/build/BUILD/setroubleshoot-3.3.32/src'
make[3]: *** [Makefile:912: install-am] Error 2
make[3]: Leaving directory '/builddir/build/BUILD/setroubleshoot-3.3.32/src'
make[2]: *** [Makefile:905: install] Error 2
make[2]: Leaving directory '/builddir/build/BUILD/setroubleshoot-3.3.32/src'
make[1]: Leaving directory '/builddir/build/BUILD/setroubleshoot-3.3.32'
make[1]: *** [Makefile:755: install-recursive] Error 1
make: *** [Makefile:1060: install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.iyHcEF (%install)


I believe pip defaults to isolated builds now and will always attempt to install build dependencies (setuptools>=40.8.0 in this case because that I the default when no build dependencies are mentioned in pyproject.toml) from the internet to a temporary virtual environment.

I think this can be fixed by adding --no-build-isolation to pip install:

$ pip install --help | grep isolation
  --no-build-isolation        Disable isolation when building a modern source

Reproducible: Always

Steps to Reproduce:
Build setroubleshoot e.g. in https://copr.fedorainfracloud.org/coprs/churchyard/pip-23.1.2
Actual Results:  
Build fails.

Expected Results:  
Build succeeds.

All logs available at https://copr.fedorainfracloud.org/coprs/churchyard/pip-23.1.2/package/setroubleshoot/

Comment 2 Fedora Release Engineering 2023-08-16 07:14:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


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