summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb152
1 files changed, 152 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb
new file mode 100644
index 0000000000..35587dfb7a
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb
@@ -0,0 +1,152 @@
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 libevent util-linux sqlite3 libtirpc"
12RDEPENDS_${PN} = "${PN}-client bash"
13RRECOMMENDS_${PN} = "kernel-module-nfsd"
14
15inherit useradd
16
17USERADD_PACKAGES = "${PN}-client"
18USERADD_PARAM_${PN}-client = "--system --home-dir /var/lib/nfs \
19 --shell /bin/false --user-group rpcuser"
20
21SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \
22 file://nfsserver \
23 file://nfscommon \
24 file://nfs-utils.conf \
25 file://nfs-server.service \
26 file://nfs-mountd.service \
27 file://nfs-statd.service \
28 file://proc-fs-nfsd.mount \
29 file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
30 file://nfs-utils-debianize-start-statd.patch \
31 file://bugfix-adjust-statd-service-name.patch \
32 file://nfs-utils-musl-limits.patch \
33 file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \
34"
35
36SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch"
37
38SRC_URI[md5sum] = "b6c9c032995af1c08fea9fbcc1ce33e9"
39SRC_URI[sha256sum] = "f68b34793831b05f1fd5760d6bdec92772c7684177586a99a61e7b444f336322"
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_PACKAGES = "${PN} ${PN}-client"
53SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service"
54SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
55
56# --enable-uuid is need for cross-compiling
57EXTRA_OECONF = "--with-statduser=rpcuser \
58 --enable-mountconfig \
59 --enable-libmount-mount \
60 --enable-uuid \
61 --disable-gss \
62 --disable-nfsdcltrack \
63 --with-statdpath=/var/lib/nfs/statd \
64 "
65
66PACKAGECONFIG ??= "tcp-wrappers \
67 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
68"
69PACKAGECONFIG_remove_libc-musl = "tcp-wrappers"
70PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
71PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
72# libdevmapper is available in meta-oe
73PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper"
74# keyutils is available in meta-security
75PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils"
76
77PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats"
78
79CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
80 ${localstatedir}/lib/nfs/rmtab \
81 ${localstatedir}/lib/nfs/xtab \
82 ${localstatedir}/lib/nfs/statd/state \
83 ${sysconfdir}/nfsmount.conf"
84
85FILES_${PN}-client = "${sbindir}/*statd \
86 ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
87 ${sbindir}/showmount ${sbindir}/nfsstat \
88 ${localstatedir}/lib/nfs \
89 ${sysconfdir}/nfs-utils.conf \
90 ${sysconfdir}/nfsmount.conf \
91 ${sysconfdir}/init.d/nfscommon \
92 ${systemd_unitdir}/system/nfs-statd.service"
93RDEPENDS_${PN}-client = "${PN}-mount rpcbind"
94
95FILES_${PN}-mount = "${base_sbindir}/*mount.nfs*"
96
97FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
98RDEPENDS_${PN}-stats = "python3-core"
99
100FILES_${PN} += "${systemd_unitdir}"
101
102do_configure_prepend() {
103 sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
104 ${S}/utils/mount/Makefile.am
105
106 sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
107 ${S}/utils/osd_login/Makefile.am
108}
109
110# Make clean needed because the package comes with
111# precompiled 64-bit objects that break the build
112do_compile_prepend() {
113 make clean
114}
115
116do_install_append () {
117 install -d ${D}${sysconfdir}/init.d
118 install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
119 install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
120
121 install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir}
122 install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir}
123
124 install -d ${D}${systemd_unitdir}/system
125 install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/
126 install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/
127 install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/
128 sed -i -e 's,@SBINDIR@,${sbindir},g' \
129 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
130 ${D}${systemd_unitdir}/system/*.service
131 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
132 install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/
133 install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/
134 ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount
135 fi
136
137 # kernel code as of 3.8 hard-codes this path as a default
138 install -d ${D}/var/lib/nfs/v4recovery
139
140 # chown the directories and files
141 chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
142 chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
143
144 # the following are built by CC_FOR_BUILD
145 rm -f ${D}${sbindir}/rpcdebug
146 rm -f ${D}${sbindir}/rpcgen
147 rm -f ${D}${sbindir}/locktest
148
149 # Make python tools use python 3
150 sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat
151
152}