From: Marcin Krol <hawk@tld-linux.org>
Date: Mon, 20 Jul 2015 14:03:58 +0000 (+0000)
Subject: - from PLD
X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=9232506a6537d3a2bf57ea09a925590b3c098922;p=packages%2Fglusterfs.git

- from PLD
---

9232506a6537d3a2bf57ea09a925590b3c098922
diff --git a/glusterfs-link.patch b/glusterfs-link.patch
new file mode 100644
index 0000000..263b6ec
--- /dev/null
+++ b/glusterfs-link.patch
@@ -0,0 +1,54 @@
+--- glusterfs-3.3.1/rpc/Makefile.am.orig	2012-12-17 22:48:54.435191720 +0100
++++ glusterfs-3.3.1/rpc/Makefile.am	2012-12-17 22:56:20.508515756 +0100
+@@ -1 +1 @@
+-SUBDIRS = rpc-lib rpc-transport xdr
++SUBDIRS = xdr rpc-lib rpc-transport
+--- glusterfs-3.3.1/rpc/rpc-lib/src/Makefile.am.orig	2012-12-17 22:16:10.205232660 +0100
++++ glusterfs-3.3.1/rpc/rpc-lib/src/Makefile.am	2012-12-17 22:48:22.138525726 +0100
+@@ -3,7 +3,7 @@
+ libgfrpc_la_SOURCES = auth-unix.c rpcsvc-auth.c rpcsvc.c auth-null.c \
+ 	rpc-transport.c xdr-rpc.c xdr-rpcclnt.c rpc-clnt.c auth-glusterfs.c
+ 
+-libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
++libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(top_builddir)/rpc/xdr/src/libgfxdr.la
+ 
+ noinst_HEADERS = rpcsvc.h rpc-transport.h xdr-common.h xdr-rpc.h xdr-rpcclnt.h \
+ 	rpc-clnt.h rpcsvc-common.h protocol-common.h
+--- glusterfs-3.3.1/rpc/xdr/src/Makefile.am.orig	2012-12-17 22:56:45.071848577 +0100
++++ glusterfs-3.3.1/rpc/xdr/src/Makefile.am	2012-12-17 23:12:22.731829033 +0100
+@@ -6,8 +6,7 @@
+ 			-D_GNU_SOURCE -D$(GF_HOST_OS) \
+ 			-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src
+ 
+-libgfxdr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+-		$(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
++libgfxdr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+ 
+ libgfxdr_la_SOURCES =  xdr-generic.c rpc-common-xdr.c \
+ 			glusterfs3-xdr.c \
+--- glusterfs-3.5.1/xlators/features/compress/src/Makefile.am.orig	2014-06-29 11:36:20.398339217 +0200
++++ glusterfs-3.5.1/xlators/features/compress/src/Makefile.am	2014-06-29 11:47:06.574992416 +0200
+@@ -4,10 +4,10 @@
+ 
+ noinst_HEADERS = cdc.h cdc-mem-types.h
+ 
+-cdc_la_LDFLAGS = -module -avoid-version $(LIBZ_LIBS)
++cdc_la_LDFLAGS = -module -avoid-version
+ 
+ cdc_la_SOURCES = cdc.c cdc-helper.c
+-cdc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
++cdc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBZ_LIBS)
+ 
+ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+ -shared -nostartfiles  $(LIBZ_CFLAGS)
+--- glusterfs-3.5.0/configure.ac.orig	2014-05-18 15:51:39.493655451 +0200
++++ glusterfs-3.5.0/configure.ac	2014-05-18 16:29:11.676941834 +0200
+@@ -505,7 +505,7 @@
+ # CDC xlator - check if libz is present if so enable HAVE_LIB_Z
+ echo -n "checking if libz is present... "
+ 
+-PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0],
++PKG_CHECK_MODULES([LIBZ], [zlib >= 1.2.0],
+                   [echo "yes (features requiring zlib enabled)"  AC_DEFINE(HAVE_LIB_Z, 1, [define if zlib is present])],
+                   [echo "no"] )
+ 
diff --git a/glusterfs-noquiet.patch b/glusterfs-noquiet.patch
new file mode 100644
index 0000000..b313ee3
--- /dev/null
+++ b/glusterfs-noquiet.patch
@@ -0,0 +1,21 @@
+--- glusterfs-3.4.0/configure.ac.orig	2013-07-12 19:43:26.000000000 +0200
++++ glusterfs-3.4.0/configure.ac	2013-07-23 17:07:15.203576003 +0200
+@@ -12,18 +12,6 @@
+ 
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
+ 
+-if make --help 2>&1 | grep -q no-print-directory; then
+-   AM_MAKEFLAGS="$AM_MAKEFLAGS --no-print-directory";
+-fi
+-
+-if make --help 2>&1 | grep -q quiet; then
+-   AM_MAKEFLAGS="$AM_MAKEFLAGS --quiet"
+-fi
+-
+-if libtool --help 2>&1 | grep -q quiet; then
+-   AM_LIBTOOLFLAGS="--quiet";
+-fi
+-
+ AC_CONFIG_HEADERS([config.h])
+ 
+ AC_CONFIG_FILES([Makefile
diff --git a/glusterfs.spec b/glusterfs.spec
new file mode 100644
index 0000000..841a42d
--- /dev/null
+++ b/glusterfs.spec
@@ -0,0 +1,385 @@
+# TODO:
+# - Find pidfiles killproc --pidfile ${PIDFILE} -TERM instead of kill -TERM ${PID}
+# - Check transport-ibverbs package and ibverbs bcond
+# - Add passing options from /etc/sysconfig/glusterfsd to glusterfsd
+# - package /etc/glusterfs/glusterfs-logrotate as logrotate config
+# - package in proper emacs/vim locations:
+#   /usr/share/doc/glusterfs/glusterfs-mode.el
+#   /usr/share/doc/glusterfs/glusterfs.vim
+#
+# Conditional build:
+%bcond_without	ibverbs		# ib-verbs transport
+%bcond_without	systemtap	# systemtap/dtrace support
+#
+Summary:	Clustered File Storage that can scale to peta bytes
+Summary(pl.UTF-8):	Klastrowy system przechowywania plików skalujący się do petabajtów
+Name:		glusterfs
+Version:	3.5.3
+Release:	2
+License:	LGPL v3+ or GPL v2 (libraries), GPL v3+ (programs)
+Group:		Applications/System
+Source0:	http://download.gluster.org/pub/gluster/glusterfs/3.5/LATEST/glusterfs-%{version}.tar.gz
+# Source0-md5:	359f9f565fedd3069e1ff4f81fcb14e7
+Source1:	glusterfsd.init
+Patch0:		%{name}-link.patch
+Patch1:		%{name}-noquiet.patch
+Patch2:		no-sysctl-on-linux.patch
+URL:		http://www.gluster.org/
+BuildRequires:	autoconf >= 2.50
+BuildRequires:	automake
+BuildRequires:	bison
+BuildRequires:	device-mapper-devel >= 2.02.79
+BuildRequires:	flex
+BuildRequires:	glib2-devel >= 2.0
+BuildRequires:	libaio-devel
+BuildRequires:	libfuse-devel >= 2.6
+%{?with_ibverbs:BuildRequires:	libibverbs-devel >= 1.0.4}
+BuildRequires:	libtool
+BuildRequires:	libxml2-devel >= 1:2.6.19
+BuildRequires:	openssl-devel
+BuildRequires:	pkgconfig
+BuildRequires:	python >= 1:2.4
+BuildRequires:	readline-devel
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.228
+%{?with_systemtap:BuildRequires:	systemtap-sdt-devel}
+BuildRequires:	zlib-devel >= 1.2.0
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+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.
+
+%description -l pl.UTF-8
+GlusterFS to klastrowy system plików skalujący się do petabajtów.
+Scala różne kawałki miejsca po łączach Infiniband RDMA lub TCP/IP w
+jeden duży, równoległy sieciowy system plików. GlusterFS to jeden z
+najbardziej wyszukanych systemów plików jeśli chodzi o możliwości i
+rozszerzalność. Zapożycza potężną ideę o nazwie Translators z jądra
+GNU Hurd. Duża część kodu GlusterFS działa w przestrzeni użytkownika i
+jest łatwo zarządzalna.
+
+%package common
+Summary:	GlusterFS common files including Translators
+Summary(pl.UTF-8):	Wspólne pliki GlusterFS-a, w tym translatory
+Group:		Libraries
+Requires:	libxml2 >= 1:2.6.19
+Requires:	zlib >= 1.2.0
+
+%description common
+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 includes libglusterfs and glusterfs translator modules
+common to both GlusterFS server and client framework.
+
+%description common -l pl.UTF-8
+GlusterFS to klastrowy system plików skalujący się do petabajtów.
+Scala różne kawałki miejsca po łączach Infiniband RDMA lub TCP/IP w
+jeden duży, równoległy sieciowy system plików. GlusterFS to jeden z
+najbardziej wyszukanych systemów plików jeśli chodzi o możliwości i
+rozszerzalność. Zapożycza potężną ideę o nazwie Translators z jądra
+GNU Hurd. Duża część kodu GlusterFS działa w przestrzeni użytkownika i
+jest łatwo zarządzalna.
+
+Ten pakiet zawiera libglusterfs i moduły translatorów glusterfs
+wspólne dla klienta jak i serwera GlusterFS-a.
+
+%package libs
+Summary:	GlusterFS libraries
+Summary(pl.UTF-8):	Biblioteki GlusterFS-a
+Group:		Libraries
+Conflicts:	glusterfs-common < 3.4.0
+
+%description libs
+GlusterFS libraries.
+
+%description libs -l pl.UTF-8
+Biblioteki GlusterFS-a.
+
+%package devel
+Summary:	GlusterFS development files
+Summary(pl.UTF-8):	Pliki programistyczne GlusterFS-a
+Group:		Development/Libraries
+Requires:	%{name}-libs = %{version}-%{release}
+# -lfl
+Requires:	flex
+Requires:	openssl-devel
+Obsoletes:	glusterfs-static
+
+%description devel
+This package provides the development files for GlusterFS library.
+
+%description devel -l pl.UTF-8
+Ten pakiet udostępnia pliki programistyczne biblioteki GlusterFS-a.
+
+%package -n python-gluster
+Summary:	Python interface to GlusterFS libraries
+Summary(pl.UTF-8):	Interfejs Pythona do bibliotek GlusterFS
+Group:		Libraries/Python
+Requires:	%{name}-libs = %{version}-%{release}
+
+%description -n python-gluster
+Python interface to GlusterFS libraries.
+
+%description -n python-gluster -l pl.UTF-8
+Interfejs Pythona do bibliotek GlusterFS.
+
+%package transport-ibverbs
+Summary:	InfiniBand "verbs" transport plugins for GlusterFS
+Summary(pl.UTF-8):	Wtyczki transportu "verbs" InfiniBand dla GlusterFS-a
+Group:		Libraries
+Requires:	%{name}-common = %{version}-%{release}
+Requires:	libibverbs >= 1.0.4
+
+%description transport-ibverbs
+InfiniBand "verbs" transport plugins for GlusterFS.
+
+%description transport-ibverbs -l pl.UTF-8
+Wtyczki transportu "verbs" InfiniBand dla GlusterFS-a.
+
+%package server
+Summary:	GlusterFS Server
+Summary(pl.UTF-8):	Serwer GlusterFS-a
+Group:		Daemons
+Requires:	%{name}-client = %{version}-%{release}
+Requires:	%{name}-common = %{version}-%{release}
+Requires(post,preun):	/sbin/chkconfig
+Requires:	rc-scripts
+
+%description server
+This package provides the glusterfs server daemon.
+
+%description server -l pl.UTF-8
+Ten pakiet zawiera część serwerową GlusterFS-a.
+
+%package client
+Summary:	GlusterFS Client
+Summary(pl.UTF-8):	Klient GlusterFS
+Group:		Applications/System
+Requires:	%{name}-common = %{version}-%{release}
+Requires:	libfuse >= 2.6
+
+%description client
+This package provides the FUSE based GlusterFS client.
+
+%description client -l pl.UTF-8
+Ten pakiet udostępnia opartego na FUSE klienta GlusterFS-a.
+
+%package resource-agents
+Summary:	OCF Resource Agents for GlusterFS processes
+Summary(pl.UTF-8):	Agenci OCF do monitorowania procesów GlusterFS-a
+Group:		Applications/System
+Requires:	%{name}-server = %{version}-%{release}
+Requires:	resource-agents
+
+%description resource-agents
+OCF Resource Agents for GlusterFS processes.
+
+%description resource-agents -l pl.UTF-8
+Agenci OCF do monitorowania procesów GlusterFS-a.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+#%{__python} gen-headers.py
+#%{__mv} gf-error-codes.h libglusterfs/src
+%configure \
+	--disable-silent-rules \
+	--enable-fusermount \
+	%{!?with_ibverbs:--disable-ibverbs} \
+	--enable-systemtap%{!?with_systemtap:=no} \
+	--with-initdir=/etc/rc.d/init.d
+
+%{__make} -j1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_var}/lib/glusterd}
+
+%{__make} -j1 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
+install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
+cat >>$RPM_BUILD_ROOT%{systemdtmpfilesdir}/gluster.conf <<EOF
+d /var/run/gluster 0755 root root -
+EOF
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/glusterfs/%{version}/*/*.la
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/glusterfs/%{version}/*/*/*.la
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/glusterfs/%{version}/*/*/*/*.la
+
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/glusterfs/benchmarking
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/glusterfs/python/syncdaemon/README.md
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	libs	-p /sbin/ldconfig
+%postun	libs	-p /sbin/ldconfig
+
+%files common
+%defattr(644,root,root,755)
+%doc ChangeLog NEWS README THANKS
+%dir %{_sysconfdir}/%{name}
+%attr(755,root,root) %{_sbindir}/glfsheal
+# NOTE: glusterfs is link to glusterfsd and is needed by client mount
+%attr(755,root,root) %{_sbindir}/glusterfs
+%attr(755,root,root) %{_sbindir}/glusterfsd
+
+%dir %{_libdir}/glusterfs
+
+%dir %{_libdir}/glusterfs/%{version}
+%dir %{_libdir}/glusterfs/%{version}/auth
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/auth/addr.so
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/auth/login.so
+
+%dir %{_libdir}/glusterfs/%{version}/rpc-transport
+%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
+%dir %{_libdir}/glusterfs/%{version}/xlator/debug
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/debug/*.so
+%dir %{_libdir}/glusterfs/%{version}/xlator/encryption
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/encryption/*.so*
+%dir %{_libdir}/glusterfs/%{version}/xlator/features
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/features/*.so*
+%dir %{_libdir}/glusterfs/%{version}/xlator/features/glupy
+%{_libdir}/glusterfs/%{version}/xlator/features/glupy/*.py*
+%dir %{_libdir}/glusterfs/%{version}/xlator/mgmt
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/mgmt/glusterd.so
+%dir %{_libdir}/glusterfs/%{version}/xlator/mount
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/mount/api.so
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/mount/fuse.so
+%dir %{_libdir}/glusterfs/%{version}/xlator/nfs
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/nfs/server.so
+%dir %{_libdir}/glusterfs/%{version}/xlator/performance
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/performance/*.so*
+%dir %{_libdir}/glusterfs/%{version}/xlator/protocol
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/protocol/*.so
+%dir %{_libdir}/glusterfs/%{version}/xlator/storage
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/storage/*.so
+%dir %{_libdir}/glusterfs/%{version}/xlator/system
+%attr(755,root,root) %{_libdir}/glusterfs/%{version}/xlator/system/posix-acl.so
+%dir %{_libdir}/glusterfs/%{version}/xlator/testing
+%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
+
+%attr(755,root,root) %{_libdir}/glusterfs/gsyncd
+%attr(755,root,root) %{_libdir}/glusterfs/gverify.sh
+%attr(755,root,root) %{_libdir}/glusterfs/peer_add_secret_pub
+%attr(755,root,root) %{_libdir}/glusterfs/peer_gsec_create
+
+%dir %{_libdir}/glusterfs/python
+%dir %{_libdir}/glusterfs/python/syncdaemon
+# gsyncd.py is a script, the rest probably don't require *.py
+%{_libdir}/glusterfs/python/syncdaemon/*.py*
+
+%dir %{_datadir}/glusterfs
+%dir %{_datadir}/glusterfs/scripts
+%attr(755,root,root) %{_datadir}/glusterfs/scripts/generate-gfid-file.sh
+%attr(755,root,root) %{_datadir}/glusterfs/scripts/get-gfid.sh
+%attr(755,root,root) %{_datadir}/glusterfs/scripts/gsync-sync-gfid
+%attr(755,root,root) %{_datadir}/glusterfs/scripts/gsync-upgrade.sh
+%attr(755,root,root) %{_datadir}/glusterfs/scripts/post-upgrade-script-for-quota.sh
+%attr(755,root,root) %{_datadir}/glusterfs/scripts/pre-upgrade-script-for-quota.sh
+%attr(755,root,root) %{_datadir}/glusterfs/scripts/slave-upgrade.sh
+
+%{_mandir}/man8/glusterfs.8*
+%{_mandir}/man8/glusterfsd.8*
+%dir %{_var}/log/glusterfs
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgfapi.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgfapi.so.0
+%attr(755,root,root) %{_libdir}/libgfchangelog.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgfchangelog.so.0
+%attr(755,root,root) %{_libdir}/libgfrpc.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgfrpc.so.0
+%attr(755,root,root) %{_libdir}/libgfxdr.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgfxdr.so.0
+%attr(755,root,root) %{_libdir}/libglusterfs.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libglusterfs.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgfapi.so
+%attr(755,root,root) %{_libdir}/libgfchangelog.so
+%attr(755,root,root) %{_libdir}/libgfrpc.so
+%attr(755,root,root) %{_libdir}/libgfxdr.so
+%attr(755,root,root) %{_libdir}/libglusterfs.so
+%{_libdir}/libgfapi.la
+%{_libdir}/libgfchangelog.la
+%{_libdir}/libgfrpc.la
+%{_libdir}/libgfxdr.la
+%{_libdir}/libglusterfs.la
+%dir %{_includedir}/glusterfs
+%{_includedir}/glusterfs/api
+%{_includedir}/glusterfs/gfchangelog
+%{_pkgconfigdir}/glusterfs-api.pc
+%{_pkgconfigdir}/libgfchangelog.pc
+
+%files -n python-gluster
+%defattr(644,root,root,755)
+%dir %{py_sitescriptdir}/gluster
+%{py_sitescriptdir}/gluster/*.py[co]
+
+%if %{with ibverbs}
+%files transport-ibverbs
+%defattr(644,root,root,755)
+%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}/glusterfsd.vol
+%attr(754,root,root) /etc/rc.d/init.d/glusterfsd
+%attr(755,root,root) %{_sbindir}/glusterd
+%{systemdtmpfilesdir}/gluster.conf
+%{_mandir}/man8/glusterd.8*
+%dir %{_var}/lib/glusterd
+%dir %{_var}/run/gluster
+
+%files client
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/fusermount-glusterfs
+%attr(755,root,root) /sbin/mount.glusterfs
+%attr(755,root,root) %{_sbindir}/gluster
+%{_mandir}/man8/gluster.8*
+%{_mandir}/man8/mount.glusterfs.8*
+
+%files resource-agents
+%defattr(644,root,root,755)
+%dir %{_prefix}/lib/ocf/resource.d/glusterfs
+%attr(755,root,root) %{_prefix}/lib/ocf/resource.d/glusterfs/glusterd
+%attr(755,root,root) %{_prefix}/lib/ocf/resource.d/glusterfs/volume
diff --git a/glusterfsd.init b/glusterfsd.init
new file mode 100644
index 0000000..7167b12
--- /dev/null
+++ b/glusterfsd.init
@@ -0,0 +1,103 @@
+#!/bin/sh
+#
+# glusterfsd	GlusterFS Daemon
+#
+# chkconfig:	345 14 89
+#
+# description:	GlusterFS Daemon
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+
+# Get service config - may override defaults
+# [ -f /etc/sysconfig/glusterfsd ] && . /etc/sysconfig/glusterfsd
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+		msg_network_down glusterfsd
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+test -x /usr/sbin/glusterfsd || exit 0
+
+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  
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/glusterfsd
+	else
+		msg_already_running glusterfsd
+	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
+}
+
+condrestart() {
+	if [ -f /var/lock/subsys/glusterfsd ]; then
+		stop
+		start
+	else
+		msg_not_running glusterfsd
+		RETVAL=$1
+	fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  restart)
+	stop
+	start
+	;;
+  try-restart)
+	condrestart 0
+	;;
+  force-reload)
+	condrestart 7
+	;;
+  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}"
+	exit 3
+esac
+
+exit $RETVAL
diff --git a/no-sysctl-on-linux.patch b/no-sysctl-on-linux.patch
new file mode 100644
index 0000000..f5f9ec5
--- /dev/null
+++ b/no-sysctl-on-linux.patch
@@ -0,0 +1,11 @@
+--- glusterfs-3.5.3/xlators/mount/fuse/src/fuse-helpers.c~	2014-11-12 13:51:20.000000000 +0000
++++ glusterfs-3.5.3/xlators/mount/fuse/src/fuse-helpers.c	2014-12-30 19:46:36.645378934 +0000
+@@ -14,7 +14,7 @@
+ #include "fuse-bridge.h"
+ #if defined(GF_SOLARIS_HOST_OS)
+ #include <sys/procfs.h>
+-#else
++#elif !defined(GF_LINUX_HOST_OS)
+ #include <sys/sysctl.h>
+ #endif
+