[python-django-sahara] adding patch to remove pbr runtime dep

Michael McCune mimccune at fedoraproject.org
Mon May 5 17:04:23 UTC 2014


commit 05d954f6ae8a3e3770108542ac65baf689823555
Author: Michael McCune <mimccune at redhat.com>
Date:   Mon May 5 13:04:36 2014 -0400

    adding patch to remove pbr runtime dep

 0001-remove-runtime-dep-on-python-pbr.patch |   21 +++++++++++++++++++++
 python-django-sahara.spec                   |   15 ++++++++++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/0001-remove-runtime-dep-on-python-pbr.patch b/0001-remove-runtime-dep-on-python-pbr.patch
new file mode 100644
index 0000000..58d0cd6
--- /dev/null
+++ b/0001-remove-runtime-dep-on-python-pbr.patch
@@ -0,0 +1,21 @@
+--- saharadashboard/version.py	2014-05-05 09:18:09.682115488 -0400
++++ saharadashboard/version.py	2014-05-05 09:34:46.248635372 -0400
+@@ -13,6 +13,16 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ 
+-from pbr import version
+ 
+-version_info = version.VersionInfo('sahara-dashboard')
++class VersionInfo(object):
++    release = 'REDHAT_SAHARADASHBOARD_RELEASE'
++    version = 'REDHAT_SAHARADASHBOARD_VERSION'
++
++    def version_string(self):
++        return self.version
++
++    def release_string(self):
++        return self.release
++
++
++version_info = VersionInfo()
diff --git a/python-django-sahara.spec b/python-django-sahara.spec
index 1a801ba..8838950 100644
--- a/python-django-sahara.spec
+++ b/python-django-sahara.spec
@@ -14,13 +14,14 @@
 
 Name:          python-django-sahara
 Version:       2014.1.0
-Release:       2%{?dist}
+Release:       3%{?dist}
 Provides:      python-django-savanna = %{version}-%{release}
 Obsoletes:     python-django-savanna <= 2014.1.b3-3
 Summary:       Sahara project dashboard
 License:       ASL 2.0
 URL:           https://launchpad.net/sahara
 Source0:       http://tarballs.openstack.org/sahara-dashboard/sahara-dashboard-%{tmp_upstream_version}.tar.gz
+Patch0001:     0001-remove-runtime-dep-on-python-pbr.patch
 BuildArch:     noarch
 
 BuildRequires: python-pbr
@@ -38,6 +39,12 @@ Sahara plugin for the OpenStack Dashboard.
 
 %prep
 %setup -q -n sahara-dashboard-%{tmp_upstream_version}
+
+%patch0001 -p0
+
+sed -i s/REDHAT_SAHARADASHBOARD_VERSION/%{version}/ saharadashboard/version.py
+sed -i s/REDHAT_SAHARADASHBOARD_RELEASE/%{release}/ saharadashboard/version.py
+
 rm -rf sahara_dashboard.egg-info
 rm -rf saharadashboard/tests
 
@@ -62,6 +69,12 @@ cp -rp saharadashboard/templates %{buildroot}%{python_sitelib}/saharadashboard
 
 
 %changelog
+* Mon May 05 2014 Michael McCune <mimccune at redhat> - 2014.1.0-4
+- Changing version/release temp variable from patch
+
+* Mon May 05 2014 Michael McCune <mimccune at redhat> - 2014.1.0-3
+- Adding patch to remove runtime pbr dep
+
 * Fri May 02 2014 Michael McCune <mimccune at redhat> - 2014.1.0-2
 - Copying html templates to final output
 - Removing tests from final output


More information about the scm-commits mailing list