summaryrefslogtreecommitdiffstats
path: root/glusterfs-openstack-swift.spec
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 /glusterfs-openstack-swift.spec
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 'glusterfs-openstack-swift.spec')
-rw-r--r--glusterfs-openstack-swift.spec87
1 files changed, 87 insertions, 0 deletions
diff --git a/glusterfs-openstack-swift.spec b/glusterfs-openstack-swift.spec
new file mode 100644
index 0000000..f9b8643
--- /dev/null
+++ b/glusterfs-openstack-swift.spec
@@ -0,0 +1,87 @@
+############################################################################################################
+# Command to build rpms.#
+# $ rpmbuild -ta %{name}-%{version}-%{release}.tar.gz #
+############################################################################################################
+# Setting up the environment. #
+# * Create a directory %{name}-%{version} under $HOME/rpmbuild/SOURCES #
+# * Copy the contents of gluster directory into $HOME/rpmbuild/SOURCES/%{name}-%{version} #
+# * tar zcvf %{name}-%{version}-%{release}.tar.gz $HOME/rpmbuild/SOURCES/%{name}-%{version} %{name}.spec #
+# For more information refer #
+# http://fedoraproject.org/wiki/How_to_create_an_RPM_package #
+############################################################################################################
+
+%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%endif
+
+%define _confdir %{_sysconfdir}/swift
+
+# The following values are provided by passing the following arguments
+# to rpmbuild. For example:
+# --define "_version 1.0" --define "_release 1" --define "_name g4s"
+#
+%{!?_version:%define _version XXX}
+%{!?_release:%define _release XXX}
+%{!?_name:%define _name XXX}
+
+Summary : GlusterFS Integration with OpenStack Object Storage (Swift).
+Name : %{_name}
+Version : %{_version}
+Release : %{_release}
+Group : Application/File
+Vendor : Red Hat Inc.
+Source0 : %{name}-%{version}-%{release}.tar.gz
+Packager : gluster-users@gluster.org
+License : Apache
+BuildArch: noarch
+Requires : memcached
+Requires : openssl
+Requires : python
+Requires : openstack-swift >= 1.8.0
+Requires : openstack-swift-account >= 1.8.0
+Requires : openstack-swift-container >= 1.8.0
+Requires : openstack-swift-object >= 1.8.0
+Requires : openstack-swift-proxy >= 1.8.0
+
+%description
+Gluster-For-Swift (G4S, pronounced "gee-force") integrates GlusterFS as an
+alternative back end for OpenStack Object Storage (Swift) leveraging the
+existing front end OpenStack Swift code. Gluster volumes are used to store
+objects in files, containers are maintained as top-level directories of volumes,
+where accounts are mapped one-to-one to gluster volumes.
+
+%prep
+%setup -q
+
+%build
+%{__python} setup.py build
+
+%install
+rm -rf %{buildroot}
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+mkdir -p %{buildroot}/%{_confdir}/
+cp -r etc/* %{buildroot}/%{_confdir}/
+
+mkdir -p %{buildroot}/%{_bindir}/
+cp bin/gluster-swift-gen-builders %{buildroot}/%{_bindir}/
+
+# Remove tests
+%{__rm} -rf %{buildroot}/%{python_sitelib}/test
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root)
+%{python_sitelib}/gluster
+%{python_sitelib}/gluster_swift-%{version}-*.egg-info
+%{_bindir}/gluster-swift-gen-builders
+%dir %{_confdir}
+%config %{_confdir}/account-server/1.conf-gluster
+%config %{_confdir}/container-server/1.conf-gluster
+%config %{_confdir}/object-server/1.conf-gluster
+%config %{_confdir}/swift.conf-gluster
+%config %{_confdir}/proxy-server.conf-gluster
+%config %{_confdir}/fs.conf-gluster