From b28941628534adcfc9e845ed366adaff5042c965 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Mon, 20 Sep 2021 21:30:10 -0500 Subject: [PATCH] Add dependency on kmod. rocminfo uses lsmod to check for loaded drivers. Use of sysfs is possible but sysfs' stable interface does not allow for easy parsing. Use of lsmod avoids needing to walk the sysfs tree and avoids issues of permissions to examine sysfs. Both Debian and Fedora list lsmod under kmod. Presumption is that CentOS and RHEL also follow this. Change-Id: Ic5033e0b780100c54d2fe0b4f501c40acbc237fb [ROCm/rocminfo commit: 2b4b0c8862eb607edb07f6699df36553b7985707] --- projects/rocminfo/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocminfo/CMakeLists.txt b/projects/rocminfo/CMakeLists.txt index 1dafe573da..6d142bc6dd 100755 --- a/projects/rocminfo/CMakeLists.txt +++ b/projects/rocminfo/CMakeLists.txt @@ -202,7 +202,7 @@ if(DEFINED ENV{ROCM_LIBPATCH_VERSION}) endif() #Debian package specific variables -set(CPACK_DEBIAN_PACKAGE_DEPENDS "hsa-rocr") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "hsa-rocr, kmod") set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${CPACK_DEBIAN_PACKAGE_HOMEPAGE} CACHE STRING "https://github.com/RadeonOpenCompute/ROCm") if (DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE}) set(CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE}) @@ -214,7 +214,7 @@ if ( ROCM_DEP_ROCMCORE ) endif() #RPM package specific variables -set(CPACK_RPM_PACKAGE_REQUIRES "hsa-rocr") +set(CPACK_RPM_PACKAGE_REQUIRES "hsa-rocr kmod") if(DEFINED CPACK_PACKAGING_INSTALL_PREFIX) set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" ) endif()