From 3e040d907c92fe1fc2af716b84931616e0c0b671 Mon Sep 17 00:00:00 2001 From: "Choudhary, Rahul" Date: Tue, 18 Feb 2025 16:47:05 -0800 Subject: [PATCH 01/23] Create rocm_ci_caller.yml and kws-caller.yml to trigger ROCM CI --- .github/workflows/rocm_ci_caller.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/rocm_ci_caller.yml diff --git a/.github/workflows/rocm_ci_caller.yml b/.github/workflows/rocm_ci_caller.yml new file mode 100644 index 0000000000..3e9f04a3da --- /dev/null +++ b/.github/workflows/rocm_ci_caller.yml @@ -0,0 +1,25 @@ +name: ROCm CI Caller +on: + # Commenting below to avoid re-runs of amd smi for trivial rebases + pull_request: + branches: [amd-mainline] + types: [opened, reopened, synchronize] + push: + branches: [amd-mainline] + workflow_dispatch: + issue_comment: + types: [created] + +jobs: + call-workflow: + if: ${{ github.event_name != 'issue_comment' || github.event.comment.body == '!verify' }} + uses: AMD-ROCm-Internal/rocm_ci_infra/.github/workflows/rocm_ci.yml@mainline + secrets: inherit + with: + input_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + input_pr_num: ${{ github.event_name == 'pull_request' && github.event.pull_request.number || 0 }} + input_pr_url: ${{ github.event_name == 'pull_request' && github.event.pull_request.html_url || '' }} + input_pr_title: ${{ github.event_name == 'pull_request' && github.event.pull_request.title || '' }} + repository_name: ${{ github.repository }} + base_ref: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref }} + trigger_event_type: ${{ github.event_name }} From 6e83dde455adbf10e2c5d8fcc3a80498f78eee82 Mon Sep 17 00:00:00 2001 From: "Choudhary, Rahul" Date: Tue, 18 Feb 2025 16:48:30 -0800 Subject: [PATCH 02/23] Create kws-caller.yml --- .github/workflows/kws-caller.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/kws-caller.yml diff --git a/.github/workflows/kws-caller.yml b/.github/workflows/kws-caller.yml new file mode 100644 index 0000000000..ffcbff7b1e --- /dev/null +++ b/.github/workflows/kws-caller.yml @@ -0,0 +1,15 @@ +name: Rocm Validation Suite KWS +on: + push: + branches: [amd-staging] + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: +jobs: + kws: + if: ${{ github.event_name == 'pull_request' }} + uses: AMD-ROCm-Internal/rocm_ci_infra/.github/workflows/kws.yml@mainline + secrets: inherit + with: + pr_number: ${{github.event.pull_request.number}} + base_branch: ${{github.base_ref}} From 5da6a07d56567a16c861b719b8c6a5862fbb0e95 Mon Sep 17 00:00:00 2001 From: "Mallya, Ameya Keshava" Date: Fri, 28 Mar 2025 08:38:44 -0700 Subject: [PATCH 03/23] Added KWS check for amd-mainline --- .github/workflows/kws-caller.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kws-caller.yml b/.github/workflows/kws-caller.yml index ffcbff7b1e..c0f4f26807 100644 --- a/.github/workflows/kws-caller.yml +++ b/.github/workflows/kws-caller.yml @@ -1,7 +1,7 @@ name: Rocm Validation Suite KWS on: push: - branches: [amd-staging] + branches: [amd-staging, amd-mainline] pull_request: types: [opened, synchronize, reopened] workflow_dispatch: From ab95ccf1a3e2c9514570da3e222c39f2f2bae7d2 Mon Sep 17 00:00:00 2001 From: Jonathan Luu Date: Tue, 1 Apr 2025 16:46:04 -0400 Subject: [PATCH 04/23] SWDEV-521313 - Streamline Version Management: Retain Only version-rocm File --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd268cda4c..743341100b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,9 +138,9 @@ endif() #Add the libpatch version if available to the version file if( DEFINED VERSION_POINT ) - file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_POINT}-${BUILD_ID}\n" ) + file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_POINT}\n" ) else() - file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${BUILD_ID}\n" ) + file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}\n" ) endif() ## Support for Static and Shared Target Packaging From 39bd62e592e1591176c2c343d2433e99e29fbc2e Mon Sep 17 00:00:00 2001 From: "Cheruvally, Aravindan" Date: Thu, 3 Apr 2025 11:46:00 -0400 Subject: [PATCH 05/23] =?UTF-8?q?Revert=20"SWDEV-521313=20-=20Streamline?= =?UTF-8?q?=20Version=20Management:=20Retain=20Only=20version-roc=E2=80=A6?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 743341100b..fd268cda4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,9 +138,9 @@ endif() #Add the libpatch version if available to the version file if( DEFINED VERSION_POINT ) - file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_POINT}\n" ) + file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_POINT}-${BUILD_ID}\n" ) else() - file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}\n" ) + file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${BUILD_ID}\n" ) endif() ## Support for Static and Shared Target Packaging From bb4889b7877dd4abe0164e733bc6fdcc19eb44cf Mon Sep 17 00:00:00 2001 From: "Choudhary, Rahul" Date: Fri, 4 Apr 2025 11:18:48 -0700 Subject: [PATCH 06/23] Update rocm_ci_caller.yml enabling !verify and re-test trigger --- .github/workflows/rocm_ci_caller.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rocm_ci_caller.yml b/.github/workflows/rocm_ci_caller.yml index 3e9f04a3da..15981c8b59 100644 --- a/.github/workflows/rocm_ci_caller.yml +++ b/.github/workflows/rocm_ci_caller.yml @@ -2,7 +2,7 @@ name: ROCm CI Caller on: # Commenting below to avoid re-runs of amd smi for trivial rebases pull_request: - branches: [amd-mainline] + branches: [release/rocm-rel-*, amd-mainline] types: [opened, reopened, synchronize] push: branches: [amd-mainline] @@ -11,15 +11,16 @@ on: types: [created] jobs: - call-workflow: - if: ${{ github.event_name != 'issue_comment' || github.event.comment.body == '!verify' }} - uses: AMD-ROCm-Internal/rocm_ci_infra/.github/workflows/rocm_ci.yml@mainline + call-workflow: + if: github.event_name != 'issue_comment' ||(github.event_name == 'issue_comment' && github.event.issue.pull_request && (startsWith(github.event.comment.body, '!verify') || startsWith(github.event.comment.body, '!verify release') || startsWith(github.event.comment.body, '!verify retest'))) + uses: AMD-ROCm-Internal/rocm_ci_infra/.github/workflows/rocm_ci.yml@mainline secrets: inherit with: - input_sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - input_pr_num: ${{ github.event_name == 'pull_request' && github.event.pull_request.number || 0 }} - input_pr_url: ${{ github.event_name == 'pull_request' && github.event.pull_request.html_url || '' }} - input_pr_title: ${{ github.event_name == 'pull_request' && github.event.pull_request.title || '' }} + input_sha: ${{github.event_name == 'pull_request' && github.event.pull_request.head.sha || (github.event_name == 'push' && github.sha) || (github.event_name == 'issue_comment' && github.event.issue.pull_request.head.sha) || github.sha}} + input_pr_num: ${{github.event_name == 'pull_request' && github.event.pull_request.number || (github.event_name == 'issue_comment' && github.event.issue.number) || 0}} + input_pr_url: ${{github.event_name == 'pull_request' && github.event.pull_request.html_url || (github.event_name == 'issue_comment' && github.event.issue.pull_request.html_url) || ''}} + input_pr_title: ${{github.event_name == 'pull_request' && github.event.pull_request.title || (github.event_name == 'issue_comment' && github.event.issue.pull_request.title) || ''}} repository_name: ${{ github.repository }} - base_ref: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref }} - trigger_event_type: ${{ github.event_name }} + base_ref: ${{github.event_name == 'pull_request' && github.event.pull_request.base.ref || (github.event_name == 'issue_comment' && github.event.issue.pull_request.base.ref) || github.ref}} + trigger_event_type: ${{ github.event_name }} + comment_text: ${{ github.event_name == 'issue_comment' && github.event.comment.body || '' }} From 7de7ec43bb28bed65c9428e30c43f2fb5a7480a6 Mon Sep 17 00:00:00 2001 From: "Hila, Nino" Date: Tue, 22 Apr 2025 12:00:55 -0400 Subject: [PATCH 07/23] Add palamida.yml --- .github/palamida.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/palamida.yml diff --git a/.github/palamida.yml b/.github/palamida.yml new file mode 100644 index 0000000000..c34f60c67f --- /dev/null +++ b/.github/palamida.yml @@ -0,0 +1,6 @@ +disabled: false +scmId: gh-emu-rocm +branchesToScan: + - amd-staging + - amd-mainline +jenkinsUrl: https://palamidajenkinsvm.amd.com/job/palamida/job/pci/job/ScanInitiatorGitHub \ No newline at end of file From e3cf8dc4a3bd3bf5d1bdf02732b9f0a851b52465 Mon Sep 17 00:00:00 2001 From: "Choudhary, Rahul" Date: Tue, 22 Apr 2025 15:44:14 -0700 Subject: [PATCH 08/23] Create palamida.yml to enable Palamida scan --- .github/palamida.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/palamida.yml diff --git a/.github/palamida.yml b/.github/palamida.yml new file mode 100644 index 0000000000..0f1b0a6679 --- /dev/null +++ b/.github/palamida.yml @@ -0,0 +1,6 @@ +disabled: false +scmId: gh-emu-rocm +branchesToScan: + - amd-staging + - amd-mainline +jenkinsUrl: https://palamidajenkinsvm.amd.com/job/palamida/job/pci/job/ScanInitiatorGitHub From 0578cf70ef1972a6300fdd41751300952a1cef8d Mon Sep 17 00:00:00 2001 From: "Cheruvally, Aravindan" Date: Tue, 29 Apr 2025 15:49:53 -0400 Subject: [PATCH 09/23] Update Pre/Post File Permissions to 0755 (#12) --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd268cda4c..34feaa55c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,8 +74,12 @@ else () endif() configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocmmod.in ${BUILD_DIR}/rocmmod @ONLY ) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocm-core.postinst ${BUILD_DIR}/postinst @ONLY ) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocm-core.prerm ${BUILD_DIR}/prerm @ONLY ) + +# Setting Permission 0755 for pre/post install scripts +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocm-core.postinst ${BUILD_DIR}/postinst + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE @ONLY ) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocm-core.prerm ${BUILD_DIR}/prerm + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE @ONLY ) #Generate BUILD_INFO configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocm_version.h.in ${BUILD_DIR}/rocm_version.h @ONLY ) From de37842d6a87fc4218a4c4dd86b35ac0bf66e93a Mon Sep 17 00:00:00 2001 From: "Cheruvally, Aravindan" Date: Wed, 30 Apr 2025 18:56:11 -0400 Subject: [PATCH 10/23] Re Enable SWDEV-521313 Streamline Version Management (#10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "Revert "SWDEV-521313 - Streamline Version Management: Retain Only version-roc…"" This reverts commit 39bd62e592e1591176c2c343d2433e99e29fbc2e. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34feaa55c9..699e8a719e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,9 +142,9 @@ endif() #Add the libpatch version if available to the version file if( DEFINED VERSION_POINT ) - file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_POINT}-${BUILD_ID}\n" ) + file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_POINT}\n" ) else() - file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${BUILD_ID}\n" ) + file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}\n" ) endif() ## Support for Static and Shared Target Packaging From a7e3823768693dde51d678613da308b8336c53e5 Mon Sep 17 00:00:00 2001 From: "Hila, Nino" Date: Mon, 5 May 2025 16:27:44 -0400 Subject: [PATCH 11/23] Add palamida.yml --- .github/palamida.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/palamida.yml b/.github/palamida.yml index c34f60c67f..47bd57a5ab 100644 --- a/.github/palamida.yml +++ b/.github/palamida.yml @@ -2,5 +2,4 @@ disabled: false scmId: gh-emu-rocm branchesToScan: - amd-staging - - amd-mainline -jenkinsUrl: https://palamidajenkinsvm.amd.com/job/palamida/job/pci/job/ScanInitiatorGitHub \ No newline at end of file + - amd-mainline \ No newline at end of file From 60c6026c0800d418aa86cf2fe8c9df3dea476d71 Mon Sep 17 00:00:00 2001 From: "Hila, Nino" Date: Mon, 5 May 2025 16:31:20 -0400 Subject: [PATCH 12/23] Add palamida.yml From 5a4454b6dd32daf985156784cb274948af4e40dd Mon Sep 17 00:00:00 2001 From: "Hila, Nino" Date: Mon, 5 May 2025 16:35:12 -0400 Subject: [PATCH 13/23] Add palamida.yml From 33d87ba25dd2e85dedbf102eaa400ceffd0e5aa7 Mon Sep 17 00:00:00 2001 From: "Ramakrishnan, Ranjith" Date: Tue, 6 May 2025 08:43:03 -0700 Subject: [PATCH 14/23] Remove the backward compatibility code for file reorganization (#14) Remove the backward compatibilty code for file reorganization File reorg backward compatibility support is no longer required --- CMakeLists.txt | 26 -------------- header_template.hpp.in | 48 ------------------------- rocm-core-backward-compat.cmake | 63 --------------------------------- 3 files changed, 137 deletions(-) delete mode 100644 header_template.hpp.in delete mode 100644 rocm-core-backward-compat.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 699e8a719e..991170d88f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,10 +51,6 @@ set( CPACK_GENERATOR "TGZ;DEB;RPM" CACHE STRING "package types to be produced " set( COPYRIGHT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/copyright" ) set( BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR} ) -if(NOT ENABLE_ASAN_PACKAGING) - option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorg with backward compatibility" OFF) -endif() - ## Set variables set_variables() @@ -84,28 +80,6 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocm-core.prerm ${BUILD_DIR}/prerm #Generate BUILD_INFO configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocm_version.h.in ${BUILD_DIR}/rocm_version.h @ONLY ) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/rocm_getpath.h.in ${BUILD_DIR}/rocm_getpath.h @ONLY ) -#File reorg Backward compatibility function -if(NOT WIN32) - if(FILE_REORG_BACKWARD_COMPATIBILITY) - # To enabe/disable #error in wrapper header files - if(NOT DEFINED ROCM_HEADER_WRAPPER_WERROR) - if(DEFINED ENV{ROCM_HEADER_WRAPPER_WERROR}) - set(ROCM_HEADER_WRAPPER_WERROR "$ENV{ROCM_HEADER_WRAPPER_WERROR}" - CACHE STRING "Header wrapper warnings as errors.") - else() - set(ROCM_HEADER_WRAPPER_WERROR "OFF" CACHE STRING "Header wrapper warnings as errors.") - endif() - endif() - - if(ROCM_HEADER_WRAPPER_WERROR) - set(deprecated_error 1) - else() - set(deprecated_error 0) - endif() - - include(rocm-core-backward-compat.cmake) - endif() #FILE_REORG_BACKWARD_COMPATIBILITY -endif() #Make the rocmlib set( SRCS rocm_version.cpp rocm_getpath.cpp) diff --git a/header_template.hpp.in b/header_template.hpp.in deleted file mode 100644 index 0d8c481e90..0000000000 --- a/header_template.hpp.in +++ /dev/null @@ -1,48 +0,0 @@ -/* - MIT License - - Copyright (c) 2017 - 2023 Advanced Micro Devices, Inc. All rights Reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - */ -#ifndef @include_guard@ -#define @include_guard@ - -#ifndef ROCM_HEADER_WRAPPER_WERROR -#define ROCM_HEADER_WRAPPER_WERROR @deprecated_error@ -#endif -#if ROCM_HEADER_WRAPPER_WERROR /* ROCM_HEADER_WRAPPER_WERROR 1 */ -#error "@file_name@ has moved to @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/@headerfile_dir@ " -#else /* ROCM_HEADER_WRAPPER_WERROR 0 */ -#if defined(__GNUC__) -#warning "@file_name@ has moved to @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/@headerfile_dir@ " -#else -#pragma message ("@file_name@ has moved to @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/@headerfile_dir@ ") -#endif -#endif /* ROCM_HEADER_WRAPPER_WERROR */ - -@include_statements@ - -@hashzero_check@ - -@file_contents@ - -@hash_endif@ - -#endif diff --git a/rocm-core-backward-compat.cmake b/rocm-core-backward-compat.cmake deleted file mode 100644 index e96572e669..0000000000 --- a/rocm-core-backward-compat.cmake +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved. -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -cmake_minimum_required(VERSION 3.16.8) - -set(ROCM_CORE_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}) -set(ROCM_CORE_WRAPPER_DIR ${ROCM_CORE_BUILD_DIR}/wrapper_dir) -set(ROCM_CORE_WRAPPER_INC_DIR ${ROCM_CORE_WRAPPER_DIR}/include) -set(headerfile_dir "rocm-core") - -#Function to set actual file contents in wrapper files -#Some components grep for the contents in the file -function(set_file_contents input_file) - set(hashzero_check "#if 0 -/* The following is a copy of the original file for the benefit of build systems which grep for values - * in this file rather than preprocess it. This is just for backward compatibility */") - - file(READ ${input_file} file_contents) - set(hash_endif "#endif") - get_filename_component(file_name ${input_file} NAME) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/header_template.hpp.in ${ROCM_CORE_WRAPPER_INC_DIR}/${file_name}) -endfunction() - -#use header template file and generate wrapper header files -function(generate_wrapper_header) - file(MAKE_DIRECTORY ${ROCM_CORE_WRAPPER_INC_DIR}) - - #find all header files - file(GLOB include_files ${ROCM_CORE_BUILD_DIR}/*.h) - #Create wrapper files - foreach(header_file ${include_files}) - # set include guard - get_filename_component(INC_GAURD_NAME ${header_file} NAME_WE) - string(TOUPPER ${INC_GAURD_NAME} INC_GAURD_NAME) - set(include_guard "ROCM_CORE_WRAPPER_INCLUDE_${INC_GAURD_NAME}_H") - #set #include statement - get_filename_component(file_name ${header_file} NAME) - set(include_statements "#include \"${headerfile_dir}/${file_name}\"\n") - set_file_contents(${header_file}) - endforeach() - -endfunction() - -#Use template header file and generater wrapper header files -generate_wrapper_header() -install(DIRECTORY ${ROCM_CORE_WRAPPER_INC_DIR} DESTINATION . COMPONENT runtime) - From 461a5e1554b9f2c878e100effd8f2c63596250eb Mon Sep 17 00:00:00 2001 From: "Cheruvally, Aravindan" Date: Wed, 7 May 2025 18:48:46 -0400 Subject: [PATCH 15/23] Add Lintian Debian Packaging Configuration (#13) * SWDEV-531658 / SWDEV-529762 * Add Lintian Debian Packaging Configuration * Updated Debian specific Lintian flag usage * Updated Debian Pkg Extended Description usage * Updated Debian Package ChangeLog * Update Review Comments * Update Review Comments - Renamed debian to DEBIAN folder * Review Comment Update - Extended Description to use common across deb/rpm * Update Review Comments - Change Log Test Updated * Review Comment Update - remove duplicate & enhanced deb copyright header * Update Change Log for the release --- CHANGELOG.md | 4 ++- CMakeLists.txt | 56 +++++++++++++++++++------------ DEBIAN/changelog.in | 5 +++ DEBIAN/copyright.in | 26 +++++++++++++++ utils.cmake | 81 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 149 insertions(+), 23 deletions(-) create mode 100644 DEBIAN/changelog.in create mode 100644 DEBIAN/copyright.in diff --git a/CHANGELOG.md b/CHANGELOG.md index a3f54112c2..2e86a42f2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ Change Logs for rocm-core -Unreleased ROCm6.3.0 release +ROCm6.4.1 release + - Added changelog.debian and copyright for debian packages. +ROCm6.3.0 release - Enabled Support for CMAKE Module Config. ROCm6.1.0 release - Added new API to get ROCm install Path (getROCmInstallPath()) at runtime diff --git a/CMakeLists.txt b/CMakeLists.txt index 991170d88f..d09b094e74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,8 +48,12 @@ parse_rocm_version( ${ROCM_VERSION} ) set( CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "default cpack directory" ) set( BUILD_SHARED_LIBS ON CACHE BOOL "Build shared library (.so) or not." ) set( CPACK_GENERATOR "TGZ;DEB;RPM" CACHE STRING "package types to be produced " ) -set( COPYRIGHT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/copyright" ) +set( LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/copyright" ) set( BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR} ) +set( EXTENDED_PACKAGE_DESCRIPTION + "ROCM-CORE is a package which can be used to get ROCm release version, get ROCm install path information etc. + It is also important to note that ROCM-CORE takes the role as a base component on which all of ROCm can depend, + to make it easy to remove all of ROCm with a package manager." CACHE STRING "Debian Package Extended Description") ## Set variables set_variables() @@ -123,7 +127,7 @@ endif() ## Support for Static and Shared Target Packaging if(BUILD_SHARED_LIBS) - install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/version DESTINATION .info COMPONENT CORE_RUNTIME ) + install ( FILES ${BUILD_DIR}/version DESTINATION .info COMPONENT CORE_RUNTIME ) # Target Library needs to installed/packaged to same destination # in both ASAN and nonASAN Shared library builds @@ -136,19 +140,19 @@ if(BUILD_SHARED_LIBS) install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/runpath_to_rpath.py DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/rocm-core COMPONENT CORE_RUNTIME ) - install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/rocmmod + install ( FILES ${BUILD_DIR}/rocmmod DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT CORE_RUNTIME ) # License file - install ( FILES ${COPYRIGHT_FILE} + install ( FILES ${LICENSE_FILE} DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt COMPONENT CORE_RUNTIME) - install ( FILES ${COPYRIGHT_FILE} DESTINATION + install ( FILES ${LICENSE_FILE} DESTINATION ${CMAKE_INSTALL_DOCDIR}-asan RENAME LICENSE.txt COMPONENT CORE_ASAN) else() - install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/version + install ( FILES ${BUILD_DIR}/version DESTINATION .info COMPONENT ${STATIC_COMP_TYPE} ) install ( TARGETS ${CORE_TARGET} @@ -163,11 +167,11 @@ else() install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/runpath_to_rpath.py DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/rocm-core COMPONENT ${STATIC_COMP_TYPE} ) - install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/rocmmod + install ( FILES ${BUILD_DIR}/rocmmod DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${STATIC_COMP_TYPE} ) # License file - install ( FILES ${COPYRIGHT_FILE} + install ( FILES ${LICENSE_FILE} DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt COMPONENT ${STATIC_COMP_TYPE}) endif() @@ -186,18 +190,20 @@ set(CONFIG_PACKAGE_INSTALL_DIR ${CONF_LIB_DIR}/cmake/${CORE_TARGET}) set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}") set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}") +set(PKG_MAINTAINER_NM "ROCm Dev Support") +set(PKG_MAINTAINER_EMAIL "rocm-dev.support@amd.com") ## Generate Config File for rocm-core configure_package_config_file( ${CMAKE_MODULE_PATH}/${CORE_TARGET}-config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/${CORE_TARGET}-config.cmake + ${BUILD_DIR}/${CORE_TARGET}-config.cmake INSTALL_DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} PATH_VARS LIB_INSTALL_DIR INCLUDE_INSTALL_DIR BIN_INSTALL_DIR ) ## Generate config Version File for rocm-core write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/${CORE_TARGET}-config-version.cmake + ${BUILD_DIR}/${CORE_TARGET}-config-version.cmake VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" COMPATIBILITY SameMajorVersion) @@ -218,9 +224,9 @@ set ( CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR} ) set ( CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR} ) set ( CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH} ) set ( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}" ) -set ( CPACK_PACKAGE_CONTACT "ROCm Dev Support " ) +set ( CPACK_PACKAGE_CONTACT "${PKG_MAINTAINER_NM} <${PKG_MAINTAINER_EMAIL}>" ) set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PKG_DESCRIPTION}" ) -set ( CPACK_RESOURCE_FILE_LICENSE "${COPYRIGHT_FILE}" ) +set ( CPACK_RESOURCE_FILE_LICENSE "${LICENSE_FILE}" ) ## packaging variables if ( DEFINED ROCM_LIBPATCH_VERSION ) set ( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${ROCM_LIBPATCH_VERSION}" ) @@ -237,6 +243,9 @@ set ( CPACK_DEBIAN_CORE_STATIC_PACKAGE_NAME ${CORE_TARGET} ) message ( STATUS "Using CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_DEBIAN_PACKAGE_RELEASE}" ) set ( CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT" ) +# Debian specific packaging configuration +configure_debian_pkg( ${CORE_TARGET} ${COMP_TYPE} ${CPACK_PACKAGE_VERSION} ${PKG_MAINTAINER_NM} ${PKG_MAINTAINER_EMAIL} ) + ## RPM package specific variables set ( CPACK_RPM_COMPONENT_INSTALL ON ) set ( CPACK_RPM_CORE_RUNTIME_PACKAGE_NAME "${CORE_TARGET}" ) @@ -245,7 +254,6 @@ set ( CPACK_RPM_CORE_ASAN_PACKAGE_NAME ${CORE_TARGET}-asan ) # STATIC package name - For Now, No change for static package Name from default set ( CPACK_RPM_CORE_STATIC_PACKAGE_NAME ${CORE_TARGET} ) - ## 'dist' breaks manual builds on debian systems due to empty Provides execute_process( COMMAND rpm --eval %{?dist} RESULT_VARIABLE PROC_RESULT @@ -261,27 +269,31 @@ set ( CPACK_RPM_FILE_NAME "RPM-DEFAULT" ) # Debian package specific variables set ( CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS_STRING} ) set ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/ROCm/rocm-core" ) +set ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${BUILD_DIR}/postinst;${BUILD_DIR}/prerm" ) set ( CPACK_DEBIAN_CORE_ASAN_PACKAGE_DEPENDS ${CORE_TARGET} ) -set ( CPACK_DEBIAN_CORE_RUNTIME_PACKAGE_CONTROL_EXTRA "${BUILD_DIR}/postinst;${BUILD_DIR}/prerm" ) -set ( CPACK_DEBIAN_CORE_STATIC_PACKAGE_CONTROL_EXTRA "${BUILD_DIR}/postinst;${BUILD_DIR}/prerm" ) +set ( CPACK_DEBIAN_CORE_RUNTIME_PACKAGE_CONTROL_EXTRA "${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA}" ) +set ( CPACK_DEBIAN_CORE_STATIC_PACKAGE_CONTROL_EXTRA "${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA}" ) +set ( CPACK_DEBIAN_PACKAGE_DESCRIPTION "${EXTENDED_PACKAGE_DESCRIPTION}" ) ## RPM package specific variables set ( CPACK_RPM_PACKAGE_REQUIRES ${RPM_DEPENDS_STRING} ) set ( CPACK_RPM_PACKAGE_LICENSE "MIT" ) set ( CPACK_RPM_CORE_ASAN_PACKAGE_REQUIRES ${CORE_TARGET} ) -set ( CPACK_RPM_CORE_RUNTIME_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/postinst" ) -set ( CPACK_RPM_CORE_RUNTIME_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/prerm" ) -set ( CPACK_RPM_CORE_STATIC_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/postinst" ) -set ( CPACK_RPM_CORE_STATIC_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/prerm" ) +set ( CPACK_RPM_CORE_RUNTIME_POST_INSTALL_SCRIPT_FILE "${BUILD_DIR}/postinst" ) +set ( CPACK_RPM_CORE_RUNTIME_POST_UNINSTALL_SCRIPT_FILE "${BUILD_DIR}/prerm" ) +set ( CPACK_RPM_CORE_STATIC_POST_INSTALL_SCRIPT_FILE "${BUILD_DIR}/postinst" ) +set ( CPACK_RPM_CORE_STATIC_POST_UNINSTALL_SCRIPT_FILE "${BUILD_DIR}/prerm" ) +set ( CPACK_RPM_PACKAGE_DESCRIPTION "${EXTENDED_PACKAGE_DESCRIPTION}" ) if ( DEFINED CPACK_PACKAGING_INSTALL_PREFIX ) - set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/.info" ) -endif ( ) + set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + "${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/.info" ) +endif() + # Backward compatibility support for deprecated package rocm-clang-ocl # TODO: To be removed after two releases set(CPACK_DEBIAN_RUNTIME_PACKAGE_REPLACES "rocm-clang-ocl") set(CPACK_DEBIAN_RUNTIME_PACKAGE_CONFLICTS "rocm-clang-ocl") - set(CPACK_RPM_RUNTIME_PACKAGE_OBSOLETES "rocm-clang-ocl") ## Include packaging diff --git a/DEBIAN/changelog.in b/DEBIAN/changelog.in new file mode 100644 index 0000000000..95ba9572fb --- /dev/null +++ b/DEBIAN/changelog.in @@ -0,0 +1,5 @@ +@DEB_PACKAGE_NAME@ (@DEB_PACKAGE_VERSION@) stable; urgency=low + + * ROCm Runtime software stack Base Package. + -- @DEB_MAINTAINER_NAME@ <@DEB_MAINTAINER_EMAIL@> @DEB_TIMESTAMP@ + diff --git a/DEBIAN/copyright.in b/DEBIAN/copyright.in new file mode 100644 index 0000000000..e90d34aa20 --- /dev/null +++ b/DEBIAN/copyright.in @@ -0,0 +1,26 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: @DEB_PACKAGE_NAME@ +Upstream-Contact: @DEB_MAINTAINER_NAME@ <@DEB_MAINTAINER_EMAIL@> +Source: https://github.com/ROCm/@DEB_PACKAGE_NAME@ +Files: * +License: @DEB_LICENSE@ +Copyright: @DEB_COPYRIGHT_YEAR@ Advanced Micro Devices, Inc. All rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/utils.cmake b/utils.cmake index f9fb2fd319..42c075b30a 100644 --- a/utils.cmake +++ b/utils.cmake @@ -169,4 +169,85 @@ function( set_variables ) endfunction() +## Configure Copyright File for Debian Package +function( configure_debian_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T MAINTAINER_NM_T MAINTAINER_EMAIL_T) + # Check If Debian Platform + find_file (DEBIAN debian_version debconf.conf PATHS /etc) + if(DEBIAN) + set_debian_pkg_cmake_flags( ${PACKAGE_NAME_T} ${PACKAGE_VERSION_T} + ${MAINTAINER_NM_T} ${MAINTAINER_EMAIL_T} ) + # Create debian directory in build tree + file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/DEBIAN") + + # Configure the copyright file + configure_file( + "${CMAKE_SOURCE_DIR}/DEBIAN/copyright.in" + "${CMAKE_BINARY_DIR}/DEBIAN/copyright" + @ONLY + ) + + # Install copyright file + install ( FILES "${CMAKE_BINARY_DIR}/DEBIAN/copyright" + DESTINATION "${CMAKE_INSTALL_DOCDIR}" + COMPONENT ${COMPONENT_NAME_T} ) + + # Configure the changelog file + configure_file( + "${CMAKE_SOURCE_DIR}/DEBIAN/changelog.in" + "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" + @ONLY + ) + + # Install Change Log + find_program ( DEB_GZIP_EXEC gzip ) + if(EXISTS "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" ) + execute_process( + COMMAND ${DEB_GZIP_EXEC} -9 "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/DEBIAN" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + ) + if(NOT ${result} EQUAL 0) + message(FATAL_ERROR "Failed to compress: ${error}") + endif() + install ( FILES "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_CHANGELOG_INSTALL_FILENM}" + DESTINATION ${CMAKE_INSTALL_DOCDIR} + COMPONENT ${COMPONENT_NAME_T}) + endif() + else() + message( STATUS "Ignore Configuring Debian Specific Packaging Configuration" ) + endif() +endfunction() + +# Set variables for changelog and copyright +# For Debian specific Packages +function( set_debian_pkg_cmake_flags DEB_PACKAGE_NAME_T DEB_PACKAGE_VERSION_T DEB_MAINTAINER_NM_T DEB_MAINTAINER_EMAIL_T ) + # Setting configure flags + set( DEB_PACKAGE_NAME "${DEB_PACKAGE_NAME_T}" CACHE STRING "Debian Package Name" ) + set( DEB_PACKAGE_VERSION "${DEB_PACKAGE_VERSION_T}" CACHE STRING "Debian Package Version String" ) + set( DEB_MAINTAINER_NAME "${DEB_MAINTAINER_NM_T}" CACHE STRING "Debian Package Maintainer Name" ) + set( DEB_MAINTAINER_EMAIL "${DEB_MAINTAINER_EMAIL_T}" CACHE STRING "Debian Package Maintainer Email" ) + set( DEB_COPYRIGHT_YEAR "2025" CACHE STRING "Debian Package Copyright Year" ) + set( DEB_LICENSE "MIT" CACHE STRING "Debian Package License Type" ) + set( DEB_CHANGELOG_INSTALL_FILENM "changelog.Debian.gz" CACHE STRING "Debian Package ChangeLog File Name" ) + + # Get TimeStamp + find_program( DEB_DATE_TIMESTAMP_EXEC date ) + set ( DEB_TIMESTAMP_FORMAT_OPTION "-R" ) + execute_process ( + COMMAND ${DEB_DATE_TIMESTAMP_EXEC} ${DEB_TIMESTAMP_FORMAT_OPTION} + OUTPUT_VARIABLE TIMESTAMP_T + ) + set( DEB_TIMESTAMP "${TIMESTAMP_T}" CACHE STRING "Current Time Stamp for Copyright/Changelog" ) + + message(STATUS "DEB_PACKAGE_NAME : ${DEB_PACKAGE_NAME}" ) + message(STATUS "DEB_PACKAGE_VERSION : ${DEB_PACKAGE_VERSION}" ) + message(STATUS "DEB_MAINTAINER_NAME : ${DEB_MAINTAINER_NAME}" ) + message(STATUS "DEB_MAINTAINER_EMAIL : ${DEB_MAINTAINER_EMAIL}" ) + message(STATUS "DEB_COPYRIGHT_YEAR : ${DEB_COPYRIGHT_YEAR}" ) + message(STATUS "DEB_LICENSE : ${DEB_LICENSE}" ) + message(STATUS "DEB_TIMESTAMP : ${DEB_TIMESTAMP}" ) + message(STATUS "DEB_CHANGELOG_INSTALL_FILENM : ${DEB_CHANGELOG_INSTALL_FILENM}" ) +endfunction() From bbbb0075fcd43e7bc5cbba2fc4cf8e1c3d475a27 Mon Sep 17 00:00:00 2001 From: Ashutosh Mishra Date: Mon, 12 May 2025 11:45:20 +0530 Subject: [PATCH 16/23] Adding condition for static package type SWDEV-532030 : Static builds are failing for mainline and release because COMP_TYPE is empty in case of static builds. This patch fixes the same. Signed-off-by: Ashutosh Mishra --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d09b094e74..3631e9b23d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,7 +244,11 @@ message ( STATUS "Using CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_DEBIAN_PACKAGE_RELE set ( CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT" ) # Debian specific packaging configuration +if(COMP_TYPE) configure_debian_pkg( ${CORE_TARGET} ${COMP_TYPE} ${CPACK_PACKAGE_VERSION} ${PKG_MAINTAINER_NM} ${PKG_MAINTAINER_EMAIL} ) +elseif(STATIC_COMP_TYPE) +configure_debian_pkg( ${CORE_TARGET} ${STATIC_COMP_TYPE} ${CPACK_PACKAGE_VERSION} ${PKG_MAINTAINER_NM} ${PKG_MAINTAINER_EMAIL} ) +endif() ## RPM package specific variables set ( CPACK_RPM_COMPONENT_INSTALL ON ) From fcd395270880be7497bce36c49a3665d5a8784a7 Mon Sep 17 00:00:00 2001 From: Ashutosh Mishra Date: Mon, 12 May 2025 17:22:02 +0530 Subject: [PATCH 17/23] Restoring the correct installation path SWDEV-532187: The installation was failing because of the same path used in all of the packages. This patch seprates the same. Signed-off-by: Ashutosh Mishra --- CMakeLists.txt | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3631e9b23d..9906ce92d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,9 +37,27 @@ set( CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options ar ## Verbose output. set( CMAKE_VERBOSE_MAKEFILE on ) +include( GNUInstallDirs ) + +if(ENABLE_ASAN_PACKAGING) + # Only libraries required for ASAN Package + set( CPACK_COMPONENTS_ALL CORE_ASAN ) + set( COMP_TYPE "CORE_ASAN" ) + set( PKG_DESCRIPTION "ROCm AddressSanitizer Instrumented Runtime software stack" ) + set( CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DOCDIR}-asan" ) +else() + if(BUILD_SHARED_LIBS) + set( CPACK_COMPONENTS_ALL CORE_RUNTIME ) + set( COMP_TYPE "CORE_RUNTIME" ) + set( PKG_DESCRIPTION "ROCm Runtime software stack" ) + else() + set( CPACK_COMPONENTS_ALL CORE_STATIC ) + set( STATIC_COMP_TYPE "CORE_STATIC" ) + set( PKG_DESCRIPTION "ROCm Static software stack" ) + endif() +endif() include( utils.cmake ) -include( GNUInstallDirs ) #Parse Version message( STATUS "ROCM_VERSION = ${ROCM_VERSION}" ) @@ -101,23 +119,6 @@ set( SO_VERSION_STRING "${SO_MAJOR}.${SO_MINOR}.${ROCM_LIBPATCH_VERSION}" ) set_property( TARGET ${CORE_TARGET} PROPERTY VERSION "${SO_VERSION_STRING}" ) set_property( TARGET ${CORE_TARGET} PROPERTY SOVERSION "${SO_MAJOR}" ) -if(ENABLE_ASAN_PACKAGING) - # Only libraries required for ASAN Package - set( CPACK_COMPONENTS_ALL CORE_ASAN ) - set( COMP_TYPE "CORE_ASAN" ) - set( PKG_DESCRIPTION "ROCm AddressSanitizer Instrumented Runtime software stack" ) -else() - if(BUILD_SHARED_LIBS) - set( CPACK_COMPONENTS_ALL CORE_RUNTIME ) - set( COMP_TYPE "CORE_RUNTIME" ) - set( PKG_DESCRIPTION "ROCm Runtime software stack" ) - else() - set( CPACK_COMPONENTS_ALL CORE_STATIC ) - set( STATIC_COMP_TYPE "CORE_STATIC" ) - set( PKG_DESCRIPTION "ROCm Static software stack" ) - endif() -endif() - #Add the libpatch version if available to the version file if( DEFINED VERSION_POINT ) file ( WRITE "${CMAKE_CURRENT_BINARY_DIR}/version" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_POINT}\n" ) @@ -148,9 +149,6 @@ if(BUILD_SHARED_LIBS) install ( FILES ${LICENSE_FILE} DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt COMPONENT CORE_RUNTIME) - install ( FILES ${LICENSE_FILE} DESTINATION - ${CMAKE_INSTALL_DOCDIR}-asan RENAME LICENSE.txt - COMPONENT CORE_ASAN) else() install ( FILES ${BUILD_DIR}/version DESTINATION .info From fad35660c5d08693d3ece931798dd81937500afc Mon Sep 17 00:00:00 2001 From: "Cheruvally, Aravindan" Date: Mon, 12 May 2025 18:18:11 -0400 Subject: [PATCH 18/23] Update License File install for ASAN (#21) UT Fix - Update License File install for ASAN --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9906ce92d4..3277e4c8e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,7 +148,7 @@ if(BUILD_SHARED_LIBS) # License file install ( FILES ${LICENSE_FILE} DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt - COMPONENT CORE_RUNTIME) + COMPONENT ${COMP_TYPE}) else() install ( FILES ${BUILD_DIR}/version DESTINATION .info From f6617fd89f6cf8cd2329557960fb93e44cff514b Mon Sep 17 00:00:00 2001 From: "Cheruvally, Aravindan" Date: Tue, 27 May 2025 12:20:55 -0400 Subject: [PATCH 19/23] Enable Support for Lintian Override Configuration (#23) * Update License file in deb pkg to only have debian lintian specific copyright * Enable Support for Debian Pkg Lintian Overrides * Enhance Lintian Override config File Name for static,asan (rocm-core) * Update Review Comments/UT Test Fixes for Lintian Overrides --- CMakeLists.txt | 31 ++++++++++++++++++++----------- DEBIAN/overrides.in | 3 +++ utils.cmake | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 DEBIAN/overrides.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 3277e4c8e3..25b4b8c964 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,13 +66,16 @@ parse_rocm_version( ${ROCM_VERSION} ) set( CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "default cpack directory" ) set( BUILD_SHARED_LIBS ON CACHE BOOL "Build shared library (.so) or not." ) set( CPACK_GENERATOR "TGZ;DEB;RPM" CACHE STRING "package types to be produced " ) -set( LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/copyright" ) +set( LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/copyright" CACHE PATH "Path to License File in source dir" ) set( BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR} ) set( EXTENDED_PACKAGE_DESCRIPTION "ROCM-CORE is a package which can be used to get ROCm release version, get ROCm install path information etc. It is also important to note that ROCM-CORE takes the role as a base component on which all of ROCm can depend, to make it easy to remove all of ROCm with a package manager." CACHE STRING "Debian Package Extended Description") +set( BUILD_ENABLE_LINTIAN_OVERRIDES OFF CACHE BOOL "Enable/Disable Lintian Overrides" ) +set( BUILD_DEBIAN_PKGING_FLAG OFF CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" ) + ## Set variables set_variables() @@ -145,10 +148,6 @@ if(BUILD_SHARED_LIBS) DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT CORE_RUNTIME ) - # License file - install ( FILES ${LICENSE_FILE} - DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt - COMPONENT ${COMP_TYPE}) else() install ( FILES ${BUILD_DIR}/version DESTINATION .info @@ -168,10 +167,6 @@ else() install ( FILES ${BUILD_DIR}/rocmmod DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${STATIC_COMP_TYPE} ) - # License file - install ( FILES ${LICENSE_FILE} - DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt - COMPONENT ${STATIC_COMP_TYPE}) endif() ## Cmake module config file configurations @@ -243,9 +238,9 @@ set ( CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT" ) # Debian specific packaging configuration if(COMP_TYPE) -configure_debian_pkg( ${CORE_TARGET} ${COMP_TYPE} ${CPACK_PACKAGE_VERSION} ${PKG_MAINTAINER_NM} ${PKG_MAINTAINER_EMAIL} ) + configure_debian_pkg( ${CORE_TARGET} ${COMP_TYPE} ${CPACK_PACKAGE_VERSION} ${PKG_MAINTAINER_NM} ${PKG_MAINTAINER_EMAIL} ) elseif(STATIC_COMP_TYPE) -configure_debian_pkg( ${CORE_TARGET} ${STATIC_COMP_TYPE} ${CPACK_PACKAGE_VERSION} ${PKG_MAINTAINER_NM} ${PKG_MAINTAINER_EMAIL} ) + configure_debian_pkg( ${CORE_TARGET} ${STATIC_COMP_TYPE} ${CPACK_PACKAGE_VERSION} ${PKG_MAINTAINER_NM} ${PKG_MAINTAINER_EMAIL} ) endif() ## RPM package specific variables @@ -298,5 +293,19 @@ set(CPACK_DEBIAN_RUNTIME_PACKAGE_REPLACES "rocm-clang-ocl") set(CPACK_DEBIAN_RUNTIME_PACKAGE_CONFLICTS "rocm-clang-ocl") set(CPACK_RPM_RUNTIME_PACKAGE_OBSOLETES "rocm-clang-ocl") +# Custom installation for Debian Lintian File +if( BUILD_ENABLE_LINTIAN_OVERRIDES STREQUAL "ON" AND BUILD_DEBIAN_PKGING_FLAG STREQUAL "ON") + set( OVERRIDE_FILE "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_OVERRIDES_INSTALL_FILENM}" ) + if(COMP_TYPE) + set( OVERRIDE_TEMP_INSTALL_LOC "/_CPack_Packages/Linux/DEB/${CORE_TARGET}-${CPACK_PACKAGE_VERSION}-Linux/${COMP_TYPE}" ) + elseif(STATIC_COMP_TYPE) + set( OVERRIDE_TEMP_INSTALL_LOC "/_CPack_Packages/Linux/DEB/${CORE_TARGET}-${CPACK_PACKAGE_VERSION}-Linux/${STATIC_COMP_TYPE}" ) + endif() + set(CPACK_INSTALL_COMMANDS + "${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}${OVERRIDE_TEMP_INSTALL_LOC}${DEB_OVERRIDES_INSTALL_PATH}" + "${CMAKE_COMMAND} -E copy ${OVERRIDE_FILE} ${CMAKE_BINARY_DIR}${OVERRIDE_TEMP_INSTALL_LOC}${DEB_OVERRIDES_INSTALL_PATH}" + ) +endif() + ## Include packaging include ( CPack ) diff --git a/DEBIAN/overrides.in b/DEBIAN/overrides.in new file mode 100644 index 0000000000..6bee886c10 --- /dev/null +++ b/DEBIAN/overrides.in @@ -0,0 +1,3 @@ +@DEB_OVERRIDES_INSTALL_FILENM@: no-copyright-file +@DEB_OVERRIDES_INSTALL_FILENM@: debian-changelog-file-missing +@DEB_OVERRIDES_INSTALL_FILENM@: dir-or-file-in-opt diff --git a/utils.cmake b/utils.cmake index 42c075b30a..859afdae56 100644 --- a/utils.cmake +++ b/utils.cmake @@ -174,6 +174,7 @@ function( configure_debian_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T # Check If Debian Platform find_file (DEBIAN debian_version debconf.conf PATHS /etc) if(DEBIAN) + set( BUILD_DEBIAN_PKGING_FLAG ON CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" FORCE ) set_debian_pkg_cmake_flags( ${PACKAGE_NAME_T} ${PACKAGE_VERSION_T} ${MAINTAINER_NM_T} ${MAINTAINER_EMAIL_T} ) @@ -199,6 +200,30 @@ function( configure_debian_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T @ONLY ) + if( BUILD_ENABLE_LINTIAN_OVERRIDES ) + if(NOT BUILD_SHARED_LIBS) + string(FIND ${DEB_OVERRIDES_INSTALL_FILENM} "static" OUT_VAR1) + if(OUT_VAR1 EQUAL -1) + set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_OVERRIDES_INSTALL_FILENM}-static" ) + endif() + else() + if(ENABLE_ASAN_PACKAGING) + string( FIND ${DEB_OVERRIDES_INSTALL_FILENM} "asan" OUT_VAR2) + if(OUT_VAR2 EQUAL -1) + set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_OVERRIDES_INSTALL_FILENM}-asan" ) + endif() + endif() + endif() + set( DEB_OVERRIDES_INSTALL_FILENM + "${DEB_OVERRIDES_INSTALL_FILENM}" CACHE STRING "Debian Package Lintian Override File Name" FORCE) + # Configure the changelog file + configure_file( + "${CMAKE_SOURCE_DIR}/DEBIAN/overrides.in" + "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_OVERRIDES_INSTALL_FILENM}" + @ONLY + ) + endif() + # Install Change Log find_program ( DEB_GZIP_EXEC gzip ) if(EXISTS "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" ) @@ -217,7 +242,10 @@ function( configure_debian_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T COMPONENT ${COMPONENT_NAME_T}) endif() else() - message( STATUS "Ignore Configuring Debian Specific Packaging Configuration" ) + # License file + install ( FILES ${LICENSE_FILE} + DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME LICENSE.txt + COMPONENT ${COMPONENT_NAME_T}) endif() endfunction() @@ -233,6 +261,11 @@ function( set_debian_pkg_cmake_flags DEB_PACKAGE_NAME_T DEB_PACKAGE_VERSION_T DE set( DEB_LICENSE "MIT" CACHE STRING "Debian Package License Type" ) set( DEB_CHANGELOG_INSTALL_FILENM "changelog.Debian.gz" CACHE STRING "Debian Package ChangeLog File Name" ) + if( BUILD_ENABLE_LINTIAN_OVERRIDES ) + set( DEB_OVERRIDES_INSTALL_FILENM "${DEB_PACKAGE_NAME}" CACHE STRING "Debian Package Lintian Override File Name" ) + set( DEB_OVERRIDES_INSTALL_PATH "/usr/share/lintian/overrides/" CACHE STRING "Deb Pkg Lintian Override Install Loc" ) + endif() + # Get TimeStamp find_program( DEB_DATE_TIMESTAMP_EXEC date ) set ( DEB_TIMESTAMP_FORMAT_OPTION "-R" ) From f774bf6276cf6bc35a25004efc1c537e0041014a Mon Sep 17 00:00:00 2001 From: "Cheruvally, Aravindan" Date: Sun, 1 Jun 2025 18:48:30 -0400 Subject: [PATCH 20/23] Lintian Warnings Fixes, Enhancements (#25) * Add Lintian Warnings Fixes * Update Review Comments, Warning Fixes --- CMakeLists.txt | 13 +++++++++---- rocm-core.postinst | 1 + rocm-core.prerm | 1 + utils.cmake | 3 ++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 25b4b8c964..e8a695845f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,9 +69,10 @@ set( CPACK_GENERATOR "TGZ;DEB;RPM" CACHE STRING "package types to be produced " set( LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/copyright" CACHE PATH "Path to License File in source dir" ) set( BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR} ) set( EXTENDED_PACKAGE_DESCRIPTION - "ROCM-CORE is a package which can be used to get ROCm release version, get ROCm install path information etc. - It is also important to note that ROCM-CORE takes the role as a base component on which all of ROCm can depend, - to make it easy to remove all of ROCm with a package manager." CACHE STRING "Debian Package Extended Description") + "ROCM-CORE package helps to get ROCm release version,get install path. + It is also important to note that ROCM-CORE takes the role as a base + component on which all of ROCm can depend, to make it easy to remove + all of ROCm with a package manager." ) set( BUILD_ENABLE_LINTIAN_OVERRIDES OFF CACHE BOOL "Enable/Disable Lintian Overrides" ) set( BUILD_DEBIAN_PKGING_FLAG OFF CACHE BOOL "Internal Status Flag to indicate Debian Packaging Build" ) @@ -141,7 +142,7 @@ if(BUILD_SHARED_LIBS) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocm-core COMPONENT CORE_RUNTIME ) - install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/runpath_to_rpath.py + install ( PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/runpath_to_rpath.py DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/rocm-core COMPONENT CORE_RUNTIME ) install ( FILES ${BUILD_DIR}/rocmmod @@ -263,10 +264,14 @@ endif() message(STATUS "Using CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}") set ( CPACK_RPM_FILE_NAME "RPM-DEFAULT" ) +# Debian Lintian Fix - Add Dependency for Python Script delivered +set( DEB_DEPENDS_STRING "python3, libc6 (>= 2.34)" ) + # Debian package specific variables set ( CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS_STRING} ) set ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/ROCm/rocm-core" ) set ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${BUILD_DIR}/postinst;${BUILD_DIR}/prerm" ) +set ( CPACK_DEBIAN_CORE_RUNTIME_PACKAGE_DEPENDS ${DEB_DEPENDS_STRING} ) set ( CPACK_DEBIAN_CORE_ASAN_PACKAGE_DEPENDS ${CORE_TARGET} ) set ( CPACK_DEBIAN_CORE_RUNTIME_PACKAGE_CONTROL_EXTRA "${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA}" ) set ( CPACK_DEBIAN_CORE_STATIC_PACKAGE_CONTROL_EXTRA "${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA}" ) diff --git a/rocm-core.postinst b/rocm-core.postinst index f72d384163..b2b8957ac4 100755 --- a/rocm-core.postinst +++ b/rocm-core.postinst @@ -1,4 +1,5 @@ #!/bin/bash +set -e do_update_alternatives(){ # skip update if program doesn't exist diff --git a/rocm-core.prerm b/rocm-core.prerm index c500ef831f..2cb55fe6b7 100755 --- a/rocm-core.prerm +++ b/rocm-core.prerm @@ -1,4 +1,5 @@ #!/bin/bash +set -e do_update_alternatives(){ # skip update if program doesn't exist diff --git a/utils.cmake b/utils.cmake index 859afdae56..1200fb0655 100644 --- a/utils.cmake +++ b/utils.cmake @@ -220,6 +220,7 @@ function( configure_debian_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T configure_file( "${CMAKE_SOURCE_DIR}/DEBIAN/overrides.in" "${CMAKE_BINARY_DIR}/DEBIAN/${DEB_OVERRIDES_INSTALL_FILENM}" + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ @ONLY ) endif() @@ -228,7 +229,7 @@ function( configure_debian_pkg PACKAGE_NAME_T COMPONENT_NAME_T PACKAGE_VERSION_T find_program ( DEB_GZIP_EXEC gzip ) if(EXISTS "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" ) execute_process( - COMMAND ${DEB_GZIP_EXEC} -9 "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" + COMMAND ${DEB_GZIP_EXEC} -n -9 "${CMAKE_BINARY_DIR}/DEBIAN/changelog.Debian" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/DEBIAN" RESULT_VARIABLE result OUTPUT_VARIABLE output From 0d7160da9aaa21982d625d2ae607642347a327a9 Mon Sep 17 00:00:00 2001 From: "Ramakrishnan, Ranjith" Date: Wed, 18 Jun 2025 09:27:05 -0700 Subject: [PATCH 21/23] 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)" ) From 4819f8e6af6084b5fddcb431bb352ecadfb787a1 Mon Sep 17 00:00:00 2001 From: "Cheruvally, Aravindan" Date: Wed, 18 Jun 2025 19:27:49 -0400 Subject: [PATCH 22/23] SWDEV-538841 - Update libc dependency (#29) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fab34d722..cc6a8f6839 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,7 +268,7 @@ set ( CPACK_RPM_FILE_NAME "RPM-DEFAULT" ) 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)" ) +set( DEB_DEPENDS_STRING "python3, libc6" ) # Debian package specific variables set ( CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS_STRING} ) From 942821090f1a81d7ad55f910dffdba93c2cdca8a Mon Sep 17 00:00:00 2001 From: Nirmal Unnikrishnan Date: Tue, 17 Jun 2025 14:47:02 -0500 Subject: [PATCH 23/23] SWDEV-531400 : Adding the correct modulefile path for SLES --- rocm-core.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocm-core.postinst b/rocm-core.postinst index b2b8957ac4..846b391bb4 100755 --- a/rocm-core.postinst +++ b/rocm-core.postinst @@ -41,7 +41,7 @@ do_update_alternatives(){ update-alternatives --install "/opt/rocm" "rocm" "@CPACK_PACKAGING_INSTALL_PREFIX@" "$altscore" fi - for loc in "/usr/share/modules/modulefiles" "/usr/local/Modules/modulefiles" "/usr/share/Modules/modulefiles" + for loc in "/usr/share/modules/modulefiles" "/usr/local/Modules/modulefiles" "/usr/share/Modules/modulefiles" "/usr/share/Modules/3.2.10/modulefiles" do if [ -d "$loc" ] then