0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-13 01:08:11 +00:00

Introduce workflow to always update bundled packages (static builds) into their latest release (part1) ()

* Make bundled-packages file as the source of truth for all the bundled packages

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
This commit is contained in:
Tasos Katsoulas 2023-10-20 18:01:08 +03:00 committed by GitHub
parent 0ccf21e936
commit cd65c4258e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 38 additions and 25 deletions

View file

@ -0,0 +1,16 @@
# Source of truth for all the packages we bundle in static builds
PACKAGES=("OPENSSL" "CURL" "BASH" "IOPING" "LIBNETFILTER_ACT")
SOURCE_TYPES=("GH_REPO_CLONE" "GH_REPO_CLONE" "DW_TARBALL" "GH_REPO_SOURCE" "DW_TARBALL")
OPENSSL_VERSION="openssl-3.1.3"
OPENSSL_SOURCE="https://github.com/openssl/openssl"
CURL_VERSION="curl-8_4_0"
CURL_SOURCE="https://github.com/curl/curl"
BASH_VERSION="5.1.16"
BASH_ARTIFACT_SOURCE="http://ftp.gnu.org/gnu/bash"
BASH_ARTIFACT_SHA256="5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558"
IOPING_VERSION="1.3"
IOPING_SOURCE="https://github.com/koct9i/ioping"
IOPING_ARTIFACT_SHA256="7aa48e70aaa766bc112dea57ebbe56700626871052380709df3a26f46766e8c8"
LIBNETFILTER_ACT_VERSION="1.0.3"
LIBNETFILTER_ACT_SOURCE="https://www.netfilter.org/projects/libnetfilter_acct/files"
LIBNETFILTER_ACT_ARTIFACT_SHA256="4250ceef3efe2034f4ac05906c3ee427db31b9b0a2df41b2744f4bf79a959a1a"

View file

@ -1 +0,0 @@
curl-8_4_0

View file

@ -3,12 +3,11 @@
# shellcheck source=packaging/makeself/functions.sh # shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
# Source of truth for all the packages we bundle in static builds
. "$(dirname "${0}")/../bundled-packages"
# shellcheck disable=SC2015 # shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building OpenSSL" || true [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building OpenSSL" || true
version="$(cat "$(dirname "${0}")/../openssl.version")"
export CFLAGS='-fno-lto -pipe' export CFLAGS='-fno-lto -pipe'
export LDFLAGS='-static' export LDFLAGS='-static'
export PKG_CONFIG="pkg-config --static" export PKG_CONFIG="pkg-config --static"
@ -29,7 +28,7 @@ if [ -d "${cache}" ]; then
CACHE_HIT=1 CACHE_HIT=1
else else
echo "No cached copy of build directory for openssl found, fetching sources instead." echo "No cached copy of build directory for openssl found, fetching sources instead."
run git clone --branch "${version}" --single-branch --depth 1 https://github.com/openssl/openssl.git "${NETDATA_MAKESELF_PATH}/tmp/openssl" run git clone --branch "${OPENSSL_VERSION}" --single-branch --depth 1 "${OPENSSL_SOURCE}" "${NETDATA_MAKESELF_PATH}/tmp/openssl"
CACHE_HIT=0 CACHE_HIT=0
fi fi

View file

@ -3,14 +3,14 @@
# shellcheck source=packaging/makeself/functions.sh # shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
# Source of truth for all the packages we bundle in static builds
version="5.1.16" . "$(dirname "${0}")/../bundled-packages"
# shellcheck disable=SC2015 # shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building bash" || true [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building bash" || true
fetch "bash-${version}" "http://ftp.gnu.org/gnu/bash/bash-${version}.tar.gz" \ fetch "bash-${BASH_VERSION}" "${BASH_ARTIFACT_SOURCE}/bash-${BASH_VERSION}.tar.gz" \
5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558 bash "${BASH_ARTIFACT_SHA256}" bash
export CFLAGS="-pipe" export CFLAGS="-pipe"
export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig" export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig"
@ -39,7 +39,7 @@ fi
run make install run make install
store_cache bash "${NETDATA_MAKESELF_PATH}/tmp/bash-${version}" store_cache bash "${NETDATA_MAKESELF_PATH}/tmp/bash-${BASH_VERSION}"
if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
run strip "${NETDATA_INSTALL_PATH}"/bin/bash run strip "${NETDATA_INSTALL_PATH}"/bin/bash

