[packages/nfs-ganesha] - initial; needs some split
qboosh
qboosh at pld-linux.org
Wed Jun 18 19:34:52 CEST 2025
commit 6fe1da4b2e85035bfc47b3fe31afaafabbb1d0e9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Jun 18 19:18:05 2025 +0200
- initial; needs some split
nfs-ganesha-build-type.patch | 29 ++++++
nfs-ganesha-typo.patch | 11 +++
nfs-ganesha.spec | 208 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 248 insertions(+)
---
diff --git a/nfs-ganesha.spec b/nfs-ganesha.spec
new file mode 100644
index 0000000..b6f5ed3
--- /dev/null
+++ b/nfs-ganesha.spec
@@ -0,0 +1,208 @@
+# TODO: subpackages
+#
+# Conditional build:
+%bcond_without ceph # Ceph/RADOS FSAL shared library
+%bcond_without glusterfs # GLUSTERFS FSAL shared library
+%bcond_with gssapi # GSSAPI support (requires MIT Kerberos)
+%bcond_without kvsns # KVSFS FSAL shared library
+%bcond_without lizardfs # LizardFS FSAL shared library
+%bcond_without lustre # LUSTRE FSAL shared library
+%bcond_with lttng # LTTng tracing
+%bcond_without prometheus # Prometheus monitoring support
+%bcond_without rdma # RDMA (NFS or 9P) support
+%bcond_without rdma9p # 9P/RDMA support
+
+%if %{without rdma}
+%undefine with_rdma9p
+%endif
+Summary: NFS-Ganesha file server
+Summary(pl.UTF-8): Serwer plików NFS-Ganesha
+Name: nfs-ganesha
+Version: 6.5
+Release: 0.1
+License: LGPL v3+
+Group: Networking/Daemons
+Source0: https://download.nfs-ganesha.org/6/6.5/%{name}-%{version}.tar.gz
+# Source0-md5: 40cba6faf01874465233575232b31cd4
+Patch0: %{name}-build-type.patch
+Patch1: %{name}-typo.patch
+URL: https://www.nfs-ganesha.org/
+BuildRequires: acl-devel
+BuildRequires: ceph-devel >= 1.2.1
+BuildRequires: cmake >= 2.6.3
+BuildRequires: dbus-devel
+%{?with_glusterfs:BuildRequires: glusterfs-devel >= 7.6.6}
+%{?with_gssapi:BuildRequires: krb5-devel}
+%{?with_kvsns:BuildRequires: kvsns-devel}
+BuildRequires: libblkid-devel
+BuildRequires: libbtrfsutil-devel
+BuildRequires: libcap-devel
+%{?with_rdma:BuildRequires: libibverbs-devel}
+BuildRequires: libnfsidmap-devel
+BuildRequires: libsmbclient-devel
+BuildRequires: libstdc++-devel >= 6:7
+%{?with_rdma:BuildRequires: librdmacm-devel}
+BuildRequires: libunwind-devel
+BuildRequires: libuuid-devel
+%{?with_lizardfs:BuildRequires: lizardfs-devel}
+%{?with_lustre:BuildRequires: lustre-devel >= 2.5.0}
+%{?with_rdma9p:BuildRequires: mooshika-devel >= 0.6}
+BuildRequires: ntirpc-devel >= 5.0
+BuildRequires: pkgconfig
+%{?with_prometheus:BuildRequires: prometheus-cpp-lite-devel}
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-PyQt5-uic >= 5
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: sphinx-pdg-3 >= 2
+BuildRequires: sqlite3-devel >= 3
+BuildRequires: userspace-rcu-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# libganesha_nfsd.so.* library: non-function urcu_bp_reader symbol from urcu libs
+# libfsalmem.so.* plugin: non-function op_ctx symbol from libganesha_nfsd
+%define skip_post_check_so libganesha_nfsd.so.*
+# libfsalmem.so.*
+
+%description
+NFS-Ganesha is an NFS v3/v4/v4.1 fileserver that runs in user mode on
+most UNIX/Linux systems. It also supports the 9p.2000L protocol.
+
+%description -l pl.UTF-8
+NFS-Ganesha to system plików NFS v3/v4/v4.1, działający w trybie
+użytkownika na większości systemów uniksowych/linuksowych. Obsługuje
+także protokół 9p.2000L.
+
+%prep
+%setup -q
+%patch -P0 -p1
+%patch -P1 -p1
+
+%{__sed} -i -e 's,set(LIBEXECDIR .*)$,set(LIBEXECDIR "%{_libexecdir}"),' src/CMakeLists.txt
+
+%build
+install -d build
+cd build
+CPPFLAGS="%{rpmcppflags} -I/usr/include/prometheus-cpp-lite"
+%cmake ../src \
+ -DLIB_INSTALL_DIR:PATH=%{_libdir} \
+ -DENABLE_RFC_ACL=ON \
+ -DENABLE_VFS_POSIX_ACL=ON \
+ -DPROXYV4_HANDLE_MAPPING=ON \
+ -DPYUIC=/usr/bin/pyuic5 \
+ -DPython_EXECUTABLE=%{__python3} \
+ %{?with_rdma9p:-DUSE_9P_RDMA=ON} \
+ -DUSE_ACL_MAPPING=ON \
+ -DUSE_ADMIN_TOOLS=ON \
+ %{!?with_ceph:-DUSE_FSAL_CEPH=OFF} \
+ %{!?with_glusterfs:-DUSE_FSAL_GLUSTER=OFF} \
+ %{!?with_kvsns:-DUSE_FSAL_KVSFS=OFF} \
+ %{!?with_lizardfs:-DUSE_FSAL_LIZARDFS=OFF} \
+ %{!?with_lustre:-DUSE_FSAL_LUSTRE=OFF} \
+ %{!?with_gssapi:-DUSE_GSS=OFF} \
+ %{?with_lttng:-DUSE_LTTNG=ON} \
+ -DUSE_MAN_PAGE=ON \
+ %{?with_prometheus:-DUSE_MONITORING=ON} \
+ %{!?with_rdma:-DUSE_NFS_RDMA=OFF} \
+ %{!?with_ceph:-DUSE_RADOS_RECOV=OFF} \
+ %{!?with_ceph:-DUSE_RADOS_URLS=OFF} \
+ -DUSE_SYSTEM_NTIRPC=ON \
+ -DUSE_TOOL_MULTILOCK=ON
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# duplicate of %{_libexecdir}/ganesha/gpfs-epoch
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/gpfs-epoch.py
+# API not exported
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libganesha_nfsd.so
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.md src/README.new_api
+%attr(755,root,root) %{_bindir}/client_stats_9pOps
+%attr(755,root,root) %{_bindir}/export_stats_9pOps
+%attr(755,root,root) %{_bindir}/fake_recall
+%attr(755,root,root) %{_bindir}/ganesha-admin
+%attr(755,root,root) %{_bindir}/ganesha-top
+%attr(755,root,root) %{_bindir}/ganesha.nfsd
+%attr(755,root,root) %{_bindir}/ganesha_conf
+%attr(755,root,root) %{_bindir}/ganesha_logrotate_mgr
+%attr(755,root,root) %{_bindir}/ganesha_mgr
+%attr(755,root,root) %{_bindir}/ganesha_stats
+%attr(755,root,root) %{_bindir}/ganeshactl
+%attr(755,root,root) %{_bindir}/get_clientids
+%attr(755,root,root) %{_bindir}/grace_period
+%attr(755,root,root) %{_bindir}/manage_clients
+%attr(755,root,root) %{_bindir}/manage_exports
+%attr(755,root,root) %{_bindir}/manage_logger
+%attr(755,root,root) %{_bindir}/sm_notify.ganesha
+%attr(755,root,root) %{_libdir}/libganesha_nfsd.so.6.5
+%dir %{_libdir}/ganesha
+%attr(755,root,root) %{_libdir}/ganesha/libfsalgluster.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalgpfs.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalmem.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalnull.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalproxy_v3.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalproxy_v4.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalsaunafs.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalvfs.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalxfs.so
+%if "%{_libexecdir}" != "%{_libdir}"
+%dir %{_libexecdir}/ganesha
+%endif
+%attr(755,root,root) %{_libexecdir}/ganesha/gpfs-epoch
+%dir %{_sysconfdir}/ganesha
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ganesha/ganesha.conf
+%{py3_sitescriptdir}/Ganesha
+%{py3_sitescriptdir}/ganesha_top-%{version}-py*.egg-info
+%{py3_sitescriptdir}/ganeshactl-%{version}-py*.egg-info
+%{py3_sitescriptdir}/gpfs-%{version}-py*.egg-info
+%{_mandir}/man8/ganesha-9p-config.8*
+%{_mandir}/man8/ganesha-cache-config.8*
+%{_mandir}/man8/ganesha-config.8*
+%{_mandir}/man8/ganesha-core-config.8*
+%{_mandir}/man8/ganesha-export-config.8*
+%{_mandir}/man8/ganesha-gluster-config.8*
+%{_mandir}/man8/ganesha-gpfs-config.8*
+%{_mandir}/man8/ganesha-log-config.8*
+%{_mandir}/man8/ganesha-lustre-config.8*
+%{_mandir}/man8/ganesha-proxy-v3-config.8*
+%{_mandir}/man8/ganesha-proxy-v4-config.8*
+%{_mandir}/man8/ganesha-vfs-config.8*
+%{_mandir}/man8/ganesha-xfs-config.8*
+%{_mandir}/man8/ganesha_conf.8*
+
+%if %{with prometheus}
+%attr(755,root,root) %{_libdir}/libgmonitoring.so
+%endif
+
+%if %{with ceph}
+%attr(755,root,root) %{_bindir}/ganesha-rados-grace
+%attr(755,root,root) %{_libdir}/libganesha_rados_recov.so
+%attr(755,root,root) %{_libdir}/libganesha_rados_urls.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalceph.so
+%attr(755,root,root) %{_libdir}/ganesha/libfsalrgw.so
+%endif
+
+%if %{with kvsns}
+%attr(755,root,root) %{_libdir}/ganesha/libfsalkvsfs.so
+%endif
+
+%if %{with lizardfs}
+%attr(755,root,root) %{_libdir}/ganesha/libfsallizardfs.so
+%endif
+
+%if %{with lustre}
+%attr(755,root,root) %{_libdir}/ganesha/libfsallustre.so
+%endif
diff --git a/nfs-ganesha-build-type.patch b/nfs-ganesha-build-type.patch
new file mode 100644
index 0000000..bfe0989
--- /dev/null
+++ b/nfs-ganesha-build-type.patch
@@ -0,0 +1,29 @@
+--- nfs-ganesha-6.5/src/CMakeLists.txt.orig 2025-01-08 22:22:27.000000000 +0100
++++ nfs-ganesha-6.5/src/CMakeLists.txt 2025-04-14 19:04:51.796783278 +0200
+@@ -52,11 +52,11 @@ set(GANESHA_MAJOR_VERSION 6)
+ # increasing starting at 1. Remember to include the "." !!
+ set(GANESHA_MINOR_VERSION .5)
+
+-IF(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+-set(GANESHA_BUILD_RELEASE 1)
+-ELSE()
++IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Maintainer")
+ set(GANESHA_BUILD_RELEASE 0)
+-ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
++ELSE()
++set(GANESHA_BUILD_RELEASE 1)
++ENDIF()
+
+ # needs to come after project()
+ IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR CMAKE_INSTALL_PREFIX STREQUAL "/usr")
+--- nfs-ganesha-4.0/src/cmake/maintainer_mode.cmake.orig 2021-12-21 17:54:23.000000000 +0100
++++ nfs-ganesha-4.0/src/cmake/maintainer_mode.cmake 2022-07-28 17:25:31.579857571 +0200
+@@ -46,8 +46,3 @@ if( CMAKE_BUILD_TYPE STREQUAL "" )
+ set( CMAKE_BUILD_TYPE "Debug" )
+ endif( CMAKE_BUILD_TYPE STREQUAL "" )
+
+-list(FIND ALLOWED_BUILD_TYPES ${CMAKE_BUILD_TYPE} BUILD_TYPE_INDEX)
+-
+-if (BUILD_TYPE_INDEX EQUAL -1)
+- message(SEND_ERROR "${CMAKE_BUILD_TYPE} is not a valid build type.")
+-endif()
diff --git a/nfs-ganesha-typo.patch b/nfs-ganesha-typo.patch
new file mode 100644
index 0000000..89d8501
--- /dev/null
+++ b/nfs-ganesha-typo.patch
@@ -0,0 +1,11 @@
+--- nfs-ganesha-6.5/src/MainNFSD/9p_rdma_dispatcher.c.orig 2025-01-08 22:22:27.000000000 +0100
++++ nfs-ganesha-6.5/src/MainNFSD/9p_rdma_dispatcher.c 2025-04-24 21:47:49.722761363 +0200
+@@ -382,7 +382,7 @@ void *_9p_rdma_dispatcher_thread(void *A
+ /* Set the pthread attributes */
+ PTHREAD_ATTR_init(&attr_thr);
+ PTHREAD_ATTR_setscope(&attr_thr, PTHREAD_SCOPE_SYSTEM);
+- iPTHREAD_ATTR_setdetachstate(&attr_thr, PTHREAD_CREATE_DETACHED);
++ PTHREAD_ATTR_setdetachstate(&attr_thr, PTHREAD_CREATE_DETACHED);
+
+ /* Init RDMA via mooshika */
+ if (msk_init(&trans, &trans_attr))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nfs-ganesha.git/commitdiff/6fe1da4b2e85035bfc47b3fe31afaafabbb1d0e9
More information about the pld-cvs-commit
mailing list