kkeithle pushed to nfs-ganesha (epel7). "2.2.0-0.1rc1 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 21 18:08:58 UTC 2015


>From 4d4c9a4f898166f6d11060c2e7c5e5befd0bbbc9 Mon Sep 17 00:00:00 2001
From: "Kaleb S. KEITHLEY" <kkeithle at redhat.com>
Date: Fri, 13 Feb 2015 13:23:18 -0500
Subject: 2.2.0-0.1rc1

- nfs-ganesha.spec based on upstream

diff --git a/nfs-ganesha.spec b/nfs-ganesha.spec
index 89c10b3..fe94665 100644
--- a/nfs-ganesha.spec
+++ b/nfs-ganesha.spec
@@ -1,183 +1,317 @@
 
-# %%global prereltag rcfinal
-%global            ntirpcname ntirpc
-%global            ntirpcvers 1.1.0
-
 %global            _hardened_build 1
 
-%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
-%global            _with_systemd true
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
+%global with_nfsidmap 1
+%else
+%global with_nfsidmap 0
 %endif
 
-# GlusterFS is not available in EPEL
-# RHEL finally has 3.6.x, but lacks glusterfs-api-devel
-%if ( ! 0%{?rhel} )
-%global            with_glusterfs true
+%if ( 0%{?fedora} >= 18 || 0%{?rhel} >= 7 )
+%global with_systemd 1
+%else
+%global with_systemd 0
 %endif
 
-%global            with_cephfs true
+# Conditionally enable some FSALs, disable others.
+#
+# 1. rpmbuild accepts these options (gpfs as example):
+#    --with gpfs
+#    --without gpfs
 
-%global            with_admintools true
+%define on_off_switch() %%{?with_%1:ON}%%{!?with_%1:OFF}
 
-# From https://fedoraproject.org/wiki/Packaging:Python#Macros
-%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-%endif
+# A few explanation about %%bcond_with and %%bcond_without
+# /!\ be careful: this syntax can be quite messy
+# %%bcond_with means you add a "--with" option, default = without this feature
+# %%bcond_without adds a"--without" so the feature is enabled by default
 
-Name:              nfs-ganesha
-Version:           2.1.0
-Release:           14%{?prereltag:.%{prereltag}}%{?dist}
-Summary:           Ganesha NFS Server
-Group:             System Environment/Libraries
-License:           LGPLv3+
-URL:               https://github.com/nfs-ganesha/nfs-ganesha/wiki
-ExclusiveArch:     x86_64
-ExclusiveArch:     aarch64
+#%%bcond_without gpfs
+%global use_fsal_gpfs OFF
 
-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
-Source2:           nfs-ganesha.service
-Patch3:            nfs-ganesha-2.0.0-no-strict-aliasing.patch
-Patch6:            nfs-ganesha-2.1.0-config_parsing.patch
-Patch7:            nfs-ganesha-2.1.0-cache_inode_getattr.patch
-Patch8:            nfs-ganesha-2.1.0-nfs4_pseudo.patch
-Patch9:            nfs-ganesha-2.1.0-config-h.in.cmake.patch
-Patch10:           nfs-ganesha-2.1.0-commonlib.patch
-Patch11:           nfs-ganesha-2.1.0-nfs4_op_secinfo.patch
-Patch12:           nfs-ganesha-2.1.0-support-CMakeLists.txt.patch
-Patch13:           nfs-ganesha-2.1.0-cache_inode.patch
-Patch14:           nfs-ganesha-2.1.0-state_lock.patch
+%bcond_without xfs
+%global use_fsal_xfs %{on_off_switch xfs}
 
