[openstack-nova] Update to Havana milestone 1

Nikola Dipanov ndipanov at fedoraproject.org
Fri Jun 7 15:04:29 UTC 2013


commit e113d45be4bf5a68752486ce535bde1e8f7c0b22
Author: Nikola Dipanov <ndipanov at redhat.com>
Date:   Thu Jun 6 21:06:58 2013 +0200

    Update to Havana milestone 1

 .gitignore                                         |    1 +
 ...e-don-t-access-the-net-when-building-docs.patch |    2 +-
 ...COW2-image-size-during-root-disk-creation.patch |   93 ------------------
 0002-Remove-a-run-time-dep-on-python-pbr.patch     |  101 ++++++++++++++++++++
 openstack-nova.spec                                |   21 +++--
 sources                                            |    2 +-
 6 files changed, 117 insertions(+), 103 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0d8008d..d3d9d1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
 /nova-2013.1.rc2.tar.gz
 /nova-2013.1.tar.gz
 /nova-2013.1.1.tar.gz
+/nova-2013.2.b1.tar.gz
diff --git a/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch b/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
index a0a40f5..6266729 100644
--- a/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
+++ b/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
@@ -1,4 +1,4 @@
-From f4b2590206c9fd3f9c03a2340f5795b7c742688b Mon Sep 17 00:00:00 2001
+From 03b5119fc08fc535fbd8a6a14279033d9547f382 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Fri, 6 Jan 2012 12:16:34 +0000
 Subject: [PATCH] Ensure we don't access the net when building docs
diff --git a/0002-Remove-a-run-time-dep-on-python-pbr.patch b/0002-Remove-a-run-time-dep-on-python-pbr.patch
new file mode 100644
index 0000000..ac4c614
--- /dev/null
+++ b/0002-Remove-a-run-time-dep-on-python-pbr.patch
@@ -0,0 +1,101 @@
+From 460542f6b383b0f207a951f6c02f77fc1ff8a724 Mon Sep 17 00:00:00 2001
+From: Nikola Dipanov <ndipanov at redhat.com>
+Date: Fri, 7 Jun 2013 16:24:07 +0200
+Subject: [PATCH] Remove a run-time dep on python-pbr
+
+---
+ nova/version.py | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 73 insertions(+), 2 deletions(-)
+
+diff --git a/nova/version.py b/nova/version.py
+index f954ef3..bb25cad 100644
+--- a/nova/version.py
++++ b/nova/version.py
+@@ -14,14 +14,85 @@
+ #    License for the specific language governing permissions and limitations
+ #    under the License.
+ 
+-import pbr.version
++import pkg_resources
+ 
+ NOVA_VENDOR = "OpenStack Foundation"
+ NOVA_PRODUCT = "OpenStack Nova"
+ NOVA_PACKAGE = None  # OS distro package version suffix
+ 
++
++class VersionInfo(object):
++
++    def __init__(self, package):
++        """Object that understands versioning for a package
++        :param package: name of the python package, such as glance, or
++                        python-glanceclient
++        """
++        self.package = package
++        self.release = None
++        self.version = None
++        self._cached_version = None
++
++    def __str__(self):
++        """Make the VersionInfo object behave like a string."""
++        return self.version_string()
++
++    def __repr__(self):
++        """Include the name."""
++        return "VersionInfo(%s:%s)" % (self.package, self.version_string())
++
++    def _get_version_from_pkg_resources(self):
++        """Get the version of the package from the pkg_resources record
++        associated with the package.
++        """
++        try:
++            requirement = pkg_resources.Requirement.parse(self.package)
++            provider = pkg_resources.get_provider(requirement)
++            return provider.version
++        except pkg_resources.DistributionNotFound:
++            # The most likely cause for this is running tests in a tree
++            # produced from a tarball where the package itself has not been
++            # installed into anything. Revert to setup-time logic.
++            from pbr import packaging
++            return packaging.get_version(self.package)
++
++    def release_string(self):
++        """Return the full version of the package including suffixes indicating
++        VCS status.
++        """
++        if self.release is None:
++            self.release = self._get_version_from_pkg_resources()
++
++        return self.release
++
++    def version_string(self):
++        """Return the short version minus any alpha/beta tags."""
++        if self.version is None:
++            parts = []
++            for part in self.release_string().split('.'):
++                if part[0].isdigit():
++                    parts.append(part)
++                else:
++                    break
++            self.version = ".".join(parts)
++
++        return self.version
++
++    def cached_version_string(self, prefix=""):
++        """Generate an object which will expand in a string context to
++        the results of version_string(). We do this so that don't
++        call into pkg_resources every time we start up a program when
++        passing version information into the CONF constructor, but
++        rather only do the calculation when and if a version is requested
++        """
++        if not self._cached_version:
++            self._cached_version = "%s%s" % (prefix,
++                                             self.version_string())
++        return self._cached_version
++
++
+ loaded = False
+-version_info = pbr.version.VersionInfo('nova')
++version_info = VersionInfo('nova')
+ version_string = version_info.version_string
+ 
+ 
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 42b3a83..753a19e 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -1,14 +1,14 @@
 %global with_doc %{!?_without_doc:1}%{?_without_doc:0}
 
 Name:             openstack-nova
