From 8128af5210538780af89c87f9d87c246baa0b043 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Wed, 20 Mar 2024 14:03:15 -0400 Subject: Move bundling of libyaml to CMake. (#17190) --- netdata-installer.sh | 67 ---------------------------------------------------- 1 file changed, 67 deletions(-) (limited to 'netdata-installer.sh') diff --git a/netdata-installer.sh b/netdata-installer.sh index 50bfa30fae..b8a598dc69 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -623,73 +623,6 @@ bundle_jsonc() { bundle_jsonc -# ----------------------------------------------------------------------------- -build_yaml() { - env_cmd='' - - if [ -z "${DONT_SCRUB_CFLAGS_EVEN_THOUGH_IT_MAY_BREAK_THINGS}" ]; then - env_cmd="env CFLAGS='-fPIC -pipe -Wno-unused-value' CXXFLAGS='-fPIC -pipe' LDFLAGS=" - fi - - cd "${1}" > /dev/null || return 1 - run eval "${env_cmd} ./configure --disable-shared --disable-dependency-tracking --with-pic" - run eval "${env_cmd} ${make} ${MAKEOPTS}" - cd - > /dev/null || return 1 -} - -copy_yaml() { - target_dir="${PWD}/externaldeps/libyaml" - - run mkdir -p "${target_dir}" || return 1 - - run cp "${1}/src/.libs/libyaml.a" "${target_dir}/libyaml.a" || return 1 - run cp "${1}/include/yaml.h" "${target_dir}/" || return 1 -} - -bundle_yaml() { - if pkg-config yaml-0.1; then - BUNDLE_YAML=0 - return 0 - fi - - if [ -z "${make}" ]; then - fatal "Need to bundle libyaml but cannot find a copy of Make to build it with. Either install development files for libyaml, or install a usable copy fo Make." I0016 - fi - - [ -n "${GITHUB_ACTIONS}" ] && echo "::group::Bundling YAML." - - progress "Prepare YAML" - - YAML_PACKAGE_VERSION="$(cat packaging/yaml.version)" - - tmp="$(mktemp -d -t netdata-yaml-XXXXXX)" - YAML_PACKAGE_BASENAME="yaml-${YAML_PACKAGE_VERSION}.tar.gz" - - if fetch_and_verify "yaml" \ - "https://github.com/yaml/libyaml/releases/download/${YAML_PACKAGE_VERSION}/${YAML_PACKAGE_BASENAME}" \ - "${YAML_PACKAGE_BASENAME}" \ - "${tmp}" \ - "${NETDATA_LOCAL_TARBALL_OVERRIDE_YAML}"; then - if run tar --no-same-owner -xf "${tmp}/${YAML_PACKAGE_BASENAME}" -C "${tmp}" && - build_yaml "${tmp}/yaml-${YAML_PACKAGE_VERSION}" && - copy_yaml "${tmp}/yaml-${YAML_PACKAGE_VERSION}" && - rm -rf "${tmp}"; then - run_ok "YAML built and prepared." - BUNDLE_YAML=1 - else - run_failed "Failed to build YAML, critical error." - BUNDLE_YAML=0 - fi - else - run_failed "Unable to fetch sources for YAML, critical error." - BUNDLE_YAML=0 - fi - - [ -n "${GITHUB_ACTIONS}" ] && echo "::endgroup::" -} - -bundle_yaml - # ----------------------------------------------------------------------------- get_kernel_version() { -- cgit v1.2.3