[arch-commits] Commit in docker/repos (8 files)

Sébastien Luttringer seblu at archlinux.org
Tue Sep 22 20:02:00 UTC 2015


    Date: Tuesday, September 22, 2015 @ 22:01:59
  Author: seblu
Revision: 141481

db-move: moved docker from [community-testing] to [community] (x86_64)

Added:
  docker/repos/community-x86_64/01-golang15.patch
    (from rev 141480, docker/repos/community-testing-x86_64/01-golang15.patch)
  docker/repos/community-x86_64/PKGBUILD
    (from rev 141480, docker/repos/community-testing-x86_64/PKGBUILD)
  docker/repos/community-x86_64/docker.install
    (from rev 141480, docker/repos/community-testing-x86_64/docker.install)
  docker/repos/community-x86_64/docker.sysusers
    (from rev 141480, docker/repos/community-testing-x86_64/docker.sysusers)
Deleted:
  docker/repos/community-testing-x86_64/
  docker/repos/community-x86_64/PKGBUILD
  docker/repos/community-x86_64/docker.install
  docker/repos/community-x86_64/docker.sysusers

------------------------------------+
 /PKGBUILD                          |   63 +++++++++++++++++++++++++
 /docker.install                    |   13 +++++
 /docker.sysusers                   |    1 
 community-x86_64/01-golang15.patch |   87 +++++++++++++++++++++++++++++++++++
 community-x86_64/PKGBUILD          |   57 ----------------------
 community-x86_64/docker.install    |   13 -----
 community-x86_64/docker.sysusers   |    1 
 7 files changed, 164 insertions(+), 71 deletions(-)

