Bug#789736: 2 patches, one for this upstream changes, one for lxc bug

2015-06-29 Thread Pierre-Andre Morey
Hi,

Here is a patch that can make this package build on sid. It is inspired by
https://github.com/docker/docker/commit/d820e00aac2376d4e01721557b9af5e482ec89cd.patch,
but I removed all vendor related patches, and only kept the URL changes.
This one is very small then.

I also included a backport of an upstream patch to allow docker to work
with newer lxc releases.

Regards,
Pierre-André MOREY
From 6089e679a2fb2494fd3e599a9eab9327e6a509fc Mon Sep 17 00:00:00 2001
From: Alex Samorukov s...@os2.kiev.ua
Date: Sat, 2 May 2015 01:42:53 +0200
Subject: [PATCH] Make LXC exec driver compatible with recent LXC where
 lxc.autodev is enabled by default Update LXC to 1.1.2

Signed-off-by: Alex Samorukov s...@os2.kiev.ua

Origin: upstream, https://github.com/docker/docker/commit/6089e679a2fb2494fd3e599a9eab9327e6a509fc
Bug: https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1466550
Last-Update: 2015-06-24

Merged with typo commit: https://github.com/icecrime/docker/commit/cb979edec0c8a8ba5a874abcbf74eae3a48fe52c

---
 Dockerfile| 2 +-
 daemon/execdriver/lxc/lxc_template.go | 9 ++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index bbefb47..4bb35b8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -69,7 +69,7 @@ RUN cd /usr/local/lvm2 \
 # see https://git.fedorahosted.org/cgit/lvm2.git/tree/INSTALL
 
 # Install lxc
-ENV LXC_VERSION 1.0.7
+ENV LXC_VERSION 1.1.2
 RUN mkdir -p /usr/src/lxc \
 	 curl -sSL https://linuxcontainers.org/downloads/lxc/lxc-${LXC_VERSION}.tar.gz | tar -v -C /usr/src/lxc/ -xz --strip-components=1
 RUN cd /usr/src/lxc \
diff --git a/daemon/execdriver/lxc/lxc_template.go b/daemon/execdriver/lxc/lxc_template.go
index 6bb50e6..816d237 100644
--- a/daemon/execdriver/lxc/lxc_template.go
+++ b/daemon/execdriver/lxc/lxc_template.go
@@ -46,6 +46,9 @@ lxc.cgroup.devices.allow = {{$allowedDevice.CgroupString}}
 # Use mnt.putold as per https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/986385
 lxc.pivotdir = lxc_putold
 
+# lxc.autodev is not compatible with lxc --device switch
+lxc.autodev = 0
+
 # NOTICE: These mounts must be applied within the namespace
 {{if .ProcessConfig.Privileged}}
 # WARNING: mounting procfs and/or sysfs read-write is a known attack vector.
@@ -67,11 +70,11 @@ lxc.aa_profile = {{.AppArmorProfile}}
 {{end}}
 
 {{if .ProcessConfig.Tty}}
-lxc.mount.entry = {{.ProcessConfig.Console}} {{escapeFstabSpaces $ROOTFS}}/dev/console none bind,rw 0 0
+lxc.mount.entry = {{.ProcessConfig.Console}} {{escapeFstabSpaces $ROOTFS}}/dev/console none bind,rw,create=file 0 0
 {{end}}
 
-lxc.mount.entry = devpts {{escapeFstabSpaces $ROOTFS}}/dev/pts devpts {{formatMountLabel newinstance,ptmxmode=0666,nosuid,noexec }} 0 0
-lxc.mount.entry = shm {{escapeFstabSpaces $ROOTFS}}/dev/shm tmpfs {{formatMountLabel size=65536k,nosuid,nodev,noexec }} 0 0
+lxc.mount.entry = devpts {{escapeFstabSpaces $ROOTFS}}/dev/pts devpts {{formatMountLabel newinstance,ptmxmode=0666,nosuid,noexec,create=dir }} 0 0
+lxc.mount.entry = shm {{escapeFstabSpaces $ROOTFS}}/dev/shm tmpfs {{formatMountLabel size=65536k,nosuid,nodev,noexec,create=dir }} 0 0
 
 {{range $value := .Mounts}}
 {{$createVal := isDirectory $value.Source}}
From d820e00aac2376d4e01721557b9af5e482ec89cd Mon Sep 17 00:00:00 2001
From: Tibor Vass ti...@docker.com
Date: Tue, 16 Jun 2015 10:08:18 -0400
Subject: [PATCH] Update vendored go.net to use golang.org/x/net canonical path

Signed-off-by: Tibor Vass ti...@docker.com

Last-Update: 2015-06-24
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789736
Origin: backport, https://github.com/docker/docker/commit/d820e00aac2376d4e01721557b9af5e482ec89cd

Fix FTBS on wily due to upstream go url change
Just cherry-picked the urls changes, no vendor.

