Skip to content

Commit

Permalink
Merge pull request #52 from Juniper/ijohnson_liberty_nova_docker
Browse files Browse the repository at this point in the history
Packaging docker-py-2.3.0 and liberty nova-docker
  • Loading branch information
cijohnson committed May 6, 2016
2 parents 033b650 + 5662ee1 commit bf7c6f8
Show file tree
Hide file tree
Showing 61 changed files with 1,227 additions and 2 deletions.
20 changes: 18 additions & 2 deletions upstream/debian/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,30 @@ kazoo:$(PREP)
#Build the kazoo from the BUILD dir
(cd $(GIT_ROOT)/../build/kazoo-1.3.1; sudo pdebuild --use-pdebuild-internal --debbuildopts -tc)

docker-py:$(PREP)
docker-py-1.3.0:$(PREP)
(cd $(GIT_ROOT)/../build; wget https://pypi.python.org/packages/source/d/docker-py/docker-py-1.3.0.tar.gz)
(cd $(GIT_ROOT)/../build; tar -xvzf $(GIT_ROOT)/../build/docker-py-1.3.0.tar.gz)
(cd $(GIT_ROOT)/../build; cp docker-py-1.3.0.tar.gz docker-py_1.3.0.orig.tar.gz)
cp -Rf docker-py-1.3.0/debian $(GIT_ROOT)/../build/docker-py-1.3.0
#Build the docker-py from the BUILD dir
(cd $(GIT_ROOT)/../build/docker-py-1.3.0; sudo pdebuild --use-pdebuild-internal --debbuildopts -tc)

docker-py-0.6.0:$(PREP)
(cd $(GIT_ROOT)/../build; wget https://pypi.python.org/packages/source/d/docker-py/docker-py-0.6.0.tar.gz)
(cd $(GIT_ROOT)/../build; tar -xvzf $(GIT_ROOT)/../build/docker-py-0.6.0.tar.gz)
(cd $(GIT_ROOT)/../build; cp docker-py-0.6.0.tar.gz docker-py_0.6.0.orig.tar.gz)
cp -Rf docker-py/debian $(GIT_ROOT)/../build/docker-py-0.6.0
cp -Rf docker-py-0.6.0/debian $(GIT_ROOT)/../build/docker-py-0.6.0
#Build the docker-py from the BUILD dir
(cd $(GIT_ROOT)/../build/docker-py-0.6.0; sudo pdebuild --use-pdebuild-internal --debbuildopts -tc)

nova-docker-liberty: $(PREP)
(cd $(GIT_ROOT)/../build; if [ -d nova-docker ] ; then cd nova-docker && echo "git clean -f && git pull"; else git clone -b stable/liberty git@github.com:Juniper/nova-docker.git; fi)
(cd $(GIT_ROOT)/../build/nova-docker/; python setup.py sdist)
cp $(GIT_ROOT)/../build/nova-docker/dist/nova-docker-0.0.1.dev241.tar.gz $(GIT_ROOT)/../build/nova-docker_0.0.1.dev241.orig.tar.gz
(cd $(GIT_ROOT)/../build; tar -xvzf $(GIT_ROOT)/../build/nova-docker_0.0.1.dev241.orig.tar.gz)
mkdir -p $(GIT_ROOT)/../build/nova-docker-0.0.1.dev241/debian/; cp -Rf nova-docker/debian/liberty/* $(GIT_ROOT)/../build/nova-docker-0.0.1.dev241/debian
(cd $(GIT_ROOT)/../build/nova-docker-0.0.1.dev241; sudo pdebuild --use-pdebuild-internal --debbuildopts -tc)

nova-docker-kilo: $(PREP)
(cd $(GIT_ROOT)/../build; if [ -d nova-docker ] ; then cd nova-docker && echo "git clean -f && git pull"; else git clone -b stable/kilo git@github.com:Juniper/nova-docker.git; fi)
(cd $(GIT_ROOT)/../build/nova-docker/; python setup.py sdist)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions upstream/debian/docker-py-1.3.0/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker-py (1.3.0-1contrail1) trusty; urgency=medium

* Initial build of python-docker-py from surce version 1.3.0, without websocket

-- Ignatious Johnson <ijohnson@juniper.net> Thu, 05 May 2016 12:34:44 -0700
1 change: 1 addition & 0 deletions upstream/debian/docker-py-1.3.0/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7
12 changes: 12 additions & 0 deletions upstream/debian/docker-py-1.3.0/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Source: docker-py
Maintainer: Ignatious Johnson <ijohnson@juniper.net>
Section: python
Priority: optional
Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 7)
Standards-Version: 3.9.1

Package: python-docker-py
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}
Description: Python client for Docker.

1 change: 1 addition & 0 deletions upstream/debian/docker-py-1.3.0/debian/files
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-docker-py_0.6.1-dev-1contrail_all.deb python optional
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
--- a/docker/client.py
+++ b/docker/client.py
@@ -51,9 +51,6 @@
'stream': 1
}

- if ws:
- return self._attach_websocket(container, params)
-
u = self._url("/containers/{0}/attach".format(container))
return self._get_raw_response_socket(self.post(
u, None, params=self._attach_params(params), stream=True))
--- a/docker/clientbase.py
+++ b/docker/clientbase.py
@@ -4,7 +4,6 @@
import requests
import requests.exceptions
import six
-import websocket


from . import constants
@@ -132,18 +131,6 @@
'stream': 1
}

- @check_resource
- def _attach_websocket(self, container, params=None):
- url = self._url("/containers/{0}/attach/ws".format(container))
- req = requests.Request("POST", url, params=self._attach_params(params))
- full_url = req.prepare().url
- full_url = full_url.replace("http://", "ws://", 1)
- full_url = full_url.replace("https://", "wss://", 1)
- return self._create_websocket_connection(full_url)
-
- def _create_websocket_connection(self, url):
- return websocket.create_connection(url)
-
def _get_raw_response_socket(self, response):
self._raise_for_status(response)
if six.PY3:
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,2 @@
requests==2.5.3
six>=1.3.0
-websocket-client==0.32.0
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,6 @@
requirements = [
'requests >= 2.5.2',
'six >= 1.3.0',
- 'websocket-client >= 0.32.0',
]

exec(open('docker/version.py').read())
1 change: 1 addition & 0 deletions upstream/debian/docker-py-1.3.0/debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0001-remove-websocket.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
dh_auto_configure
dh_auto_build
dh_auto_test
dh_prep
dh_auto_install
dh_installdocs
dh_installchangelogs
dh_perl
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
pycompile -p python-docker-py
fi

# End automatically added section
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# Automatically added by dh_python2:
if which pyclean >/dev/null 2>&1; then
pyclean -p python-docker-py
else
dpkg -L python-docker-py | grep \.py$ | while read file
do
rm -f "${file}"[co] >/dev/null
done
fi

# End automatically added section
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python:Versions=2.7
python:Provides=python2.7-docker-py
python:Depends=python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), python-requests, python-six
misc:Depends=
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Package: python-docker-py
Source: docker-py
Version: 1.3.0-1contrail1
Architecture: all
Maintainer: Ignatious Johnson <ijohnson@juniper.net>
Installed-Size: 124
Depends: python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), python-requests, python-six
Section: python
Priority: optional
Description: Python client for Docker.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
d1047d4edfcebac0b63994a34f0e1768 usr/lib/python2.7/dist-packages/docker/__init__.py
3e350e53e53f0ae50ee75d75cf8e281d usr/lib/python2.7/dist-packages/docker/auth/__init__.py
89bf4ba196ae3c0e437efbac00609003 usr/lib/python2.7/dist-packages/docker/auth/auth.py
60019dcac97a6aee36ba8931e6d11ea9 usr/lib/python2.7/dist-packages/docker/client.py
3b93496ff8865da0da2af1ab206d9481 usr/lib/python2.7/dist-packages/docker/errors.py
92bf1b673afc02a5b483e79408f33e32 usr/lib/python2.7/dist-packages/docker/ssladapter/__init__.py
ce207c81218a67362bd9ed6a63ea6a1c usr/lib/python2.7/dist-packages/docker/ssladapter/ssladapter.py
29265db40a252cb9f6adb86f59802dcb usr/lib/python2.7/dist-packages/docker/tls.py
b54906a694668c449aa6c556ff4f729e usr/lib/python2.7/dist-packages/docker/unixconn/__init__.py
a608321f4541a8736e8c26f693913c83 usr/lib/python2.7/dist-packages/docker/unixconn/unixconn.py
6e78d193999a66d1d5014ccb4874dfd8 usr/lib/python2.7/dist-packages/docker/utils/__init__.py
4a3ff6e14ac2b636b5aaa5c497b729f8 usr/lib/python2.7/dist-packages/docker/utils/utils.py
4ca86cf1474c44392eb5d4b22b0e2053 usr/lib/python2.7/dist-packages/docker/version.py
6ca98532afc40eaf9af5c1a0feade463 usr/lib/python2.7/dist-packages/docker_py-0.6.1_dev.egg-info/PKG-INFO
0a7ef2cae50a306682af468e45c0b3fe usr/lib/python2.7/dist-packages/docker_py-0.6.1_dev.egg-info/SOURCES.txt
68b329da9893e34099c7d8ad5cb9c940 usr/lib/python2.7/dist-packages/docker_py-0.6.1_dev.egg-info/dependency_links.txt
68b329da9893e34099c7d8ad5cb9c940 usr/lib/python2.7/dist-packages/docker_py-0.6.1_dev.egg-info/not-zip-safe
19f75e18bf72a1232d8af87ef56110c2 usr/lib/python2.7/dist-packages/docker_py-0.6.1_dev.egg-info/requires.txt
eaf8b4cc2ec7fde3fbaa233ee3af2e4b usr/lib/python2.7/dist-packages/docker_py-0.6.1_dev.egg-info/top_level.txt
879353859d627b0b7f71ffbb384488d1 usr/share/doc/python-docker-py/changelog.Debian.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

# Automatically added by dh_python2:
if which pycompile >/dev/null 2>&1; then
pycompile -p python-docker-py
fi

# End automatically added section
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
set -e

# Automatically added by dh_python2:
if which pyclean >/dev/null 2>&1; then
pyclean -p python-docker-py
else
dpkg -L python-docker-py | grep \.py$ | while read file
do
rm -f "${file}"[co] >/dev/null
done
fi

# End automatically added section
9 changes: 9 additions & 0 deletions upstream/debian/docker-py-1.3.0/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/make -f

# This file was automatically generated by stdeb 0.6.0+git at
# Tue, 09 Dec 2014 14:37:12 -0800

%:
dh $@ --with python2 --buildsystem=python_distutils


1 change: 1 addition & 0 deletions upstream/debian/docker-py-1.3.0/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
1 change: 1 addition & 0 deletions upstream/debian/docker-py-1.3.0/debian/source/options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extend-diff-ignore="\.egg-info"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- a/kazoo/protocol/connection.py
+++ b/kazoo/protocol/connection.py
@@ -579,7 +579,8 @@
client._session_id or 0, client._session_passwd,
client.read_only)

- connect_result, zxid = self._invoke(client._session_timeout, connect)
+ connect_result, zxid = self._invoke(client._session_timeout / 1000.0,
+ connect)

if connect_result.time_out <= 0:
raise SessionExpiredError("Session has expired")
@@ -611,7 +612,7 @@

for scheme, auth in client.auth_data:
ap = Auth(0, scheme, auth)
- zxid = self._invoke(connect_timeout, ap, xid=AUTH_XID)
+ zxid = self._invoke(connect_timeout / 1000.0, ap, xid=AUTH_XID)
if zxid:
client.last_zxid = zxid
return read_timeout, connect_timeout
6 changes: 6 additions & 0 deletions upstream/debian/nova-docker/debian/liberty/README.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nova-docker for Debian
----------------------

<possible notes regarding this package - if none, delete this file>

-- Ignatious Johnson <ijohnson@juniper.net> Wed, 25 Feb 2015 13:52:24 -0800
10 changes: 10 additions & 0 deletions upstream/debian/nova-docker/debian/liberty/README.source
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
nova-docker for Debian
----------------------

<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>



-- Ignatious Johnson <ijohnson@juniper.net> Wed, 25 Feb 2015 13:52:24 -0800

5 changes: 5 additions & 0 deletions upstream/debian/nova-docker/debian/liberty/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
nova-docker (0.0.1.dev241-0contrail0) trusty; urgency=low

* Initial release - Nova docker package for liberty release.

-- Ignatious Johnson <ijohnson@juniper.net> Wed, 04 May 2016 22:16:09 +0000
1 change: 1 addition & 0 deletions upstream/debian/nova-docker/debian/liberty/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
25 changes: 25 additions & 0 deletions upstream/debian/nova-docker/debian/liberty/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Source: nova-docker
Section: python
Priority: optional
Maintainer: Ignatious Johnson <ijohnson@juniper.net>
Build-Depends: debhelper (>= 7),
python-pbr (>= 0.6),
python-setuptools (>= 0.6b3)
Standards-Version: 3.9.4
Homepage: https://wiki.openstack.org/wiki/Docker

Package: nova-docker
Architecture: all
Depends: ${shlibs:Depends},
${misc:Depends},
nova-compute,
lxc-docker,
python-six,
python-babel,
python-docker-py (>= 1.3.0-1contrail1),
python-oslo.serialization,
python-oslo.utils,
python-oslo.config,
python-oslo.concurrency,
python-oslo.i18n,
Description: Docker driver for Liberty OpenStack Nova
38 changes: 38 additions & 0 deletions upstream/debian/nova-docker/debian/liberty/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: nova-docker
Source: <url://example.com>

Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>

# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2015 Ignatious Johnson <ijohnson@juniper.net>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
3 changes: 3 additions & 0 deletions upstream/debian/nova-docker/debian/liberty/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
README.rst
requirements.txt
test-requirements.txt

0 comments on commit bf7c6f8

Please sign in to comment.