Copied: docker/repos/community-x86_64/01-golang15.patch (from rev 141480, docker/repos/community-testing-x86_64/01-golang15.patch)
===================================================================
--- community-x86_64/01-golang15.patch	                        (rev 0)
+++ community-x86_64/01-golang15.patch	2015-09-22 20:01:59 UTC (rev 141481)
@@ -0,0 +1,87 @@
+From 0a426878b52e9eaa243df117ece0608804c28d29 Mon Sep 17 00:00:00 2001
+From: Vincent Batts <vbatts at redhat.com>
+Date: Fri, 7 Aug 2015 10:18:20 -0400
+Subject: [PATCH] devicemapper: fix zero-sized field access
+
+Fixes: #15279
+
+Due to
+https://github.com/golang/go/commit/7904946eeb35faece61bbf6f5b3cc8be2f519c17
+the devices field is dropped.
+
+This solution works on go1.4 and go1.5
+
+Signed-off-by: Vincent Batts <vbatts at redhat.com>
+
+Vincent Batts <vbatts at redhat.com>
+---
+ daemon/graphdriver/devmapper/deviceset.go | 14 +++++++++-----
+ pkg/devicemapper/devmapper_wrapper.go     | 18 +++++++++++++++---
+ 2 files changed, 24 insertions(+), 8 deletions(-)
+
+diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go
+index 3c90fed..e3106fc 100644
+--- a/daemon/graphdriver/devmapper/deviceset.go
++++ b/daemon/graphdriver/devmapper/deviceset.go
+@@ -1485,12 +1485,16 @@ func (devices *DeviceSet) deactivatePool() error {
+ 	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 devinfo.Exists != 0 {
+-		return devicemapper.RemoveDevice(devname)
++	if err := devicemapper.RemoveDevice(devname); err != nil {
++		return err
++	}
++
++	if d, err := devicemapper.GetDeps(devname); err == nil {
++		logrus.Warnf("[devmapper] device %s still has %d active dependents", devname, d.Count)
+ 	}
+ 
+ 	return nil
+diff --git a/pkg/devicemapper/devmapper_wrapper.go b/pkg/devicemapper/devmapper_wrapper.go
+index 87c2003..44ca772 100644
+--- a/pkg/devicemapper/devmapper_wrapper.go
++++ b/pkg/devicemapper/devmapper_wrapper.go
+@@ -38,7 +38,10 @@ static void	log_with_errno_init()
+ */
+ import "C"
+ 
+-import "unsafe"
++import (
++	"reflect"
++	"unsafe"
++)
+ 
+ type (
+ 	CDmTask C.struct_dm_task
+@@ -184,12 +187,21 @@ func dmTaskGetDepsFct(task *CDmTask) *Deps {
+ 	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
+ }

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2015-09-22 17:41:32 UTC (rev 141480)
+++ community-x86_64/PKGBUILD	2015-09-22 20:01:59 UTC (rev 141481)
@@ -1,57 +0,0 @@
-# $Id$
-# Maintainer: Sébastien "Seblu" Luttringer
-
-pkgname=docker
-pkgver=1.8.1
-pkgrel=1
-epoch=1
-pkgdesc='Pack, ship and run any application as a lightweight container'
-arch=('x86_64')
-url='https://www.docker.com/'
-license=('Apache')
-depends=('bridge-utils' 'iproute2' 'device-mapper' 'sqlite' 'systemd')
-makedepends=('git' 'go' 'btrfs-progs' 'go-md2man')
-optdepends=('btrfs-progs: btrfs backend support'
-            'lxc: lxc backend support')
-# don't strip binaries! A sha1 is used to check binary consistency.
-options=('!strip')
-install=$pkgname.install
-source=("git+https://github.com/docker/docker.git#tag=v$pkgver"
-        "$pkgname.sysusers")
-md5sums=('SKIP'
-         '8cf9900ebada61f352a03465a088da34')
-
-build() {
-  cd docker
-  export AUTO_GOPATH=1
-  hack/make.sh dynbinary
-  # man pages
-  man/md2man-all.sh
-}
-
-#check() {
-#  cd docker
-#  ./hack/make.sh dyntest
-#}
-
-package() {
-  cd docker
-  install -Dm755 "bundles/$pkgver/dynbinary/docker-$pkgver" "$pkgdir/usr/bin/docker"
-  install -Dm755 "bundles/$pkgver/dynbinary/dockerinit-$pkgver" "$pkgdir/usr/lib/docker/dockerinit"
-  # completion
-  install -Dm644 'contrib/completion/bash/docker' "$pkgdir/usr/share/bash-completion/completions/docker"
-  install -Dm644 'contrib/completion/zsh/_docker' "$pkgdir/usr/share/zsh/site-functions/_docker"
-  install -Dm644 'contrib/completion/fish/docker.fish' "$pkgdir/usr/share/fish/vendor_completions.d/docker.fish"
-  # systemd
-  install -Dm644 'contrib/init/systemd/docker.service' "$pkgdir/usr/lib/systemd/system/docker.service"
-  install -Dm644 'contrib/init/systemd/docker.socket' "$pkgdir/usr/lib/systemd/system/docker.socket"
-  install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
-  # vim syntax
-  install -Dm644 'contrib/syntax/vim/syntax/dockerfile.vim' "$pkgdir/usr/share/vim/vimfiles/syntax/dockerfile.vim"
-  install -Dm644 'contrib/syntax/vim/ftdetect/dockerfile.vim' "$pkgdir/usr/share/vim/vimfiles/ftdetect/dockerfile.vim"
-  # man
-  install -dm755 "$pkgdir/usr/share/man"
-  mv man/man* "$pkgdir/usr/share/man"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: docker/repos/community-x86_64/PKGBUILD (from rev 141480, docker/repos/community-testing-x86_64/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2015-09-22 20:01:59 UTC (rev 141481)
@@ -0,0 +1,63 @@
+# $Id$
+# Maintainer: Sébastien "Seblu" Luttringer
+
+pkgname=docker
+pkgver=1.8.2
+pkgrel=1
+epoch=1
+pkgdesc='Pack, ship and run any application as a lightweight container'
+arch=('x86_64')
+url='https://www.docker.com/'
+license=('Apache')
+depends=('bridge-utils' 'iproute2' 'device-mapper' 'sqlite' 'systemd')
+makedepends=('git' 'go' 'btrfs-progs' 'go-md2man')
+optdepends=('btrfs-progs: btrfs backend support'
+            'lxc: lxc backend support')
+# don't strip binaries! A sha1 is used to check binary consistency.
+options=('!strip')
+install=$pkgname.install
+source=("git+https://github.com/docker/docker.git#tag=v$pkgver"
+        "$pkgname.sysusers"
+        '01-golang15.patch')
+md5sums=('SKIP'
+         '8cf9900ebada61f352a03465a088da34'
+         '0511f2bbc52219a960dc91ea9c2d9e44')
+
+prepare() {
+  patch -p1 -d docker < 01-golang15.patch
+}
+
+build() {
+  cd docker
+  export AUTO_GOPATH=1
+  hack/make.sh dynbinary
+  # man pages
+  man/md2man-all.sh
+}
+
+#check() {
+#  cd docker
+#  ./hack/make.sh dyntest
+#}
+
+package() {
+  cd docker
+  install -Dm755 "bundles/$pkgver/dynbinary/docker-$pkgver" "$pkgdir/usr/bin/docker"
+  install -Dm755 "bundles/$pkgver/dynbinary/dockerinit-$pkgver" "$pkgdir/usr/lib/docker/dockerinit"
+  # completion
+  install -Dm644 'contrib/completion/bash/docker' "$pkgdir/usr/share/bash-completion/completions/docker"
+  install -Dm644 'contrib/completion/zsh/_docker' "$pkgdir/usr/share/zsh/site-functions/_docker"
+  install -Dm644 'contrib/completion/fish/docker.fish' "$pkgdir/usr/share/fish/vendor_completions.d/docker.fish"
+  # systemd
+  install -Dm644 'contrib/init/systemd/docker.service' "$pkgdir/usr/lib/systemd/system/docker.service"
+  install -Dm644 'contrib/init/systemd/docker.socket' "$pkgdir/usr/lib/systemd/system/docker.socket"
+  install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+  # vim syntax
+  install -Dm644 'contrib/syntax/vim/syntax/dockerfile.vim' "$pkgdir/usr/share/vim/vimfiles/syntax/dockerfile.vim"
+  install -Dm644 'contrib/syntax/vim/ftdetect/dockerfile.vim' "$pkgdir/usr/share/vim/vimfiles/ftdetect/dockerfile.vim"
+  # man
+  install -dm755 "$pkgdir/usr/share/man"
+  mv man/man* "$pkgdir/usr/share/man"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: community-x86_64/docker.install
===================================================================
--- community-x86_64/docker.install	2015-09-22 17:41:32 UTC (rev 141480)
+++ community-x86_64/docker.install	2015-09-22 20:01:59 UTC (rev 141481)
@@ -1,13 +0,0 @@
-# Arg 1:  the new package version
-post_install() {
-  # create docker group (FS#38029)
-  systemd-sysusers docker.conf
-}
-
-# arg 1:  the new package version
-# arg 2:  the old package version
-post_upgrade() {
-  (( $(vercmp $2 '1:0.7.1-1') < 0 )) &&  post_install "$1" || true
-}
-
-# vim:set ts=2 sw=2 et:

Copied: docker/repos/community-x86_64/docker.install (from rev 141480, docker/repos/community-testing-x86_64/docker.install)
===================================================================
--- community-x86_64/docker.install	                        (rev 0)
+++ community-x86_64/docker.install	2015-09-22 20:01:59 UTC (rev 141481)
@@ -0,0 +1,13 @@
+# Arg 1:  the new package version
+post_install() {
+  # create docker group (FS#38029)
+  systemd-sysusers docker.conf
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+  (( $(vercmp $2 '1:0.7.1-1') < 0 )) &&  post_install "$1" || true
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: community-x86_64/docker.sysusers
===================================================================
--- community-x86_64/docker.sysusers	2015-09-22 17:41:32 UTC (rev 141480)
+++ community-x86_64/docker.sysusers	2015-09-22 20:01:59 UTC (rev 141481)
@@ -1 +0,0 @@
-g docker - -

Copied: docker/repos/community-x86_64/docker.sysusers (from rev 141480, docker/repos/community-testing-x86_64/docker.sysusers)
===================================================================
--- community-x86_64/docker.sysusers	                        (rev 0)
+++ community-x86_64/docker.sysusers	2015-09-22 20:01:59 UTC (rev 141481)
@@ -0,0 +1 @@
+g docker - -



More information about the arch-commits mailing list