summaryrefslogtreecommitdiffstats
path: root/packaging/makeself
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:04 +0000
commite970e0b37b8bd7f246feb3f70c4136418225e434 (patch)
tree0b67c0ca45f56f2f9d9c5c2e725279ecdf52d2eb /packaging/makeself
parentAdding upstream version 1.31.0. (diff)
downloadnetdata-e970e0b37b8bd7f246feb3f70c4136418225e434.tar.xz
netdata-e970e0b37b8bd7f246feb3f70c4136418225e434.zip
Adding upstream version 1.32.0.upstream/1.32.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/makeself')
-rwxr-xr-xpackaging/makeself/build-static.sh69
-rwxr-xr-xpackaging/makeself/build-x86_64-static.sh45
-rwxr-xr-xpackaging/makeself/build.sh9
-rwxr-xr-xpackaging/makeself/functions.sh14
-rwxr-xr-xpackaging/makeself/install-alpine-packages.sh50
-rwxr-xr-xpackaging/makeself/install-or-update.sh6
-rwxr-xr-xpackaging/makeself/jobs/10-prepare-destination.install.sh10
-rwxr-xr-xpackaging/makeself/jobs/20-openssl.install.sh11
-rwxr-xr-xpackaging/makeself/jobs/50-bash-5.1.8.install.sh (renamed from packaging/makeself/jobs/50-bash-5.0.install.sh)12
-rwxr-xr-xpackaging/makeself/jobs/50-curl-7.78.0.install.sh (renamed from packaging/makeself/jobs/50-curl-7.73.0.install.sh)24
-rwxr-xr-xpackaging/makeself/jobs/50-fping-5.0.install.sh11
-rwxr-xr-xpackaging/makeself/jobs/50-ioping-1.2.install.sh11
-rwxr-xr-xpackaging/makeself/jobs/70-netdata-git.install.sh17
-rwxr-xr-xpackaging/makeself/jobs/99-makeself.install.sh19
-rwxr-xr-xpackaging/makeself/makeself.sh2
-rw-r--r--packaging/makeself/openssl.version2
16 files changed, 218 insertions, 94 deletions
diff --git a/packaging/makeself/build-static.sh b/packaging/makeself/build-static.sh
new file mode 100755
index 000000000..e9cf620b4
--- /dev/null
+++ b/packaging/makeself/build-static.sh
@@ -0,0 +1,69 @@
+#!/usr/bin/env bash
+
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# shellcheck source=./packaging/installer/functions.sh
+. "$(dirname "$0")"/../installer/functions.sh || exit 1
+
+BUILDARCH="${1}"
+
+set -e
+
+case ${BUILDARCH} in
+ x86_64) platform=linux/amd64 ;;
+ armv7l) platform=linux/arm/v7 ;;
+ aarch64) platform=linux/arm64/v8 ;;
+ ppc64le) platform=linux/ppc64le ;;
+ *)
+ echo "Unknown target architecture '${BUILDARCH}'."
+ exit 1
+ ;;
+esac
+
+DOCKER_CONTAINER_NAME="netdata-package-${BUILDARCH}-static-alpine314"
+
+if [ "${BUILDARCH}" != "$(uname -m)" ] && [ "$(uname -m)" = 'x86_64' ] && [ -z "${SKIP_EMULATION}" ]; then
+ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1
+fi
+
+if ! docker inspect "${DOCKER_CONTAINER_NAME}" > /dev/null 2>&1; then
+ # To run interactively:
+ # docker run -it netdata-package-x86_64-static /bin/sh
+ # (add -v host-dir:guest-dir:rw arguments to mount volumes)
+ #
+ # To remove images in order to re-create:
+ # docker rm -v $(sudo docker ps -a -q -f status=exited)
+ # docker rmi netdata-package-x86_64-static
+ #
+ # This command maps the current directory to
+ # /usr/src/netdata.git
+ # inside the container and runs the script install-alpine-packages.sh
+ # (also inside the container)
+ #
+ if docker inspect alpine:3.14 > /dev/null 2>&1; then
+ run docker image remove alpine:3.14
+ run docker pull --platform=${platform} alpine:3.14
+ fi
+
+ run docker run --platform=${platform} -v "$(pwd)":/usr/src/netdata.git:rw alpine:3.14 \
+ /bin/sh /usr/src/netdata.git/packaging/makeself/install-alpine-packages.sh
+
+ # save the changes made permanently
+ id=$(docker ps -l -q)
+ run docker commit "${id}" "${DOCKER_CONTAINER_NAME}"
+fi
+
+# Run the build script inside the container
+if [ -t 1 ]; then
+ run docker run -e BUILDARCH="${BUILDARCH}" -a stdin -a stdout -a stderr -i -t -v "$(pwd)":/usr/src/netdata.git:rw \
+ "${DOCKER_CONTAINER_NAME}" \
+ /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
+else
+ run docker run -e BUILDARCH="${BUILDARCH}" -v "$(pwd)":/usr/src/netdata.git:rw \
+ -e GITHUB_ACTIONS="${GITHUB_ACTIONS}" "${DOCKER_CONTAINER_NAME}" \
+ /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
+fi
+
+if [ "${USER}" ]; then
+ sudo chown -R "${USER}" .
+fi
diff --git a/packaging/makeself/build-x86_64-static.sh b/packaging/makeself/build-x86_64-static.sh
index 83fa0dba9..0f5f1df14 100755
--- a/packaging/makeself/build-x86_64-static.sh
+++ b/packaging/makeself/build-x86_64-static.sh
@@ -2,47 +2,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# shellcheck source=./packaging/installer/functions.sh
-. "$(dirname "$0")"/../installer/functions.sh || exit 1
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
-set -e
-
-DOCKER_CONTAINER_NAME="netdata-package-x86_64-static-alpine312"
-
-if ! docker inspect "${DOCKER_CONTAINER_NAME}" > /dev/null 2>&1; then
- # To run interactively:
- # docker run -it netdata-package-x86_64-static /bin/sh
- # (add -v host-dir:guest-dir:rw arguments to mount volumes)
- #
- # To remove images in order to re-create:
- # docker rm -v $(sudo docker ps -a -q -f status=exited)
- # docker rmi netdata-package-x86_64-static
- #
- # This command maps the current directory to
- # /usr/src/netdata.git
- # inside the container and runs the script install-alpine-packages.sh
- # (also inside the container)
- #
- run docker run -v "$(pwd)":/usr/src/netdata.git:rw alpine:3.12 \
- /bin/sh /usr/src/netdata.git/packaging/makeself/install-alpine-packages.sh
-
- # save the changes made permanently
- id=$(docker ps -l -q)
- run docker commit "${id}" "${DOCKER_CONTAINER_NAME}"
-fi
-
-# Run the build script inside the container
-if [ -t 1 ]; then
- run docker run -a stdin -a stdout -a stderr -i -t -v \
- "$(pwd)":/usr/src/netdata.git:rw \
- "${DOCKER_CONTAINER_NAME}" \
- /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
-else
- run docker run -v "$(pwd)":/usr/src/netdata.git:rw \
- "${DOCKER_CONTAINER_NAME}" \
- /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
-fi
-
-if [ "${USER}" ]; then
- sudo chown -R "${USER}" .
-fi
+"${SCRIPT_DIR}/build-static.sh" x86_64
diff --git a/packaging/makeself/build.sh b/packaging/makeself/build.sh
index 85cb8fca7..4eb2c9f41 100755
--- a/packaging/makeself/build.sh
+++ b/packaging/makeself/build.sh
@@ -38,6 +38,9 @@ if [ ! -f ../../netdata-installer.sh ]; then
exit $?
fi
+git clean -dxf
+git submodule foreach --recursive git clean -dxf
+
cat >&2 << EOF
This program will create a self-extracting shell package containing
a statically linked netdata, able to run on any 64bit Linux system,
@@ -49,6 +52,12 @@ EOF
if [ ! -d tmp ]; then
mkdir tmp || exit 1
+else
+ rm -rf tmp/*
+fi
+
+if [ -z "${GITHUB_ACTIONS}" ]; then
+ export GITHUB_ACTIONS=false
fi
if ! ./run-all-jobs.sh "$@"; then
diff --git a/packaging/makeself/functions.sh b/packaging/makeself/functions.sh
index 15818d3b2..afc8a9ac9 100755
--- a/packaging/makeself/functions.sh
+++ b/packaging/makeself/functions.sh
@@ -29,13 +29,25 @@ set -euo pipefail
# -----------------------------------------------------------------------------
fetch() {
- local dir="${1}" url="${2}"
+ local dir="${1}" url="${2}" sha256="${3}"
local tar="${dir}.tar.gz"
if [ ! -f "${NETDATA_MAKESELF_PATH}/tmp/${tar}" ]; then
run wget -O "${NETDATA_MAKESELF_PATH}/tmp/${tar}" "${url}"
fi
+ # Check SHA256 of gzip'd tar file (apparently alpine's sha256sum requires
+ # two empty spaces between the checksum and the file's path)
+ set +e
+ echo "${sha256} ${NETDATA_MAKESELF_PATH}/tmp/${tar}" | sha256sum -c -s
+ local rc=$?
+ if [ ${rc} -ne 0 ]; then
+ echo >&2 "SHA256 verification of tar file ${tar} failed (rc=${rc})"
+ echo >&2 "expected: ${sha256}, got $(sha256sum "${NETDATA_MAKESELF_PATH}/tmp/${tar}")"
+ exit 1
+ fi
+ set -e
+
if [ ! -d "${NETDATA_MAKESELF_PATH}/tmp/${dir}" ]; then
cd "${NETDATA_MAKESELF_PATH}/tmp"
run tar -zxpf "${tar}"
diff --git a/packaging/makeself/install-alpine-packages.sh b/packaging/makeself/install-alpine-packages.sh
index a3e8cf605..6258d5dda 100755
--- a/packaging/makeself/install-alpine-packages.sh
+++ b/packaging/makeself/install-alpine-packages.sh
@@ -9,43 +9,37 @@
# Add required APK packages
apk add --no-cache -U \
- bash \
- wget \
- curl \
- ncurses \
- git \
- netcat-openbsd \
alpine-sdk \
autoconf \
automake \
- gcc \
- make \
+ bash \
+ binutils \
cmake \
- libtool \
- pkgconfig \
- util-linux-dev \
+ curl \
+ elfutils-dev \
+ gcc \
+ git \
gnutls-dev \
- zlib-dev \
- zlib-static \
+ gzip \
+ libelf-static \
libmnl-dev \
libnetfilter_acct-dev \
+ libtool \
libuv-dev \
libuv-static \
lz4-dev \
lz4-static \
- snappy-dev \
+ make \
+ ncurses \
+ netcat-openbsd \
+ openssh \
+ pkgconfig \
protobuf-dev \
- binutils \
- gzip \
- xz || exit 1
-
-# snappy doesn't have static version in alpine, let's compile it
-export SNAPPY_VER="1.1.7"
-wget -O /snappy.tar.gz https://github.com/google/snappy/archive/${SNAPPY_VER}.tar.gz
-tar -C / -xf /snappy.tar.gz
-rm /snappy.tar.gz
-cd /snappy-${SNAPPY_VER} || exit 1
-mkdir build
-cd build || exit 1
-cmake -DCMAKE_BUILD_SHARED_LIBS=true -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR=lib ../
-make && make install
+ snappy-dev \
+ snappy-static \
+ util-linux-dev \
+ wget \
+ xz \
+ zlib-dev \
+ zlib-static ||
+ exit 1
diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh
index 11fcc091c..ae12cce7b 100755
--- a/packaging/makeself/install-or-update.sh
+++ b/packaging/makeself/install-or-update.sh
@@ -49,6 +49,7 @@ while [ "${1}" ]; do
REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}"
;;
"--disable-telemetry")
+ NETDATA_DISABLE_TELEMETRY=1
REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}"
;;
@@ -58,6 +59,7 @@ while [ "${1}" ]; do
done
if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
+ NETDATA_DISABLE_TELEMETRY=1
REINSTALL_OPTIONS="${REINSTALL_OPTIONS} --disable-telemetry"
fi
@@ -138,7 +140,7 @@ install_netdata_logrotate || run_failed "Cannot install logrotate file for netda
progress "Telemetry configuration"
# Opt-out from telemetry program
-if [ -n "${NETDATA_DISABLE_TELEMETRY+x}" ]; then
+if [ -n "${NETDATA_DISABLE_TELEMETRY}" ]; then
run touch "${NETDATA_USER_CONFIG_DIR}/.opt-out-from-anonymous-statistics"
else
printf "You can opt out from anonymous statistics via the --disable-telemetry option, or by creating an empty file %s \n\n" "${NETDATA_USER_CONFIG_DIR}/.opt-out-from-anonymous-statistics"
@@ -212,7 +214,7 @@ run chown -R ${NETDATA_USER}:${NETDATA_GROUP} /opt/netdata
progress "fix plugin permissions"
-for x in apps.plugin freeipmi.plugin ioping cgroup-network; do
+for x in apps.plugin freeipmi.plugin ioping cgroup-network ebpf.plugin; do
f="usr/libexec/netdata/plugins.d/${x}"
if [ -f "${f}" ]; then
diff --git a/packaging/makeself/jobs/10-prepare-destination.install.sh b/packaging/makeself/jobs/10-prepare-destination.install.sh
index 8cce2d442..4686841b5 100755
--- a/packaging/makeself/jobs/10-prepare-destination.install.sh
+++ b/packaging/makeself/jobs/10-prepare-destination.install.sh
@@ -4,14 +4,20 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Preparing build environment" || true
+
[ -d "${NETDATA_INSTALL_PATH}.old" ] && run rm -rf "${NETDATA_INSTALL_PATH}.old"
[ -d "${NETDATA_INSTALL_PATH}" ] && run mv -f "${NETDATA_INSTALL_PATH}" "${NETDATA_INSTALL_PATH}.old"
run mkdir -p "${NETDATA_INSTALL_PATH}/bin"
run mkdir -p "${NETDATA_INSTALL_PATH}/usr"
-run cd "${NETDATA_INSTALL_PATH}"
+run cd "${NETDATA_INSTALL_PATH}" || exit 1
run ln -s bin sbin
-run cd "${NETDATA_INSTALL_PATH}/usr"
+run cd "${NETDATA_INSTALL_PATH}/usr" || exit 1
run ln -s ../bin bin
run ln -s ../sbin sbin
run ln -s . local
+
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true
diff --git a/packaging/makeself/jobs/20-openssl.install.sh b/packaging/makeself/jobs/20-openssl.install.sh
index 10863f90f..96d53fc86 100755
--- a/packaging/makeself/jobs/20-openssl.install.sh
+++ b/packaging/makeself/jobs/20-openssl.install.sh
@@ -4,17 +4,24 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building OpenSSL" || true
+
version="$(cat "$(dirname "${0}")/../openssl.version")"
+export CFLAGS='-fno-lto'
export LDFLAGS='-static'
export PKG_CONFIG="pkg-config --static"
# Might be bind-mounted
if [ ! -d "${NETDATA_MAKESELF_PATH}/tmp/openssl" ]; then
- run git clone --branch "${version}" --single-branch git://git.openssl.org/openssl.git "${NETDATA_MAKESELF_PATH}/tmp/openssl"
+ run git clone --branch "${version}" --single-branch --depth 1 git://git.openssl.org/openssl.git "${NETDATA_MAKESELF_PATH}/tmp/openssl"
fi
cd "${NETDATA_MAKESELF_PATH}/tmp/openssl" || exit 1
-run ./config no-shared no-tests --prefix=/openssl-static --openssldir=/opt/netdata/etc/ssl
+run ./config -static no-tests --prefix=/openssl-static --openssldir=/opt/netdata/etc/ssl
run make -j "$(nproc)"
run make -j "$(nproc)" install_sw
+
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true
diff --git a/packaging/makeself/jobs/50-bash-5.0.install.sh b/packaging/makeself/jobs/50-bash-5.1.8.install.sh
index a204c1575..22c9286af 100755
--- a/packaging/makeself/jobs/50-bash-5.0.install.sh
+++ b/packaging/makeself/jobs/50-bash-5.1.8.install.sh
@@ -4,7 +4,11 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
-fetch "bash-5.0" "http://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz"
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::building bash" || true
+
+fetch "bash-5.1.8" "http://ftp.gnu.org/gnu/bash/bash-5.1.8.tar.gz" \
+ 0cfb5c9bb1a29f800a97bd242d19511c997a1013815b805e0fdd32214113d6be
export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig"
@@ -14,6 +18,7 @@ run ./configure \
--enable-static-link \
--enable-net-redirections \
--enable-array-variables \
+ --disable-progcomp \
--disable-profiling \
--disable-nls
@@ -28,6 +33,9 @@ EOF
run make install
-if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ]; then
+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
diff --git a/packaging/makeself/jobs/50-curl-7.73.0.install.sh b/packaging/makeself/jobs/50-curl-7.78.0.install.sh
index 4a9505e58..a2bb24e2c 100755
--- a/packaging/makeself/jobs/50-curl-7.73.0.install.sh
+++ b/packaging/makeself/jobs/50-curl-7.78.0.install.sh
@@ -4,7 +4,11 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
-fetch "curl-7.73.0" "https://curl.haxx.se/download/curl-7.73.0.tar.gz"
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true
+
+fetch "curl-7.78.0" "https://curl.haxx.se/download/curl-7.78.0.tar.gz" \
+ ed936c0b02c06d42cf84b39dd12bb14b62d77c7c4e875ade022280df5dcc81d7
export CFLAGS="-I/openssl-static/include"
export LDFLAGS="-static -L/openssl-static/lib"
@@ -19,10 +23,21 @@ run ./configure \
--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-ca-fallback \
+ --with-openssl
# Curl autoconf does not honour the curl_LDFLAGS environment variable
run sed -i -e "s/curl_LDFLAGS =/curl_LDFLAGS = -all-static/" src/Makefile
@@ -31,6 +46,9 @@ run make clean
run make -j "$(nproc)"
run make install
-if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ]; then
+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-fping-5.0.install.sh b/packaging/makeself/jobs/50-fping-5.0.install.sh
index e62c47e45..8bef27d4d 100755
--- a/packaging/makeself/jobs/50-fping-5.0.install.sh
+++ b/packaging/makeself/jobs/50-fping-5.0.install.sh
@@ -4,7 +4,11 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
-fetch "fping-5.0" "https://fping.org/dist/fping-5.0.tar.gz"
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building fping" || true
+
+fetch "fping-5.0" "https://fping.org/dist/fping-5.0.tar.gz" \
+ ed38c0b9b64686a05d1b3bc1d66066114a492e04e44eef1821d43b1263cd57b8
export CFLAGS="-static -I/openssl-static/include"
export LDFLAGS="-static -L/openssl-static/lib"
@@ -25,6 +29,9 @@ run make clean
run make -j "$(nproc)"
run make install
-if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ]; then
+if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
run strip "${NETDATA_INSTALL_PATH}"/bin/fping
fi
+
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true
diff --git a/packaging/makeself/jobs/50-ioping-1.2.install.sh b/packaging/makeself/jobs/50-ioping-1.2.install.sh
index 22f26914a..9e9505022 100755
--- a/packaging/makeself/jobs/50-ioping-1.2.install.sh
+++ b/packaging/makeself/jobs/50-ioping-1.2.install.sh
@@ -4,7 +4,11 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
-fetch "ioping-1.2" "https://github.com/koct9i/ioping/archive/v1.2.tar.gz"
+# 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
export CFLAGS="-static"
@@ -13,6 +17,9 @@ 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/
-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
fi
+
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true
diff --git a/packaging/makeself/jobs/70-netdata-git.install.sh b/packaging/makeself/jobs/70-netdata-git.install.sh
index 21d4fd0ac..98fc4dbe8 100755
--- a/packaging/makeself/jobs/70-netdata-git.install.sh
+++ b/packaging/makeself/jobs/70-netdata-git.install.sh
@@ -6,7 +6,7 @@
cd "${NETDATA_SOURCE_PATH}" || exit 1
-if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ]; then
+if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
export CFLAGS="-static -O3 -I/openssl-static/include"
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"
@@ -31,8 +31,18 @@ run ./netdata-installer.sh \
--dont-wait \
--dont-start-it \
--require-cloud \
+ --use-system-protobuf \
--dont-scrub-cflags-even-though-it-may-break-things
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Finishing netdata install" || true
+
+# Properly mark the install type
+cat > "${NETDATA_INSTALL_PATH}/etc/netdata/.install-type" <<-EOF
+ INSTALL_TYPE='manual-static'
+ PREBUILT_ARCH='${BUILDARCH}'
+ EOF
+
# Remove the netdata.conf file from the tree. It has hard-coded sensible defaults builtin.
run rm -f "${NETDATA_INSTALL_PATH}/etc/netdata/netdata.conf"
@@ -43,8 +53,11 @@ if run readelf -l "${NETDATA_INSTALL_PATH}"/bin/netdata | grep 'INTERP'; then
exit 1
fi
-if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ]; then
+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
diff --git a/packaging/makeself/jobs/99-makeself.install.sh b/packaging/makeself/jobs/99-makeself.install.sh
index de641027b..9dfcfbed7 100755
--- a/packaging/makeself/jobs/99-makeself.install.sh
+++ b/packaging/makeself/jobs/99-makeself.install.sh
@@ -4,6 +4,9 @@
# shellcheck source=packaging/makeself/functions.sh
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building self-extracting archive" || true
+
run cd "${NETDATA_SOURCE_PATH}" || exit 1
# -----------------------------------------------------------------------------
@@ -90,12 +93,22 @@ run rm "${NETDATA_MAKESELF_PATH}/makeself.lsm.tmp"
# -----------------------------------------------------------------------------
# copy it to the netdata build dir
-FILE="netdata-${VERSION}.gz.run"
+FILE="netdata-${BUILDARCH}-${VERSION}.gz.run"
run mkdir -p artifacts
run mv "${NETDATA_INSTALL_PATH}.gz.run" "artifacts/${FILE}"
-[ -f netdata-latest.gz.run ] && rm netdata-latest.gz.run
-run ln -s "artifacts/${FILE}" netdata-latest.gz.run
+[ -f "netdata-${BUILDARCH}-latest.gz.run" ] && rm "netdata-${BUILDARCH}-latest.gz.run"
+run ln -s "artifacts/${FILE}" "netdata-${BUILDARCH}-latest.gz.run"
+
+if [ "${BUILDARCH}" = "x86_64" ]; then
+ [ -f "netdata-latest.gz.run" ] && rm "netdata-latest.gz.run"
+ run ln -s "artifacts/${FILE}" "netdata-latest.gz.run"
+ [ -f "artifacts/netdata-${VERSION}.gz.run" ] && rm "netdata-${VERSION}.gz.run"
+ run ln -s "./${FILE}" "artifacts/netdata-${VERSION}.gz.run"
+fi
+
+# shellcheck disable=SC2015
+[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true
echo >&2 "Self-extracting installer moved to 'artifacts/${FILE}'"
diff --git a/packaging/makeself/makeself.sh b/packaging/makeself/makeself.sh
index 15a002884..1581f499e 100755
--- a/packaging/makeself/makeself.sh
+++ b/packaging/makeself/makeself.sh
@@ -7,7 +7,7 @@
# Utility to create self-extracting tar.gz archives.
# The resulting archive is a file holding the tar.gz archive with
# a small Shell script stub that uncompresses the archive to a temporary
-# directory and then executes a given script from withing that directory.
+# directory and then executes a given script from within that directory.
#
# Makeself home page: http://makeself.io/
#
diff --git a/packaging/makeself/openssl.version b/packaging/makeself/openssl.version
index aa2c66c02..5b309eb4f 100644
--- a/packaging/makeself/openssl.version
+++ b/packaging/makeself/openssl.version
@@ -1 +1 @@
-OpenSSL_1_1_1k
+OpenSSL_1_1_1l