Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pointless ENABLE_ACLK/ENABLE_CLOUD split. #17529

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 8 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ option(DEFAULT_FEATURE_STATE "Specify the default state for most optional featur
mark_as_advanced(DEFAULT_FEATURE_STATE)

# High-level features
option(ENABLE_ACLK "Enable Netdata Cloud support (ACLK)" ${DEFAULT_FEATURE_STATE})
option(ENABLE_CLOUD "Enable Netdata Cloud by default at runtime" ${DEFAULT_FEATURE_STATE})
option(ENABLE_CLOUD "Enable Netdata Cloud support (ACLK)" ${DEFAULT_FEATURE_STATE})
option(ENABLE_ML "Enable machine learning features" ${DEFAULT_FEATURE_STATE})
option(ENABLE_DBENGINE "Enable dbengine metrics storage" True)

Expand Down Expand Up @@ -248,7 +247,7 @@ mark_as_advanced(BUILD_FOR_PACKAGING)
cmake_dependent_option(FORCE_LEGACY_LIBBPF "Force usage of libbpf 0.0.9 instead of the latest version." False "ENABLE_PLUGIN_EBPF" False)
mark_as_advanced(FORCE_LEGACY_LIBBPF)

if(ENABLE_ACLK OR ENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE)
if(ENABLE_CLOUD OR ENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE)
set(NEED_PROTOBUF True)
else()
set(NEED_PROTOBUF False)
Expand Down Expand Up @@ -297,6 +296,8 @@ if(ENABLE_PLUGIN_EBPF)
netdata_fetch_ebpf_co_re()
endif()

set(ENABLE_ACLK ${ENABLE_CLOUD})

#
# Libm
#
Expand Down Expand Up @@ -1746,7 +1747,7 @@ endif()
#
# mqtt library
#
if (ENABLE_H2O OR ENABLE_ACLK)
if (ENABLE_H2O OR ENABLE_CLOUD)
set(ENABLE_MQTTWEBSOCKETS True)
endif()

Expand All @@ -1770,7 +1771,7 @@ if(ENABLE_MQTTWEBSOCKETS)

endif()

if(ENABLE_ACLK)
if(ENABLE_CLOUD)
#
# proto definitions
#
Expand Down Expand Up @@ -2276,7 +2277,7 @@ endif()

add_executable(netdata
${NETDATA_FILES}
"$<$<BOOL:${ENABLE_ACLK}>:${ACLK_FILES}>"
"$<$<BOOL:${ENABLE_CLOUD}>:${ACLK_FILES}>"
"$<$<BOOL:${ENABLE_H2O}>:${H2O_FILES}>"
"$<$<BOOL:${ENABLE_EXPORTER_MONGODB}>:${MONGODB_EXPORTING_FILES}>"
"$<$<BOOL:${ENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE}>:${PROMETHEUS_REMOTE_WRITE_EXPORTING_FILES}>"
Expand All @@ -2292,7 +2293,7 @@ target_compile_options(netdata PRIVATE
)

target_include_directories(netdata PRIVATE
"$<$<BOOL:${ENABLE_ACLK}>:${CMAKE_SOURCE_DIR}/src/aclk/aclk-schemas>"
"$<$<BOOL:${ENABLE_CLOUD}>:${CMAKE_SOURCE_DIR}/src/aclk/aclk-schemas>"
"$<$<BOOL:${ENABLE_EXPORTER_MONGODB}>:${MONGOC_INCLUDE_DIRS}>"
"$<$<BOOL:${ENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE}>:${SNAPPY_INCLUDE_DIRS}>"
)
Expand Down Expand Up @@ -2466,12 +2467,6 @@ set(netdata_user_POST "${NETDATA_USER}")

# netdata-claim.sh
if(ENABLE_CLOUD)
set(enable_cloud_POST "yes")
else()
set(enable_cloud_POST "no")
endif()

if(ENABLE_ACLK)
set(enable_aclk_POST "yes")
else()
set(enable_aclk_POST "no")
Expand Down
1 change: 0 additions & 1 deletion netdata.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ happened, on your systems and applications.
%else
-DENABLE_EXPORTER_MONGODB=Off \
%endif
-DENABLE_ACLK=On \
-DENABLE_CLOUD=On \
-DENABLE_DBENGINE=On \
-DENABLE_H2O=On \
Expand Down
1 change: 0 additions & 1 deletion packaging/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ add_cmake_option() {

add_cmake_option CMAKE_BUILD_TYPE RelWithDebInfo
add_cmake_option CMAKE_INSTALL_PREFIX /
add_cmake_option ENABLE_ACLK On
add_cmake_option ENABLE_CLOUD On
add_cmake_option ENABLE_DBENGINE On
add_cmake_option ENABLE_H2O On
Expand Down
1 change: 0 additions & 1 deletion packaging/cmake/config.cmake.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
// enabled features

#cmakedefine ENABLE_OPENSSL
#cmakedefine ENABLE_CLOUD
#cmakedefine ENABLE_ACLK
#cmakedefine ENABLE_ML
#cmakedefine ENABLE_EXPORTING_MONGODB
Expand Down
1 change: 0 additions & 1 deletion packaging/installer/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ prepare_cmake_options() {
enable_feature PLUGIN_LOGS_MANAGEMENT "${ENABLE_LOGS_MANAGEMENT:-0}"
enable_feature LOGS_MANAGEMENT_TESTS "${ENABLE_LOGS_MANAGEMENT_TESTS:-0}"

enable_feature ACLK "${ENABLE_CLOUD:-1}"
enable_feature CLOUD "${ENABLE_CLOUD:-1}"
enable_feature BUNDLED_JSONC "${NETDATA_BUILD_JSON_C:-0}"
enable_feature DBENGINE "${ENABLE_DBENGINE:-1}"
Expand Down
7 changes: 1 addition & 6 deletions src/claim/netdata-claim.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,9 @@ if ! command -v openssl >/dev/null 2>&1 ; then
exit 3
fi

# shellcheck disable=SC2050
if [ "@enable_cloud_POST@" = "no" ]; then
echo >&2 "This agent was built with --disable-cloud and cannot be claimed"
exit 3
fi
# shellcheck disable=SC2050
if [ "@enable_aclk_POST@" != "yes" ]; then
echo >&2 "This agent was built without the dependencies for Cloud and cannot be claimed"
echo >&2 "This agent was built without Netdata Cloud support and cannot be claimed"
exit 3
fi

Expand Down