Merge remote-tracking branch 'origin/f17' into el5

Conflicts:
	.gitignore
	glusterfs.spec
	glusterfsd.init
	glusterfsd.logrotate
	glusterfsd.sysconfig
	sources

Jump from 2.0.9 to 3.3.0 on el5 branch. Intervening commits will have
to be reconstructed from commits on other branches if you want to build
the respective versions for el5.
This commit is contained in:
Kaleb S. KEITHLEY 2012-06-01 07:27:37 -04:00
commit 56f64b9a97
15 changed files with 619 additions and 142 deletions

13
.gitignore vendored
View File

@ -1 +1,14 @@
glusterfs-2.0.9.tar.gz
glusterfs-3.0.5.tar.gz
glusterfs-3.0.7.tar.gz
glusterfs-3.1.1.tar.gz
glusterfs-3.1.2.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
glusterfs-3.2.6.tar.gz
glusterfs-3.3.0.tar.gz

109
glusterd.init Normal file
View File

@ -0,0 +1,109 @@
#!/bin/sh
#
# glusterd Startup script for the glusterfs server
#
# chkconfig: - 20 80
# description: Clustered file-system server
### BEGIN INIT INFO
# Provides: glusterd
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Should-Start:
# Should-Stop:
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: glusterfs server
# Description: Clustered file-system server
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
exe="/usr/sbin/glusterd"
prog="glusterd"
# Fedora File System Layout dictates /run
[ -e /run ] && RUNDIR="/run"
pidf="${RUNDIR:-/var/run}/$prog.pid"
# Set defaults, then source config for eventual overrides
GLUSTERD_NOFILE="65536"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
lockfile=/var/lock/subsys/$prog
start() {
[ -x $exe ] || exit 5
ulimit -n $GLUSTERD_NOFILE
echo -n $"Starting $prog: "
daemon $exe${GLUSTERD_LOGFILE+" -l $GLUSTERD_LOGFILE"}${GLUSTERD_LOGLEVEL+" -L $GLUSTERD_LOGLEVEL"} -p $pidf
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
status $prog
}
rh_status_q() {
rh_status &>/dev/null
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?

6
glusterd.logrotate Normal file
View File

@ -0,0 +1,6 @@
/var/log/glusterfs/*glusterd.vol.log {
missingok
postrotate
/bin/kill -HUP `cat /var/run/glusterd.pid 2>/dev/null` 2>/dev/null || true
endscript
}

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

6
glusterd.sysconfig Normal file
View File

@ -0,0 +1,6 @@
# Change the glusterd service defaults here.
# See "glusterd --help" outpout for defaults and possible values.
#GLUSTERD_LOGFILE="/var/log/gluster/gluster.log"
#GLUSTERD_LOGLEVEL="NORMAL"

View File

@ -0,0 +1,11 @@
--- configure.ac.orig 2012-01-16 13:38:53.020000114 -0500
+++ configure.ac 2012-01-16 13:39:29.177000589 -0500
@@ -431,7 +431,7 @@
linux*)
dnl GF_LINUX_HOST_OS=1
GF_HOST_OS="GF_LINUX_HOST_OS"
- GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -O0"
+ GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -O2"
GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
GF_LDADD="${ARGP_STANDALONE_LDADD}"
GF_FUSE_CFLAGS="-DFUSERMOUNT_DIR=\\\"\$(bindir)\\\""

View File

@ -0,0 +1,23 @@
--- libglusterfs/src/Makefile.am.orig 2011-11-23 14:04:41.810001717 -0500
+++ libglusterfs/src/Makefile.am 2011-11-23 14:30:49.940000394 -0500
@@ -16,6 +16,7 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.c y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
CLEANFILES = graph.lex.c y.tab.c y.tab.h
--- libglusterfs/src/Makefile.in.orig 2011-11-23 14:04:35.995001451 -0500
+++ libglusterfs/src/Makefile.in 2011-11-23 14:31:01.730999353 -0500
@@ -866,7 +866,8 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.c y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,24 @@
--- libglusterfs/src/Makefile.am.orig 2012-05-17 12:30:57.000000000 -0400
+++ libglusterfs/src/Makefile.am 2012-05-18 08:52:55.469998306 -0400
@@ -44,7 +44,8 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
CLEANFILES = graph.lex.c y.tab.c y.tab.h
CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
--- libglusterfs/src/Makefile.in.orig 2012-05-17 12:31:12.000000000 -0400
+++ libglusterfs/src/Makefile.in 2012-05-18 09:02:31.108002281 -0400
@@ -941,7 +941,8 @@
$(LEX) -t $(srcdir)/graph.l > $@
y.tab.h: graph.y
- $(YACC) -d $(srcdir)/graph.y
+ $(YACC) -d -b foo $(srcdir)/graph.y
+ mv foo.tab.h y.tab.h && mv foo.tab.c y.tab.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

6
glusterfs-fuse.logrotate Normal file
View File

@ -0,0 +1,6 @@
/var/log/glusterfs/glusterfs.log {
missingok
postrotate
/usr/bin/killall -HUP gluster 2>/dev/null || true
endscript
}

View File

@ -1,248 +1,505 @@
#define pre rc8
## NOTE: Lots of files in various subdirectories have the same name (such as
## "LICENSE") so this short macro allows us to distinguish them by using their
## directory names (from the source tree) as prefixes for the files.
## Usage: add_to_doc_files subdirname files
%define add_to_doc_files() \
%{__mkdir_p} %{buildroot}%{_docdir}/%{name}-%{version}/%1 ||: ; \
%{__cp} -p %2 %{buildroot}%{_docdir}/%{name}-%{version}/%1
# Possible rpmbuild options
%{?_without_ibverbs:%define _without_ibverbs --disable-ibverbs}
%{?_without_client:%define _without_client --disable-fuse-client}
%{?_without_python:%define _without_python --disable-python}
Summary: GlusterFS - Cluster File System
Name: glusterfs
Version: 2.0.9
Release: 2%{?pre:.%{pre}}%{?dist}
License: GPLv3+
Group: System Environment/Base
URL: http://www.gluster.org/
Source0: http://ftp.gluster.com/pub/gluster/glusterfs/2.0/%{version}/glusterfs-%{version}%{?pre}.tar.gz
Source1: glusterfsd.init
Source2: glusterfsd.sysconfig
Source3: umount.glusterfs
Source4: glusterfs.logrotate
Source5: glusterfsd.logrotate
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
# 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}
# No RDMA Support on s390(x)
%ifarch s390 s390x
%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.3.0
Release: 1%{?dist}
License: GPLv3+ and (GPLv2 or LGPLv3+)
Group: System Environment/Base
Vendor: Red Hat
URL: http://www.gluster.org//docs/index.php/GlusterFS
Source0: http://download.gluster.org/pub/gluster/glusterfs/3.3/%{version}/glusterfs-%{version}.tar.gz
Source1: glusterd.sysconfig
Source2: glusterfsd.sysconfig
Source3: umount.glusterfs
Source4: glusterfs-fuse.logrotate
Source5: glusterd.logrotate
Source6: glusterfsd.logrotate
Patch0: %{name}-3.3.0.libglusterfs.Makefile.patch
Patch1: %{name}-3.2.5.configure.ac.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%if ( 0%{?fedora} && 0%{?fedora} < 17 ) || ( 0%{?rhel} && 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
%{!?_without_ibverbs:BuildRequires: libibverbs-devel}
%{!?_without_client:BuildRequires: fuse-devel}
%{!?_without_python:BuildRequires: python-devel >= 2.4}
BuildRequires: flex, bison, byacc
%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: libxml2-devel openssl-devel
BuildRequires: python-ctypes
Obsoletes: hekafs <= 0.7
Obsoletes: %{name}-libs <= 2.0.0
Obsoletes: %{name}-common < 3.1.0
Provides: %{name}-libs = %{version}-%{release}
Provides: %{name}-common = %{version}-%{release}
Provides: %{name}-core = %{version}-%{release}
%description
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
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 userspace and easily manageable.
is in user space and easily manageable.
This package includes the glusterfs binary, the glusterfsd daemon and the
gluster command line, libglusterfs and glusterfs translator modules common to
both GlusterFS server and client framework.
%package common
Summary: GlusterFS common files for both the client and the server
Group: System Environment/Libraries
Obsoletes: glusterfs-libs < 2.0.0
Provides: glusterfs-libs >= %{version}-%{release}
%if 0%{!?_without_rdma:1}
%package rdma
Summary: GlusterFS rdma support for ib-verbs
Group: Applications/File
BuildRequires: libibverbs-devel
%description common
Requires: %{name} = %{version}-%{release}
%description rdma
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.
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 systems in
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 includes the glusterfs binary, libglusterfs and glusterfs
translator modules common to both GlusterFS server and client framework.
This package provides support to geo-replication.
%endif
%package fuse
Summary: Fuse client
Group: Applications/File
BuildRequires: fuse-devel
%package client
Summary: GlusterFS Client
Group: Applications/File
Requires: fuse
Requires: %{name}-common = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
%description client
Obsoletes: %{name}-client < 3.1.0
Provides: %{name}-client = %{version}-%{release}
%description fuse
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
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 userspace and easily manageable.
This package provides the FUSE based GlusterFS client.
is in user space and easily manageable.
This package provides support to FUSE based clients.
%package server
Summary: GlusterFS Server
Group: System Environment/Daemons
Requires: %{name}-common = %{version}-%{release}
Summary: Clustered file-system server
Group: System Environment/Daemons
Requires: %{name} = %{version}-%{release}
Requires: %{name}-fuse = %{version}-%{release}
%description server
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
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 userspace and easily manageable.
is in user space and easily manageable.
This package provides the glusterfs server daemon.
%package devel
Summary: GlusterFS Development Libraries
Group: Development/Libraries
Requires: %{name}-common = %{version}-%{release}
%package vim
Summary: Vim syntax file
Group: Applications/Text
Requires: vim-common
%description devel
%description vim
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
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 userspace and easily manageable.
is in user space and easily manageable.
Vim syntax file for GlusterFS.
%package devel
Summary: Development Libraries
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
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.
This package provides the development libraries.
%prep
%setup -q -n %{name}-%{version}%{?pre}
# Remove file, it gets re-generated by bison (was causing koji build failures)
rm -f libglusterfs/src/y.tab.c
# Don't get executable sources in the debuginfo package (as of 2.0.0rc7)
chmod -x libglusterfsclient/src/*.{c,h}
%setup -q -n %{name}-%{version}
%patch0 -p0
%patch1 -p0
%build
# Temp disable stack-protector until upstream fixes code
CFLAGS=`echo "%optflags"|sed 's/-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=1/'`
%configure %{?_without_ibverbs} %{?_without_client} %{?_without_python}
./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
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot} examples
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot}
%{__mkdir_p} %{buildroot}/var/log/glusterfs
# 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 hekafs multi-tenant translator
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs/rpc
%{__install} -p -m 0644 rpc/rpc-lib/src/*.h \
%{buildroot}%{_includedir}/glusterfs/rpc/
%{__install} -p -m 0644 rpc/xdr/src/*.h \
%{buildroot}%{_includedir}/glusterfs/rpc/
%{__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
# Remove unwanted files from all of the shared libraries
find %{buildroot}%{_libdir}/glusterfs -name '*.a' -o -name '*.la' | xargs rm -f
%{__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
find %{buildroot}%{_libdir} -name '*.la' -delete
# Remove installed docs, we include them ourselves as %%doc
%{__rm} -rf %{buildroot}%{_datadir}/doc/glusterfs/
# Rename the samples, so we can include them as %%config
for file in %{buildroot}%{_sysconfdir}/glusterfs/*.sample; do
%{__mv} ${file} `dirname ${file}`/`basename ${file} .sample`
done
# Create working directory
%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd
# Clean up the examples we want to include as %%doc
%{__cp} -a doc/examples examples
%{__rm} -f examples/Makefile*
# Update configuration file to /var/lib working directory
sed -i 's|option working-directory /etc/glusterd|option working-directory %{_sharedstatedir}/glusterd|g' \
%{buildroot}%{_sysconfdir}/glusterfs/glusterd.vol
# Install init script and sysconfig file
%{__install} -D -p -m 0755 %{SOURCE1} \
%{buildroot}%{_sysconfdir}/init.d/glusterfsd
%_init_install %{SOURCE7} glusterd
%_init_install %{SOURCE8} glusterfsd
%{__install} -D -p -m 0644 %{SOURCE1} \
%{buildroot}%{_sysconfdir}/sysconfig/glusterd
%{__install} -D -p -m 0644 %{SOURCE2} \
%{buildroot}%{_sysconfdir}/sysconfig/glusterfsd
%if 0%{!?_without_client:1}
# Install wrapper umount script
%{__install} -D -p -m 0755 %{SOURCE3} \
%{buildroot}/sbin/umount.glusterfs
# Client logrotate entry
%{__install} -D -p -m 0644 %{SOURCE4} \
%{buildroot}%{_sysconfdir}/logrotate.d/glusterfs
%endif
%{buildroot}%{_sysconfdir}/logrotate.d/glusterfs-fuse
# Server logrotate entry
%{__install} -D -p -m 0644 %{SOURCE5} \
%{buildroot}%{_sysconfdir}/logrotate.d/glusterd
# Legacy server logrotate entry
%{__install} -D -p -m 0644 %{SOURCE6} \
%{buildroot}%{_sysconfdir}/logrotate.d/glusterfsd
# Install extra documentation
%add_to_doc_files benchmarking extras/benchmarking/{*.c,README,*.sh}
# Install vim syntax plugin
%{__install} -D -p -m 644 extras/glusterfs.vim \
%{buildroot}%{_datadir}/vim/vimfiles/syntax/glusterfs.vim
%clean
%{__rm} -rf %{buildroot}
%post
/sbin/ldconfig
%post common -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun common -p /sbin/ldconfig
%post server
/sbin/chkconfig --add glusterfsd
%preun server
if [ $1 -eq 0 ]; then
/sbin/service glusterfsd stop &>/dev/null || :
/sbin/chkconfig --del glusterfsd
fi
%postun server
if [ $1 -ge 1 ]; then
/sbin/service glusterfsd condrestart &>/dev/null || :
fi
%files common
%doc AUTHORS ChangeLog COPYING NEWS README extras/{glusterfs-mode.el,glusterfs.vim}
%{_docdir}/%{name}-%{version}/benchmarking
%{_libdir}/glusterfs/
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING-GPLV2 COPYING-LGPLV3 INSTALL README THANKS
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterd
%config(noreplace) %{_sysconfdir}/sysconfig/glusterd
%{_libdir}/glusterfs
%{_libdir}/*.so.*
%{_sbindir}/glusterfs
%{_sbindir}/glusterfsd
%{_mandir}/man8/glusterfs.8*
%dir /var/log/glusterfs/
%{_sbindir}/glusterfs*
%{_libexecdir}/glusterfs
# %{_mandir}/man8/*gluster*.8*
%dir %{_localstatedir}/log/glusterfs
%if 0%{!?_without_rdma:1}
%exclude %{_libdir}/glusterfs/%{version}/rpc-transport/rdma*
%endif
%exclude %{_libdir}/glusterfs/%{version}/xlator/mount/fuse*
%exclude %{_libdir}/glusterfs/%{version}/xlator/storage*
%exclude %{_libdir}/glusterfs/%{version}/xlator/features/posix*
%exclude %{_libdir}/glusterfs/%{version}/xlator/protocol/server*
%exclude %{_libdir}/glusterfs/%{version}/xlator/mgmt*
%exclude %{_libdir}/glusterfs/%{version}/xlator/nfs*
%if 0%{!?_without_client:1}
%files client
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterfs
%if 0%{!?_without_rdma:1}
%files rdma
%defattr(-,root,root,-)
%{_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
%{_libdir}/glusterfs/%{version}/xlator/mount/fuse*
# %{_mandir}/man8/mount.glusterfs.8*
/sbin/mount.glusterfs
/sbin/umount.glusterfs
%if 0%{?_with_fusermount:1}
%{_bindir}/fusermount-glusterfs
%endif
%files server
%doc examples/ doc/glusterfs*.vol.sample
%dir %{_sysconfdir}/glusterfs/
%config(noreplace) %{_sysconfdir}/glusterfs/*.vol
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterd
%config(noreplace) %{_sysconfdir}/sysconfig/glusterd
%config(noreplace) %{_sysconfdir}/glusterfs
# Legacy configs
%config(noreplace) %{_sysconfdir}/logrotate.d/glusterfsd
%config(noreplace) %{_sysconfdir}/sysconfig/glusterfsd
%{_sysconfdir}/init.d/glusterfsd
%{_sharedstatedir}/glusterd
%_init_file1
%_init_file2
%{_sbindir}/gluster
%{_sbindir}/glusterd
%{_libdir}/glusterfs/%{version}/xlator/storage*
%{_libdir}/glusterfs/%{version}/xlator/features/posix*
%{_libdir}/glusterfs/%{version}/xlator/protocol/server*
%{_libdir}/glusterfs/%{version}/xlator/mgmt*
%{_libdir}/glusterfs/%{version}/xlator/nfs*
%files vim
%defattr(-,root,root,-)
%doc COPYING-GPLV2 COPYING-LGPLV3
%{_datadir}/vim/vimfiles/syntax/glusterfs.vim
%files devel
%{_includedir}/glusterfs/
%{_includedir}/libglusterfsclient.h
%{_datadir}/glusterfs/*
%{_bindir}/glusterfs-volgen
%exclude %{_libdir}/*.a
%exclude %{_libdir}/*.la
%defattr(-,root,root,-)
%{_includedir}/glusterfs
%exclude %{_includedir}/glusterfs/y.tab.h
%{_libdir}/*.so
%post server
# Legacy server
%_init_enable glusterd
%_init_enable glusterfsd
%preun server
if [ $1 -eq 0 ]; then
%_init_stop glusterfsd
%_init_stop glusterd
%_init_disable glusterfsd
%_init_disable glusterd
fi
if [ $1 -ge 1 ]; then
%_init_restart glusterd
%_init_restart glusterfsd
fi
%changelog
* Thu May 31 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.3.0-1
- Update to 3.3.0
* Wed May 9 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.6-2
- Add BuildRequires: libxml2-devel, BZ 819916
* Wed Mar 21 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.6-1
- Update to 3.2.6
* Thu Feb 16 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.5-8
- rename patch files
* Mon Jan 16 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.5-7
- patch configure.ac to compile -O2 instead of -O0 on Linux.
* Tue Jan 10 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.5-6
- glusterd.init use /run per Fedora File System Layout, or /var/run when
needed
* Tue Jan 3 2012 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.5-5
- revised spec for init.d for fedora<=16, rhel<=6; native systemd for
f17 and rhel7
* Wed Dec 7 2011 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.5-4
- revised sysconfig and init.d scripts. (glusterfsd.{init,sysconfig,service}
should go away, as glusterd is responsible for starting and stopping it.)
* Wed Nov 23 2011 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.5-3
- revised libglusterfs/src/Makefile.* to (re)enable parallel make
* Mon Nov 21 2011 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.5-2
- rhel/epel, init.d for <=6, native systemd for 7
* Thu Nov 17 2011 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.5-1
- Update to 3.2.5
* Wed Nov 16 2011 Kaleb S. KEITHLEY <kkeithle[at]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[at]redhat.com> - 3.2.4-2
- Convert init.d to systemd for f17 and later
* Fri Sep 30 2011 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.4-1
- Update to 3.2.4
* Mon Aug 22 2011 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.3-1
- Update to 3.2.3
* Mon Aug 22 2011 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 3.2.2-1
- Update to 3.2.2
* Fri Aug 19 2011 Kaleb S. KEITHLEY <kkeithle[at]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
- Fix Source0 URL
* Thu Jun 16 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.2.1-1
- Update to 3.2.1
* Tue Jun 01 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.2.0-1
- Update to 3.2.0
* Tue May 10 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.4-1
- Update to 3.1.4
* Sun Mar 19 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.3-1
- Update to 3.1.3
- Merge in more upstream SPEC changes
- Remove patches from GlusterFS bugzilla #2309 and #2311
- Remove inode-gen.patch
* Sun Feb 06 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.2-3
- Add back in legacy SPEC elements to support older branches
* Tue Feb 03 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.2-2
- Add patches from CloudFS project
* Tue Jan 25 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.2-1
- Update to 3.1.2
* Wed Jan 5 2011 Dan Horák <dan[at]danny.cz> - 3.1.1-3
- no InfiniBand on s390(x)
* Sat Jan 1 2011 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.1.1-2
- Update to support readline
- Update to not parallel build
* Mon Dec 27 2010 Silas Sewell <silas@sewell.ch> - 3.1.1-1
- Update to 3.1.1
- Change package names to mirror upstream
* Mon Dec 20 2010 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.0.7-1
- Update to 3.0.7
* Wed Jul 28 2010 Jonathan Steffan <jsteffan@fedoraproject.org> - 3.0.5-1
- Update to 3.0.x
* Sat Apr 10 2010 Jonathan Steffan <jsteffan@fedoraproject.org> - 2.0.9-2
- Move python version requires into a proper BuildRequires otherwise
the spec always turned off python bindings as python is not part
@ -381,4 +638,3 @@ fi
* Sun Jul 15 2007 Matt Paine <matt@mattsoftware.com> - 1.3.pre6
- Initial spec file

View File

@ -32,7 +32,7 @@ lockfile=/var/lock/subsys/$prog
start() {
[ -x $exec ] || exit 5
[ -f $GLUSTERFSD_CONFIG ] || exit 6
[ $GLUSTERFSD_CONFIG -o -f $GLUSTERFSD_CONFIG ] || exit 6
ulimit -n $GLUSTERFSD_NOFILE
echo -n $"Starting $prog: "
daemon $exec${GLUSTERFSD_CONFIG+" -f $GLUSTERFSD_CONFIG"}${GLUSTERFSD_LOGFILE+" -l $GLUSTERFSD_LOGFILE"}${GLUSTERFSD_LOGLEVEL+" -L $GLUSTERFSD_LOGLEVEL"} -p /var/run/glusterfsd.pid

View File

@ -1,4 +1,4 @@
/var/log/glusterfs/glusterfsd.log {
/var/log/glusterfs/*glusterfsd.log /var/log/glusterfs/bricks/*.log {
missingok
postrotate
/bin/kill -HUP `cat /var/run/glusterfsd.pid 2>/dev/null` 2>/dev/null || true

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

@ -4,5 +4,3 @@
#GLUSTERFSD_CONFIG="/etc/glusterfs/glusterfsd.vol"
#GLUSTERFSD_LOGFILE="/var/log/glusterfs/glusterfs.log"
#GLUSTERFSD_LOGLEVEL="NORMAL"
#GLUSTERFSD_NOFILE="65536"

View File

@ -1 +1 @@
0467740f423e32bdf2f66d2cf63467f3 glusterfs-2.0.9.tar.gz
3ddf782421f54c60b9da9607b0c32ec1 glusterfs-3.3.0.tar.gz