[openstack-nova/el6-havana] Add a dep to python-six and fix version reporting

Nikola Dipanov ndipanov at fedoraproject.org
Mon Jun 10 13:13:43 UTC 2013


commit 16e42e52da5f83630d6ef0552de13ca2c72ba074
Author: Nikola Dipanov <ndipanov at redhat.com>
Date:   Mon Jun 10 13:05:57 2013 +0200

    Add a dep to python-six and fix version reporting

 0002-Remove-a-run-time-dep-on-python-pbr.patch     |  101 --------------------
 ...emove-a-runtime-dep-on-python-pbr-package.patch |   63 ++++++++++++
 openstack-nova.spec                                |   12 ++-
 3 files changed, 72 insertions(+), 104 deletions(-)
---
diff --git a/0002-Remove-a-runtime-dep-on-python-pbr-package.patch b/0002-Remove-a-runtime-dep-on-python-pbr-package.patch
new file mode 100644
index 0000000..348aed4
--- /dev/null
+++ b/0002-Remove-a-runtime-dep-on-python-pbr-package.patch
@@ -0,0 +1,63 @@
+From 539ba73977ef8afcde317b611b798a21406dac27 Mon Sep 17 00:00:00 2001
+From: Nikola Dipanov <ndipanov at redhat.com>
+Date: Mon, 10 Jun 2013 12:46:42 +0200
+Subject: [PATCH] Remove a runtime dep on python-pbr package
+
+Also patch it out when building docs to have consistent versioning
+---
+ doc/source/conf.py | 8 ++++++--
+ nova/version.py    | 9 +++------
+ 2 files changed, 9 insertions(+), 8 deletions(-)
+
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+index 85e2629..699728f 100644
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -63,11 +63,15 @@ copyright = u'2010-present, OpenStack Foundation'
+ # |version| and |release|, also used in various other places throughout the
+ # built documents.
+ #
+-from nova.version import version_info
++from nova.version import version_string
++import pbr.version
++
++version_info = pbr.version.VersionInfo('nova')
++
+ # The full version, including alpha/beta/rc tags.
+ release = version_info.release_string()
+ # The short X.Y version.
+-version = version_info.version_string()
++version = version_string
+ 
+ # The language for content autogenerated by Sphinx. Refer to documentation
+ # for a list of supported languages.
+diff --git a/nova/version.py b/nova/version.py
+index f954ef3..7c38a77 100644
+--- a/nova/version.py
++++ b/nova/version.py
+@@ -14,15 +14,12 @@
+ #    License for the specific language governing permissions and limitations
+ #    under the License.
+ 
+-import pbr.version
+-
+ NOVA_VENDOR = "OpenStack Foundation"
+ NOVA_PRODUCT = "OpenStack Nova"
+ NOVA_PACKAGE = None  # OS distro package version suffix
+ 
+ loaded = False
+-version_info = pbr.version.VersionInfo('nova')
+-version_string = version_info.version_string
++version_string = "REDHATNOVAVERSION"
+ 
+ 
+ def _load_config():
+@@ -85,6 +82,6 @@ def package_string():
+ 
+ def version_string_with_package():
+     if package_string() is None:
+-        return version_info.version_string()
++        return version_string
+     else:
+-        return "%s-%s" % (version_info.version_string(), package_string())
++        return "%s-%s" % (version_string, package_string())
diff --git a/openstack-nova.spec b/openstack-nova.spec
index ab6fce7..8998c6b 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -2,7 +2,7 @@
 
 Name:             openstack-nova
 Version:          2013.2
-Release:          0.1.h1%{?dist}
+Release:          0.2.h1%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
@@ -48,7 +48,7 @@ Source22:         nova-ifc-template
 # patches_base=2013.2.b1
 #
 Patch0001: 0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
-Patch0002: 0002-Remove-a-run-time-dep-on-python-pbr.patch
+Patch0002: 0002-Remove-a-runtime-dep-on-python-pbr-package.patch
 
 # This is EPEL specific and not upstream
 Patch100:         openstack-nova-newdeps.patch
@@ -356,6 +356,7 @@ Requires:         python-quantumclient >= 1:2
 Requires:         python-novaclient
 Requires:         python-oslo-config
 Requires:         python-pyasn1
+Requires:         python-six
 
 %description -n   python-nova
 OpenStack Compute (codename Nova) is open source software designed to
@@ -399,6 +400,7 @@ find . \( -name .gitignore -o -name .placeholder \) -delete
 find nova -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
 
 sed -i '/setuptools_git/d' setup.py
+sed -i s/REDHATNOVAVERSION/%{version}/ nova/version.py
 
 %build
 %{__python} setup.py build
@@ -814,7 +816,11 @@ fi
 %endif
 
 %changelog
-* Fri Jun 7 2013 Nikola Đipanov <ndipanov at redhat.com> - 2013.2-0.1.h1
+* Mon Jun 10 2013 Nikola Đipanov <ndipanov at redhat.com> - 2013.2-0.2.h1
+- Add a runtime dep on python-six
+- Fix verision reporting
+
+* Fri Jun 07 2013 Nikola Đipanov <ndipanov at redhat.com> - 2013.2-0.1.h1
 - Update to Havana milestone 1
 
 * Fri May 31 2013 Pádraig Brady <pbrady at redhat.com> - 2013.1.1-3


More information about the scm-commits mailing list