Add .x86_64 and _amd64 suffixes to .rpm and .debs

Also:
* update README documentation
* correct postinst scripts for deb and rpm
* add lib64/ to link_directories (needed for CentOS and others)
* remove a redundant "rdc" from the package names
* rearrange the package names to conform to convention
For example:
rdc-server_1.0.0.0.local-build-0-c3187fb-dirty_amd64.deb
rdc-server_1.0.0.0.local-build-0-c3187fb-dirty.x86_64.rpm

* fix issues that result from having, in essence, 2 different
  install prefixes, 1 for the client and 1 for the server.

Change-Id: I88f0e1b8b72df2793c35ed71534afd91142da012
此提交包含在:
Chris Freehill
2020-06-25 00:20:33 -05:00
父節點 54dcd421e4
當前提交 4008dd8eac
共有 8 個檔案被更改,包括 224 行新增173 行删除
+21 -8
查看文件
@@ -32,17 +32,20 @@ if (NOT DEFINED GRPC_ROOT)
set(GRPC_ROOT "/usr/local")
endif()
if (NOT DEFINED CPACK_PACKAGING_INSTALL_PREFIX)
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm/"
set(CPACK_PACKAGING_INSTALL_PREFIX "/"
CACHE STRING "Default packaging prefix.")
endif()
if (NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/opt/rocm"
set(CMAKE_INSTALL_PREFIX "/"
CACHE STRING "Default installation directory.")
endif()
if (NOT DEFINED RDC_SERVER_ROOT_PATH)
set(RDC_SERVER_ROOT_PATH "/")
endif()
if (NOT DEFINED RDC_CLIENT_INSTALL_PREFIX)
set(RDC_CLIENT_INSTALL_PREFIX "opt/rocm")
endif()
## Set default module path
if(NOT DEFINED CMAKE_MODULE_PATH)
@@ -105,7 +108,6 @@ if (NOT RDC_PACKAGE)
set(RDC_PACKAGE ${RDC})
endif()
set(CPACK_PACKAGE_FILE_NAME "${RDC_PACKAGE}-${PKG_VERSION_STR}")
## Verbose output.
set(CMAKE_VERBOSE_MAKEFILE on)
@@ -145,9 +147,23 @@ foreach(file ${PROTOB_DEF_SRC_FILES})
endforeach()
set(CMAKE_INSTALL_PREFIX ${RDC_SERVER_ROOT_PATH}
CACHE STRING "Default installation directory.")
set(CPACK_PACKAGING_INSTALL_PREFIX ${RDC_SERVER_ROOT_PATH}
CACHE STRING "Default packaging prefix.")
# define all the install component labels to install
set(SERVER_COMPONENT "rdc-server")
set(CLIENT_COMPONENT "rdc-client")
set(SERVER_COMPONENT "server")
set(CLIENT_COMPONENT "client")
set(CPACK_RPM_SERVER_FILE_NAME
"${RDC_PACKAGE}-${SERVER_COMPONENT}_${PKG_VERSION_STR}.x86_64.rpm")
set(CPACK_DEBIAN_SERVER_FILE_NAME
"${RDC_PACKAGE}-${SERVER_COMPONENT}_${PKG_VERSION_STR}_amd64.deb")
set(CPACK_RPM_CLIENT_FILE_NAME
"${RDC_PACKAGE}-${CLIENT_COMPONENT}_${PKG_VERSION_STR}.x86_64.rpm")
set(CPACK_DEBIAN_CLIENT_FILE_NAME
"${RDC_PACKAGE}-${CLIENT_COMPONENT}_${PKG_VERSION_STR}_amd64.deb")
add_subdirectory("server")
add_subdirectory("client")
@@ -158,7 +174,6 @@ add_subdirectory("rdci")
# Turn on cmake "component install"
set(CPACK_DEB_COMPONENT_INSTALL 1)
set(CPACK_RPM_COMPONENT_INSTALL 1)
set(CPACK_COMPONENTS_ALL ${SERVER_COMPONENT} ${CLIENT_COMPONENT})
configure_file(
"${PROJECT_SOURCE_DIR}/src/DEBIAN_postinst.in"
@@ -171,7 +186,6 @@ configure_file(
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/postinst;
${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/prerm")
set(CPACK_DEBIAN_PACKAGE_NAME ${RDC_PACKAGE})
set(CPACK_DEBIAN_PACKAGE_VERSION ${PKG_VERSION_STR})
# RPM package specific variables
@@ -179,7 +193,6 @@ set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/RPM/rpm_post")
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/RPM/rpm_postun")
set(CPACK_RPM_PACKAGE_NAME ${RDC_PACKAGE})
set(CPACK_RPM_PACKAGE_VERSION ${PKG_VERSION_STR})
## Add the packaging directives
+19 -18
查看文件
@@ -44,16 +44,17 @@ endif ()
message("")
message("Build Configuration:")
message("-----------BuildType: " ${CMAKE_BUILD_TYPE})
message("------------Compiler: " ${CMAKE_CXX_COMPILER})
message("-------------Version: " ${CMAKE_CXX_COMPILER_VERSION})
message("--------Proj Src Dir: " ${PROJECT_SOURCE_DIR})
message("--------Proj Bld Dir: " ${PROJECT_BINARY_DIR})
message("--------Proj Lib Dir: " ${PROJECT_BINARY_DIR}/lib)
message("--------Proj Exe Dir: " ${PROJECT_BINARY_DIR}/bin)
message("--------RSMI Lib Dir: " ${RSMI_LIB_DIR})
message("--------RSMI Inc Dir: " ${RSMI_INC_DIR})
message("-------GRPC Root Dir: " ${GRPC_ROOT})
message("-------------BuildType: " ${CMAKE_BUILD_TYPE})
message("--------------Compiler: " ${CMAKE_CXX_COMPILER})
message("---------------Version: " ${CMAKE_CXX_COMPILER_VERSION})
message("----------Proj Src Dir: " ${PROJECT_SOURCE_DIR})
message("----------Proj Bld Dir: " ${PROJECT_BINARY_DIR})
message("----------Proj Lib Dir: " ${PROJECT_BINARY_DIR}/lib)
message("----------Proj Exe Dir: " ${PROJECT_BINARY_DIR}/bin)
message("----------RSMI Lib Dir: " ${RSMI_LIB_DIR})
message("----------RSMI Inc Dir: " ${RSMI_INC_DIR})
message("---------GRPC Root Dir: " ${GRPC_ROOT})
message("-Client Install Prefix: " ${RDC_CLIENT_INSTALL_PREFIX})
message("")
## Set default module path if not already set
@@ -131,7 +132,7 @@ set(CLIENT_LIB_INC_LIST ${CLIENT_LIB_INC_LIST}
set(CLIENT_LIB_INC_LIST ${CLIENT_LIB_INC_LIST}
"${PROJECT_SOURCE_DIR}/common/rdc_utils.h")
link_directories(${GRPC_ROOT}/lib)
link_directories("${GRPC_ROOT}/lib" "${GRPC_ROOT}/lib64")
add_library(${CLIENT_LIB} SHARED ${CLIENT_LIB_SRC_LIST} ${CLIENT_LIB_INC_LIST})
target_link_libraries(${CLIENT_LIB} pthread rt grpc grpc++ grpc++_reflection
dl protobuf)
@@ -158,11 +159,11 @@ endif ()
## Add the install directives for the runtime library.
install(TARGETS ${CLIENT_LIB}
LIBRARY DESTINATION ${RDC}/lib
COMPONENT ${CLIENT_COMPONENT})
# install(FILES ${SOURCE_DIR}/client/include/rdc/rdc_client.h
# DESTINATION ${RDC}/include/rdc
# COMPONENT ${CLIENT_COMPONENT})
LIBRARY DESTINATION ${RDC_CLIENT_INSTALL_PREFIX}/${RDC}/lib
COMPONENT ${CLIENT_COMPONENT})
install(DIRECTORY ${SOURCE_DIR}/authentication
DESTINATION ${RDC_CLIENT_INSTALL_PREFIX}/${RDC}
COMPONENT ${CLIENT_COMPONENT})
# Generate Doxygen documentation for client api manual
find_package(Doxygen)
@@ -189,10 +190,10 @@ if (DOXYGEN_FOUND AND LATEX_FOUND)
add_dependencies(${CLIENT_LIB} docs)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf
DESTINATION ${RDC}/docs/${RDC_MANUAL_NAME}.pdf
DESTINATION ${RDC_CLIENT_INSTALL_PREFIX}/${RDC}/docs/${RDC_MANUAL_NAME}.pdf
COMPONENT ${CLIENT_COMPONENT})
install(FILES ${PROJECT_SOURCE_DIR}/docs/README.md
DESTINATION ${RDC}/docs/
DESTINATION ${RDC_CLIENT_INSTALL_PREFIX}/${RDC}/docs/
COMPONENT ${CLIENT_COMPONENT})
else()
message("Doxygen or Latex is not found. Will not generate documents.")
+166 -117
查看文件
@@ -1,128 +1,169 @@
# Radeon Data Center Tools
TODO: Add general description of RDC, link to github site
# Building RDC
# Running RDC
##### Additional Software Required for Running RDC
In order to run RDC, the following components are required.
Note that the software versions listed are what was used in development.
Earlier versions are not guaranteed to work:
#### Additional Required software for building
In order to build the RDC software, the following components are required. Note that the software versions listed are what was used in development. Earlier versions are not guaranteed to work:
TODO: see if protoc and c++ plugin can be installed from packages rather than built from
source. This will be necessary for CI integration.
* CMake (v3.5.0)
* g++ (5.4.0)
* ROCm
* gRPC and protoc
Unfortunately, gRPC must be built from source as no pre-built .deb or .rpm
packages are available.
See instructions for building gRPC/protoc below.
* [ROCm SMI Library](https://github.com/RadeonOpenCompute/rocm_smi_lib)
* [gRPC and protoc](https://github.com/grpc/grpc/blob/master/src/cpp/README.md#make)
In order to build the latest documentation, the following are required:
* DOxygen (1.8.11)
* latex (pdfTeX 3.14159265-2.6-1.40.16)
#####Building gRPC and protoc
gRPC libraries and the protoc compiler must be installed to both build RDC and
must also be available machines were RDC will run. To build and install gRPC,
follow these steps.
- Get gRPC required tool installation
The source code for RDC is available on [ADD RDC GITHUB URL HERE]().
sudo apt-get install -y automake make g++ unzip
sudo apt-get install -y build-essential autoconf libtool pkg-config
sudo apt-get install -y libgflags-dev libgtest-dev
sudo apt-get install -y clang-5.0 libc++-dev curl
After the RDC library git repository has been cloned to a local Linux machine, building is achieved by following the typical CMake build sequence. Specifically,
##### ```$ mk -p build```
##### ```$ cd build```
##### ```$ cmake -DROCM_DIR=<location of ROCm root, including ROCm SMI> <location of root of ROCm SMI library CMakeLists.txt>```
##### ```$ make```
##### ```# Install library file and header; default location is /opt/rocm```
##### ```$ make install```
The built library will appear in the `build` folder.
**IMPORTANT** Building gRPC and protocol buffers using this method requires
CMake 3.15 or greater. If you use an earlier version of CMake than this, the
build will succeed (aside from an easily missed CMake message), but when gRPC
is installed, not all the required files will be there, so the RDC program
will fail to run.
- Download and build gRPC
#### Building the Documentation
The documentation PDF file can be built with the following steps (continued from the steps above):
##### ```$ make doc```
##### ```$ cd latex```
##### ```$ make```
The reference manual, `refman.pdf` will be in the `latex` directory upon a successful build.
git clone -b v1.28.1 https://github.com/grpc/grpc
cd grpc
git submodule update --init
mkdir -p cmake/build
cd cmake/build
# By default (without using the CMAKE_INSTALL_PREFIX option), the following
# will install to /usr/local lib, include and bin directories
cmake -DgRPC_INSTALL=ON -DBUILD_SHARED_LIBS=ON <-DCMAKE_INSTALL_PREFIX=<install dir>> ../..``
make
sudo make install
sudo ldconfig
#### Building the Tests UPDATE FOR RDC
In order to verify the build and capability of ROCm SMI on your system and to see an example of how ROCm SMI can be used, you may build and run the tests that are available in the repo. To build the tests, follow these steps:
### Installation of RDC
RDC packages can be installed with dpkg or yum for various distros. After RDC
is installed, authentication must be set up before attempting to run an RDC
application.
##### ```$ cd <ROCM SMI source root>```
##### ```$ mkdir lib```
##### ```$ cd lib```
##### ```$ cmake -DROCM_DIR=<ROCM SMI source root> <ROCm SMI source root>/tests/rocm_smi_test```
##### ```$ make
TODO: THE REMAINDER NEEDS TO BE TAILORED FOR RDC
To run the test, execute the program `rsmitst` that is built from the steps above.
###Installation
### Authentication
RDC supports encrypted communications between clients and servers. The communication can be configured to be authenticated or not authenticated.
RDC supports encrypted communications between clients and servers. The
communication can be configured to be authenticated or not authenticated.
##### Unauthenticated Communications
By default, authentication is enabled. To disable authentication, when starting the server use the "--unauth_comm" flag (or "-u" for short). On the client side, when calling rdc_channel_create(), the "secure" argument should be set to false.
By default, authentication is enabled. To disable authentication, when starting
the server use the ``--unauth_comm`` flag (or ``-u`` for short). (The
``/lib/systemd/system/rdc.service`` file can be edited to pass arguments
to rdcd on starting.) On the client side,
when calling rdc_channel_create(), the "secure" argument should be set to false.
##### Public Key Infrastructure (PKI) Authentication
A number of SSL keys and certificates must be generated and installed on the clients and servers for authentication to work properly. By default, the RDC server will look under /etc/rdc for the following keys and certificates:
A number of SSL keys and certificates must be generated and installed on the
clients and servers for authentication to work properly. By default, the RDC
server will look under ``/etc/rdc`` for the following keys and certificates:
- Servers
```sh
$ sudo tree /etc/rdc
/etc/rdc
|-- server
|-- certs
| |-- rdc_cacert.pem
| |-- rdc_server_cert.pem
|-- private
|-- rdc_server_cert.key
```
sudo tree /etc/rdc
/etc/rdc
|-- server
|-- certs
| |-- rdc_cacert.pem
| |-- rdc_server_cert.pem
|-- private
|-- rdc_server_cert.key
- Clients
```sh
$ sudo tree /etc/rdc
/etc/rdc
|-- client
|-- certs
| |-- rdc_cacert.pem
| |-- rdc_client_cert.pem
|-- private
|-- rdc_client_cert.key
```
Machines that are both clients and servers will have both directory structures.
$ sudo tree /etc/rdc
/etc/rdc
|-- client
|-- certs
| |-- rdc_cacert.pem
| |-- rdc_client_cert.pem
|-- private
|-- rdc_client_cert.key
RDC users would normally generate their own keys and certificates. However, there are scripts that will generate self-signed certficates in RDC source tree, under the "authentication" directory. The scripts call the openssl command to generate the required keys and certificates. The openssl command will query the caller for different identifying information. The calls to openssl will refer to the openssl.cnf file for configuration information. Included in this file is a section where default responses to the openssl questions can be specified. Look for the comment line
```sh
# < ** REPLACE VALUES IN THIS SECTION WITH APPROPRIATE VALUES FOR YOUR ORG. **>
```
to find this section. It is helpful to modify this section with values appropriate for your organization if this script will be called many times.
Additionally, the alt_names section needs to be updated for your environment (instead of the dummy values that there initially).
Machines that are both clients and servers will have both directory
structures.
To generate the keys and certficates using these scripts, make the following calls:
RDC users would normally generate their own keys and certificates. However,
there are scripts in the client installation file hierarchy (normally in
``/opt/rocm/rdc/authentication``) that will generate self-signed
certificates in RDC source tree, under the "authentication" directory.
The scripts call the openssl command to generate the required keys and
certificates. The openssl command will query the caller for different
identifying information. The calls to openssl will refer to the
openssl.cnf file for configuration information. Included in this file is
a section where default responses to the openssl questions can be
specified. Look for the comment line
```sh
$ 01gen_root_cert.sh
# provide answers to posed questions
$ 02gen_ssl_artifacts.sh
# provide answers to posed questions
```
At this point, the keys and certficates will be in the newly created "CA/artifacts" directory. This directory should be deleted if you need to rerun the scripts.
# < ** REPLACE VALUES IN THIS SECTION WITH APPROPRIATE VALUES FOR YOUR ORG. **>
To install the keys and certificates, cd into the artifacts directory and run the install.sh script as root, specifying the install location. By default, RDC will expect this to be in /etc/rdc:
to find this section. It is helpful to modify this section with values
appropriate for your organization if this script will be called many times.
```sh
$ cd CA/artifacts
$ sudo install_<client|server>.sh /etc/rdc
```
These files should be copied to and and installed on all client and server machines that are expected to communicate with one another.
Additionally, the alt_names section needs to be updated for your environment
(instead of the dummy values that there initially).
To generate the keys and certificates using these scripts, make the following
calls:
$ 01gen_root_cert.sh
# provide answers to posed questions
$ 02gen_ssl_artifacts.sh
# provide answers to posed questions
At this point, the keys and certificates will be in the newly created
"CA/artifacts" directory. This directory should be deleted if you need to
rerun the scripts.
To install the keys and certificates, cd into the artifacts directory and run
the install.sh script as root, specifying the install location. By default,
RDC will expect this to be in /etc/rdc:
$ cd CA/artifacts
$ sudo install_<client|server>.sh /etc/rdc
These files should be copied to and and installed on all client and server
machines that are expected to communicate with one another.
##### Current Limitations
There are a few limitations on the authentication capabilities. These limitations are temporary and will be eliminated when the server has a configuration file where user preferences can be specified.
* The client and server are hard-coded to look for openssl certificate and key files in /etc/rdc.
There are a few limitations on the authentication capabilities. These
limitations are temporary and will be eliminated when the server has a
configuration file where user preferences can be specified.
* The client and server are hard-coded to look for openssl certificate and key
files in /etc/rdc.
# Starting RDC Server Daemon (RDCD)
In order for an RDC client application to monitor and/or control a remote system, the RDC server daemon, rdcd, must be running on the remote system. rdcd can be configured to run with full capabilities, or with monitoring-only capabilities. "Full capabilities" includes the abilty to set some system functions exposed by the RDC APIs and tools. Changing a system's configuration involves writing to system files. When rdcd is configured to run with full capabilities, it has the ability to write to these system files. Alternatively, rdcd can be run with control functionality disabled. In this case, rdcd does not have the ability to write to the control-related system files. Calls to RDC APIs (or tools that invoke these APIs) will result in a permission-related failure when configured for limited functionality. This reduced mode can be used to prevent someone from inadvertantly or maliciously putting a system into an unwanted state.
In order for an RDC client application to monitor and/or control a remote
system, the RDC server daemon, rdcd, must be running on the remote system.
rdcd can be configured to run with full capabilities, or with monitoring-only
capabilities. "Full capabilities" includes the ability to set some system
functions exposed by the RDC APIs and tools. Changing a system's configuration
involves writing to system files. When rdcd is configured to run with full
capabilities, it has the ability to write to these system files. Alternatively,
rdcd can be run with control functionality disabled. In this case, rdcd does
not have the ability to write to the control-related system files. Calls to RDC
APIs (or tools that invoke these APIs) will result in a permission-related
failure when configured for limited functionality. This reduced mode can be
used to prevent someone from inadvertently or maliciously putting a system
into an unwanted state.
Which configuration is used depends on how rdcd is started, and certain settings in the rdc.service systemd configuration file.
Which configuration is used depends on how rdcd is started, and certain
settings in the rdc.service systemd configuration file.
###Starting rdcd with systemctl
rdcd can be started by using the systemctl command.
@@ -130,44 +171,52 @@ rdcd can be started by using the systemctl command.
#####Starting rdcd with systemctl
When starting rdcd using systemctl, like this:
```sh
$ systemctl start rdc
```
systemctl will read /lib/systemd/system/rdc.service, which is installed with rdc. This file has 2 lines that control what capabilities with which rdcd will run. If left uncommented, rdcd will run with full capabilities, as shown below:
```sh
CapabilityBoundingSet=CAP_DAC_OVERRIDE
AmbientCapabilities=CAP_DAC_OVERRIDE
```
systemctl start rdc
When these lines are commented with `#`, rdcd will run with monitor-only capabilty.
systemctl will read /lib/systemd/system/rdc.service, which is installed with
rdc. This file has 2 lines that control what capabilities with which rdcd
will run. If left uncommented, rdcd will run with full capabilities, as
shown below:
CapabilityBoundingSet=CAP_DAC_OVERRIDE
AmbientCapabilities=CAP_DAC_OVERRIDE
When these lines are commented with ``#``, rdcd will run with monitor-only
capabilty.
###Starting rdcd Directly
rdcd can also be started by directly invoking rdcd from the command line, like this:
rdcd can also be started by directly invoking rdcd from the command line,
like this:
```sh
# Start as user rdc
$ sudo -u rdc rdcd
```
# Start as user rdc
sudo -u rdc rdcd
```sh
# Start as root
$ sudo rdcd
```
or
Note how rdcd must be started as user "rdc" or root. Other regular user accounts will not work. This is because rdcd will need access to private SSL keys and certificates, owned by rdc.
When run from the command line, the rdc.service file mentioned in the previous section does not come into play. What determines the level of capability is the level of capability of the id under which rdcd is started. If rdcd is directly started as root, then rdcd will have monitor and control capability. If rdcd is directly started with a normal user account, then it will have monitor-only capability.
# Start as root
sudo rdcd
Note how rdcd must be started as user "rdc" or root. Other regular user
accounts will not normally work. This is because rdcd will need access to
private SSL keys and certificates, owned by rdc. In order to run rdcd
under a different account, the SSL keys would need to be accessible by
that account.
###Other Notes about rdcd
* Only 1 instance of rdcd should be running at a time.
* rdcd runs under the "rdc" user id
When run from the command line, the rdc.service file mentioned in the previous
section does not come into play. What determines the level of capability is
the level of capability of the id under which rdcd is started. If rdcd is
directly started as root, then rdcd will have monitor and control capability.
If rdcd is directly started with a normal user account, then it will have
monitor-only capability.
###Troubleshooting rdcd
When rdcd is started using systemctl, we can view messages that can help debug
problems with either starting rdcd or with communications with a client using
the ``journalctl`` command. To view rdcd logs, issue the following command on
the server
###Running with Monitor-Only Capability ("Limited Capability")
# Hello RDC
journalctl -u rdc
+3 -4
查看文件
@@ -39,7 +39,6 @@ else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb -O0 -DDEBUG")
endif ()
set(RDC_LIB_ROOT_PATH "${RDC_SERVER_ROOT_PATH}opt/rocm/")
# Required Defines first:
@@ -159,7 +158,7 @@ set(RDC_LIB_INC_LIST ${RDC_LIB_INC_LIST} "${RDC_LIB_INC_DIR}/rdc_lib/impl/RdcWat
message("RDC_LIB_INC_LIST=${RDC_LIB_INC_LIST}")
link_directories(${RSMI_LIB_DIR} "${GRPC_ROOT}/lib")
link_directories(${RSMI_LIB_DIR} "${GRPC_ROOT}/lib" "${GRPC_ROOT}/lib64")
add_library(${RDC_LIB} SHARED ${RDC_LIB_SRC_LIST} ${RDC_LIB_INC_LIST})
target_link_libraries(${RDC_LIB} pthread rocm_smi64)
target_include_directories(${RDC_LIB} PRIVATE
@@ -224,10 +223,10 @@ endif ()
## Add the install directives for the runtime library.
install(TARGETS ${BOOTSTRAP_LIB} ${RDC_LIB} ${RDCCLIENT_LIB}
LIBRARY DESTINATION ${RDC}/lib
LIBRARY DESTINATION ${RDC_CLIENT_INSTALL_PREFIX}/${RDC}/lib
COMPONENT ${CLIENT_COMPONENT})
install(FILES ${SOURCE_DIR}/include/rdc/rdc.h
DESTINATION ${RDC}/include/rdc
DESTINATION ${RDC_CLIENT_INSTALL_PREFIX}/${RDC}/include/rdc
COMPONENT ${CLIENT_COMPONENT})
message("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
+1 -1
查看文件
@@ -95,7 +95,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RDCI_EXE}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
COMPONENT ${CLIENT_COMPONENT}
DESTINATION ${RDC}/bin)
DESTINATION ${RDC_CLIENT_INSTALL_PREFIX}/${RDC}/bin)
message("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
+12 -23
查看文件
@@ -29,33 +29,22 @@ message("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&")
message("")
message("Build Configuration:")
message("-----------BuildType: " ${CMAKE_BUILD_TYPE})
message("------------Compiler: " ${CMAKE_CXX_COMPILER})
message("-------------Version: " ${CMAKE_CXX_COMPILER_VERSION})
message("--------Proj Src Dir: " ${PROJECT_SOURCE_DIR})
message("--------Proj Bld Dir: " ${PROJECT_BINARY_DIR})
message("--------Proj Lib Dir: " ${PROJECT_BINARY_DIR}/lib)
message("--------Proj Exe Dir: " ${PROJECT_BINARY_DIR}/bin)
message("--------RSMI Lib Dir: " ${RSMI_LIB_DIR})
message("--------RSMI Inc Dir: " ${RSMI_INC_DIR})
message("-------GRPC Root Dir: " ${GRPC_ROOT})
message("-------------BuildType: " ${CMAKE_BUILD_TYPE})
message("--------------Compiler: " ${CMAKE_CXX_COMPILER})
message("---------------Version: " ${CMAKE_CXX_COMPILER_VERSION})
message("----------Proj Src Dir: " ${PROJECT_SOURCE_DIR})
message("----------Proj Bld Dir: " ${PROJECT_BINARY_DIR})
message("----------Proj Lib Dir: " ${PROJECT_BINARY_DIR}/lib)
message("----------Proj Exe Dir: " ${PROJECT_BINARY_DIR}/bin)
message("----------RSMI Lib Dir: " ${RSMI_LIB_DIR})
message("----------RSMI Inc Dir: " ${RSMI_INC_DIR})
message("---------GRPC Root Dir: " ${GRPC_ROOT})
message("---Server Install Path: " ${RDC_SERVER_ROOT_PATH})
message("")
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CACHE STRING "Location of RDC client library source code.")
message("CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
message("CPACK_PACKAGING_INSTALL_PREFIX=${CPACK_PACKAGING_INSTALL_PREFIX}")
if (NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX ${RDC_SERVER_ROOT_PATH}
CACHE STRING "Default installation directory.")
endif()
if (NOT DEFINED CPACK_PACKAGING_INSTALL_PREFIX)
set(CPACK_PACKAGING_INSTALL_PREFIX ${RDC_SERVER_ROOT_PATH}
CACHE STRING "Default packaging prefix.")
endif()
## Compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -m64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2 -std=c++11 ")
@@ -94,7 +83,7 @@ message("SERVER_SRC_LIST=${SERVER_SRC_LIST}")
set(SERVER_DAEMON_EXE "rdcd")
set(SERVICE_FILE_NAME "rdc.service")
link_directories(${RSMI_LIB_DIR} ${GRPC_ROOT}/lib)
link_directories(${RSMI_LIB_DIR} "${GRPC_ROOT}/lib" "${GRPC_ROOT}/lib64")
add_executable(${SERVER_DAEMON_EXE} "${SERVER_SRC_LIST}")
# target_include_directories(${SERVER_DAEMON_EXE} PUBLIC ${RSMI_INC_DIR})
+1 -1
查看文件
@@ -1,6 +1,6 @@
#/bin/bash
RDC_LIB_DIR=@RDC_CLIENT_ROOT_PATH@rdc/lib
RDC_LIB_DIR=/opt/rocm/rdc/lib
# This will return 0 if an id is created and non-zero if
# it already exists
+1 -1
查看文件
@@ -1,6 +1,6 @@
#!/bin/bash
RDC_LIB_DIR=@RDC_CLIENT_ROOT_PATH@/rdc/lib
RDC_LIB_DIR=/opt/rocm/rdc/lib
do_create_rdc_user() {
useradd -r -s /bin/nologin rdc
}