From f54e06b612a6fdf04827ae32503dac5a7da5eb4e Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Wed, 13 Nov 2013 16:01:40 -0500 Subject: Update RPM spec file Update the RPM file with the comments from submittal spec file to the Fedora Project. This update also differntiates between the project name 'gluster-swift' and the Fedora distribution name 'glusterfs-openstack-swift'. This simple changes makes it less confusing when downloading the source on http://launchpad.net/gluster-swift . For more information on the Fedora Project submittal status please see: https://bugzilla.redhat.com/show_bug.cgi?id=1003089 This fix also creates a tar.gz source file so that Jenkins can archive it. This can be used for distributions other than RPM based systems. Change-Id: Ia9b85d53cf576a7754aaa018396adb70cb0f2855 Signed-off-by: Luis Pabon Reviewed-on: http://review.gluster.org/6261 Reviewed-by: Thiago Da Silva Tested-by: Thiago Da Silva --- glusterfs-openstack-swift.spec | 47 +++++++++++++----------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) (limited to 'glusterfs-openstack-swift.spec') diff --git a/glusterfs-openstack-swift.spec b/glusterfs-openstack-swift.spec index 4bec454..0faba2b 100644 --- a/glusterfs-openstack-swift.spec +++ b/glusterfs-openstack-swift.spec @@ -1,19 +1,3 @@ -############################################################################################################ -# 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 @@ -29,10 +13,10 @@ Name : %{_name} Version : %{_version} Release : %{_release}%{?dist} Group : Application/File -Vendor : Red Hat, Inc. +URL : http://launchpad.net/gluster-swift +Vendor : Fedora Project Source0 : %{_name}-%{_version}-%{_release}.tar.gz -Packager : gluster-users@gluster.org -License : Apache +License : ASL 2.0 BuildArch: noarch BuildRequires: python BuildRequires: python-setuptools @@ -44,6 +28,7 @@ Requires : openstack-swift-account = 1.10.0 Requires : openstack-swift-container = 1.10.0 Requires : openstack-swift-object = 1.10.0 Requires : openstack-swift-proxy = 1.10.0 +Requires : glusterfs-api >= 3.4.1 Obsoletes: glusterfs-swift-plugin Obsoletes: glusterfs-swift Obsoletes: glusterfs-ufo @@ -60,7 +45,7 @@ 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 +%setup -q -n gluster_swift-%{_version} %build %{__python} setup.py build @@ -73,20 +58,16 @@ rm -rf %{buildroot} mkdir -p %{buildroot}/%{_confdir}/ cp -r etc/* %{buildroot}/%{_confdir}/ -mkdir -p %{buildroot}/%{_bindir}/ -cp bin/gluster-swift-gen-builders %{buildroot}/%{_bindir}/ -cp bin/gluster-swift-print-metadata %{buildroot}/%{_bindir}/ - # Remove tests %{__rm} -rf %{buildroot}/%{python_sitelib}/test -%clean -rm -rf %{buildroot} +# Remove files provided by glusterfs-api +%{__rm} -rf %{buildroot}/%{python_sitelib}/gluster/__init__.p* %files %defattr(-,root,root) %{python_sitelib}/gluster -%{python_sitelib}/gluster_swift-%{version}-*.egg-info +%{python_sitelib}/gluster_swift-%{_version}_*.egg-info %{_bindir}/gluster-swift-gen-builders %{_bindir}/gluster-swift-print-metadata %{_bindir}/swauth-add-account @@ -99,12 +80,12 @@ rm -rf %{buildroot} %{_bindir}/swauth-set-account-service %dir %{_confdir} -%config %{_confdir}/account-server.conf-gluster -%config %{_confdir}/container-server.conf-gluster -%config %{_confdir}/object-server.conf-gluster -%config %{_confdir}/swift.conf-gluster -%config %{_confdir}/proxy-server.conf-gluster -%config %{_confdir}/fs.conf-gluster +%config(noreplace) %{_confdir}/account-server.conf-gluster +%config(noreplace) %{_confdir}/container-server.conf-gluster +%config(noreplace) %{_confdir}/object-server.conf-gluster +%config(noreplace) %{_confdir}/swift.conf-gluster +%config(noreplace) %{_confdir}/proxy-server.conf-gluster +%config(noreplace) %{_confdir}/fs.conf-gluster %changelog * Mon Oct 28 2013 Luis Pabon - 1.10.1-0 -- cgit