SHA256
1
0
forked from pool/docker
Jordi Massaguer 2017-04-20 10:25:37 +00:00 committed by Git OBS Bridge
parent 5fbd718e69
commit fed8ecda73
5 changed files with 21 additions and 145 deletions

View File

@ -1,27 +0,0 @@
From: Michel Normand <normand@linux.vnet.ibm.com>
Subject: boltdb bolt add brokenUnaligned for ppc64
Date: Tue, 20 Dec 2016 10:19:01 +0100
boltdb bolt add brokenUnaligned for ppc64
as already done for bolt_ppc64le.go
Correction already submitted upstream as
https://github.com/boltdb/bolt/pull/635
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
---
vendor/src/github.com/boltdb/bolt/bolt_ppc64.go | 3 +++
1 file changed, 3 insertions(+)
Index: docker-1.12.3/vendor/src/github.com/boltdb/bolt/bolt_ppc64.go
===================================================================
--- docker-1.12.3.orig/vendor/src/github.com/boltdb/bolt/bolt_ppc64.go
+++ docker-1.12.3/vendor/src/github.com/boltdb/bolt/bolt_ppc64.go
@@ -7,3 +7,6 @@ const maxMapSize = 0xFFFFFFFFFFFF // 256
// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0x7FFFFFFF
+
+// Are unaligned load/stores broken on this arch?
+var brokenUnaligned = false

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Wed Apr 12 09:54:18 UTC 2017 - jmassaguerpla@suse.com
- Make sure this is being built with go 1.7
-------------------------------------------------------------------
Wed Apr 12 09:14:35 UTC 2017 - jmassaguerpla@suse.com
- remove the go_arches macro because we are using go1.7 which
is available in all archs
- remove gcc specific patches
* gcc-go-patches.patch
* netlink_netns_powerpc.patch
* boltdb_bolt_add_brokenUnaligned.patch
-------------------------------------------------------------------
Wed Apr 12 07:58:08 UTC 2017 - asarai@suse.com

View File

