From 9df2622650ccb3beb101c5be35300169e993a2e6 Mon Sep 17 00:00:00 2001 From: David Galiffi Date: Fri, 2 Aug 2024 13:51:51 -0400 Subject: [PATCH] Disable the RPM mangling of shebangs. The are changing the `#!/usr/bin/python3` to `#!/usr/libexec/platform-python`. With this set, omniperf is always using the platform installed version of python, which is python 3.6 on RHEL 8. Using virtual environments, like conda, did not work. Signed-off-by: David Galiffi --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a1632a11..786fd092c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -401,6 +401,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Omniperf: tool for GPU performance profil set(CPACK_RPM_PACKAGE_DESCRIPTION "Omniperf is a performance analysis tool for profiling machine learning/HPC workloads running on AMD GPUs.") set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") +set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) # Package versioning set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) @@ -416,6 +417,8 @@ set(CPACK_RPM_PACKAGE_PROVIDES "${CPACK_PACKAGE_NAME}") set(CPACK_RPM_COMPONENT_INSTALL ON) set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") +set(CPACK_RPM_SPEC_MORE_DEFINE "%undefine __brp_mangle_shebangs") + if(DEFINED CPACK_PACKAGING_INSTALL_PREFIX) set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX}")