2011-10-05 21:06:52 +02:00
|
|
|
#
|
|
|
|
# spec file for package glusterfs
|
|
|
|
#
|
2014-05-06 00:58:53 +02:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-10-05 21:06:52 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-09-24 05:44:14 +02:00
|
|
|
|
2011-12-02 17:08:48 +01:00
|
|
|
Name: glusterfs
|
2014-07-30 15:53:12 +02:00
|
|
|
Version: 3.5.1
|
2011-12-02 17:08:48 +01:00
|
|
|
Release: 0
|
2014-07-30 15:53:12 +02:00
|
|
|
%define rversion 3.5.1
|
2012-09-24 05:44:14 +02:00
|
|
|
Summary: Aggregating distributed file system
|
2012-11-27 12:21:07 +01:00
|
|
|
License: GPL-2.0 or LGPL-3.0+
|
2012-09-24 05:44:14 +02:00
|
|
|
Group: System/Filesystems
|
2011-12-02 17:08:48 +01:00
|
|
|
Url: http://gluster.org/
|
|
|
|
|
2012-09-24 05:44:14 +02:00
|
|
|
#Git-Clone: git://github.com/gluster/glusterfs
|
2013-02-28 23:06:56 +01:00
|
|
|
#Git-Clone: git://github.com/fvzwieten/lsgvt
|
2014-07-30 15:53:12 +02:00
|
|
|
Source: http://download.gluster.org/pub/gluster/glusterfs/3.5/%version/%name-%version.tar.gz
|
2012-10-31 13:27:28 +01:00
|
|
|
Patch1: glusterfs-date.diff
|
2011-12-02 17:08:48 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-05-06 00:58:53 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2011-12-02 17:08:48 +01:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: flex
|
2013-02-28 23:10:37 +01:00
|
|
|
BuildRequires: libaio-devel
|
2014-05-06 00:58:53 +02:00
|
|
|
BuildRequires: libtool
|
2011-12-02 17:08:48 +01:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: python
|
|
|
|
BuildRequires: readline-devel
|
2012-09-24 05:50:12 +02:00
|
|
|
%if 0%{?sles_version} == 11
|
|
|
|
BuildRequires: fuse-devel >= 2.6.5
|
|
|
|
BuildRequires: libuuid-devel
|
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
%else
|
|
|
|
BuildRequires: pkgconfig(fuse) >= 2.6.5
|
|
|
|
BuildRequires: pkgconfig(libcrypto)
|
2012-09-24 05:44:14 +02:00
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
|
|
BuildRequires: pkgconfig(uuid)
|
2012-09-24 05:50:12 +02:00
|
|
|
%endif
|
2012-11-15 01:51:48 +01:00
|
|
|
%if 0%{?suse_version} >= 1210
|
|
|
|
BuildRequires: systemd
|
|
|
|
%endif
|
2011-12-02 17:08:48 +01:00
|
|
|
Requires: python
|
2011-10-05 21:06:52 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%package -n libgfapi0
|
2012-11-10 01:17:35 +01:00
|
|
|
Summary: GlusterFS API library
|
2012-10-31 13:27:28 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%description -n libgfapi0
|
2012-10-31 13:27:28 +01:00
|
|
|
GlusterFS is a clustered file-system capable of scaling to several
|
|
|
|
petabytes.
|
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%package -n libgfchangelog0
|
|
|
|
Summary: GlusterFS volume changelog translator library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libgfchangelog0
|
|
|
|
GlusterFS is a clustered file-system capable of scaling to several
|
|
|
|
petabytes.
|
|
|
|
|
|
|
|
The goal of this volume translator is to capture changes performed on
|
|
|
|
a GlusterFS volume. The translator needs to be loaded on the server
|
|
|
|
(bricks) and captures changes in a plain text file inside a
|
|
|
|
configured directory path (controlled by the "changelog-dir"
|
|
|
|
directive).
|
|
|
|
|
|
|
|
%package -n libgfrpc0
|
2012-09-24 05:44:14 +02:00
|
|
|
Summary: GlusterFS Remote Procedure Call library
|
|
|
|
Group: System/Libraries
|
2011-10-05 21:06:52 +02:00
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%description -n libgfrpc0
|
2011-10-05 21:06:52 +02:00
|
|
|
GlusterFS is a clustered file-system capable of scaling to several
|
|
|
|
petabytes.
|
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%package -n libgfxdr0
|
2012-09-24 05:44:14 +02:00
|
|
|
Summary: GlusterFS's External Data Representation library
|
|
|
|
Group: System/Libraries
|
2011-10-05 21:06:52 +02:00
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%description -n libgfxdr0
|
2011-10-05 21:06:52 +02:00
|
|
|
GlusterFS is a clustered file-system capable of scaling to several
|
|
|
|
petabytes.
|
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%package -n libglusterfs0
|
2012-09-24 05:44:14 +02:00
|
|
|
Summary: GlusterFS's core library
|
|
|
|
Group: System/Libraries
|
2011-10-05 21:06:52 +02:00
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%description -n libglusterfs0
|
2011-10-05 21:06:52 +02:00
|
|
|
GlusterFS is a clustered file-system capable of scaling to several
|
|
|
|
petabytes.
|
|
|
|
|
|
|
|
%package devel
|
2012-09-24 05:44:14 +02:00
|
|
|
Summary: Development files for glusterfs
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %name = %version
|
2014-05-06 00:58:53 +02:00
|
|
|
Requires: libgfapi0 = %version
|
|
|
|
Requires: libgfchangelog0 = %version
|
|
|
|
Requires: libgfrpc0 = %version
|
|
|
|
Requires: libgfxdr0 = %version
|
|
|
|
Requires: libglusterfs0 = %version
|
2011-10-05 21:06:52 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
GlusterFS is a clustered file-system capable of scaling to several
|
|
|
|
petabytes.
|
|
|
|
|
|
|
|
This package provides development files such as headers and library
|
|
|
|
links.
|
|
|
|
|
|
|
|
%prep
|
2014-05-06 00:58:53 +02:00
|
|
|
%setup -q
|
2012-11-10 01:17:35 +01:00
|
|
|
%patch -P 1 -p1
|
2011-10-05 21:06:52 +02:00
|
|
|
|
|
|
|
%build
|
2014-05-06 00:58:53 +02:00
|
|
|
[ ! -e gf-error-codes.h ] && ./autogen.sh
|
2011-10-05 21:06:52 +02:00
|
|
|
%configure --disable-static
|
|
|
|
# This section is not parallel safe or so due to bison/lex
|
|
|
|
make -C libglusterfs/src
|
|
|
|
make %{?_smp_mflags};
|
|
|
|
|
|
|
|
%install
|
|
|
|
b="%buildroot";
|
2012-10-31 13:27:28 +01:00
|
|
|
make install DESTDIR="$b" docdir="%_docdir/%name"
|
|
|
|
find "$b/%_libdir" -type f -name "*.la" -delete;
|
2011-10-05 21:06:52 +02:00
|
|
|
|
|
|
|
mkdir -p "$b/%_localstatedir/log"/{glusterd,glusterfs,glusterfsd};
|
|
|
|
|
|
|
|
# The things seemingly forgotten by make install.
|
|
|
|
# - Manually populate devel dirs
|
|
|
|
mkdir -p "$b/%_includedir/%name";
|
|
|
|
install -pm0644 libglusterfs/src/*.h "$b/%_includedir/%name/";
|
|
|
|
# - hekafs wants this:
|
|
|
|
mkdir -p "$b/%_includedir/%name"/{rpc,server};
|
|
|
|
install -pm0644 rpc/rpc-lib/src/*.h rpc/xdr/src/*.h \
|
|
|
|
"$b/%_includedir/%name/rpc/";
|
|
|
|
install -pm0644 xlators/protocol/server/src/*.h \
|
|
|
|
"$b/%_includedir/%name/server/";
|
|
|
|
# - init script; there is no SuSE-release in the build env
|
|
|
|
mkdir -p "$b/%_initrddir";
|
|
|
|
install -pm0755 extras/init.d/glusterd-SuSE "$b/%_initrddir/glusterd";
|
|
|
|
# - wrapper umount script?
|
|
|
|
# - logrotate entry
|
|
|
|
mkdir -p "$b/%_localstatedir/log/%name";
|
|
|
|
# - vim syntax
|
|
|
|
|
|
|
|
# - state
|
|
|
|
mkdir -p "$b/%_localstatedir/lib/glusterd";
|
|
|
|
perl -i -pe \
|
|
|
|
's{^(\s*option working-directory )\S+}{$1 %_localstatedir/lib/glusterd}g' \
|
|
|
|
"$b/%_sysconfdir/%name/glusterd.vol";
|
|
|
|
|
|
|
|
# Clean, but must NOT remove .la from dirs not searched by
|
|
|
|
# default, thus maxdepth.
|
|
|
|
find "$b/%_libdir" -maxdepth 1 -type f -name "*.la" -delete;
|
|
|
|
|
|
|
|
# W: wrong-file-end-of-line-encoding
|
|
|
|
perl -i -pe 's{\x0d\x0a}{\x0a}gs' %_docdir/%name/glusterfs-mode.el;
|
|
|
|
|
2012-11-15 01:51:48 +01:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
mkdir -p "$b/%_unitdir";
|
2014-05-06 00:58:53 +02:00
|
|
|
rm -Rf "$b/%_initddir"
|
2012-11-15 01:51:48 +01:00
|
|
|
%endif
|
2014-05-06 00:58:53 +02:00
|
|
|
chmod u-s "$b/%_bindir/fusermount-glusterfs"
|
2014-08-07 01:17:04 +02:00
|
|
|
ln -s service "$b/%_sbindir/rcglusterd"
|
2014-05-06 00:58:53 +02:00
|
|
|
%fdupes %buildroot/%_prefix
|
2011-10-05 21:06:52 +02:00
|
|
|
|
2014-07-30 15:53:12 +02:00
|
|
|
%if 0%{?suse_version} >= 1210
|
2012-11-15 01:51:48 +01:00
|
|
|
%pre
|
|
|
|
%service_add_pre glusterd.service
|
2014-07-30 15:53:12 +02:00
|
|
|
%endif
|
2012-11-15 01:51:48 +01:00
|
|
|
|
2011-10-05 21:06:52 +02:00
|
|
|
%post
|
2014-07-30 15:53:12 +02:00
|
|
|
%if 0%{?suse_version} >= 1210
|
2012-11-15 01:51:48 +01:00
|
|
|
%service_add_post glusterd.service
|
2014-07-30 15:53:12 +02:00
|
|
|
%else
|
|
|
|
%fillup_and_insserv -f glusterd
|
|
|
|
%endif
|
2011-10-05 21:06:52 +02:00
|
|
|
|
|
|
|
%preun
|
2014-07-30 15:53:12 +02:00
|
|
|
%if 0%{?suse_version} >= 1210
|
2012-11-15 01:51:48 +01:00
|
|
|
%service_del_preun glusterd.service
|
2014-07-30 15:53:12 +02:00
|
|
|
%else
|
|
|
|
%stop_on_removal glusterd
|
|
|
|
%endif
|
2011-10-05 21:06:52 +02:00
|
|
|
|
|
|
|
%postun
|
2014-07-30 15:53:12 +02:00
|
|
|
%if 0%{?suse_version} >= 1210
|
2012-11-15 01:51:48 +01:00
|
|
|
%service_del_postun glusterd.service
|
2014-07-30 15:53:12 +02:00
|
|
|
%else
|
|
|
|
%insserv_cleanup
|
|
|
|
%restart_on_update glusterd
|
|
|
|
%endif
|
2011-10-05 21:06:52 +02:00
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%post -n libgfapi0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgfapi0 -p /sbin/ldconfig
|
|
|
|
%post -n libgfchangelog0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgfchangelog0 -p /sbin/ldconfig
|
|
|
|
%post -n libgfrpc0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgfrpc0 -p /sbin/ldconfig
|
|
|
|
%post -n libgfxdr0 -p /sbin/ldconfig
|
|
|
|
%postun -n libgfxdr0 -p /sbin/ldconfig
|
|
|
|
%post -n libglusterfs0 -p /sbin/ldconfig
|
|
|
|
%postun -n libglusterfs0 -p /sbin/ldconfig
|
2011-10-05 21:06:52 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %_sysconfdir/%name
|
|
|
|
%config(noreplace) %_sysconfdir/%name/glusterd.vol
|
2012-11-10 01:17:35 +01:00
|
|
|
%config(noreplace) %_sysconfdir/%name/glusterfs-logrotate
|
2014-05-06 00:58:53 +02:00
|
|
|
%config %_sysconfdir/%name/gluster-rsyslog*.conf
|
|
|
|
%config %_sysconfdir/%name/*.example
|
|
|
|
%config %_sysconfdir/%name/*-logrotate
|
|
|
|
%_bindir/fusermount-glusterfs
|
2011-10-05 21:06:52 +02:00
|
|
|
/sbin/mount.%name
|
2014-05-06 00:58:53 +02:00
|
|
|
%_libexecdir/%name/
|
|
|
|
%_libdir/%name/
|
2011-10-05 21:06:52 +02:00
|
|
|
%_sbindir/gluster*
|
2014-07-30 15:53:12 +02:00
|
|
|
%_sbindir/glfsheal
|
2014-08-07 01:17:04 +02:00
|
|
|
%_sbindir/rcglusterd
|
2014-05-06 00:58:53 +02:00
|
|
|
%_datadir/glusterfs/
|
2012-10-31 13:27:28 +01:00
|
|
|
%_mandir/man*/*
|
2011-10-05 21:06:52 +02:00
|
|
|
%_docdir/%name
|
|
|
|
%_localstatedir/lib/glusterd
|
|
|
|
%_localstatedir/log/%name
|
2014-05-06 00:58:53 +02:00
|
|
|
%python_sitelib/gluster*
|
2012-11-15 01:51:48 +01:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%_unitdir/glusterd.service
|
2014-05-06 00:58:53 +02:00
|
|
|
%else
|
|
|
|
%_initddir/glusterd*
|
2012-11-15 01:51:48 +01:00
|
|
|
%endif
|
2013-02-28 23:06:56 +01:00
|
|
|
%_prefix/lib/ocf
|
2011-10-05 21:06:52 +02:00
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%files -n libgfapi0
|
2012-10-31 13:27:28 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libgfapi.so.0*
|
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%files -n libgfchangelog0
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libgfchangelog.so.0*
|
|
|
|
|
|
|
|
%files -n libgfrpc0
|
2011-10-05 21:06:52 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libgfrpc.so.0*
|
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%files -n libgfxdr0
|
2011-10-05 21:06:52 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libgfxdr.so.0*
|
|
|
|
|
2014-05-06 00:58:53 +02:00
|
|
|
%files -n libglusterfs0
|
2011-10-05 21:06:52 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/libglusterfs.so.0*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_includedir/%name
|
|
|
|
%_libdir/*.so
|
2012-10-31 13:27:28 +01:00
|
|
|
%_libdir/pkgconfig/*.pc
|
2011-12-02 17:08:48 +01:00
|
|
|
|
|
|
|
%changelog
|