diff options
Diffstat (limited to 'makeself')
-rw-r--r-- | makeself/Makefile.am | 26 | ||||
-rw-r--r-- | makeself/Makefile.in | 485 | ||||
-rwxr-xr-x | makeself/build-x86_64-static.sh | 42 | ||||
-rwxr-xr-x | makeself/build.sh | 61 | ||||
-rwxr-xr-x | makeself/functions.sh | 62 | ||||
-rwxr-xr-x | makeself/install-alpine-packages.sh | 27 | ||||
-rwxr-xr-x | makeself/install-or-update.sh | 225 | ||||
-rwxr-xr-x | makeself/jobs/10-prepare-destination.install.sh | 17 | ||||
-rwxr-xr-x | makeself/jobs/50-bash-4.4.18.install.sh | 54 | ||||
-rwxr-xr-x | makeself/jobs/50-curl-7.60.0.install.sh | 34 | ||||
-rwxr-xr-x | makeself/jobs/50-fping-4.0.install.sh | 29 | ||||
-rwxr-xr-x | makeself/jobs/70-netdata-git.install.sh | 26 | ||||
-rwxr-xr-x | makeself/jobs/99-makeself.install.sh | 117 | ||||
-rwxr-xr-x | makeself/makeself-header.sh | 554 | ||||
-rw-r--r-- | makeself/makeself-help-header.txt | 46 | ||||
-rw-r--r-- | makeself/makeself-license.txt | 46 | ||||
-rw-r--r-- | makeself/makeself.lsm | 16 | ||||
-rwxr-xr-x | makeself/makeself.sh | 621 | ||||
-rwxr-xr-x | makeself/post-installer.sh | 11 | ||||
-rwxr-xr-x | makeself/run-all-jobs.sh | 42 |
20 files changed, 0 insertions, 2541 deletions
diff --git a/makeself/Makefile.am b/makeself/Makefile.am deleted file mode 100644 index f6f9167a..00000000 --- a/makeself/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -MAINTAINERCLEANFILES= $(srcdir)/Makefile.in - -dist_noinst_DATA = \ - $(NULL) - -dist_noinst_SCRIPTS = \ - build.sh \ - makeself.sh \ - makeself-license.txt \ - install-alpine-packages.sh \ - post-installer.sh \ - jobs/10-prepare-destination.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 \ - run-all-jobs.sh \ - install-or-update.sh \ - build-x86_64-static.sh \ - makeself-header.sh \ - makeself-help-header.txt \ - makeself.lsm \ - functions.sh \ - $(NULL) diff --git a/makeself/Makefile.in b/makeself/Makefile.in deleted file mode 100644 index 8962dbbc..00000000 --- a/makeself/Makefile.in +++ /dev/null @@ -1,485 +0,0 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2013 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -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)/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 -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SCRIPTS = $(dist_noinst_SCRIPTS) -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -DATA = $(dist_noinst_DATA) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -IPMIMONITORING_CFLAGS = @IPMIMONITORING_CFLAGS@ -IPMIMONITORING_LIBS = @IPMIMONITORING_LIBS@ -LDFLAGS = @LDFLAGS@ -LIBCAP_CFLAGS = @LIBCAP_CFLAGS@ -LIBCAP_LIBS = @LIBCAP_LIBS@ -LIBMNL_CFLAGS = @LIBMNL_CFLAGS@ -LIBMNL_LIBS = @LIBMNL_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MATH_CFLAGS = @MATH_CFLAGS@ -MATH_LIBS = @MATH_LIBS@ -MKDIR_P = @MKDIR_P@ -NFACCT_CFLAGS = @NFACCT_CFLAGS@ -NFACCT_LIBS = @NFACCT_LIBS@ -OBJEXT = @OBJEXT@ -OPTIONAL_IPMIMONITORING_CFLAGS = @OPTIONAL_IPMIMONITORING_CFLAGS@ -OPTIONAL_IPMIMONITORING_LIBS = @OPTIONAL_IPMIMONITORING_LIBS@ -OPTIONAL_LIBCAP_CFLAGS = @OPTIONAL_LIBCAP_CFLAGS@ -OPTIONAL_LIBCAP_LIBS = @OPTIONAL_LIBCAP_LIBS@ -OPTIONAL_MATH_CLFAGS = @OPTIONAL_MATH_CLFAGS@ -OPTIONAL_MATH_LIBS = @OPTIONAL_MATH_LIBS@ -OPTIONAL_NFACCT_CLFAGS = @OPTIONAL_NFACCT_CLFAGS@ -OPTIONAL_NFACCT_LIBS = @OPTIONAL_NFACCT_LIBS@ -OPTIONAL_UUID_CLFAGS = @OPTIONAL_UUID_CLFAGS@ -OPTIONAL_UUID_LIBS = @OPTIONAL_UUID_LIBS@ -OPTIONAL_ZLIB_CLFAGS = @OPTIONAL_ZLIB_CLFAGS@ -OPTIONAL_ZLIB_LIBS = @OPTIONAL_ZLIB_LIBS@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_RPM_RELEASE = @PACKAGE_RPM_RELEASE@ -PACKAGE_RPM_VERSION = @PACKAGE_RPM_VERSION@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SSE_CANDIDATE = @SSE_CANDIDATE@ -STRIP = @STRIP@ -UUID_CFLAGS = @UUID_CFLAGS@ -UUID_LIBS = @UUID_LIBS@ -VERSION = @VERSION@ -ZLIB_CFLAGS = @ZLIB_CFLAGS@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -ax_pthread_config = @ax_pthread_config@ -bindir = @bindir@ -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@ -chartsdir = @chartsdir@ -configdir = @configdir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -has_jemalloc = @has_jemalloc@ -has_tcmalloc = @has_tcmalloc@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libconfigdir = @libconfigdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -logdir = @logdir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -nodedir = @nodedir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pluginsdir = @pluginsdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pythondir = @pythondir@ -registrydir = @registrydir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -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) - -dist_noinst_SCRIPTS = \ - build.sh \ - makeself.sh \ - makeself-license.txt \ - install-alpine-packages.sh \ - post-installer.sh \ - jobs/10-prepare-destination.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 \ - run-all-jobs.sh \ - install-or-update.sh \ - build-x86_64-static.sh \ - makeself-header.sh \ - makeself-help-header.txt \ - makeself.lsm \ - functions.sh \ - $(NULL) - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu makeself/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu makeself/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(SCRIPTS) $(DATA) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ - ctags-am distclean distclean-generic distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags-am uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/makeself/build-x86_64-static.sh b/makeself/build-x86_64-static.sh deleted file mode 100755 index b0902512..00000000 --- a/makeself/build-x86_64-static.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -. $(dirname "$0")/../installer/functions.sh || exit 1 - -set -e - -DOCKER_CONTAINER_NAME="netdata-package-x86_64-static-alpine37" - -if ! sudo docker inspect "${DOCKER_CONTAINER_NAME}" >/dev/null 2>&1 -then - # To run interactively: - # sudo docker run -it netdata-package-x86_64-static /bin/sh - # (add -v host-dir:guest-dir:rw arguments to mount volumes) - # - # To remove images in order to re-create: - # sudo docker rm -v $(sudo docker ps -a -q -f status=exited) - # sudo docker rmi netdata-package-x86_64-static - # - # This command maps the current directory to - # /usr/src/netdata.git - # inside the container and runs the script install-alpine-packages.sh - # (also inside the container) - # - run sudo docker run -v $(pwd):/usr/src/netdata.git:rw alpine:3.7 \ - /bin/sh /usr/src/netdata.git/makeself/install-alpine-packages.sh - - # save the changes made permanently - id=$(sudo docker ps -l -q) - run sudo docker commit ${id} "${DOCKER_CONTAINER_NAME}" -fi - -# Run the build script inside the container -run sudo docker run -a stdin -a stdout -a stderr -i -t -v \ - $(pwd):/usr/src/netdata.git:rw \ - "${DOCKER_CONTAINER_NAME}" \ - /bin/sh /usr/src/netdata.git/makeself/build.sh "${@}" - -if [ "${USER}" ] - then - sudo chown -R "${USER}" . -fi diff --git a/makeself/build.sh b/makeself/build.sh deleted file mode 100755 index e8c1c9dd..00000000 --- a/makeself/build.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env sh -# SPDX-License-Identifier: GPL-3.0-or-later - -# ----------------------------------------------------------------------------- -# parse command line arguments - -export NETDATA_BUILD_WITH_DEBUG=0 - -while [ ! -z "${1}" ] -do - case "${1}" in - debug) - export NETDATA_BUILD_WITH_DEBUG=1 - ;; - - *) - ;; - esac - - shift -done - - -# ----------------------------------------------------------------------------- - -# First run install-alpine-packages.sh under alpine linux to install -# the required packages. build-x86_64-static.sh will do this for you -# using docker. - -cd $(dirname "$0") || exit 1 - -# if we don't run inside the netdata repo -# download it and run from it -if [ ! -f ../netdata-installer.sh ] -then - git clone https://github.com/netdata/netdata.git netdata.git || exit 1 - cd netdata.git/makeself || exit 1 - ./build.sh "$@" - exit $? -fi - -cat >&2 <<EOF - -This program will create a self-extracting shell package containing -a statically linked netdata, able to run on any 64bit Linux system, -without any dependencies from the target system. - -It can be used to have netdata running in no-time, or in cases the -target Linux system cannot compile netdata. - -EOF - -# read -p "Press ENTER to continue > " - -if [ ! -d tmp ] - then - mkdir tmp || exit 1 -fi - -./run-all-jobs.sh "$@" -exit $? diff --git a/makeself/functions.sh b/makeself/functions.sh deleted file mode 100755 index 10b324de..00000000 --- a/makeself/functions.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -# ----------------------------------------------------------------------------- - -# allow running the jobs by hand -[ -z "${NETDATA_BUILD_WITH_DEBUG}" ] && export NETDATA_BUILD_WITH_DEBUG=0 -[ -z "${NETDATA_INSTALL_PATH}" ] && export NETDATA_INSTALL_PATH="${1-/opt/netdata}" -[ -z "${NETDATA_MAKESELF_PATH}" ] && export NETDATA_MAKESELF_PATH="$(dirname "${0}")/.." -[ "${NETDATA_MAKESELF_PATH:0:1}" != "/" ] && export NETDATA_MAKESELF_PATH="$(pwd)/${NETDATA_MAKESELF_PATH}" -[ -z "${NETDATA_SOURCE_PATH}" ] && export NETDATA_SOURCE_PATH="${NETDATA_MAKESELF_PATH}/.." -export NULL= - -# make sure the path does not end with / -if [ "${NETDATA_INSTALL_PATH:$(( ${#NETDATA_INSTALL_PATH} - 1)):1}" = "/" ] - then - export NETDATA_INSTALL_PATH="${NETDATA_INSTALL_PATH:0:$(( ${#NETDATA_INSTALL_PATH} - 1))}" -fi - -# find the parent directory -export NETDATA_INSTALL_PARENT="$(dirname "${NETDATA_INSTALL_PATH}")" - -# ----------------------------------------------------------------------------- - -# bash strict mode -set -euo pipefail - -# ----------------------------------------------------------------------------- - -fetch() { - local dir="${1}" url="${2}" - local tar="${dir}.tar.gz" - - if [ ! -f "${NETDATA_MAKESELF_PATH}/tmp/${tar}" ] - then - run wget -O "${NETDATA_MAKESELF_PATH}/tmp/${tar}" "${url}" - fi - - if [ ! -d "${NETDATA_MAKESELF_PATH}/tmp/${dir}" ] - then - cd "${NETDATA_MAKESELF_PATH}/tmp" - run tar -zxpf "${tar}" - cd - - fi - - run cd "${NETDATA_MAKESELF_PATH}/tmp/${dir}" -} - -# ----------------------------------------------------------------------------- - -# load the functions of the netdata-installer.sh -. "${NETDATA_SOURCE_PATH}/installer/functions.sh" - -# ----------------------------------------------------------------------------- - -# debug -echo "ME=${0}" -echo "NETDATA_INSTALL_PARENT=${NETDATA_INSTALL_PARENT}" -echo "NETDATA_INSTALL_PATH=${NETDATA_INSTALL_PATH}" -echo "NETDATA_MAKESELF_PATH=${NETDATA_MAKESELF_PATH}" -echo "NETDATA_SOURCE_PATH=${NETDATA_SOURCE_PATH}" -echo "PROCESSORS=${SYSTEM_CPUS}" diff --git a/makeself/install-alpine-packages.sh b/makeself/install-alpine-packages.sh deleted file mode 100755 index 695be4d4..00000000 --- a/makeself/install-alpine-packages.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env sh -# SPDX-License-Identifier: GPL-3.0-or-later - -# this script should be running in alpine linux -# install the required packages -apk update -apk add --no-cache \ - bash \ - wget \ - curl \ - ncurses \ - git \ - netcat-openbsd \ - alpine-sdk \ - autoconf \ - automake \ - gcc \ - make \ - libtool \ - pkgconfig \ - util-linux-dev \ - openssl-dev \ - gnutls-dev \ - zlib-dev \ - libmnl-dev \ - libnetfilter_acct-dev \ - || exit 1 diff --git a/makeself/install-or-update.sh b/makeself/install-or-update.sh deleted file mode 100755 index bfcbe720..00000000 --- a/makeself/install-or-update.sh +++ /dev/null @@ -1,225 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -. $(dirname "${0}")/functions.sh - -export LC_ALL=C -umask 002 - -# Be nice on production environments -renice 19 $$ >/dev/null 2>/dev/null - -# ----------------------------------------------------------------------------- - -STARTIT=1 - -while [ ! -z "${1}" ] -do - if [ "${1}" = "--dont-start-it" ] - then - STARTIT=0 - else - echo >&2 "Unknown option '${1}'. Ignoring it." - fi - shift -done - -deleted_stock_configs=0 -if [ ! -f "etc/netdata/.installer-cleanup-of-stock-configs-done" ] -then - - # ----------------------------------------------------------------------------- - progress "Deleting stock configuration files from user configuration directory" - - declare -A configs_signatures=() - source "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 -type f) - do - # find it relative filename - f="${x/etc\/netdata\//}" - - # find the stock filename - t="${f/.conf.old/.conf}" - t="${t/.conf.orig/.conf}" - - if [ ! -z "${md5sum}" ] - then - # 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 - done - - touch "etc/netdata/.installer-cleanup-of-stock-configs-done" -fi - -# ----------------------------------------------------------------------------- -progress "Add user netdata to required user groups" - -NETDATA_USER="root" -NETDATA_GROUP="root" -add_netdata_user_and_group "/opt/netdata" -if [ $? -eq 0 ] - then - NETDATA_USER="netdata" - NETDATA_GROUP="netdata" -else - run_failed "Failed to add netdata user and group" -fi - - -# ----------------------------------------------------------------------------- -progress "Check SSL certificates paths" - -if [ ! -f "/etc/ssl/certs/ca-certificates.crt" ] -then - if [ ! -f /opt/netdata/.curlrc ] - then - cacert= - - # CentOS - [ -f "/etc/ssl/certs/ca-bundle.crt" ] && cacert="/etc/ssl/certs/ca-bundle.crt" - - if [ ! -z "${cacert}" ] - then - echo "Creating /opt/netdata/.curlrc with cacert=${cacert}" - echo >/opt/netdata/.curlrc "cacert=${cacert}" - else - run_failed "Failed to find /etc/ssl/certs/ca-certificates.crt" - fi - fi -fi - - -# ----------------------------------------------------------------------------- -progress "Install logrotate configuration for netdata" - -install_netdata_logrotate || run_failed "Cannot install logrotate file for netdata." - - -# ----------------------------------------------------------------------------- -progress "Install netdata at system init" - -install_netdata_service || run_failed "Cannot install netdata init service." - - -# ----------------------------------------------------------------------------- -progress "creating quick links" - -dir_should_be_link() { - local p="${1}" t="${2}" d="${3}" old - - old="${PWD}" - cd "${p}" || return 0 - - if [ -e "${d}" ] - then - if [ -h "${d}" ] - then - run rm "${d}" - else - run mv -f "${d}" "${d}.old.$$" - fi - fi - - run ln -s "${t}" "${d}" - cd "${old}" -} - -dir_should_be_link . bin sbin -dir_should_be_link usr ../bin bin -dir_should_be_link usr ../bin sbin -dir_should_be_link usr . local - -dir_should_be_link . etc/netdata netdata-configs -dir_should_be_link . usr/share/netdata/web netdata-web-files -dir_should_be_link . usr/libexec/netdata netdata-plugins -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" - -run chmod g+rx,o+rx /opt -run chown -R ${NETDATA_USER}:${NETDATA_GROUP} /opt/netdata - - -# ----------------------------------------------------------------------------- - -progress "fix plugin permissions" - -for x in apps.plugin freeipmi.plugin cgroup-network -do - f="usr/libexec/netdata/plugins.d/${x}" - - if [ -f "${f}" ] - then - run chown root:${NETDATA_GROUP} "${f}" - run chmod 4750 "${f}" - fi -done - -# fix the fping binary -if [ -f bin/fping ] -then - run chown root:${NETDATA_GROUP} bin/fping - run chmod 4750 bin/fping -fi - - -# ----------------------------------------------------------------------------- - -if [ ${STARTIT} -eq 1 ] -then - progress "starting netdata" - - restart_netdata "/opt/netdata/bin/netdata" - if [ $? -eq 0 ] - then - download_netdata_conf "${NETDATA_USER}:${NETDATA_GROUP}" "/opt/netdata/etc/netdata/netdata.conf" "http://localhost:19999/netdata.conf" - netdata_banner "is installed and running now!" - else - generate_netdata_conf "${NETDATA_USER}:${NETDATA_GROUP}" "/opt/netdata/etc/netdata/netdata.conf" "http://localhost:19999/netdata.conf" - netdata_banner "is installed now!" - fi -else - generate_netdata_conf "${NETDATA_USER}:${NETDATA_GROUP}" "/opt/netdata/etc/netdata/netdata.conf" "http://localhost:19999/netdata.conf" - netdata_banner "is installed now!" -fi diff --git a/makeself/jobs/10-prepare-destination.install.sh b/makeself/jobs/10-prepare-destination.install.sh deleted file mode 100755 index 01973263..00000000 --- a/makeself/jobs/10-prepare-destination.install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -. $(dirname "${0}")/../functions.sh "${@}" || exit 1 - -[ -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 ln -s bin sbin -run cd "${NETDATA_INSTALL_PATH}/usr" -run ln -s ../bin bin -run ln -s ../sbin sbin -run ln -s . local - diff --git a/makeself/jobs/50-bash-4.4.18.install.sh b/makeself/jobs/50-bash-4.4.18.install.sh deleted file mode 100755 index 00076582..00000000 --- a/makeself/jobs/50-bash-4.4.18.install.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -. $(dirname "${0}")/../functions.sh "${@}" || exit 1 - -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 \ -# --disable-rpath \ -# --enable-alias \ -# --enable-arith-for-command \ -# --enable-array-variables \ -# --enable-brace-expansion \ -# --enable-casemod-attributes \ -# --enable-casemod-expansions \ -# --enable-command-timing \ -# --enable-cond-command \ -# --enable-cond-regexp \ -# --enable-directory-stack \ -# --enable-dparen-arithmetic \ -# --enable-function-import \ -# --enable-glob-asciiranges-default \ -# --enable-help-builtin \ -# --enable-job-control \ -# --enable-net-redirections \ -# --enable-process-substitution \ -# --enable-progcomp \ -# --enable-prompt-string-decoding \ -# --enable-readline \ -# --enable-select \ - - -run make clean -run make -j${SYSTEM_CPUS} - -cat >examples/loadables/Makefile <<EOF -all: -clean: -install: -EOF - -run make install - -if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ] -then - run strip ${NETDATA_INSTALL_PATH}/bin/bash -fi diff --git a/makeself/jobs/50-curl-7.60.0.install.sh b/makeself/jobs/50-curl-7.60.0.install.sh deleted file mode 100755 index 2b5c8f13..00000000 --- a/makeself/jobs/50-curl-7.60.0.install.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -. $(dirname "${0}")/../functions.sh "${@}" || exit 1 - -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" - -run ./buildconf - -run ./configure \ - --prefix=${NETDATA_INSTALL_PATH} \ - --enable-optimize \ - --disable-shared \ - --enable-static \ - --enable-http \ - --enable-proxy \ - --enable-ipv6 \ - --enable-cookies \ - ${NULL} - -# Curl autoconf does not honour the curl_LDFLAGS environment variable -run sed -i -e "s/curl_LDFLAGS =/curl_LDFLAGS = -all-static/" src/Makefile - -run make clean -run make -j${SYSTEM_CPUS} -run make install - -if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ] -then - run strip ${NETDATA_INSTALL_PATH}/bin/curl -fi diff --git a/makeself/jobs/50-fping-4.0.install.sh b/makeself/jobs/50-fping-4.0.install.sh deleted file mode 100755 index 7928f1aa..00000000 --- a/makeself/jobs/50-fping-4.0.install.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -. $(dirname "${0}")/../functions.sh "${@}" || exit 1 - -fetch "fping-4.0" "https://github.com/schweikert/fping/releases/download/v4.0/fping-4.0.tar.gz" - -export CFLAGS="-static" - -run ./configure \ - --prefix=${NETDATA_INSTALL_PATH} \ - --enable-ipv4 \ - --enable-ipv6 \ - ${NULL} - -cat >doc/Makefile <<EOF -all: -clean: -install: -EOF - -run make clean -run make -j${SYSTEM_CPUS} -run make install - -if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ] -then - run strip ${NETDATA_INSTALL_PATH}/bin/fping -fi diff --git a/makeself/jobs/70-netdata-git.install.sh b/makeself/jobs/70-netdata-git.install.sh deleted file mode 100755 index 71ea0f63..00000000 --- a/makeself/jobs/70-netdata-git.install.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -. ${NETDATA_MAKESELF_PATH}/functions.sh "${@}" || exit 1 - -cd "${NETDATA_SOURCE_PATH}" || exit 1 - -if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ] -then - export CFLAGS="-static -O3" -else - export CFLAGS="-static -O1 -ggdb -Wall -Wextra -Wformat-signedness -fstack-protector-all -D_FORTIFY_SOURCE=2 -DNETDATA_INTERNAL_CHECKS=1" -# export CFLAGS="-static -O1 -ggdb -Wall -Wextra -Wformat-signedness" -fi - -run ./netdata-installer.sh --install "${NETDATA_INSTALL_PARENT}" \ - --dont-wait \ - --dont-start-it \ - ${NULL} - -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 diff --git a/makeself/jobs/99-makeself.install.sh b/makeself/jobs/99-makeself.install.sh deleted file mode 100755 index 0e0d5c9d..00000000 --- a/makeself/jobs/99-makeself.install.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -. $(dirname "${0}")/../functions.sh "${@}" || exit 1 - -run cd "${NETDATA_SOURCE_PATH}" || exit 1 - -# ----------------------------------------------------------------------------- -# find the netdata version - -NOWNER="unknown" -ORIGIN="$(git config --get remote.origin.url || echo "unknown")" -if [[ "${ORIGIN}" =~ ^git@github.com:.*/netdata.*$ ]] - then - NOWNER="${ORIGIN/git@github.com:/}" - NOWNER="$( echo ${NOWNER} | cut -d '/' -f 1 )" - -elif [[ "${ORIGIN}" =~ ^https://github.com/.*/netdata.*$ ]] - then - NOWNER="${ORIGIN/https:\/\/github.com\//}" - NOWNER="$( echo ${NOWNER} | cut -d '/' -f 1 )" -fi - -# make sure it does not have any slashes in it -NOWNER="${NOWNER//\//_}" - -if [ "${NOWNER}" = "netdata" ] - then - NOWNER= -else - NOWNER="-${NOWNER}" -fi - -VERSION="$(git describe || echo "undefined")" -[ -z "${VERSION}" ] && VERSION="undefined" - -FILE_VERSION="${VERSION}-$(uname -m)-$(date +"%Y%m%d-%H%M%S")${NOWNER}" - - -# ----------------------------------------------------------------------------- -# copy the files needed by makeself installation - -run mkdir -p "${NETDATA_INSTALL_PATH}/system" - -run cp \ - makeself/post-installer.sh \ - makeself/install-or-update.sh \ - installer/functions.sh \ - configs.signatures \ - system/netdata-init-d \ - system/netdata-lsb \ - system/netdata-openrc \ - system/netdata.logrotate \ - system/netdata.service \ - "${NETDATA_INSTALL_PATH}/system/" - - -# ----------------------------------------------------------------------------- -# create a wrapper to start our netdata with a modified path - -run mkdir -p "${NETDATA_INSTALL_PATH}/bin/srv" - -run mv "${NETDATA_INSTALL_PATH}/bin/netdata" \ - "${NETDATA_INSTALL_PATH}/bin/srv/netdata" || exit 1 - -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 -run chmod 755 "${NETDATA_INSTALL_PATH}/bin/netdata" - - -# ----------------------------------------------------------------------------- -# remove the links to allow untaring the archive - -run rm "${NETDATA_INSTALL_PATH}/sbin" \ - "${NETDATA_INSTALL_PATH}/usr/bin" \ - "${NETDATA_INSTALL_PATH}/usr/sbin" \ - "${NETDATA_INSTALL_PATH}/usr/local" - - -# ----------------------------------------------------------------------------- -# create the makeself archive - -run sed "s|NETDATA_VERSION|${FILE_VERSION}|g" <"${NETDATA_MAKESELF_PATH}/makeself.lsm" >"${NETDATA_MAKESELF_PATH}/makeself.lsm.tmp" - -run "${NETDATA_MAKESELF_PATH}/makeself.sh" \ - --gzip \ - --complevel 9 \ - --notemp \ - --needroot \ - --target "${NETDATA_INSTALL_PATH}" \ - --header "${NETDATA_MAKESELF_PATH}/makeself-header.sh" \ - --lsm "${NETDATA_MAKESELF_PATH}/makeself.lsm.tmp" \ - --license "${NETDATA_MAKESELF_PATH}/makeself-license.txt" \ - --help-header "${NETDATA_MAKESELF_PATH}/makeself-help-header.txt" \ - "${NETDATA_INSTALL_PATH}" \ - "${NETDATA_INSTALL_PATH}.gz.run" \ - "netdata, the real-time performance and health monitoring system" \ - ./system/post-installer.sh \ - ${NULL} - -run rm "${NETDATA_MAKESELF_PATH}/makeself.lsm.tmp" - -# ----------------------------------------------------------------------------- -# copy it to the netdata build dir - -FILE="netdata-${FILE_VERSION}.gz.run" - -run cp "${NETDATA_INSTALL_PATH}.gz.run" "${FILE}" -echo >&2 "Self-extracting installer copied to '${FILE}'" - -[ -f netdata-latest.gz.run ] && rm netdata-latest.gz.run -run ln -s "${FILE}" netdata-latest.gz.run -echo >&2 "Self-extracting installer linked to 'netdata-latest.gz.run'" diff --git a/makeself/makeself-header.sh b/makeself/makeself-header.sh deleted file mode 100755 index 19c1c3f9..00000000 --- a/makeself/makeself-header.sh +++ /dev/null @@ -1,554 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -cat << EOF > "$archname" -#!/bin/sh -# This script was generated using Makeself $MS_VERSION - -ORIG_UMASK=\`umask\` -if test "$KEEP_UMASK" = n; then - umask 077 -fi - -CRCsum="$CRCsum" -MD5="$MD5sum" -TMPROOT=\${TMPDIR:=/tmp} -USER_PWD="\$PWD"; export USER_PWD - -label="$LABEL" -script="$SCRIPT" -scriptargs="$SCRIPTARGS" -licensetxt="$LICENSE" -helpheader='$HELPHEADER' -targetdir="$archdirname" -filesizes="$filesizes" -keep="$KEEP" -nooverwrite="$NOOVERWRITE" -quiet="n" -accept="n" -nodiskspace="n" -export_conf="$EXPORT_CONF" - -print_cmd_arg="" -if type printf > /dev/null; then - print_cmd="printf" -elif test -x /usr/ucb/echo; then - print_cmd="/usr/ucb/echo" -else - print_cmd="echo" -fi - -if test -d /usr/xpg4/bin; then - PATH=/usr/xpg4/bin:\$PATH - export PATH -fi - -unset CDPATH - -MS_Printf() -{ - \$print_cmd \$print_cmd_arg "\$1" -} - -MS_PrintLicense() -{ - if test x"\$licensetxt" != x; then - echo "\$licensetxt" - if test x"\$accept" != xy; then - while true - do - MS_Printf "Please type y to accept, n otherwise: " - read yn - if test x"\$yn" = xn; then - keep=n - eval \$finish; exit 1 - break; - elif test x"\$yn" = xy; then - break; - fi - done - fi - fi -} - -MS_diskspace() -{ - ( - df -kP "\$1" | tail -1 | awk '{ if (\$4 ~ /%/) {print \$3} else {print \$4} }' - ) -} - -MS_dd() -{ - blocks=\`expr \$3 / 1024\` - bytes=\`expr \$3 % 1024\` - dd if="\$1" ibs=\$2 skip=1 obs=1024 conv=sync 2> /dev/null | \\ - { test \$blocks -gt 0 && dd ibs=1024 obs=1024 count=\$blocks ; \\ - test \$bytes -gt 0 && dd ibs=1 obs=1024 count=\$bytes ; } 2> /dev/null -} - -MS_dd_Progress() -{ - if test x"\$noprogress" = xy; then - MS_dd \$@ - return \$? - fi - file="\$1" - offset=\$2 - length=\$3 - pos=0 - bsize=4194304 - while test \$bsize -gt \$length; do - bsize=\`expr \$bsize / 4\` - done - blocks=\`expr \$length / \$bsize\` - bytes=\`expr \$length % \$bsize\` - ( - dd ibs=\$offset skip=1 2>/dev/null - pos=\`expr \$pos \+ \$bsize\` - MS_Printf " 0%% " 1>&2 - if test \$blocks -gt 0; then - while test \$pos -le \$length; do - dd bs=\$bsize count=1 2>/dev/null - pcent=\`expr \$length / 100\` - pcent=\`expr \$pos / \$pcent\` - if test \$pcent -lt 100; then - MS_Printf "\b\b\b\b\b\b\b" 1>&2 - if test \$pcent -lt 10; then - MS_Printf " \$pcent%% " 1>&2 - else - MS_Printf " \$pcent%% " 1>&2 - fi - fi - pos=\`expr \$pos \+ \$bsize\` - done - fi - if test \$bytes -gt 0; then - dd bs=\$bytes count=1 2>/dev/null - fi - MS_Printf "\b\b\b\b\b\b\b" 1>&2 - MS_Printf " 100%% " 1>&2 - ) < "\$file" -} - -MS_Help() -{ - cat << EOH >&2 -\${helpheader}Makeself version $MS_VERSION - 1) Getting help or info about \$0 : - \$0 --help Print this message - \$0 --info Print embedded info : title, default target directory, embedded script ... - \$0 --lsm Print embedded lsm entry (or no LSM) - \$0 --list Print the list of files in the archive - \$0 --check Checks integrity of the archive - - 2) Running \$0 : - \$0 [options] [--] [additional arguments to embedded script] - with following options (in that order) - --confirm Ask before running embedded script - --quiet Do not print anything except error messages - --accept Accept the license - --noexec Do not run embedded script - --keep Do not erase target directory after running - the embedded script - --noprogress Do not show the progress during the decompression - --nox11 Do not spawn an xterm - --nochown Do not give the extracted files to the current user - --nodiskspace Do not check for available disk space - --target dir Extract directly to a target directory - directory path can be either absolute or relative - --tar arg1 [arg2 ...] Access the contents of the archive through the tar command - -- Following arguments will be passed to the embedded script -EOH -} - -MS_Check() -{ - OLD_PATH="\$PATH" - PATH=\${GUESS_MD5_PATH:-"\$OLD_PATH:/bin:/usr/bin:/sbin:/usr/local/ssl/bin:/usr/local/bin:/opt/openssl/bin"} - MD5_ARG="" - MD5_PATH=\`exec <&- 2>&-; which md5sum || command -v md5sum || type md5sum\` - test -x "\$MD5_PATH" || MD5_PATH=\`exec <&- 2>&-; which md5 || command -v md5 || type md5\` - test -x "\$MD5_PATH" || MD5_PATH=\`exec <&- 2>&-; which digest || command -v digest || type digest\` - PATH="\$OLD_PATH" - - if test x"\$quiet" = xn; then - MS_Printf "Verifying archive integrity..." - fi - offset=\`head -n $SKIP "\$1" | wc -c | tr -d " "\` - verb=\$2 - i=1 - for s in \$filesizes - do - crc=\`echo \$CRCsum | cut -d" " -f\$i\` - if test -x "\$MD5_PATH"; then - if test x"\`basename \$MD5_PATH\`" = xdigest; then - MD5_ARG="-a md5" - fi - md5=\`echo \$MD5 | cut -d" " -f\$i\` - if test x"\$md5" = x00000000000000000000000000000000; then - test x"\$verb" = xy && echo " \$1 does not contain an embedded MD5 checksum." >&2 - else - md5sum=\`MS_dd_Progress "\$1" \$offset \$s | eval "\$MD5_PATH \$MD5_ARG" | cut -b-32\`; - if test x"\$md5sum" != x"\$md5"; then - echo "Error in MD5 checksums: \$md5sum is different from \$md5" >&2 - exit 2 - else - test x"\$verb" = xy && MS_Printf " MD5 checksums are OK." >&2 - fi - crc="0000000000"; verb=n - fi - fi - if test x"\$crc" = x0000000000; then - test x"\$verb" = xy && echo " \$1 does not contain a CRC checksum." >&2 - else - sum1=\`MS_dd_Progress "\$1" \$offset \$s | CMD_ENV=xpg4 cksum | awk '{print \$1}'\` - if test x"\$sum1" = x"\$crc"; then - test x"\$verb" = xy && MS_Printf " CRC checksums are OK." >&2 - else - echo "Error in checksums: \$sum1 is different from \$crc" >&2 - exit 2; - fi - fi - i=\`expr \$i + 1\` - offset=\`expr \$offset + \$s\` - done - if test x"\$quiet" = xn; then - echo " All good." - fi -} - -UnTAR() -{ - if test x"\$quiet" = xn; then - tar \$1vf - $UNTAR_EXTRA 2>&1 || { echo " ... Extraction failed." > /dev/tty; kill -15 \$$; } - else - tar \$1f - $UNTAR_EXTRA 2>&1 || { echo Extraction failed. > /dev/tty; kill -15 \$$; } - fi -} - -finish=true -xterm_loop= -noprogress=$NOPROGRESS -nox11=$NOX11 -copy=$COPY -ownership=y -verbose=n - -initargs="\$@" - -while true -do - case "\$1" in - -h | --help) - MS_Help - exit 0 - ;; - -q | --quiet) - quiet=y - noprogress=y - shift - ;; - --accept) - accept=y - shift - ;; - --info) - echo Identification: "\$label" - echo Target directory: "\$targetdir" - echo Uncompressed size: $USIZE KB - echo Compression: $COMPRESS - echo Date of packaging: $DATE - echo Built with Makeself version $MS_VERSION on $OSTYPE - echo Build command was: "$MS_COMMAND" - if test x"\$script" != x; then - echo Script run after extraction: - echo " " \$script \$scriptargs - fi - if test x"$copy" = xcopy; then - echo "Archive will copy itself to a temporary location" - fi - if test x"$NEED_ROOT" = xy; then - echo "Root permissions required for extraction" - fi - if test x"$KEEP" = xy; then - echo "directory \$targetdir is permanent" - else - echo "\$targetdir will be removed after extraction" - fi - exit 0 - ;; - --dumpconf) - echo LABEL=\"\$label\" - echo SCRIPT=\"\$script\" - echo SCRIPTARGS=\"\$scriptargs\" - echo archdirname=\"$archdirname\" - echo KEEP=$KEEP - echo NOOVERWRITE=$NOOVERWRITE - echo COMPRESS=$COMPRESS - echo filesizes=\"\$filesizes\" - echo CRCsum=\"\$CRCsum\" - echo MD5sum=\"\$MD5\" - echo OLDUSIZE=$USIZE - echo OLDSKIP=`expr $SKIP + 1` - exit 0 - ;; - --lsm) -cat << EOLSM -EOF -eval "$LSM_CMD" -cat << EOF >> "$archname" -EOLSM - exit 0 - ;; - --list) - echo Target directory: \$targetdir - offset=\`head -n $SKIP "\$0" | wc -c | tr -d " "\` - for s in \$filesizes - do - MS_dd "\$0" \$offset \$s | eval "$GUNZIP_CMD" | UnTAR t - offset=\`expr \$offset + \$s\` - done - exit 0 - ;; - --tar) - offset=\`head -n $SKIP "\$0" | wc -c | tr -d " "\` - arg1="\$2" - if ! shift 2; then MS_Help; exit 1; fi - for s in \$filesizes - do - MS_dd "\$0" \$offset \$s | eval "$GUNZIP_CMD" | tar "\$arg1" - "\$@" - offset=\`expr \$offset + \$s\` - done - exit 0 - ;; - --check) - MS_Check "\$0" y - exit 0 - ;; - --confirm) - verbose=y - shift - ;; - --noexec) - script="" - shift - ;; - --keep) - keep=y - shift - ;; - --target) - keep=y - targetdir=\${2:-.} - if ! shift 2; then MS_Help; exit 1; fi - ;; - --noprogress) - noprogress=y - shift - ;; - --nox11) - nox11=y - shift - ;; - --nochown) - ownership=n - shift - ;; - --nodiskspace) - nodiskspace=y - shift - ;; - --xwin) - if test "$NOWAIT" = n; then - finish="echo Press Return to close this window...; read junk" - fi - xterm_loop=1 - shift - ;; - --phase2) - copy=phase2 - shift - ;; - --) - shift - break ;; - -*) - echo Unrecognized flag : "\$1" >&2 - MS_Help - exit 1 - ;; - *) - break ;; - esac -done - -if test x"\$quiet" = xy -a x"\$verbose" = xy; then - echo Cannot be verbose and quiet at the same time. >&2 - exit 1 -fi - -if test x"$NEED_ROOT" = xy -a \`id -u\` -ne 0; then - echo "Administrative privileges required for this archive (use su or sudo)" >&2 - exit 1 -fi - -if test x"\$copy" \!= xphase2; then - MS_PrintLicense -fi - -case "\$copy" in -copy) - tmpdir=\$TMPROOT/makeself.\$RANDOM.\`date +"%y%m%d%H%M%S"\`.\$\$ - mkdir "\$tmpdir" || { - echo "Could not create temporary directory \$tmpdir" >&2 - exit 1 - } - SCRIPT_COPY="\$tmpdir/makeself" - echo "Copying to a temporary location..." >&2 - cp "\$0" "\$SCRIPT_COPY" - chmod +x "\$SCRIPT_COPY" - cd "\$TMPROOT" - exec "\$SCRIPT_COPY" --phase2 -- \$initargs - ;; -phase2) - finish="\$finish ; rm -rf \`dirname \$0\`" - ;; -esac - -if test x"\$nox11" = xn; then - if tty -s; then # Do we have a terminal? - : - else - if test x"\$DISPLAY" != x -a x"\$xterm_loop" = x; then # No, but do we have X? - if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable - GUESS_XTERMS="xterm gnome-terminal rxvt dtterm eterm Eterm xfce4-terminal lxterminal kvt konsole aterm terminology" - for a in \$GUESS_XTERMS; do - if type \$a >/dev/null 2>&1; then - XTERM=\$a - break - fi - done - chmod a+x \$0 || echo Please add execution rights on \$0 - if test \`echo "\$0" | cut -c1\` = "/"; then # Spawn a terminal! - exec \$XTERM -title "\$label" -e "\$0" --xwin "\$initargs" - else - exec \$XTERM -title "\$label" -e "./\$0" --xwin "\$initargs" - fi - fi - fi - fi -fi - -if test x"\$targetdir" = x.; then - tmpdir="." -else - if test x"\$keep" = xy; then - if test x"\$nooverwrite" = xy && test -d "\$targetdir"; then - echo "Target directory \$targetdir already exists, aborting." >&2 - exit 1 - fi - if test x"\$quiet" = xn; then - echo "Creating directory \$targetdir" >&2 - fi - tmpdir="\$targetdir" - dashp="-p" - else - tmpdir="\$TMPROOT/selfgz\$\$\$RANDOM" - dashp="" - fi - mkdir \$dashp \$tmpdir || { - echo 'Cannot create target directory' \$tmpdir >&2 - echo 'You should try option --target dir' >&2 - eval \$finish - exit 1 - } -fi - -location="\`pwd\`" -if test x"\$SETUP_NOCHECK" != x1; then - MS_Check "\$0" -fi -offset=\`head -n $SKIP "\$0" | wc -c | tr -d " "\` - -if test x"\$verbose" = xy; then - MS_Printf "About to extract $USIZE KB in \$tmpdir ... Proceed ? [Y/n] " - read yn - if test x"\$yn" = xn; then - eval \$finish; exit 1 - fi -fi - -if test x"\$quiet" = xn; then - MS_Printf "Uncompressing \$label" -fi -res=3 -if test x"\$keep" = xn; then - trap 'echo Signal caught, cleaning up >&2; cd \$TMPROOT; /bin/rm -rf \$tmpdir; eval \$finish; exit 15' 1 2 3 15 -fi - -if test x"\$nodiskspace" = xn; then - leftspace=\`MS_diskspace \$tmpdir\` - if test -n "\$leftspace"; then - if test "\$leftspace" -lt $USIZE; then - echo - echo "Not enough space left in "\`dirname \$tmpdir\`" (\$leftspace KB) to decompress \$0 ($USIZE KB)" >&2 - echo "Use --nodiskspace option to skip this check and proceed anyway" >&2 - if test x"\$keep" = xn; then - echo "Consider setting TMPDIR to a directory with more free space." - fi - eval \$finish; exit 1 - fi - fi -fi - -for s in \$filesizes -do - if MS_dd_Progress "\$0" \$offset \$s | eval "$GUNZIP_CMD" | ( cd "\$tmpdir"; umask \$ORIG_UMASK ; UnTAR xp ) 1>/dev/null; then - if test x"\$ownership" = xy; then - (cd "\$tmpdir"; chown -R \`id -u\` .; chgrp -R \`id -g\` .) - fi - else - echo >&2 - echo "Unable to decompress \$0" >&2 - eval \$finish; exit 1 - fi - offset=\`expr \$offset + \$s\` -done -if test x"\$quiet" = xn; then - echo -fi - -cd "\$tmpdir" -res=0 -if test x"\$script" != x; then - if test x"\$export_conf" = x"y"; then - MS_BUNDLE="\$0" - MS_LABEL="\$label" - MS_SCRIPT="\$script" - MS_SCRIPTARGS="\$scriptargs" - MS_ARCHDIRNAME="\$archdirname" - MS_KEEP="\$KEEP" - MS_NOOVERWRITE="\$NOOVERWRITE" - MS_COMPRESS="\$COMPRESS" - export MS_BUNDLE MS_LABEL MS_SCRIPT MS_SCRIPTARGS - export MS_ARCHDIRNAME MS_KEEP MS_NOOVERWRITE MS_COMPRESS - fi - - if test x"\$verbose" = x"y"; then - MS_Printf "OK to execute: \$script \$scriptargs \$* ? [Y/n] " - read yn - if test x"\$yn" = x -o x"\$yn" = xy -o x"\$yn" = xY; then - eval "\"\$script\" \$scriptargs \"\\\$@\""; res=\$?; - fi - else - eval "\"\$script\" \$scriptargs \"\\\$@\""; res=\$? - fi - if test "\$res" -ne 0; then - test x"\$verbose" = xy && echo "The program '\$script' returned an error code (\$res)" >&2 - fi -fi -if test x"\$keep" = xn; then - cd \$TMPROOT - /bin/rm -rf \$tmpdir -fi -eval \$finish; exit \$res -EOF diff --git a/makeself/makeself-help-header.txt b/makeself/makeself-help-header.txt deleted file mode 100644 index 6e9e9623..00000000 --- a/makeself/makeself-help-header.txt +++ /dev/null @@ -1,46 +0,0 @@ - - ^ - |.-. .-. .-. .-. . netdata - | '-' '-' '-' '-' real-time performance monitoring, done right! - +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---> - - (C) Copyright 2017, Costa Tsaousis - All rights reserved - Released under GPL v3+ - - You are about to install netdata to this system. - netdata will be installed at: - - /opt/netdata - - The following changes will be made to your system: - - # USERS / GROUPS - User 'netdata' and group 'netdata' will be added, if not present. - - # LOGROTATE - This file will be installed if logrotate is present. - - - /etc/logrotate.d/netdata - - # SYSTEM INIT - This file will be installed if this system runs with systemd: - - - /lib/systemd/system/netdata.service - - or, for older Centos, Debian/Ubuntu or OpenRC Gentoo: - - - /etc/init.d/netdata will be created - - - This package can also update a netdata installation that has been - created with another version of it. - - Your netdata configuration will be retained. - After installation, netdata will be (re-)started. - - netdata re-distributes a lot of open source software components. - Check its full license at: - https://github.com/netdata/netdata/blob/master/LICENSE.md - - diff --git a/makeself/makeself-license.txt b/makeself/makeself-license.txt deleted file mode 100644 index 6e9e9623..00000000 --- a/makeself/makeself-license.txt +++ /dev/null @@ -1,46 +0,0 @@ - - ^ - |.-. .-. .-. .-. . netdata - | '-' '-' '-' '-' real-time performance monitoring, done right! - +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---> - - (C) Copyright 2017, Costa Tsaousis - All rights reserved - Released under GPL v3+ - - You are about to install netdata to this system. - netdata will be installed at: - - /opt/netdata - - The following changes will be made to your system: - - # USERS / GROUPS - User 'netdata' and group 'netdata' will be added, if not present. - - # LOGROTATE - This file will be installed if logrotate is present. - - - /etc/logrotate.d/netdata - - # SYSTEM INIT - This file will be installed if this system runs with systemd: - - - /lib/systemd/system/netdata.service - - or, for older Centos, Debian/Ubuntu or OpenRC Gentoo: - - - /etc/init.d/netdata will be created - - - This package can also update a netdata installation that has been - created with another version of it. - - Your netdata configuration will be retained. - After installation, netdata will be (re-)started. - - netdata re-distributes a lot of open source software components. - Check its full license at: - https://github.com/netdata/netdata/blob/master/LICENSE.md - - diff --git a/makeself/makeself.lsm b/makeself/makeself.lsm deleted file mode 100644 index 6bd4703d..00000000 --- a/makeself/makeself.lsm +++ /dev/null @@ -1,16 +0,0 @@ -Begin3 -Title: netdata -Version: NETDATA_VERSION -Description: netdata is a system for distributed real-time performance and health monitoring. - It provides unparalleled insights, in real-time, of everything happening on the - system it runs (including applications such as web and database servers), using - modern interactive web dashboards. netdata is fast and efficient, designed to - permanently run on all systems (physical & virtual servers, containers, IoT - devices), without disrupting their core function. -Keywords: real-time performance and health monitoring -Author: Costa Tsaousis (costa@tsaousis.gr) -Maintained-by: Costa Tsaousis (costa@tsaousis.gr) -Original-site: https://my-netdata.io/ -Platform: Unix -Copying-policy: GPL -End diff --git a/makeself/makeself.sh b/makeself/makeself.sh deleted file mode 100755 index ee89df9a..00000000 --- a/makeself/makeself.sh +++ /dev/null @@ -1,621 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-3.0-or-later -# -# Makeself version 2.3.x -# by Stephane Peter <megastep@megastep.org> -# -# Utility to create self-extracting tar.gz archives. -# The resulting archive is a file holding the tar.gz archive with -# a small Shell script stub that uncompresses the archive to a temporary -# directory and then executes a given script from withing that directory. -# -# Makeself home page: http://makeself.io/ -# -# Version 2.0 is a rewrite of version 1.0 to make the code easier to read and maintain. -# -# Version history : -# - 1.0 : Initial public release -# - 1.1 : The archive can be passed parameters that will be passed on to -# the embedded script, thanks to John C. Quillan -# - 1.2 : Package distribution, bzip2 compression, more command line options, -# support for non-temporary archives. Ideas thanks to Francois Petitjean -# - 1.3 : More patches from Bjarni R. Einarsson and Francois Petitjean: -# Support for no compression (--nocomp), script is no longer mandatory, -# automatic launch in an xterm, optional verbose output, and -target -# archive option to indicate where to extract the files. -# - 1.4 : Improved UNIX compatibility (Francois Petitjean) -# Automatic integrity checking, support of LSM files (Francois Petitjean) -# - 1.5 : Many bugfixes. Optionally disable xterm spawning. -# - 1.5.1 : More bugfixes, added archive options -list and -check. -# - 1.5.2 : Cosmetic changes to inform the user of what's going on with big -# archives (Quake III demo) -# - 1.5.3 : Check for validity of the DISPLAY variable before launching an xterm. -# More verbosity in xterms and check for embedded command's return value. -# Bugfix for Debian 2.0 systems that have a different "print" command. -# - 1.5.4 : Many bugfixes. Print out a message if the extraction failed. -# - 1.5.5 : More bugfixes. Added support for SETUP_NOCHECK environment variable to -# bypass checksum verification of archives. -# - 1.6.0 : Compute MD5 checksums with the md5sum command (patch from Ryan Gordon) -# - 2.0 : Brand new rewrite, cleaner architecture, separated header and UNIX ports. -# - 2.0.1 : Added --copy -# - 2.1.0 : Allow multiple tarballs to be stored in one archive, and incremental updates. -# Added --nochown for archives -# Stopped doing redundant checksums when not necesary -# - 2.1.1 : Work around insane behavior from certain Linux distros with no 'uncompress' command -# Cleaned up the code to handle error codes from compress. Simplified the extraction code. -# - 2.1.2 : Some bug fixes. Use head -n to avoid problems. -# - 2.1.3 : Bug fixes with command line when spawning terminals. -# Added --tar for archives, allowing to give arbitrary arguments to tar on the contents of the archive. -# Added --noexec to prevent execution of embedded scripts. -# Added --nomd5 and --nocrc to avoid creating checksums in archives. -# Added command used to create the archive in --info output. -# Run the embedded script through eval. -# - 2.1.4 : Fixed --info output. -# Generate random directory name when extracting files to . to avoid problems. (Jason Trent) -# Better handling of errors with wrong permissions for the directory containing the files. (Jason Trent) -# Avoid some race conditions (Ludwig Nussel) -# Unset the $CDPATH variable to avoid problems if it is set. (Debian) -# Better handling of dot files in the archive directory. -# - 2.1.5 : Made the md5sum detection consistent with the header code. -# Check for the presence of the archive directory -# Added --encrypt for symmetric encryption through gpg (Eric Windisch) -# Added support for the digest command on Solaris 10 for MD5 checksums -# Check for available disk space before extracting to the target directory (Andreas Schweitzer) -# Allow extraction to run asynchronously (patch by Peter Hatch) -# Use file descriptors internally to avoid error messages (patch by Kay Tiong Khoo) -# - 2.1.6 : Replaced one dot per file progress with a realtime progress percentage and a spining cursor (Guy Baconniere) -# Added --noprogress to prevent showing the progress during the decompression (Guy Baconniere) -# Added --target dir to allow extracting directly to a target directory (Guy Baconniere) -# - 2.2.0 : Many bugfixes, updates and contributions from users. Check out the project page on Github for the details. -# - 2.3.0 : Option to specify packaging date to enable byte-for-byte reproducibility. (Marc Pawlowsky) -# -# (C) 1998-2017 by Stephane Peter <megastep@megastep.org> -# -# This software is released under the terms of the GNU GPL version 2 and above -# Please read the license at http://www.gnu.org/copyleft/gpl.html -# - -MS_VERSION=2.3.1 -MS_COMMAND="$0" -unset CDPATH - -for f in "${1+"$@"}"; do - MS_COMMAND="$MS_COMMAND \\\\ - \\\"$f\\\"" -done - -# For Solaris systems -if test -d /usr/xpg4/bin; then - PATH=/usr/xpg4/bin:$PATH - export PATH -fi - -# Procedures - -MS_Usage() -{ - echo "Usage: $0 [params] archive_dir file_name label startup_script [args]" - echo "params can be one or more of the following :" - echo " --version | -v : Print out Makeself version number and exit" - echo " --help | -h : Print out this help message" - echo " --tar-quietly : Suppress verbose output from the tar command" - echo " --quiet | -q : Do not print any messages other than errors." - echo " --gzip : Compress using gzip (default if detected)" - echo " --pigz : Compress with pigz" - echo " --bzip2 : Compress using bzip2 instead of gzip" - echo " --pbzip2 : Compress using pbzip2 instead of gzip" - echo " --xz : Compress using xz instead of gzip" - echo " --lzo : Compress using lzop instead of gzip" - echo " --lz4 : Compress using lz4 instead of gzip" - echo " --compress : Compress using the UNIX 'compress' command" - echo " --complevel lvl : Compression level for gzip pigz xz lzo lz4 bzip2 and pbzip2 (default 9)" - echo " --base64 : Instead of compressing, encode the data using base64" - echo " --gpg-encrypt : Instead of compressing, encrypt the data using GPG" - echo " --gpg-asymmetric-encrypt-sign" - echo " : Instead of compressing, asymmetrically encrypt and sign the data using GPG" - echo " --gpg-extra opt : Append more options to the gpg command line" - echo " --ssl-encrypt : Instead of compressing, encrypt the data using OpenSSL" - echo " --nocomp : Do not compress the data" - echo " --notemp : The archive will create archive_dir in the" - echo " current directory and uncompress in ./archive_dir" - echo " --needroot : Check that the root user is extracting the archive before proceeding" - echo " --copy : Upon extraction, the archive will first copy itself to" - echo " a temporary directory" - echo " --append : Append more files to an existing Makeself archive" - echo " The label and startup scripts will then be ignored" - echo " --target dir : Extract directly to a target directory" - echo " directory path can be either absolute or relative" - echo " --nooverwrite : Do not extract the archive if the specified target directory exists" - echo " --current : Files will be extracted to the current directory" - echo " Both --current and --target imply --notemp" - echo " --tar-extra opt : Append more options to the tar command line" - echo " --untar-extra opt : Append more options to the during the extraction of the tar archive" - echo " --nomd5 : Don't calculate an MD5 for archive" - echo " --nocrc : Don't calculate a CRC for archive" - echo " --header file : Specify location of the header script" - echo " --follow : Follow the symlinks in the archive" - echo " --noprogress : Do not show the progress during the decompression" - echo " --nox11 : Disable automatic spawn of a xterm" - echo " --nowait : Do not wait for user input after executing embedded" - echo " program from an xterm" - echo " --lsm file : LSM file describing the package" - echo " --license file : Append a license file" - echo " --help-header file : Add a header to the archive's --help output" - echo " --packaging-date date" - echo " : Use provided string as the packaging date" - echo " instead of the current date." - echo - echo " --keep-umask : Keep the umask set to shell default, rather than overriding when executing self-extracting archive." - echo " --export-conf : Export configuration variables to startup_script" - echo - echo "Do not forget to give a fully qualified startup script name" - echo "(i.e. with a ./ prefix if inside the archive)." - exit 1 -} - -# Default settings -if type gzip 2>&1 > /dev/null; then - COMPRESS=gzip -else - COMPRESS=Unix -fi -COMPRESS_LEVEL=9 -KEEP=n -CURRENT=n -NOX11=n -NOWAIT=n -APPEND=n -TAR_QUIETLY=n -KEEP_UMASK=n -QUIET=n -NOPROGRESS=n -COPY=none -NEED_ROOT=n -TAR_ARGS=cvf -TAR_EXTRA="" -GPG_EXTRA="" -DU_ARGS=-ks -HEADER=`dirname "$0"`/makeself-header.sh -TARGETDIR="" -NOOVERWRITE=n -DATE=`LC_ALL=C date` -EXPORT_CONF=n - -# LSM file stuff -LSM_CMD="echo No LSM. >> \"\$archname\"" - -while true -do - case "$1" in - --version | -v) - echo Makeself version $MS_VERSION - exit 0 - ;; - --pbzip2) - COMPRESS=pbzip2 - shift - ;; - --bzip2) - COMPRESS=bzip2 - shift - ;; - --gzip) - COMPRESS=gzip - shift - ;; - --pigz) - COMPRESS=pigz - shift - ;; - --xz) - COMPRESS=xz - shift - ;; - --lzo) - COMPRESS=lzo - shift - ;; - --lz4) - COMPRESS=lz4 - shift - ;; - --compress) - COMPRESS=Unix - shift - ;; - --base64) - COMPRESS=base64 - shift - ;; - --gpg-encrypt) - COMPRESS=gpg - shift - ;; - --gpg-asymmetric-encrypt-sign) - COMPRESS=gpg-asymmetric - shift - ;; - --gpg-extra) - GPG_EXTRA="$2" - if ! shift 2; then MS_Help; exit 1; fi - ;; - --ssl-encrypt) - COMPRESS=openssl - shift - ;; - --nocomp) - COMPRESS=none - shift - ;; - --complevel) - COMPRESS_LEVEL="$2" - if ! shift 2; then MS_Help; exit 1; fi - ;; - --notemp) - KEEP=y - shift - ;; - --copy) - COPY=copy - shift - ;; - --current) - CURRENT=y - KEEP=y - shift - ;; - --tar-extra) - TAR_EXTRA="$2" - if ! shift 2; then MS_Help; exit 1; fi - ;; - --untar-extra) - UNTAR_EXTRA="$2" - if ! shift 2; then MS_Help; exit 1; fi - ;; - --target) - TARGETDIR="$2" - KEEP=y - if ! shift 2; then MS_Help; exit 1; fi - ;; - --nooverwrite) - NOOVERWRITE=y - shift - ;; - --needroot) - NEED_ROOT=y - shift - ;; - --header) - HEADER="$2" - if ! shift 2; then MS_Help; exit 1; fi - ;; - --license) - LICENSE=`cat $2` - if ! shift 2; then MS_Help; exit 1; fi - ;; - --follow) - TAR_ARGS=cvhf - DU_ARGS=-ksL - shift - ;; - --noprogress) - NOPROGRESS=y - shift - ;; - --nox11) - NOX11=y - shift - ;; - --nowait) - NOWAIT=y - shift - ;; - --nomd5) - NOMD5=y - shift - ;; - --nocrc) - NOCRC=y - shift - ;; - --append) - APPEND=y - shift - ;; - --lsm) - LSM_CMD="cat \"$2\" >> \"\$archname\"" - if ! shift 2; then MS_Help; exit 1; fi - ;; - --packaging-date) - DATE="$2" - if ! shift 2; then MS_Help; exit 1; fi - ;; - --help-header) - HELPHEADER=`sed -e "s/'/'\\\\\''/g" $2` - if ! shift 2; then MS_Help; exit 1; fi - [ -n "$HELPHEADER" ] && HELPHEADER="$HELPHEADER -" - ;; - --tar-quietly) - TAR_QUIETLY=y - shift - ;; - --keep-umask) - KEEP_UMASK=y - shift - ;; - --export-conf) - EXPORT_CONF=y - shift - ;; - -q | --quiet) - QUIET=y - shift - ;; - -h | --help) - MS_Usage - ;; - -*) - echo Unrecognized flag : "$1" - MS_Usage - ;; - *) - break - ;; - esac -done - -if test $# -lt 1; then - MS_Usage -else - if test -d "$1"; then - archdir="$1" - else - echo "Directory $1 does not exist." >&2 - exit 1 - fi -fi -archname="$2" - -if test "$QUIET" = "y" || test "$TAR_QUIETLY" = "y"; then - if test "$TAR_ARGS" = "cvf"; then - TAR_ARGS="cf" - elif test "$TAR_ARGS" = "cvhf";then - TAR_ARGS="chf" - fi -fi - -if test "$APPEND" = y; then - if test $# -lt 2; then - MS_Usage - fi - - # Gather the info from the original archive - OLDENV=`sh "$archname" --dumpconf` - if test $? -ne 0; then - echo "Unable to update archive: $archname" >&2 - exit 1 - else - eval "$OLDENV" - fi -else - if test "$KEEP" = n -a $# = 3; then - echo "ERROR: Making a temporary archive with no embedded command does not make sense!" >&2 - echo >&2 - MS_Usage - fi - # We don't want to create an absolute directory unless a target directory is defined - if test "$CURRENT" = y; then - archdirname="." - elif test x$TARGETDIR != x; then - archdirname="$TARGETDIR" - else - archdirname=`basename "$1"` - fi - - if test $# -lt 3; then - MS_Usage - fi - - LABEL="$3" - SCRIPT="$4" - test "x$SCRIPT" = x || shift 1 - shift 3 - SCRIPTARGS="$*" -fi - -if test "$KEEP" = n -a "$CURRENT" = y; then - echo "ERROR: It is A VERY DANGEROUS IDEA to try to combine --notemp and --current." >&2 - exit 1 -fi - -case $COMPRESS in -gzip) - GZIP_CMD="gzip -c$COMPRESS_LEVEL" - GUNZIP_CMD="gzip -cd" - ;; -pigz) - GZIP_CMD="pigz -$COMPRESS_LEVEL" - GUNZIP_CMD="gzip -cd" - ;; -pbzip2) - GZIP_CMD="pbzip2 -c$COMPRESS_LEVEL" - GUNZIP_CMD="bzip2 -d" - ;; -bzip2) - GZIP_CMD="bzip2 -$COMPRESS_LEVEL" - GUNZIP_CMD="bzip2 -d" - ;; -xz) - GZIP_CMD="xz -c$COMPRESS_LEVEL" - GUNZIP_CMD="xz -d" - ;; -lzo) - GZIP_CMD="lzop -c$COMPRESS_LEVEL" - GUNZIP_CMD="lzop -d" - ;; -lz4) - GZIP_CMD="lz4 -c$COMPRESS_LEVEL" - GUNZIP_CMD="lz4 -d" - ;; -base64) - GZIP_CMD="base64" - GUNZIP_CMD="base64 -d -i" - ;; -gpg) - GZIP_CMD="gpg $GPG_EXTRA -ac -z$COMPRESS_LEVEL" - GUNZIP_CMD="gpg -d" - ;; -gpg-asymmetric) - GZIP_CMD="gpg $GPG_EXTRA -z$COMPRESS_LEVEL -es" - GUNZIP_CMD="gpg --yes -d" - ;; -openssl) - GZIP_CMD="openssl aes-256-cbc -a -salt -md sha256" - GUNZIP_CMD="openssl aes-256-cbc -d -a -md sha256" - ;; -Unix) - GZIP_CMD="compress -cf" - GUNZIP_CMD="exec 2>&-; uncompress -c || test \\\$? -eq 2 || gzip -cd" - ;; -none) - GZIP_CMD="cat" - GUNZIP_CMD="cat" - ;; -esac - -tmpfile="${TMPDIR:=/tmp}/mkself$$" - -if test -f "$HEADER"; then - oldarchname="$archname" - archname="$tmpfile" - # Generate a fake header to count its lines - SKIP=0 - . "$HEADER" - SKIP=`cat "$tmpfile" |wc -l` - # Get rid of any spaces - SKIP=`expr $SKIP` - rm -f "$tmpfile" - if test "$QUIET" = "n";then - echo Header is $SKIP lines long >&2 - fi - - archname="$oldarchname" -else - echo "Unable to open header file: $HEADER" >&2 - exit 1 -fi - -if test "$QUIET" = "n";then - echo -fi - -if test "$APPEND" = n; then - if test -f "$archname"; then - echo "WARNING: Overwriting existing file: $archname" >&2 - fi -fi - -USIZE=`du $DU_ARGS "$archdir" | awk '{print $1}'` - -if test "." = "$archdirname"; then - if test "$KEEP" = n; then - archdirname="makeself-$$-`date +%Y%m%d%H%M%S`" - fi -fi - -test -d "$archdir" || { echo "Error: $archdir does not exist."; rm -f "$tmpfile"; exit 1; } -if test "$QUIET" = "n";then - echo About to compress $USIZE KB of data... - echo Adding files to archive named \"$archname\"... -fi -exec 3<> "$tmpfile" -( cd "$archdir" && ( tar $TAR_EXTRA -$TAR_ARGS - . | eval "$GZIP_CMD" >&3 ) ) || \ - { echo Aborting: archive directory not found or temporary file: "$tmpfile" could not be created.; exec 3>&-; rm -f "$tmpfile"; exit 1; } -exec 3>&- # try to close the archive - -fsize=`cat "$tmpfile" | wc -c | tr -d " "` - -# Compute the checksums - -md5sum=00000000000000000000000000000000 -crcsum=0000000000 - -if test "$NOCRC" = y; then - if test "$QUIET" = "n";then - echo "skipping crc at user request" - fi -else - crcsum=`cat "$tmpfile" | CMD_ENV=xpg4 cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1` - if test "$QUIET" = "n";then - echo "CRC: $crcsum" - fi -fi - -if test "$NOMD5" = y; then - if test "$QUIET" = "n";then - echo "skipping md5sum at user request" - fi -else - # Try to locate a MD5 binary - OLD_PATH=$PATH - PATH=${GUESS_MD5_PATH:-"$OLD_PATH:/bin:/usr/bin:/sbin:/usr/local/ssl/bin:/usr/local/bin:/opt/openssl/bin"} - MD5_ARG="" - MD5_PATH=`exec <&- 2>&-; which md5sum || command -v md5sum || type md5sum` - test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which md5 || command -v md5 || type md5` - test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which digest || command -v digest || type digest` - PATH=$OLD_PATH - if test -x "$MD5_PATH"; then - if test `basename ${MD5_PATH}`x = digestx; then - MD5_ARG="-a md5" - fi - md5sum=`cat "$tmpfile" | eval "$MD5_PATH $MD5_ARG" | cut -b-32`; - if test "$QUIET" = "n";then - echo "MD5: $md5sum" - fi - else - if test "$QUIET" = "n";then - echo "MD5: none, MD5 command not found" - fi - fi -fi - -if test "$APPEND" = y; then - mv "$archname" "$archname".bak || exit - - # Prepare entry for new archive - filesizes="$filesizes $fsize" - CRCsum="$CRCsum $crcsum" - MD5sum="$MD5sum $md5sum" - USIZE=`expr $USIZE + $OLDUSIZE` - # Generate the header - . "$HEADER" - # Append the original data - tail -n +$OLDSKIP "$archname".bak >> "$archname" - # Append the new data - cat "$tmpfile" >> "$archname" - - chmod +x "$archname" - rm -f "$archname".bak - if test "$QUIET" = "n";then - echo Self-extractable archive \"$archname\" successfully updated. - fi -else - filesizes="$fsize" - CRCsum="$crcsum" - MD5sum="$md5sum" - - # Generate the header - . "$HEADER" - - # Append the compressed tar data after the stub - if test "$QUIET" = "n";then - echo - fi - cat "$tmpfile" >> "$archname" - chmod +x "$archname" - if test "$QUIET" = "n";then - echo Self-extractable archive \"$archname\" successfully created. - fi -fi -rm -f "$tmpfile" diff --git a/makeself/post-installer.sh b/makeself/post-installer.sh deleted file mode 100755 index 38cc41ef..00000000 --- a/makeself/post-installer.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/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 -# using the netdata supplied, statically linked BASH -# -# so, at 'install-or-update.sh' we are always sure -# we run under BASH v4. - -./bin/bash system/install-or-update.sh "${@}" diff --git a/makeself/run-all-jobs.sh b/makeself/run-all-jobs.sh deleted file mode 100755 index 7a35fe64..00000000 --- a/makeself/run-all-jobs.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -LC_ALL=C -umask 002 - -# be nice -renice 19 $$ >/dev/null 2>/dev/null - -# ----------------------------------------------------------------------------- -# prepare the environment for the jobs - -# installation directory -export NETDATA_INSTALL_PATH="${1-/opt/netdata}" - -# our source directory -export NETDATA_MAKESELF_PATH="$(dirname "${0}")" -if [ "${NETDATA_MAKESELF_PATH:0:1}" != "/" ] - then - export NETDATA_MAKESELF_PATH="$(pwd)/${NETDATA_MAKESELF_PATH}" -fi - -# netdata source directory -export NETDATA_SOURCE_PATH="${NETDATA_MAKESELF_PATH}/.." - -# make sure ${NULL} is empty -export NULL= - -# ----------------------------------------------------------------------------- - -cd "${NETDATA_MAKESELF_PATH}" || exit 1 - -. ./functions.sh "${@}" || exit 1 - -for x in jobs/*.install.sh -do - progress "running ${x}" - "${x}" "${NETDATA_INSTALL_PATH}" -done - -echo >&2 "All jobs for static packaging done successfully." -exit 0 |