-%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+%bcond_without ceph
+%global use_fsal_ceph %{on_off_switch ceph}
+
+#%%bcond_with lustre
+%global use_fsal_lustre OFF
+
+#%%bcond_with shook
+%global use_fsal_shook OFF
+
+%bcond_without gluster
+%global use_fsal_gluster %{on_off_switch gluster}
+
+#%%bcond_with hpss
+%global use_fsal_hpss OFF
+
+#%%bcond_without panfs
+%global use_fsal_panfs OFF
+
+#%%bcond_with pt
+%global use_fsal_pt OFF
+
+%bcond_with rdma
+%global use_rdma %{on_off_switch rdma}
+
+%bcond_without jemalloc
+
+#%%bcond_with lustre_up
+%global use_lustre_up OFF
+
+#%%bcond_with lttng
+%global use_lttng OFF
+
+%bcond_without utils
+%global use_utils %{on_off_switch utils}
+
+%global dev_version %{lua: extraver = string.gsub('-rc1', '%-', ''); print(extraver) }
+
+%global		ntirpcname	ntirpc
+%global		ntirpcvers	1.2.0
+%global		versiontag	2.2-rc1
+
+Name:		nfs-ganesha
+Version:	2.2.0
+Release:	0.1%{?dev_version:%{dev_version}}%{?dist}
+Summary:	NFS-Ganesha is a NFS Server running in user space
+Group:		Applications/System
+License:	LGPLv3+
+Url:		https://github.com/nfs-ganesha/nfs-ganesha/wiki
+
+Source0:	 https://github.com/%{name}/%{name}/archive/V%{versiontag}/%{name}-%{version}%{dev_version}.tar.gz
+Source1:	https://github.com/%{name}/%{ntirpcname}/archive/v%{ntirpcvers}/%{ntirpcname}-%{ntirpcvers}.tar.gz
+Patch13:	nfs-ganesha-2.1.0-cache_inode.patch
+Patch14:	nfs-ganesha-2.1.0-state_lock.patch
 
-# Bundling exception through Fedora 23
-# https://fedorahosted.org/fpc/ticket/363
-Provides:          bundled(libntirpc)
 
-%if ( 0%{?_with_systemd:1} )
-BuildRequires:     systemd
-%endif
 %if ( 0%{?rhel} && 0%{?rhel} < 7 )
 BuildRequires:     cmake28
 %else
-BuildRequires:     cmake >= 2.6.3
-%endif
-BuildRequires:     bison
-BuildRequires:     flex
-BuildRequires:     pkgconfig
-BuildRequires:     doxygen
-BuildRequires:     krb5-devel
-BuildRequires:     dbus-devel
-BuildRequires:     jemalloc-devel
-%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
-BuildRequires:     xfsprogs-devel
-BuildRequires:     libnfsidmap-devel
-BuildRequires:     libwbclient-devel
-%endif
-BuildRequires:     libcap-devel
-%if ( 0%{?with_admintools:1} )
-BuildRequires:     PyQt4-devel
-%endif
-
-%if ( 0%{?_with_systemd:1} )
-Requires(post):    systemd
-Requires(preun):   systemd
-Requires(postun):  systemd
+BuildRequires:	cmake
+%endif
+BuildRequires:	bison flex
+BuildRequires:	flex
+BuildRequires:	pkgconfig
+BuildRequires:	krb5-devel
+BuildRequires:	dbus-devel
+BuildRequires:	libcap-devel
+BuildRequires:	libblkid-devel
+BuildRequires:	libuuid-devel
+Requires:	dbus
+%if %{with_nfsidmap}
+BuildRequires:	libnfsidmap-devel
 %else
-Requires(post):   /sbin/chkconfig
-Requires(preun):  /sbin/service
-Requires(preun):  /sbin/chkconfig
-Requires(postun): /sbin/service
+BuildRequires:	nfs-utils-lib-devel
+%endif
+%if %{with rdma}
+BuildRequires:	libmooshika-devel >= 0.6-0
+%endif
+%if %{with jemalloc}
+BuildRequires:	jemalloc-devel
+%endif
+%if %{with lustre_up}
+BuildRequires: lcap-devel >= 0.1-0
 %endif
-Requires:          dbus
-Requires:          jemalloc
-%if ( 0%{?with_admintools:1} )
-Requires:          PyQt4
+%if %{with_systemd}
+BuildRequires: systemd
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+%else
+BuildRequires:	initscripts
 %endif
 
