ff653f3
861e1ad
# %%global prereltag rcfinal
d762928
%global            ntirpcname ntirpc
6d848cb
%global            ntirpcvers 1.1.0
ff653f3
d762928
%global            _hardened_build 1
f9d3726
6fbb59c
%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
d762928
%global            _with_systemd true
6fbb59c
%endif
6fbb59c
6c1f1e7
# GlusterFS is not available in EPEL
0be2259
# RHEL finally has 3.6.x, but lacks glusterfs-api-devel
37861ec
%if ( ! 0%{?rhel} )
d762928
%global            with_glusterfs true
37861ec
%endif
6c1f1e7
d762928
%global            with_cephfs true
d762928
2480af6
%global            with_admintools true
2480af6
2480af6
# From https://fedoraproject.org/wiki/Packaging:Python#Macros
2480af6
%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
2480af6
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
2480af6
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
2480af6
%endif
2480af6
ff653f3
Name:              nfs-ganesha
6d848cb
Version:           2.1.0
73e3848
Release:           14%{?prereltag:.%{prereltag}}%{?dist}
ff653f3
Summary:           Ganesha NFS Server
ff653f3
Group:             System Environment/Libraries
ff653f3
License:           LGPLv3+
ff653f3
URL:               https://github.com/nfs-ganesha/nfs-ganesha/wiki
ff653f3
ExclusiveArch:     x86_64
ff653f3
ExclusiveArch:     aarch64
ff653f3
d06d882
Source0:           https://github.com/%{name}/%{name}/archive/V%{version}/%{name}-%{version}.tar.gz
d06d882
Source1:           https://github.com/%{name}/%{ntirpcname}/archive/v%{ntirpcvers}/%{ntirpcname}-%{ntirpcvers}.tar.gz
ff653f3
Source2:           nfs-ganesha.service
6fbb59c
Patch3:            nfs-ganesha-2.0.0-no-strict-aliasing.patch
6d848cb
Patch6:            nfs-ganesha-2.1.0-config_parsing.patch
6d848cb
Patch7:            nfs-ganesha-2.1.0-cache_inode_getattr.patch
6d848cb
Patch8:            nfs-ganesha-2.1.0-nfs4_pseudo.patch
6d848cb
Patch9:            nfs-ganesha-2.1.0-config-h.in.cmake.patch
6d848cb
Patch10:           nfs-ganesha-2.1.0-commonlib.patch
6d848cb
Patch11:           nfs-ganesha-2.1.0-nfs4_op_secinfo.patch
fdb5f4f
Patch12:           nfs-ganesha-2.1.0-support-CMakeLists.txt.patch
7f45ba1
Patch13:           nfs-ganesha-2.1.0-cache_inode.patch
7f45ba1
Patch14:           nfs-ganesha-2.1.0-state_lock.patch
ff653f3
d06d882
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
d06d882
ff653f3
# Bundling exception through Fedora 23
ff653f3
# https://fedorahosted.org/fpc/ticket/363
ff653f3
Provides:          bundled(libntirpc)
ff653f3
6fbb59c
%if ( 0%{?_with_systemd:1} )
ff653f3
BuildRequires:     systemd
6fbb59c
%endif
6fbb59c
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
6fbb59c
BuildRequires:     cmake28
6fbb59c
%else
ff653f3
BuildRequires:     cmake >= 2.6.3
6fbb59c
%endif
ff653f3
BuildRequires:     bison
ff653f3
BuildRequires:     flex
ff653f3
BuildRequires:     pkgconfig
ff653f3
BuildRequires:     doxygen
ff653f3
BuildRequires:     krb5-devel
ff653f3
BuildRequires:     dbus-devel
ff653f3
BuildRequires:     jemalloc-devel
f063405
%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
6fbb59c
BuildRequires:     xfsprogs-devel
ff653f3
BuildRequires:     libnfsidmap-devel
ff653f3
BuildRequires:     libwbclient-devel
6fbb59c
%endif
ff653f3
BuildRequires:     libcap-devel
2480af6
%if ( 0%{?with_admintools:1} )
2480af6
BuildRequires:     PyQt4-devel
2480af6
%endif
ff653f3
6fbb59c
%if ( 0%{?_with_systemd:1} )
ff653f3
Requires(post):    systemd
ff653f3
Requires(preun):   systemd
ff653f3
Requires(postun):  systemd
6fbb59c
%else
6fbb59c
Requires(post):   /sbin/chkconfig
6fbb59c
Requires(preun):  /sbin/service
6fbb59c
Requires(preun):  /sbin/chkconfig
6fbb59c
Requires(postun): /sbin/service
6fbb59c
%endif
ff653f3
Requires:          dbus
ff653f3
Requires:          jemalloc
2480af6
%if ( 0%{?with_admintools:1} )
702ac81
Requires:          PyQt4
2480af6
%endif
ad7af46
ad7af46
%description
ad7af46
NFS-Ganesha is a user mode file server with support for both the
ad7af46
NFS suite and 9P, the Plan 9 remote file access protocol. It uses
ad7af46
an internal meta data cache and state manager for performance. It
ad7af46
also provides support for pNFS for multiple clustered file systems
ad7af46
both open source and proprietary. Multiple file systems are supported
ad7af46
via loadable back-end drivers. The VFS back-end supports file systems
ad7af46
via the kernel. Other back-ends can support user mode library based
ad7af46
clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end
ad7af46
which operates as an NFSv4 client.
ad7af46
6c1f1e7
%if ( 0%{?with_glusterfs:1} )
ad7af46
%package fsal-gluster
ad7af46
Summary:           Ganesha NFS Server GlusterFS FSAL
6d848cb
Requires:          glusterfs-api >= 3.5.1
6d848cb
BuildRequires:     glusterfs-api-devel >= 3.5.1
ad7af46
ad7af46
%description fsal-gluster
ad7af46
GlusterFS FSAL for nfs-ganesha
ff653f3
ff653f3
NFS-Ganesha is a user mode file server with support for both the
ff653f3
NFS suite and 9P, the Plan 9 remote file access protocol. It uses
ff653f3
an internal meta data cache and state manager for performance. It
ff653f3
also provides support for pNFS for multiple clustered file systems
ff653f3
both open source and proprietary. Multiple file systems are supported
ff653f3
via loadable back-end drivers. The VFS back-end supports file systems
ff653f3
via the kernel. Other back-ends can support user mode library based
ff653f3
clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end
ff653f3
which operates as an NFSv4 client.
ad7af46
%endif
ff653f3
d762928
%if ( 0%{?with_cephfs:1} )
830a96e
%package fsal-ceph
bee0a6a
Summary:           Ganesha NFS Server Ceph FSAL
830a96e
Requires:          ceph >= 0.78
830a96e
BuildRequires:     ceph-devel >= 0.78
830a96e
830a96e
%description fsal-ceph
830a96e
Ceph FSAL for nfs-ganesha
830a96e
830a96e
NFS-Ganesha is a user mode file server with support for both the
830a96e
NFS suite and 9P, the Plan 9 remote file access protocol. It uses
830a96e
an internal meta data cache and state manager for performance. It
830a96e
also provides support for pNFS for multiple clustered file systems
830a96e
both open source and proprietary. Multiple file systems are supported
830a96e
via loadable back-end drivers. The VFS back-end supports file systems
830a96e
via the kernel. Other back-ends can support user mode library based
830a96e
clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end
830a96e
which operates as an NFSv4 client.
830a96e
%endif
830a96e
ff653f3
%package docs
ff653f3
Summary:           Ganesha NFS Server Documentation
ff653f3
BuildArch:         noarch
ff653f3
ff653f3
%description docs
ff653f3
Documentation for nfs-ganesha
ff653f3
ff653f3
NFS-Ganesha is a user mode file server with support for both the 
ff653f3
NFS suite and 9P, the Plan 9 remote file access protocol. It uses 
ff653f3
an internal meta data cache and state manager for performance. It 
ff653f3
also provides support for pNFS for multiple clustered file systems 
ff653f3
both open source and proprietary. Multiple file systems are supported 
ff653f3
via loadable back-end drivers. The VFS back-end supports file systems 
ff653f3
via the kernel. Other back-ends can support user mode library based 
ff653f3
clusters such as CEPH and GLUSTERFS. There is also a PROXY back-end 
ff653f3
which operates as an NFSv4 client.
ff653f3
ff653f3
%prep
Jim Lieb 2dc956f
%setup -q -n %{name}-%{version} -a 1
ff653f3
rm -rf contrib/libzfswrapper
ff653f3
mv %{ntirpcname}-%{ntirpcvers}/* src/libntirpc/
6fbb59c
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
6fbb59c
%patch3 -p1
6fbb59c
%endif
6d848cb
%patch6 -p1
6d848cb
%patch7 -p1
6d848cb
%patch8 -p1
6d848cb
%patch9 -p1
6d848cb
%patch10 -p1
6d848cb
%patch11 -p1
fdb5f4f
%patch12 -p1
7f45ba1
%patch13 -p1
7f45ba1
%patch14 -p1
ff653f3
ff653f3
%build
6fbb59c
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
6fbb59c
%global cmake %cmake28
6fbb59c
%endif
2480af6
%if ( 0%{?with_admintools:1} )
2480af6
%global config_admin -DUSE_ADMIN_TOOLS=ON
2480af6
%endif
2480af6
%cmake -DCMAKE_BUILD_TYPE=Maintainer -DBUILD_CONFIG=everything -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr %{config_admin} ./src
ff653f3
# _smp_mflags elided due to random build errors (cmake related?)
ff653f3
make VERBOSE=1
ff653f3
ff653f3
%install
ff653f3
make install
ff653f3
rm  %{buildroot}%{_bindir}/libntirpc.*
6fbb59c
mkdir -p %{buildroot}%{_pkgdocdir}
6fbb59c
cp -p src/Docs/*.pdf %{buildroot}%{_pkgdocdir}/
6fbb59c
%if ( 0%{?_with_systemd:1} )
1c34ca1
install -D -p -m 0644 src/scripts/systemd/nfs-ganesha.service %{buildroot}%{_unitdir}/nfs-ganesha.service
6fbb59c
%else
3fae835
install -D -p -m 0744 src/ganesha.init %{buildroot}%{_sysconfdir}/init.d/nfs-ganesha
6fbb59c
%endif
37e22c6
install -D -p -m 0644 src/scripts/systemd/sysconfig/nfs-ganesha %{buildroot}%{_sysconfdir}/sysconfig/nfs-ganesha
2480af6
install -D -p -m 0644 src/scripts/ganeshactl/org.ganesha.nfsd.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.ganesha.nfsd.conf
ff653f3
ff653f3
%post
ff653f3
/sbin/ldconfig
6fbb59c
%if ( 0%{?_with_systemd:1} )
ff653f3
%systemd_post nfs-ganesha.service
6fbb59c
%else
6fbb59c
/sbin/chkconfig --add nfs-ganesha
6fbb59c
%endif
ff653f3
ff653f3
%preun
6fbb59c
%if ( 0%{?_with_systemd:1} )
ff653f3
%systemd_preun nfs-ganesha.service
6fbb59c
%else
6fbb59c
/sbin/service nfs-ganesha stop &>/dev/null
6fbb59c
/sbin/chkconfig --del nfs-ganesha
6fbb59c
/sbin/service nfs-ganesha condrestart &>/dev/null
6fbb59c
%endif
ff653f3
ff653f3
%postun
ff653f3
/sbin/ldconfig
6fbb59c
%if ( 0%{?_with_systemd:1} )
ff653f3
%systemd_postun_with_restart nfs-ganesha.service
6fbb59c
%endif
ff653f3
ff653f3
%files
6d848cb
%doc src/ChangeLog src/LICENSE.txt src/Docs/*.pdf
6fbb59c
%exclude %{_pkgdocdir}/*.pdf
1519577
%if ( 0%{?with_glusterfs:1} )
1519577
%exclude %{_libdir}/ganesha/libfsalgluster.*
1519577
%endif
d762928
%if ( 0%{?with_cephfs:1} )
3fdc8c0
%exclude %{_libdir}/ganesha/libfsalceph.*
3fdc8c0
%endif
ff653f3
%{_libdir}/*
ff653f3
%{_bindir}/*
6fbb59c
%if ( 0%{?_with_systemd:1} )
ff653f3
%{_unitdir}/*
6fbb59c
%else
6fbb59c
%{_sysconfdir}/init.d/*
6fbb59c
%endif
37e22c6
%{_sysconfdir}/sysconfig/*
2480af6
%{_sysconfdir}/dbus-1/system.d/*
2480af6
%if ( 0%{?with_admintools:1} )
2480af6
%{python_sitelib}/*
2480af6
%endif
ff653f3
ad7af46
%if ( 0%{?with_glusterfs:1} )
ad7af46
%files fsal-gluster
ad7af46
%{_libdir}/ganesha/libfsalgluster.*
ad7af46
%endif
ad7af46
d762928
%if ( 0%{?with_cephfs:1} )
830a96e
%files fsal-ceph
830a96e
%{_libdir}/ganesha/libfsalceph.*
830a96e
%endif
830a96e
ff653f3
%files docs
6fbb59c
%{_pkgdocdir}/LICENSE.txt
6fbb59c
%{_pkgdocdir}/*
6fbb59c
%dir %{_pkgdocdir}
ff653f3
ff653f3
%changelog
7f45ba1
* Thu Feb 12 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-14
7f45ba1
- Fedora 23/rawhide build fixes
73e3848
- Ceph restored in EPEL
7f45ba1
a23c9dc
* Mon Jan 19 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-13
0be2259
- Ceph retired from EPEL 7
0be2259
88d11da
* Thu Nov 6 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-12
88d11da
- rebuild after libnfsidmap symbol version revert
88d11da
702ac81
* Wed Oct 29 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-11
702ac81
- PyQt -> PyQt4 typo
702ac81
3fae835
* Mon Oct 27 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-10
3fae835
- use upstream init.d script
3fae835
37861ec
* Thu Oct 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-9
37861ec
- restore exclusion of gluster gfapi on rhel
37861ec
2480af6
* Thu Oct 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-8
2480af6
- install /etc/dbus-1/system.d/org.ganesha.nfsd.conf
2480af6
- build and install admin tools
2480af6
37e22c6
* Mon Sep 29 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-7
37e22c6
- install /etc/sysconfig/nfs-ganesha file
37e22c6
bee0a6a
* Fri Aug 29 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
bee0a6a
- Ceph FSAL typo, #1135437
bee0a6a
496b266
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-6
496b266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
496b266
1c34ca1
* Thu Jul 24 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-5
1c34ca1
- use upstream nfs-ganesha.service
1c34ca1
1e71b60
* Fri Jul 11 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-4
1e71b60
- keep fsal .so files, implementation now uses them
1e71b60
fdb5f4f
* Tue Jul 1 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-3
fdb5f4f
- static libuid2grp
fdb5f4f
41722be
* Tue Jul 1 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-2
41722be
- add libuid2grp.so
41722be
6d848cb
* Mon Jun 30 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-1
6d848cb
- nfs-ganesha-2.1.0 GA
6d848cb
88e77c2
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-10
88e77c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
88e77c2
d762928
* Mon Jun 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-9
d762928
- Ceph FSAL enabled with ceph-0.80
d762928
fe5a967
* Wed May 21 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-8
fe5a967
- getdents()->getdents64(), struct dirent -> struct dirent64
fe5a967
1519577
* Sat May 10 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
3fdc8c0
- and exclude libfsalceph
3fdc8c0
3fdc8c0
* Sat May 10 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
1519577
- exclude libfsalgluster correctly
1519577
830a96e
* Fri May 9 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-7
830a96e
- Ceph FSAL, in a subpackage, (but requires ceph >= 0.78)
830a96e
ad7af46
* Mon Mar 31 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
ad7af46
- GlusterFS FSAL in a subpackage
ad7af46
- EPEL7 has jemalloc as of 2014-02-25
ad7af46
d06d882
* Tue Jan 21 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com>
d06d882
- sussed out github archive so as to allow correct Source0
d06d882
f063405
* Fri Jan 17 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-6
f063405
- EPEL7 and xfsprogs
f063405
ff5c1c3
* Fri Jan 17 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-5
ff5c1c3
- EPEL7
ff5c1c3
f674675
* Mon Jan 6 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-4
f674675
- with glusterfs-api(-devel) >= 3.4.2
f674675
6c1f1e7
* Sat Jan 4 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-3
6c1f1e7
- with glusterfs-api
6c1f1e7
6fbb59c
* Thu Jan 2 2014 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-2
6fbb59c
- Build on RHEL6. Add sample init.d script
6fbb59c
Jim Lieb 37c738d
* Wed Dec 11 2013 Jim Lieb <lieb@sea-troll.net> - 2.0.0-1
Jim Lieb 37c738d
- Update to V2.0.0 release
Jim Lieb 37c738d
49cc5b0
* Mon Nov 25 2013 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-0.2.rcfinal
49cc5b0
- update to RC-final
6d8c908
6d8c908
* Fri Nov 22 2013 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.0.0-0.1.rc5
6d8c908
- Initial commit