Accepting request 330936 from Virtualization:containers
- Update docker to 1.8.2 version see detailed changelog in https://github.com/docker/docker/releases/tag/v1.8.2 - 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. 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. fix_15279.patch: contains the patch for issue#15279 OBS-URL: https://build.opensuse.org/request/show/330936 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/docker?expand=0&rev=23
This commit is contained in:
commit
7d707de49a
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b937a66a1c797f0dbea016e23bbec80b9202689528de4f7e8ee82db93655e372
|
|
||||||
size 6772379
|
|
3
docker-1.8.2.tar.gz
Normal file
3
docker-1.8.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:457569ca8edd70293132789bfe51636f86cd8a46a60c6d02d5ee8600cf79f74b
|
||||||
|
size 7563667
|
@ -1,3 +1,27 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 10 22:33:01 UTC 2015 - jmassaguerpla@suse.com
|
||||||
|
|
||||||
|
- Update docker to 1.8.2 version
|
||||||
|
|
||||||
|
see detailed changelog in
|
||||||
|
|
||||||
|
https://github.com/docker/docker/releases/tag/v1.8.2
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
fix_15279.patch: contains the patch for issue#15279
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 21 08:46:30 UTC 2015 - normand@linux.vnet.ibm.com
|
Fri Aug 21 08:46:30 UTC 2015 - normand@linux.vnet.ibm.com
|
||||||
|
|
||||||
|
@ -16,16 +16,16 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define git_version 786b29d
|
%define git_version 0a8c2e3
|
||||||
%define go_arches %ix86 x86_64
|
%define go_arches %ix86 x86_64
|
||||||
Name: docker
|
Name: docker
|
||||||
Version: 1.8.1
|
Version: 1.8.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: The Linux container runtime
|
Summary: The Linux container runtime
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: System/Management
|
Group: System/Management
|
||||||
Url: http://www.docker.io
|
Url: http://www.docker.io
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.gz
|
||||||
Source1: docker.service
|
Source1: docker.service
|
||||||
Source3: 80-docker.rules
|
Source3: 80-docker.rules
|
||||||
Source4: sysconfig.docker
|
Source4: sysconfig.docker
|
||||||
@ -43,6 +43,7 @@ Source100: sysconfig.docker.ppc64le
|
|||||||
Patch0: fix-docker-init.patch
|
Patch0: fix-docker-init.patch
|
||||||
# PATCH-FIX-OPENSUSE libcontainer-apparmor-fixes.patch -- mount rules aren't supported in our apparmor
|
# PATCH-FIX-OPENSUSE libcontainer-apparmor-fixes.patch -- mount rules aren't supported in our apparmor
|
||||||
Patch1: libcontainer-apparmor-fixes.patch
|
Patch1: libcontainer-apparmor-fixes.patch
|
||||||
|
Patch2: fix_15279.patch
|
||||||
# Required to overcome some limitations of gcc-go: https://groups.google.com/forum/#!msg/golang-nuts/SlGCPYkjxo4/4DjcjXRCqAkJ
|
# 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
|
# 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
|
# We cannot do that, right now a quick and really dirty way to get it running is
|
||||||
@ -141,6 +142,7 @@ Test package for docker. It contains the source code and the tests.
|
|||||||
%setup -q -n docker-%{version}
|
%setup -q -n docker-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
%ifnarch %go_arches
|
%ifnarch %go_arches
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101 -p0
|
%patch101 -p0
|
||||||
|
64
fix_15279.patch
Normal file
64
fix_15279.patch
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
diff -Naur a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go
|
||||||
|
--- a/daemon/graphdriver/devmapper/deviceset.go 2015-09-10 20:43:43.000000000 +0200
|
||||||
|
+++ b/daemon/graphdriver/devmapper/deviceset.go 2015-09-11 00:27:54.818876198 +0200
|
||||||
|
@@ -1482,12 +1482,16 @@
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
- if d, err := devicemapper.GetDeps(devname); err == nil {
|
||||||
|
- // Access to more Debug output
|
||||||
|
- logrus.Debugf("[devmapper] devicemapper.GetDeps() %s: %#v", devname, d)
|
||||||
|
+
|
||||||
|
+ if devinfo.Exists == 0 {
|
||||||
|
+ return nil
|
||||||
|
+ }
|
||||||
|
+ if err := devicemapper.RemoveDevice(devname); err != nil {
|
||||||
|
+ return err
|
||||||
|
}
|
||||||
|
- if devinfo.Exists != 0 {
|
||||||
|
- return devicemapper.RemoveDevice(devname)
|
||||||
|
+
|
||||||
|
+ if d, err := devicemapper.GetDeps(devname); err == nil {
|
||||||
|
+ logrus.Warnf("[devmapper] device %s still has %d active dependents", devname, d.Count)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
diff -Naur a/pkg/devicemapper/devmapper_wrapper.go b/pkg/devicemapper/devmapper_wrapper.go
|
||||||
|
--- a/pkg/devicemapper/devmapper_wrapper.go 2015-09-10 20:43:43.000000000 +0200
|
||||||
|
+++ b/pkg/devicemapper/devmapper_wrapper.go 2015-09-11 00:27:54.819876198 +0200
|
||||||
|
@@ -38,7 +38,10 @@
|
||||||
|
*/
|
||||||
|
import "C"
|
||||||
|
|
||||||
|
-import "unsafe"
|
||||||
|
+import (
|
||||||
|
+ "reflect"
|
||||||
|
+ "unsafe"
|
||||||
|
+)
|
||||||
|
|
||||||
|
type (
|
||||||
|
CDmTask C.struct_dm_task
|
||||||
|
@@ -184,12 +187,21 @@
|
||||||
|
if Cdeps == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // golang issue: https://github.com/golang/go/issues/11925
|
||||||
|
+ hdr := reflect.SliceHeader{
|
||||||
|
+ Data: uintptr(unsafe.Pointer(uintptr(unsafe.Pointer(Cdeps)) + unsafe.Sizeof(*Cdeps))),
|
||||||
|
+ Len: int(Cdeps.count),
|
||||||
|
+ Cap: int(Cdeps.count),
|
||||||
|
+ }
|
||||||
|
+ devices := *(*[]C.uint64_t)(unsafe.Pointer(&hdr))
|
||||||
|
+
|
||||||
|
deps := &Deps{
|
||||||
|
Count: uint32(Cdeps.count),
|
||||||
|
Filler: uint32(Cdeps.filler),
|
||||||
|
}
|
||||||
|
- for _, device := range Cdeps.device {
|
||||||
|
- deps.Device = append(deps.Device, (uint64)(device))
|
||||||
|
+ for _, device := range devices {
|
||||||
|
+ deps.Device = append(deps.Device, uint64(device))
|
||||||
|
}
|
||||||
|
return deps
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user