diff --git a/.gitignore b/.gitignore index 5bfb816..fdb90c8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /python-swiftclient-1.8.0.tar.gz /python-swiftclient-2.0.2.tar.gz /python-swiftclient-2.1.0.tar.gz +/python-swiftclient-2.3.0.tar.gz diff --git a/0001-Remove-builtin-requirements-handling.patch b/0001-Remove-builtin-requirements-handling.patch deleted file mode 100644 index 9b66067..0000000 --- a/0001-Remove-builtin-requirements-handling.patch +++ /dev/null @@ -1,19 +0,0 @@ -From a1c8fe92c3dd431a9a6c3a6451cc943dfd2b1baf Mon Sep 17 00:00:00 2001 -From: Jakub Ruzicka -Date: Fri, 6 Dec 2013 17:36:12 +0100 -Subject: [PATCH] Remove builtin requirements handling - ---- - setup.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 70c2b3f..afab729 100644 ---- a/setup.py -+++ b/setup.py -@@ -18,5 +18,4 @@ - import setuptools - - setuptools.setup( -- setup_requires=['pbr'], - pbr=True) diff --git a/0001-Stop-creating-extraneous-directories.patch b/0001-Stop-creating-extraneous-directories.patch new file mode 100644 index 0000000..27e117d --- /dev/null +++ b/0001-Stop-creating-extraneous-directories.patch @@ -0,0 +1,88 @@ +From 8f1b394325804c23ac18e7f9da6cb56a3b95eed2 Mon Sep 17 00:00:00 2001 +From: Pete Zaitcev +Date: Wed, 17 Sep 2014 20:27:05 -0600 +Subject: [PATCH] Stop creating extraneous directories + +Cannot help streamlining the code a bit, sorry. But the meat is that +we should not try to make directories if output path is explicit. + +Previously we created directories using the URL path, which is +obviously wrong if explicit output file is supplied... unless +a crafty user supplied the same path with -o that is contained +in the URL path. If anyone was doing such tricks, it's not going +to work anymore (we are forcing a regression for the sake of +theoretical correctness here). + +Fixes bug: 1369546 + +Change-Id: Ifce31f2ba233eb55550f3810348bf16bf2447d62 +--- + swiftclient/service.py | 29 ++++++++++++----------------- + 1 file changed, 12 insertions(+), 17 deletions(-) + +diff --git a/swiftclient/service.py b/swiftclient/service.py +index 3cedb1c..fa39ecc 100644 +--- a/swiftclient/service.py ++++ b/swiftclient/service.py +@@ -1003,18 +1003,18 @@ class SwiftService(object): + fp = None + try: + no_file = options['no_download'] +- make_dir = not no_file and out_file != "-" + content_type = headers.get('content-type') + if content_type.split(';', 1)[0] == 'text/directory': ++ make_dir = not no_file and out_file != "-" + if make_dir and not isdir(path): + mkdirs(path) + +- for _ in obj_body.buffer(): +- continue + else: +- dirpath = dirname(path) +- if make_dir and dirpath and not isdir(dirpath): +- mkdirs(dirpath) ++ make_dir = not (no_file or out_file) ++ if make_dir: ++ dirpath = dirname(path) ++ if dirpath and not isdir(dirpath): ++ mkdirs(dirpath) + + if not no_file: + if out_file == "-": +@@ -1023,30 +1023,25 @@ class SwiftService(object): + 'contents': obj_body + } + return res +- elif out_file: ++ if out_file: + fp = open(out_file, 'wb') + else: + if basename(path): + fp = open(path, 'wb') + else: + pseudodir = True +- no_file = True +- +- for chunk in obj_body.buffer(): +- if not no_file: +- fp.write(chunk) + +- else: +- for _ in obj_body.buffer(): +- continue ++ for chunk in obj_body.buffer(): ++ if fp is not None: ++ fp.write(chunk) + + finish_time = time() ++ + finally: + bytes_read = obj_body.bytes_read() + if fp is not None: + fp.close() +- if 'x-object-meta-mtime' in headers \ +- and not options['no_download']: ++ if 'x-object-meta-mtime' in headers and not no_file: + mtime = float(headers['x-object-meta-mtime']) + if options['out_file'] \ + and not options['out_file'] == "-": diff --git a/0002-Remove-builtin-requirements-handling.patch b/0002-Remove-builtin-requirements-handling.patch new file mode 100644 index 0000000..a487f5c --- /dev/null +++ b/0002-Remove-builtin-requirements-handling.patch @@ -0,0 +1,19 @@ +From 920fc028fd07925fb03994ce2c23d7e4cb45c3da Mon Sep 17 00:00:00 2001 +From: Jakub Ruzicka +Date: Fri, 6 Dec 2013 17:36:12 +0100 +Subject: [PATCH] Remove builtin requirements handling + +--- + setup.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 70c2b3f..afab729 100644 +--- a/setup.py ++++ b/setup.py +@@ -18,5 +18,4 @@ + import setuptools + + setuptools.setup( +- setup_requires=['pbr'], + pbr=True) diff --git a/0003-Patch-docs-to-use-oslo.sphinx.patch b/0003-Patch-docs-to-use-oslo.sphinx.patch new file mode 100644 index 0000000..d59c04c --- /dev/null +++ b/0003-Patch-docs-to-use-oslo.sphinx.patch @@ -0,0 +1,39 @@ +From 10f8e21abdef75dc950f6dfba5fa13603af82ad0 Mon Sep 17 00:00:00 2001 +From: Pete Zaitcev +Date: Thu, 18 Sep 2014 19:25:22 -0600 +Subject: [PATCH] Patch docs to use oslo.sphinx + +Patching the source this way is the technique that most our projects +use for now. Some even use sed(1)! Ask Padraig as to why this is. +Sooner or later we need to migrate to oslosphinx 2.0, but not today. +--- + doc/source/conf.py | 2 +- + test-requirements.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/doc/source/conf.py b/doc/source/conf.py +index 0b3e7e1..bfb1d76 100644 +--- a/doc/source/conf.py ++++ b/doc/source/conf.py +@@ -32,7 +32,7 @@ sys.path.insert(0, ROOT) + # Add any Sphinx extension module names here, as strings. They can be + # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', +- 'sphinx.ext.coverage', 'oslosphinx'] ++ 'sphinx.ext.coverage', 'oslo.sphinx'] + + autoclass_content = 'both' + autodoc_default_flags = ['members', 'undoc-members', 'show-inheritance'] +diff --git a/test-requirements.txt b/test-requirements.txt +index 5427920..168cede 100644 +--- a/test-requirements.txt ++++ b/test-requirements.txt +@@ -3,7 +3,7 @@ hacking>=0.8.0,<0.9 + coverage>=3.6 + discover + mock>=1.0 +-oslosphinx ++oslo.sphinx + python-keystoneclient>=0.7.0 + sphinx>=1.1.2,<1.2 + testrepository>=0.0.18 diff --git a/python-swiftclient.spec b/python-swiftclient.spec index 29b9a60..f8bd4cd 100644 --- a/python-swiftclient.spec +++ b/python-swiftclient.spec @@ -1,15 +1,17 @@ Name: python-swiftclient -Version: 2.1.0 -Release: 2%{?dist} +Version: 2.3.0 +Release: 1%{?dist} Summary: Client Library for OpenStack Object Storage API License: ASL 2.0 URL: http://pypi.python.org/pypi/%{name} Source0: http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz # -# patches_base=2.1.0 +# patches_base=2.3.0 # -Patch0001: 0001-Remove-builtin-requirements-handling.patch +Patch0001: 0001-Stop-creating-extraneous-directories.patch +Patch0002: 0002-Remove-builtin-requirements-handling.patch +Patch0003: 0003-Patch-docs-to-use-oslo.sphinx.patch BuildArch: noarch Requires: python-keystoneclient @@ -33,6 +35,7 @@ Summary: Documentation for OpenStack Object Storage API Client Group: Documentation BuildRequires: python-sphinx +BuildRequires: python-oslo-sphinx %description doc Documentation for the client library for interacting with Openstack @@ -42,6 +45,8 @@ Object Storage API. %setup -q %patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 # Let RPM handle the dependencies rm -f test-requirements.txt requirements.txt @@ -76,6 +81,12 @@ rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo %doc LICENSE doc/build/html %changelog +* Thu Sep 18 2014 Pete Zaitcev 2.3.0-1 +- Update to upstream 2.3.0 (Juno RC) +- Upstream update includes fix for bz#1126942 +- Upstream update includes support for Keystone v3 +- New build dependency: python-oslo-sphinx + * Sat Jun 07 2014 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index 8315614..9e5cf16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c055ef6a506623b71337313840d8386b python-swiftclient-2.1.0.tar.gz +8c1c6bc2df1b47520f6054813461a078 python-swiftclient-2.3.0.tar.gz