diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2019-08-28 19:04:57 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-30 17:10:28 +0100 |
commit | 19985178e7bd01234d93b6b97071f193ed29b2b3 (patch) | |
tree | bdbb5dbaa0b2765fd90aaf07d70a8dca6c949b7d /meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb | |
parent | d6094e1e4e49be02932a757373e8b01e97ff3709 (diff) | |
download | poky-19985178e7bd01234d93b6b97071f193ed29b2b3.tar.gz |
nfs-utils: 2.3.3 -> 2.4.1
- Remove 0001-Do-not-pass-null-pointer-to-freeaddrinfo.patch, the new api
can check the pointer before free it.
- Rmove 0001-makefile.am-update-the-path-of-libnfs.a.patch, it is already in
the source.
- Rmove nfs-utils-musl-limits.patch, it is already fixed.
- Rebased the following patches:
0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch
0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch
bugfix-adjust-statd-service-name.patch
nfs-utils-musl-res_querydomain.patch
(From OE-Core rev: 5601523e16ebd35d7de8d22ec5590618ea9f7ffb)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb')
-rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.1.bb new file mode 100644 index 0000000000..8b673c8f5f --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.4.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 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-debianize-start-statd.patch \ | ||
30 | file://bugfix-adjust-statd-service-name.patch \ | ||
31 | file://0001-cacheio-use-intmax_t-for-formatted-IO.patch \ | ||
32 | file://clang-format-string.patch \ | ||
33 | file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ | ||
34 | file://0001-Don-t-build-tools-with-CC_FOR_BUILD.patch \ | ||
35 | " | ||
36 | SRC_URI_append_libc-glibc = " file://0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch" | ||
37 | SRC_URI_append_libc-musl = " file://nfs-utils-musl-res_querydomain.patch" | ||
38 | |||
39 | SRC_URI[md5sum] = "161efe469ec1b06f1c750bd87f8ba6dd" | ||
40 | SRC_URI[sha256sum] = "85274ada94479b1beba9f8eeffd19f477c53a6710b9998d1192c807854087736" | ||
41 | |||
42 | # Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will | ||
43 | # pull in the remainder of the dependencies. | ||
44 | |||
45 | INITSCRIPT_PACKAGES = "${PN} ${PN}-client" | ||
46 | INITSCRIPT_NAME = "nfsserver" | ||
47 | INITSCRIPT_PARAMS = "defaults" | ||
48 | INITSCRIPT_NAME_${PN}-client = "nfscommon" | ||
49 | INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21" | ||
50 | |||
51 | inherit autotools-brokensep update-rc.d systemd pkgconfig | ||
52 | |||
53 | SYSTEMD_PACKAGES = "${PN} ${PN}-client" | ||
54 | SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service" | ||
55 | SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service" | ||
56 | |||
57 | # --enable-uuid is need for cross-compiling | ||
58 | EXTRA_OECONF = "--with-statduser=rpcuser \ | ||
59 | --enable-mountconfig \ | ||
60 | --enable-libmount-mount \ | ||
61 | --enable-uuid \ | ||
62 | --disable-gss \ | ||
63 | --disable-nfsdcltrack \ | ||
64 | --with-statdpath=/var/lib/nfs/statd \ | ||
65 | " | ||
66 | |||
67 | CFLAGS += "-Wno-error=format-overflow" | ||
68 | |||
69 | PACKAGECONFIG ??= "tcp-wrappers \ | ||
70 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ | ||
71 | " | ||
72 | PACKAGECONFIG_remove_libc-musl = "tcp-wrappers" | ||
73 | PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers" | ||
74 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
75 | # libdevmapper is available in meta-oe | ||
76 | PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper" | ||
77 | # keyutils is available in meta-security | ||
78 | PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils" | ||
79 | |||
80 | PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats" | ||
81 | |||
82 | CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \ | ||
83 | ${localstatedir}/lib/nfs/rmtab \ | ||
84 | ${localstatedir}/lib/nfs/xtab \ | ||
85 | ${localstatedir}/lib/nfs/statd/state \ | ||
86 | ${sysconfdir}/nfsmount.conf" | ||
87 | |||
88 | FILES_${PN}-client = "${sbindir}/*statd \ | ||
89 | ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ | ||
90 | ${sbindir}/showmount ${sbindir}/nfsstat \ | ||
91 | ${localstatedir}/lib/nfs \ | ||
92 | ${sysconfdir}/nfs-utils.conf \ | ||
93 | ${sysconfdir}/nfsmount.conf \ | ||
94 | ${sysconfdir}/init.d/nfscommon \ | ||
95 | ${systemd_unitdir}/system/nfs-statd.service" | ||
96 | RDEPENDS_${PN}-client = "${PN}-mount rpcbind" | ||
97 | |||
98 | FILES_${PN}-mount = "${base_sbindir}/*mount.nfs*" | ||
99 | |||
100 | FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat" | ||
101 | RDEPENDS_${PN}-stats = "python3-core" | ||
102 | |||
103 | FILES_${PN} += "${systemd_unitdir}" | ||
104 | |||
105 | do_configure_prepend() { | ||
106 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ | ||
107 | ${S}/utils/mount/Makefile.am | ||
108 | } | ||
109 | |||
110 | # Make clean needed because the package comes with | ||
111 | # precompiled 64-bit objects that break the build | ||
112 | do_compile_prepend() { | ||
113 | make clean | ||
114 | } | ||
115 | |||
116 | # Works on systemd only | ||
117 | HIGH_RLIMIT_NOFILE ??= "4096" | ||
118 | |||
119 | do_install_append () { | ||
120 | install -d ${D}${sysconfdir}/init.d | ||
121 | install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver | ||
122 | install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon | ||
123 | |||
124 | install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir} | ||
125 | install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir} | ||
126 | |||
127 | install -d ${D}${systemd_unitdir}/system | ||
128 | install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/ | ||
129 | install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/ | ||
130 | install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/ | ||
131 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
132 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
133 | -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \ | ||
134 | ${D}${systemd_unitdir}/system/*.service | ||
135 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
136 | install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/ | ||
137 | install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/ | ||
138 | ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount | ||
139 | fi | ||
140 | |||
141 | # kernel code as of 3.8 hard-codes this path as a default | ||
142 | install -d ${D}/var/lib/nfs/v4recovery | ||
143 | |||
144 | # chown the directories and files | ||
145 | chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd | ||
146 | chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state | ||
147 | |||
148 | # Make python tools use python 3 | ||
149 | sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat | ||
150 | |||
151 | } | ||