Bug 2161329

Summary: pypy/pypy3.8: Use %_fortify_level instead of twiddling with RPM_OPT_FLAGS
Product: [Fedora] Fedora Reporter: Siddhesh Poyarekar <sipoyare>
Component: pypy3.8Assignee: Python Maintainers <python-maint>
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mhroncok, python-maint, python-packagers-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: 2023-01-16 16:07:47 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: 2158232    

Description Siddhesh Poyarekar 2023-01-16 15:51:23 UTC
Description of problem:
There is now a canonical way to disable fortification, see "Fortification level" in the build flags guide:

https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/buildflags.md#source-fortification

This way, one doesn't need to mess with RPM_OPT_FLAGS anymore to do this.

For Pypy, it seems like this might be a good opportunity to check if _FORTIFY_SOURCE works OK if that's not already been tested before.  Otherwise, it would be better to use %undefine _fortify_level to get rid of all fortification flags in one swoop.

Comment 1 Miro Hrončok 2023-01-16 16:04:22 UTC
On what Fedora releases is %_fortify_level available?

Comment 2 Miro Hrončok 2023-01-16 16:07:47 UTC
The block of code in spec is unused. it has been removed form pypy3.9+ and will eventually die out when pypy3.8 will be retired once pypy3.10 is introduced.

https://src.fedoraproject.org/rpms/pypy3.9/c/70c239aa7011b7fc5973bd54c8010321515efdaa?branch=rawhide

Comment 3 Miro Hrončok 2023-01-16 16:25:24 UTC
To make your life easier, we can drop the dead code from the spec: https://src.fedoraproject.org/rpms/pypy3.8/pull-request/27

Comment 4 Miro Hrončok 2023-01-16 16:27:40 UTC
And https://src.fedoraproject.org/rpms/pypy/pull-request/35

Comment 5 Siddhesh Poyarekar 2023-01-16 18:26:39 UTC
Thanks, that should do as well.