diff options
author | Paul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com> | 2019-09-15 13:41:59 +0300 |
---|---|---|
committer | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2019-09-15 12:41:59 +0200 |
commit | f457afa30d82bc2e125d9e6e12e72668b884f01e (patch) | |
tree | f05def4f200730a59d760889e038bc2f91624e68 /.travis | |
parent | 3103056ef14da4f6efc8411942ce9b0c8478d966 (diff) |
netdata/packaging: Bring on board two scripts that build libuv and judy from source (#6850)
* netdata/packaging: Script to build judy from source
* netdata/packaging: Add script to build libuv from source
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/package_management/build_judy.sh | 36 | ||||
-rwxr-xr-x | .travis/package_management/build_libuv.sh | 36 |
2 files changed, 72 insertions, 0 deletions
diff --git a/.travis/package_management/build_judy.sh b/.travis/package_management/build_judy.sh new file mode 100755 index 0000000000..202ea04490 --- /dev/null +++ b/.travis/package_management/build_judy.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# +# Build Judy from source, you need to run this script as root. +# +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later +# +# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud) +set -e +JUDY_VER="1.0.5" +JUDY_DIR="/opt/judy-${JUDY_VER}" + +# If we are not in netdata git repo, at the top level directory, fail +TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") +CWD=$(git rev-parse --show-cdup) +if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then + echo "Run as .travis/package_management/$(basename "$0") from top level directory of netdata git repository" + echo "Build Judy package from source code failed" + exit 1 +fi + +echo "Fetching judy source tarball" +wget -O /opt/judy.tar.gz http://downloads.sourceforge.net/project/judy/judy/Judy-${JUDY_VER}/Judy-${JUDY_VER}.tar.gz + +echo "Entering /opt directory and extracting tarball" +cd /opt && tar -xf judy.tar.gz && rm judy.tar.gz + +echo "Entering ${JUDY_DIR}" +cd "${JUDY_DIR}" + +echo "Running configure" +CFLAGS="-O2 -s" CXXFLAGS="-O2 -s" ./configure + +echo "Compiling and installing" +make && make install + +echo "Done, enjoy Judy!" diff --git a/.travis/package_management/build_libuv.sh b/.travis/package_management/build_libuv.sh new file mode 100755 index 0000000000..c30eede647 --- /dev/null +++ b/.travis/package_management/build_libuv.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# +# Build libuv from source, you need to run this script as root. +# +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later +# +# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud> +set -e +LIBUV_VERSION="v1.32.0" +# Their folder is libuv-1.32.0 while the tarball version is v1.32.0, so fix that until they fix it... +LIBUV_DIR="/opt/libuv-${LIBUV_VERSION/v/}" + +# If we are not in netdata git repo, at the top level directory, fail +TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") +CWD=$(git rev-parse --show-cdup) +if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then + echo "Run as .travis/package_management/$(basename "$0") from top level directory of netdata git repository" + echo "Build libuv package from source code failed" + exit 1 +fi + +echo "Fetching libuv from github" +wget -O /opt/libuv.tar.gz "https://github.com/libuv/libuv/archive/${LIBUV_VERSION}.tar.gz" + +echo "Entering /opt and extracting source" +cd /opt && tar -xf libuv.tar.gz && rm libuv.tar.gz + +echo "Entering ${LIBUV_DIR}" +cd "${LIBUV_DIR}" + +echo "Compiling and installing" +sh autogen.sh +./configure +make && make check && make install + +echo "Done, enjoy libuv!" |