From 952a240852c2e8d528a0d73c3fd5a229d396282c Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Tue, 14 May 2013 15:50:49 -0400 Subject: 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 Reviewed-on: http://review.gluster.org/5006 Reviewed-by: Peter Portante Reviewed-by: Kaleb KEITHLEY Tested-by: Kaleb KEITHLEY --- gluster/swift/__init__.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'gluster') 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 -- cgit