From f8e70dcbdf7d4a506d50282bee094963abf81602 Mon Sep 17 00:00:00 2001 From: Kaleb KEITHLEY Date: Nov 22 2011 18:26:56 +0000 Subject: Merge remote-tracking branch 'origin/master' into el6 Conflicts: .gitignore glusterfs.spec sources --- diff --git a/.gitignore b/.gitignore index e156280..deef4b0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,7 @@ glusterfs-3.0.5.tar.gz /glusterfs-3.1.3.tar.gz /glusterfs-3.1.4.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 diff --git a/glusterd.service b/glusterd.service new file mode 100644 index 0000000..4bf3ea1 --- /dev/null +++ b/glusterd.service @@ -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 diff --git a/glusterfs.spec b/glusterfs.spec index b9a38b1..68ff7df 100644 --- a/glusterfs.spec +++ b/glusterfs.spec @@ -1,42 +1,78 @@ + + +# 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_epoll:%global _without_epoll --disable-epoll} -%{?_with_fusermount:%gobal _with_fusermount --enable-fusermount} -# No RDMA Support on x390(x) +# No RDMA Support on s390(x) %ifarch s390 s390x -%{?_without_rdma:%global _without_rdma --disable-ibverbs} +%global _without_rdma --disable-ibverbs %endif +# if you wish to compile an rpm without epoll... +# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without epoll +%{?_without_epoll:%global _without_epoll --disable-epoll} + +# 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.1 +Version: 3.2.5 Release: 2%{?dist} -Summary: Clustered file-system - +License: GPLv3 Group: System Environment/Base -License: AGPLv3 -URL: http://www.gluster.org/ +Vendor: Red Hat +URL: http://www.gluster.org//docs/index.php/GlusterFS Source0: http://download.gluster.com/pub/gluster/glusterfs/3.2/%{version}/glusterfs-%{version}.tar.gz -Source1: glusterd.init -Source2: glusterd.sysconfig +Source1: glusterd.sysconfig +Source2: glusterfsd.sysconfig Source3: umount.glusterfs Source4: glusterfs-fuse.logrotate Source5: glusterd.logrotate -# Legacy server -Source11: glusterfsd.init -Source12: glusterfsd.sysconfig -Source15: glusterfsd.logrotate +Source6: glusterfsd.logrotate BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -BuildRequires: bison -BuildRequires: flex -BuildRequires: gcc -BuildRequires: make -BuildRequires: ncurses-devel, readline-devel, python-ctypes - +%if ( 0%{?fedora} < 17 || 0%{?rhel} < 7 ) +Source7: glusterd.init +Source8: glusterfsd.init Requires(post): /sbin/chkconfig Requires(preun): /sbin/service Requires(preun): /sbin/chkconfig 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}-common < 3.1.0 @@ -59,11 +95,11 @@ both GlusterFS server and client framework. %if 0%{!?_without_rdma:1} %package rdma -Summary: Support for ib-verbs -Group: Applications/File -BuildRequires: libibverbs-devel +Summary: GlusterFS rdma support for ib-verbs +Group: Applications/File +BuildRequires: libibverbs-devel -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description rdma 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. %endif +%if 0%{!?_without_georeplication:1} +%package geo-replication +Summary: GlusterFS Geo-replication +Group: Applications/File +Requires: %{name} = %{version}-%{release} , python-ctypes , rsync >= 3.0.0 + +%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 +Summary: Fuse client +Group: Applications/File +BuildRequires: fuse-devel -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version}-%{release} Obsoletes: %{name}-client < 3.1.0 Provides: %{name}-client = %{version}-%{release} @@ -148,36 +202,28 @@ is in user space and easily manageable. This package provides the development libraries. %prep -%setup -q +%setup -q -n %{name}-%{version} %build -%configure %{?_without_rdma} %{?_without_epoll} %{?_with_fusermount} +./autogen.sh +%configure %{?_without_rdma} %{?_without_epoll} %{?_with_fusermount} %{?_without_georeplication} # Remove rpath 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 -# Parallel builds not supported -%{__make} +%{__make} %{?_smp_mflags} %install %{__rm} -rf %{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 %{__mkdir_p} %{buildroot}%{_includedir}/glusterfs %{__install} -p -m 0644 libglusterfs/src/*.h \ %{buildroot}%{_includedir}/glusterfs/ %{__install} -p -m 0644 contrib/uuid/*.h \ %{buildroot}%{_includedir}/glusterfs/ -# Following needed by cloudfs multi-tenant translator +# Following needed by hekafs multi-tenant translator %{__mkdir_p} %{buildroot}%{_includedir}/glusterfs/rpc %{__install} -p -m 0644 rpc/rpc-lib/src/*.h \ %{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 %{__install} -p -m 0644 xlators/protocol/server/src/*.h \ %{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 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* # Install init script and sysconfig file -%{__install} -D -p -m 0755 %{SOURCE1} \ - %{buildroot}%{_sysconfdir}/init.d/glusterd -%{__install} -D -p -m 0644 %{SOURCE2} \ +%_init_install %{SOURCE7} glusterd +%_init_install %{SOURCE8} glusterfsd +%{__install} -D -p -m 0644 %{SOURCE1} \ %{buildroot}%{_sysconfdir}/sysconfig/glusterd -# Legacy init script and sysconfig file -%{__install} -D -p -m 0755 %{SOURCE11} \ - %{buildroot}%{_sysconfdir}/init.d/glusterfsd -%{__install} -D -p -m 0644 %{SOURCE12} \ +%{__install} -D -p -m 0644 %{SOURCE2} \ %{buildroot}%{_sysconfdir}/sysconfig/glusterfsd # 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} \ %{buildroot}%{_sysconfdir}/logrotate.d/glusterd # Legacy server logrotate entry -%{__install} -D -p -m 0644 %{SOURCE15} \ +%{__install} -D -p -m 0644 %{SOURCE6} \ %{buildroot}%{_sysconfdir}/logrotate.d/glusterfsd # Install vim syntax plugin @@ -242,6 +292,12 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha %clean %{__rm} -rf %{buildroot} +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + %files %defattr(-,root,root,-) %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* %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 %defattr(-,root,root,-) %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}/sysconfig/glusterfsd %{_sharedstatedir}/glusterd -%{_sysconfdir}/init.d/glusterd -# Legacy init -%{_sysconfdir}/init.d/glusterfsd +%_init_file1 +%_init_file2 %files vim %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 %{_libdir}/*.so -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - %post server -/sbin/chkconfig --add glusterd - # Legacy server -/sbin/chkconfig --add glusterfsd +%_init_enable glusterd +%_init_enable glusterfsd %preun server if [ $1 -eq 0 ]; then - /sbin/service glusterd stop &>/dev/null || : - /sbin/chkconfig --del glusterd -fi -if [ $1 -ge 1 ]; then - /sbin/service glusterd condrestart &>/dev/null || : -fi - -# Legacy server -if [ $1 -eq 0 ]; then - /sbin/service glusterfsd stop &>/dev/null || : - /sbin/chkconfig --del glusterfsd + %_init_stop glusterfsd + %_init_stop glusterd + %_init_disable glusterfsd + %_init_disable glusterd fi if [ $1 -ge 1 ]; then - /sbin/service glusterfsd condrestart &>/dev/null || : + %_init_restart glusterd + %_init_restart glusterfsd fi %changelog +* Mon Nov 21 2011 Kaleb S. KEITHLEY - 3.2.5-2 +- rhel/epel, init.d for <=6, native systemd for 7 + +* Thu Nov 17 2011 Kaleb S. KEITHLEY - 3.2.5-1 +- Update to 3.2.5 + +* Wed Nov 16 2011 Kaleb S. KEITHLEY - 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 - 3.2.4-2 +- Convert init.d to systemd for f17 and later + +* Fri Sep 30 2011 Kaleb S. KEITHLEY - 3.2.4-1 +- Update to 3.2.4 + +* Mon Aug 22 2011 Kaleb S. KEITHLEY - 3.2.3-1 +- Update to 3.2.3 + +* Mon Aug 22 2011 Kaleb S. KEITHLEY - 3.2.2-1 +- Update to 3.2.2 + +* Fri Aug 19 2011 Kaleb S. KEITHLEY - 3.2.2-0 +- Update to 3.2.2 + +* Wed Jun 29 2011 Dan HorĂ¡k - 3.2.1-3 +- disable InfiniBand on s390(x) unconditionally + * Thu Jun 16 2011 Jonathan Steffan - 3.2.1-2 - Fix Source0 URL diff --git a/glusterfsd.service b/glusterfsd.service new file mode 100644 index 0000000..4454ad8 --- /dev/null +++ b/glusterfsd.service @@ -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 diff --git a/sources b/sources index 6700092..c5982a2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -eb9e499bb67a8a577785f4c014febe52 glusterfs-3.2.1.tar.gz +1a19f29270c587242a83bc0256161f68 glusterfs-3.2.5.tar.gz