Skip to content

Commit a0fbb47

Browse files
netdata/packaging: Fix makeself packaging (netdata#6041)
* netdata/packaging: Fix makeself with the new package dependencies * netdata/packaging: Allow artifacts to be built under different repository when needed
1 parent 73e108f commit a0fbb47

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed

.travis/create_artifacts.sh

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
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 <[email protected]>
11+
#
212
# shellcheck disable=SC2230
313

414
set -e
515

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
922
fi
1023

1124
if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
1225
echo "Beta mode on ${TRAVIS_REPO_SLUG}, not running anything here"
1326
exit 0
1427
fi;
1528

29+
1630
echo "--- Initialize git configuration ---"
17-
git checkout master
31+
git checkout "${1-master}"
1832
git pull
1933

2034
# Everything from this directory will be uploaded to GCS

packaging/makeself/install-alpine-packages.sh

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
#!/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 <[email protected]>
39

4-
# this script should be running in alpine linux
5-
# install the required packages
10+
# Packaging update
611
apk update
12+
13+
# Add required APK packages
714
apk add --no-cache \
815
bash \
916
wget \
@@ -24,4 +31,18 @@ apk add --no-cache \
2431
zlib-dev \
2532
libmnl-dev \
2633
libnetfilter_acct-dev \
34+
libuv-dev \
35+
lz4-dev \
36+
openssl-dev \
2737
|| 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;

0 commit comments

Comments
 (0)