From 6072326740d16345be3c49ff3ebfa77c2049fcfb Mon Sep 17 00:00:00 2001 From: Ranjith Ramakrishnan Date: Mon, 5 Aug 2024 09:38:04 -0700 Subject: [PATCH] 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: I0803d0a6cc1ddc991e8e9a8e6617436930ef013a [ROCm/rocminfo commit: aa8a83815e235145130270a9b543be7a2c695cef] --- projects/rocminfo/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/rocminfo/CMakeLists.txt b/projects/rocminfo/CMakeLists.txt index ff240bf387..426657d9c8 100755 --- a/projects/rocminfo/CMakeLists.txt +++ b/projects/rocminfo/CMakeLists.txt @@ -247,6 +247,9 @@ endif() if ( ROCM_DEP_ROCMCORE ) string ( APPEND CPACK_RPM_PACKAGE_REQUIRES " rocm-core" ) endif() +# 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") #Set rpm distro if(CPACK_RPM_PACKAGE_RELEASE)