From 5f647647b2683875bdbed970d955a9e5123284bd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 4 Sep 2023 10:57:49 +0200 Subject: Merging upstream version 1.42.2. Signed-off-by: Daniel Baumann --- packaging/docker/Dockerfile | 2 +- packaging/makeself/curl.version | 1 + packaging/makeself/jobs/20-openssl.install.sh | 11 +++- packaging/makeself/jobs/50-bash-5.1.16.install.sh | 2 +- packaging/makeself/jobs/50-curl-7.87.0.install.sh | 62 ------------------ packaging/makeself/jobs/50-curl.install.sh | 77 +++++++++++++++++++++++ packaging/makeself/jobs/70-netdata-git.install.sh | 6 +- packaging/makeself/openssl.version | 2 +- packaging/version | 2 +- 9 files changed, 95 insertions(+), 70 deletions(-) create mode 100644 packaging/makeself/curl.version delete mode 100755 packaging/makeself/jobs/50-curl-7.87.0.install.sh create mode 100755 packaging/makeself/jobs/50-curl.install.sh (limited to 'packaging') diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile index cf6370362..3d05d9d2c 100644 --- a/packaging/docker/Dockerfile +++ b/packaging/docker/Dockerfile @@ -28,7 +28,7 @@ WORKDIR /opt/netdata.git RUN chmod +x netdata-installer.sh && \ cp -rp /deps/* /usr/local/ && \ /bin/echo -e "INSTALL_TYPE='oci'\nPREBUILT_ARCH='$(uname -m)'" > ./system/.install-type && \ - CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections" ./netdata-installer.sh --dont-wait --dont-start-it --use-system-protobuf \ + CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections -Wl,-z,stack-size=8388608" ./netdata-installer.sh --dont-wait --dont-start-it --use-system-protobuf \ ${EXTRA_INSTALL_OPTS} --one-time-build --enable-lto "$([ "$RELEASE_CHANNEL" = stable ] && echo --stable-channel)" # files to one directory diff --git a/packaging/makeself/curl.version b/packaging/makeself/curl.version new file mode 100644 index 000000000..7bfa34ed1 --- /dev/null +++ b/packaging/makeself/curl.version @@ -0,0 +1 @@ +curl-8_2_1 diff --git a/packaging/makeself/jobs/20-openssl.install.sh b/packaging/makeself/jobs/20-openssl.install.sh index 35667a51f..04ec2626f 100755 --- a/packaging/makeself/jobs/20-openssl.install.sh +++ b/packaging/makeself/jobs/20-openssl.install.sh @@ -36,13 +36,22 @@ fi cd "${NETDATA_MAKESELF_PATH}/tmp/openssl" || exit 1 if [ "${CACHE_HIT:-0}" -eq 0 ]; then - run ./config -static no-tests --prefix=/openssl-static --openssldir=/opt/netdata/etc/ssl + sed -i "s/disable('static', 'pic', 'threads');/disable('static', 'pic');/" Configure + run ./config -static threads no-tests --prefix=/openssl-static --openssldir=/opt/netdata/etc/ssl run make -j "$(nproc)" fi run make -j "$(nproc)" install_sw +if [ -d "/openssl-static/lib" ]; then + cd "/openssl-static" || exit 1 + ln -s "lib" "lib64" || true + cd - || exit 1 +fi + store_cache openssl "${NETDATA_MAKESELF_PATH}/tmp/openssl" +perl configdata.pm --dump + # 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 d9f6e5bb0..f75bb9d2e 100755 --- a/packaging/makeself/jobs/50-bash-5.1.16.install.sh +++ b/packaging/makeself/jobs/50-bash-5.1.16.install.sh @@ -13,7 +13,7 @@ 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" +export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig" if [ "${CACHE_HIT:-0}" -eq 0 ]; then run ./configure \ diff --git a/packaging/makeself/jobs/50-curl-7.87.0.install.sh b/packaging/makeself/jobs/50-curl-7.87.0.install.sh deleted file mode 100755 index 84210e958..000000000 --- a/packaging/makeself/jobs/50-curl-7.87.0.install.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -# shellcheck source=packaging/makeself/functions.sh -. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 - -version="7.87.0" - -# shellcheck disable=SC2015 -[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true - -fetch "curl-${version}" "https://curl.haxx.se/download/curl-${version}.tar.gz" \ - 8a063d664d1c23d35526b87a2bf15514962ffdd8ef7fd40519191b3c23e39548 curl - -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" - -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 - -# shellcheck disable=SC2015 -[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Preparing build environment" || true diff --git a/packaging/makeself/jobs/50-curl.install.sh b/packaging/makeself/jobs/50-curl.install.sh new file mode 100755 index 000000000..b3ed33186 --- /dev/null +++ b/packaging/makeself/jobs/50-curl.install.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later + +# shellcheck source=packaging/makeself/functions.sh +. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 + +version="$(cat "$(dirname "${0}")/../curl.version")" + +# shellcheck disable=SC2015 +[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true + +if [ -d "${NETDATA_MAKESELF_PATH}/tmp/curl" ]; then + rm -rf "${NETDATA_MAKESELF_PATH}/tmp/curl" +fi + +cache="${NETDATA_SOURCE_PATH}/artifacts/cache/${BUILDARCH}/curl" + +if [ -d "${cache}" ]; then + echo "Found cached copy of build directory for curl, using it." + cp -a "${cache}/curl" "${NETDATA_MAKESELF_PATH}/tmp/" + CACHE_HIT=1 +else + echo "No cached copy of build directory for curl found, fetching sources instead." + run git clone --branch "${version}" --single-branch --depth 1 'https://github.com/curl/curl.git' "${NETDATA_MAKESELF_PATH}/tmp/curl" + CACHE_HIT=0 +fi + +cd "${NETDATA_MAKESELF_PATH}/tmp/curl" || exit 1 + +export CFLAGS="-I/openssl-static/include -pipe" +export LDFLAGS="-static -L/openssl-static/lib64" +export PKG_CONFIG="pkg-config --static" +export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig" + +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" + +if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then + run strip "${NETDATA_INSTALL_PATH}"/bin/curl +fi + +# shellcheck disable=SC2015 +[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Preparing build environment" || true diff --git a/packaging/makeself/jobs/70-netdata-git.install.sh b/packaging/makeself/jobs/70-netdata-git.install.sh index c7dd98df2..67b8df103 100755 --- a/packaging/makeself/jobs/70-netdata-git.install.sh +++ b/packaging/makeself/jobs/70-netdata-git.install.sh @@ -12,7 +12,7 @@ else export CFLAGS="-static -O1 -pipe -ggdb -Wall -Wextra -Wformat-signedness -DNETDATA_INTERNAL_CHECKS=1 -I/openssl-static/include -I/libnetfilter-acct-static/include/libnetfilter_acct -I/usr/include/libmnl" fi -export LDFLAGS="-Wl,--gc-sections -static -L/openssl-static/lib -L/libnetfilter-acct-static/lib -lnetfilter_acct -L/usr/lib -lmnl" +export LDFLAGS="-Wl,--gc-sections -Wl,-z,stack-size=$[8 * 1024 * 1024] -static -L/openssl-static/lib64 -L/libnetfilter-acct-static/lib -lnetfilter_acct -L/usr/lib -lmnl" # We export this to 'yes', installer sets this to .environment. # The updater consumes this one, so that it can tell whether it should update a static install or a non-static one @@ -21,11 +21,11 @@ export IS_NETDATA_STATIC_BINARY="yes" # Set eBPF LIBC to "static" to bundle the `-static` variant of the kernel-collector export EBPF_LIBC="static" export PKG_CONFIG="pkg-config --static" -export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig:/libnetfilter-acct-static/lib/pkgconfig:/usr/lib/pkgconfig" +export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig:/libnetfilter-acct-static/lib/pkgconfig:/usr/lib/pkgconfig" # Set correct CMake flags for building against non-System OpenSSL # See: https://github.com/warmcat/libwebsockets/blob/master/READMEs/README.build.md -export CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=/openssl-static -DOPENSSL_LIBRARIES=/openssl-static/lib -DCMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE=/openssl-static -DLWS_OPENSSL_INCLUDE_DIRS=/openssl-static/include -DLWS_OPENSSL_LIBRARIES=/openssl-static/lib/libssl.a;/openssl-static/lib/libcrypto.a" +export CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=/openssl-static -DOPENSSL_LIBRARIES=/openssl-static/lib64 -DCMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE=/openssl-static -DLWS_OPENSSL_INCLUDE_DIRS=/openssl-static/include -DLWS_OPENSSL_LIBRARIES=/openssl-static/lib64/libssl.a;/openssl-static/lib64/libcrypto.a" run ./netdata-installer.sh \ --install-prefix "${NETDATA_INSTALL_PARENT}" \ diff --git a/packaging/makeself/openssl.version b/packaging/makeself/openssl.version index 6c101b589..fec11a1db 100644 --- a/packaging/makeself/openssl.version +++ b/packaging/makeself/openssl.version @@ -1 +1 @@ -OpenSSL_1_1_1v +openssl-3.1.2 diff --git a/packaging/version b/packaging/version index dc34105ed..0fcb94381 100644 --- a/packaging/version +++ b/packaging/version @@ -1 +1 @@ -v1.42.1 +v1.42.2 -- cgit v1.2.3