diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-04-02 11:49:29 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-04-02 11:49:29 +0300 |
commit | 6ace8446de9d0c27856ecfba5d3261a909b91c98 (patch) | |
tree | e2dacd341a30ae1bfcb0a54d21086ddc00bc1858 /makeself | |
parent | 345e5c7306c1e6544e304883a8d4c4f3e0b3a16e (diff) |
added Phil patches
Diffstat (limited to 'makeself')
-rwxr-xr-x | makeself/build-x86_64-static.sh | 24 | ||||
-rwxr-xr-x | makeself/build.sh | 23 | ||||
-rwxr-xr-x | makeself/jobs/99-makeself.install.sh | 3 | ||||
-rwxr-xr-x | makeself/setup-x86_64-static.sh | 23 |
4 files changed, 53 insertions, 20 deletions
diff --git a/makeself/build-x86_64-static.sh b/makeself/build-x86_64-static.sh new file mode 100755 index 0000000000..9d48bc9a41 --- /dev/null +++ b/makeself/build-x86_64-static.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +set -e + +if ! sudo docker inspect netdata-package-x86_64-static > /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 + sudo docker run -v `pwd`:/usr/src/netdata.git:rw alpine:3.5 \ + /bin/sh /usr/src/netdata.git/makeself/setup-x86_64-static.sh + id=`sudo docker ps -l -q` + sudo docker commit $id netdata-package-x86_64-static + fi +sudo docker run -v `pwd`:/usr/src/netdata.git:rw netdata-package-x86_64-static \ + /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 index 5c1e060709..eee77f77f5 100755 --- a/makeself/build.sh +++ b/makeself/build.sh @@ -1,25 +1,8 @@ #!/usr/bin/env sh -# this script should be running in alpine linux -# install the required packages -apk add \ - bash \ - wget \ - curl \ - ncurses \ - git \ - netcat-openbsd \ - alpine-sdk \ - autoconf \ - automake \ - gcc \ - make \ - pkgconfig \ - util-linux-dev \ - zlib-dev \ - libmnl-dev \ - libnetfilter_acct-dev \ - || exit 1 +# First run setup-x86_64-static.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 diff --git a/makeself/jobs/99-makeself.install.sh b/makeself/jobs/99-makeself.install.sh index 5c57ec8fbd..5bdc88576c 100755 --- a/makeself/jobs/99-makeself.install.sh +++ b/makeself/jobs/99-makeself.install.sh @@ -81,3 +81,6 @@ rm "${NETDATA_INSTALL_PATH}/sbin" \ ./system/post-installer.sh \ ${NULL} +# ----------------------------------------------------------------------------- +# copy it to the netdata build dir +cp "${NETDATA_INSTALL_PATH}.gz.run" . diff --git a/makeself/setup-x86_64-static.sh b/makeself/setup-x86_64-static.sh new file mode 100755 index 0000000000..1aa68bb560 --- /dev/null +++ b/makeself/setup-x86_64-static.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env sh + +# 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 \ + pkgconfig \ + util-linux-dev \ + zlib-dev \ + libmnl-dev \ + libnetfilter_acct-dev \ + || exit 1 |