From 1b828b735ba98acccb95f907a416fbd86232d0fe Mon Sep 17 00:00:00 2001 From: Ranjith Ramakrishnan Date: Mon, 5 Aug 2024 09:49:19 -0700 Subject: [PATCH] SWDEV-476075 - 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: Id285e2cea1de583853cec17eccf0a3a794cca643 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b6b7c48d2..3ad742534e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -343,6 +343,9 @@ if(CPACK_RPM_PACKAGE_RELEASE) set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) 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") # The line below doesn't currently work; it may be this issue: # https://bugzilla.redhat.com/show_bug.cgi?id=1811358