diff options
| author | Robert Yang <liezhi.yang@windriver.com> | 2024-09-08 06:31:23 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-09-20 14:01:02 +0100 |
| commit | c66e272cd8f190588dfb4ea716fc21726d93accd (patch) | |
| tree | e823836fd00f71c26cdb80f04f703e12a6519499 /meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb | |
| parent | 6ae52edfbb5483e4b603d5cf3df344d21bec0df1 (diff) | |
| download | poky-c66e272cd8f190588dfb4ea716fc21726d93accd.tar.gz | |
nfs-utils: 2.6.4 -> 2.7.1
* Remove 0001-tools-locktest-Use-intmax_t-to-print-off_t.patch, upstream has
fixed it with %lld.
* Remove 0001-reexport.h-Include-unistd.h-to-compile-with-musl.patch, it builds well
with musl without this patch.
* Add libxml2 to DEPENDS to fix:
configure: error: libxml2 not found.
* Add the following 2 patches to fix build errors with musl:
0001-support-include-junction.h-Define-macros-for-musl.patch
0001-support-junction-path.c-Fix-buld-for-musl.patch
(From OE-Core rev: 5e79a26b4188f562fe349ccb4523f60ad6f9c2a0)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb')
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb new file mode 100644 index 0000000000..849ea0e43b --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.7.1.bb | |||
| @@ -0,0 +1,154 @@ | |||
| 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://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-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ | ||
| 32 | file://clang-warnings.patch \ | ||
| 33 | file://0001-locktest-Makefile.am-Do-not-use-build-flags.patch \ | ||
| 34 | file://0001-support-include-junction.h-Define-macros-for-musl.patch \ | ||
| 35 | file://0001-support-junction-path.c-Fix-build-for-musl.patch \ | ||
| 36 | " | ||
| 37 | SRC_URI[sha256sum] = "885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48" | ||
| 38 | |||
| 39 | # Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will | ||
| 40 | # pull in the remainder of the dependencies. | ||
| 41 | |||
| 42 | INITSCRIPT_PACKAGES = "${PN} ${PN}-client" | ||
| 43 | INITSCRIPT_NAME = "nfsserver" | ||
| 44 | INITSCRIPT_PARAMS = "defaults" | ||
| 45 | INITSCRIPT_NAME:${PN}-client = "nfscommon" | ||
| 46 | INITSCRIPT_PARAMS:${PN}-client = "defaults 19 21" | ||
| 47 | |||
| 48 | inherit autotools-brokensep update-rc.d systemd pkgconfig | ||
| 49 | |||
| 50 | SYSTEMD_PACKAGES = "${PN} ${PN}-client" | ||
| 51 | SYSTEMD_SERVICE:${PN} = "nfs-server.service nfs-mountd.service" | ||
| 52 | SYSTEMD_SERVICE:${PN}-client = "nfs-statd.service" | ||
| 53 | |||
| 54 | # --enable-uuid is need for cross-compiling | ||
| 55 | EXTRA_OECONF = "--with-statduser=rpcuser \ | ||
| 56 | --enable-mountconfig \ | ||
| 57 | --enable-libmount-mount \ | ||
| 58 | --enable-uuid \ | ||
| 59 | --disable-gss \ | ||
| 60 | --disable-nfsdcltrack \ | ||
| 61 | --with-statdpath=/var/lib/nfs/statd \ | ||
| 62 | --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \ | ||
| 63 | " | ||
| 64 | |||
| 65 | LDFLAGS += "-lsqlite3 -levent" | ||
| 66 | |||
| 67 | PACKAGECONFIG ??= "tcp-wrappers \ | ||
| 68 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ | ||
| 69 | " | ||
| 70 | PACKAGECONFIG:remove:libc-musl = "tcp-wrappers" | ||
| 71 | PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers" | ||
| 72 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
| 73 | # libdevmapper is available in meta-oe | ||
| 74 | PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmapper" | ||
| 75 | # keyutils is available in meta-oe | ||
| 76 | PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils,python3-core" | ||
| 77 | |||
| 78 | PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats ${PN}-rpcctl" | ||
| 79 | |||
| 80 | CONFFILES:${PN}-client += "${localstatedir}/lib/nfs/etab \ | ||
| 81 | ${localstatedir}/lib/nfs/rmtab \ | ||
| 82 | ${localstatedir}/lib/nfs/xtab \ | ||
| 83 | ${localstatedir}/lib/nfs/statd/state \ | ||
| 84 | ${sysconfdir}/nfsmount.conf" | ||
| 85 | |||
| 86 | FILES:${PN}-client = "${sbindir}/*statd \ | ||
| 87 | ${libdir}/libnfsidmap.so.* \ | ||
| 88 | ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ | ||
| 89 | ${sbindir}/showmount ${sbindir}/nfsstat \ | ||
| 90 | ${localstatedir}/lib/nfs \ | ||
| 91 | ${sysconfdir}/nfs-utils.conf \ | ||
| 92 | ${sysconfdir}/nfsmount.conf \ | ||
| 93 | ${sysconfdir}/init.d/nfscommon \ | ||
| 94 | ${systemd_system_unitdir}/nfs-statd.service" | ||
| 95 | RDEPENDS:${PN}-client = "${PN}-mount rpcbind" | ||
| 96 | |||
| 97 | FILES:${PN}-mount = "${base_sbindir}/*mount.nfs*" | ||
| 98 | |||
| 99 | FILES:${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat ${sbindir}/nfsdclnts" | ||
| 100 | RDEPENDS:${PN}-stats = "python3-core" | ||
| 101 | |||
| 102 | FILES:${PN}-rpcctl = "${sbindir}/rpcctl" | ||
| 103 | RDEPENDS:${PN}-rpcctl = "python3-core" | ||
| 104 | |||
| 105 | FILES:${PN}-staticdev += "${libdir}/libnfsidmap/*.a" | ||
| 106 | |||
| 107 | FILES:${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/ ${nonarch_libdir}/modprobe.d" | ||
| 108 | |||
| 109 | do_configure:prepend() { | ||
| 110 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ | ||
| 111 | ${S}/utils/mount/Makefile.am | ||
| 112 | } | ||
| 113 | |||
| 114 | # Make clean needed because the package comes with | ||
| 115 | # precompiled 64-bit objects that break the build | ||
| 116 | do_compile:prepend() { | ||
| 117 | make clean | ||
| 118 | } | ||
| 119 | |||
| 120 | # Works on systemd only | ||
| 121 | HIGH_RLIMIT_NOFILE ??= "4096" | ||
| 122 | |||
| 123 | do_install:append () { | ||
| 124 | install -d ${D}${sysconfdir}/init.d | ||
| 125 | install -m 0755 ${UNPACKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver | ||
| 126 | install -m 0755 ${UNPACKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon | ||
| 127 | |||
| 128 | install -m 0755 ${UNPACKDIR}/nfs-utils.conf ${D}${sysconfdir} | ||
| 129 | install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir} | ||
| 130 | |||
| 131 | install -d ${D}${systemd_system_unitdir} | ||
| 132 | install -m 0644 ${UNPACKDIR}/nfs-server.service ${D}${systemd_system_unitdir}/ | ||
| 133 | install -m 0644 ${UNPACKDIR}/nfs-mountd.service ${D}${systemd_system_unitdir}/ | ||
| 134 | install -m 0644 ${UNPACKDIR}/nfs-statd.service ${D}${systemd_system_unitdir}/ | ||
| 135 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
| 136 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
| 137 | -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \ | ||
| 138 | ${D}${systemd_system_unitdir}/*.service | ||
| 139 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
| 140 | install -m 0644 ${UNPACKDIR}/proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/ | ||
| 141 | install -d ${D}${systemd_system_unitdir}/sysinit.target.wants/ | ||
| 142 | ln -sf ../proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/sysinit.target.wants/proc-fs-nfsd.mount | ||
| 143 | fi | ||
| 144 | |||
| 145 | # kernel code as of 3.8 hard-codes this path as a default | ||
| 146 | install -d ${D}/var/lib/nfs/v4recovery | ||
| 147 | |||
| 148 | # chown the directories and files | ||
| 149 | chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd | ||
| 150 | chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state | ||
| 151 | |||
| 152 | # Make python tools use python 3 | ||
| 153 | sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat | ||
| 154 | } | ||
