[openstack-keystone/el6] Use updated parallel install versions of epel package

Alan Pevec apevec at fedoraproject.org
Wed Nov 30 22:49:09 UTC 2011


commit aeebdb46caa4dbb979f67aa6408aba50bd0dc8b1
Author: Pádraig Brady <P at draigBrady.com>
Date:   Fri Nov 25 12:42:54 2011 +0100

    Use updated parallel install versions of epel package
    
    Use sqlalchemy >= 0.6.3 and WebOb >= 1.0,
    and depend on the EPEL parallel installable
    versions of these packages to satisfy those requirements.

 openstack-keystone-newdeps.patch |   32 ++++++++++++++++++++++++++++++++
 openstack-keystone.spec          |   14 ++++++++++----
 2 files changed, 42 insertions(+), 4 deletions(-)
---
diff --git a/openstack-keystone-newdeps.patch b/openstack-keystone-newdeps.patch
new file mode 100644
index 0000000..c882705
--- /dev/null
+++ b/openstack-keystone-newdeps.patch
@@ -0,0 +1,32 @@
+--- keystone-2011.3.1/keystone/__init__.py.orig	2011-11-25 12:27:19.920880470 +0100
++++ keystone-2011.3.1/keystone/__init__.py	2011-11-25 12:27:49.801976645 +0100
+@@ -12,6 +12,29 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ 
++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)
++
++print replace_dist("WebOb >= 1.0")
++print replace_dist("SQLAlchemy >= 0.6.3")
++
++
+ import gettext
+ 
+ 
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
index 3f2e6f8..da6a7d4 100644
--- a/openstack-keystone.spec
+++ b/openstack-keystone.spec
@@ -9,7 +9,7 @@
 
 Name:           openstack-keystone
 Version:        2011.3.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        OpenStack Identity Service
 
 License:        ASL 2.0
@@ -17,12 +17,16 @@ URL:            http://keystone.openstack.org/
 Source0:        http://keystone.openstack.org/tarballs/keystone-%{version}%{snaptag}.tar.gz
 Source1:        openstack-keystone.logrotate
 Source2:        openstack-keystone.init
+Patch0:         openstack-keystone-newdeps.patch
 
 BuildArch:      noarch
 BuildRequires:  python2-devel
 BuildRequires:  python-sphinx10
+BuildRequires:  python-sqlalchemy0.7
+BuildRequires:  python-webob1.0
 BuildRequires:  python-iniparse
 
+
 Requires:       python-eventlet
 Requires:       python-httplib2
 Requires:       python-ldap
@@ -32,10 +36,11 @@ Requires:       python-paste
 Requires:       python-paste-deploy
 Requires:       python-paste-script
 Requires:       python-routes
-Requires:       python-sqlalchemy
+Requires:       python-sqlalchemy0.7
 Requires:       python-sqlite2
-Requires:       python-webob
-Requires:	python-passlib
+Requires:       python-webob1.0
+Requires:       python-passlib
+Requires:       python-setuptools
 
 Requires(post):   chkconfig
 Requires(postun): initscripts
@@ -60,6 +65,7 @@ Services included are:
 
 %prep
 %setup -q -n keystone-%{version}
+%patch0 -p1 -b .newdeps
 
 # log_file is ignored, use log_dir instead
 # https://bugs.launchpad.net/keystone/+bug/844959/comments/3


More information about the scm-commits mailing list