@cryptotaxi247 / netdata-1 / commits / a0fbb47c9

netdata/packaging: Fix makeself packaging (#6041)

* netdata/packaging: Fix makeself with the new package dependencies * netdata/packaging: Allow artifacts to be built under different repository when needed

Paul Emm. Katsoulakis committed May 17, 2019 at 13:27 UTC a0fbb47c97dd1f6bd4af8faac6e1fcecb041424a
2 files changed +43 -8
.travis/create_artifacts.sh
+19 -5
@@ -1,11 +1,24 @@
1 -#!/bin/bash
1 +#!/usr/bin/env bash
2 +#
3 +# Artifacts creation script.
4 +# This script generates two things:
5 +# 1) The static binary that can run on all linux distros (built-in dependencies etc)
6 +# 2) The distribution source tarbal
7 +#
8 +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
9 +#
10 +# Author: Paul Emm. Katsoulakis <paul@netdata.cloud>
11 +#
12 # shellcheck disable=SC2230
13
14 set -e
15
6 -if [ ! -f .gitignore ]; then
7 - echo "Run as ./travis/$(basename "$0") from top level directory of git repository"
8 - exit 1
16 +# If we are not in netdata git repo, at the top level directory, fail
17 +TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
18 +CWD=$(git rev-parse --show-cdup || echo "")
19 +if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
20 + echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
21 + exit 1
22 fi
23
24 if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
@@ -13,8 +26,9 @@ if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
26 exit 0
27 fi;
28
29 +
30 echo "--- Initialize git configuration ---"
17 -git checkout master
31 +git checkout "${1-master}"
32 git pull
33
34 # Everything from this directory will be uploaded to GCS
packaging/makeself/install-alpine-packages.sh
+24 -3
@@ -1,9 +1,16 @@
1 #!/usr/bin/env sh
2 -# SPDX-License-Identifier: GPL-3.0-or-later
2 +#
3 +# Installation script for the alpine host
4 +# to prepare the static binary
5 +#
6 +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
7 +#
8 +# Author: Paul Emm. Katsoulakis <paul@netdata.cloud>
9
4 -# this script should be running in alpine linux
5 -# install the required packages
10 +# Packaging update
11 apk update
12 +
13 +# Add required APK packages
14 apk add --no-cache \
15 bash \
16 wget \
@@ -24,4 +31,18 @@ apk add --no-cache \
31 zlib-dev \
32 libmnl-dev \
33 libnetfilter_acct-dev \
34 + libuv-dev \
35 + lz4-dev \
36 + openssl-dev \
37 || exit 1
38 +
39 +# Judy doesnt seem to be available on the repositories, download manually and install it
40 +export JUDY_VER="1.0.5"
41 +wget -O /judy.tar.gz http://downloads.sourceforge.net/project/judy/judy/Judy-${JUDY_VER}/Judy-${JUDY_VER}.tar.gz
42 +cd /
43 +tar -xf judy.tar.gz
44 +rm judy.tar.gz
45 +cd /judy-${JUDY_VER}
46 +CFLAGS="-O2 -s" CXXFLAGS="-O2 -s" ./configure
47 +make
48 +make install;