[openstack-swift] update to Icehouse release

Pádraig Brady pbrady at fedoraproject.org
Sat Apr 19 21:08:59 UTC 2014


commit 2faabce0dae6d476a2b06567e80188e5d4f1ccbf
Author: Pádraig Brady <P at draigBrady.com>
Date:   Sat Apr 19 21:59:02 2014 +0100

    update to Icehouse release

 .gitignore                                         |    1 +
 0001-remove-runtime-requirement-on-pbr.patch       |    2 +-
 0002-Add-fixes-for-building-the-doc-package.patch  |    2 +-
 0003-Set-permissions-on-generated-ring-files.patch |   59 ++++++++++++++++++++
 openstack-swift.spec                               |   18 ++++--
 sources                                            |    2 +-
 6 files changed, 74 insertions(+), 10 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ceadfe7..46b0175 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
 /swift-1.11.0.tar.gz
 /swift-1.12.0.tar.gz
 /swift-1.13.1.rc2.tar.gz
+/swift-1.13.1.tar.gz
diff --git a/0001-remove-runtime-requirement-on-pbr.patch b/0001-remove-runtime-requirement-on-pbr.patch
index 078a1ba..79fad5e 100644
--- a/0001-remove-runtime-requirement-on-pbr.patch
+++ b/0001-remove-runtime-requirement-on-pbr.patch
@@ -1,4 +1,4 @@
-From b8964a55d2562470feb8600b5776de1183141109 Mon Sep 17 00:00:00 2001
+From 6661a95cc27bc3e66b524cd81aa4b49ca2551a1b Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P at draigBrady.com>
 Date: Wed, 9 Oct 2013 12:38:40 +0100
 Subject: [PATCH] remove runtime requirement on pbr
diff --git a/0002-Add-fixes-for-building-the-doc-package.patch b/0002-Add-fixes-for-building-the-doc-package.patch
index f77a78b..1465cc7 100644
--- a/0002-Add-fixes-for-building-the-doc-package.patch
+++ b/0002-Add-fixes-for-building-the-doc-package.patch
@@ -1,4 +1,4 @@
-From 9fea3526bb3d84a81d82b352df31c492644339b8 Mon Sep 17 00:00:00 2001
+From c16135a834bbe0551e75824d2c029a0bc9cf447a Mon Sep 17 00:00:00 2001
 From: Alan Pevec <apevec at redhat.com>
 Date: Thu, 5 Jan 2012 00:03:00 +0100
 Subject: [PATCH] Add fixes for building the doc package
diff --git a/0003-Set-permissions-on-generated-ring-files.patch b/0003-Set-permissions-on-generated-ring-files.patch
new file mode 100644
index 0000000..80e0084
--- /dev/null
+++ b/0003-Set-permissions-on-generated-ring-files.patch
@@ -0,0 +1,59 @@
+From 755b27e59818d3d123dfc4300e528d92f8b5d904 Mon Sep 17 00:00:00 2001
+From: James Page <james.page at ubuntu.com>
+Date: Sat, 5 Apr 2014 09:38:12 +0100
+Subject: [PATCH] Set permissions on generated ring files
+
+The use of NamedTemporaryFile creates rings with permissions 0600;
+however most installs probably generate the rings as root but the
+swift-proxy runs as user swift.
+
+Set the permissions on the generated ring to 0644 prior to rename so
+that the swift user can read the rings.
+
+Change-Id: Ia511931f471c5c9840012c3a75b89c1f35b1b245
+Closes-Bug: #1302700
+---
+ swift/common/ring/ring.py          |    1 +
+ test/unit/common/ring/test_ring.py |   10 ++++++++++
+ 2 files changed, 11 insertions(+), 0 deletions(-)
+
+diff --git a/swift/common/ring/ring.py b/swift/common/ring/ring.py
+index 5b31528..a1f9024 100644
+--- a/swift/common/ring/ring.py
++++ b/swift/common/ring/ring.py
+@@ -120,6 +120,7 @@ class RingData(object):
+         tempf.flush()
+         os.fsync(tempf.fileno())
+         tempf.close()
++        os.chmod(tempf.name, 0o644)
+         os.rename(tempf.name, filename)
+ 
+     def to_dict(self):
+diff --git a/test/unit/common/ring/test_ring.py b/test/unit/common/ring/test_ring.py
+index 04eb1b7..1892d19 100644
+--- a/test/unit/common/ring/test_ring.py
++++ b/test/unit/common/ring/test_ring.py
+@@ -18,6 +18,7 @@ import cPickle as pickle
+ import os
+ import sys
+ import unittest
++import stat
+ from contextlib import closing
+ from gzip import GzipFile
+ from tempfile import mkdtemp
+@@ -98,6 +99,15 @@ class TestRingData(unittest.TestCase):
+             with open(ring_fname2) as ring2:
+                 self.assertEqual(ring1.read(), ring2.read())
+ 
++    def test_permissions(self):
++        ring_fname = os.path.join(self.testdir, 'stat.ring.gz')
++        rd = ring.RingData(
++            [array.array('H', [0, 1, 0, 1]), array.array('H', [0, 1, 0, 1])],
++            [{'id': 0, 'zone': 0}, {'id': 1, 'zone': 1}], 30)
++        rd.save(ring_fname)
++        self.assertEqual(oct(stat.S_IMODE(os.stat(ring_fname).st_mode)),
++                         '0644')
++
+ 
+ class TestRing(unittest.TestCase):
+ 
diff --git a/openstack-swift.spec b/openstack-swift.spec
index b54f89c..414ca0c 100644
--- a/openstack-swift.spec
+++ b/openstack-swift.spec
@@ -3,18 +3,17 @@
 %endif
 
 %global release_name icehouse
