diff options
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.3.bb')
-rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.3.bb | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.3.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.3.bb new file mode 100644 index 0000000000..9668ac0e86 --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.3.bb | |||
@@ -0,0 +1,159 @@ | |||
1 | SUMMARY = "userspace utilities for kernel nfs" | ||
2 | DESCRIPTION = "The nfs-utils package provides a daemon for the kernel \ | ||
3 | NFS server and related tools." | ||
4 | HOMEPAGE = "http://nfs.sourceforge.net/" | ||
5 | SECTION = "console/network" | ||
6 | |||
7 | LICENSE = "MIT & GPL-2.0-or-later & BSD-3-Clause" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" | ||
9 | |||
10 | # util-linux for libblkid | ||
11 | DEPENDS = "libcap libevent util-linux sqlite3 libtirpc libxml2" | ||
12 | RDEPENDS:${PN} = "${PN}-client" | ||
13 | RRECOMMENDS:${PN} = "kernel-module-nfsd" | ||
14 | |||
15 | inherit useradd | ||
16 | |||
17 | USERADD_PACKAGES = "${PN}-client" | ||
18 | USERADD_PARAM:${PN}-client = "--system --home-dir /var/lib/nfs \ | ||
19 | --shell /bin/false --user-group rpcuser" | ||
20 | |||
21 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \ | ||
22 | file://nfsserver \ | ||
23 | file://nfscommon \ | ||
24 | file://0001-locktest-Makefile.am-Do-not-use-build-flags.patch \ | ||
25 | file://0004-Use-nogroup-for-nobody-group.patch \ | ||
26 | file://0005-find-OE-provided-Kerberos.patch \ | ||
27 | " | ||
28 | |||
29 | SRC_URI[sha256sum] = "11e7c5847a8423a72931c865bd9296e7fd56ff270a795a849183900961711725" | ||
30 | |||
31 | # Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will | ||
32 | # pull in the remainder of the dependencies. | ||
33 | |||
34 | INITSCRIPT_PACKAGES = "${PN} ${PN}-client" | ||
35 | INITSCRIPT_NAME = "nfsserver" | ||
36 | INITSCRIPT_PARAMS = "defaults" | ||
37 | INITSCRIPT_NAME:${PN}-client = "nfscommon" | ||
38 | INITSCRIPT_PARAMS:${PN}-client = "defaults 19 21" | ||
39 | |||
40 | inherit autotools-brokensep update-rc.d systemd pkgconfig | ||
41 | |||
42 | SYSTEMD_PACKAGES = "${PN} ${PN}-client" | ||
43 | SYSTEMD_SERVICE:${PN} = "nfs-server.service" | ||
44 | SYSTEMD_SERVICE:${PN}-client = "nfs-client.target" | ||
45 | |||
46 | # --enable-uuid is need for cross-compiling | ||
47 | EXTRA_OECONF = "--with-statduser=rpcuser \ | ||
48 | --enable-mountconfig \ | ||
49 | --enable-libmount-mount \ | ||
50 | --enable-uuid \ | ||
51 | --with-statdpath=/var/lib/nfs/statd \ | ||
52 | --with-pluginpath=${libdir}/libnfsidmap \ | ||
53 | --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \ | ||
54 | " | ||
55 | |||
56 | LDFLAGS += "-lsqlite3 -levent" | ||
57 | |||
58 | PACKAGECONFIG ??= "tcp-wrappers \ | ||
59 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ | ||
60 | " | ||
61 | |||
62 | PACKAGECONFIG:remove:libc-musl = "tcp-wrappers" | ||
63 | #krb5 is available in meta-oe | ||
64 | PACKAGECONFIG[gssapi] = "--with-krb5=${STAGING_EXECPREFIXDIR} --enable-gss --enable-svcgss,--disable-gss --disable-svcgss,krb5" | ||
65 | PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers" | ||
66 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
67 | # libdevmapper is available in meta-oe | ||
68 | PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmapper" | ||
69 | # keyutils is available in meta-oe | ||
70 | PACKAGECONFIG[nfsv4] = "--enable-nfsv4 --enable-nfsdcltrack,--disable-nfsv4 --disable-nfsdcltrack,keyutils,python3-core" | ||
71 | PACKAGECONFIG[nfsdctl] = "--enable-nfsdctl,--disable-nfsdctl,libnl readline," | ||
72 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd" | ||
73 | |||
74 | PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats ${PN}-rpcctl" | ||
75 | |||
76 | CONFFILES:${PN}-client += "${localstatedir}/lib/nfs/etab \ | ||
77 | ${localstatedir}/lib/nfs/rmtab \ | ||
78 | ${localstatedir}/lib/nfs/xtab \ | ||
79 | ${localstatedir}/lib/nfs/statd/state \ | ||
80 | ${sysconfdir}/idmapd.conf \ | ||
81 | ${sysconfdir}/nfs.conf \ | ||
82 | ${sysconfdir}/nfsmount.conf" | ||
83 | |||
84 | FILES:${PN}-client = "${sbindir}/*statd \ | ||
85 | ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ | ||
86 | ${sbindir}/showmount ${sbindir}/nfsstat \ | ||
87 | ${sbindir}/rpc.gssd \ | ||
88 | ${sbindir}/nfsconf \ | ||
89 | ${libdir}/libnfsidmap.so.* \ | ||
90 | ${libdir}/libnfsidmap/*.so \ | ||
91 | ${libexecdir}/nfsrahead \ | ||
92 | ${localstatedir}/lib/nfs \ | ||
93 | ${sysconfdir}/idmapd.conf \ | ||
94 | ${sysconfdir}/init.d/nfscommon \ | ||
95 | ${sysconfdir}/nfs.conf \ | ||
96 | ${sysconfdir}/nfsmount.conf \ | ||
97 | ${systemd_system_unitdir}/auth-rpcgss-module.service \ | ||
98 | ${systemd_system_unitdir}/nfs-client.target \ | ||
99 | ${systemd_system_unitdir}/nfs-idmapd.service \ | ||
100 | ${systemd_system_unitdir}/nfs-statd.service \ | ||
101 | ${systemd_system_unitdir}/nfscommon.service \ | ||
102 | ${systemd_system_unitdir}/rpc-gssd.service \ | ||
103 | ${systemd_system_unitdir}/rpc-statd-notify.service \ | ||
104 | ${systemd_system_unitdir}/rpc-statd.service \ | ||
105 | ${systemd_system_unitdir}/rpc_pipefs.target \ | ||
106 | ${systemd_system_unitdir}/var-lib-nfs-rpc_pipefs.mount \ | ||
107 | ${nonarch_libdir}/udev/rules.d/*" | ||
108 | RDEPENDS:${PN}-client = "${PN}-mount rpcbind" | ||
109 | |||
110 | FILES:${PN}-mount = "${base_sbindir}/*mount.nfs*" | ||
111 | |||
112 | FILES:${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat ${sbindir}/nfsdclnts" | ||
113 | RDEPENDS:${PN}-stats = "python3-core" | ||
114 | |||
115 | FILES:${PN}-rpcctl = "${sbindir}/rpcctl" | ||
116 | RDEPENDS:${PN}-rpcctl = "python3-core" | ||
117 | |||
118 | FILES:${PN}-staticdev += "${libdir}/libnfsidmap/*.a" | ||
119 | |||
120 | FILES:${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/ ${nonarch_libdir}/modprobe.d" | ||
121 | |||
122 | do_configure:prepend() { | ||
123 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ | ||
124 | -e 's,udev_rulesdir = /usr/lib/udev/rules.d/,udev_rulesdir = ${nonarch_base_libdir}/udev/rules.d/,g' \ | ||
125 | ${S}/utils/mount/Makefile.am ${S}/utils/nfsdcltrack/Makefile.am \ | ||
126 | ${S}/systemd/Makefile.am ${S}/tools/nfsrahead/Makefile.am | ||
127 | } | ||
128 | |||
129 | # Make clean needed because the package comes with | ||
130 | # precompiled 64-bit objects that break the build | ||
131 | do_compile:prepend() { | ||
132 | make clean | ||
133 | } | ||
134 | |||
135 | # Works on systemd only | ||
136 | HIGH_RLIMIT_NOFILE ??= "4096" | ||
137 | |||
138 | do_install:append () { | ||
139 | install -d ${D}${sysconfdir}/init.d | ||
140 | install -m 0755 ${UNPACKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver | ||
141 | install -m 0755 ${UNPACKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon | ||
142 | |||
143 | install -m 0644 ${S}/support/nfsidmap/idmapd.conf ${D}${sysconfdir} | ||
144 | install -m 0644 ${S}/nfs.conf ${D}${sysconfdir} | ||
145 | |||
146 | install -d ${D}${systemd_system_unitdir} | ||
147 | # Retain historical service name so old scripts keep working | ||
148 | ln -s rpc-statd.service ${D}${systemd_system_unitdir}/nfs-statd.service | ||
149 | # Add compatibility symlinks for the sysvinit scripts | ||
150 | ln -s nfs-server.service ${D}${systemd_system_unitdir}/nfsserver.service | ||
151 | ln -s /dev/null ${D}${systemd_system_unitdir}/nfscommon.service | ||
152 | |||
153 | # kernel code as of 3.8 hard-codes this path as a default | ||
154 | install -d ${D}/var/lib/nfs/v4recovery | ||
155 | |||
156 | # chown the directories and files | ||
157 | chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd | ||
158 | chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state | ||
159 | } | ||