50-bash-5.1.16.install.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/usr/bin/env bash
  2. # SPDX-License-Identifier: GPL-3.0-or-later
  3. # shellcheck source=packaging/makeself/functions.sh
  4. . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
  5. # Source of truth for all the packages we bundle in static builds
  6. . "$(dirname "${0}")/../bundled-packages.version"
  7. # shellcheck disable=SC2015
  8. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building bash" || true
  9. fetch "bash-${BASH_VERSION}" "${BASH_ARTIFACT_SOURCE}/bash-${BASH_VERSION}.tar.gz" \
  10. "${BASH_ARTIFACT_SHA256}" bash
  11. export CFLAGS="-pipe"
  12. export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig"
  13. if [ "${CACHE_HIT:-0}" -eq 0 ]; then
  14. run ./configure \
  15. --prefix="${NETDATA_INSTALL_PATH}" \
  16. --without-bash-malloc \
  17. --enable-static-link \
  18. --enable-net-redirections \
  19. --enable-array-variables \
  20. --disable-progcomp \
  21. --disable-profiling \
  22. --disable-nls \
  23. --disable-dependency-tracking
  24. run make clean
  25. run make -j "$(nproc)"
  26. cat > examples/loadables/Makefile <<-EOF
  27. all:
  28. clean:
  29. install:
  30. EOF
  31. fi
  32. run make install
  33. store_cache bash "${NETDATA_MAKESELF_PATH}/tmp/bash-${BASH_VERSION}"
  34. if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
  35. run strip "${NETDATA_INSTALL_PATH}"/bin/bash
  36. fi
  37. # shellcheck disable=SC2015
  38. [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true