diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a19a800..5284dbbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ target_link_libraries(hpcore add_custom_command(TARGET hpcore POST_BUILD # COMMAND strip ./build/hpcore - COMMAND cp ./test/bin/hpws ./test/bin/hpfs ./test/bin/debug_shell ./build/ + COMMAND cp ./test/bin/hpws ./test/bin/hpfs ./test/bin/hpsh ./build/ ) target_precompile_headers(hpcore PUBLIC src/pchheader.hpp) @@ -88,7 +88,7 @@ target_precompile_headers(hpcore PUBLIC src/pchheader.hpp) add_custom_target(docker COMMAND mkdir -p ./test/local-cluster/bin COMMAND cp ./build/hpcore ./test/local-cluster/bin/ - COMMAND cp ./test/bin/libblake3.so ./test/bin/hpws ./test/bin/hpfs ./test/bin/debug_shell ./test/local-cluster/bin/ + COMMAND cp ./test/bin/libblake3.so ./test/bin/hpws ./test/bin/hpfs ./test/bin/hpsh ./test/local-cluster/bin/ COMMAND docker build -t hpcore:latest -t hpcore:0.6.4 -f ./test/local-cluster/Dockerfile ./test/local-cluster/bin/ ) set_target_properties(docker PROPERTIES EXCLUDE_FROM_ALL TRUE) diff --git a/src/conf.cpp b/src/conf.cpp index 89e33a45..184a9fc9 100644 --- a/src/conf.cpp +++ b/src/conf.cpp @@ -244,7 +244,7 @@ namespace conf ctx.hpws_exe_path = ctx.exe_dir + "/" + "hpws"; ctx.hpfs_exe_path = ctx.exe_dir + "/" + "hpfs"; - ctx.debug_shell_exe_path = ctx.exe_dir + "/" + "debug_shell"; + ctx.hpsh_exe_path = ctx.exe_dir + "/" + "hpsh"; ctx.contract_dir = basedir; ctx.config_dir = basedir + "/cfg"; @@ -771,7 +771,7 @@ namespace conf ctx.tls_cert_file, ctx.hpfs_exe_path, ctx.hpws_exe_path, - ctx.debug_shell_exe_path}; + ctx.hpsh_exe_path}; for (const std::string &path : paths) { @@ -783,7 +783,7 @@ namespace conf << "openssl req -newkey rsa:2048 -new -nodes -x509 -days 365 -keyout tlskey.pem -out tlscert.pem\n" << "and add it to " + ctx.config_dir << std::endl; } - else if (path == ctx.hpfs_exe_path || path == ctx.hpws_exe_path || path == ctx.debug_shell_exe_path) + else if (path == ctx.hpfs_exe_path || path == ctx.hpws_exe_path || path == ctx.hpsh_exe_path) { std::cerr << path << " binary does not exist.\n"; } diff --git a/src/conf.hpp b/src/conf.hpp index a025a9db..b5d1e881 100644 --- a/src/conf.hpp +++ b/src/conf.hpp @@ -270,7 +270,7 @@ namespace conf std::string exe_dir; // HotPocket executable dir. std::string hpws_exe_path; // hpws executable file path. std::string hpfs_exe_path; // hpfs executable file path. - std::string debug_shell_exe_path; // debug_shell executable path file + std::string hpsh_exe_path; // debug_shell executable path file std::string contract_dir; // Contract base directory full path. std::string contract_hpfs_dir; // Contract hpfs metadata dir (The location of hpfs log file). diff --git a/src/debug_shell/debug_shell.cpp b/src/debug_shell/debug_shell.cpp index bf25dfa4..582d6a4b 100644 --- a/src/debug_shell/debug_shell.cpp +++ b/src/debug_shell/debug_shell.cpp @@ -48,7 +48,7 @@ namespace debug_shell fd_str.resize(10); snprintf(fd_str.data(), 10, "%d", ctx.control_fds[0]); - char *argv[] = {(char *)conf::ctx.debug_shell_exe_path.data(), fd_str.data(), NULL}; + char *argv[] = {(char *)conf::ctx.hpsh_exe_path.data(), fd_str.data(), NULL}; // Just before we execv the debug_shell binary, we set user execution user/group if specified in hp config. // (Must set gid before setting uid) diff --git a/test/bin/debug_shell b/test/bin/hpsh similarity index 100% rename from test/bin/debug_shell rename to test/bin/hpsh diff --git a/test/docker/Dockerfile.ubt.20.04 b/test/docker/Dockerfile.ubt.20.04 index bf5f8d2e..14bba941 100644 --- a/test/docker/Dockerfile.ubt.20.04 +++ b/test/docker/Dockerfile.ubt.20.04 @@ -13,6 +13,6 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && mkdir /usr/local/bin/hotpocket -COPY hpcore hpfs hpws /usr/local/bin/hotpocket/ +COPY hpcore hpfs hpws hpsh /usr/local/bin/hotpocket/ ENTRYPOINT ["/usr/local/bin/hotpocket/hpcore"] diff --git a/test/docker/build.sh b/test/docker/build.sh index b158d159..3bb7a937 100755 --- a/test/docker/build.sh +++ b/test/docker/build.sh @@ -8,7 +8,7 @@ njsfile="Dockerfile.ubt.20.04-njs" # Prepare build context tmp=$(mktemp -d) -cp $hpcoredir/build/hpcore $hpcoredir/test/bin/{hpfs,hpws,libblake3.so} $tmp/ +cp $hpcoredir/build/hpcore $hpcoredir/test/bin/{hpfs,hpws,hpsh,libblake3.so} $tmp/ strip $tmp/hpcore # Remove the revision component from hp version to make up the image version. diff --git a/test/local-cluster/Dockerfile b/test/local-cluster/Dockerfile index c04e0551..00c7199e 100644 --- a/test/local-cluster/Dockerfile +++ b/test/local-cluster/Dockerfile @@ -2,7 +2,7 @@ FROM evernodedev/hotpocket:latest-ubt.20.04-njs.20 # Copy (overwrite) the local build outputs into the docker image. -COPY hpcore hpfs hpws debug_shell /usr/local/bin/hotpocket/ +COPY hpcore hpfs hpws hpsh /usr/local/bin/hotpocket/ ENTRYPOINT ["/usr/local/bin/hotpocket/hpcore"]