-%global milestone rc2
+%global milestone ...
 
 Name:             openstack-swift
 Version:          1.13.1
-Release:          0.1.%{milestone}%{?dist}
+Release:          1%{?dist}
 Summary:          OpenStack Object Storage (Swift)
 
 Group:            Development/Languages
 License:          ASL 2.0
 URL:              http://launchpad.net/swift
-#Source0:          http://launchpad.net/swift/%{release_name}/%{version}/+download/swift-%{version}.tar.gz
-Source0:          https://launchpad.net/swift/%{release_name}/%{version}-%{milestone}/+download/swift-%{version}.%{milestone}.tar.gz
+Source0:          http://launchpad.net/swift/%{release_name}/%{version}/+download/swift-%{version}.tar.gz
 
 Source2:          %{name}-account.service
 Source21:         %{name}-account at .service
@@ -52,10 +51,11 @@ Source20:         %{name}.tmpfs
 Source7:          swift.conf
 
 #
-# patches_base=1.13.1.rc2
+# patches_base=1.13.1
 #
 Patch0001: 0001-remove-runtime-requirement-on-pbr.patch
 Patch0002: 0002-Add-fixes-for-building-the-doc-package.patch
+Patch0003: 0003-Set-permissions-on-generated-ring-files.patch
 
 BuildArch:        noarch
 BuildRequires:    python-devel
@@ -162,12 +162,13 @@ in clusters for reliable, redundant, and large-scale storage of static objects.
 This package contains documentation files for %{name}.
 
 %prep
-%setup -q -n swift-%{version}.%{milestone}
+%setup -q -n swift-%{version}
 
 %patch0001 -p1
 %patch0002 -p1
+%patch0003 -p1
 
-sed -i 's/%{version}.%{milestone}/%{version}/' PKG-INFO
+#sed -i 's/%{version}.%{milestone}/%{version}/' PKG-INFO
 
 # Remove bundled egg-info
 rm -rf swift.egg-info
@@ -468,6 +469,9 @@ exit 0
 %doc LICENSE doc/build/html
 
 %changelog
+* Sat Apr 19 2014 Pádraig Brady <pbrady at redhat.com> - 1.13.1-1
+- Update to Icehouse release
+
 * Sat Apr 12 2014 Alan Pevec <apevec at redhat.com> 1.13.1-0.1.rc2
 - Update to Icehouse milestone 1.13.1.rc2
 
diff --git a/sources b/sources
index cf99030..6900b2d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ea1dba049eb837e7a76c3fbc8068c6d0  swift-1.13.1.rc2.tar.gz
+a91eb8795dc0ae7eba5f2b13bde637d3  swift-1.13.1.tar.gz


More information about the scm-commits mailing list