diff --git a/api/server/server.go b/api/server/server.go
index cfbb7f2..6d292ed 100644
--- a/api/server/server.go
+++ b/api/server/server.go
@@ -20,7 +20,7 @@ import (
 	crypto/tls
 	crypto/x509
 
-	code.google.com/p/go.net/websocket
+	golang.org/x/net/websocket
 	github.com/docker/libcontainer/user
 	github.com/gorilla/mux
 
diff --git a/hack/vendor.sh b/hack/vendor.sh
index c0b1112..6b4dca9 100755
--- a/hack/vendor.sh
+++ b/hack/vendor.sh
@@ -47,7 +47,7 @@ clone git github.com/gorilla/mux 136d54f81f
 
 clone git github.com/tchap/go-patricia v1.0.1
 
-clone hg code.google.com/p/go.net 84a4013f96e0
+clone git golang.org/x/net 3cffabab72adf04f8e3b01c5baf775361837b5fe https://github.com/golang/net.git
 
 clone hg code.google.com/p/gosqlite 74691fb6f837
 
diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go
index b16a7bb..3ce207c 100644
--- a/integration-cli/docker_api_attach_test.go
+++ b/integration-cli/docker_api_attach_test.go
@@ -6,7 +6,7 @@ import (
 	testing
 	time
 
-	code.google.com/p/go.net/websocket
+	golang.org/x/net/websocket
 )
 
 func TestGetContainersAttachWebsocket(t *testing.T) {


Bug#755064: cl-sql: change to link system to support standard LDFLAGS, switch from LD to gcc

2014-07-17 Thread Pierre-Andre MOREY
Package: cl-sql
Version: 6.5.0-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch utopic

There was a problem when building the package:

ld -L/usr/local/lib64/mysql -L/usr/local/lib/mysql -L/usr/lib64/mysql
-L/usr/lib/mysql -L/sw/lib -L/opt/local/lib/mysql
-L/opt/local/lib/mysql5/mysql -L/usr/local/mysql/lib
-L/usr/lib/gcc/i686-pc-cygwin/3.4.4 -lmysqlclient -lz -lc
-Bsymbolic-functions -Wl,-z,relro -shared -soname=clsql_mysql
clsql_mysql.o -o clsql_mysql64.so
ld: unrecognized option '-Wl,-z,relro'

cl-sql fails to compile when building with some LDFLAGS options which
are sent with -Wl options; those are standard when linking with gcc, so
switching from LD to gcc.


+Index: cl-sql-6.5.0/db-mysql/Makefile
+===
+--- cl-sql-6.5.0.orig/db-mysql/Makefile
 cl-sql-6.5.0/db-mysql/Makefile
+@@ -64,14 +64,14 @@ else
+ else
+   ifneq ($(OS_LINUX64),0)
+   gcc $(CFLAGS) -fPIC -c $(source) -o $(object)
+-  ld $(LDFLAGS) -shared -soname=$(base) $(object) -o  $(shared64_lib)
++  gcc $(LDFLAGS) -fPIC -shared -Wl,-soname=$(base) $(object) -o
$(shared64_lib)
+   rm $(object)
+   @echo Ensure that you have multiarch i386 build tools and
libraries if you want to build 32-bit library
+   -gcc $(CFLAGS32) -fPIC -c $(source) -o $(object)
+   -ld -shared -soname=$(base) $(object) $(LDFLAGS32) -o $(shared_lib)
+   else
+   gcc $(CFLAGS) -fPIC -c $(source) -o $(object)
+-  ld -shared -soname=$(base) $(object) $(LDFLAGS) -o $(shared_lib)
++  gcc -shared -fPIC -Wl,-soname=$(base) $(object) $(LDFLAGS) -o
$(shared_lib)
+   endif
+ endif
+   endif
+Index: cl-sql-6.5.0/uffi/Makefile
+===
+--- cl-sql-6.5.0.orig/uffi/Makefile
 cl-sql-6.5.0/uffi/Makefile
+@@ -55,14 +55,14 @@ else
+ else
+   ifneq ($(OS_LINUX64),0)
+   gcc $(CFLAGS) -fPIC -DPIC -c $(source) -o $(object)
+-  ld $(LDFLAGS) -shared -soname=$(base) -lc $(object) -o
$(shared64_lib)
++  gcc $(LDFLAGS) -fPIC -shared -Wl,-soname=$(base) -lc $(object) -o
$(shared64_lib)
+   rm -f $(object)
+   @echo Ensure that you have multiarch i386 build tools if you
want to build 32-bit library
+   -gcc -m32 $(CFLAGS) -fPIC -DPIC -c $(source) -o $(object)
+   -ld -melf_i386 $(LDFLAGS) -shared -soname=$(base) -lc $(object)
-o $(shared_lib)
+   else
+   gcc -fPIC -DPIC -c $(source) -o $(object)
+-  ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
++  gcc -fPIC -shared -Wl,-soname=$(base) -lc $(object) -o $(shared_lib)
+ endif
+   endif
+ endif



Regards,

Pierre-André MOREY


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org