summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb116
1 files changed, 116 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
new file mode 100644
index 0000000000..6e6d09bf42
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb
@@ -0,0 +1,116 @@
1SUMMARY = "userspace utilities for kernel nfs"
2DESCRIPTION = "The nfs-utils package provides a daemon for the kernel \
3NFS server and related tools."
4HOMEPAGE = "http://nfs.sourceforge.net/"
5SECTION = "console/network"
6
7LICENSE = "MIT & GPLv2+ & BSD"
8LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
9
10# util-linux for libblkid
11DEPENDS = "libcap libnfsidmap libevent util-linux sqlite3"
12RDEPENDS_${PN}-client = "rpcbind bash"
13RDEPENDS_${PN} = "${PN}-client bash"
14RRECOMMENDS_${PN} = "kernel-module-nfsd"
15
16inherit useradd
17
18USERADD_PACKAGES = "${PN}-client"
19USERADD_PARAM_${PN}-client = "--system --home-dir /var/lib/nfs \
20 --shell /bin/false --user-group rpcuser"
21
22SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \
23 file://0001-configure-Allow-to-explicitly-disable-nfsidmap.patch \
24 file://nfs-utils-1.0.6-uclibc.patch \
25 file://nfs-utils-1.2.3-sm-notify-res_init.patch \
26 file://nfsserver \
27 file://nfscommon \
28 file://nfs-utils.conf \
29 file://nfs-server.service \
30 file://nfs-mountd.service \
31 file://nfs-statd.service \
32 file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
33 file://0001-statd-fixed-the-with-statdpath-flag.patch \
34"
35
36SRC_URI[md5sum] = "6e93a7997ca3a1eac56bf219adab72a8"
37SRC_URI[sha256sum] = "ab8384d0e487ed6a18c5380d5df28015f7dd98680bf08f3247c97d9f7d99e56f"
38
39PARALLEL_MAKE = ""
40
41# Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will
42# pull in the remainder of the dependencies.
43
44INITSCRIPT_PACKAGES = "${PN} ${PN}-client"
45INITSCRIPT_NAME = "nfsserver"
46INITSCRIPT_PARAMS = "defaults"
47INITSCRIPT_NAME_${PN}-client = "nfscommon"
48INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21"
49
50inherit autotools-brokensep update-rc.d systemd pkgconfig
51
52SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service"
53SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
54SYSTEMD_AUTO_ENABLE = "disable"
55
56# --enable-uuid is need for cross-compiling
57EXTRA_OECONF = "--with-statduser=rpcuser \
58 --enable-mountconfig \
59 --enable-libmount-mount \
60 --disable-nfsv41 \
61 --enable-uuid \
62 --disable-gss \
63 --disable-tirpc \
64 --disable-nfsdcltrack \
65 --with-statdpath=/var/lib/nfs/statd \
66 "
67
68PACKAGECONFIG ??= "tcp-wrappers"
69PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
70PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
71
72INHIBIT_AUTO_STAGE = "1"
73
74PACKAGES =+ "${PN}-client ${PN}-stats"
75FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
76 ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
77 ${sbindir}/showmount ${sbindir}/nfsstat \
78 ${localstatedir}/lib/nfs \
79 ${sysconfdir}/nfs-utils.conf \
80 ${sysconfdir}/init.d/nfscommon \
81 ${systemd_unitdir}/system/nfs-statd.service"
82FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
83RDEPENDS_${PN}-stats = "python"
84
85# Make clean needed because the package comes with
86# precompiled 64-bit objects that break the build
87do_compile_prepend() {
88 make clean
89}
90
91do_install_append () {
92 install -d ${D}${sysconfdir}/init.d
93 install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
94 install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
95
96 install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir}
97 install -d ${D}${systemd_unitdir}/system
98 install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/
99 install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/
100 install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/
101 sed -i -e 's,@SBINDIR@,${sbindir},g' \
102 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
103 ${D}${systemd_unitdir}/system/*.service
104
105 # kernel code as of 3.8 hard-codes this path as a default
106 install -d ${D}/var/lib/nfs/v4recovery
107
108 # chown the directories and files
109 chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
110 chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
111
112 # the following are built by CC_FOR_BUILD
113 rm -f ${D}${sbindir}/rpcdebug
114 rm -f ${D}${sbindir}/rpcgen
115 rm -f ${D}${sbindir}/locktest
116}