From: Marcin Krol 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 < +-#else ++#elif !defined(GF_LINUX_HOST_OS) + #include + #endif +