summaryrefslogtreecommitdiffstats
path: root/gluster/swift
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-05-14 15:50:49 -0400
committerPeter Portante <pportant@redhat.com>2013-05-17 04:36:41 -0700
commit952a240852c2e8d528a0d73c3fd5a229d396282c (patch)
tree5856daa1169969252f772a4093c339e3db813361 /gluster/swift
parent99d0250a571f30cfb40e6657cb0cfa5eccf71a25 (diff)
rpm: Enable creation of RPMs
This is the first step. I have confirmed that I can install, update, and remove. I have also setup the ability for Jenkins to pass the BuildNumber and use that value as the release number for the RPM. The RPM depends on Grizzly(1.8.0) Swift from OpenStack. To verify you may need to add the appropiate repo file to your Fedora/RHEL system: http://repos.fedorapeople.org/repos/openstack/openstack-grizzly I have not had the opportunity to test that G4S itself works once installed, but I plan on doing that as the next phase. Change-Id: Ib90f335f5e1e4fc552c32e00ff29b6e8a680c42a Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/5006 Reviewed-by: Peter Portante <pportant@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'gluster/swift')
-rw-r--r--gluster/swift/__init__.py23
1 files changed, 17 insertions, 6 deletions
diff --git a/gluster/swift/__init__.py b/gluster/swift/__init__.py
index ef350fd..14bb4e8 100644
--- a/gluster/swift/__init__.py
+++ b/gluster/swift/__init__.py
@@ -1,10 +1,18 @@
-""" Gluster Swift UFO """
+""" Gluster for Swift """
-class Version(object):
- def __init__(self, canonical_version, final):
+class PkgInfo(object):
+ def __init__(self, canonical_version, name, final):
self.canonical_version = canonical_version
+ self.name = name
self.final = final
+ def save_config(self, filename):
+ """Crates a file with the package configuration
+ which can be sourced by a bash script"""
+ with open(filename, 'w') as fd:
+ fd.write("PKG_NAME=%s\n" % self.name)
+ fd.write("PKG_VERSION=%s\n" % self.canonical_version)
+
@property
def pretty_version(self):
if self.final:
@@ -13,6 +21,9 @@ class Version(object):
return '%s-dev' % (self.canonical_version,)
-_version = Version('1.1', False)
-__version__ = _version.pretty_version
-__canonical_version__ = _version.canonical_version
+###
+### Change the Package version here
+###
+_pkginfo = PkgInfo('1.8.0', 'glusterfs-openstack-swift', False)
+__version__ = _pkginfo.pretty_version
+__canonical_version__ = _pkginfo.canonical_version