diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2018-06-26 15:59:00 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-05 11:39:06 +0100 |
commit | 6a51dbf9bbb9a8f78b7afa62da4db36e970ded55 (patch) | |
tree | e67ca205ecc97f838be683961346904e81a720e3 /meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb | |
parent | 0996eecb210c9a6e1ae63cb64f2f0b4fef04469d (diff) | |
download | poky-6a51dbf9bbb9a8f78b7afa62da4db36e970ded55.tar.gz |
nfs-utils: 2.1.1 -> 2.3.1
* Removed 001-configure-Allow-to-explicitly-disable-nfsidmap.patch,
the nfsidmap is enabled when --enable-nfsv4, so I added a
PACKAGECONFIG[nfsv4], and default is no since keyutils is not in oe-core by
default.
* Removed 0001-include-stdint.h-for-UINT16_MAX-definition.patch and
nfs-utils-1.2.3-sm-notify-res_init.patch since they are already in the
source.
* Taken two patches from git://git.alpinelinux.org/aports to fix build
with musl, and the nfs-utils-musl-res_querydomain.patch is for musl only.
(From OE-Core rev: 0b51ed606b2e7543b50dadae7c0822b0f0de77ef)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb')
-rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb new file mode 100644 index 0000000000..6390c324f8 --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb | |||
@@ -0,0 +1,151 @@ | |||
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 & GPLv2+ & BSD" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" | ||
9 | |||
10 | # util-linux for libblkid | ||
11 | DEPENDS = "libcap libnfsidmap libevent util-linux sqlite3 libtirpc" | ||
12 | RDEPENDS_${PN} = "${PN}-client bash" | ||
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://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 | " | ||
34 | |||
35 | SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch" | ||
36 | |||
37 | SRC_URI[md5sum] = "d77b182a9ee396aa6221ac2401ad7046" | ||
38 | SRC_URI[sha256sum] = "96d06b5a86b185815760d8f04c34fdface8fa8b9949ff256ac05c3ebc08335a5" | ||
39 | |||
40 | # Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will | ||
41 | # pull in the remainder of the dependencies. | ||
42 | |||
43 | INITSCRIPT_PACKAGES = "${PN} ${PN}-client" | ||
44 | INITSCRIPT_NAME = "nfsserver" | ||
45 | INITSCRIPT_PARAMS = "defaults" | ||
46 | INITSCRIPT_NAME_${PN}-client = "nfscommon" | ||
47 | INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21" | ||
48 | |||
49 | inherit autotools-brokensep update-rc.d systemd pkgconfig | ||
50 | |||
51 | SYSTEMD_PACKAGES = "${PN} ${PN}-client" | ||
52 | SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service" | ||
53 | SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service" | ||
54 | |||
55 | # --enable-uuid is need for cross-compiling | ||
56 | EXTRA_OECONF = "--with-statduser=rpcuser \ | ||
57 | --enable-mountconfig \ | ||
58 | --enable-libmount-mount \ | ||
59 | --enable-uuid \ | ||
60 | --disable-gss \ | ||
61 | --disable-nfsdcltrack \ | ||
62 | --with-statdpath=/var/lib/nfs/statd \ | ||
63 | " | ||
64 | |||
65 | PACKAGECONFIG ??= "tcp-wrappers \ | ||
66 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ | ||
67 | " | ||
68 | PACKAGECONFIG_remove_libc-musl = "tcp-wrappers" | ||
69 | PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers" | ||
70 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
71 | # libdevmapper is available in meta-oe | ||
72 | PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper" | ||
73 | # keyutils is available in meta-security | ||
74 | PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils" | ||
75 | |||
76 | PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats" | ||
77 | |||
78 | CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \ | ||
79 | ${localstatedir}/lib/nfs/rmtab \ | ||
80 | ${localstatedir}/lib/nfs/xtab \ | ||
81 | ${localstatedir}/lib/nfs/statd/state \ | ||
82 | ${sysconfdir}/nfsmount.conf" | ||
83 | |||
84 | FILES_${PN}-client = "${sbindir}/*statd \ | ||
85 | ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ | ||
86 | ${sbindir}/showmount ${sbindir}/nfsstat \ | ||
87 | ${localstatedir}/lib/nfs \ | ||
88 | ${sysconfdir}/nfs-utils.conf \ | ||
89 | ${sysconfdir}/nfsmount.conf \ | ||
90 | ${sysconfdir}/init.d/nfscommon \ | ||
91 | ${systemd_unitdir}/system/nfs-statd.service" | ||
92 | RDEPENDS_${PN}-client = "${PN}-mount rpcbind" | ||
93 | |||
94 | FILES_${PN}-mount = "${base_sbindir}/*mount.nfs*" | ||
95 | |||
96 | FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat" | ||
97 | RDEPENDS_${PN}-stats = "python3-core" | ||
98 | |||
99 | FILES_${PN} += "${systemd_unitdir}" | ||
100 | |||
101 | do_configure_prepend() { | ||
102 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ | ||
103 | ${S}/utils/mount/Makefile.am | ||
104 | |||
105 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ | ||
106 | ${S}/utils/osd_login/Makefile.am | ||
107 | } | ||
108 | |||
109 | # Make clean needed because the package comes with | ||
110 | # precompiled 64-bit objects that break the build | ||
111 | do_compile_prepend() { | ||
112 | make clean | ||
113 | } | ||
114 | |||
115 | do_install_append () { | ||
116 | install -d ${D}${sysconfdir}/init.d | ||
117 | install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver | ||
118 | install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon | ||
119 | |||
120 | install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir} | ||
121 | install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir} | ||
122 | |||
123 | install -d ${D}${systemd_unitdir}/system | ||
124 | install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/ | ||
125 | install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/ | ||
126 | install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/ | ||
127 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
128 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
129 | ${D}${systemd_unitdir}/system/*.service | ||
130 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
131 | install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/ | ||
132 | install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/ | ||
133 | ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount | ||
134 | fi | ||
135 | |||
136 | # kernel code as of 3.8 hard-codes this path as a default | ||
137 | install -d ${D}/var/lib/nfs/v4recovery | ||
138 | |||
139 | # chown the directories and files | ||
140 | chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd | ||
141 | chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state | ||
142 | |||
143 | # the following are built by CC_FOR_BUILD | ||
144 | rm -f ${D}${sbindir}/rpcdebug | ||
145 | rm -f ${D}${sbindir}/rpcgen | ||
146 | rm -f ${D}${sbindir}/locktest | ||
147 | |||
148 | # Make python tools use python 3 | ||
149 | sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat | ||
150 | |||
151 | } | ||