diff options
| author | Daniel McGregor <daniel.mcgregor@vecima.com> | 2025-02-12 13:12:31 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-18 11:56:04 +0000 |
| commit | a7ec517298c3bd51241b29d40bcb2b0a96920aa6 (patch) | |
| tree | ce5ac3bc31b1c31879f3cd5bfba61a8005683d2a /meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb | |
| parent | cabf7967090b5ada070473c9beeecd016e04d362 (diff) | |
| download | poky-a7ec517298c3bd51241b29d40bcb2b0a96920aa6.tar.gz | |
nfs-utils: Configure nfsv4 ID mapping & Kerberos
Add support for the nfsv4 user ID mapping daemon, configured with
a sensible default, and add a packageconfig for Kerberos support.
This is reasonably tested in production in our environment, but only
systemd support. There'll be some more work to do to get GSSAPI and
NFS idmapd support integreated into that.
(From OE-Core rev: a7ea135108e445197a58b19601d77eb9d287af69)
Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb')
| -rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb index f07ed2040a..abbdec7808 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb | |||
| @@ -21,10 +21,11 @@ USERADD_PARAM:${PN}-client = "--system --home-dir /var/lib/nfs \ | |||
| 21 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \ | 21 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \ |
| 22 | file://nfsserver \ | 22 | file://nfsserver \ |
| 23 | file://nfscommon \ | 23 | file://nfscommon \ |
| 24 | file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ | ||
| 25 | file://clang-warnings.patch \ | ||
| 26 | file://0001-locktest-Makefile.am-Do-not-use-build-flags.patch \ | 24 | file://0001-locktest-Makefile.am-Do-not-use-build-flags.patch \ |
| 27 | file://0001-Fix-typecast-warning-with-clang.patch \ | 25 | file://0001-Fix-typecast-warning-with-clang.patch \ |
| 26 | file://0001-Detect-warning-options-during-configure.patch \ | ||
| 27 | file://0004-Use-nogroup-for-nobody-group.patch \ | ||
| 28 | file://0005-find-OE-provided-Kerberos.patch \ | ||
| 28 | " | 29 | " |
| 29 | 30 | ||
| 30 | SRC_URI[sha256sum] = "a39bbea76ac0ab9e6e8699caf3c308b6b310c20d458e8fa8606196d358e7fb15" | 31 | SRC_URI[sha256sum] = "a39bbea76ac0ab9e6e8699caf3c308b6b310c20d458e8fa8606196d358e7fb15" |
| @@ -49,9 +50,8 @@ EXTRA_OECONF = "--with-statduser=rpcuser \ | |||
| 49 | --enable-mountconfig \ | 50 | --enable-mountconfig \ |
| 50 | --enable-libmount-mount \ | 51 | --enable-libmount-mount \ |
| 51 | --enable-uuid \ | 52 | --enable-uuid \ |
| 52 | --disable-gss \ | ||
| 53 | --disable-nfsdcltrack \ | ||
| 54 | --with-statdpath=/var/lib/nfs/statd \ | 53 | --with-statdpath=/var/lib/nfs/statd \ |
| 54 | --with-pluginpath=${libdir}/libnfsidmap \ | ||
| 55 | --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \ | 55 | --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \ |
| 56 | " | 56 | " |
| 57 | 57 | ||
| @@ -60,13 +60,16 @@ LDFLAGS += "-lsqlite3 -levent" | |||
| 60 | PACKAGECONFIG ??= "tcp-wrappers \ | 60 | PACKAGECONFIG ??= "tcp-wrappers \ |
| 61 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ | 61 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ |
| 62 | " | 62 | " |
| 63 | |||
| 63 | PACKAGECONFIG:remove:libc-musl = "tcp-wrappers" | 64 | PACKAGECONFIG:remove:libc-musl = "tcp-wrappers" |
| 65 | #krb5 is available in meta-oe | ||
| 66 | PACKAGECONFIG[gssapi] = "--with-krb5=${STAGING_EXECPREFIXDIR} --enable-gss --enable-svcgss,--disable-gss --disable-svcgss,krb5" | ||
| 64 | PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers" | 67 | PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers" |
| 65 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | 68 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
| 66 | # libdevmapper is available in meta-oe | 69 | # libdevmapper is available in meta-oe |
| 67 | PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmapper" | 70 | PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmapper" |
| 68 | # keyutils is available in meta-oe | 71 | # keyutils is available in meta-oe |
| 69 | PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils,python3-core" | 72 | PACKAGECONFIG[nfsv4] = "--enable-nfsv4 --enable-nfsdcltrack,--disable-nfsv4 --disable-nfsdcltrack,keyutils,python3-core" |
| 70 | PACKAGECONFIG[nfsdctl] = "--enable-nfsdctl,--disable-nfsdctl,libnl readline," | 73 | PACKAGECONFIG[nfsdctl] = "--enable-nfsdctl,--disable-nfsdctl,libnl readline," |
| 71 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd" | 74 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd" |
| 72 | 75 | ||
| @@ -76,19 +79,34 @@ CONFFILES:${PN}-client += "${localstatedir}/lib/nfs/etab \ | |||
| 76 | ${localstatedir}/lib/nfs/rmtab \ | 79 | ${localstatedir}/lib/nfs/rmtab \ |
| 77 | ${localstatedir}/lib/nfs/xtab \ | 80 | ${localstatedir}/lib/nfs/xtab \ |
| 78 | ${localstatedir}/lib/nfs/statd/state \ | 81 | ${localstatedir}/lib/nfs/statd/state \ |
| 82 | ${sysconfdir}/idmapd.conf \ | ||
| 79 | ${sysconfdir}/nfs.conf \ | 83 | ${sysconfdir}/nfs.conf \ |
| 80 | ${sysconfdir}/nfsmount.conf" | 84 | ${sysconfdir}/nfsmount.conf" |
| 81 | 85 | ||
| 82 | FILES:${PN}-client = "${sbindir}/*statd \ | 86 | FILES:${PN}-client = "${sbindir}/*statd \ |
| 83 | ${libdir}/libnfsidmap.so.* \ | ||
| 84 | ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ | 87 | ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ |
| 85 | ${sbindir}/showmount ${sbindir}/nfsstat \ | 88 | ${sbindir}/showmount ${sbindir}/nfsstat \ |
| 89 | ${sbindir}/rpc.gssd \ | ||
| 86 | ${sbindir}/nfsconf \ | 90 | ${sbindir}/nfsconf \ |
| 91 | ${libdir}/libnfsidmap.so.* \ | ||
| 92 | ${libdir}/libnfsidmap/*.so \ | ||
| 93 | ${libexecdir}/nfsrahead \ | ||
| 87 | ${localstatedir}/lib/nfs \ | 94 | ${localstatedir}/lib/nfs \ |
| 95 | ${sysconfdir}/idmapd.conf \ | ||
| 96 | ${sysconfdir}/init.d/nfscommon \ | ||
| 88 | ${sysconfdir}/nfs.conf \ | 97 | ${sysconfdir}/nfs.conf \ |
| 89 | ${sysconfdir}/nfsmount.conf \ | 98 | ${sysconfdir}/nfsmount.conf \ |
| 90 | ${sysconfdir}/init.d/nfscommon \ | 99 | ${systemd_system_unitdir}/auth-rpcgss-module.service \ |
| 91 | ${systemd_system_unitdir}/nfs-statd.service" | 100 | ${systemd_system_unitdir}/nfs-client.target \ |
| 101 | ${systemd_system_unitdir}/nfs-idmapd.service \ | ||
| 102 | ${systemd_system_unitdir}/nfs-statd.service \ | ||
| 103 | ${systemd_system_unitdir}/nfscommon.service \ | ||
| 104 | ${systemd_system_unitdir}/rpc-gssd.service \ | ||
| 105 | ${systemd_system_unitdir}/rpc-statd-notify.service \ | ||
| 106 | ${systemd_system_unitdir}/rpc-statd.service \ | ||
| 107 | ${systemd_system_unitdir}/rpc_pipefs.target \ | ||
| 108 | ${systemd_system_unitdir}/var-lib-nfs-rpc_pipefs.mount \ | ||
| 109 | ${nonarch_libdir}/udev/rules.d/*" | ||
| 92 | RDEPENDS:${PN}-client = "${PN}-mount rpcbind" | 110 | RDEPENDS:${PN}-client = "${PN}-mount rpcbind" |
| 93 | 111 | ||
| 94 | FILES:${PN}-mount = "${base_sbindir}/*mount.nfs*" | 112 | FILES:${PN}-mount = "${base_sbindir}/*mount.nfs*" |
| @@ -105,7 +123,9 @@ FILES:${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/ ${nonarch_libdir}/modp | |||
| 105 | 123 | ||
| 106 | do_configure:prepend() { | 124 | do_configure:prepend() { |
| 107 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ | 125 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ |
| 108 | ${S}/utils/mount/Makefile.am ${S}/utils/nfsdcltrack/Makefile.am | 126 | -e 's,udev_rulesdir = /usr/lib/udev/rules.d/,udev_rulesdir = ${nonarch_base_libdir}/udev/rules.d/,g' \ |
| 127 | ${S}/utils/mount/Makefile.am ${S}/utils/nfsdcltrack/Makefile.am \ | ||
| 128 | ${S}/systemd/Makefile.am ${S}/tools/nfsrahead/Makefile.am | ||
| 109 | } | 129 | } |
| 110 | 130 | ||
| 111 | # Make clean needed because the package comes with | 131 | # Make clean needed because the package comes with |
| @@ -122,6 +142,7 @@ do_install:append () { | |||
| 122 | install -m 0755 ${UNPACKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver | 142 | install -m 0755 ${UNPACKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver |
| 123 | install -m 0755 ${UNPACKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon | 143 | install -m 0755 ${UNPACKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon |
| 124 | 144 | ||
| 145 | install -m 0644 ${S}/support/nfsidmap/idmapd.conf ${D}${sysconfdir} | ||
| 125 | install -m 0644 ${S}/nfs.conf ${D}${sysconfdir} | 146 | install -m 0644 ${S}/nfs.conf ${D}${sysconfdir} |
| 126 | 147 | ||
| 127 | install -d ${D}${systemd_system_unitdir} | 148 | install -d ${D}${systemd_system_unitdir} |
