[openstack-swift/f17] Updated patches from f17-patches

Alan Pevec apevec at fedoraproject.org
Fri Sep 28 18:09:50 UTC 2012


commit 597042829bf0f6383ce250cf2bee263c8bcb670b
Author: Alan Pevec <apevec at redhat.com>
Date:   Fri Sep 28 19:49:55 2012 +0200

    Updated patches from f17-patches
    
    - adjust unit test and documentation to default for this release

 ...pickle-for-serialization-in-memcache-but-.patch |   49 ++++++++++---------
 ...bug-where-serialization_format-is-ignored.patch |   19 ++++----
 openstack-swift.spec                               |   14 ++++--
 3 files changed, 44 insertions(+), 38 deletions(-)
---
diff --git a/Do-not-use-pickle-for-serialization-in-memcache.patch b/0001-Do-not-use-pickle-for-serialization-in-memcache-but-.patch
similarity index 91%
rename from Do-not-use-pickle-for-serialization-in-memcache.patch
rename to 0001-Do-not-use-pickle-for-serialization-in-memcache-but-.patch
index 2dff33a..6179ced 100644
--- a/Do-not-use-pickle-for-serialization-in-memcache.patch
+++ b/0001-Do-not-use-pickle-for-serialization-in-memcache-but-.patch
@@ -1,5 +1,7 @@
-Subject: [PATCH 1/2] Do not use pickle for serialization in memcache, but
- JSON
+From c0619bd0c5eeb3d2f8af8b37575e11847664272c Mon Sep 17 00:00:00 2001
+From: Vincent Untz <vuntz at suse.com>
+Date: Thu, 21 Jun 2012 14:37:41 +0200
+Subject: [PATCH] Do not use pickle for serialization in memcache, but JSON
 
 We don't want to use pickle as it can execute arbitrary code. JSON is
 safer. However, note that it supports serialization for only some
@@ -11,28 +13,32 @@ poisoning for old servers not understanding JSON), we add a
 memcache_serialization_support configuration option, with the following
 values:
 
- 0 = older, insecure pickle serialization
+ 0 = older, insecure pickle serialization (compatible, default in this release)
  1 = json serialization but pickles can still be read (still insecure)
- 2 = json serialization only (secure and the default)
+ 2 = json serialization only (secure, suggested, and the future default)
 
 To avoid an instant full cache flush, existing installations should
 upgrade with 0, then set to 1 and reload, then after some time (24
 hours) set to 2 and reload. Support for 0 and 1 will be removed in
 future versions.
 
-Change-Id: I6c22a53feb33ad7f448d13941e4135c750bea65d
+Part of bug 1006414.
+
+Patch Set 2: Added Vincent Untz <vuntz at suse.com> to AUTHORS
+
+Change-Id: Id7d6d547b103b4f23ebf5be98b88f09ec6027ce4
 ---
- doc/manpages/proxy-server.conf.5             | 15 +++++++++
- etc/memcache.conf-sample                     | 10 ++++++
- etc/proxy-server.conf-sample                 | 12 +++++++
- swift/common/memcached.py                    | 48 ++++++++++++++++++++++------
- swift/common/middleware/memcache.py          | 30 +++++++++++++----
- test/unit/common/middleware/test_memcache.py |  5 ++-
- test/unit/common/test_memcached.py           | 22 +++++++++++++
+ doc/manpages/proxy-server.conf.5             |   15 ++++++++
+ etc/memcache.conf-sample                     |   10 +++++
+ etc/proxy-server.conf-sample                 |   12 ++++++
+ swift/common/memcached.py                    |   48 +++++++++++++++++++++-----
+ swift/common/middleware/memcache.py          |   30 ++++++++++++----
+ test/unit/common/middleware/test_memcache.py |    5 ++-
+ test/unit/common/test_memcached.py           |   22 ++++++++++++
  7 files changed, 125 insertions(+), 17 deletions(-)
 
 diff --git a/doc/manpages/proxy-server.conf.5 b/doc/manpages/proxy-server.conf.5
-index 4979e4d..e8581d1 100644
+index 4979e4d..5cf5a7e 100644
 --- a/doc/manpages/proxy-server.conf.5
 +++ b/doc/manpages/proxy-server.conf.5
 @@ -205,6 +205,21 @@ Enables the ability to log request headers. The default is False.
@@ -45,9 +51,9 @@ index 4979e4d..e8581d1 100644
 +
 +.PD 0
 +.RS 10
-+.IP "0 = older, insecure pickle serialization"
++.IP "0 = older, insecure pickle serialization (default)"
 +.IP "1 = json serialization but pickles can still be read (still insecure)"
-+.IP "2 = json serialization only (secure and the default)"
++.IP "2 = json serialization only (secure)"
 +.RE
 +
 +.RS 10
@@ -58,7 +64,7 @@ index 4979e4d..e8581d1 100644
  
  
 diff --git a/etc/memcache.conf-sample b/etc/memcache.conf-sample
-index 580d94a..c0050b1 100644
+index 580d94a..cedfc19 100644
 --- a/etc/memcache.conf-sample
 +++ b/etc/memcache.conf-sample
 @@ -3,3 +3,13 @@
@@ -67,16 +73,16 @@ index 580d94a..c0050b1 100644
  # memcache_servers = 127.0.0.1:11211
 +#
 +# Sets how memcache values are serialized and deserialized:
-+# 0 = older, insecure pickle serialization (default for this release)
++# 0 = older, insecure pickle serialization (compatible, default in this release)
 +# 1 = json serialization but pickles can still be read (still insecure)
