Skip to content

Commit 311f83e

Browse files
authored
SWDEV-504756 - Prevent the modification of python interpreter directives (#27)
"/usr/bin/env python3" is getting converted to "/usr/libexec/platform-python" in RHEL8. Undefining __brp_mangle_shebangs will prevent the same [ROCm/rocm-core commit: 0d7160d]
1 parent 701bbf5 commit 311f83e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

projects/rocm-core/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ if ( PROC_RESULT EQUAL "0" AND NOT EVAL_RESULT STREQUAL "" )
263263
endif()
264264
message(STATUS "Using CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}")
265265
set ( CPACK_RPM_FILE_NAME "RPM-DEFAULT" )
266+
# #!/usr/bin/env is converted to /usr/libexec/platform-python in some OS like RHEL
267+
# Prevent the modification of python interpreter directives in runpath_to_rpath.py
268+
set( CPACK_RPM_SPEC_MORE_DEFINE "\n%undefine __brp_mangle_shebangs")
266269
267270
# Debian Lintian Fix - Add Dependency for Python Script delivered
268271
set( DEB_DEPENDS_STRING "python3, libc6 (>= 2.34)" )

0 commit comments

Comments
 (0)