0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-07 23:05:41 +00:00
netdata_netdata/packaging/makeself/jobs/40-bash.install.sh
Austin S. Hemmelgarn 2db8a882e8
Large-scale cleanup of static build infrastructure. ()
* Centralize cache path handling.

* Add better debugging support for static build infrastructure.

* Centralize handling of git repository fetching for static builds.

* Centralize build directory handling in the static build.

And quit using a sub-directory of packaging/makeself from the source
tree for it.

* Remove version numbers from static build jobs.

* Better organize static build jobs.

0x numbers for non-build prep-work
1x numbers for libraries that potentially impact multiple other things
we vendor.
2x numbers for libraries that are direct dependencies of Netdata
3x numbers for combined libraries and tooling used by Netdata
4x numbers for general tooling used by Netdata
5x numbers for tooling used by single specific components
6x numbers for non-build prep-work for the Netdata build
7x numbers for the actual build of Netdata
8x numbers for post-build checks
9x numbers for the actual packaging

* Clean up variable handling in Netdata build job.

* Split post-build handling steps to their own jobs.

This will make it easier to see what is actually going on in the build
process.

* Clean up CI messages.

* Split archive creation sub-steps into indivudal jobs.

* Disable shell tracing for archive creation job.

It’s not needed in 99.9% of cases, and should only be enabled locally if
it is needed.

* Assorted fixes for code restructuring.

* Tidy up paths for runtime check.

* Fix CI handling of artifacts.
2025-03-25 07:00:54 -04:00

53 lines
1.4 KiB
Bash
Executable file

#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
# Source of truth for all the packages we bundle in static builds
. "$(dirname "${0}")/../bundled-packages.version"
# shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building bash" || true
cache_key="bash"
build_dir="bash-${BASH_VERSION}"
fetch "${build_dir}" "${BASH_ARTIFACT_SOURCE}/bash-${BASH_VERSION}.tar.gz" \
"${BASH_ARTIFACT_SHA256}" "${cache_key}"
export CFLAGS="${TUNING_FLAGS} -pipe"
export CXXFLAGS="${CFLAGS}"
export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig"
if [ "${CACHE_HIT:-0}" -eq 0 ]; then
run ./configure \
--prefix="${NETDATA_INSTALL_PATH}" \
--without-bash-malloc \
--enable-static-link \
--enable-net-redirections \
--enable-array-variables \
--disable-progcomp \
--disable-profiling \
--disable-nls \
--disable-dependency-tracking
run make clean
run make -j "$(nproc)"
cat > examples/loadables/Makefile <<-EOF
all:
clean:
install:
EOF
fi
run make install
store_cache "${cache_key}" "${build_dir}"
if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
run strip "${NETDATA_INSTALL_PATH}"/bin/bash
fi
# shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true