GlusterFS 3.4.0-0.1.qa3

This commit is contained in:
Kaleb S. KEITHLEY 2013-12-06 12:17:32 -05:00
parent 43f3a1f020
commit 9c4f918d06
2 changed files with 143 additions and 31 deletions

View File

@ -1,10 +1,9 @@
%global _hardened_build 1
%global _for_fedora_koji_builds 1
# uncomment and add '%' to use the prereltag for pre-releases
# %%global prereltag rc1
%global prereltag qa3
# if you wish to compile an rpm without rdma support, compile like this...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without rdma
@ -31,6 +30,15 @@
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without ocf
%{?_without_ocf:%global _without_ocf --without-ocf}
# if you wish to build rpms without syslog logging, compile like this
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@tar.gz --without syslog
%{?_without_syslog:%global _without_syslog --disable-syslog}
# disable syslog forcefully as rhel <= 6 doesn't have rsyslog or rsyslog-mmcount
%if ( 0%{?rhel} && 0%{?rhel} <= 6 )
%global _without_syslog --disable-syslog
%endif
# there is no systemtap support! Perhaps some day there will be
%global _without_systemtap --enable-systemtap=no
@ -42,15 +50,30 @@
%define _without_bd --disable-bd-xlator
%endif
# if you wish to compile an rpm without the qemu-block support...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without qemu-block
%{?_without_qemu_block:%global _without_qemu_block --disable-qemu-block}
%if ( 0%{?rhel} && 0%{?rhel} < 6 )
# xlators/features/qemu-block fails to build on RHEL5, disable it
%define _without_qemu_block --disable-qemu-block
%endif
%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
%global _with_systemd true
%endif
# From https://fedoraproject.org/wiki/Packaging:Python#Macros
%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
Summary: Cluster File System
%if ( 0%{_for_fedora_koji_builds} )
Name: glusterfs
Version: 3.4.1
Release: 3%{?prereltag:.%{prereltag}}%{?dist}
Version: 3.5.0
Release: 0.1%{?prereltag:.%{prereltag}}%{?dist}
Vendor: Fedora Project
%else
Name: @PACKAGE_NAME@
@ -62,7 +85,7 @@ License: GPLv2 or LGPLv3+
Group: System Environment/Base
URL: http://www.gluster.org/docs/index.php/GlusterFS
%if ( 0%{_for_fedora_koji_builds} )
Source0: http://download.gluster.org/pub/gluster/glusterfs/3.4/%{version}%{?prereltag}/glusterfs-%{version}%{?prereltag}.tar.gz
Source0: http://download.gluster.org/pub/gluster/glusterfs/qa-releases/%{version}%{prereltag}/glusterfs-%{version}%{?prereltag}.tar.gz
Source1: glusterd.sysconfig
Source2: glusterfsd.sysconfig
Source3: glusterfs-fuse.logrotate
@ -71,16 +94,15 @@ Source5: glusterfsd.logrotate
Source6: rhel5-load-fuse-modules
Source11: glusterfsd.service
Source13: glusterfsd.init
Patch0: %{name}-3.2.5.configure.ac.patch
Patch1: %{name}-3.3.0.libglusterfs.Makefile.patch
Patch2: %{name}-3.3.1.rpc.rpcxprt.rdma.name.c.patch
Patch3: %{name}-3.4.1.add.base-port.config.option.patch
%else
Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
%endif
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
BuildRequires: python-simplejson
%endif
%if ( 0%{?_with_systemd:1} )
%if ( 0%{_for_fedora_koji_builds} )
%global glusterfsd_service %{S:%{SOURCE11}}
@ -129,15 +151,18 @@ BuildRequires: systemtap-sdt-devel
%if ( 0%{!?_without_bd:1} )
BuildRequires: lvm2-devel
%endif
%if ( 0%{!?_without_qemu_block:1} )
BuildRequires: glib2-devel
%endif
Obsoletes: hekafs
Obsoletes: %{name}-libs <= 2.0.0
Obsoletes: %{name}-common < %{version}-%{release}
Obsoletes: %{name}-core < %{version}-%{release}
Obsoletes: %{name}-ufo
Provides: %{name}-libs = %{version}-%{release}
Provides: %{name}-common = %{version}-%{release}
Provides: %{name}-core = %{version}-%{release}
Obsoletes: %{name}-ufo
# We do not want to generate useless provides and requires for xlator .so files
# Filter all generated:
@ -156,6 +181,11 @@ Provides: %{name}-core = %{version}-%{release}
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%if ( 0%{?rhel} && 0%{?rhel} < 6 )
# _sharedstatedir is not provided by RHEL5
%define _sharedstatedir /var/lib
%endif
%description
GlusterFS is a clustered file-system capable of scaling to several
petabytes. It aggregates various storage bricks over Infiniband RDMA
@ -172,6 +202,14 @@ both GlusterFS server and client framework.
%package libs
Summary: GlusterFS common libraries
Group: Applications/File
%if ( 0%{!?_without_syslog:1} )
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
Requires: rsyslog-mmjsonparse
%endif
%if ( 0%{?rhel} && 0%{?rhel} == 6 )
Requires: rsyslog-mmcount
%endif
%endif
%description libs
GlusterFS is a clustered file-system capable of scaling to several
@ -226,6 +264,7 @@ Summary: GlusterFS Geo-replication
Group: Applications/File
Requires: %{name} = %{version}-%{release}
Requires: %{name}-server = %{version}-%{release}
Requires: python python-ctypes
%description geo-replication
GlusterFS is a clustered file-system capable of scaling to several
@ -288,6 +327,9 @@ This package provides the glusterfs server daemon.
Summary: Clustered file-system api library
Group: System Environment/Daemons
Requires: %{name} = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
# we provide the Python package/namespace 'gluster'
Provides: python-gluster = %{version}-%{release}
%description api
GlusterFS is a clustered file-system capable of scaling to several
@ -366,20 +408,34 @@ is in user space and easily manageable.
This package provides the api include files.
%package regression-tests
Summary: Development Tools
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Requires: %{name}-fuse = %{version}-%{release}
Requires: %{name}-server = %{version}-%{release}
Requires: perl(App::Prove) perl(Test::Harness) gcc util-linux-ng lvm2
Requires: python attr dbench git nfs-utils xfsprogs
%description regression-tests
The Gluster Test Framework, is a suite of scripts used for
regression testing of Gluster.
%prep
%setup -q -n %{name}-%{version}%{?prereltag}
%if ( 0%{_for_fedora_koji_builds} )
#%patch0 -p0
%patch1 -p0 -F4
%if ( "%{version}" == "3.3.1" )
%patch2 -p1
%endif
%patch3 -p1
%endif
%build
./autogen.sh
%configure %{?_without_rdma} %{?_without_epoll} %{?_without_fusermount} %{?_without_georeplication} %{?_without_ocf} %{?_without_bd} %{?_without_systemtap}
%configure \
%{?_without_rdma} \
%{?_without_epoll} \
%{?_without_fusermount} \
%{?_without_georeplication} \
%{?_without_ocf} \
%{?_without_syslog} \
%{?_without_bd} \
%{?_without_qemu_block} \
%{?_without_systemtap}
# fix hardening and remove rpath in shlibs
%if ( 0%{?fedora} && 0%{?fedora} > 17 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
@ -390,9 +446,17 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|' libtool
make %{?_smp_mflags}
pushd api/examples
FLAGS="$RPM_OPT_FLAGS" python setup.py build
popd
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# install the gfapi Python library in /usr/lib/python*/site-packages
pushd api/examples
python setup.py install --skip-build --verbose --root %{buildroot}
popd
# Install include directory
mkdir -p %{buildroot}%{_includedir}/glusterfs
install -p -m 0644 libglusterfs/src/*.h \
@ -417,10 +481,6 @@ install -D -p -m 0644 %{SOURCE2} \
install -D -p -m 0644 extras/glusterd-sysconfig \
%{buildroot}%{_sysconfdir}/sysconfig/glusterd
%endif
%if ( 0%{?rhel} && 0%{?rhel} > 5 )
mkdir -p %{buildroot}%{python_sitelib}/gluster
touch %{buildroot}%{python_sitelib}/gluster/__init__.py
%endif
%if ( 0%{_for_fedora_koji_builds} )
%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
@ -496,7 +556,26 @@ install -D -p -m 0644 extras/glusterfs-logrotate \
%if ( 0%{!?_without_georeplication:1} )
# geo-rep ghosts
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/geo-replication
touch %{buildroot}%{_sharedstatedir}/glusterd/geo-replication/gsyncd.conf
touch %{buildroot}%{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.conf
install -D -p -m 0644 extras/glusterfs-georep-logrotate \
%{buildroot}%{_sysconfdir}/logrotate.d/glusterfs-georep
%endif
%if ( 0%{!?_without_syslog:1} )
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
install -D -p -m 0644 extras/gluster-rsyslog-7.2.conf \
%{buildroot}%{_sysconfdir}/rsyslog.d/gluster.conf.example
%endif
%if ( 0%{?rhel} && 0%{?rhel} == 6 )
install -D -p -m 0644 extras/gluster-rsyslog-5.8.conf \
%{buildroot}%{_sysconfdir}/rsyslog.d/gluster.conf.example
%endif
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 )
install -D -p -m 0644 extras/logger.conf.example \
%{buildroot}%{_sysconfdir}/glusterfs/logger.conf.example
%endif
%endif
# the rest of the ghosts
@ -525,6 +604,12 @@ mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create/pre
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete/post
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete/pre
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file/post
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file/pre
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create/post
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create/pre
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/glustershd
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/peers
mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/vols
@ -533,19 +618,36 @@ mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/nfs/run
touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/nfs-server.vol
touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid
find ./tests ./run-tests.sh -type f | cpio -pd %{buildroot}%{_prefix}/share/glusterfs
%clean
rm -rf %{buildroot}
%post
/sbin/ldconfig
%if ( 0%{!?_without_syslog:1} )
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 )
%_init_restart rsyslog
%endif
%endif
%postun
/sbin/ldconfig
%if ( 0%{!?_without_syslog:1} )
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 )
%_init_restart rsyslog
%endif
%endif
%files
%doc ChangeLog COPYING-GPLV2 COPYING-LGPLV3 INSTALL README THANKS
%config(noreplace) %{_sysconfdir}/logrotate.d/*
%config(noreplace) %{_sysconfdir}/sysconfig/*
%if ( 0%{!?_without_syslog:1} )
%if ( 0%{?fedora} ) || ( 0%{?rhel} && 0%{?rhel} >= 6 )
%{_sysconfdir}/rsyslog.d/gluster.conf.example
%endif
%endif
%{_libdir}/glusterfs
%{_sbindir}/glusterfs*
%{_mandir}/man8/*gluster*.8*
@ -598,8 +700,11 @@ fi
%files geo-replication
%{_libexecdir}/glusterfs/gsyncd
%{_libexecdir}/glusterfs/python/syncdaemon/*
%{_libexecdir}/glusterfs/gverify.sh
%{_libexecdir}/glusterfs/peer_add_secret_pub
%{_libexecdir}/glusterfs/peer_gsec_create
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/geo-replication
%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/geo-replication/gsyncd.conf
%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/geo-replication/gsyncd_template.conf
%endif
%files fuse
@ -694,9 +799,7 @@ fi
%exclude %{_libdir}/*.so
%{_libdir}/libgfapi.*
%{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/mount/api*
%if ( 0%{?rhel} && 0%{?rhel} > 5 )
%{python_sitelib}/gluster/__init__.p*
%endif
%{python_sitelib}/*
%if ( 0%{!?_without_ocf:1} )
%files resource-agents
@ -713,9 +816,15 @@ fi
%files api-devel
%{_libdir}/pkgconfig/glusterfs-api.pc
%{_libdir}/pkgconfig/libgfchangelog.pc
%{_libdir}/libgfapi.so
%{_includedir}/glusterfs/api/*
%files regression-tests
%defattr(-,root,root,-)
%{_prefix}/share/glusterfs/*
%exclude %{_prefix}/share/glusterfs/tests/basic/rpm.t
%post server
# Legacy server
%_init_enable glusterd
@ -741,7 +850,7 @@ if [ -d /etc/glusterd -a ! -h %{_sharedstatedir}/glusterd ]; then
fi
# Rename old volfiles in an RPM-standard way. These aren't actually
# considered package config files, so %config doesn't work for them.
# considered package config files, so %%config doesn't work for them.
if [ -d %{_sharedstatedir}/glusterd/vols ]; then
for file in $(find %{_sharedstatedir}/glusterd/vols -name '*.vol'); do
newfile=${file}.rpmsave
@ -786,13 +895,16 @@ if [ $1 -ge 1 ]; then
fi
%changelog
* Fri Dec 6 2013 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.5.0-0.1qa3
- GlusterFS 3.5.0 QA3 , glusterfs-3.5.0-0.1qa3
* Wed Nov 6 2013 Kaleb S. KEITHLEY <kkeithle[at]redhat.com>
- obsolete glusterfs-ufo (#1025059)
- ownership of /usr/share/doc/glusterfs(-x.y.z) (#846737)
- clear_xattrs.sh belongs in /usr/share/doc/glusterfs(-x.y.z), not
in /usr/share/doc/glusterfs-server(-x.y.z)
- remove defattr (per pkg review of another package)
- don't use %{__foo} macros (per package review of another package)
- don't use %%{__foo} macros (per package review of another package)
* Sun Oct 27 2013 Niels de Vos <ndevos@redhat.com> - 3.4.1-3
- Correctly start+stop glusterfsd.service (#1022542)

View File

@ -1 +1 @@
dce3d066b7351b360454ea9ca4cabe4c glusterfs-3.4.1.tar.gz
65473412bc9b61c8a33c5216c7d813da glusterfs-3.5.0qa3.tar.gz