swiftonfile/swift/1.4.8/gluster-swift-plugin.spec
Peter Portante 3ad78098b5 object-storage: Refactor code to reduce Swift diffs carried
The upstream Swift code base contains the following commit which adds the
ability to modify constraint values using the swift.conf file:

 a2ac5efaa6

These changes rely on the above commit being back-ported to Swift 1.4.8 (see
fc2421b040).

As a result, a good number of differences we carry can be removed, since the
provided swift.conf file now contains the values we need.

Along with these changes, we add middleware to get constraints loaded properly
(via monkey patching) until subclassing is implemented in a future commit. We
further simplify the diffs to a minimal set by storing the timestamp in file
system metadata and moving new files to the plugins/middleware directory.

Note that the original "gluster" middleware was in the swift.diff file, and
has been renamed to "glusterfs" and moved to the new plugins/middleware
directory. The "gluster" middleware is now a temporary way to get the
constraints properly loaded (both of these middleware pieces should disappear
in future commits when we refactor further to subclass the Swift objects
instead of patching them).

Change-Id: I9dc00d6b6cdd64e277896d75c2fb06431c3e69cb
BUG: 862052
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/4093
Tested-by: Peter Portante <pportant@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-04-29 16:35:55 -04:00

66 lines
2.4 KiB
RPMSpec

############################################################################################################
# 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 plugins 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 #
############################################################################################################
%define _confdir /etc/swift
%define _swiftdir /usr/lib/python2.6/site-packages/swift
%define _ufo_version 1.0
%define _ufo_release 5
Summary : GlusterFS Unified File and Object Storage.
Name : gluster-swift-plugin
Version : %{_ufo_version}
Release : %{_ufo_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 : gluster-swift
%description
Gluster Unified File and Object Storage unifies NAS and object storage
technology. This provides a system for data storage that enables users to access
the same data as an object and as a file, simplifying management and controlling
storage costs.
%prep
%setup -q
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_swiftdir}/plugins/middleware
mkdir -p %{buildroot}/%{_confdir}/
cp constraints.py %{buildroot}/%{_swiftdir}/plugins
cp DiskDir.py %{buildroot}/%{_swiftdir}/plugins
cp DiskFile.py %{buildroot}/%{_swiftdir}/plugins
cp Glusterfs.py %{buildroot}/%{_swiftdir}/plugins
cp __init__.py %{buildroot}/%{_swiftdir}/plugins
cp utils.py %{buildroot}/%{_swiftdir}/plugins
cp middleware/__init__.py %{buildroot}/%{_swiftdir}/plugins/middleware
cp middleware/gluster.py %{buildroot}/%{_swiftdir}/plugins/middleware
cp middleware/glusterfs.py %{buildroot}/%{_swiftdir}/plugins/middleware
cp -r conf/* %{buildroot}/%{_confdir}/
%files
%defattr(-,root,root)
%{_swiftdir}/plugins/middleware
%{_swiftdir}/plugins
%{_confdir}/