-+# 2 = json serialization only (secure and the future default)
++# 2 = json serialization only (secure, suggested, and the future default)
 +# To avoid an instant full cache flush, existing installations should
 +# upgrade with 0, then set to 1 and reload, then after some time (24 hours)
 +# set to 2 and reload.
 +# In the future, the ability to use pickle serialization will be removed.
 +# memcache_serialization_support = 0
 diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample
-index 148616b..2e26ba5 100644
+index 148616b..18f711a 100644
 --- a/etc/proxy-server.conf-sample
 +++ b/etc/proxy-server.conf-sample
 @@ -122,6 +122,18 @@ use = egg:swift#memcache
@@ -85,7 +91,7 @@ index 148616b..2e26ba5 100644
  # memcache_servers = 127.0.0.1:11211
 +#
 +# Sets how memcache values are serialized and deserialized:
-+# 0 = older, insecure pickle serialization, compatible default in this release
++# 0 = older, insecure pickle serialization (compatible, default in this release)
 +# 1 = json serialization but pickles can still be read (still insecure)
 +# 2 = json serialization only (secure, suggested, and the future default)
 +# If not set here, the value for memcache_serialization_support will be read
@@ -343,6 +349,3 @@ index dff6e80..3016d10 100644
  
  if __name__ == '__main__':
      unittest.main()
--- 
-1.7.11.4
-
diff --git a/Fix-bug-where-serialization_format-is-ignored.patch b/0002-Fix-bug-where-serialization_format-is-ignored.patch
similarity index 84%
rename from Fix-bug-where-serialization_format-is-ignored.patch
rename to 0002-Fix-bug-where-serialization_format-is-ignored.patch
index 2e02731..4f7e4b4 100644
--- a/Fix-bug-where-serialization_format-is-ignored.patch
+++ b/0002-Fix-bug-where-serialization_format-is-ignored.patch
@@ -1,10 +1,12 @@
-Subject: [PATCH 2/2] Fix bug where serialization_format is ignored
+From c38568f026853f64f2669f03bd56441b007f13be Mon Sep 17 00:00:00 2001
+From: gholt <z-launchpad at brim.net>
+Date: Tue, 18 Sep 2012 18:24:47 +0000
+Subject: [PATCH] Fix bug where serialization_format is ignored
 
 Change-Id: I5a5ac8b5f18e077105ab12e9b1f0ccafac3983f7
-
 ---
- swift/common/middleware/memcache.py          |  2 ++
- test/unit/common/middleware/test_memcache.py | 12 ++++++++++--
+ swift/common/middleware/memcache.py          |    2 ++
+ test/unit/common/middleware/test_memcache.py |   12 ++++++++++--
  2 files changed, 12 insertions(+), 2 deletions(-)
 
 diff --git a/swift/common/middleware/memcache.py b/swift/common/middleware/memcache.py
@@ -21,7 +23,7 @@ index 20121c9..06678c4 100644
          self.memcache = MemcacheRing(
              [s.strip() for s in self.memcache_servers.split(',') if s.strip()],
 diff --git a/test/unit/common/middleware/test_memcache.py b/test/unit/common/middleware/test_memcache.py
-index e217a96..c365702 100644
+index e217a96..28c7b13 100644
 --- a/test/unit/common/middleware/test_memcache.py
 +++ b/test/unit/common/middleware/test_memcache.py
 @@ -48,7 +48,7 @@ class SetConfigParser(object):
@@ -37,8 +39,8 @@ index e217a96..c365702 100644
          finally:
              memcache.ConfigParser = orig_parser
          self.assertEquals(app.memcache_servers, '127.0.0.1:11211')
-+        self.assertEquals(app.memcache._allow_pickle, False)
-+        self.assertEquals(app.memcache._allow_unpickle, False)
++        self.assertEquals(app.memcache._allow_pickle, True)
++        self.assertEquals(app.memcache._allow_unpickle, True)
  
      def test_conf_from_extra_conf(self):
          orig_parser = memcache.ConfigParser
@@ -66,6 +68,3 @@ index e217a96..c365702 100644
  
  
  if __name__ == '__main__':
--- 
-1.7.11.4
-
diff --git a/openstack-swift.spec b/openstack-swift.spec
index 5bf8746..9596fc1 100644
--- a/openstack-swift.spec
+++ b/openstack-swift.spec
@@ -4,7 +4,7 @@
 
 Name:             openstack-swift
 Version:          1.4.8
-Release:          2%{?dist}
+Release:          2.1%{?dist}
 Summary:          OpenStack Object Storage (swift)
 
 Group:            Development/Languages
@@ -21,8 +21,11 @@ Source6:          %{name}-proxy.service
 Source20:         %{name}.tmpfs
 BuildRoot:        %{_tmppath}/swift-%{version}-%{release}-root-%(%{__id_u} -n)
 
-Patch0001: Do-not-use-pickle-for-serialization-in-memcache.patch
-Patch0002: Fix-bug-where-serialization_format-is-ignored.patch
+#
+# patches_base=1.4.8
+#
+Patch0001: 0001-Do-not-use-pickle-for-serialization-in-memcache-but-.patch
+Patch0002: 0002-Fix-bug-where-serialization_format-is-ignored.patch
 
 BuildArch:        noarch
 BuildRequires:    dos2unix
@@ -132,11 +135,12 @@ This package contains documentation files for %{name}.
 
 %prep
 %setup -q -n swift-%{version}
+%patch0001 -p1
+%patch0002 -p1
+
 # Fix wrong-file-end-of-line-encoding warning
 dos2unix LICENSE
 
-%patch0001 -p1 -z .pickle-memcache
-%patch0002 -p1 -z .format-ignored
 
 %build
 %{__python} setup.py build


More information about the scm-commits mailing list