diff options
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-x | netdata-installer.sh | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh index 033c1aefee..50bfa30fae 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -557,91 +557,6 @@ fi trap build_error EXIT # ----------------------------------------------------------------------------- -build_protobuf() { - env_cmd='' - - if [ -z "${DONT_SCRUB_CFLAGS_EVEN_THOUGH_IT_MAY_BREAK_THINGS}" ]; then - env_cmd="env CFLAGS='-fPIC -pipe' CXXFLAGS='-fPIC -pipe' LDFLAGS=" - fi - - cd "${1}" > /dev/null || return 1 - if ! run eval "${env_cmd} ./configure --disable-shared --without-zlib --disable-dependency-tracking --with-pic"; then - cd - > /dev/null || return 1 - return 1 - fi - - if ! run eval "${env_cmd} ${make} ${MAKEOPTS}"; then - cd - > /dev/null || return 1 - return 1 - fi - - cd - > /dev/null || return 1 -} - -copy_protobuf() { - target_dir="${PWD}/externaldeps/protobuf" - - run mkdir -p "${target_dir}" || return 1 - run cp -a "${1}/src" "${target_dir}" || return 1 -} - -bundle_protobuf() { - if [ -n "${NETDATA_DISABLE_CLOUD}" ] && [ -n "${EXPORTER_PROMETHEUS}" ] && [ "${EXPORTER_PROMETHEUS}" -eq 0 ]; then - echo "Skipping protobuf" - return 0 - fi - - if [ -n "${USE_SYSTEM_PROTOBUF}" ]; then - echo "Skipping protobuf" - warning "You have requested use of a system copy of protobuf. This should work, but it is not recommended as it's very likely to break if you upgrade the currently installed version of protobuf." - return 0 - fi - - if [ -z "${make}" ]; then - warning "No usable copy of Make found, which is required for bundling protobuf. Attempting to use a system copy of protobuf instead." - USE_SYSTEM_PROTOBUF=1 - return 0 - fi - - [ -n "${GITHUB_ACTIONS}" ] && echo "::group::Bundling protobuf." - - PROTOBUF_PACKAGE_VERSION="$(cat packaging/protobuf.version)" - - if [ -f "${PWD}/externaldeps/protobuf/.version" ] && [ "${PROTOBUF_PACKAGE_VERSION}" = "$(cat "${PWD}/externaldeps/protobuf/.version")" ] - then - echo >&2 "Found compiled protobuf, same version, not compiling it again. Remove file '${PWD}/externaldeps/protobuf/.version' to recompile." - USE_SYSTEM_PROTOBUF=0 - return 0 - fi - - tmp="$(mktemp -d -t netdata-protobuf-XXXXXX)" - PROTOBUF_PACKAGE_BASENAME="protobuf-cpp-${PROTOBUF_PACKAGE_VERSION}.tar.gz" - - if fetch_and_verify "protobuf" \ - "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_PACKAGE_VERSION}/${PROTOBUF_PACKAGE_BASENAME}" \ - "${PROTOBUF_PACKAGE_BASENAME}" \ - "${tmp}" \ - "${NETDATA_LOCAL_TARBALL_VERRIDE_PROTOBUF}"; then - if run tar --no-same-owner -xf "${tmp}/${PROTOBUF_PACKAGE_BASENAME}" -C "${tmp}" && - build_protobuf "${tmp}/protobuf-${PROTOBUF_PACKAGE_VERSION}" && - copy_protobuf "${tmp}/protobuf-${PROTOBUF_PACKAGE_VERSION}" && - echo "${PROTOBUF_PACKAGE_VERSION}" >"${PWD}/externaldeps/protobuf/.version" && - rm -rf "${tmp}"; then - run_ok "protobuf built and prepared." - USE_SYSTEM_PROTOBUF=0 - else - run_failed "Failed to build protobuf. Netdata Cloud support will not be available in this build." - fi - else - run_failed "Unable to fetch sources for protobuf. Netdata Cloud support will not be available in this build." - fi - - [ -n "${GITHUB_ACTIONS}" ] && echo "::endgroup::" -} - -bundle_protobuf - -# ----------------------------------------------------------------------------- build_jsonc() { env_cmd='' |