<commit_before>DESCRIPTION = "userspace utilities for kernel nfs"
PRIORITY = "optional"
SECTION = "console/network"
LICENSE = "GPL"

DEPENDS = "tcp-wrappers libevent"

SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.gz \
	file://nfsserver \
   "

S = "${WORKDIR}/nfs-utils-${PV}/"

PARALLEL_MAKE = ""

# Only kernel-module-nfsd is required here (but can be built-in)  - the nfsd module will
# pull in the remainder of the dependencies.
RDEPENDS = "portmap"
RRECOMMENDS = "kernel-module-nfsd"

INITSCRIPT_NAME = "nfsserver"
# The server has no dependencies at the user run levels, so just put
# it in at the default levels.  It must be terminated before the network
# in the shutdown levels, but that works fine.
INITSCRIPT_PARAMS = "defaults"

inherit autotools update-rc.d

EXTRA_OECONF = "--with-statduser=nobody \
		--enable-nfsv3 \
		--disable-nfsv4 \
		--disable-gss \
		--with-statedir=/var/lib/nfs"

do_ccompile() {
	# UGLY HACK ALERT
	cat ${WORKDIR}/forgotten-defines >> ${S}/support/include/config.h
	oe_runmake 'BUILD=1'
}

INHIBIT_AUTO_STAGE = "1"

do_install() {
	install -d ${D}${sysconfdir}/init.d
	install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver

	install -d ${D}${sbindir}
	install -m 0755 ${S}/utils/exportfs/exportfs ${D}${sbindir}/exportfs
	install -m 0755 ${S}/utils/mountd/mountd ${D}${sbindir}/mountd
	install -m 0755 ${S}/utils/mount/mount.nfs ${D}${sbindir}/mount.nfs
	install -m 0755 ${S}/utils/nfsd/nfsd ${D}${sbindir}/nfsd
	install -m 0755 ${S}/utils/nfsstat/nfsstat ${D}${sbindir}/nfsstat
	install -m 0755 ${S}/utils/showmount/showmount ${D}${sbindir}/showmount
	install -m 0755 ${S}/utils/statd/statd ${D}${sbindir}/statd

	install -d ${D}${mandir}/man8
	install -m 0644 ${S}/utils/exportfs/exportfs.man ${D}${mandir}/man8/exportfs.8
	install -m 0644 ${S}/utils/mountd/mountd.man ${D}${mandir}/man8/mountd.8
	install -m 0644 ${S}/utils/nfsd/nfsd.man ${D}${mandir}/man8/nfsd.8
	install -m 0644 ${S}/utils/nfsstat/nfsstat.man ${D}${mandir}/man8/nfsstat.8
	install -m 0644 ${S}/utils/showmount/showmount.man ${D}${mandir}/man8/showmount.8
	install -m 0644 ${S}/utils/statd/statd.man ${D}${mandir}/man8/statd.8
}
<commit_msg>nfs-utils : Fix support for util-linux-ng. See bug #4459.             * Move mount.nfs to /sbin and create symlink for mount.nfs4             * Package mount.nfs* in nfs-utils-client for nfs client only               devices.             * Bumps PR for new packaging.<commit_after>DESCRIPTION = "userspace utilities for kernel nfs"
PRIORITY = "optional"
SECTION = "console/network"
LICENSE = "GPL"

PR = "2"

DEPENDS = "tcp-wrappers libevent"

SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.gz \
	file://nfsserver \
   "

S = "${WORKDIR}/nfs-utils-${PV}/"

PARALLEL_MAKE = ""

# Only kernel-module-nfsd is required here (but can be built-in)  - the nfsd module will
# pull in the remainder of the dependencies.
RDEPENDS = "portmap"
RRECOMMENDS = "kernel-module-nfsd"

INITSCRIPT_NAME = "nfsserver"
# The server has no dependencies at the user run levels, so just put
# it in at the default levels.  It must be terminated before the network
# in the shutdown levels, but that works fine.
INITSCRIPT_PARAMS = "defaults"

inherit autotools update-rc.d

EXTRA_OECONF = "--with-statduser=nobody \
		--enable-nfsv3 \
		--disable-nfsv4 \
		--disable-gss \
		--with-statedir=/var/lib/nfs"

do_ccompile() {
	# UGLY HACK ALERT
	cat ${WORKDIR}/forgotten-defines >> ${S}/support/include/config.h
	oe_runmake 'BUILD=1'
}

INHIBIT_AUTO_STAGE = "1"

do_install() {
	install -d ${D}${sysconfdir}/init.d
	install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver

	install -d ${D}${sbindir}
	install -d ${D}${base_sbindir}
	install -m 0755 ${S}/utils/exportfs/exportfs ${D}${sbindir}/exportfs
	install -m 0755 ${S}/utils/mountd/mountd ${D}${sbindir}/mountd
	install -m 0755 ${S}/utils/mount/mount.nfs ${D}${base_sbindir}/mount.nfs
	install -m 0755 ${S}/utils/nfsd/nfsd ${D}${sbindir}/nfsd
	install -m 0755 ${S}/utils/nfsstat/nfsstat ${D}${sbindir}/nfsstat
	install -m 0755 ${S}/utils/showmount/showmount ${D}${sbindir}/showmount
	install -m 0755 ${S}/utils/statd/statd ${D}${sbindir}/statd

	ln -s ${D}/${base_sbindir}/mount.nfs ${D}/${base_sbindir}/mount.nfs4

	install -d ${D}${mandir}/man8
	install -m 0644 ${S}/utils/exportfs/exportfs.man ${D}${mandir}/man8/exportfs.8
	install -m 0644 ${S}/utils/mountd/mountd.man ${D}${mandir}/man8/mountd.8
	install -m 0644 ${S}/utils/nfsd/nfsd.man ${D}${mandir}/man8/nfsd.8
	install -m 0644 ${S}/utils/nfsstat/nfsstat.man ${D}${mandir}/man8/nfsstat.8
	install -m 0644 ${S}/utils/showmount/showmount.man ${D}${mandir}/man8/showmount.8
	install -m 0644 ${S}/utils/statd/statd.man ${D}${mandir}/man8/statd.8
}

PACKAGES =+ "nfs-utils-client"
FILES_nfs-utils-client = "${base_sbindir}/mount.nfs ${base_sbindir}/mount.nfs4"

{'fraction_non_alphanumeric': 0.17257731958762887, 'fraction_numerical': 0.03175257731958763, 'mean_word_length': 4.021739130434782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1770991', 'n_tokens_mistral': 2077, 'n_tokens_neox': 1962, 'n_words': 410}