Package: docker.io Version: 1.6.0+dfsg1-1 Tags: patch User: [email protected] Usertags: origin-ubuntu wily ubuntu-patch
Hi,
In Ubuntu we're building successfully for arm64, ppc64el and powerpc
using gccgo since golang-go doesn't support these architectures. This
constitutes almost the entire Ubuntu delta now; the only other remaining
part is already tracked in bug 764405. I think all the relevant parts
have been accepted upstream now, too. Please consider the following
patch. Note that you probably want to tweak the build-depends change to
golang in debian/control; I'm not sure why you have such a complex build
dependency for it but presumably there's a reason (backports?). The bump
in golang-pty-dev version is for wider architecture support, and the
build target needs to be selected correctly in debian/rules. The rest
should be self-explanatory.
I note that go-md2man isn't currently built on the other architectures
in Debian, though it is in Ubuntu; but if that is fixed to use gccgo
separately also as Ubuntu have done, then Debian should be set.
diff -Nru docker.io-1.6.0+dfsg1/debian/control
docker.io-1.6.0+dfsg1/debian/control
--- docker.io-1.6.0+dfsg1/debian/control 2015-05-05 07:42:51.000000000
+0000
+++ docker.io-1.6.0+dfsg1/debian/control 2015-05-07 03:31:25.000000000
+0000
@@ -10,7 +11,8 @@
debhelper (>=9),
dh-systemd,
go-md2man,
- golang (>= 2:1.3-4~) | golang (= 2:1.3-1) | golang (<< 2:1.3~),
+ golang [!arm64 !ppc64el !powerpc],
+ gccgo [arm64 ppc64el powerpc],
golang-context-dev (>= 0.0~git20140604~),
golang-dbus-dev (>= 2~),
golang-fsnotify-dev (>= 1.0.4~),
@@ -21,7 +23,7 @@
golang-gosqlite-dev (>= 0.0~hg20130530~),
golang-logrus-dev (>= 0.7.1~),
golang-mux-dev (>= 0.0~git20140505~),
- golang-pty-dev (>= 0.0~git20141217~),
+ golang-pty-dev (>= 0.0~git20150218~),
libapparmor-dev,
libdevmapper-dev
Standards-Version: 3.9.6
diff -Nru docker.io-1.6.0+dfsg1/debian/patches/arm-syscall-fix.patch
docker.io-1.6.0+dfsg1/debian/patches/arm-syscall-fix.patch
--- docker.io-1.6.0+dfsg1/debian/patches/arm-syscall-fix.patch 1970-01-01
00:00:00.000000000 +0000
+++ docker.io-1.6.0+dfsg1/debian/patches/arm-syscall-fix.patch 2015-05-07
03:21:30.000000000 +0000
@@ -0,0 +1,25 @@
+commit 2af35822ac0f910a99720a5072de776a785e2b3e
+Author: Adam Conrad <[email protected]>
+Date: Thu Apr 9 07:31:48 2015 -0600
+
+ Fix setns syscall number for ARM, this has been wrong all along.
+
+ See:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=571503e10045c89af951962ea0bb783482663aad
+
+Forwarded: https://github.com/docker/libcontainer/pull/524
+Origin: upstream,
https://github.com/docker/libcontainer/commit/0e3181a0b0ab36c750708324599a368f69bab601
+Last-Update: 2015-05-07
+
+diff --git a/libcontainer/system/setns_linux.go b/system/setns_linux.go
+index beffd8d..eeeec4f 100644
+--- a/libcontainer/system/setns_linux.go
++++ b/libcontainer/system/setns_linux.go
+@@ -14,7 +14,7 @@ var setNsMap = map[string]uintptr{
+ "linux/386": 346,
+ "linux/arm64": 268,
+ "linux/amd64": 308,
+- "linux/arm": 374,
++ "linux/arm": 375,
+ "linux/ppc64": 350,
+ "linux/ppc64le": 350,
+ "linux/s390x": 339,
diff -Nru docker.io-1.6.0+dfsg1/debian/patches/arm64-support.patch
docker.io-1.6.0+dfsg1/debian/patches/arm64-support.patch
--- docker.io-1.6.0+dfsg1/debian/patches/arm64-support.patch 1970-01-01
00:00:00.000000000 +0000
+++ docker.io-1.6.0+dfsg1/debian/patches/arm64-support.patch 2015-05-07
03:17:15.000000000 +0000
@@ -0,0 +1,24 @@
+Description: Trivial patch to port to arm64
+Author: Adam Conrad <[email protected]>
+Origin: upstream,
https://github.com/docker/libcontainer/commit/34dba2f7e76f3fde58eaf623afb57ab18cb7caad
+Forwarded: https://github.com/docker/libcontainer/pull/524
+Last-Update: 2015-05-07
+
+--- a/libcontainer/system/setns_linux.go
++++ b/libcontainer/system/setns_linux.go
+@@ -12,6 +12,7 @@
+ // We are declaring the macro here because the SETNS syscall does not exist
in th stdlib
+ var setNsMap = map[string]uintptr{
+ "linux/386": 346,
++ "linux/arm64": 268,
+ "linux/amd64": 308,
+ "linux/arm": 374,
+ "linux/ppc64": 350,
+--- a/libcontainer/system/syscall_linux_64.go
++++ b/libcontainer/system/syscall_linux_64.go
+@@ -1,4 +1,4 @@
+-// +build linux,amd64 linux,ppc64 linux,ppc64le linux,s390x
++// +build linux,arm64 linux,amd64 linux,ppc64 linux,ppc64le linux,s390x
+
+ package system
+
diff -Nru docker.io-1.6.0+dfsg1/debian/patches/powerpc-support.patch
docker.io-1.6.0+dfsg1/debian/patches/powerpc-support.patch
--- docker.io-1.6.0+dfsg1/debian/patches/powerpc-support.patch 1970-01-01
00:00:00.000000000 +0000
+++ docker.io-1.6.0+dfsg1/debian/patches/powerpc-support.patch 2015-05-07
03:23:46.000000000 +0000
@@ -0,0 +1,28 @@
+Author: Adam Conrad <[email protected]>
+Description: Add support for 32-bit big-endian PowerPC
+Origin: upstream,
https://github.com/docker/libcontainer/commit/34dba2f7e76f3fde58eaf623afb57ab18cb7caad
+Forwarded: https://github.com/docker/libcontainer/pull/524
+Last-Update: 2015-05-07
+
+diff --git a/libcontainer/system/setns_linux.go b/system/setns_linux.go
+index eeeec4f..a3c4cbb 100644
+--- a/libcontainer/system/setns_linux.go
++++ b/libcontainer/system/setns_linux.go
+@@ -15,6 +15,7 @@ var setNsMap = map[string]uintptr{
+ "linux/arm64": 268,
+ "linux/amd64": 308,
+ "linux/arm": 375,
++ "linux/ppc": 350,
+ "linux/ppc64": 350,
+ "linux/ppc64le": 350,
+ "linux/s390x": 339,
+diff --git a/libcontainer/system/syscall_linux_64.go
b/system/syscall_linux_64.go
+index 5e28a3f..0816bf8 100644
+--- a/libcontainer/system/syscall_linux_64.go
++++ b/libcontainer/system/syscall_linux_64.go
+@@ -1,4 +1,4 @@
+-// +build linux,arm64 linux,amd64 linux,ppc64 linux,ppc64le linux,s390x
++// +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le
linux,s390x
+
+ package system
+
diff -Nru docker.io-1.6.0+dfsg1/debian/patches/series
docker.io-1.6.0+dfsg1/debian/patches/series
--- docker.io-1.6.0+dfsg1/debian/patches/series 2015-05-05 07:45:10.000000000
+0000
+++ docker.io-1.6.0+dfsg1/debian/patches/series 2015-05-07 03:22:12.000000000
+0000
@@ -16,3 +16,10 @@
# Once upstream adds EnvFile, remove this patch.
change-system-unit-env-file.patch
# See also https://github.com/docker/docker/pull/7220#issuecomment-50076589
+
+arm64-support.patch
+arm-syscall-fix.patch
+powerpc-support.patch
diff -Nru docker.io-1.6.0+dfsg1/debian/rules docker.io-1.6.0+dfsg1/debian/rules
--- docker.io-1.6.0+dfsg1/debian/rules 2015-04-06 22:27:28.000000000 +0000
+++ docker.io-1.6.0+dfsg1/debian/rules 2015-05-06 10:24:13.000000000 +0000
@@ -17,6 +17,12 @@
export DOCKER_GITCOMMIT = $(shell ./debian/helpers/gitcommit.sh
$(DOCKER_VERSION))
export DOCKER_INITPATH = /usr/lib/docker.io/dockerinit
+ifneq (,$(filter $(DEB_HOST_ARCH), arm64 powerpc ppc64el))
+ DOCKER_BUILD_TARGET = dyngccgo
+else
+ DOCKER_BUILD_TARGET = dynbinary
+endif
+
# AppArmor can be optionally used in Debian and is there by default in Ubuntu,
so we need support for it compiled into our binary
export DOCKER_BUILDTAGS = apparmor
@@ -52,7 +58,7 @@
# build "docker" and "dockerinit"
GOPATH="$$GOPATH:$(GOPATH_PACKAGED)" \
- ./hack/make.sh dynbinary
+ ./hack/make.sh $(DOCKER_BUILD_TARGET)
# compile man pages
./docs/man/md2man-all.sh -q
@@ -61,11 +67,11 @@
override_dh_auto_install:
# install docker binary
mkdir -p debian/docker.io/$(dir $(DOCKER_BINPATH))
- cp -aT bundles/$(DOCKER_VERSION)/dynbinary/docker-$(DOCKER_VERSION)
debian/docker.io/$(DOCKER_BINPATH)
+ cp -aT
bundles/$(DOCKER_VERSION)/$(DOCKER_BUILD_TARGET)/docker-$(DOCKER_VERSION)
debian/docker.io/$(DOCKER_BINPATH)
# install dockerinit binary
mkdir -p debian/docker.io/$(dir $(DOCKER_INITPATH))
- cp -aT bundles/$(DOCKER_VERSION)/dynbinary/dockerinit-$(DOCKER_VERSION)
debian/docker.io/$(DOCKER_INITPATH)
+ cp -aT
bundles/$(DOCKER_VERSION)/$(DOCKER_BUILD_TARGET)/dockerinit-$(DOCKER_VERSION)
debian/docker.io/$(DOCKER_INITPATH)
# Most of the source of docker does not make a library,
# so only ship the reusable parts (and in a separate package).
signature.asc
Description: Digital signature

