Merge remote-tracking branch 'origin/master' into el6

Conflicts:
	.gitignore
	glusterfs.spec
	sources
This commit is contained in:
Kaleb KEITHLEY 2011-11-22 13:26:56 -05:00
commit f8e70dcbdf
5 changed files with 191 additions and 76 deletions

4
.gitignore vendored
View File

@ -6,3 +6,7 @@ glusterfs-3.0.5.tar.gz
/glusterfs-3.1.3.tar.gz /glusterfs-3.1.3.tar.gz
/glusterfs-3.1.4.tar.gz /glusterfs-3.1.4.tar.gz
/glusterfs-3.2.1.tar.gz /glusterfs-3.2.1.tar.gz
/glusterfs-3.2.2.tar.gz
/glusterfs-3.2.3.tar.gz
/glusterfs-3.2.4.tar.gz
/glusterfs-3.2.5.tar.gz

13
glusterd.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=GlusterFS an clustered file-system server
Wants=glusterfsd.service
After=network.target
[Service]
Type=forking
PIDFile=/run/glusterd.pid
LimitNOFILE=65536
ExecStart=/usr/sbin/glusterd -p /run/glusterd.pid
[Install]
WantedBy=multi-user.target

View File

@ -1,42 +1,78 @@
%{?_without_rdma:%global _without_rdma --disable-ibverbs}
%{?_without_epoll:%global _without_epoll --disable-epoll}
%{?_with_fusermount:%gobal _with_fusermount --enable-fusermount}
# No RDMA Support on x390(x)
%ifarch s390 s390x # if you wish to compile an rpm without rdma support, compile like this...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without rdma
%{?_without_rdma:%global _without_rdma --disable-ibverbs} %{?_without_rdma:%global _without_rdma --disable-ibverbs}
# No RDMA Support on s390(x)
%ifarch s390 s390x
%global _without_rdma --disable-ibverbs
%endif %endif
Name: glusterfs # if you wish to compile an rpm without epoll...
Version: 3.2.1 # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without epoll
Release: 2%{?dist} %{?_without_epoll:%global _without_epoll --disable-epoll}
Summary: Clustered file-system
# if you wish to compile an rpm with fusermount...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with fusermount
%{?_with_fusermount:%global _with_fusermount --enable-fusermount}
# if you wish to compile an rpm without geo-replication support, compile like this...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without georeplication
%{?_without_georeplication:%global _without_georeplication --disable-geo-replication}
Summary: Cluster File System
Name: glusterfs
Version: 3.2.5
Release: 2%{?dist}
License: GPLv3
Group: System Environment/Base Group: System Environment/Base
License: AGPLv3 Vendor: Red Hat
URL: http://www.gluster.org/ URL: http://www.gluster.org//docs/index.php/GlusterFS
Source0: http://download.gluster.com/pub/gluster/glusterfs/3.2/%{version}/glusterfs-%{version}.tar.gz Source0: http://download.gluster.com/pub/gluster/glusterfs/3.2/%{version}/glusterfs-%{version}.tar.gz
Source1: glusterd.init Source1: glusterd.sysconfig
Source2: glusterd.sysconfig Source2: glusterfsd.sysconfig
Source3: umount.glusterfs Source3: umount.glusterfs
Source4: glusterfs-fuse.logrotate Source4: glusterfs-fuse.logrotate
Source5: glusterd.logrotate Source5: glusterd.logrotate
# Legacy server Source6: glusterfsd.logrotate
Source11: glusterfsd.init
Source12: glusterfsd.sysconfig
Source15: glusterfsd.logrotate
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: bison %if ( 0%{?fedora} < 17 || 0%{?rhel} < 7 )
BuildRequires: flex Source7: glusterd.init
BuildRequires: gcc Source8: glusterfsd.init
BuildRequires: make
BuildRequires: ncurses-devel, readline-devel, python-ctypes
Requires(post): /sbin/chkconfig Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service Requires(preun): /sbin/service
Requires(preun): /sbin/chkconfig Requires(preun): /sbin/chkconfig
Requires(postun): /sbin/service Requires(postun): /sbin/service
%define _init_enable() /sbin/chkconfig --add %1 ;
%define _init_disable() /sbin/chkconfig --del %1 ;
%define _init_restart() /sbin/service %1 condrestart &>/dev/null ;
%define _init_stop() /sbin/service %1 stop &>/dev/null ;
%define _init_install() %{__install} -D -p -m 0755 %{1} %{buildroot}%{_sysconfdir}/init.d/%{2} ;
%define _init_file1 %{_sysconfdir}/init.d/glusterd
%define _init_file2 %{_sysconfdir}/init.d/glusterfsd
%else
Source7: glusterd.service
Source8: glusterfsd.service
BuildRequires: systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%define _init_enable() /bin/systemctl enable %1.service ;
%define _init_disable() /bin/systemctl disable %1.service ;
%define _init_restart() /bin/systemctl try-restart %1.service ;
%define _init_stop() /bin/systemctl stop %1.service ;
%define _init_install() %{__install} -D -p -m 0644 %{1} %{buildroot}%{_unitdir}/%{2}.service ;
%define _init_file1 %{_unitdir}/glusterd.service
%define _init_file2 %{_unitdir}/glusterfsd.service
%endif
BuildRequires: bison flex
BuildRequires: gcc make automake libtool
BuildRequires: ncurses-devel readline-devel
BuildRequires: python-ctypes
Obsoletes: %{name}-libs <= 2.0.0 Obsoletes: %{name}-libs <= 2.0.0
Obsoletes: %{name}-common < 3.1.0 Obsoletes: %{name}-common < 3.1.0
@ -59,11 +95,11 @@ both GlusterFS server and client framework.
%if 0%{!?_without_rdma:1} %if 0%{!?_without_rdma:1}
%package rdma %package rdma
Summary: Support for ib-verbs Summary: GlusterFS rdma support for ib-verbs
Group: Applications/File Group: Applications/File
BuildRequires: libibverbs-devel BuildRequires: libibverbs-devel
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description rdma %description rdma
GlusterFS is a clustered file-system capable of scaling to several GlusterFS is a clustered file-system capable of scaling to several
@ -77,12 +113,30 @@ is in user space and easily manageable.
This package provides support to ib-verbs library. This package provides support to ib-verbs library.
%endif %endif
%package fuse %if 0%{!?_without_georeplication:1}
Summary: Fuse client %package geo-replication
Group: Applications/File Summary: GlusterFS Geo-replication
BuildRequires: fuse-devel Group: Applications/File
Requires: %{name} = %{version}-%{release} , python-ctypes , rsync >= 3.0.0
Requires: %{name} = %{version}-%{release} %description geo-replication
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility. It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.
This package provides support to geo-replication.
%endif
%package fuse
Summary: Fuse client
Group: Applications/File
BuildRequires: fuse-devel
Requires: %{name} = %{version}-%{release}
Obsoletes: %{name}-client < 3.1.0 Obsoletes: %{name}-client < 3.1.0
Provides: %{name}-client = %{version}-%{release} Provides: %{name}-client = %{version}-%{release}
@ -148,36 +202,28 @@ is in user space and easily manageable.
This package provides the development libraries. This package provides the development libraries.
%prep %prep
%setup -q %setup -q -n %{name}-%{version}
%build %build
%configure %{?_without_rdma} %{?_without_epoll} %{?_with_fusermount} ./autogen.sh
%configure %{?_without_rdma} %{?_without_epoll} %{?_with_fusermount} %{?_without_georeplication}
# Remove rpath # Remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# Parallel builds not supported %{__make} %{?_smp_mflags}
%{__make}
%install %install
%{__rm} -rf %{buildroot} %{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot} %{__make} install DESTDIR=%{buildroot}
# We'll use our init.d
%{__rm} -f %{buildroot}%{_sysconfdir}/init.d/glusterd
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterd
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfs
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfsd
# Install include directory # Install include directory
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs %{__mkdir_p} %{buildroot}%{_includedir}/glusterfs
%{__install} -p -m 0644 libglusterfs/src/*.h \ %{__install} -p -m 0644 libglusterfs/src/*.h \
%{buildroot}%{_includedir}/glusterfs/ %{buildroot}%{_includedir}/glusterfs/
%{__install} -p -m 0644 contrib/uuid/*.h \ %{__install} -p -m 0644 contrib/uuid/*.h \
%{buildroot}%{_includedir}/glusterfs/ %{buildroot}%{_includedir}/glusterfs/
# Following needed by cloudfs multi-tenant translator # Following needed by hekafs multi-tenant translator
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs/rpc %{__mkdir_p} %{buildroot}%{_includedir}/glusterfs/rpc
%{__install} -p -m 0644 rpc/rpc-lib/src/*.h \ %{__install} -p -m 0644 rpc/rpc-lib/src/*.h \
%{buildroot}%{_includedir}/glusterfs/rpc/ %{buildroot}%{_includedir}/glusterfs/rpc/
@ -186,6 +232,13 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs/server %{__mkdir_p} %{buildroot}%{_includedir}/glusterfs/server
%{__install} -p -m 0644 xlators/protocol/server/src/*.h \ %{__install} -p -m 0644 xlators/protocol/server/src/*.h \
%{buildroot}%{_includedir}/glusterfs/server/ %{buildroot}%{_includedir}/glusterfs/server/
# We'll use our init.d
%{__rm} -f %{buildroot}%{_sysconfdir}/init.d/glusterd
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterd
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfs
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/glusterfsd
# Remove unwanted files from all the shared libraries # Remove unwanted files from all the shared libraries
find %{buildroot}%{_libdir} -name '*.a' -delete find %{buildroot}%{_libdir} -name '*.a' -delete
@ -211,14 +264,11 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
%{__rm} -f examples/Makefile* %{__rm} -f examples/Makefile*
# Install init script and sysconfig file # Install init script and sysconfig file
%{__install} -D -p -m 0755 %{SOURCE1} \ %_init_install %{SOURCE7} glusterd
%{buildroot}%{_sysconfdir}/init.d/glusterd %_init_install %{SOURCE8} glusterfsd
%{__install} -D -p -m 0644 %{SOURCE2} \ %{__install} -D -p -m 0644 %{SOURCE1} \
%{buildroot}%{_sysconfdir}/sysconfig/glusterd %{buildroot}%{_sysconfdir}/sysconfig/glusterd
# Legacy init script and sysconfig file %{__install} -D -p -m 0644 %{SOURCE2} \
%{__install} -D -p -m 0755 %{SOURCE11} \
%{buildroot}%{_sysconfdir}/init.d/glusterfsd
%{__install} -D -p -m 0644 %{SOURCE12} \
%{buildroot}%{_sysconfdir}/sysconfig/glusterfsd %{buildroot}%{_sysconfdir}/sysconfig/glusterfsd
# Install wrapper umount script # Install wrapper umount script
@ -232,7 +282,7 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
%{__install} -D -p -m 0644 %{SOURCE5} \ %{__install} -D -p -m 0644 %{SOURCE5} \
%{buildroot}%{_sysconfdir}/logrotate.d/glusterd %{buildroot}%{_sysconfdir}/logrotate.d/glusterd
# Legacy server logrotate entry # Legacy server logrotate entry
%{__install} -D -p -m 0644 %{SOURCE15} \ %{__install} -D -p -m 0644 %{SOURCE6} \
%{buildroot}%{_sysconfdir}/logrotate.d/glusterfsd %{buildroot}%{_sysconfdir}/logrotate.d/glusterfsd
# Install vim syntax plugin # Install vim syntax plugin
@ -242,6 +292,12 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
%clean %clean
%{__rm} -rf %{buildroot} %{__rm} -rf %{buildroot}
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc ChangeLog COPYING INSTALL README THANKS %doc ChangeLog COPYING INSTALL README THANKS
@ -266,6 +322,19 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
%{_libdir}/glusterfs/%{version}/rpc-transport/rdma* %{_libdir}/glusterfs/%{version}/rpc-transport/rdma*
%endif %endif
%if 0%{!?_without_georeplication:1}
%post geo-replication
#restart glusterd.
%{_sysconfdir}/init.d/glusterd restart &> /dev/null
%endif
%if 0%{!?_without_georeplication:1}
%files geo-replication
%defattr(-,root,root)
%{_libexecdir}/glusterfs/gsyncd
%{_libexecdir}/glusterfs/python/syncdaemon/*
%endif
%files fuse %files fuse
%defattr(-,root,root,-) %defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterfs-fuse %config(noreplace) %{_sysconfdir}/logrotate.d/glusterfs-fuse
@ -288,9 +357,8 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterfsd %config(noreplace) %{_sysconfdir}/logrotate.d/glusterfsd
%config(noreplace) %{_sysconfdir}/sysconfig/glusterfsd %config(noreplace) %{_sysconfdir}/sysconfig/glusterfsd
%{_sharedstatedir}/glusterd %{_sharedstatedir}/glusterd
%{_sysconfdir}/init.d/glusterd %_init_file1
# Legacy init %_init_file2
%{_sysconfdir}/init.d/glusterfsd
%files vim %files vim
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -303,35 +371,53 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
%exclude %{_includedir}/glusterfs/y.tab.h %exclude %{_includedir}/glusterfs/y.tab.h
%{_libdir}/*.so %{_libdir}/*.so
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post server %post server
/sbin/chkconfig --add glusterd
# Legacy server # Legacy server
/sbin/chkconfig --add glusterfsd %_init_enable glusterd
%_init_enable glusterfsd
%preun server %preun server
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
/sbin/service glusterd stop &>/dev/null || : %_init_stop glusterfsd
/sbin/chkconfig --del glusterd %_init_stop glusterd
%_init_disable glusterfsd
%_init_disable glusterd
fi fi
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
/sbin/service glusterd condrestart &>/dev/null || : %_init_restart glusterd
fi %_init_restart glusterfsd
# Legacy server
if [ $1 -eq 0 ]; then
/sbin/service glusterfsd stop &>/dev/null || :
/sbin/chkconfig --del glusterfsd
fi
if [ $1 -ge 1 ]; then
/sbin/service glusterfsd condrestart &>/dev/null || :
fi fi
%changelog %changelog
* Mon Nov 21 2011 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.5-2
- rhel/epel, init.d for <=6, native systemd for 7
* Thu Nov 17 2011 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.5-1
- Update to 3.2.5
* Wed Nov 16 2011 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.4-3
- revised init.d/systemd to minimize fedora < 17
- get closer to the official glusterfs spec, including...
- add geo-replication, which should have been there since 3.2
* Wed Nov 2 2011 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.4-2
- Convert init.d to systemd for f17 and later
* Fri Sep 30 2011 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.4-1
- Update to 3.2.4
* Mon Aug 22 2011 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.3-1
- Update to 3.2.3
* Mon Aug 22 2011 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.2-1
- Update to 3.2.2
* Fri Aug 19 2011 Kaleb S. KEITHLEY <kkeithle@redhat.com> - 3.2.2-0
- Update to 3.2.2
* Wed Jun 29 2011 Dan Horák <dan[at]danny.cz> - 3.2.1-3
- disable InfiniBand on s390(x) unconditionally
* Thu Jun 16 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.2.1-2 * Thu Jun 16 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.2.1-2
- Fix Source0 URL - Fix Source0 URL

12
glusterfsd.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=GlusterFS an clustered file-system server
After=network.target glusterd.service
[Service]
Type=forking
PIDFile=/run/glusterfsd.pid
LimitNOFILE=65536
ExecStart=/usr/sbin/glusterfsd -p /run/glusterfsd.pid
[Install]
WantedBy=multi-user.target

View File

@ -1 +1 @@
eb9e499bb67a8a577785f4c014febe52 glusterfs-3.2.1.tar.gz 1a19f29270c587242a83bc0256161f68 glusterfs-3.2.5.tar.gz