diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-09 04:52:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-09 04:52:39 +0000 |
commit | 89f3604407aff8f4cb2ed958252c61e23c767e24 (patch) | |
tree | 7fbf408102cab051557d38193524d8c6e991d070 /packaging/makeself/jobs | |
parent | Adding upstream version 1.34.1. (diff) | |
download | netdata-89f3604407aff8f4cb2ed958252c61e23c767e24.tar.xz netdata-89f3604407aff8f4cb2ed958252c61e23c767e24.zip |
Adding upstream version 1.35.0.upstream/1.35.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/makeself/jobs')
-rwxr-xr-x | packaging/makeself/jobs/20-openssl.install.sh | 31 | ||||
-rwxr-xr-x | packaging/makeself/jobs/50-bash-5.1.16.install.sh | 48 | ||||
-rwxr-xr-x | packaging/makeself/jobs/50-curl-7.82.0.install.sh | 72 | ||||
-rwxr-xr-x | packaging/makeself/jobs/50-fping-5.1.install.sh | 38 | ||||
-rwxr-xr-x | packaging/makeself/jobs/50-ioping-1.2.install.sh | 17 | ||||
-rwxr-xr-x | packaging/makeself/jobs/70-netdata-git.install.sh | 13 |
6 files changed, 133 insertions, 86 deletions
diff --git a/packaging/makeself/jobs/20-openssl.install.sh b/packaging/makeself/jobs/20-openssl.install.sh index 96d53fc86..5d9aa068e 100755 --- a/packaging/makeself/jobs/20-openssl.install.sh +++ b/packaging/makeself/jobs/20-openssl.install.sh @@ -9,19 +9,40 @@ version="$(cat "$(dirname "${0}")/../openssl.version")" -export CFLAGS='-fno-lto' +export CFLAGS='-fno-lto -pipe' export LDFLAGS='-static' export PKG_CONFIG="pkg-config --static" -# Might be bind-mounted -if [ ! -d "${NETDATA_MAKESELF_PATH}/tmp/openssl" ]; then +if [ -d "${NETDATA_MAKESELF_PATH}/tmp/openssl" ]; then + rm -rf "${NETDATA_MAKESELF_PATH}/tmp/openssl" +fi + +if [ -d "${NETDATA_MAKESELF_PATH}/tmp/openssl" ]; then + rm -rf "${NETDATA_MAKESELF_PATH}/tmp/openssl" +fi + +cache="${NETDATA_SOURCE_PATH}/artifacts/cache/${BUILDARCH}/openssl" + +if [ -d "${cache}" ]; then + echo "Found cached copy of build directory for openssl, using it." + cp -a "${cache}/openssl" "${NETDATA_MAKESELF_PATH}/tmp/" + CACHE_HIT=1 +else + echo "No cached copy of build directory for openssl found, fetching sources instead." run git clone --branch "${version}" --single-branch --depth 1 git://git.openssl.org/openssl.git "${NETDATA_MAKESELF_PATH}/tmp/openssl" + CACHE_HIT=0 fi + cd "${NETDATA_MAKESELF_PATH}/tmp/openssl" || exit 1 -run ./config -static no-tests --prefix=/openssl-static --openssldir=/opt/netdata/etc/ssl -run make -j "$(nproc)" +if [ "${CACHE_HIT:-0}" -eq 0 ]; then + run ./config -static no-tests --prefix=/openssl-static --openssldir=/opt/netdata/etc/ssl + run make -j "$(nproc)" +fi + run make -j "$(nproc)" install_sw +store_cache openssl "${NETDATA_MAKESELF_PATH}/tmp/openssl" + # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true diff --git a/packaging/makeself/jobs/50-bash-5.1.16.install.sh b/packaging/makeself/jobs/50-bash-5.1.16.install.sh index d5cdfff1c..d9f6e5bb0 100755 --- a/packaging/makeself/jobs/50-bash-5.1.16.install.sh +++ b/packaging/makeself/jobs/50-bash-5.1.16.install.sh @@ -4,35 +4,43 @@ # shellcheck source=packaging/makeself/functions.sh . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 +version="5.1.16" + # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building bash" || true -fetch "bash-5.1.16" "http://ftp.gnu.org/gnu/bash/bash-5.1.16.tar.gz" \ - 5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558 +fetch "bash-${version}" "http://ftp.gnu.org/gnu/bash/bash-${version}.tar.gz" \ + 5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558 bash +export CFLAGS="-pipe" export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig" -run ./configure \ - --prefix="${NETDATA_INSTALL_PATH}" \ - --without-bash-malloc \ - --enable-static-link \ - --enable-net-redirections \ - --enable-array-variables \ - --disable-progcomp \ - --disable-profiling \ - --disable-nls - -run make clean -run make -j "$(nproc)" - -cat > examples/loadables/Makefile << EOF -all: -clean: -install: -EOF +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 bash "${NETDATA_MAKESELF_PATH}/tmp/bash-${version}" + if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then run strip "${NETDATA_INSTALL_PATH}"/bin/bash fi diff --git a/packaging/makeself/jobs/50-curl-7.82.0.install.sh b/packaging/makeself/jobs/50-curl-7.82.0.install.sh index f8fa4042c..251d35095 100755 --- a/packaging/makeself/jobs/50-curl-7.82.0.install.sh +++ b/packaging/makeself/jobs/50-curl-7.82.0.install.sh @@ -4,48 +4,56 @@ # shellcheck source=packaging/makeself/functions.sh . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 +version="7.82.0" + # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true -fetch "curl-7.82.0" "https://curl.haxx.se/download/curl-7.82.0.tar.gz" \ - 910cc5fe279dc36e2cca534172c94364cf3fcf7d6494ba56e6c61a390881ddce +fetch "curl-${version}" "https://curl.haxx.se/download/curl-${version}.tar.gz" \ + 910cc5fe279dc36e2cca534172c94364cf3fcf7d6494ba56e6c61a390881ddce curl -export CFLAGS="-I/openssl-static/include" +export CFLAGS="-I/openssl-static/include -pipe" export LDFLAGS="-static -L/openssl-static/lib" export PKG_CONFIG="pkg-config --static" export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig" -run autoreconf -fi - -run ./configure \ - --prefix="${NETDATA_INSTALL_PATH}" \ - --enable-optimize \ - --disable-shared \ - --enable-static \ - --enable-http \ - --disable-ldap \ - --disable-ldaps \ - --enable-proxy \ - --disable-dict \ - --disable-telnet \ - --disable-tftp \ - --disable-pop3 \ - --disable-imap \ - --disable-smb \ - --disable-smtp \ - --disable-gopher \ - --enable-ipv6 \ - --enable-cookies \ - --with-ca-fallback \ - --with-openssl - -# Curl autoconf does not honour the curl_LDFLAGS environment variable -run sed -i -e "s/LDFLAGS =/LDFLAGS = -all-static/" src/Makefile - -run make clean -run make -j "$(nproc)" +if [ "${CACHE_HIT:-0}" -eq 0 ]; then + run autoreconf -fi + + run ./configure \ + --prefix="${NETDATA_INSTALL_PATH}" \ + --enable-optimize \ + --disable-shared \ + --enable-static \ + --enable-http \ + --disable-ldap \ + --disable-ldaps \ + --enable-proxy \ + --disable-dict \ + --disable-telnet \ + --disable-tftp \ + --disable-pop3 \ + --disable-imap \ + --disable-smb \ + --disable-smtp \ + --disable-gopher \ + --enable-ipv6 \ + --enable-cookies \ + --with-ca-fallback \ + --with-openssl \ + --disable-dependency-tracking + + # Curl autoconf does not honour the curl_LDFLAGS environment variable + run sed -i -e "s/LDFLAGS =/LDFLAGS = -all-static/" src/Makefile + + run make clean + run make -j "$(nproc)" +fi + run make install +store_cache curl "${NETDATA_MAKESELF_PATH}/tmp/curl-${version}" + if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then run strip "${NETDATA_INSTALL_PATH}"/bin/curl fi diff --git a/packaging/makeself/jobs/50-fping-5.1.install.sh b/packaging/makeself/jobs/50-fping-5.1.install.sh index e1435e944..644b5524a 100755 --- a/packaging/makeself/jobs/50-fping-5.1.install.sh +++ b/packaging/makeself/jobs/50-fping-5.1.install.sh @@ -4,31 +4,39 @@ # shellcheck source=packaging/makeself/functions.sh . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 +version="5.1" + # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building fping" || true -fetch "fping-5.1" "https://fping.org/dist/fping-5.1.tar.gz" \ - 1ee5268c063d76646af2b4426052e7d81a42b657e6a77d8e7d3d2e60fd7409fe +fetch "fping-${version}" "https://fping.org/dist/fping-${version}.tar.gz" \ + 1ee5268c063d76646af2b4426052e7d81a42b657e6a77d8e7d3d2e60fd7409fe fping -export CFLAGS="-static -I/openssl-static/include" +export CFLAGS="-static -I/openssl-static/include -pipe" export LDFLAGS="-static -L/openssl-static/lib" export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig" -run ./configure \ - --prefix="${NETDATA_INSTALL_PATH}" \ - --enable-ipv4 \ - --enable-ipv6 - -cat > doc/Makefile << EOF -all: -clean: -install: -EOF +if [ "${CACHE_HIT:-0}" -eq 0 ]; then + run ./configure \ + --prefix="${NETDATA_INSTALL_PATH}" \ + --enable-ipv4 \ + --enable-ipv6 \ + --disable-dependency-tracking + + cat > doc/Makefile <<-EOF + all: + clean: + install: + EOF + + run make clean + run make -j "$(nproc)" +fi -run make clean -run make -j "$(nproc)" run make install +store_cache fping "${NETDATA_MAKESELF_PATH}/tmp/fping-${version}" + if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then run strip "${NETDATA_INSTALL_PATH}"/bin/fping fi diff --git a/packaging/makeself/jobs/50-ioping-1.2.install.sh b/packaging/makeself/jobs/50-ioping-1.2.install.sh index 9e9505022..160f45b98 100755 --- a/packaging/makeself/jobs/50-ioping-1.2.install.sh +++ b/packaging/makeself/jobs/50-ioping-1.2.install.sh @@ -4,19 +4,26 @@ # shellcheck source=packaging/makeself/functions.sh . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 +version='1.2' + # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building ioping" || true -fetch "ioping-1.2" "https://github.com/koct9i/ioping/archive/v1.2.tar.gz" \ - d3e4497c653a1e96df67c72ce2b70da18e9f5e3b93179a5bb57a6e30ceacfa75 +fetch "ioping-${version}" "https://github.com/koct9i/ioping/archive/v${version}.tar.gz" \ + d3e4497c653a1e96df67c72ce2b70da18e9f5e3b93179a5bb57a6e30ceacfa75 ioping + +export CFLAGS="-static -pipe" -export CFLAGS="-static" +if [ "${CACHE_HIT:-0}" -eq 0 ]; then + run make clean + run make -j "$(nproc)" +fi -run make clean -run make -j "$(nproc)" run mkdir -p "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ run install -o root -g root -m 4750 ioping "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ +store_cache ioping "${NETDATA_MAKESELF_PATH}/tmp/ioping-${version}" + if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ioping fi diff --git a/packaging/makeself/jobs/70-netdata-git.install.sh b/packaging/makeself/jobs/70-netdata-git.install.sh index 98fc4dbe8..ea6902a44 100755 --- a/packaging/makeself/jobs/70-netdata-git.install.sh +++ b/packaging/makeself/jobs/70-netdata-git.install.sh @@ -7,9 +7,9 @@ cd "${NETDATA_SOURCE_PATH}" || exit 1 if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then - export CFLAGS="-static -O3 -I/openssl-static/include" + export CFLAGS="-static -O2 -I/openssl-static/include -pipe" else - export CFLAGS="-static -O1 -ggdb -Wall -Wextra -Wformat-signedness -fstack-protector-all -D_FORTIFY_SOURCE=2 -DNETDATA_INTERNAL_CHECKS=1 -I/openssl-static/include" + export CFLAGS="-static -O1 -pipe -ggdb -Wall -Wextra -Wformat-signedness -fstack-protector-all -D_FORTIFY_SOURCE=2 -DNETDATA_INTERNAL_CHECKS=1 -I/openssl-static/include" fi export LDFLAGS="-static -L/openssl-static/lib" @@ -32,7 +32,8 @@ run ./netdata-installer.sh \ --dont-start-it \ --require-cloud \ --use-system-protobuf \ - --dont-scrub-cflags-even-though-it-may-break-things + --dont-scrub-cflags-even-though-it-may-break-things \ + --one-time-build # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Finishing netdata install" || true @@ -53,11 +54,5 @@ if run readelf -l "${NETDATA_INSTALL_PATH}"/bin/netdata | grep 'INTERP'; then exit 1 fi -if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then - run strip "${NETDATA_INSTALL_PATH}"/bin/netdata - run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/apps.plugin - run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/cgroup-network -fi - # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true |