Accepting request 313847 from home:dirkmueller:branches:Virtualization:containers

- rediff ignore-dockerinit-checksum.patch, gcc-go-build-static-libgo.patch
  to make them apply again.
- introduce go_arches for architectures that use the go compiler
  instead of gcc-go
- add docker-netns-aarch64.patch: Add support for AArch64
- enable build for aarch64

OBS-URL: https://build.opensuse.org/request/show/313847
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=14
This commit is contained in:
Flavio Castelli 2015-06-26 14:30:44 +00:00 committed by Git OBS Bridge
parent fc329e1c4c
commit 4931d03fff
5 changed files with 43 additions and 36 deletions

View File

@ -0,0 +1,10 @@
--- /dev/null
+++ vendor/src/github.com/vishvananda/netns/netns_linux_arm64.go
@@ -0,0 +1,7 @@
+// +build linux,arm64
+
+package netns
+
+const (
+ SYS_SETNS = 268
+)

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Jun 25 16:49:59 UTC 2015 - dmueller@suse.com
- rediff ignore-dockerinit-checksum.patch, gcc-go-build-static-libgo.patch
to make them apply again.
- introduce go_arches for architectures that use the go compiler
instead of gcc-go
- add docker-netns-aarch64.patch: Add support for AArch64
- enable build for aarch64
-------------------------------------------------------------------
Wed Jun 24 09:02:03 UTC 2015 - fcastelli@suse.com

View File

@ -17,6 +17,7 @@
%define git_version 0baf609
%define go_arches %ix86 x86_64
Name: docker
Version: 1.7.0
Release: 0
@ -48,14 +49,15 @@ Patch1: libcontainer-apparmor-fixes.patch
# to simply disable this check
Patch100: ignore-dockerinit-checksum.patch
Patch101: gcc-go-build-static-libgo.patch
Patch102: docker-netns-aarch64.patch
BuildRequires: bash-completion
BuildRequires: device-mapper-devel >= 1.2.68
BuildRequires: glibc-devel-static
%ifarch ppc ppc64 s390x ppc64p7 ppc64le
BuildRequires: gcc5-go >= 5.0
%else
%ifarch %go_arches
BuildRequires: go >= 1.4
BuildRequires: go-go-md2man
%else
BuildRequires: gcc5-go >= 5.0
%endif
BuildRequires: libapparmor-devel
BuildRequires: libbtrfs-devel >= 3.8
@ -114,10 +116,10 @@ Summary: Test package for docker
Group: System/Management
Requires: device-mapper-devel >= 1.2.68
Requires: glibc-devel-static
%ifarch ppc ppc64 s390x ppc64p7 ppc64le
Requires: gcc5-go >= 5.0
%ifarch %go_arches
Requires: go >= 1.4
%else
Requires: go >= 1.3
Requires: gcc5-go >= 5.0
%endif
Requires: apparmor-parser
Requires: bash-completion
@ -134,15 +136,16 @@ Test package for docker. It contains the source code and the tests.
%setup -q -n docker
%patch0 -p1
%patch1 -p1
%ifarch ppc ppc64 s390x ppc64p7 ppc64le
%patch100 -p1
%patch101 -p1
%ifnarch %go_arches
%patch100
%patch101
%endif
%patch102
cp %{SOURCE7} .
find . -name ".gitignore" | xargs rm
%build
%ifarch ppc ppc64 s390x ppc64p7 ppc64le
%ifnarch %go_arches
mkdir /tmp/dirty-hack
ln -s /usr/bin/go-5 /tmp/dirty-hack/go
export PATH=/tmp/dirty-hack:$PATH
@ -155,8 +158,8 @@ export DOCKER_GITCOMMIT=%{git_version}
EOF
) > docker_build_env
. ./docker_build_env
%ifnarch ppc ppc64 s390x ppc64p7 ppc64le
./hack/make.sh dynbinary
%ifarch %go_arches
man/md2man-all.sh
%endif
# remove other than systemd
@ -200,7 +203,7 @@ install -D -m 644 %SOURCE100 %{buildroot}/var/adm/fillup-templates/sysconfig.doc
install -D -m 644 %SOURCE4 %{buildroot}/var/adm/fillup-templates/sysconfig.docker
%endif
%ifnarch ppc ppc64 s390x ppc64p7 ppc64le
%ifarch %go_arches
# install manpages
install -d %{buildroot}%{_mandir}/man1
install -p -m 644 man/man1/*.1 %{buildroot}%{_mandir}/man1
@ -234,7 +237,7 @@ groupadd -r docker 2>/dev/null || :
%{_unitdir}/%{name}.socket
%{_prefix}/lib/udev/rules.d/80-%{name}.rules
/var/adm/fillup-templates/sysconfig.docker
%ifnarch ppc ppc64 s390x ppc64p7 ppc64le
%ifarch %go_arches
%{_mandir}/man1/docker-*.1.gz
%{_mandir}/man1/docker.1.gz
%{_mandir}/man5/Dockerfile.5.gz

View File

@ -1,22 +1,8 @@
Index: docker/project/make/.dockerinit
===================================================================
--- docker.orig/project/make/.dockerinit
+++ docker/project/make/.dockerinit
@@ -3,6 +3,7 @@ set -e
# dockerinit still needs to be a static binary, even if docker is dynamic
go build \
+ -gccgoflags="-static-libgo" \
-o "$DEST/dockerinit-$VERSION" \
"${BUILDFLAGS[@]}" \
-ldflags "
Index: docker/project/make/binary
===================================================================
--- docker.orig/project/make/binary
+++ docker/project/make/binary
@@ -12,6 +12,7 @@ if [[ "$(uname -s)" == CYGWIN* ]]; then
fi
--- hack/make/binary
+++ hack/make/binary
@@ -9,6 +9,7 @@
echo "Building: $DEST/$BINARY_FULLNAME"
go build \
+ -gccgoflags="-static-libgo" \
-o "$DEST/$BINARY_FULLNAME" \

View File

@ -1,8 +1,6 @@
Index: docker/utils/utils.go
===================================================================
--- docker.orig/utils/utils.go
+++ docker/utils/utils.go
@@ -110,7 +110,7 @@
--- utils/utils.go
+++ utils/utils.go
@@ -76,7 +76,7 @@
}
return os.SameFile(targetFileInfo, selfPathFileInfo)
}