From 08ffb8f93de5892c6928a51a3be9ddf3c619be7c Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Tue, 14 Feb 2023 10:28:53 +0100 Subject: [PATCH] Install only "programs" directory during build --- docker/packager/binary/build.sh | 2 +- programs/CMakeLists.txt | 5 +++++ utils/report/CMakeLists.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docker/packager/binary/build.sh b/docker/packager/binary/build.sh index 014f038c5bd..7499aceae2e 100755 --- a/docker/packager/binary/build.sh +++ b/docker/packager/binary/build.sh @@ -98,7 +98,7 @@ ccache_status if [ -n "$MAKE_DEB" ]; then # No quotes because I want it to expand to nothing if empty. # shellcheck disable=SC2086 - DESTDIR=/build/packages/root ninja $NINJA_FLAGS install + DESTDIR=/build/packages/root ninja $NINJA_FLAGS programs/install cp /build/programs/clickhouse-diagnostics /build/packages/root/usr/bin cp /build/programs/clickhouse-diagnostics /output bash -x /build/packages/build diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index 9e4f66562ca..5b97daf2998 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -59,6 +59,8 @@ option (ENABLE_CLICKHOUSE_SU "A tool similar to 'su'" ${ENABLE_CLICKHOUSE_ALL}) option (ENABLE_CLICKHOUSE_DISKS "A tool to manage disks" ${ENABLE_CLICKHOUSE_ALL}) +option (ENABLE_CLICKHOUSE_REPORT "A tiny tool to collect a clickhouse-server state" ${ENABLE_CLICKHOUSE_ALL}) + if (NOT ENABLE_NURAFT) # RECONFIGURE_MESSAGE_LEVEL should not be used here, # since ENABLE_NURAFT is set to OFF for FreeBSD and Darwin. @@ -370,6 +372,9 @@ if (ENABLE_CLICKHOUSE_SU) install (FILES "${CMAKE_CURRENT_BINARY_DIR}/clickhouse-su" DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse) list(APPEND CLICKHOUSE_BUNDLE clickhouse-su) endif () +if (ENABLE_CLICKHOUSE_REPORT) + include(${ClickHouse_SOURCE_DIR}/utils/report/CMakeLists.txt) +endif () if (ENABLE_CLICKHOUSE_KEEPER) if (NOT BUILD_STANDALONE_KEEPER AND CREATE_KEEPER_SYMLINK) diff --git a/utils/report/CMakeLists.txt b/utils/report/CMakeLists.txt index e39dd155b15..b2f9b9bf2eb 100644 --- a/utils/report/CMakeLists.txt +++ b/utils/report/CMakeLists.txt @@ -1 +1 @@ -install (PROGRAMS clickhouse-report DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse) +install (PROGRAMS "${CMAKE_CURRENT_LIST_DIR}/clickhouse-report" DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse)