Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
bee-files/nfs-ganesha.be0
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
119 lines (97 sloc)
3.22 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env beesh | |
# BEE_VERSION nfs-ganesha-5.7-0 | |
# https://github.com/nfs-ganesha/nfs-ganesha/blob/next/src/COMPILING_HOWTO.txt | |
# git clone --recursive https://github.com/nfs-ganesha/nfs-ganesha.git --single-branch --branch V5-stable | |
# git submodule update --init | |
# git checkout V${PKGVERSION} | |
# SRCURL[0]="https://beehive.molgen.mpg.de/68a4a55a0317dcab0f59f0c2a0a1c6de/nfs-ganesha-5.7.git.tar" | |
SRCURL[0]="https://beehive.molgen.mpg.de/cb1d6a43bf8a823164306c7b4c73d1f8/nfs-ganesha-V6-dev.6.git.tar" | |
# PATCHURL+=() | |
BEE_BUILDTYPE=cmake | |
build_in_sourcedir | |
# sourcesubdir_append src | |
#mee_extract() { | |
# bee_extract "${@}" | |
#} | |
mee_extract() { | |
tar xof ${1} -C ${S} --strip-components 1 | |
} | |
mee_patch() { | |
bee_patch "${@}" | |
git checkout V5.7 | |
} | |
# ( cd /scratch/local/bee-root/nfs-ganesha/nfs-ganesha-5.7-0/build; ccmake ../source/src ) | |
mee_configure() { | |
local _configure=( | |
#-D_MSPAC_SUPPORT=OFF | |
#-DCMAKE_BUILD_TYPE=Release | |
#-DLIB_INSTALL_DIR=/usr/lib | |
#-DRADOS_URLS= | |
-DUSE_9P=OFF | |
#-DUSE_DBUS=ON | |
-DUSE_FSAL_CEPH=OFF | |
-DUSE_FSAL_GLUSTER=OFF | |
-DUSE_FSAL_GPFS=OFF | |
-DUSE_FSAL_KVSFS=OFF | |
-DUSE_FSAL_LIZARDFS=OFF | |
-DUSE_FSAL_LUSTRE=OFF | |
-DUSE_FSAL_PROXY_V3=OFF | |
-DUSE_FSAL_PROXY_V4=OFF | |
#-DUSE_FSAL_RGW=OFF | |
#-DUSE_FSAL_XFS=OFF | |
#-DUSE_GSS=OFF | |
-DUSE_MAN_PAGE=ON | |
#-DUSE_NFS3=OFF | |
#-DUSE_NFSACL3=OFF | |
#-DUSE_RADOS_RECOV=OFF | |
-DUSE_RQUOTA=OFF | |
#-DCEPHFS_POSIX_ACL=OFF | |
# -DUSE_MONITORING=ON | |
) | |
# for the sake of 'sphinx-build' for rst -> man | |
PATH=/pkg/python-3.10.10-1/bin:$PATH | |
# bee_configure "${_configure[@]}" | |
cmake "${_configure[@]}" ${S}/src | |
} | |
mee_build() { | |
make | |
} | |
mee_install() { | |
make install DESTDIR="${D}" | |
cd ${D} | |
local _installdirs=( | |
etc/dbus-1/system.d | |
# etc/sysconfig | |
# etc/tmpfiles.d | |
# usr/lib/systemd/system | |
etc/systemd/system | |
etc/ganesha | |
# usr/libexec/ganesha | |
) | |
install -d "${_installdirs[@]}" | |
mv etc/ganesha/ganesha.conf etc/ganesha/ganesha.conf.templ | |
install ${S}/src/scripts/ganeshactl/org.ganesha.nfsd.conf etc/dbus-1/system.d/ | |
# install ${S}/scripts/systemd/nfs-ganesha.service.debian8 usr/lib/systemd/system/nfs-ganesha.service | |
cat << '_EOF_' > etc/systemd/system/nfs-ganesha.service | |
[Unit] | |
Description=NFS-Ganesha file server | |
Documentation=http://github.com/nfs-ganesha/nfs-ganesha/wiki | |
After=rpcbind.service | |
Wants=rpcbind.service | |
Conflicts=nfs.target | |
[Service] | |
Type=forking | |
RuntimeDirectory=ganesha | |
ExecStartPre=/bin/mkdir -p /var/run/ganesha | |
ExecStart=/bin/bash -c "/usr/bin/ganesha.nfsd -C -L /var/log/ganesha.log -f /etc/ganesha/ganesha.conf -N NIV_EVENT" | |
ExecReload=/bin/kill -HUP $MAINPID | |
ExecStop=/usr/bin/dbus-send --system --dest=org.ganesha.nfsd --type=method_call /org/ganesha/nfsd/admin org.ganesha.nfsd.admin.shutdown | |
[Install] | |
WantedBy=multi-user.target | |
# Also=nfs-ganesha-lock.service | |
_EOF_ | |
rm -rf usr/include | |
### ??? install ${S}/scripts/systemd/sysconfig/nfs-ganesha etc/sysconfig/ganesha | |
# install ${S}/scripts/systemd/tmpfiles.d/ganesha.conf etc/tmpfiles.d/ganesha.conf | |
# install ${S}/scripts/nfs-ganesha-config.sh usr/libexec/ganesha | |
} |