@ -17,20 +17,6 @@
# nodebuginfo
# Check if go_arches is defined in the project configuration
# Otherwise, define it here
# In order to define it in the project configuration, see
#
# https://en.opensuse.org/openSUSE:Build%20Service%20prjconf#Macros
#
# The Macros tag is the one that defines the go_arches variable to be used
# in the spec file.
# The "define" one is to help the specfile parser of the buildservice
# to see what packages are being built. You also want to define it here
# for keeping things consistent.
%{!?go_arches: %global go_arches %ix86 x86_64 aarch64 ppc64le}
%global docker_store %{_localstatedir}/lib/docker
%global docker_migration_testfile %{docker_store}/.suse-image-migration-v1to2-complete
%global docker_migration_warnfile %{docker_store}/docker-update-message.txt
@ -60,10 +46,6 @@ Source8: docker-audit.rules
Source9: docker-update-message.txt
Source10: tests.sh
Source11: docker_service_helper.sh
# Fixes for architecture-specific issues (gcc-go).
Patch100: gcc-go-patches.patch
Patch102: netlink_netns_powerpc.patch
Patch103: boltdb_bolt_add_brokenUnaligned.patch
# SUSE-FEATURE: Adds the /run/secrets mountpoint inside all Docker containers
# which is not snapshotted when images are committed. Note that if you modify
# this patch, please also modify the patch in the suse-secrets-v<version>
@ -124,12 +106,10 @@ Recommends: lvm2 >= 2.2.89
Conflicts: lxc < 1.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: %ix86 s390 ppc
%ifarch %{go_arches}
BuildRequires: go >= 1.5
# Make sure we build with go 1.7
BuildRequires: go < 1.8
BuildRequires: go >= 1.7
BuildRequires: go-go-md2man
%else
BuildRequires: gcc6-go >= 6.1
%endif
%description
Docker complements LXC with a high-level API which operates at the process
@ -169,15 +149,12 @@ Requires: apparmor-parser
Requires: bash-completion
Requires: device-mapper-devel >= 1.2.68
Requires: glibc-devel-static
Requires: go < 1.8
Requires: go >= 1.7
Requires: libapparmor-devel
Requires: libbtrfs-devel >= 3.8
Requires: procps
Requires: sqlite3-devel
%ifarch %{go_arches}
Requires: go >= 1.4
%else
Requires: gcc6-go >= 6.1
%endif
%description test
Test package for docker. It contains the source code and the tests.
@ -190,11 +167,6 @@ Test package for docker. It contains the source code and the tests.
%patch200 -p1
%patch201 -p1
%endif
%ifnarch %{go_arches}
%patch100 -p1
%patch102 -p1
%patch103 -p1
%endif
%patch300 -p1
%patch301 -p1
%patch302 -p1
@ -202,13 +174,6 @@ cp %{SOURCE7} .
cp %{SOURCE10} .
%build
%ifnarch %{go_arches}
tmphack=/tmp/dirty-hack
[ -e $tmphack ] && rm -rf $tmphack
mkdir $tmphack
ln -s %{_bindir}/go-6 $tmphack/go
export PATH=$tmphack:$PATH
%endif
BUILDTAGS="exclude_graphdriver_aufs apparmor selinux pkcs11"
%if 0%{?with_libseccomp}
@ -230,12 +195,8 @@ EOF
) > docker_build_env
. ./docker_build_env
%ifarch %{go_arches}
./hack/make.sh dynbinary
man/md2man-all.sh
%else
./hack/make.sh dyngccgo
%endif
# build the tests binary
GOPATH=$(pwd)/vendor:$(pwd)/.gopath/ go test \
@ -246,7 +207,6 @@ GOPATH=$(pwd)/vendor:$(pwd)/.gopath/ go test \
# otherwise the resulting package will have extra requires
rm -rf hack/make/.build-deb
%ifarch %go_arches
%check
. ./docker_build_env
@ -304,18 +264,12 @@ PKG_LIST=$(go list -e \
%endif
go test -cover -ldflags -w -tags "$DOCKER_BUILDTAGS" -a -test.timeout=10m $PKG_LIST
%endif
%install
install -d %{buildroot}%{go_contribdir}
install -d %{buildroot}%{_bindir}
%ifarch %{go_arches}
install -D -m755 bundles/latest/dynbinary-client/%{name} %{buildroot}/%{_bindir}/%{name}
install -D -m755 bundles/latest/dynbinary-daemon/%{name}d %{buildroot}/%{_bindir}/%{name}d
%else
install -D -m755 bundles/latest/dyngccgo/%{name} %{buildroot}/%{_bindir}/%{name}
install -D -m755 bundles/latest/dyngccgo/%{name}d %{buildroot}/%{_bindir}/%{name}d
%endif
install -d %{buildroot}/%{_prefix}/lib/docker
install -Dd -m 0755 \
%{buildroot}%{_sysconfdir}/init.d \
@ -356,7 +310,6 @@ install -D -m 0640 %{SOURCE8} %{buildroot}%{_sysconfdir}/audit/rules.d/%{name}.r
# sysconfig file
install -D -m 644 %{SOURCE4} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.docker
%ifarch %{go_arches}
# install manpages
install -d %{buildroot}%{_mandir}/man1
install -p -m 644 man/man1/*.1 %{buildroot}%{_mandir}/man1
@ -364,7 +317,6 @@ install -d %{buildroot}%{_mandir}/man5
install -p -m 644 man/man5/Dockerfile.5 %{buildroot}%{_mandir}/man5
install -d %{buildroot}%{_mandir}/man8
install -p -m 644 man/man8/*.8 %{buildroot}%{_mandir}/man8
%endif
install -D -m 0644 %{SOURCE9} %{buildroot}%{docker_migration_warnfile}
@ -434,12 +386,10 @@ fi
%{_udevrulesdir}/80-%{name}.rules
%{_localstatedir}/adm/fillup-templates/sysconfig.docker
%{_localstatedir}/lib/docker/
%ifarch %{go_arches}
%{_mandir}/man1/docker-*.1%{ext_man}
%{_mandir}/man1/docker.1%{ext_man}
%{_mandir}/man5/Dockerfile.5%{ext_man}
%{_mandir}/man8/dockerd.8%{ext_man}
%endif
%files bash-completion
%defattr(-,root,root)

View File

@ -1,47 +0,0 @@
diff --git a/hack/make/gccgo b/hack/make/gccgo
index 54c983e..1c11bbf 100644
--- a/hack/make/gccgo
+++ b/hack/make/gccgo
@@ -1,5 +1,5 @@
#!/bin/bash
-set -e
+set -ex
BINARY_NAME="dockerd-$VERSION"
BINARY_EXTENSION="$(binary_extension)"
@@ -22,9 +22,11 @@ go build -compiler=gccgo \
"${BUILDFLAGS[@]}" \
-gccgoflags "
-g
+ -Wl,--add-needed -Wl,--no-as-needed
$EXTLDFLAGS_STATIC
+ -static-libgo
-Wl,--no-export-dynamic
- -ldl
+ -ldl -lselinux -lsystemd
-pthread
" \
./cmd/dockerd
@@ -37,7 +39,9 @@ go build -compiler=gccgo \
"${BUILDFLAGS[@]}" \
-gccgoflags "
-g
+ -Wl,--add-needed -Wl,--no-as-needed
$EXTLDFLAGS_STATIC
+ -static-libgo
-Wl,--no-export-dynamic
-ldl
-pthread
@@ -55,9 +59,11 @@ go build -compiler=gccgo \
"${BUILDFLAGS[@]}" \
-gccgoflags "
-g
+ -Wl,--add-needed -Wl,--no-as-needed
$EXTLDFLAGS_STATIC
+ -static-libgo
-Wl,--no-export-dynamic
- -ldl
+ -ldl -lselinux -lsystemd
-pthread
" \
./cmd/docker

View File

@ -1,16 +0,0 @@
---
vendor/src/github.com/vishvananda/netns/netns_linux_ppc64.go | 7 +++++++
1 file changed, 7 insertions(+)
Index: docker-1.10.2/vendor/src/github.com/vishvananda/netns/netns_linux_ppc64.go
===================================================================
--- /dev/null
+++ docker-1.10.2/vendor/src/github.com/vishvananda/netns/netns_linux_ppc64.go
@@ -0,0 +1,7 @@
+// +build linux,ppc64
+
+package netns
+
+const (
+ SYS_SETNS = 350
+)