SWDEV-476075 - Prevent the modification of interpreter directives

CPACK is converting /usr/bin/env python3 to /usr/libexec/platform-python in RHEL8.
Undefining __brp_mangle_shebangs will prevent the same

Change-Id: I5120274b90aeaf783b62414ac2aeba9e84029205


[ROCm/amdsmi commit: 92a4093256]
这个提交包含在:
Ranjith Ramakrishnan 编写, Maisam Arif 于 2024-08-08 02:04:37 -04:00 提交
1 父节点 7130dc9f04
当前提交 0cd04cdefb
1 个文件已更改
+3
+3
查看文件
@@ -286,6 +286,9 @@ set(CPACK_RPM_ASAN_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES})
# don't terminate if bytecompile of python files fails
set(CPACK_RPM_SPEC_MORE_DEFINE "%define _python_bytecompile_errors_terminate_build 0")
# Cpack converts !/usr/bin/env python3 to /usr/libexec/platform-python in RHEL8.
# prevent the BRP(buildroot policy) script from checking and modifying interpreter directives
string( APPEND CPACK_RPM_SPEC_MORE_DEFINE "\n%undefine __brp_mangle_shebangs")
# Add rocm-core dependency if -DROCM_DEP_ROCMCORE=ON is passed
if(ROCM_DEP_ROCMCORE)