From 3d1b5eec37496cd236c5f4d6b191834bece02a90 Mon Sep 17 00:00:00 2001 From: "Ramakrishnan, Ranjith" Date: Thu, 20 Mar 2025 19:13:25 -0700 Subject: [PATCH] [CPack] Prevent the modification of interpreter directives (#278) * SWDEV-521309 - 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 * Correct the cmake format [ROCm/rocprofiler-sdk commit: 0a227e6b9ed897a53d35f0391a2bff8d127d639b] --- .../rocprofiler-sdk/cmake/rocprofiler_config_packaging.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/rocprofiler-sdk/cmake/rocprofiler_config_packaging.cmake b/projects/rocprofiler-sdk/cmake/rocprofiler_config_packaging.cmake index b5a48e32ed..01a62b2475 100644 --- a/projects/rocprofiler-sdk/cmake/rocprofiler_config_packaging.cmake +++ b/projects/rocprofiler-sdk/cmake/rocprofiler_config_packaging.cmake @@ -196,6 +196,9 @@ endif() set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") set(CPACK_RPM_PACKAGE_LICENSE "MIT") +# 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 +set(CPACK_RPM_SPEC_MORE_DEFINE "%undefine __brp_mangle_shebangs") # -------------------------------------------------------------------------------------- # # # Prepare final version for the CPACK use