View file

@ -3,8 +3,8 @@
# shellcheck source=packaging/makeself/functions.sh # shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
# Source of truth for all the packages we bundle in static builds
version="$(cat "$(dirname "${0}")/../curl.version")" . "$(dirname "${0}")/../bundled-packages"
# shellcheck disable=SC2015 # shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true
@ -21,7 +21,7 @@ if [ -d "${cache}" ]; then
CACHE_HIT=1 CACHE_HIT=1
else else
echo "No cached copy of build directory for curl found, fetching sources instead." 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" run git clone --branch "${CURL_VERSION}" --single-branch --depth 1 "${CURL_SOURCE}" "${NETDATA_MAKESELF_PATH}/tmp/curl"
CACHE_HIT=0 CACHE_HIT=0
fi fi

View file

@ -3,14 +3,14 @@
# shellcheck source=packaging/makeself/functions.sh # shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
# Source of truth for all the packages we bundle in static builds
version='1.3' . "$(dirname "${0}")/../bundled-packages" || exit 1
# shellcheck disable=SC2015 # shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building ioping" || true [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building ioping" || true
fetch "ioping-${version}" "https://github.com/koct9i/ioping/archive/v${version}.tar.gz" \ fetch "ioping-${IOPING_VERSION}" "${IOPING_SOURCE}/archive/refs/tags/v${IOPING_VERSION}.tar.gz" \
7aa48e70aaa766bc112dea57ebbe56700626871052380709df3a26f46766e8c8 ioping "${IOPING_ARTIFACT_SHA256}" ioping
export CFLAGS="-static -pipe" export CFLAGS="-static -pipe"
@ -22,7 +22,7 @@ fi
run mkdir -p "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ 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/ 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}" store_cache ioping "${NETDATA_MAKESELF_PATH}/tmp/ioping-${IOPING_VERSION}"
if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ioping run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ioping

View file

@ -2,12 +2,12 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# #
# Install the libnetfilter_acct and it's dependency libmnl # Install the libnetfilter_acct and it's dependency libmnl
#
# shellcheck source=packaging/makeself/functions.sh # shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 . "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
# Source of truth for all the packages we bundle in static builds
version="1.0.3" . "$(dirname "${0}")/../bundled-packages" || exit 1
# shellcheck disable=SC2015 # shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building libnetfilter_acct" || true [ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building libnetfilter_acct" || true
@ -17,8 +17,8 @@ export LDFLAGS="-static -L/usr/lib -lmnl"
export PKG_CONFIG="pkg-config --static" export PKG_CONFIG="pkg-config --static"
export PKG_CONFIG_PATH="/usr/lib/pkgconfig" export PKG_CONFIG_PATH="/usr/lib/pkgconfig"
fetch "libnetfilter_acct-${version}" "https://www.netfilter.org/projects/libnetfilter_acct/files/libnetfilter_acct-${version}.tar.bz2" \ fetch "libnetfilter_acct-${LIBNETFILTER_ACT_VERSION}" "${LIBNETFILTER_ACT_SOURCE}/libnetfilter_acct-${LIBNETFILTER_ACT_VERSION}.tar.bz2" \
4250ceef3efe2034f4ac05906c3ee427db31b9b0a2df41b2744f4bf79a959a1a libnetfilter_acct "${LIBNETFILTER_ACT_ARTIFACT_SHA256}" libnetfilter_acct
if [ "${CACHE_HIT:-0}" -eq 0 ]; then if [ "${CACHE_HIT:-0}" -eq 0 ]; then
@ -32,7 +32,7 @@ fi
run make install run make install
store_cache libnetfilter_acct "${NETDATA_MAKESELF_PATH}/tmp/libnetfilter_acct-${version}" store_cache libnetfilter_acct "${NETDATA_MAKESELF_PATH}/tmp/libnetfilter_acct-${LIBNETFILTER_ACT_VERSION}"
# shellcheck disable=SC2015 # shellcheck disable=SC2015

View file

@ -1 +0,0 @@
openssl-3.1.3