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 1976656

Summary: pypy and pypy3 FTBFS with RPM 4.17+: /usr/lib/rpm/brp-python-bytecompile no longer exists
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: pypyAssignee: Tomáš Hrnčiar <thrnciar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhroncok, python-maint, python-sig, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-22 19:27:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1927309    

Description Miro Hrončok 2021-06-27 22:14:23 UTC
Up until RPM 4.17, RPM shipped /usr/lib/rpm/brp-python-bytecompile.

In Fedora, we use /usr/lib/rpm/redhat/brp-python-bytecompile as the buildroot policy, so packages are not broken by the removal, but pypy and pypy3 use the old path directly (it is hardcoded in the specfile):

  /usr/lib/rpm/brp-python-bytecompile \
    %{buildroot}%{pypyprefix}/bin/%{name} \
    0

We should switch to %py_byte_compile instead, as our brp-python-bytecompile does not support the use case since https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3


Also note that pypy uses a very old-fashioned snippet to disable the actual buidlroot policy script:

	
  %global __os_install_post \
     %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')


And pypy3 uses a more modern way, but it shouldn't be required since https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2

Comment 1 Fedora Release Engineering 2021-07-11 04:23:06 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 35.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-08-22).

A week before the mass branching of Fedora 36 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 34 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-36/f-36-key-tasks.html

Comment 2 Miro Hrončok 2021-07-22 19:27:04 UTC
Fix pushed to git, will let the mass rebuild handle the builds.

Comment 3 Fedora Update System 2022-02-23 03:30:01 UTC
FEDORA-2022-94a79eab1a has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-94a79eab1a

Comment 4 Fedora Update System 2022-02-23 03:33:29 UTC
FEDORA-2022-94a79eab1a has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.