]> git.pld-linux.org Git - packages/glusterfs.git/commitdiff
- Release 1. Seems to work nice for me. auto/th/glusterfs-3_1_1-1
authorMateusz Korniak <matkor@pld-linux.org>
Wed, 1 Dec 2010 13:31:25 +0000 (13:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    glusterfs-parallel-build.patch -> 1.1
    glusterfs-workdir.patch -> 1.1
    glusterfs.spec -> 1.39
    glusterfsd.init -> 1.5

glusterfs-parallel-build.patch [new file with mode: 0644]
glusterfs-workdir.patch [new file with mode: 0644]
glusterfs.spec
glusterfsd.init

diff --git a/glusterfs-parallel-build.patch b/glusterfs-parallel-build.patch
new file mode 100644 (file)
index 0000000..9320c12
--- /dev/null
@@ -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
diff --git a/glusterfs-workdir.patch b/glusterfs-workdir.patch
new file mode 100644 (file)
index 0000000..2851363
--- /dev/null
@@ -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
index 55bb4076c1eed907a04a34922b5229d56ed26c04..639c8946f5748fcfc26030a49b5852dd53e6f277 100644 (file)
@@ -1,9 +1,10 @@
+# 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
 #
@@ -13,13 +14,15 @@ Name:               glusterfs
 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
@@ -27,6 +30,7 @@ BuildRequires:        bison
 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)
@@ -145,28 +149,34 @@ Ten pakiet udostÄ™pnia opartego na FUSE klienta GlusterFS-a.
 
 %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
 
@@ -198,24 +208,9 @@ rm -rf $RPM_BUILD_ROOT
 %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
@@ -227,9 +222,6 @@ rm -rf $RPM_BUILD_ROOT
 %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
@@ -247,28 +239,20 @@ rm -rf $RPM_BUILD_ROOT
 %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
 
@@ -281,20 +265,21 @@ rm -rf $RPM_BUILD_ROOT
 %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
index 10b877a1a79374b4ac5223906759b76c0a681f1b..7167b1232c319c1cb8cc41b3a93726040a2a5b4c 100644 (file)
@@ -33,7 +33,7 @@ start() {
        # 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 @@ start() {
        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 @@ case "$1" in
   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}"
This page took 0.050225 seconds and 4 git commands to generate.