+# Use CMake variables
+
 %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.
-
-%if ( 0%{?with_glusterfs:1} )
-%package fsal-gluster
-Summary:           Ganesha NFS Server GlusterFS FSAL
-Requires:          glusterfs-api >= 3.5.1
-BuildRequires:     glusterfs-api-devel >= 3.5.1
-
-%description fsal-gluster
-GlusterFS 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
-
-%if ( 0%{?with_cephfs:1} )
-%package fsal-ceph
-Summary:           Ganesha NFS Server Ceph 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
-
-%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.
+nfs-ganesha : NFS-GANESHA is a NFS Server running in user space.
+It comes with various back-end modules (called FSALs) provided as
+ shared objects to support different file systems and name-spaces.
+
+%package mount-9P
+Summary: a 9p mount helper
+Group: Applications/System
+
+%description mount-9P
+This package contains the mount.9P script that clients can use
+to simplify mounting to NFS-GANESHA. This is a 9p mount helper.
+
+%package vfs
+Summary: The NFS-GANESHA's VFS FSAL
+Group: Applications/System
+BuildRequires: libattr-devel
+Requires: nfs-ganesha
+
+%description vfs
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support VFS based filesystems
+
+%package nullfs
+Summary: The NFS-GANESHA's NULLFS Stackable FSAL
+Group: Applications/System
+
+%description nullfs
+This package contains a Stackable FSAL shared object to
+be used with NFS-Ganesha. This is mostly a template for future (more sophisticated) stackable FSALs
+
+%package proxy
+Summary: The NFS-GANESHA's PROXY FSAL
+Group: Applications/System
+BuildRequires: libattr-devel
+Requires: nfs-ganesha
+
+%description proxy
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support PROXY based filesystems
+
+%if %{with utils}
+%package utils
+Summary: The NFS-GANESHA's util scripts
+Group: Applications/System
+BuildRequires:	PyQt4-devel
+Requires:	PyQt4
+Requires: nfs-ganesha python
+
+%description utils
+This package contains utility scripts for managing the NFS-GANESHA server
+%endif
+
+%if %{with lttng}
+%package lttng
+Summary: The NFS-GANESHA's library for use with LTTng
+Group: Applications/System
+BuildRequires: lttng-ust-devel >= 2.3
+Requires: nfs-ganesha, lttng-tools >= 2.3,  lttng-ust >= 2.3
+
+%description lttng
+This package contains the libganesha_trace.so library. When preloaded
+to the ganesha.nfsd server, it makes it possible to trace using LTTng.
+%endif
+
+# Option packages start here. use "rpmbuild --with lustre" (or equivalent)
+# for activating this part of the spec file
+
+# GPFS
+%if %{with gpfs}
+%package gpfs
+Summary: The NFS-GANESHA's GPFS FSAL
+Group: Applications/System
+
+%description gpfs
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support GPFS backend
+%endif
+
+# CEPH
+%if %{with ceph}
+%package ceph
+Summary: The NFS-GANESHA's CEPH FSAL
+Group: Applications/System
+Requires:	ceph >= 0.78
+BuildRequires:	ceph-devel >= 0.78
+
+%description ceph
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support CEPH
+%endif
+
+# LUSTRE
+%if %{with lustre}
+%package lustre
+Summary: The NFS-GANESHA's LUSTRE FSAL
+Group: Applications/System
+Requires:	lustre nfs-ganesha
+BuildRequires:	libattr-devel lustre
+
+%description lustre
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support LUSTRE
+%endif
+
+# SHOOK
+%if %{with shook}
+%package shook
+Summary: The NFS-GANESHA's LUSTRE/SHOOK FSAL
+Group: Applications/System
+Requires:	lustre shook-client nfs-ganesha
+BuildRequires:	libattr-devel lustre shook-devel
+
+%description shook
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support LUSTRE via SHOOK
+%endif
+
+# XFS
+%if %{with xfs}
+%package xfs
+Summary: The NFS-GANESHA's XFS FSAL
+Group: Applications/System
+Requires:	nfs-ganesha
+BuildRequires:	libattr-devel xfsprogs-devel
+
+%description xfs
+This package contains a shared object to be used with FSAL_VFS
+to support XFS correctly
+%endif
+
+# HPSS
+%if %{with hpss}
+%package hpss
+Summary: The NFS-GANESHA's HPSS FSAL
+Group: Applications/System
+Requires:	nfs-ganesha
+#BuildRequires:	hpssfs
+
+%description hpss
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support HPSS
+%endif
+
+# PANFS
+%if %{with panfs}
+%package panfs
+Summary: The NFS-GANESHA's PANFS FSAL
+Group: Applications/System
+Requires:	nfs-ganesha
+
+%description panfs
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support PANFS
+%endif
+
+# PT
+%if %{with pt}
+%package pt
+Summary: The NFS-GANESHA's PT FSAL
+Group: Applications/System
+Requires:	nfs-ganesha
+
+%description pt
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support PT
+%endif
+
+# GLUSTER
+%if %{with gluster}
+%package gluster
+Summary: The NFS-GANESHA's GLUSTER FSAL
+Group: Applications/System
+Requires:	nfs-ganesha
+BuildRequires:	glusterfs-api-devel >= 3.5.1
+BuildRequires:	libattr-devel
+
+%description gluster
+This package contains a FSAL shared object to
+be used with NFS-Ganesha to support Gluster
+%endif
 
 %prep
