packages: glusterfs/glusterfs.spec, glusterfs/glusterfsd.init, glusterfs/gl...

matkor matkor at pld-linux.org
Wed Dec 1 14:31:30 CET 2010


Author: matkor                       Date: Wed Dec  1 13:31:30 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- Release 1. Seems to work nice for me.

---- Files affected:
packages/glusterfs:
   glusterfs.spec (1.38 -> 1.39) , glusterfsd.init (1.4 -> 1.5) , glusterfs-parallel-build.patch (NONE -> 1.1)  (NEW), glusterfs-workdir.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/glusterfs/glusterfs.spec
diff -u packages/glusterfs/glusterfs.spec:1.38 packages/glusterfs/glusterfs.spec:1.39
--- packages/glusterfs/glusterfs.spec:1.38	Tue Nov 30 17:18:09 2010
+++ packages/glusterfs/glusterfs.spec	Wed Dec  1 14:31:24 2010
@@ -1,10 +1,11 @@
 # $Revision$, $Date$
+# TODO: Find pidfiles killproc --pidfile ${PIDFILE} -TERM
+#       instead of kill -TERM ${PID}  
 # TODO: Decide what to do with -static
 #       Obsolete it, fix build ?
-# TODO: Consider switching option working-directory from /etc/glusterd
-#       to /var/lib/glusterd as in Gentoo, as it more managed from CLI 
-
-
+# TODO: Check transport-ibverbs package and ibverbs bcond
+# TODO: Add passing options from /etc/sysconfig/glusterfsd
+#       to glusterfsd
 
 %bcond_without	ibverbs		# ib-verbs transport
 #
@@ -14,13 +15,15 @@
 Version:	3.1.1
 #%%define          _rc        {rc2}
 %define          _version        %{version}
-Release:	0.1
+Release:	1
 License:	GPL v3+
 Group:		Applications/System
 # http://download.gluster.com/pub/gluster/glusterfs/3.1/LATEST/glusterfs-3.1.1.tar.gz
 Source0:	http://ftp.gluster.com/pub/gluster/glusterfs/3.1/LATEST/glusterfs-%{version}.tar.gz
 # Source0-md5:	4584710adee36920c97a658b25a1446d
 Source1:	glusterfsd.init
+Patch0:     %{name}-parallel-build.patch
+Patch1:     %{name}-workdir.patch
 URL:		http://www.gluster.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -28,6 +31,7 @@
 BuildRequires:	flex
 BuildRequires:	libfuse-devel >= 2.6
 BuildRequires:	libtool
+BuildRequires:  readline-devel
 %{?with_ibverbs:BuildRequires:	libibverbs-devel >= 1.0.4}
 BuildRequires:	rpmbuild(macros) >= 1.228
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -146,28 +150,34 @@
 
 %prep
 %setup -q -n %{name}-%{_version}
+%patch0 -p0
+%patch1 -p1
 %{__sed} -i -e 's|-avoidversion|-avoid-version|g'  */*/*/Makefile.am  */*/*/*/Makefile.am
-
 cp -l doc/examples/README README.examples
 
+
 %build
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__automake}
 %configure \
-	--disable-bdb \
-	--disable-mod_glusterfs \
+     --enable-fusermount \
 	%{!?with_ibverbs:--disable-ibverbs}
+
 # -j8 breaks for 3.0.5
-%{__make} -j1
+# %{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -d $RPM_BUILD_ROOT%{_var}/lib/glusterd/
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
+	
+# No idea why installs elsewhere than later expects to be
+mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/glusterd.vol $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/glusterfsd.vol
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/glusterfsd
 
@@ -199,24 +209,9 @@
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/auth/addr.so*
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/auth/login.so*
 
-
-# %dir %{_libdir}/glusterfs/%{_version}/scheduler
-
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/scheduler/alu.so
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/scheduler/nufa.so
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/scheduler/random.so
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/scheduler/rr.so
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/scheduler/switch.so
-
-# %dir %{_libdir}/glusterfs/%{_version}/transport
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/transport/socket.so
-
-
 %dir %{_libdir}/glusterfs/%{_version}/rpc-transport
-%attr(755,root,root) %{_libdir}/glusterfs/%{_version}/rpc-transport/rdma.so
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/rpc-transport/socket.so
 
