From 0d7160da9aaa21982d625d2ae607642347a327a9 Mon Sep 17 00:00:00 2001 From: "Ramakrishnan, Ranjith" Date: Wed, 18 Jun 2025 09:27:05 -0700 Subject: [PATCH] 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 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8a695845f..8fab34d722 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -263,6 +263,9 @@ if ( PROC_RESULT EQUAL "0" AND NOT EVAL_RESULT STREQUAL "" ) endif() message(STATUS "Using CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}") set ( CPACK_RPM_FILE_NAME "RPM-DEFAULT" ) +# #!/usr/bin/env is converted to /usr/libexec/platform-python in some OS like RHEL +# Prevent the modification of python interpreter directives in runpath_to_rpath.py +set( CPACK_RPM_SPEC_MORE_DEFINE "\n%undefine __brp_mangle_shebangs") # Debian Lintian Fix - Add Dependency for Python Script delivered set( DEB_DEPENDS_STRING "python3, libc6 (>= 2.34)" )