Rename the binary as ooniprobe (#58)

While there run the build container as unpriv user.
This commit is contained in:
Simone Basso 2019-10-02 19:27:15 +02:00 committed by GitHub
parent f425d3f007
commit 23c8df1f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View File

@ -10,17 +10,19 @@ if [ "$1" = "windows" ]; then
set -x
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ \
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 \
go build -o dist/windows/amd64/ooni.exe -v ./cmd/ooni
go build -o dist/windows/amd64/ooniprobe.exe -v ./cmd/ooniprobe
elif [ "$1" = "linux" ]; then
set -x
docker build -t oonibuild .
docker run -v `pwd`:/oonibuild -w /oonibuild -t oonibuild \
go build -o dist/linux/amd64/ooni -v ./cmd/ooni
docker run -v `pwd`:/oonibuild -w /oonibuild -t --cap-drop=all \
--user `id -u`:`id -g` -e 'GOCACHE=/tmp/go/cache' -e 'GOPATH=/tmp/go/path' \
oonibuild \
go build -o dist/linux/amd64/ooniprobe -v ./cmd/ooniprobe
elif [ "$1" = "macos" ]; then
set -x
go build -o dist/macos/amd64/ooni -v ./cmd/ooni
go build -o dist/macos/amd64/ooniprobe -v ./cmd/ooniprobe
elif [ "$1" = "_travis-linux" ]; then
set -x
@ -41,7 +43,7 @@ elif [ "$1" = "help" ]; then
echo "Usage: $0 linux | macos | windows"
echo ""
echo "Builds OONI on supported systems. The output binary will"
echo "be saved at './dist/<system>/<arch>/ooni[.exe]'."
echo "be saved at './dist/<system>/<arch>/ooniprobe[.exe]'."
echo ""
echo "# Linux"
echo ""

View File

@ -2,5 +2,5 @@
set -ex
./dist/${OS_NAME}/amd64/ooni onboard --yes
./dist/${OS_NAME}/amd64/ooni run --config testdata/testing-config.json -v --no-collector
./dist/${OS_NAME}/amd64/ooniprobe onboard --yes
./dist/${OS_NAME}/amd64/ooniprobe run --config testdata/testing-config.json -v --no-collector