diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2018-09-26 12:46:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 12:46:28 +0200 |
commit | c1b02322653f8474c6dc077f33f016d68f54406b (patch) | |
tree | d79203405b885b533db58455a77a344c6de98a65 /build/build.sh | |
parent | 465d375c5096421254c6e331394bf6d69ab36db9 (diff) |
reproducible build system (#4294)
- Move `m4` dir to `build/m4` to clean TLD
- create `build/build.sh` script which builds netdata in docker container
- create `build/Dockerfile` which creates reproducible build environment
- exclude `.lgtm.yml` from final package
- use `.tar.gz` package in `netdata.spec.in` as `*.xz` and `*.bz2` will be removed due to #3913
What it does is simple, you don't need any libraries installed on host to build netdata as they are provided inside a container.
Diffstat (limited to 'build/build.sh')
-rwxr-xr-x | build/build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build/build.sh b/build/build.sh new file mode 100755 index 0000000000..ee087b98fd --- /dev/null +++ b/build/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ -f build.sh ]; then + cd ../ || exit 1 +fi + +if [ "$IS_CONTAINER" != "" ]; then + autoreconf -ivf + ./configure --enable-maintainer-mode + make dist + rm -rf autom4te.cache +else + if [[ "$(docker images -q netdata-gcc-builder:latest 2> /dev/null)" == "" ]]; then + docker build -t netdata-gcc-builder:latest -f build/Dockerfile . + fi + docker run --rm -it \ + --env IS_CONTAINER=TRUE \ + --volume "${PWD}:/project:Z" \ + --workdir "/project" \ + netdata:gcc \ + ./.travis/build.sh +fi |