-
 %dir %{_libdir}/glusterfs/%{_version}/xlator
 %dir %{_libdir}/glusterfs/%{_version}/xlator/cluster
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/cluster/*.so
@@ -228,9 +223,6 @@
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/features/*.so
 %dir %{_libdir}/glusterfs/%{_version}/xlator/mount
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/mount/fuse.so
-# %dir %{_libdir}/glusterfs/%{_version}/xlator/legacy
-# %dir %{_libdir}/glusterfs/%{_version}/xlator/legacy/cluster
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/legacy/cluster/*.so
 
 %dir %{_libdir}/glusterfs/%{_version}/xlator/mgmt
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/mgmt/glusterd.so
@@ -248,28 +240,20 @@
 %dir %{_libdir}/glusterfs/%{_version}/xlator/storage
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/storage/*.so
 %dir %{_libdir}/glusterfs/%{_version}/xlator/testing
-# %dir %{_libdir}/glusterfs/%{_version}/xlator/testing/cluster
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/testing/cluster/*.so
 %dir %{_libdir}/glusterfs/%{_version}/xlator/testing/features
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/testing/features/*.so
 %dir %{_libdir}/glusterfs/%{_version}/xlator/testing/performance
 %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/xlator/testing/performance/*.so
 
-
 %{_mandir}/man8/*.8*
-
-%dir /var/log/glusterfs
+%dir %{_var}/log/glusterfs
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libglusterfs.so
 %{_libdir}/libglusterfs.la
-# %attr(755,root,root) %{_libdir}/libglusterfsclient.so
-# %{_libdir}/libglusterfsclient.la
-# %{_includedir}/*.h
 %attr(755,root,root) %{_libdir}/libgfrpc.so
 %{_libdir}/libgfrpc.la
-
 %attr(755,root,root) %{_libdir}/libgfxdr.so
 %{_libdir}/libgfxdr.la
 
@@ -282,20 +266,21 @@
 %if %{with ibverbs}
 %files transport-ibverbs
 %defattr(644,root,root,755)
-# %attr(755,root,root) %{_libdir}/glusterfs/%{_version}/transport/ib-verbs.so
+%attr(755,root,root) %{_libdir}/glusterfs/%{_version}/rpc-transport/rdma.so
 %endif
 
 %files server
 %defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/glusterfsd.vol
 %attr(754,root,root) /etc/rc.d/init.d/glusterfsd
 %attr(755,root,root) %{_sbindir}/glusterd
 %attr(755,root,root) %{_sbindir}/glusterfs
 %attr(755,root,root) %{_sbindir}/glusterfsd
-
+%dir %{_var}/lib/glusterd/
 
 %files client
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/fusermount-glusterfs
 %attr(755,root,root) %{_bindir}/glusterfs-volgen
 %attr(755,root,root) %{_bindir}/glusterfs-defrag
 %attr(755,root,root) /sbin/mount.glusterfs
@@ -308,6 +293,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.39  2010/12/01 13:31:24  matkor
+- Release 1. Seems to work nice for me.
+
 Revision 1.38  2010/11/30 16:18:09  matkor
 - Starting upgrade to 3.1.1
 

================================================================
Index: packages/glusterfs/glusterfsd.init
diff -u packages/glusterfs/glusterfsd.init:1.4 packages/glusterfs/glusterfsd.init:1.5
--- packages/glusterfs/glusterfsd.init:1.4	Tue Feb  3 16:54:53 2009
+++ packages/glusterfs/glusterfsd.init	Wed Dec  1 14:31:24 2010
@@ -33,7 +33,7 @@
 	# Check if the service is already running?
 	if [ ! -f /var/lock/subsys/glusterfsd ]; then
 		msg_starting glusterfsd
-		daemon /usr/sbin/glusterfsd -p /var/run/glusterfsd.pid  --spec-file /etc/glusterfs/glusterfs-server.vol
+		daemon /usr/sbin/glusterfsd -p /var/run/glusterfsd.pid  
 		RETVAL=$?
 		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/glusterfsd
 	else
@@ -41,12 +41,20 @@
 	fi
 }
 
+
 stop() {
 	if [ -f /var/lock/subsys/glusterfsd ]; then
 		# Stop daemons.
 		msg_stopping glusterfsd
 		killproc --pidfile /var/run/glusterfsd.pid glusterfsd -TERM
 		rm -f /var/lock/subsys/glusterfsd
+        # Killing remaining GlusterFS volume handling processes"
+        for PID in $(find /var/lib/glusterd/ -type f -name "*.pid" -exec cat {} \;); do
+            msg_stopping  "glusterfs volume daemon (${PID})"
+	    ## TODO: Find pidfiles instead of pids and use:     killproc --pidfile ${PIDFILE} -TERM
+	    kill -TERM ${PID}
+        done
+		
 	else
 		msg_not_running glusterfsd
 	fi
@@ -84,6 +92,8 @@
   status)
 	status glusterfsd
 	RETVAL=$?
+	# Listing volume daemons
+	ls -la /var/lib/glusterd/vols/*/run/*.pid
 	;;
   *)
 	msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"

================================================================
Index: packages/glusterfs/glusterfs-parallel-build.patch
diff -u /dev/null packages/glusterfs/glusterfs-parallel-build.patch:1.1
--- /dev/null	Wed Dec  1 14:31:30 2010
+++ packages/glusterfs/glusterfs-parallel-build.patch	Wed Dec  1 14:31:25 2010
@@ -0,0 +1,22 @@
+--- glusterfsd/src/Makefile.am
++++ glusterfsd/src/Makefile.am
+@@ -20,5 +20,6 @@ uninstall-local:
+ install-data-local:
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs
++	$(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
+ 	rm -f $(DESTDIR)$(sbindir)/glusterfs
+ 	ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs
+--- libglusterfs/src/Makefile.am
++++ libglusterfs/src/Makefile.am
+@@ -15,7 +15,9 @@
+ graph.lex.c: graph.l y.tab.h
+ 	$(LEX) -t $(srcdir)/graph.l > $@
+ 
+-y.tab.c y.tab.h: graph.y
++y.tab.c: y.tab.h
++
++y.tab.h: graph.y
+ 	$(YACC) -d $(srcdir)/graph.y
+ 
+ CLEANFILES = graph.lex.c y.tab.c y.tab.h

================================================================
Index: packages/glusterfs/glusterfs-workdir.patch
diff -u /dev/null packages/glusterfs/glusterfs-workdir.patch:1.1
--- /dev/null	Wed Dec  1 14:31:30 2010
+++ packages/glusterfs/glusterfs-workdir.patch	Wed Dec  1 14:31:25 2010
@@ -0,0 +1,49 @@
+Change the default workdir of the glusterd daemon to /var/lib/glusterd instead of /etc/glusterd.
+This directory is dynamically populated by glusterd via the gluster CLI so it does better
+belong into /var/lib/.
+
+Patch by Ultrabug.
+
+--- a/xlators/mgmt/glusterd/src/glusterd.h   2010-10-13 06:20:37.000000000 +0200
++++ b/xlators/mgmt/glusterd/src/glusterd.h   2010-10-26 10:47:52.747265444 +0200
+@@ -204,7 +204,7 @@
+         GLUSTERD_VOL_COMP_RJT,
+ };
+
+-#define GLUSTERD_DEFAULT_WORKDIR "/etc/glusterd"
++#define GLUSTERD_DEFAULT_WORKDIR "/var/lib/glusterd"
+ #define GLUSTERD_DEFAULT_PORT    GF_DEFAULT_BASE_PORT
+ #define GLUSTERD_INFO_FILE      "glusterd.info"
+ #define GLUSTERD_VOLUME_DIR_PREFIX "vols"
+--- a/doc/glusterd.vol  2010-10-13 06:20:36.000000000 +0200
++++ b/doc/glusterd.vol  2010-10-26 10:48:16.487931870 +0200
+@@ -1,6 +1,6 @@
+ volume management
+     type mgmt/glusterd
+-    option working-directory /etc/glusterd
++    option working-directory /var/lib/glusterd
+     option transport-type socket,rdma
+     option transport.socket.keepalive-time 10
+     option transport.socket.keepalive-interval 2
+--- a/doc/gluster.8  2010-10-13 06:20:36.000000000 +0200
++++ b/doc/gluster.8  2010-10-26 10:48:36.738500314 +0200
+@@ -118,7 +118,7 @@
+ .TP
+ .PP
+ .SH FILES
+-/etc/glusterd/*
++/var/lib/glusterd/*
+
+ .SH SEE ALSO
+ .nf
+--- a/doc/glusterd.8 2010-10-13 06:20:36.000000000 +0200
++++ b/doc/glusterd.8 2010-10-26 10:48:44.898729373 +0200
+@@ -70,7 +70,7 @@
+
+ .PP
+ .SH FILES
+-/etc/glusterd/*
++/var/lib/glusterd/*
+
+ .SH SEE ALSO
+ .nf
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/glusterfs/glusterfs.spec?r1=1.38&r2=1.39&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/glusterfs/glusterfsd.init?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list