2024-08-23 03:33:39 +02:00
|
|
|
# Copyright 1999-2024 Gentoo Foundation
|
2020-09-16 01:02:12 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2022-03-15 21:32:48 +01:00
|
|
|
EAPI=8
|
2020-09-16 01:02:12 +02:00
|
|
|
|
2024-08-23 16:31:24 +02:00
|
|
|
DISTUTILS_OPTIONAL=1
|
|
|
|
DISTUTILS_SINGLE_IMPL=1
|
|
|
|
DISTUTILS_USE_PEP517=standalone
|
2024-08-23 03:33:39 +02:00
|
|
|
PYTHON_COMPAT=( python3_12 )
|
2020-09-16 01:02:12 +02:00
|
|
|
|
2024-08-23 16:31:24 +02:00
|
|
|
inherit cmake distutils-r1
|
2020-09-16 01:02:12 +02:00
|
|
|
|
|
|
|
DESCRIPTION="A NFSv3,v4,v4.1 fileserver that runs in user mode on most UNIX/Linux systems"
|
|
|
|
HOMEPAGE="https://github.com/nfs-ganesha/nfs-ganesha"
|
|
|
|
if [[ ${PV} == *beta* ]] ; then
|
|
|
|
MY_PV="$(ver_cut 1)-dev.$(ver_cut 4)"
|
|
|
|
SRC_URI="https://github.com/nfs-ganesha/${PN}/archive/V${MY_PV}.tar.gz -> ${P}.tar.gz"
|
2022-03-15 21:32:48 +01:00
|
|
|
S="${WORKDIR}/${PN}-${MY_PV}/src"
|
2020-09-16 01:02:12 +02:00
|
|
|
else
|
|
|
|
SRC_URI="https://github.com/nfs-ganesha/${PN}/archive/V${PV}.tar.gz -> ${P}.tar.gz"
|
2022-03-15 21:32:48 +01:00
|
|
|
S="${WORKDIR}/${P}/src"
|
2020-09-16 01:02:12 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
LICENSE="LGPL-3"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64"
|
2024-08-23 16:31:24 +02:00
|
|
|
IUSE="btrfs caps dbus debug gssapi gui +nfsv3 tools vsock"
|
2024-08-23 03:33:39 +02:00
|
|
|
FS_SUPPORT=" ceph glusterfs gpfs mem null proxy-v3 proxy-v4 rgw vfs xfs"
|
2020-09-16 01:02:12 +02:00
|
|
|
IUSE+=" ${FS_SUPPORT// / ganesha_fs_}"
|
|
|
|
|
2024-08-23 16:31:24 +02:00
|
|
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
|
|
|
gui? ( tools )
|
|
|
|
btrfs? ( ganesha_fs_vfs )
|
|
|
|
"
|
2020-09-16 01:02:12 +02:00
|
|
|
|
2024-08-23 03:33:39 +02:00
|
|
|
# add monitoring support at some point
|
|
|
|
|
2020-09-16 01:02:12 +02:00
|
|
|
RDEPEND="
|
2024-08-23 16:31:24 +02:00
|
|
|
${PYTHON_DEPS}
|
2022-03-15 21:32:48 +01:00
|
|
|
dev-libs/jemalloc:=
|
2021-07-27 18:40:16 +02:00
|
|
|
dev-libs/userspace-rcu:=
|
2024-08-31 04:17:06 +02:00
|
|
|
=net-libs/ntirpc-5.8:=[gssapi]
|
2022-03-15 21:32:48 +01:00
|
|
|
sys-apps/acl
|
|
|
|
sys-apps/util-linux
|
|
|
|
caps? ( sys-libs/libcap )
|
2021-07-27 18:40:16 +02:00
|
|
|
btrfs? ( sys-fs/btrfs-progs )
|
2020-09-16 01:02:12 +02:00
|
|
|
gssapi? ( virtual/krb5 )
|
|
|
|
dbus? ( sys-apps/dbus )
|
|
|
|
ganesha_fs_ceph? ( sys-cluster/ceph )
|
|
|
|
ganesha_fs_glusterfs? ( sys-cluster/glusterfs )
|
2024-08-23 16:31:24 +02:00
|
|
|
ganesha_fs_rgw? ( sys-cluster/ceph[radosgw] )
|
2020-09-16 01:02:12 +02:00
|
|
|
ganesha_fs_xfs? ( sys-fs/xfsprogs )
|
2024-08-23 16:31:24 +02:00
|
|
|
gui? (
|
|
|
|
$(python_gen_cond_dep '
|
|
|
|
dev-python/PyQt5[gui,dbus,${PYTHON_USEDEP}]
|
|
|
|
')
|
|
|
|
)
|
|
|
|
tools? (
|
|
|
|
$(python_gen_cond_dep '
|
|
|
|
dev-python/dbus-python[${PYTHON_USEDEP}]
|
|
|
|
dev-python/pygobject[${PYTHON_USEDEP}]
|
|
|
|
dev-python/pyparsing[${PYTHON_USEDEP}]
|
|
|
|
')
|
|
|
|
)
|
2020-09-16 01:02:12 +02:00
|
|
|
"
|
2024-08-23 16:31:24 +02:00
|
|
|
|
|
|
|
BDEPEND="
|
|
|
|
${DISTUTILS_DEPS}
|
|
|
|
${PYTHON_DEPS}
|
2020-09-16 01:02:12 +02:00
|
|
|
sys-devel/bison
|
|
|
|
sys-devel/flex
|
|
|
|
virtual/pkgconfig
|
2024-08-23 16:31:24 +02:00
|
|
|
$(python_gen_cond_dep '
|
|
|
|
dev-python/sphinx[${PYTHON_USEDEP}]
|
|
|
|
')
|
2020-09-16 01:02:12 +02:00
|
|
|
"
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
sed \
|
|
|
|
-e "/config_samples/s:doc\/ganesha:doc\/${PF}:g" \
|
|
|
|
-e '/run\/ganesha/d' \
|
|
|
|
-i CMakeLists.txt || die
|
|
|
|
cmake_src_prepare
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
2021-02-01 02:53:28 +01:00
|
|
|
if use debug ; then
|
|
|
|
CMAKE_BUILD_TYPE=Debug
|
|
|
|
else
|
|
|
|
CMAKE_BUILD_TYPE=Release
|
|
|
|
fi
|
|
|
|
|
2020-09-16 01:02:12 +02:00
|
|
|
local mycmakeargs=(
|
|
|
|
-DALLOCATOR=jemalloc
|
|
|
|
-DUSE_SYSTEM_NTIRPC=ON
|
|
|
|
-DTIRPC_EPOLL=ON
|
2022-03-15 21:32:48 +01:00
|
|
|
-USE_ACL_MAPPING=ON
|
2021-07-27 18:40:16 +02:00
|
|
|
-DUSE_BTRFSUTIL=$(usex btrfs)
|
2020-09-16 01:02:12 +02:00
|
|
|
-DUSE_GSS=$(usex gssapi)
|
|
|
|
-DUSE_DBUS=$(usex dbus)
|
|
|
|
-DENABLE_VFS_DEBUG_ACL=$(usex debug)
|
|
|
|
-DENABLE_RFC_ACL=$(usex debug)
|
|
|
|
-DUSE_EFENCE=$(usex debug)
|
|
|
|
-DDEBUG_SAL=$(usex debug)
|
|
|
|
-DENABLE_LOCKTRACE=$(usex debug)
|
2024-08-23 16:31:24 +02:00
|
|
|
-DUSE_NFS3=$(usex nfsv3)
|
|
|
|
-DUSE_NFSACL3=$(usex nfsv3)
|
|
|
|
-DUSE_NLM=$(usex nfsv3)
|
2020-09-16 01:02:12 +02:00
|
|
|
-DUSE_VSOCK=$(usex vsock)
|
2024-08-23 03:33:39 +02:00
|
|
|
-DUSE_LEGACY_PYTHON_INSTALL=OFF
|
2020-09-16 01:02:12 +02:00
|
|
|
-DUSE_ADMIN_TOOLS=$(usex tools)
|
|
|
|
-DUSE_GUI_ADMIN_TOOLS=$(usex gui)
|
2024-08-23 16:31:24 +02:00
|
|
|
-DUSE_MAN_PAGE=ON
|
2020-09-16 01:02:12 +02:00
|
|
|
|
|
|
|
-DUSE_FSAL_CEPH=$(usex ganesha_fs_ceph)
|
|
|
|
-DCEPHFS_POSIX_ACL=$(usex ganesha_fs_ceph)
|
2024-08-23 16:31:24 +02:00
|
|
|
-DUSE_FSAL_RGW=$(usex ganesha_fs_rgw)
|
|
|
|
-DUSE_RADOS_RECOV=$(usex ganesha_fs_rgw)
|
|
|
|
-DRADOS_URLS=$(usex ganesha_fs_rgw)
|
2020-09-16 01:02:12 +02:00
|
|
|
|
|
|
|
-DUSE_FSAL_GLUSTER=$(usex ganesha_fs_glusterfs)
|
|
|
|
-DUSE_FSAL_GPFS=$(usex ganesha_fs_gpfs)
|
|
|
|
-DUSE_FSAL_MEM=$(usex ganesha_fs_mem)
|
|
|
|
-DUSE_FSAL_NULL=$(usex ganesha_fs_null)
|
2021-02-01 02:53:28 +01:00
|
|
|
-DUSE_FSAL_PROXY_V3=$(usex ganesha_fs_proxy-v3)
|
|
|
|
-DUSE_FSAL_PROXY_V4=$(usex ganesha_fs_proxy-v4)
|
2020-09-16 01:02:12 +02:00
|
|
|
-DUSE_FSAL_VFS=$(usex ganesha_fs_vfs)
|
|
|
|
-DUSE_FSAL_XFS=$(usex ganesha_fs_xfs)
|
2021-02-01 02:53:28 +01:00
|
|
|
|
2024-08-23 03:33:39 +02:00
|
|
|
-DUSE_NFSIDMAP=OFF
|
2021-02-01 02:53:28 +01:00
|
|
|
-DUSE_FSAL_KVSFS=OFF
|
2024-08-23 03:33:39 +02:00
|
|
|
-DUSE_FSAL_LIZARDFS=OFF
|
2024-08-23 16:31:24 +02:00
|
|
|
-DUSE_FSAL_LUSTRE=OFF
|
2024-08-23 03:33:39 +02:00
|
|
|
-DUSE_FSAL_SAUNAFS=OFF
|
2020-09-16 01:02:12 +02:00
|
|
|
)
|
2021-02-01 02:53:28 +01:00
|
|
|
if use gui || use tools; then
|
|
|
|
mycmakeargs+=(
|
2024-08-23 16:31:24 +02:00
|
|
|
-DPython3_INCLUDE_DIR="$(python_get_includedir)"
|
|
|
|
-DPython3_LIBRARY="$(python_get_library_path)"
|
|
|
|
-DPython3_EXECUTABLE="${PYTHON}"
|
2021-02-01 02:53:28 +01:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2020-09-16 01:02:12 +02:00
|
|
|
cmake_src_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
cmake_src_install
|
2024-08-23 16:31:24 +02:00
|
|
|
if use tools || use gui; then
|
|
|
|
python_fix_shebang "${ED}"
|
|
|
|
python_optimize
|
|
|
|
fi
|
2020-09-16 01:02:12 +02:00
|
|
|
|
|
|
|
newinitd "${FILESDIR}"/${PN}.init ${PN}
|
|
|
|
newconfd "${FILESDIR}"/${PN}.confd ${PN}
|
|
|
|
|
|
|
|
if use dbus; then
|
|
|
|
insinto /etc/dbus-1/system.d
|
|
|
|
doins scripts/ganeshactl/org.ganesha.nfsd.conf
|
|
|
|
fi
|
|
|
|
}
|