2013-11-22 13:26:40 +00:00
|
|
|
|
2013-12-02 13:25:11 +00:00
|
|
|
# %%global prereltag rcfinal
|
2013-11-22 13:26:40 +00:00
|
|
|
%global ntirpcname ntirpc
|
|
|
|
%global ntirpcvers 1.0.0
|
|
|
|
|
2013-12-02 18:19:07 +00:00
|
|
|
%global _hardened_build 1
|
|
|
|
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
|
|
|
|
%global _with_systemd true
|
|
|
|
%endif
|
|
|
|
|
2014-01-04 16:21:56 +00:00
|
|
|
# GlusterFS is not available in EPEL
|
2014-03-31 13:40:29 +00:00
|
|
|
# RHEL currently 3.4.0 client, but nfs-ganesha needs 3.4.2.
|
2014-01-04 16:21:56 +00:00
|
|
|
%if ( ! 0%{?rhel} )
|
|
|
|
%global with_glusterfs true
|
|
|
|
%endif
|
|
|
|
|
2013-11-22 13:26:40 +00:00
|
|
|
Name: nfs-ganesha
|
2014-01-21 19:35:41 +00:00
|
|
|
Version: 2.0.0
|
2014-03-31 13:40:29 +00:00
|
|
|
Release: 7%{?prereltag:.%{prereltag}}%{?dist}
|
2013-11-22 13:26:40 +00:00
|
|
|
Summary: Ganesha NFS Server
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
License: LGPLv3+
|
|
|
|
URL: https://github.com/nfs-ganesha/nfs-ganesha/wiki
|
|
|
|
ExclusiveArch: x86_64
|
|
|
|
ExclusiveArch: aarch64
|
|
|
|
|
2014-01-21 19:35:41 +00:00
|
|
|
Source0: https://github.com/%{name}/%{name}/archive/V%{version}/%{name}-%{version}.tar.gz
|
|
|
|
Source1: https://github.com/%{name}/%{ntirpcname}/archive/v%{ntirpcvers}/%{ntirpcname}-%{ntirpcvers}.tar.gz
|
2013-11-22 13:26:40 +00:00
|
|
|
Source2: nfs-ganesha.service
|
2014-01-02 16:20:03 +00:00
|
|
|
Source3: nfs-ganesha.init
|
|
|
|
Source4: nfs_ganesha.sh
|
2013-11-22 13:26:40 +00:00
|
|
|
Patch1: nfs-ganesha-2.0.0rc5.patch
|
2013-12-11 00:55:15 +00:00
|
|
|
Patch2: nfs-ganesha-2.0.0-lustre-strict.patch
|
2014-01-02 16:20:03 +00:00
|
|
|
Patch3: nfs-ganesha-2.0.0-no-strict-aliasing.patch
|
2013-11-22 13:26:40 +00:00
|
|
|
|
2014-01-21 19:35:41 +00:00
|
|
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
|
2013-11-22 13:26:40 +00:00
|
|
|
# Bundling exception through Fedora 23
|
|
|
|
# https://fedorahosted.org/fpc/ticket/363
|
|
|
|
Provides: bundled(libntirpc)
|
|
|
|
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?_with_systemd:1} )
|
2013-11-22 13:26:40 +00:00
|
|
|
BuildRequires: systemd
|
2014-01-02 16:20:03 +00:00
|
|
|
%endif
|
|
|
|
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
|
|
|
|
BuildRequires: cmake28
|
|
|
|
%else
|
2013-11-22 13:26:40 +00:00
|
|
|
BuildRequires: cmake >= 2.6.3
|
2014-01-02 16:20:03 +00:00
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: doxygen
|
|
|
|
BuildRequires: krb5-devel
|
|
|
|
BuildRequires: dbus-devel
|
|
|
|
BuildRequires: jemalloc-devel
|
2014-01-17 19:06:53 +00:00
|
|
|
%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
|
2014-01-02 16:20:03 +00:00
|
|
|
BuildRequires: xfsprogs-devel
|
2013-11-22 13:26:40 +00:00
|
|
|
BuildRequires: libnfsidmap-devel
|
|
|
|
BuildRequires: libwbclient-devel
|
2014-01-02 16:20:03 +00:00
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
BuildRequires: libcap-devel
|
|
|
|
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?_with_systemd:1} )
|
2013-11-22 13:26:40 +00:00
|
|
|
Requires(post): systemd
|
|
|
|
Requires(preun): systemd
|
|
|
|
Requires(postun): systemd
|
2014-01-02 16:20:03 +00:00
|
|
|
%else
|
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
Requires(preun): /sbin/service
|
|
|
|
Requires(preun): /sbin/chkconfig
|
|
|
|
Requires(postun): /sbin/service
|
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
Requires: dbus
|
|
|
|
Requires: jemalloc
|
2014-03-31 13:40:29 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
NFS-Ganesha is a user mode file server with support for both the
|
|
|
|
NFS suite and 9P, the Plan 9 remote file access protocol. It uses
|
|
|
|
an internal meta data cache and state manager for performance. It
|
|
|
|
also provides support for pNFS for multiple clustered file systems
|
|
|
|
both open source and proprietary. Multiple file systems are supported
|
|
|
|
via loadable back-end drivers. The VFS back-end supports file systems
|
|
|
|
via the kernel. Other back-ends can support user mode library based
|
|
|
|
clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end
|
|
|
|
which operates as an NFSv4 client.
|
|
|
|
|
2014-01-04 16:21:56 +00:00
|
|
|
%if ( 0%{?with_glusterfs:1} )
|
2014-03-31 13:40:29 +00:00
|
|
|
%package fsal-gluster
|
|
|
|
Summary: Ganesha NFS Server GlusterFS FSAL
|
2014-01-06 15:06:27 +00:00
|
|
|
Requires: glusterfs-api >= 3.4.2
|
2014-03-31 13:40:29 +00:00
|
|
|
BuildRequires: glusterfs-api-devel >= 3.4.2
|
|
|
|
|
|
|
|
%description fsal-gluster
|
|
|
|
GlusterFS FSAL for nfs-ganesha
|
2013-11-22 13:26:40 +00:00
|
|
|
|
|
|
|
NFS-Ganesha is a user mode file server with support for both the
|
|
|
|
NFS suite and 9P, the Plan 9 remote file access protocol. It uses
|
|
|
|
an internal meta data cache and state manager for performance. It
|
|
|
|
also provides support for pNFS for multiple clustered file systems
|
|
|
|
both open source and proprietary. Multiple file systems are supported
|
|
|
|
via loadable back-end drivers. The VFS back-end supports file systems
|
|
|
|
via the kernel. Other back-ends can support user mode library based
|
|
|
|
clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end
|
|
|
|
which operates as an NFSv4 client.
|
2014-03-31 13:40:29 +00:00
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
|
2014-05-10 10:24:30 +00:00
|
|
|
%if ( 0%{?with_cephfs} )
|
|
|
|
%package fsal-ceph
|
|
|
|
Summary: Ganesha NFS Server GlusterFS FSAL
|
|
|
|
Requires: ceph >= 0.78
|
|
|
|
BuildRequires: ceph-devel >= 0.78
|
|
|
|
|
|
|
|
%description fsal-ceph
|
|
|
|
Ceph FSAL for nfs-ganesha
|
|
|
|
|
|
|
|
NFS-Ganesha is a user mode file server with support for both the
|
|
|
|
NFS suite and 9P, the Plan 9 remote file access protocol. It uses
|
|
|
|
an internal meta data cache and state manager for performance. It
|
|
|
|
also provides support for pNFS for multiple clustered file systems
|
|
|
|
both open source and proprietary. Multiple file systems are supported
|
|
|
|
via loadable back-end drivers. The VFS back-end supports file systems
|
|
|
|
via the kernel. Other back-ends can support user mode library based
|
|
|
|
clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end
|
|
|
|
which operates as an NFSv4 client.
|
|
|
|
%endif
|
|
|
|
|
2013-11-22 13:26:40 +00:00
|
|
|
%package docs
|
|
|
|
Summary: Ganesha NFS Server Documentation
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description docs
|
|
|
|
Documentation for nfs-ganesha
|
|
|
|
|
|
|
|
NFS-Ganesha is a user mode file server with support for both the
|
|
|
|
NFS suite and 9P, the Plan 9 remote file access protocol. It uses
|
|
|
|
an internal meta data cache and state manager for performance. It
|
|
|
|
also provides support for pNFS for multiple clustered file systems
|
|
|
|
both open source and proprietary. Multiple file systems are supported
|
|
|
|
via loadable back-end drivers. The VFS back-end supports file systems
|
|
|
|
via the kernel. Other back-ends can support user mode library based
|
|
|
|
clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end
|
|
|
|
which operates as an NFSv4 client.
|
|
|
|
|
|
|
|
%prep
|
2013-12-11 00:55:15 +00:00
|
|
|
%setup -q -n %{name}-%{version} -a 1
|
2013-11-22 13:26:40 +00:00
|
|
|
rm -rf contrib/libzfswrapper
|
|
|
|
mv %{ntirpcname}-%{ntirpcvers}/* src/libntirpc/
|
|
|
|
%patch1 -p1
|
2013-12-11 00:55:15 +00:00
|
|
|
%patch2 -p1
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
|
|
|
|
%patch3 -p1
|
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
|
|
|
|
%build
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
|
|
|
|
%global cmake %cmake28
|
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
%cmake -DCMAKE_BUILD_TYPE=Maintainer -DBUILD_CONFIG=everything -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr ./src
|
|
|
|
# _smp_mflags elided due to random build errors (cmake related?)
|
|
|
|
make VERBOSE=1
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install
|
|
|
|
rm %{buildroot}%{_bindir}/libntirpc.*
|
|
|
|
chmod ugo+x %{buildroot}%{_bindir}/ganestat.pl
|
|
|
|
rm %{buildroot}%{_libdir}/ganesha/*.so
|
2014-01-02 16:20:03 +00:00
|
|
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
|
|
|
cp -p src/Docs/*.pdf %{buildroot}%{_pkgdocdir}/
|
|
|
|
%if ( 0%{?_with_systemd:1} )
|
2013-11-22 13:26:40 +00:00
|
|
|
install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/nfs-ganesha.service
|
2014-01-02 16:20:03 +00:00
|
|
|
%else
|
|
|
|
install -D -p -m 0744 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/nfs-ganesha
|
|
|
|
install -D -p -m 0744 %{SOURCE4} %{buildroot}%{_sbindir}/nfs_ganesha.sh
|
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?_with_systemd:1} )
|
2013-11-22 13:26:40 +00:00
|
|
|
%systemd_post nfs-ganesha.service
|
2014-01-02 16:20:03 +00:00
|
|
|
%else
|
|
|
|
/sbin/chkconfig --add nfs-ganesha
|
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
|
|
|
|
%preun
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?_with_systemd:1} )
|
2013-11-22 13:26:40 +00:00
|
|
|
%systemd_preun nfs-ganesha.service
|
2014-01-02 16:20:03 +00:00
|
|
|
%else
|
|
|
|
/sbin/service nfs-ganesha stop &>/dev/null
|
|
|
|
/sbin/chkconfig --del nfs-ganesha
|
|
|
|
/sbin/service nfs-ganesha condrestart &>/dev/null
|
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
|
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?_with_systemd:1} )
|
2013-11-22 13:26:40 +00:00
|
|
|
%systemd_postun_with_restart nfs-ganesha.service
|
2014-01-02 16:20:03 +00:00
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
|
|
|
|
%files
|
2014-01-02 16:20:03 +00:00
|
|
|
%doc src/ChangeLog src/LICENSE.txt src/TODO src/Docs/*.pdf
|
|
|
|
%exclude %{_pkgdocdir}/*.pdf
|
2014-03-31 13:40:29 +00:00
|
|
|
%exclude %{_libdir}/ganesha/libfsalgluster.*
|
2013-11-22 13:26:40 +00:00
|
|
|
%{_libdir}/*
|
|
|
|
%{_bindir}/*
|
2014-01-02 16:20:03 +00:00
|
|
|
%if ( 0%{?_with_systemd:1} )
|
2013-11-22 13:26:40 +00:00
|
|
|
%{_unitdir}/*
|
2014-01-02 16:20:03 +00:00
|
|
|
%else
|
|
|
|
%{_sysconfdir}/init.d/*
|
|
|
|
%{_sbindir}/*
|
|
|
|
%endif
|
2013-11-22 13:26:40 +00:00
|
|
|
|
2014-03-31 13:40:29 +00:00
|
|
|
%if ( 0%{?with_glusterfs:1} )
|
|
|
|
%files fsal-gluster
|
|
|
|
%{_libdir}/ganesha/libfsalgluster.*
|
|
|
|
%endif
|
|
|
|
|
2014-05-10 10:24:30 +00:00
|
|
|
%if ( 0%{?with_cephfs} )
|
|
|
|
%files fsal-ceph
|
|
|
|
%{_libdir}/ganesha/libfsalceph.*
|
|
|
|
%endif
|
|
|
|
|
2013-11-22 13:26:40 +00:00
|
|
|
%files docs
|
2014-01-02 16:20:03 +00:00
|
|
|
%{_pkgdocdir}/LICENSE.txt
|
|
|
|
%{_pkgdocdir}/*
|
|
|
|
%dir %{_pkgdocdir}
|
2013-11-22 13:26:40 +00:00
|
|
|
|
|
|
|
%changelog
|
2014-05-10 10:24:30 +00:00
|
|
|
* Fri May 9 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-7
|
|
|
|
- Ceph FSAL, in a subpackage, (but requires ceph >= 0.78)
|
|
|
|
|
2014-03-31 13:40:29 +00:00
|
|
|
* Mon Mar 31 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
|
|
|
|
- GlusterFS FSAL in a subpackage
|
|
|
|
- EPEL7 has jemalloc as of 2014-02-25
|
|
|
|
|
2014-01-21 19:35:41 +00:00
|
|
|
* Tue Jan 21 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
|
|
|
|
- sussed out github archive so as to allow correct Source0
|
|
|
|
|
2014-01-17 19:06:53 +00:00
|
|
|
* Fri Jan 17 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-6
|
|
|
|
- EPEL7 and xfsprogs
|
|
|
|
|
2014-01-17 14:38:29 +00:00
|
|
|
* Fri Jan 17 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-5
|
|
|
|
- EPEL7
|
|
|
|
|
2014-01-06 15:06:27 +00:00
|
|
|
* Mon Jan 6 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-4
|
|
|
|
- with glusterfs-api(-devel) >= 3.4.2
|
|
|
|
|
2014-01-04 16:21:56 +00:00
|
|
|
* Sat Jan 4 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-3
|
|
|
|
- with glusterfs-api
|
|
|
|
|
2014-01-02 16:20:03 +00:00
|
|
|
* Thu Jan 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-2
|
|
|
|
- Build on RHEL6. Add sample init.d script
|
|
|
|
|
2013-12-11 01:18:46 +00:00
|
|
|
* Wed Dec 11 2013 Jim Lieb <lieb@sea-troll.net> - 2.0.0-1
|
|
|
|
- Update to V2.0.0 release
|
|
|
|
|
2013-11-25 17:58:01 +00:00
|
|
|
* Mon Nov 25 2013 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-0.2.rcfinal
|
|
|
|
- update to RC-final
|
2013-11-25 18:01:01 +00:00
|
|
|
|
|
|
|
* Fri Nov 22 2013 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-0.1.rc5
|
|
|
|
- Initial commit
|