From 05c6bba3eebde0d78b96dca135a5dbeed45d90f5 Mon Sep 17 00:00:00 2001 From: Tang Yiwei Date: Wed, 28 Sep 2022 14:30:21 +0800 Subject: [PATCH 1/3] Set CMAKE_CXX_STANDARD to 20 The upstream needs C++ version at least to c++ 20. So update it. Signed-off-by: Tang Yiwei --- CMakeLists.txt | 2 +- NodeManagerProxy.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b7c4b6..0b66e8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.5 FATAL_ERROR) project (node-manager-proxy CXX) -set (CMAKE_CXX_STANDARD 17) +set (CMAKE_CXX_STANDARD 20) set (CMAKE_CXX_STANDARD_REQUIRED ON) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti") diff --git a/NodeManagerProxy.hpp b/NodeManagerProxy.hpp index 15d4e97..bdeeafe 100644 --- a/NodeManagerProxy.hpp +++ b/NodeManagerProxy.hpp @@ -13,6 +13,7 @@ * limitations under the License. */ +#include #include #include #include From 5c0c46dbb6f3bd48d55df1800c17b0be914cbae0 Mon Sep 17 00:00:00 2001 From: Jian Zhang Date: Thu, 29 Jun 2023 23:37:14 +0800 Subject: [PATCH 2/3] fix package error The upstream requires that nothing be installed in the /lib directory, it should be installed in the /usr/lib directory. Signed-off-by: Jian Zhang --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b66e8e..364eaa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,4 +40,4 @@ link_directories (${EXTERNAL_INSTALL_LOCATION}/lib) set (SERVICE_FILES ${PROJECT_SOURCE_DIR}/node-manager-proxy.service) install (TARGETS ${PROJECT_NAME} DESTINATION sbin) -install (FILES ${SERVICE_FILES} DESTINATION /lib/systemd/system/) +install (FILES ${SERVICE_FILES} DESTINATION /usr/lib/systemd/system/) From 7da18aabb35b79b5077277dcfdc23f431fe118d4 Mon Sep 17 00:00:00 2001 From: Jian Zhang Date: Mon, 24 Jul 2023 15:25:17 +0800 Subject: [PATCH 3/3] Add manager path `/xyz/openbmc_project/sensors` For the bmcweb requires, get the sensor data need call the method `GetManagedObjects`, and the path is `/xyz/openbmc_project/sensors`. So, Add the manager path: `/xyz/openbmc_project/sensors`. Signed-off-by: Jian Zhang --- NodeManagerProxy.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NodeManagerProxy.cpp b/NodeManagerProxy.cpp index 54fa936..756bc45 100644 --- a/NodeManagerProxy.cpp +++ b/NodeManagerProxy.cpp @@ -183,6 +183,8 @@ void createAssociations() */ int main(int argc, char *argv[]) { + server.add_manager("/xyz/openbmc_project/sensors"); + conn->request_name(nmdBus); createSensors(); createAssociations();