From fc54adafaba792a17e24c7930d8a1654fc8782196e001c7f320fdc718dff843d Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 7 Apr 2016 09:37:14 +0000 Subject: [PATCH 1/3] * Add patch from upstream (https://github.com/docker/docker/pull/21723) to fix compilation on Factory and Tumbleweed (which have btrfsprogs >= 4.5). + fix-btrfs-ioctl-structure.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=89 --- docker.changes | 35 ++++++++++++++---------- docker.spec | 4 +++ fix-btrfs-ioctl-structure.patch | 48 +++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 14 deletions(-) create mode 100644 fix-btrfs-ioctl-structure.patch diff --git a/docker.changes b/docker.changes index 3eee7a4..286eac6 100644 --- a/docker.changes +++ b/docker.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 7 09:35:40 UTC 2016 - asarai@suse.de + +- Add patch from upstream (https://github.com/docker/docker/pull/21723) to fix + compilation on Factory and Tumbleweed (which have btrfsprogs >= 4.5). + + fix-btrfs-ioctl-structure.patch + ------------------------------------------------------------------- Tue Mar 22 15:27:26 UTC 2016 - fcastelli@suse.com @@ -381,11 +388,11 @@ Thu Sep 10 22:33:01 UTC 2015 - jmassaguerpla@suse.com see detailed changelog in - https://github.com/docker/docker/releases/tag/v1.8.2 + https://github.com/docker/docker/releases/tag/v1.8.2 fix bsc#946653 update do docker 1.8.2 -- devicemapper: fix zero-sized field access +- devicemapper: fix zero-sized field access Fix issue #15279: does not build with Go 1.5 tip Due to golang/go@7904946 the devices field is dropped. @@ -393,7 +400,7 @@ Thu Sep 10 22:33:01 UTC 2015 - jmassaguerpla@suse.com This solution works on go1.4 and go1.5 See more in https://github.com/docker/docker/pull/15404 - + This fix was not included in v1.8.2. See previous link on why. @@ -421,9 +428,9 @@ Thu Aug 13 09:00:25 UTC 2015 - jmassaguerpla@suse.com - Update to docker 1.8.0: see detailed changelog in - https://github.com/docker/docker/releases/tag/v1.8.0 + https://github.com/docker/docker/releases/tag/v1.8.0 -- remove docker-netns-aarch64.patch: This patch was adding +- remove docker-netns-aarch64.patch: This patch was adding vendor/src/github.com/vishvananda/netns/netns_linux_arm64.go which is now included upstream, so we don't need this patch anymore @@ -433,7 +440,7 @@ Fri Jul 24 14:24:16 UTC 2015 - jmassaguerpla@suse.com - Exclude archs where docker does not build. Otherwise it gets into and infinite loop when building. - We'll fix that later if we want to release for those archs. + We'll fix that later if we want to release for those archs. ------------------------------------------------------------------- Wed Jul 15 08:11:11 UTC 2015 - jmassaguerpla@suse.com @@ -462,18 +469,18 @@ Distribution Fix pulling private images Fix fallback between registry V2 and V1 - + ------------------------------------------------------------------- Fri Jul 10 11:22:00 UTC 2015 - jmassaguerpla@suse.com -- Exclude init scripts other than systemd from the test-package +- Exclude init scripts other than systemd from the test-package ------------------------------------------------------------------- Wed Jul 1 12:38:50 UTC 2015 - jmassaguerpla@suse.com - Exclude intel 32 bits arch. Docker does not built on that. Let's - make it explicit. + make it explicit. ------------------------------------------------------------------- Thu Jun 25 16:49:59 UTC 2015 - dmueller@suse.com @@ -525,7 +532,7 @@ Mon Jun 22 08:48:11 UTC 2015 - fcastelli@suse.com ------------------------------------------------------------------- Tue Jun 9 16:35:46 UTC 2015 - jmassaguerpla@suse.com -- Add test subpackage and fix line numbers in patches +- Add test subpackage and fix line numbers in patches ------------------------------------------------------------------- Fri Jun 5 15:29:45 UTC 2015 - fcastelli@suse.com @@ -698,7 +705,7 @@ Fri Dec 12 16:13:30 UTC 2014 - fcastelli@suse.com * Notable Features since 1.3.0: - Set key=value labels to the daemon (displayed in `docker info`), applied with new `-label` daemon flag - - Add support for `ENV` in Dockerfile of the form: + - Add support for `ENV` in Dockerfile of the form: `ENV name=value name2=value2...` - New Overlayfs Storage Driver - `docker info` now returns an `ID` and `Name` field @@ -1176,7 +1183,7 @@ Wed Feb 19 08:35:27 UTC 2014 - fcastelli@suse.com - Fix broken images API for version less than 1.7 - Use the right encoding for all API endpoints which return JSON - Move remote api client to api/ - - Queue calls to the API using generic socket wait + - Queue calls to the API using generic socket wait * Runtime: - Fix the use of custom settings for bridges and custom bridges - Refactor the devicemapper code to avoid many mount/unmount race @@ -1299,7 +1306,7 @@ Fri Jan 10 10:44:23 UTC 2014 - fcastelli@suse.com * Do not add hostname when networking is disabled * Return most recent image from the cache by date * Return all errors from docker wait - * Add Content-Type Header "application/json" to GET /version and /info responses + * Add Content-Type Header "application/json" to GET /version and /info responses * Other: - Update DCO to version 1.1 - Update Makefile to use "docker:GIT_BRANCH" as the generated image name @@ -1318,7 +1325,7 @@ Fri Jan 10 10:44:23 UTC 2014 - fcastelli@suse.com - Fix for wrong version warning on master instead of latest * Runtime: - Only get the image's rootfs when we need to calculate the image size - - Correctly handle unmapping UDP ports + - Correctly handle unmapping UDP ports - Make CopyFileWithTar use a pipe instead of a buffer to save memory on docker build - Fix login message to say pull instead of push - Fix "docker load" help by removing "SOURCE" prompt and mentioning STDIN diff --git a/docker.spec b/docker.spec index d6e8b40..49ab1df 100644 --- a/docker.spec +++ b/docker.spec @@ -49,6 +49,9 @@ Patch0: fix_platform_type_arm.patch Patch1: gcc5_socket_workaround.patch Patch2: fix-docker-init.patch Patch3: fix-apparmor.patch +# TODO: Remove this once we update to Docker 1.11.0. This has been merged in +# https://github.com/docker/docker/pull/21723 +Patch4: fix-btrfs-ioctl-structure.patch # Required to overcome some limitations of gcc-go: https://groups.google.com/forum/#!msg/golang-nuts/SlGCPYkjxo4/4DjcjXRCqAkJ # Right now docker passes the sha1sum of the dockerinit binary to the docker binary at build time # We cannot do that, right now a quick and really dirty way to get it running is @@ -166,6 +169,7 @@ Test package for docker. It contains the source code and the tests. %endif %patch2 -p1 %patch3 -p1 +%patch4 -p1 %ifnarch %go_arches %patch101 -p1 %patch102 -p1 diff --git a/fix-btrfs-ioctl-structure.patch b/fix-btrfs-ioctl-structure.patch new file mode 100644 index 0000000..37cd6ec --- /dev/null +++ b/fix-btrfs-ioctl-structure.patch @@ -0,0 +1,48 @@ +From a038cccf88998814249a7a40b71a33a680e3f02f Mon Sep 17 00:00:00 2001 +From: Julio Montes +Date: Fri, 1 Apr 2016 08:58:29 -0600 +Subject: [PATCH] Fix compilation errors with btrfs-progs-4.5 + +btrfs-progs-4.5 introduces device delete by devid +for this reason btrfs_ioctl_vol_args_v2's name was encapsulated +in a union + +this patch is for setting btrfs_ioctl_vol_args_v2's name +using a C function in order to preserve compatibility +with all btrfs-progs versions + +Signed-off-by: Julio Montes +Signed-off-by: Aleksa Sarai +--- + daemon/graphdriver/btrfs/btrfs.go | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +Index: docker-1.10.3/daemon/graphdriver/btrfs/btrfs.go +=================================================================== +--- docker-1.10.3.orig/daemon/graphdriver/btrfs/btrfs.go ++++ docker-1.10.3/daemon/graphdriver/btrfs/btrfs.go +@@ -7,6 +7,10 @@ package btrfs + #include + #include + #include ++ ++static void set_name_btrfs_ioctl_vol_args_v2(struct btrfs_ioctl_vol_args_v2* btrfs_struct, const char* value) { ++ snprintf(btrfs_struct->name, BTRFS_SUBVOL_NAME_MAX, "%s", value); ++} + */ + import "C" + +@@ -160,9 +164,10 @@ func subvolSnapshot(src, dest, name stri + + var args C.struct_btrfs_ioctl_vol_args_v2 + args.fd = C.__s64(getDirFd(srcDir)) +- for i, c := range []byte(name) { +- args.name[i] = C.char(c) +- } ++ ++ var cs = C.CString(name) ++ C.set_name_btrfs_ioctl_vol_args_v2(&args, cs) ++ C.free(unsafe.Pointer(cs)) + + _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, getDirFd(destDir), C.BTRFS_IOC_SNAP_CREATE_V2, + uintptr(unsafe.Pointer(&args))) From 4fc4784b3b45ebbff27e9668e0e9221b519fbcb03fd2a740ce979139102995ac Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 7 Apr 2016 09:43:11 +0000 Subject: [PATCH 2/3] * Add bugzilla reference bnc#974208 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=90 --- docker.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker.changes b/docker.changes index 286eac6..42e87ab 100644 --- a/docker.changes +++ b/docker.changes @@ -3,7 +3,7 @@ Thu Apr 7 09:35:40 UTC 2016 - asarai@suse.de - Add patch from upstream (https://github.com/docker/docker/pull/21723) to fix compilation on Factory and Tumbleweed (which have btrfsprogs >= 4.5). - + fix-btrfs-ioctl-structure.patch + + fix-btrfs-ioctl-structure.patch bnc#974208 ------------------------------------------------------------------- Tue Mar 22 15:27:26 UTC 2016 - fcastelli@suse.com From a57c99952a6f183742b8415ea56012ac45a2360c3eec41b106fe0439bad21f46 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Mon, 11 Apr 2016 08:00:40 +0000 Subject: [PATCH 3/3] Accepting request 387297 from devel:ARM:Factory - use go-lang for aarch64: - drop fix_platform_type_arm.patch (works around a gcc-go bug, so unnecessary) OBS-URL: https://build.opensuse.org/request/show/387297 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=91 --- docker.changes | 7 +++++++ docker.spec | 4 +--- fix_platform_type_arm.patch | 20 -------------------- 3 files changed, 8 insertions(+), 23 deletions(-) delete mode 100644 fix_platform_type_arm.patch diff --git a/docker.changes b/docker.changes index 42e87ab..8f943aa 100644 --- a/docker.changes +++ b/docker.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Apr 8 13:27:55 UTC 2016 - dmueller@suse.com + +- use go-lang for aarch64: + - drop fix_platform_type_arm.patch (works around a gcc-go bug, so + unnecessary) + ------------------------------------------------------------------- Thu Apr 7 09:35:40 UTC 2016 - asarai@suse.de diff --git a/docker.spec b/docker.spec index 49ab1df..ea4636c 100644 --- a/docker.spec +++ b/docker.spec @@ -21,7 +21,7 @@ %define docker_migration_testfile %{docker_store}/.suse-image-migration-v1to2-complete %define git_version 9e83765 -%define go_arches %ix86 x86_64 +%define go_arches %ix86 x86_64 aarch64 Name: docker Version: 1.10.3 Release: 0 @@ -45,7 +45,6 @@ Source7: README_SUSE.md Source8: docker-audit.rules # TODO: remove once we figure out what is wrong with iptables on ppc64le Source100: sysconfig.docker.ppc64le -Patch0: fix_platform_type_arm.patch Patch1: gcc5_socket_workaround.patch Patch2: fix-docker-init.patch Patch3: fix-apparmor.patch @@ -156,7 +155,6 @@ Test package for docker. It contains the source code and the tests. %prep %setup -q -n %{name}-%{version} -%patch0 -p1 # 1330 is Tumbleweed after leap has been released # gcc5-go in Tumbleweed includes this commit # https://github.com/golang/gofrontend/commit/a850225433a66a58613c22185c3b09626f5545eb diff --git a/fix_platform_type_arm.patch b/fix_platform_type_arm.patch deleted file mode 100644 index 90598a3..0000000 --- a/fix_platform_type_arm.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/pkg/platform/utsname_int8.go b/pkg/platform/utsname_int8.go -index 5dcbadf..a022a35 100644 ---- a/pkg/platform/utsname_int8.go -+++ b/pkg/platform/utsname_int8.go -@@ -1,4 +1,4 @@ --// +build linux,386 linux,amd64 linux,arm64 -+// +build linux,386 linux,amd64 - // see golang's sources src/syscall/ztypes_linux_*.go that use int8 - - package platform -diff --git a/pkg/platform/utsname_uint8.go b/pkg/platform/utsname_uint8.go -index c9875cf..0ee937a 100644 ---- a/pkg/platform/utsname_uint8.go -+++ b/pkg/platform/utsname_uint8.go -@@ -1,4 +1,4 @@ --// +build linux,arm linux,ppc64 linux,ppc64le s390x -+// +build linux,arm linux,ppc64 linux,ppc64le s390x linux,arm64 linux,aarch64 - // see golang's sources src/syscall/ztypes_linux_*.go that use uint8 - - package platform