summaryrefslogtreecommitdiffstats
path: root/packaging/makeself
diff options
context:
space:
mode:
authorTasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com>2023-10-20 18:01:08 +0300
committerGitHub <noreply@github.com>2023-10-20 18:01:08 +0300
commitcd65c4258e0147662f29d53f4f6c371940af8aaf (patch)
tree49696f027eda17f305a20e2c947199bbe357ac92 /packaging/makeself
parent0ccf21e9365246392061bd644294a05c7ef0b630 (diff)
Introduce workflow to always update bundled packages (static builds) into their latest release (part1) (#16191)
* Make bundled-packages file as the source of truth for all the bundled packages Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
Diffstat (limited to 'packaging/makeself')
-rw-r--r--packaging/makeself/bundled-packages16
-rw-r--r--packaging/makeself/curl.version1
-rwxr-xr-xpackaging/makeself/jobs/20-openssl.install.sh7
-rwxr-xr-xpackaging/makeself/jobs/50-bash-5.1.16.install.sh10
-rwxr-xr-xpackaging/makeself/jobs/50-curl.install.sh6
-rwxr-xr-xpackaging/makeself/jobs/50-ioping-1.3.install.sh10
-rwxr-xr-xpackaging/makeself/jobs/50-libnetfilter_acct-1.0.3.install.sh12
-rw-r--r--packaging/makeself/openssl.version1
8 files changed, 38 insertions, 25 deletions
diff --git a/packaging/makeself/bundled-packages b/packaging/makeself/bundled-packages
new file mode 100644
index 0000000000..d09410288c
--- /dev/null
+++ b/packaging/makeself/bundled-packages
@@ -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"
diff --git a/packaging/makeself/curl.version b/packaging/makeself/curl.version
deleted file mode 100644
index 12ab47e6c1..0000000000
--- a/packaging/makeself/curl.version
+++ /dev/null
@@ -1 +0,0 @@
-curl-8_4_0
diff --git a/packaging/makeself/jobs/20-openssl.install.sh b/packaging/makeself/jobs/20-openssl.install.sh
index 04ec2626fa..1158a63300 100755
--- a/packaging/makeself/jobs/20-openssl.install.sh
+++ b/packaging/makeself/jobs/20-openssl.install.sh
@@ -3,12 +3,11 @@
# 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"
# shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building OpenSSL" || true
-version="$(cat "$(dirname "${0}")/../openssl.version")"
-
export CFLAGS='-fno-lto -pipe'
export LDFLAGS='-static'
export PKG_CONFIG="pkg-config --static"
@@ -29,7 +28,7 @@ if [ -d "${cache}" ]; then
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 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
fi
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 f75bb9d2e8..7a302f2ee3 100755
--- a/packaging/makeself/jobs/50-bash-5.1.16.install.sh
+++ b/packaging/makeself/jobs/50-bash-5.1.16.install.sh
@@ -3,14 +3,14 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
-
-version="5.1.16"
+# Source of truth for all the packages we bundle in static builds
+. "$(dirname "${0}")/../bundled-packages"
# shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building bash" || true
-fetch "bash-${version}" "http://ftp.gnu.org/gnu/bash/bash-${version}.tar.gz" \
- 5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558 bash
+fetch "bash-${BASH_VERSION}" "${BASH_ARTIFACT_SOURCE}/bash-${BASH_VERSION}.tar.gz" \
+ "${BASH_ARTIFACT_SHA256}" bash
export CFLAGS="-pipe"
export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig"
@@ -39,7 +39,7 @@ fi
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
run strip "${NETDATA_INSTALL_PATH}"/bin/bash
diff --git a/packaging/makeself/jobs/50-curl.install.sh b/packaging/makeself/jobs/50-curl.install.sh
index b3ed331861..4864096482 100755
--- a/packaging/makeself/jobs/50-curl.install.sh
+++ b/packaging/makeself/jobs/50-curl.install.sh
@@ -3,8 +3,8 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
-
-version="$(cat "$(dirname "${0}")/../curl.version")"
+# Source of truth for all the packages we bundle in static builds
+. "$(dirname "${0}")/../bundled-packages"
# shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true
@@ -21,7 +21,7 @@ if [ -d "${cache}" ]; then
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"
+ run git clone --branch "${CURL_VERSION}" --single-branch --depth 1 "${CURL_SOURCE}" "${NETDATA_MAKESELF_PATH}/tmp/curl"
CACHE_HIT=0
fi
diff --git a/packaging/makeself/jobs/50-ioping-1.3.install.sh b/packaging/makeself/jobs/50-ioping-1.3.install.sh
index 88309c3ebc..6bd538e356 100755
--- a/packaging/makeself/jobs/50-ioping-1.3.install.sh
+++ b/packaging/makeself/jobs/50-ioping-1.3.install.sh
@@ -3,14 +3,14 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
-
-version='1.3'
+# Source of truth for all the packages we bundle in static builds
+. "$(dirname "${0}")/../bundled-packages" || exit 1
# shellcheck disable=SC2015
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building ioping" || true
-fetch "ioping-${version}" "https://github.com/koct9i/ioping/archive/v${version}.tar.gz" \
- 7aa48e70aaa766bc112dea57ebbe56700626871052380709df3a26f46766e8c8 ioping
+fetch "ioping-${IOPING_VERSION}" "${IOPING_SOURCE}/archive/refs/tags/v${IOPING_VERSION}.tar.gz" \
+ "${IOPING_ARTIFACT_SHA256}" ioping
export CFLAGS="-static -pipe"
@@ -22,7 +22,7 @@ fi
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}"
+store_cache ioping "${NETDATA_MAKESELF_PATH}/tmp/ioping-${IOPING_VERSION}"
if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/ioping
diff --git a/packaging/makeself/jobs/50-libnetfilter_acct-1.0.3.install.sh b/packaging/makeself/jobs/50-libnetfilter_acct-1.0.3.install.sh
index 2b7a761c55..8297521785 100755
--- a/packaging/makeself/jobs/50-libnetfilter_acct-1.0.3.install.sh
+++ b/packaging/makeself/jobs/50-libnetfilter_acct-1.0.3.install.sh
@@ -2,12 +2,12 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Install the libnetfilter_acct and it's dependency libmnl
-#
+
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
-
-version="1.0.3"
+# Source of truth for all the packages we bundle in static builds
+. "$(dirname "${0}")/../bundled-packages" || exit 1
# shellcheck disable=SC2015
[ "${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_PATH="/usr/lib/pkgconfig"
-fetch "libnetfilter_acct-${version}" "https://www.netfilter.org/projects/libnetfilter_acct/files/libnetfilter_acct-${version}.tar.bz2" \
- 4250ceef3efe2034f4ac05906c3ee427db31b9b0a2df41b2744f4bf79a959a1a libnetfilter_acct
+fetch "libnetfilter_acct-${LIBNETFILTER_ACT_VERSION}" "${LIBNETFILTER_ACT_SOURCE}/libnetfilter_acct-${LIBNETFILTER_ACT_VERSION}.tar.bz2" \
+ "${LIBNETFILTER_ACT_ARTIFACT_SHA256}" libnetfilter_acct
if [ "${CACHE_HIT:-0}" -eq 0 ]; then
@@ -32,7 +32,7 @@ fi
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
diff --git a/packaging/makeself/openssl.version b/packaging/makeself/openssl.version
deleted file mode 100644
index c4d4ea1366..0000000000
--- a/packaging/makeself/openssl.version
+++ /dev/null
@@ -1 +0,0 @@
-openssl-3.1.3