Add grpc to build
Also: * fix typo in rpm post install script * for RPM, tell CPack to exclude intermediate directories in rpm file Change-Id: I9dbb4901298d3699e092b53b339f5cb1d77b4edb (cherry picked from commit e894cfa757aae8343afb373ce4ae60a1aa950a91)
This commit is contained in:
+16
-1
@@ -29,7 +29,7 @@ set(RSMI_INC_DIR ${ROCM_DIR}/rocm_smi/include)
|
||||
set(RSMI_LIB_DIR ${ROCM_DIR}/rocm_smi/lib)
|
||||
|
||||
if (NOT DEFINED GRPC_ROOT)
|
||||
set(GRPC_ROOT "/usr/local")
|
||||
set(GRPC_ROOT "/usr")
|
||||
endif()
|
||||
if (NOT DEFINED CPACK_PACKAGING_INSTALL_PREFIX)
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/"
|
||||
@@ -157,6 +157,11 @@ set(CPACK_PACKAGING_INSTALL_PREFIX ${RDC_SERVER_ROOT_PATH}
|
||||
set(SERVER_COMPONENT "server")
|
||||
set(CLIENT_COMPONENT "client")
|
||||
|
||||
install(DIRECTORY ${GRPC_ROOT}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
DESTINATION usr
|
||||
COMPONENT ${SERVER_COMPONENT})
|
||||
|
||||
add_subdirectory("server")
|
||||
add_subdirectory("client")
|
||||
add_subdirectory("rdc_libs")
|
||||
@@ -181,8 +186,18 @@ set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/postinst;
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/prerm")
|
||||
set(CPACK_DEBIAN_PACKAGE_VERSION ${PKG_VERSION_STR})
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-smi-lib64")
|
||||
|
||||
# RPM package specific variables
|
||||
set(CPACK_RPM_PACKAGE_AUTOREQ 0)
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "rocm-smi-lib64")
|
||||
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib")
|
||||
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/sbin")
|
||||
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib/systemd")
|
||||
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib/systemd/system")
|
||||
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr")
|
||||
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt")
|
||||
|
||||
set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/RPM/rpm_post")
|
||||
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ For complete list of features and how to start using RDC from pre-built packages
|
||||
(ii) AMD ROCk Kernel driver (https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver)
|
||||
|
||||
## Building gRPC and protoc
|
||||
**NOTE:** gRPC and protoc compiler must be built from source as pre-built packages are not available. These must be installed to both build RDC and must also be available on machines where RDC will run.
|
||||
**NOTE:** gRPC and protoc compiler must be built when building RDC from source as pre-built packages are not available. When installing RDC from a package, gRPC and protoc will be installed from the package.
|
||||
|
||||
**IMPORTANT:** Building gRPC and protocol buffers requires CMake 3.15 or greater. With an older version build will quietly succeed with a *message*. However, all components of gRPC will not be installed and RDC will ***fail*** to run
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#/bin/bash
|
||||
|
||||
RDC_LIB_DIR=@RDC_CLIENT_ROOT_PATH@/rdc/lib
|
||||
GRPC_LIB_DIR=/usr/grpc/lib
|
||||
|
||||
# This will return 0 if an id is created and non-zero if
|
||||
# it already exists
|
||||
@@ -10,7 +11,8 @@ do_create_rdc_user() {
|
||||
|
||||
# librdc_client.so
|
||||
do_ldconfig() {
|
||||
echo $RDC_LIB_DIR > /etc/ld.so.conf.d/x86_64-librdc_client.conf && ldconfig
|
||||
echo "$RDC_LIB_DIR" > /etc/ld.so.conf.d/x86_64-librdc_client.conf
|
||||
echo "$GRPC_LIB_DIR" >> /etc/ld.so.conf.d/x86_64-librdc_client.conf && ldconfig
|
||||
|
||||
do_create_rdc_user
|
||||
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
RDC_LIB_DIR=@RDC_CLIENT_ROOT_PATH@/rdc/lib
|
||||
GRPC_LIB_DIR=/usr/grpc/lib
|
||||
|
||||
do_create_rdc_user() {
|
||||
useradd -r -s /bin/nologin rdc
|
||||
}
|
||||
|
||||
do_create_rpc_user
|
||||
echo -e "${RDC_LIB_DIR}\n${RDC_LIB_DIR}64" > /etc/ld.so.conf.d/x86_64-librdc_client.conf && ldconfig
|
||||
do_create_rdc_user
|
||||
|
||||
echo "$GRPC_LIB_DIR" > /etc/ld.so.conf.d/x86_64-librdc_client.conf
|
||||
echo "$GRPC_LIB_DIR"64 >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
|
||||
echo "$RDC_LIB_DIR" >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
|
||||
echo "$RDC_LIB_DIR"64 >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
|
||||
ldconfig
|
||||
|
||||
مرجع در شماره جدید
Block a user