-%setup -q -n %{name}-%{version} -a 1
+%setup -q -n %{name}-%{versiontag} -a 1
 rm -rf contrib/libzfswrapper
 mv %{ntirpcname}-%{ntirpcvers}/* src/libntirpc/
-%if ( 0%{?rhel} && 0%{?rhel} < 7 )
-%patch3 -p1
-%endif
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
 %patch13 -p1
 %patch14 -p1
 
@@ -185,87 +319,254 @@ mv %{ntirpcname}-%{ntirpcvers}/* src/libntirpc/
 %if ( 0%{?rhel} && 0%{?rhel} < 7 )
 %global cmake %cmake28
 %endif
-%if ( 0%{?with_admintools:1} )
-%global config_admin -DUSE_ADMIN_TOOLS=ON
+%cmake ./src -DCMAKE_BUILD_TYPE=Debug			\
+	-DBUILD_CONFIG=rpmbuild				\
+	-DUSE_FSAL_ZFS=NO				\
+	-DUSE_FSAL_XFS=%{use_fsal_xfs}			\
+	-DUSE_FSAL_CEPH=%{use_fsal_ceph}		\
+	-DUSE_FSAL_LUSTRE=%{use_fsal_lustre}		\
+	-DUSE_FSAL_SHOOK=%{use_fsal_shook}		\
+	-DUSE_FSAL_GPFS=%{use_fsal_gpfs}		\
+	-DUSE_FSAL_HPSS=%{use_fsal_hpss}		\
+	-DUSE_FSAL_PANFS=%{use_fsal_panfs}		\
+	-DUSE_FSAL_PT=%{use_fsal_pt}			\
+	-DUSE_FSAL_GLUSTER=%{use_fsal_gluster}		\
+	-DUSE_9P_RDMA=%{use_rdma}			\
+	-DUSE_FSAL_LUSTRE_UP=%{use_lustre_up}		\
+	-DUSE_LTTNG=%{use_lttng}			\
+	-DUSE_ADMIN_TOOLS=%{use_utils}			\
+	-DUSE_FSAL_VFS=ON				\
+	-DUSE_FSAL_PROXY=ON				\
+	-DUSE_DBUS=ON					\
+	-DUSE_9P=ON					\
+	-DDISTNAME_HAS_GIT_DATA=OFF			\
+	-DCMAKE_INSTALL_PREFIX=				\
+%if %{with jemalloc}
+	-DALLOCATOR=jemalloc
 %endif
-%cmake -DCMAKE_BUILD_TYPE=Maintainer -DBUILD_CONFIG=everything -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr %{config_admin} ./src
-# _smp_mflags elided due to random build errors (cmake related?)
-make VERBOSE=1
+
+make %{?_smp_mflags} || make %{?_smp_mflags} || make
 
 %install
-make install
-rm  %{buildroot}%{_bindir}/libntirpc.*
-mkdir -p %{buildroot}%{_pkgdocdir}
-cp -p src/Docs/*.pdf %{buildroot}%{_pkgdocdir}/
-%if ( 0%{?_with_systemd:1} )
-install -D -p -m 0644 src/scripts/systemd/nfs-ganesha.service %{buildroot}%{_unitdir}/nfs-ganesha.service
+mkdir -p %{buildroot}%{_sysconfdir}/ganesha/
+mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
+mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_sbindir}
+mkdir -p %{buildroot}%{_libdir}/ganesha
+mkdir -p %{buildroot}%{_localstatedir}/run/ganesha
+install -m 644 src/config_samples/logrotate_ganesha	%{buildroot}%{_sysconfdir}/logrotate.d/ganesha
+install -m 644 src/scripts/ganeshactl/org.ganesha.nfsd.conf	%{buildroot}%{_sysconfdir}/dbus-1/system.d
+install -m 755 src/tools/mount.9P	%{buildroot}%{_sbindir}/mount.9P
+
+install -m 644 src/config_samples/vfs.conf %{buildroot}%{_sysconfdir}/ganesha
+
+%if %{with_systemd}
+mkdir -p %{buildroot}%{_unitdir}
+install -m 644 src/scripts/systemd/nfs-ganesha.service	%{buildroot}%{_unitdir}/nfs-ganesha.service
+install -m 644 src/scripts/systemd/nfs-ganesha-lock.service	%{buildroot}%{_unitdir}/nfs-ganesha-lock.service
+install -m 644 src/scripts/systemd/sysconfig/nfs-ganesha	%{buildroot}%{_sysconfdir}/sysconfig/ganesha
 %else
-install -D -p -m 0744 src/ganesha.init %{buildroot}%{_sysconfdir}/init.d/nfs-ganesha
+mkdir -p %{buildroot}%{_sysconfdir}/init.d
+install -m 755 src/ganesha.init				%{buildroot}%{_sysconfdir}/init.d/nfs-ganesha
+install -m 644 src/ganesha.sysconfig			%{buildroot}%{_sysconfdir}/sysconfig/ganesha
+%endif
+
+%if %{with utils} && 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+
+%if %{with pt}
+install -m 755 src/ganesha.pt.init %{buildroot}%{_sysconfdir}/init.d/nfs-ganesha-pt
+install -m 644 src/config_samples/pt.conf %{buildroot}%{_sysconfdir}/ganesha
+%endif
+
+%if %{with xfs}
+install -m 644 src/config_samples/xfs.conf %{buildroot}%{_sysconfdir}/ganesha
 %endif
-install -D -p -m 0644 src/scripts/systemd/sysconfig/nfs-ganesha %{buildroot}%{_sysconfdir}/sysconfig/nfs-ganesha
-install -D -p -m 0644 src/scripts/ganeshactl/org.ganesha.nfsd.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.ganesha.nfsd.conf
+
+%if %{with ceph}
+install -m 644 src/config_samples/ceph.conf %{buildroot}%{_sysconfdir}/ganesha
+%endif
+
+%if %{with lustre}
+install -m 755 src/config_samples/lustre.conf %{buildroot}%{_sysconfdir}/ganesha
+%endif
+
+%if %{with gpfs}
+install -m 644 src/config_samples/gpfs.conf	%{buildroot}%{_sysconfdir}/ganesha
+install -m 644 src/config_samples/gpfs.ganesha.nfsd.conf %{buildroot}%{_sysconfdir}/ganesha
+install -m 644 src/config_samples/gpfs.ganesha.main.conf %{buildroot}%{_sysconfdir}/ganesha
+install -m 644 src/config_samples/gpfs.ganesha.log.conf %{buildroot}%{_sysconfdir}/ganesha
+install -m 644 src/config_samples/gpfs.ganesha.exports.conf	%{buildroot}%{_sysconfdir}/ganesha
+%endif
+
+%if %{with utils}
+pushd .
+cd scripts/ganeshactl/
+python setup.py --quiet install --root=%{buildroot}
+popd
+install -m 755 Protocols/NLM/sm_notify.ganesha		%{buildroot}%{_bindir}/sm_notify.ganesha
+%endif
+
+make DESTDIR=%{buildroot}/usr install
+rm -f %{buildroot}/usr/bin/libntirpc.a
+mv %{buildroot}/usr%{_sysconfdir}/ganesha/ganesha.conf %{buildroot}%{_sysconfdir}/ganesha/
 
 %post
-/sbin/ldconfig
-%if ( 0%{?_with_systemd:1} )
+%if %{with_systemd}
 %systemd_post nfs-ganesha.service
-%else
-/sbin/chkconfig --add nfs-ganesha
+%systemd_post nfs-ganesha-lock.service
 %endif
 
 %preun
-%if ( 0%{?_with_systemd:1} )
-%systemd_preun nfs-ganesha.service
-%else
-/sbin/service nfs-ganesha stop &>/dev/null
-/sbin/chkconfig --del nfs-ganesha
-/sbin/service nfs-ganesha condrestart &>/dev/null
+%if %{with_systemd}
+%systemd_preun nfs-ganesha-lock.service
 %endif
 
 %postun
-/sbin/ldconfig
-%if ( 0%{?_with_systemd:1} )
-%systemd_postun_with_restart nfs-ganesha.service
+%if %{with_systemd}
+%systemd_postun_with_restart nfs-ganesha-lock.service
 %endif
 
 %files
-%doc src/ChangeLog src/LICENSE.txt src/Docs/*.pdf
-%exclude %{_pkgdocdir}/*.pdf
-%if ( 0%{?with_glusterfs:1} )
-%exclude %{_libdir}/ganesha/libfsalgluster.*
-%endif
-%if ( 0%{?with_cephfs:1} )
-%exclude %{_libdir}/ganesha/libfsalceph.*
-%endif
-%{_libdir}/*
-%{_bindir}/*
-%if ( 0%{?_with_systemd:1} )
-%{_unitdir}/*
+%defattr(-,root,root,-)
+%{_bindir}/ganesha.nfsd
+#%%{_bindir}/libntirpc.a
+%config %{_sysconfdir}/dbus-1/system.d/org.ganesha.nfsd.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/ganesha
+%config(noreplace) %{_sysconfdir}/logrotate.d/ganesha
+%dir %{_sysconfdir}/ganesha/
+%config(noreplace) %{_sysconfdir}/ganesha/ganesha.conf
+%dir %{_defaultdocdir}/ganesha/
+%{_defaultdocdir}/ganesha/*
+%dir %{_localstatedir}/run/ganesha
+
+%if %{with_systemd}
+%{_unitdir}/nfs-ganesha.service
+%{_unitdir}/nfs-ganesha-lock.service
 %else
-%{_sysconfdir}/init.d/*
+%{_sysconfdir}/init.d/nfs-ganesha
 %endif
-%{_sysconfdir}/sysconfig/*
-%{_sysconfdir}/dbus-1/system.d/*
-%if ( 0%{?with_admintools:1} )
-%{python_sitelib}/*
+
+%files mount-9P
+%defattr(-,root,root,-)
+%{_sbindir}/mount.9P
+
+
+%files vfs
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalvfs*
+%config(noreplace) %{_sysconfdir}/ganesha/vfs.conf
+
+
+%files nullfs
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalnull*
+
+
+%files proxy
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalproxy*
+
+# Optional packages
+%if %{with gpfs}
+%files gpfs
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalgpfs*
+%config(noreplace) %{_sysconfdir}/ganesha/gpfs.conf
+%config(noreplace) %{_sysconfdir}/ganesha/gpfs.ganesha.nfsd.conf
+%config(noreplace) %{_sysconfdir}/ganesha/gpfs.ganesha.main.conf
+%config(noreplace) %{_sysconfdir}/ganesha/gpfs.ganesha.log.conf
+%config(noreplace) %{_sysconfdir}/ganesha/gpfs.ganesha.exports.conf
+%endif
+
+%if %{with xfs}
+%files xfs
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalxfs*
+%config(noreplace) %{_sysconfdir}/ganesha/xfs.conf
 %endif
 
-%if ( 0%{?with_glusterfs:1} )
-%files fsal-gluster
-%{_libdir}/ganesha/libfsalgluster.*
+%if %{with ceph}
+%files ceph
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalceph*
+%config(noreplace) %{_sysconfdir}/ganesha/ceph.conf
 %endif
 
-%if ( 0%{?with_cephfs:1} )
-%files fsal-ceph
-%{_libdir}/ganesha/libfsalceph.*
+%if %{with lustre}
+%files lustre
+%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/ganesha/lustre.conf
+%{_libdir}/ganesha/libfsallustre*
 %endif
 
-%files docs
-%{_pkgdocdir}/LICENSE.txt
-%{_pkgdocdir}/*
-%dir %{_pkgdocdir}
+%if %{with shook}
+%files shook
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalshook*
+%endif
+
+%if %{with gluster}
+%files gluster
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalgluster*
+%endif
+
+%if %{with hpss}
+%files hpss
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalhpss*
+%endif
+
+%if %{with panfs}
+%files panfs
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalpanfs*
+%endif
+
+%if %{with pt}
+%files pt
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libfsalpt*
+%config(noreplace) %{_sysconfdir}/init.d/nfs-ganesha-pt
+%config(noreplace) %{_sysconfdir}/ganesha/pt.conf
+%endif
+
+%if %{with lttng}
+%files lttng
+%defattr(-,root,root,-)
+%{_libdir}/ganesha/libganesha_trace*
+%endif
+
+%if %{with utils}
+%files utils
+%defattr(-,root,root,-)
+%{python2_sitelib}/Ganesha/*
+%{python2_sitelib}/ganeshactl-*-info
+%{_bindir}/ganesha-admin
+%{_bindir}/manage_clients
+%{_bindir}/manage_exports
+%{_bindir}/manage_logger
+%{_bindir}/ganeshactl
+%{_bindir}/fake_recall
+%{_bindir}/get_clientids
+%{_bindir}/grace_period
+%{_bindir}/purge_gids
+%{_bindir}/ganesha_stats
+%{_bindir}/sm_notify.ganesha
+%{_bindir}/ganesha_mgr
+%endif
 
 %changelog
+* Fri Feb 13 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.2.0-0.1rc1
+- 2.2.0-0.1rc1
+- nfs-ganesha.spec based on upstream
+
 * Thu Feb 12 2015 Kaleb S. KEITHLEY <kkeithle at redhat.com> 2.1.0-14
 - Fedora 23/rawhide build fixes
 - Ceph restored in EPEL
diff --git a/sources b/sources
index 618b1b9..b2a00dd 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-e0b398e92def24f5c354c17db1ee1119  nfs-ganesha-2.1.0.tar.gz
-18313c48592396061fae3be6428afde8  ntirpc-1.1.0.tar.gz
+58a05c7c8839b808d4d79e23097e5a2e  nfs-ganesha-2.2.0rc1.tar.gz
+4319747da35d6e2e713f859272201978  ntirpc-1.2.0.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/nfs-ganesha.git/commit/?h=epel7&id=4d4c9a4f898166f6d11060c2e7c5e5befd0bbbc9


More information about the scm-commits mailing list