1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

Merge pull request #6693 from benley/docker-registry

docker-registry: Update to 0.9.1, with boto bugfix
This commit is contained in:
Jaka Hudoklin 2015-03-15 02:27:52 +01:00
commit 180da0d463
5 changed files with 25 additions and 28 deletions

View file

@ -1,19 +0,0 @@
Fix Boto 1.9 on Python 2.7.
https://github.com/boto/boto/commit/6760075073c34d6dddb7e13b80dfa8d09f0f4f79
diff --git a/boto/connection.py b/boto/connection.py
index c5779e2..71942f1 100644
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -252,8 +252,9 @@ class AWSAuthConnection(object):
# versions, it would append ":443" to the hostname sent
# in the Host header and so we needed to make sure we
# did the same when calculating the V2 signature. In 2.6
+ # (and higher!)
# it no longer does that. Hence, this kludge.
- if sys.version[:3] == "2.6" and port == 443:
+ if sys.version[:3] in ('2.6', '2.7') and port == 443:
signature_host = self.host
else:
signature_host = '%s:%d' % (self.host, port)

View file

@ -0,0 +1,16 @@
Cherry-picked from https://github.com/boto/boto/pull/2932
This fix is required for things like docker-registry to interact with S3. Will
be obsolete after the next boto release (> 2.36.0)
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -381,7 +381,7 @@ class HTTPRequest(object):
if 'Content-Length' not in self.headers:
if 'Transfer-Encoding' not in self.headers or \
self.headers['Transfer-Encoding'] != 'chunked':
- self.headers['Content-Length'] = len(self.body)
+ self.headers['Content-Length'] = str(len(self.body))
class HTTPResponse(http_client.HTTPResponse):

View file

@ -1,19 +1,17 @@
{ stdenv, fetchgit, which, pythonPackages }:
pythonPackages.buildPythonPackage rec {
name = "euca2ools-2.1.3";
name = "euca2ools-2.1.4";
namePrefix = "";
src = fetchgit {
url = https://github.com/eucalyptus/euca2ools.git;
rev = "8ae2ecc";
sha256 = "caef5a3e2c9b515fd815034b5b7304acc878a0b9777ae4208dc033b0bf39da2b";
rev = "19cb7eac34dd7efe3a56e4841b9692c03458bf3b";
sha256 = "0f52jqw3s79w391lbzlh83lp55j73clvwmn2np4fy6kxc4j49da1";
};
pythonPath = [ pythonPackages.boto pythonPackages.m2crypto ];
doCheck = false;
meta = {
homepage = http://open.eucalyptus.com/downloads;
description = "Tools for interacting with Amazon EC2/S3-compatible cloud computing services";

View file

@ -1228,7 +1228,7 @@ let
ettercap = callPackage ../applications/networking/sniffers/ettercap { };
euca2ools = callPackage ../tools/virtualization/euca2ools { pythonPackages = python26Packages; };
euca2ools = callPackage ../tools/virtualization/euca2ools { };
evtest = callPackage ../applications/misc/evtest { };

View file

@ -1135,6 +1135,8 @@ let
buildInputs = [ self.nose self.mock ];
propagatedBuildInputs = [ self.requests self.httpretty ];
patches = [ ../development/python-modules/boto/content-length-str.patch ];
meta = {
homepage = https://github.com/boto/boto;
@ -2430,12 +2432,12 @@ let
};
docker_registry = buildPythonPackage rec {
name = "docker-registry-0.9.0";
name = "docker-registry-0.9.1";
disabled = isPy3k;
src = pkgs.fetchurl {
url = "https://pypi.python.org/packages/source/d/docker-registry/${name}.tar.gz";
md5 = "65eb9fd05b94f7f9fbbb5e2e8ca62912";
sha256 = "1svm1h59sg4bwj5cy10m016gj0xpiin15nrz5z66h47sbkndvlw3";
};
DEPS = "loose";
@ -2443,7 +2445,7 @@ let
doCheck = false; # requires redis server
propagatedBuildInputs = with self; [
setuptools docker_registry_core blinker flask gevent gunicorn pyyaml
requests2 rsa sqlalchemy setuptools backports_lzma pyasn1
requests2 rsa sqlalchemy9 setuptools backports_lzma pyasn1 m2crypto
];
patchPhase = "> requirements/main.txt";