-Version:          2013.1.1
-Release:          2%{?dist}
+Version:          2013.2
+Release:          0.1.h1%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
 License:          ASL 2.0
 URL:              http://openstack.org/projects/compute/
-Source0:          https://launchpad.net/nova/grizzly/2013.1/+download/nova-%{version}.tar.gz
+Source0:	  https://launchpad.net/nova/havana/havana-1/+download/nova-%{version}.b1.tar.gz
 
 Source1:          nova.conf
 Source6:          nova.logrotate
@@ -33,10 +33,10 @@ Source22:         nova-ifc-template
 Source24:         nova-sudoers
 
 #
-# patches_base=2013.1.1
+# patches_base=2013.2.b1
 #
 Patch0001: 0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
-Patch0002: 0002-Check-QCOW2-image-size-during-root-disk-creation.patch
+Patch0002: 0002-Remove-a-run-time-dep-on-python-pbr.patch
 
 BuildArch:        noarch
 BuildRequires:    intltool
@@ -44,6 +44,8 @@ BuildRequires:    python-sphinx
 BuildRequires:    python-setuptools
 BuildRequires:    python-netaddr
 BuildRequires:    openstack-utils
+BuildRequires:    python-pbr
+BuildRequires:    python-d2to1
 
 Requires:         openstack-nova-compute = %{version}-%{release}
 Requires:         openstack-nova-cert = %{version}-%{release}
@@ -357,7 +359,7 @@ This package contains documentation files for nova.
 %endif
 
 %prep
-%setup -q -n nova-%{version}
+%setup -q -n nova-%{version}.b1
 
 %patch0001 -p1
 %patch0002 -p1
@@ -368,8 +370,6 @@ find nova -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
 
 sed -i '/setuptools_git/d' setup.py
 
-sed -i s/LOCALBRANCH:LOCALREVISION/%{release}/ nova/version.py
-
 %build
 %{__python} setup.py build
 
@@ -793,6 +793,11 @@ fi
 %endif
 
 %changelog
+* Fri Jun 7 2013 Nikola Đipanov <ndipanov at redhat.com> - 2013.2-0.1.h1
+- Update to Havana milestone 1
+- Add a build-time dep on python-d2to1
+- Add a build-time dep on python-pbr
+
 * Fri May 17 2013 Nikola Đipanov <ndipanov at redhat.com> - 2013.1-2
 - Check QCOW2 image size during root disk creation (CVE-2013-2096)
 
diff --git a/sources b/sources
index aada8c0..7ce661a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-13636df2a0e357237791e1a2153b91c4  nova-2013.1.1.tar.gz
+e3e5e75c50ac44a48f8f233d2d025389  nova-2013.2.b1.tar.gz


More information about the scm-commits mailing list