- Use -buildmode=pie for tests and binary build. bsc#1048046 bsc#1051429
This also includes some various improvements to the packaging of runc, containerd and docker-runc. OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=197
This commit is contained in:
parent
18b17a0bdb
commit
ca3f73206d
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 2 13:37:16 UTC 2017 - asarai@suse.com
|
||||
|
||||
- Use -buildmode=pie for tests and binary build. bsc#1048046 bsc#1051429
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 19 18:12:26 UTC 2017 - jmassaguerpla@suse.com
|
||||
|
||||
|
12
docker.spec
12
docker.spec
@ -200,6 +200,8 @@ export DOCKER_GITCOMMIT=%{git_version}
|
||||
# Until boo#1038493 is fixed properly we need to do this hack to get the
|
||||
# compiled-into-the-binary GOROOT.
|
||||
export GOROOT="$(GOROOT= go env GOROOT)"
|
||||
# Make sure we always build PIC code. bsc#1048046
|
||||
export BUILDFLAGS="-buildmode=pie"
|
||||
EOF
|
||||
) > docker_build_env
|
||||
. ./docker_build_env
|
||||
@ -209,6 +211,7 @@ man/md2man-all.sh
|
||||
|
||||
# build the tests binary
|
||||
GOPATH=$(pwd)/vendor:$(pwd)/.gopath/ go test \
|
||||
-buildmode=pie \
|
||||
-tags "$DOCKER_BUILDTAGS daemon autogen" \
|
||||
-c github.com/docker/docker/integration-cli -o tests.main
|
||||
|
||||
@ -265,14 +268,13 @@ PKG_LIST=$(go list -e \
|
||||
| grep -v 'github.com/docker/docker/cmd/dockerd$' \
|
||||
| grep -v 'github.com/docker/docker/builder/dockerfile/parser$' \
|
||||
| grep -v 'github.com/docker/docker/man$' \
|
||||
%if 0%{?with_libseccomp}
|
||||
| grep -v 'github.com/docker/docker/pkg/integration$')
|
||||
%else
|
||||
| grep -v 'github.com/docker/docker/pkg/integration$' \
|
||||
| grep -v 'github.com/docker/docker/profiles/seccomp$')
|
||||
%if ! 0%{?with_libseccomp}
|
||||
| grep -v 'github.com/docker/docker/profiles/seccomp$' \
|
||||
%endif
|
||||
)
|
||||
|
||||
go test -cover -ldflags -w -tags "$DOCKER_BUILDTAGS" -a -test.timeout=10m $PKG_LIST
|
||||
go test -buildmode=pie -cover -ldflags -w -tags "$DOCKER_BUILDTAGS" -a -test.timeout=10m $PKG_LIST
|
||||
|
||||
%install
|
||||
install -d %{buildroot}%{go_contribdir}
|
||||
|
Loading…
Reference in New Issue
Block a user