path: root/gluster
diff options
authorLuis Pabon <>2013-05-14 15:50:49 -0400
committerPeter Portante <>2013-05-17 04:36:41 -0700
commit952a240852c2e8d528a0d73c3fd5a229d396282c (patch)
tree5856daa1169969252f772a4093c339e3db813361 /gluster
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: 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 <> Reviewed-on: Reviewed-by: Peter Portante <> Reviewed-by: Kaleb KEITHLEY <> Tested-by: Kaleb KEITHLEY <>
Diffstat (limited to 'gluster')
1 files changed, 17 insertions, 6 deletions
diff --git a/gluster/swift/ b/gluster/swift/
index ef350fd..14bb4e8 100644
--- a/gluster/swift/
+++ b/gluster/swift/
@@ -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
+ = name = 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" %
+ fd.write("PKG_VERSION=%s\n" % self.canonical_version)
def pretty_version(self):
@@ -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