diff options
Diffstat (limited to 'packaging/makeself/jobs')
-rwxr-xr-x | packaging/makeself/jobs/10-prepare-destination.install.sh | 10 | ||||
-rwxr-xr-x | packaging/makeself/jobs/20-openssl.install.sh | 11 | ||||
-rwxr-xr-x | packaging/makeself/jobs/50-bash-5.1.8.install.sh (renamed from packaging/makeself/jobs/50-bash-5.0.install.sh) | 12 | ||||
-rwxr-xr-x | packaging/makeself/jobs/50-curl-7.78.0.install.sh (renamed from packaging/makeself/jobs/50-curl-7.73.0.install.sh) | 24 | ||||
-rwxr-xr-x | packaging/makeself/jobs/50-fping-5.0.install.sh | 11 | ||||
-rwxr-xr-x | packaging/makeself/jobs/50-ioping-1.2.install.sh | 11 | ||||
-rwxr-xr-x | packaging/makeself/jobs/70-netdata-git.install.sh | 17 | ||||
-rwxr-xr-x | packaging/makeself/jobs/99-makeself.install.sh | 19 |
8 files changed, 97 insertions, 18 deletions
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}'" |