From 6041f8beac999f19d5e29e5bb8fc847c5ef0b7a8 Mon Sep 17 00:00:00 2001 From: Ilya Kharin Date: Mon, 15 Jul 2013 22:28:19 +0400 Subject: [PATCH] Update RPM-specs to 2013.1.2 version Change-Id: I343eed88b616c9d5a58d9e8dfa097e5bb153ec7d --- ...-t-access-the-net-when-building-docs.patch | 8 +- ...llel-install-versions-of-epel-packag.patch | 106 +++++++++++++++ ...d-assert_unicode-sqlalchemy-attribut.patch | 126 ++++++++++++++++++ rpm/SPECS/openstack-cinder.spec | 37 +++-- 4 files changed, 263 insertions(+), 14 deletions(-) create mode 100644 rpm/SOURCES/0002-Use-updated-parallel-install-versions-of-epel-packag.patch create mode 100644 rpm/SOURCES/0003-remove-deprecated-assert_unicode-sqlalchemy-attribut.patch diff --git a/rpm/SOURCES/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch b/rpm/SOURCES/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch index 852bae362..38bc142a6 100644 --- a/rpm/SOURCES/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch +++ b/rpm/SOURCES/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch @@ -1,15 +1,15 @@ -From 632fb0194715d52f2b03c5b4b8697d4271bd81f7 Mon Sep 17 00:00:00 2001 +From 4c99afa1a11819f77099c4518171817a7a58da18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Fri, 21 Sep 2012 13:33:26 +0100 Subject: [PATCH] Ensure we don't access the net when building docs (Note, this has not been sent upstream) --- - doc/source/conf.py | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + doc/source/conf.py | 1 - + 1 file changed, 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py -index 7436039..9a5b826 100644 +index 40e564b..01bd3b4 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -29,7 +29,6 @@ sys.path.insert(0, os.path.abspath('./')) diff --git a/rpm/SOURCES/0002-Use-updated-parallel-install-versions-of-epel-packag.patch b/rpm/SOURCES/0002-Use-updated-parallel-install-versions-of-epel-packag.patch new file mode 100644 index 000000000..8b587e36a --- /dev/null +++ b/rpm/SOURCES/0002-Use-updated-parallel-install-versions-of-epel-packag.patch @@ -0,0 +1,106 @@ +From 632186c1a4e3d971bab1d017ea3289e92c85d86c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Wed, 24 Oct 2012 13:44:37 +0100 +Subject: [PATCH] Use updated parallel install versions of epel package + +Use sqlalchemy >= 0.6.3 WebOb >= 1.0 Routes >= 1.12.3 PasteDeploy >= 1.5.0 +and depend on the parallel installable +versions of these packages to satisfy those requirements. + +Delve into pkg_resources a little to get it to modify sys.path, +so that our parallel installed egg takes precedence over the +system default module versions. +(cherry picked from commit 7b25747ffc21d0771e864f57ab2088725c8851f0) + +Conflicts: + bin/cinder-manage +--- + bin/cinder-manage | 7 ++++--- + cinder/__init__.py | 30 ++++++++++++++++++++++++++++++ + cinder/db/sqlalchemy/migration.py | 7 ++++++- + 3 files changed, 40 insertions(+), 4 deletions(-) + +diff --git a/bin/cinder-manage b/bin/cinder-manage +index de7955d..364944a 100755 +--- a/bin/cinder-manage ++++ b/bin/cinder-manage +@@ -59,9 +59,6 @@ import os + import sys + import uuid + +-from sqlalchemy import create_engine, MetaData, Table +-from sqlalchemy.ext.declarative import declarative_base +-from sqlalchemy.orm import sessionmaker + + + # If ../cinder/__init__.py exists, add ../ to Python search path, so that +@@ -87,6 +84,10 @@ from cinder.openstack.common import uuidutils + from cinder import utils + from cinder import version + ++from sqlalchemy import create_engine, MetaData, Table ++from sqlalchemy.orm import sessionmaker ++from sqlalchemy.ext.declarative import declarative_base ++ + FLAGS = flags.FLAGS + + +diff --git a/cinder/__init__.py b/cinder/__init__.py +index f8db8e8..1b4ac39 100644 +--- a/cinder/__init__.py ++++ b/cinder/__init__.py +@@ -31,6 +31,36 @@ + .. moduleauthor:: Andy Smith + """ + ++import sys ++import pkg_resources ++ ++# If there is a conflicting non egg module, ++# i.e. an older standard system module installed, ++# then replace it with this requirement ++def replace_dist(requirement): ++ try: ++ return pkg_resources.require(requirement) ++ except pkg_resources.VersionConflict: ++ e = sys.exc_info()[1] ++ dist=e.args[0] ++ req=e.args[1] ++ if dist.key == req.key and not dist.location.endswith('.egg'): ++ del pkg_resources.working_set.by_key[dist.key] ++ # We assume there is no need to adjust sys.path ++ # and the associated pkg_resources.working_set.entries ++ return pkg_resources.require(requirement) ++ ++replace_dist("WebOb >= 1.0") ++replace_dist("SQLAlchemy >= 0.6.3") ++replace_dist("Routes >= 1.12.3") ++ ++replace_dist("PasteDeploy >= 1.5.0") ++# This hack is needed because replace_dist() results in ++# the standard paste module path being at the start of __path__. ++# TODO: See can we get pkg_resources to do the right thing directly ++import paste ++paste.__path__.insert(0, paste.__path__.pop(-1)) ++ + import gettext + + +diff --git a/cinder/db/sqlalchemy/migration.py b/cinder/db/sqlalchemy/migration.py +index 5365d9c..e2fcd83 100644 +--- a/cinder/db/sqlalchemy/migration.py ++++ b/cinder/db/sqlalchemy/migration.py +@@ -57,7 +57,12 @@ if (not hasattr(migrate, '__version__') or + + + # NOTE(jkoelker) Delay importing migrate until we are patched +-from migrate import exceptions as versioning_exceptions ++try: ++ # Try the more specific path first (migrate <= 0.6) ++ from migrate.versioning import exceptions as versioning_exceptions ++except ImportError: ++ # Use the newer path (migrate >= 0.7) ++ from migrate import exceptions as versioning_exceptions + from migrate.versioning import api as versioning_api + from migrate.versioning.repository import Repository + diff --git a/rpm/SOURCES/0003-remove-deprecated-assert_unicode-sqlalchemy-attribut.patch b/rpm/SOURCES/0003-remove-deprecated-assert_unicode-sqlalchemy-attribut.patch new file mode 100644 index 000000000..37e6f4584 --- /dev/null +++ b/rpm/SOURCES/0003-remove-deprecated-assert_unicode-sqlalchemy-attribut.patch @@ -0,0 +1,126 @@ +From 2e3d9b429a79a9e6f39eba7907386bf30cb777d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Tue, 2 Apr 2013 14:44:51 +0100 +Subject: [PATCH] remove deprecated assert_unicode sqlalchemy attribute + +Removing this enables use with sqlalchemy 0.8.0 +The deprecation is described upstream at: +http://docs.sqlalchemy.org/en/latest/changelog/changelog_08.html#change-ad44af79c886d1bb283042deb64f9cbe + +Change-Id: I305bfdbcd3c3669c41318ea34115624f729b3909 +--- + cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py | 11 ++++------- + cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py | 11 ----------- + 2 files changed, 4 insertions(+), 18 deletions(-) + +diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py b/cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py +index 9f5b643..fe911c0 100644 +--- a/cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py ++++ b/cinder/db/sqlalchemy/migrate_repo/versions/002_quota_class.py +@@ -37,14 +37,12 @@ def upgrade(migrate_engine): + Column('class_name', + String(length=255, + convert_unicode=True, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False), + index=True), + Column('resource', + String(length=255, + convert_unicode=True, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('hard_limit', Integer(), nullable=True), +@@ -67,12 +65,12 @@ def upgrade(migrate_engine): + Column('id', Integer(), primary_key=True), + Column('project_id', + String(length=255, convert_unicode=True, +- assert_unicode=None, unicode_error=None, ++ unicode_error=None, + _warn_on_bytestring=False), + index=True), + Column('resource', + String(length=255, convert_unicode=True, +- assert_unicode=None, unicode_error=None, ++ unicode_error=None, + _warn_on_bytestring=False)), + Column('in_use', Integer(), nullable=False), + Column('reserved', Integer(), nullable=False), +@@ -97,7 +95,6 @@ def upgrade(migrate_engine): + Column('uuid', + String(length=36, + convert_unicode=True, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False), + nullable=False), +@@ -107,12 +104,12 @@ def upgrade(migrate_engine): + nullable=False), + Column('project_id', + String(length=255, convert_unicode=True, +- assert_unicode=None, unicode_error=None, ++ unicode_error=None, + _warn_on_bytestring=False), + index=True), + Column('resource', + String(length=255, convert_unicode=True, +- assert_unicode=None, unicode_error=None, ++ unicode_error=None, + _warn_on_bytestring=False)), + Column('delta', Integer(), nullable=False), + Column('expire', DateTime(timezone=False)), +diff --git a/cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py b/cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py +index 4cc1689..5dfbed0 100644 +--- a/cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py ++++ b/cinder/db/sqlalchemy/migrate_repo/versions/008_add_backup.py +@@ -37,49 +37,38 @@ def upgrade(migrate_engine): + Column('id', String(36), primary_key=True, nullable=False), + Column('volume_id', String(36), nullable=False), + Column('user_id', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('project_id', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('host', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('availability_zone', String(length=255, + convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('display_name', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('display_description', String(length=255, + convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('container', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('status', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('fail_reason', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('service_metadata', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('service', String(length=255, convert_unicode=False, +- assert_unicode=None, + unicode_error=None, + _warn_on_bytestring=False)), + Column('size', Integer()), diff --git a/rpm/SPECS/openstack-cinder.spec b/rpm/SPECS/openstack-cinder.spec index 7cfa80fd2..43c20171b 100644 --- a/rpm/SPECS/openstack-cinder.spec +++ b/rpm/SPECS/openstack-cinder.spec @@ -1,8 +1,8 @@ %global with_doc %{!?_without_doc:1}%{?_without_doc:0} Name: openstack-cinder -Version: 2013.1 -Release: 0.4.g3%{?dist} +Version: 2013.1.1 +Release: 1%{?dist} Summary: OpenStack Volume service Group: Applications/System @@ -23,12 +23,11 @@ Source120: openstack-cinder-volume.upstart Source20: cinder-sudoers # -# patches_base=grizzly-3 +# patches_base=2013.1.1 # Patch0001: 0001-Ensure-we-don-t-access-the-net-when-building-docs.patch - -# This is EPEL specific and not upstream -Patch100: openstack-cinder-newdeps.patch +Patch0002: 0002-Use-updated-parallel-install-versions-of-epel-packag.patch +Patch0003: 0003-remove-deprecated-assert_unicode-sqlalchemy-attribut.patch BuildArch: noarch BuildRequires: intltool @@ -127,9 +126,8 @@ This package contains documentation files for cinder. %setup -q -n cinder-%{version} %patch0001 -p1 - -# Apply EPEL patch -%patch100 -p1 +%patch0002 -p1 +%patch0003 -p1 find . \( -name .gitignore -o -name .placeholder \) -delete @@ -284,7 +282,26 @@ fi %endif %changelog -* Tue Mar 05 2013 Pádraig Brady - 2013.1.0.4.g3 +* Fri May 10 2013 Eric Harney - 2013.1.1-1 +- Update to Grizzly stable release 1 + +* Mon Apr 08 2013 Eric Harney - 2013.1-2 +- Backport fix for GlusterFS driver get_volume_stats +- Adjust to support sqlalchemy-0.8.0 + +* Thu Apr 04 2013 Eric Harney - 2013.1-1 +- Update to Grizzly final release + +* Mon Mar 27 2013 Eric Harney - 2013.1-0.5.rc3 +- Update to Grizzly RC3 release + +* Mon Mar 25 2013 Eric Harney - 2013.1-0.5.rc2 +- Update to Grizzly RC2 release + +* Mon Mar 18 2013 Eric Harney - 2013.1-0.5.rc1 +- Update to Grizzly RC1 release + +* Tue Mar 05 2013 Pádraig Brady - 2013.1-0.4.g3 - Add dependency on python-stevedore * Wed Feb 27 2013 Eric Harney - 2013.1-0.2.g3 -- 2.45.2