[glusterfs] stashing prelim 3.3.0-2

Kaleb S. KEITHLEY kkeithle at fedoraproject.org
Thu Jul 5 19:42:32 UTC 2012


commit 4b4b44ca15fa6c7a6cc81ed6b2b436202d4242d5
Author: Kaleb S. KEITHLEY <kkeithle at redhat.com>
Date:   Thu Jul 5 13:45:05 2012 -0400

    stashing prelim 3.3.0-2

 glusterfs.spec |  140 ++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 110 insertions(+), 30 deletions(-)
---
diff --git a/glusterfs.spec b/glusterfs.spec
index 240183c..914cf24 100644
--- a/glusterfs.spec
+++ b/glusterfs.spec
@@ -25,7 +25,7 @@
 Summary:          Cluster File System
 Name:             glusterfs
 Version:          3.3.0
-Release:          1%{?dist}
+Release:          2%{?dist}
 License:          GPLv3+ and (GPLv2 or LGPLv3+)
 Group:            System Environment/Base
 Vendor:           Red Hat
@@ -121,7 +121,9 @@ This package provides support to ib-verbs library.
 %package geo-replication
 Summary: GlusterFS Geo-replication
 Group: Applications/File
-Requires: %{name} = %{version}-%{release} , python-ctypes , rsync >= 3.0.0
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-server = %{version}-%{release}
+Requires: python-ctypes , rsync >= 3.0.0
 
 %description geo-replication
 GlusterFS is a clustered file-system capable of scaling to several
@@ -173,22 +175,6 @@ is in user space and easily manageable.
 
 This package provides the glusterfs server daemon.
 
-%package vim
-Summary:        Vim syntax file
-Group:          Applications/Text
-Requires:       vim-common
-
-%description vim
-GlusterFS is a clustered file-system capable of scaling to several
-petabytes. 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 systems 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 user space and easily manageable.
-
-Vim syntax file for GlusterFS.
-
 %package devel
 Summary:        Development Libraries
 Group:          Development/Libraries
@@ -245,7 +231,6 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
 %{__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
 find %{buildroot}%{_libdir} -name '*.la' -delete
@@ -282,9 +267,41 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
 %{__install} -D -p -m 0644 %{SOURCE6} \
     %{buildroot}%{_sysconfdir}/logrotate.d/glusterfsd
 
-# Install vim syntax plugin
-%{__install} -D -p -m 644 extras/glusterfs.vim \
-    %{buildroot}%{_datadir}/vim/vimfiles/syntax/glusterfs.vim
+%if 0%{!?_without_georeplication:1}
+# geo-rep ghosts
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/geo-replication
+touch %{buildroot}%{_sharedstatedir}/glusterd/geo-replication/gsyncd.conf
+%endif
+
+# the rest of the ghosts
+touch %{buildroot}%{_sharedstatedir}/glusterd/glusterd.info
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/post
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/pre
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/post
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/pre
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick/post
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/post
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/pre
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/post
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/pre
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create/post
+%{__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/glustershd
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/vols
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/nfs
+%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/peers
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -306,6 +323,7 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
 %{_libexecdir}/glusterfs
 #%{_mandir}/man8/*gluster*.8* # man page install commented out in 3.3.0 source
 %dir %{_localstatedir}/log/glusterfs
+%dir %{_sharedstatedir}/glusterd
 %if 0%{!?_without_rdma:1}
 %exclude %{_libdir}/glusterfs/%{version}/rpc-transport/rdma*
 %endif
@@ -327,13 +345,13 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
 %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/*
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/geo-replication
+%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/geo-replication/gsyncd.conf
 %endif
 
 %files fuse
@@ -356,7 +374,6 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
 # Legacy configs
 %config(noreplace) %{_sysconfdir}/logrotate.d/glusterfsd
 %config(noreplace) %{_sysconfdir}/sysconfig/glusterfsd
-%{_sharedstatedir}/glusterd
 %_init_file1
 %_init_file2
 %{_sbindir}/gluster
@@ -366,13 +383,39 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
 %{_libdir}/glusterfs/%{version}/xlator/protocol/server*
 %{_libdir}/glusterfs/%{version}/xlator/mgmt*
 %{_libdir}/glusterfs/%{version}/xlator/nfs*
+%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/glusterd.info
+# This is really ugly, but I have no idea how to mark these directories in an
+# other way. They should belong to the glusterfs-server package, but don't
+# exist after installation. They are generated on the first start...
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/post
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/post
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/pre
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/post
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/post
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/pre
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/post
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/pre
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/pre
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glustershd
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/vols
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs
+%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/peers
 
 
-%files vim
-%defattr(-,root,root,-)
-%doc COPYING-GPLV2 COPYING-LGPLV3
-%{_datadir}/vim/vimfiles/syntax/glusterfs.vim
-
 %files devel
 %defattr(-,root,root,-)
 %{_includedir}/glusterfs
@@ -384,6 +427,40 @@ sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sha
 %_init_enable glusterd
 %_init_enable glusterfsd
 
+# Genuine Fedora (and EPEL) builds never put gluster files in /etc; if 
+# there are any files in /etc from a prior gluster.org install, move them
+# to /var/lib. (N.B. Starting with 3.3.0 all gluster files are in /var/lib
+# in gluster.org RPMs.) Be careful to copy them on the off chance that 
+# /etc and /var/lib are on separate file systems
+if [ -d /etc/glusterd ]; then
+    %{__mkdir_p} /var/lib
+    cp -a /etc/glusterd /var/lib
+    rm -rf /etc/glusterd
+    ln -sf /var/lib/glusterd /etc/glusterd
+fi
+
+# Rename old volfiles in an RPM-standard way.  These aren't actually
+# considered package config files, so %config doesn't work for them.
+if [ -d /var/lib/glusterd/vols ]; then
+    for file in $(find /var/lib/glusterd/vols -name '*.vol'); do
+        newfile=${file}.rpmsave
+        echo "warning: ${file} saved as ${newfile}"
+        cp ${file} ${newfile}
+    done
+fi
+
+#add marker translator
+pidof -c -o %PPID -x glusterd &> /dev/null
+if [ $? -eq 0 ]; then
+    kill -9 `pgrep -f gsyncd.py` &> /dev/null
+
+    killall glusterd &> /dev/null
+    glusterd --xlator-option *.upgrade=on -N
+    glusterd
+else
+    glusterd --xlator-option *.upgrade=on -N
+fi
+
 %preun server
 if [ $1 -eq 0 ]; then
     %_init_stop glusterfsd
@@ -397,6 +474,9 @@ if [ $1 -ge 1 ]; then
 fi
 
 %changelog
+* Thu Jul 5 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.3.0-2
+- selected fixes to glusterfs.spec from BZs 826836, 826855, 829734, 834847
+
 * Thu May 31 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.3.0-1
 - Update to 3.3.0
 


More information about the scm-commits mailing list