From b1a95a8ea2142cb337281d97824033b461e1b2c9 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Jun 02 2015 11:22:59 +0000 Subject: remove vishvananda/netns/netns_linux_amd.go file if arm architecture is used add debug info --- diff --git a/add-debug-info.patch b/add-debug-info.patch new file mode 100644 index 0000000..517510e --- /dev/null +++ b/add-debug-info.patch @@ -0,0 +1,77 @@ +From 62049055b6e013832ce917a6de8e998f8201979e Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 2 Jun 2015 12:41:40 +0200 +Subject: [PATCH] add debug info + +--- + hack/make/.dockerinit | 1 + + hack/make/.dockerinit-gccgo | 1 + + hack/make/.ensure-httpserver | 2 +- + hack/make/binary | 1 + + hack/make/gccgo | 1 + + 5 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/hack/make/.dockerinit b/hack/make/.dockerinit +index 4a62ee1..cc54834 100644 +--- a/hack/make/.dockerinit ++++ b/hack/make/.dockerinit +@@ -12,6 +12,7 @@ go build \ + $LDFLAGS + $LDFLAGS_STATIC + -extldflags \"$EXTLDFLAGS_STATIC\" ++ -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') + " \ + ./dockerinit + +diff --git a/hack/make/.dockerinit-gccgo b/hack/make/.dockerinit-gccgo +index 9890863..5dbef11 100644 +--- a/hack/make/.dockerinit-gccgo ++++ b/hack/make/.dockerinit-gccgo +@@ -13,6 +13,7 @@ go build --compiler=gccgo \ + -Wl,--no-export-dynamic + $EXTLDFLAGS_STATIC_DOCKER + -lnetgo ++ -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') + " \ + ./dockerinit + +diff --git a/hack/make/.ensure-httpserver b/hack/make/.ensure-httpserver +index 38659ed..ce45895 100644 +--- a/hack/make/.ensure-httpserver ++++ b/hack/make/.ensure-httpserver +@@ -8,7 +8,7 @@ dir="$DEST/httpserver" + mkdir -p "$dir" + ( + cd "$dir" +- GOOS=linux GOARCH=amd64 go build -o httpserver github.com/docker/docker/contrib/httpserver ++ GOOS=linux GOARCH=amd64 go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o httpserver github.com/docker/docker/contrib/httpserver + cp ../../../../contrib/httpserver/Dockerfile . + docker build -qt httpserver . > /dev/null + ) +diff --git a/hack/make/binary b/hack/make/binary +index d764336..6392da1 100644 +--- a/hack/make/binary ++++ b/hack/make/binary +@@ -14,6 +14,7 @@ go build \ + -ldflags " + $LDFLAGS + $LDFLAGS_STATIC_DOCKER ++ -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') + " \ + ./docker + +diff --git a/hack/make/gccgo b/hack/make/gccgo +index 972934a..6b5a3a3 100644 +--- a/hack/make/gccgo ++++ b/hack/make/gccgo +@@ -18,6 +18,7 @@ go build -compiler=gccgo \ + $EXTLDFLAGS_STATIC_DOCKER + -Wl,--no-export-dynamic + -ldl ++ -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') + " \ + ./docker + +-- +1.9.3 + diff --git a/docker.spec b/docker.spec index d130f89..25d129d 100644 --- a/docker.spec +++ b/docker.spec @@ -3,7 +3,10 @@ # docker builds in a checksum of dockerinit into docker, # so stripping the binaries breaks docker +%if 0%{?fedora} +%else %global debug_package %{nil} +%endif %global provider github %global provider_tld com %global project docker @@ -45,7 +48,7 @@ Name: %{repo} Version: 1.7.0 -Release: 10.git%{d_shortcommit}%{?dist} +Release: 11.git%{d_shortcommit}%{?dist} Summary: Automates deployment of containerized applications License: ASL 2.0 URL: http://www.%{repo}.com @@ -58,6 +61,11 @@ Source3: %{repo}-storage.sysconfig Source4: %{repo}-logrotate.sh Source5: README.%{repo}-logrotate Source6: %{repo}-network.sysconfig + +%if 0%{?fedora} +Patch0: add-debug-info.patch +%endif + %if 0%{?with_selinux} Source7: https://github.com/fedora-cloud/%{repo}-selinux/archive/%{ds_commit}/%{repo}-selinux-%{ds_shortcommit}.tar.gz %endif # with_selinux @@ -262,6 +270,8 @@ This package installs %{summary}. %prep %autosetup -Sgit -n %{repo}-%{d_commit} + +# here keep the new line above otherwise autosetup fails when applying patch cp %{SOURCE5} . sed -i 's/$/%{?dist}/' VERSION @@ -270,6 +280,10 @@ sed -i 's/$/%{?dist}/' VERSION tar zxf %{SOURCE7} %endif # with_selinux +%ifarch %{arm} +rm vendor/src/github.com/vishvananda/netns/netns_linux_amd.go +%endif + %build # set up temporary build gopath, and put our directory there mkdir -p ./_build/src/github.com/%{repo} @@ -476,6 +490,10 @@ fi %{_datadir}/zsh/site-functions/_%{repo} %changelog +* Tue Jun 02 2015 jchaloup - 1.7.0-11.gita53a6e6 +- remove vishvananda/netns/netns_linux_amd.go file if arm architecture is used +- add debug info + * Mon Jun 01 2015 Lokesh Mandvekar - 1.7.0-10.gita53a6e6 - built docker @lsm5/fedora commit#a53a6e6