summaryrefslogtreecommitdiffstats
path: root/makeself
diff options
context:
space:
mode:
Diffstat (limited to 'makeself')
-rw-r--r--makeself/Makefile.am5
-rw-r--r--makeself/Makefile.in26
-rwxr-xr-xmakeself/build-x86_64-static.sh1
-rwxr-xr-xmakeself/build.sh3
-rwxr-xr-xmakeself/functions.sh3
-rwxr-xr-xmakeself/install-alpine-packages.sh1
-rwxr-xr-xmakeself/install-or-update.sh98
-rwxr-xr-xmakeself/jobs/10-prepare-destination.install.sh1
-rwxr-xr-xmakeself/jobs/50-bash-4.4.18.install.sh (renamed from makeself/jobs/50-bash-4.4.install.sh)8
-rwxr-xr-xmakeself/jobs/50-curl-7.60.0.install.sh (renamed from makeself/jobs/50-curl-7.53.1.install.sh)3
-rwxr-xr-xmakeself/jobs/50-fping-4.0.install.sh1
-rwxr-xr-xmakeself/jobs/70-netdata-git.install.sh8
-rwxr-xr-xmakeself/jobs/99-makeself.install.sh29
-rwxr-xr-xmakeself/makeself-header.sh1
-rw-r--r--makeself/makeself-help-header.txt4
-rw-r--r--makeself/makeself-license.txt4
-rwxr-xr-xmakeself/makeself.sh1
-rwxr-xr-xmakeself/post-installer.sh1
-rwxr-xr-xmakeself/run-all-jobs.sh1
19 files changed, 102 insertions, 97 deletions
diff --git a/makeself/Makefile.am b/makeself/Makefile.am
index 923f3cefb..f6f9167a0 100644
--- a/makeself/Makefile.am
+++ b/makeself/Makefile.am
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
MAINTAINERCLEANFILES= $(srcdir)/Makefile.in
dist_noinst_DATA = \
@@ -10,8 +11,8 @@ dist_noinst_SCRIPTS = \
install-alpine-packages.sh \
post-installer.sh \
jobs/10-prepare-destination.install.sh \
- jobs/50-curl-7.53.1.install.sh \
- jobs/50-bash-4.4.install.sh \
+ jobs/50-curl-7.60.0.install.sh \
+ jobs/50-bash-4.4.18.install.sh \
jobs/50-fping-4.0.install.sh \
jobs/70-netdata-git.install.sh \
jobs/99-makeself.install.sh \
diff --git a/makeself/Makefile.in b/makeself/Makefile.in
index 9c84cc042..8962dbbc1 100644
--- a/makeself/Makefile.in
+++ b/makeself/Makefile.in
@@ -83,14 +83,16 @@ subdir = makeself
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(dist_noinst_SCRIPTS) $(dist_noinst_DATA)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___atomic.m4 \
- $(top_srcdir)/m4/ax_c__generic.m4 $(top_srcdir)/m4/ax_c_lto.m4 \
- $(top_srcdir)/m4/ax_c_mallinfo.m4 \
- $(top_srcdir)/m4/ax_c_mallopt.m4 \
- $(top_srcdir)/m4/ax_check_compile_flag.m4 \
- $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
- $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/jemalloc.m4 \
- $(top_srcdir)/m4/tcmalloc.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/build/m4/ax_c___atomic.m4 \
+ $(top_srcdir)/build/m4/ax_c__generic.m4 \
+ $(top_srcdir)/build/m4/ax_c_lto.m4 \
+ $(top_srcdir)/build/m4/ax_c_mallinfo.m4 \
+ $(top_srcdir)/build/m4/ax_c_mallopt.m4 \
+ $(top_srcdir)/build/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/build/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/build/m4/ax_pthread.m4 \
+ $(top_srcdir)/build/m4/jemalloc.m4 \
+ $(top_srcdir)/build/m4/tcmalloc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -217,6 +219,7 @@ build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
+build_target = @build_target@
build_vendor = @build_vendor@
builddir = @builddir@
cachedir = @cachedir@
@@ -238,6 +241,7 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
+libconfigdir = @libconfigdir@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
@@ -264,6 +268,8 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
varlibdir = @varlibdir@
webdir = @webdir@
+
+# SPDX-License-Identifier: GPL-3.0-or-later
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
dist_noinst_DATA = \
$(NULL)
@@ -275,8 +281,8 @@ dist_noinst_SCRIPTS = \
install-alpine-packages.sh \
post-installer.sh \
jobs/10-prepare-destination.install.sh \
- jobs/50-curl-7.53.1.install.sh \
- jobs/50-bash-4.4.install.sh \
+ jobs/50-curl-7.60.0.install.sh \
+ jobs/50-bash-4.4.18.install.sh \
jobs/50-fping-4.0.install.sh \
jobs/70-netdata-git.install.sh \
jobs/99-makeself.install.sh \
diff --git a/makeself/build-x86_64-static.sh b/makeself/build-x86_64-static.sh
index 357666093..b0902512c 100755
--- a/makeself/build-x86_64-static.sh
+++ b/makeself/build-x86_64-static.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. $(dirname "$0")/../installer/functions.sh || exit 1
diff --git a/makeself/build.sh b/makeself/build.sh
index afa4f545e..e8c1c9ddc 100755
--- a/makeself/build.sh
+++ b/makeself/build.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# -----------------------------------------------------------------------------
# parse command line arguments
@@ -32,7 +33,7 @@ cd $(dirname "$0") || exit 1
# download it and run from it
if [ ! -f ../netdata-installer.sh ]
then
- git clone https://github.com/firehol/netdata.git netdata.git || exit 1
+ git clone https://github.com/netdata/netdata.git netdata.git || exit 1
cd netdata.git/makeself || exit 1
./build.sh "$@"
exit $?
diff --git a/makeself/functions.sh b/makeself/functions.sh
index 839fc3226..10b324deb 100755
--- a/makeself/functions.sh
+++ b/makeself/functions.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
# -----------------------------------------------------------------------------
@@ -38,7 +39,7 @@ fetch() {
if [ ! -d "${NETDATA_MAKESELF_PATH}/tmp/${dir}" ]
then
cd "${NETDATA_MAKESELF_PATH}/tmp"
- run tar -zxvpf "${tar}"
+ run tar -zxpf "${tar}"
cd -
fi
diff --git a/makeself/install-alpine-packages.sh b/makeself/install-alpine-packages.sh
index 87cd29669..695be4d4f 100755
--- a/makeself/install-alpine-packages.sh
+++ b/makeself/install-alpine-packages.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# this script should be running in alpine linux
# install the required packages
diff --git a/makeself/install-or-update.sh b/makeself/install-or-update.sh
index eed2bc301..bfcbe720a 100755
--- a/makeself/install-or-update.sh
+++ b/makeself/install-or-update.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. $(dirname "${0}")/functions.sh
@@ -23,62 +24,49 @@ do
shift
done
+deleted_stock_configs=0
+if [ ! -f "etc/netdata/.installer-cleanup-of-stock-configs-done" ]
+then
-# -----------------------------------------------------------------------------
-progress "Checking new configuration files"
-
-declare -A configs_signatures=()
-. system/configs.signatures
-
-if [ ! -d etc/netdata ]
- then
- run mkdir -p etc/netdata
-fi
-
-md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null || command -v md5 2>/dev/null)"
-for x in $(find etc.new -type f)
-do
- # find it relative filename
- f="${x/etc.new\/netdata\//}"
- t="${x/etc.new\//etc\/}"
- d=$(dirname "${t}")
+ # -----------------------------------------------------------------------------
+ progress "Deleting stock configuration files from user configuration directory"
- #echo >&2 "x: ${x}"
- #echo >&2 "t: ${t}"
- #echo >&2 "d: ${d}"
+ declare -A configs_signatures=()
+ source "system/configs.signatures"
- if [ ! -d "${d}" ]
+ if [ ! -d etc/netdata ]
then
- run mkdir -p "${d}"
+ run mkdir -p etc/netdata
fi
- if [ ! -f "${t}" ]
- then
- run cp "${x}" "${t}"
- continue
- fi
+ md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null || command -v md5 2>/dev/null)"
+ for x in $(find etc -type f)
+ do
+ # find it relative filename
+ f="${x/etc\/netdata\//}"
- if [ ! -z "${md5sum}" ]
- then
- # find the checksum of the existing file
- md5="$(cat "${t}" | ${md5sum} | cut -d ' ' -f 1)"
- #echo >&2 "md5: ${md5}"
+ # find the stock filename
+ t="${f/.conf.old/.conf}"
+ t="${t/.conf.orig/.conf}"
- # check if it matches
- if [ "${configs_signatures[${md5}]}" = "${f}" ]
+ if [ ! -z "${md5sum}" ]
then
- run cp "${x}" "${t}"
+ # find the checksum of the existing file
+ md5="$( ${md5sum} <"${x}" | cut -d ' ' -f 1)"
+ #echo >&2 "md5: ${md5}"
+
+ # check if it matches
+ if [ "${configs_signatures[${md5}]}" = "${t}" ]
+ then
+ # it matches the default
+ run rm -f "${x}"
+ deleted_stock_configs=$(( deleted_stock_configs + 1 ))
+ fi
fi
- fi
-
- if ! [[ "${x}" =~ .*\.orig ]]
- then
- run mv "${x}" "${t}.orig"
- fi
-done
-
-run rm -rf etc.new
+ done
+ touch "etc/netdata/.installer-cleanup-of-stock-configs-done"
+fi
# -----------------------------------------------------------------------------
progress "Add user netdata to required user groups"
@@ -165,6 +153,26 @@ dir_should_be_link . var/lib/netdata netdata-dbs
dir_should_be_link . var/cache/netdata netdata-metrics
dir_should_be_link . var/log/netdata netdata-logs
+dir_should_be_link etc/netdata ../../usr/lib/netdata/conf.d orig
+
+if [ ${deleted_stock_configs} -gt 0 ]
+then
+ dir_should_be_link etc/netdata ../../usr/lib/netdata/conf.d "000.-.USE.THE.orig.LINK.TO.COPY.AND.EDIT.STOCK.CONFIG.FILES"
+fi
+
+
+# -----------------------------------------------------------------------------
+
+progress "create user config directories"
+
+for x in "python.d" "charts.d" "node.d" "health.d" "statsd.d"
+do
+ if [ ! -d "etc/netdata/${x}" ]
+ then
+ run mkdir -p "etc/netdata/${x}" || exit 1
+ fi
+done
+
# -----------------------------------------------------------------------------
progress "fix permissions"
diff --git a/makeself/jobs/10-prepare-destination.install.sh b/makeself/jobs/10-prepare-destination.install.sh
index 58c8c25fd..019732636 100755
--- a/makeself/jobs/10-prepare-destination.install.sh
+++ b/makeself/jobs/10-prepare-destination.install.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. $(dirname "${0}")/../functions.sh "${@}" || exit 1
diff --git a/makeself/jobs/50-bash-4.4.install.sh b/makeself/jobs/50-bash-4.4.18.install.sh
index 7868a1e76..000765825 100755
--- a/makeself/jobs/50-bash-4.4.install.sh
+++ b/makeself/jobs/50-bash-4.4.18.install.sh
@@ -1,14 +1,18 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. $(dirname "${0}")/../functions.sh "${@}" || exit 1
-fetch "bash-4.4" "http://ftp.gnu.org/gnu/bash/bash-4.4.tar.gz"
+fetch "bash-4.4.18" "http://ftp.gnu.org/gnu/bash/bash-4.4.18.tar.gz"
run ./configure \
--prefix=${NETDATA_INSTALL_PATH} \
+ --without-bash-malloc \
--enable-static-link \
+ --enable-net-redirections \
+ --enable-array-variables \
+ --disable-profiling \
--disable-nls \
- --without-bash-malloc \
# --disable-rpath \
# --enable-alias \
# --enable-arith-for-command \
diff --git a/makeself/jobs/50-curl-7.53.1.install.sh b/makeself/jobs/50-curl-7.60.0.install.sh
index ea80f0d2c..2b5c8f139 100755
--- a/makeself/jobs/50-curl-7.53.1.install.sh
+++ b/makeself/jobs/50-curl-7.60.0.install.sh
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. $(dirname "${0}")/../functions.sh "${@}" || exit 1
-fetch "curl-curl-7_53_1" "https://github.com/curl/curl/archive/curl-7_53_1.tar.gz"
+fetch "curl-curl-7_60_0" "https://github.com/curl/curl/archive/curl-7_60_0.tar.gz"
export LDFLAGS="-static"
export PKG_CONFIG="pkg-config --static"
diff --git a/makeself/jobs/50-fping-4.0.install.sh b/makeself/jobs/50-fping-4.0.install.sh
index 2e22ebf8d..7928f1aa4 100755
--- a/makeself/jobs/50-fping-4.0.install.sh
+++ b/makeself/jobs/50-fping-4.0.install.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. $(dirname "${0}")/../functions.sh "${@}" || exit 1
diff --git a/makeself/jobs/70-netdata-git.install.sh b/makeself/jobs/70-netdata-git.install.sh
index fea3a88bd..71ea0f63a 100755
--- a/makeself/jobs/70-netdata-git.install.sh
+++ b/makeself/jobs/70-netdata-git.install.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. ${NETDATA_MAKESELF_PATH}/functions.sh "${@}" || exit 1
@@ -12,13 +13,6 @@ else
# export CFLAGS="-static -O1 -ggdb -Wall -Wextra -Wformat-signedness"
fi
-if [ ! -z "${NETDATA_INSTALL_PATH}" -a -d "${NETDATA_INSTALL_PATH}/etc" ]
- then
- # make sure we don't have an old etc path, so that the installer
- # will install all files without examining changes
- run mv "${NETDATA_INSTALL_PATH}/etc" "${NETDATA_INSTALL_PATH}/etc.new"
-fi
-
run ./netdata-installer.sh --install "${NETDATA_INSTALL_PARENT}" \
--dont-wait \
--dont-start-it \
diff --git a/makeself/jobs/99-makeself.install.sh b/makeself/jobs/99-makeself.install.sh
index 698f2f92d..0e0d5c9da 100755
--- a/makeself/jobs/99-makeself.install.sh
+++ b/makeself/jobs/99-makeself.install.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
. $(dirname "${0}")/../functions.sh "${@}" || exit 1
@@ -12,18 +13,18 @@ ORIGIN="$(git config --get remote.origin.url || echo "unknown")"
if [[ "${ORIGIN}" =~ ^git@github.com:.*/netdata.*$ ]]
then
NOWNER="${ORIGIN/git@github.com:/}"
- NOWNER="${NOWNER/\/netdata*/}"
+ NOWNER="$( echo ${NOWNER} | cut -d '/' -f 1 )"
elif [[ "${ORIGIN}" =~ ^https://github.com/.*/netdata.*$ ]]
then
NOWNER="${ORIGIN/https:\/\/github.com\//}"
- NOWNER="${NOWNER/\/netdata*/}"
+ NOWNER="$( echo ${NOWNER} | cut -d '/' -f 1 )"
fi
# make sure it does not have any slashes in it
NOWNER="${NOWNER//\//_}"
-if [ "${NOWNER}" = "firehol" ]
+if [ "${NOWNER}" = "netdata" ]
then
NOWNER=
else
@@ -64,6 +65,7 @@ run mv "${NETDATA_INSTALL_PATH}/bin/netdata" \
cat >"${NETDATA_INSTALL_PATH}/bin/netdata" <<EOF
#!${NETDATA_INSTALL_PATH}/bin/bash
+export NETDATA_BASH_LOADABLES="DISABLE"
export PATH="${NETDATA_INSTALL_PATH}/bin:\${PATH}"
exec "${NETDATA_INSTALL_PATH}/bin/srv/netdata" "\${@}"
EOF
@@ -71,27 +73,6 @@ run chmod 755 "${NETDATA_INSTALL_PATH}/bin/netdata"
# -----------------------------------------------------------------------------
-# move etc to protect the destination when unpacked
-
-if [ ! -z "${NETDATA_INSTALL_PATH}" -a -d "${NETDATA_INSTALL_PATH}/etc" ]
- then
- if [ -d "${NETDATA_INSTALL_PATH}/etc.new" ]
- then
- run rm -rf "${NETDATA_INSTALL_PATH}/etc.new" || exit 1
- fi
-
- run mv "${NETDATA_INSTALL_PATH}/etc" \
- "${NETDATA_INSTALL_PATH}/etc.new" || exit 1
-
- if [ -f "${NETDATA_INSTALL_PATH}/etc.new/netdata/netdata.conf" ]
- then
- # delete the generated netdata.conf, so that the static installer will generate a new one
- run rm "${NETDATA_INSTALL_PATH}/etc.new/netdata/netdata.conf"
- fi
-fi
-
-
-# -----------------------------------------------------------------------------
# remove the links to allow untaring the archive
run rm "${NETDATA_INSTALL_PATH}/sbin" \
diff --git a/makeself/makeself-header.sh b/makeself/makeself-header.sh
index 83131a17c..19c1c3f99 100755
--- a/makeself/makeself-header.sh
+++ b/makeself/makeself-header.sh
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-3.0-or-later
cat << EOF > "$archname"
#!/bin/sh
# This script was generated using Makeself $MS_VERSION
diff --git a/makeself/makeself-help-header.txt b/makeself/makeself-help-header.txt
index e26490059..6e9e96237 100644
--- a/makeself/makeself-help-header.txt
+++ b/makeself/makeself-help-header.txt
@@ -26,7 +26,7 @@
# SYSTEM INIT
This file will be installed if this system runs with systemd:
- - /etc/systemd/system/netdata.service
+ - /lib/systemd/system/netdata.service
or, for older Centos, Debian/Ubuntu or OpenRC Gentoo:
@@ -41,6 +41,6 @@
netdata re-distributes a lot of open source software components.
Check its full license at:
- https://github.com/firehol/netdata/blob/master/LICENSE.md
+ https://github.com/netdata/netdata/blob/master/LICENSE.md
diff --git a/makeself/makeself-license.txt b/makeself/makeself-license.txt
index e26490059..6e9e96237 100644
--- a/makeself/makeself-license.txt
+++ b/makeself/makeself-license.txt
@@ -26,7 +26,7 @@
# SYSTEM INIT
This file will be installed if this system runs with systemd:
- - /etc/systemd/system/netdata.service
+ - /lib/systemd/system/netdata.service
or, for older Centos, Debian/Ubuntu or OpenRC Gentoo:
@@ -41,6 +41,6 @@
netdata re-distributes a lot of open source software components.
Check its full license at:
- https://github.com/firehol/netdata/blob/master/LICENSE.md
+ https://github.com/netdata/netdata/blob/master/LICENSE.md
diff --git a/makeself/makeself.sh b/makeself/makeself.sh
index 2ce37a24f..ee89df9a4 100755
--- a/makeself/makeself.sh
+++ b/makeself/makeself.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
#
# Makeself version 2.3.x
# by Stephane Peter <megastep@megastep.org>
diff --git a/makeself/post-installer.sh b/makeself/post-installer.sh
index 10f9863b9..38cc41ef7 100755
--- a/makeself/post-installer.sh
+++ b/makeself/post-installer.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
# This script is started using the shell of the system
# and executes our 'install-or-update.sh' script
diff --git a/makeself/run-all-jobs.sh b/makeself/run-all-jobs.sh
index 2ad594380..7a35fe648 100755
--- a/makeself/run-all-jobs.sh
+++ b/makeself/run-all-jobs.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# SPDX-License-Identifier: GPL-3.0-or-later
LC_ALL=C
umask 002