summaryrefslogtreecommitdiff
path: root/net-fs/nfs-utils
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs/nfs-utils')
-rw-r--r--net-fs/nfs-utils/Manifest9
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch115
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Add-check-for-struct-file_handle.patch54
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Fix-compilation-for--disable-uuid.patch35
-rw-r--r--net-fs/nfs-utils/nfs-utils-2.3.4.ebuild192
-rw-r--r--net-fs/nfs-utils/nfs-utils-2.4.1-r4.ebuild (renamed from net-fs/nfs-utils/nfs-utils-2.4.1-r3.ebuild)3
-rw-r--r--net-fs/nfs-utils/nfs-utils-2.4.2-r1.ebuild (renamed from net-fs/nfs-utils/nfs-utils-2.4.2.ebuild)3
7 files changed, 409 insertions, 2 deletions
diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest
index 83afa8aa49b8..29ad68bbf55e 100644
--- a/net-fs/nfs-utils/Manifest
+++ b/net-fs/nfs-utils/Manifest
@@ -5,6 +5,9 @@ AUX nfs-utils-2.3.4-no-werror.patch 1832 BLAKE2B 6e0f3da6a355c3b828bbaae3135c3a6
AUX nfs-utils-2.4.1-Fix-include-order-between-config.h-and-stat.h.patch 4020 BLAKE2B 9f9079879be7bbaaf7748d4c2e5711fdeacac8b389fdb48d7fdc1c781191dc283f2dc05c9aded7558eb0cf3801cf7eda7032d091592e45cb8eb47018a0ce5430 SHA512 36b80e0f1ef0826e25ee719980171f4d6215db246392e1dbceef6aab4f1fbe78e4e1222256dfb23232b7da1b5328a23050966f3608a10c8b70b2f75491603f31
AUX nfs-utils-2.4.1-gssd-Look-in-lib32-for-gss-libs-aswell.patch 1608 BLAKE2B 761eb16d6556b0df1029556453922925ccac7bdc88c4f769382afdf659dfccdd90aa6a183d317667c638e2d2d4d8fc080cfe49070c5fec5bb5f5dc2f66d2040e SHA512 cc4a7a7dde84854b52f57afe09bbff9e241712a19784febd0992b5b53b4b14905b6daf6620a8e9049fbda1dfe0a1619f322adc0517d9747466d7974d4c3eac06
AUX nfs-utils-2.4.1-statx.patch 976 BLAKE2B 22441e3a872603978ea6d397554de76be60addf04e115cc85b0899ed471446759010bcd30e77656082be9553cdb4454e0e384140034b87af1240f810a6f7a94c SHA512 8528282344a036ce8de2173cf370141d9dac93eae4616e39748dd07bb20592464479b53ac89e02159d65f1f7c2290410122c27e9f878bee07e950ac5f4b8d423
+AUX nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch 2808 BLAKE2B 921a0e8e16d0490fb2217d8d2014770a59ff737e989bcc1424a540358b6af5e954d5c8cdf7b6096f128fc86c96a909ee68878a89b803819f57c3b6908443b7e2 SHA512 9150b778701a47bb86a98b6c1b2251d60f135794a212a9b03cb3b0f7830cb62ee466cce5f85dbee008aa476eac71e54bb3b0fca677d9dd5a31b09256d4892f48
+AUX nfs-utils-2.4.2-mountd-Add-check-for-struct-file_handle.patch 1745 BLAKE2B f86feba7e005dc6766b66a15018c5b1e7c2bf192fcf41a4be6feef6ebfd56ee290b6a7fcb789ad32499ef2cb61343d84e9f248a031e949fe2a1288a059f81e47 SHA512 087c5923cb09616846629671721763d3600dd2c55b0f70fb0a7a9f60da884ed448dc1b338a0cf6245845053a8138b99132605a9abd0e90e3be9719ce37d7a0b3
+AUX nfs-utils-2.4.2-mountd-Fix-compilation-for--disable-uuid.patch 1031 BLAKE2B eabcf55eada5f7dcc16a576cc49a1ed163d482906d1e0cbd6d42d18512374215455050bec38ce0e29c5b6516bed4113a476aeceea2f6ba229b8254e62905bdc3 SHA512 bf130ed8cce32849bd45957b5f4077e58fe6d98111f90746d628401b804bc9f13623aaca329967210a76e91ead254f3755906de313ad200f76bd52b835d79809
AUX nfs-utils-2.4.2-no-werror.patch 1866 BLAKE2B 6307f2dad086ea39b851085479a3503fd205946ee27ea693af996b2ff5cbbd642822afa18eba6598267914e0667f80cc84df64ad69689e2706d1121abace2f68 SHA512 861956a04ef5bcac9d9eb18e93e5257b0c35598a527f5b20e305ce6993532bc905e66610300b6c098433a81ee3eb08312b307f5cd276c530dcb4071429c0ffcc
AUX nfs.confd 930 BLAKE2B 4ef1662b31cffd78b0e96396ad74dc8b8135a9a18956fa1267639d2069893d4f218ded5809497b56d19a192e7e18408e1d1b56bd1535abed8db236bc1a1649cb SHA512 bc11b073735ee86c96b9c249ee187f4d16329c279a4e26760875059d2b5fa1d510ef3e4df5ee9dfb2a3133d755e1eb5c323d2fadc432a0cf630191ec353ac535
AUX nfs.initd 4013 BLAKE2B 3ccbafc56cb1aaf7b091ca5e895e71516a899177dbf5b74d3b8ecd7cb369ed2a3108cef8f76f6abc72272fbc1c692bc50a219025a9abc05d2ffb0e9caf2309d9 SHA512 2bfd641d1ff3b377aef81632ceba75e1e9aa0305d776ac8ca03217f253040ea3e6349d6d2d1815b91c5f6c90d076d6cb86294e41ecd19f31c288219620703ecc
@@ -16,8 +19,10 @@ AUX rpc.idmapd.initd 482 BLAKE2B db643d164787a730ed8f1da73cbc045237bb641fcdf2970
AUX rpc.pipefs.initd 760 BLAKE2B 4c05275e59d7d19d80779964a3631096258704cec2097f12d87232deecba5d74181f1713e18ebb01f5da9c3833037ba47566414f0b415608ad13e3fa97c8f1e6 SHA512 3d3fa6e7ae01e27d27d88aba1e307c5293dd1cbc9d555737e03c4f1e17988518f4f1e7f7a38a7337f8e8961e8378cc4611769b04db7368460589a3b218ac6d6b
AUX rpc.statd.initd 706 BLAKE2B 6c175729706d298307deea1d190703e67edb671a6b2c86216658fc89dafff1ae9f85a25b5386e4c89b86ca1b7b1fce7bb3045f944b7a1aee5b6544594d753cf8 SHA512 7f6baea852fff91b88e15e432ba19f9da0a3e3510b6f550b553912cf3887ce176280367b62bcce2a044730a075e4c1f6d7df1a669556d42725dea6e6e8e967ac
AUX rpc.svcgssd.initd 470 BLAKE2B c610a7abc44b86ca242d59f833ffa6e42f48d1c3bf93420988c6c6dfcd5cc4d8e02eaf2f3a86bb8bca7c8952e05017f887e6c4f4290085c41cc095a580e04235 SHA512 819cce4ae0a0f26bc74ce546e149b98420584240a594c9bb4a0a49413750320bde050866f3753c499425ea8d8df094211fb1f7e020ce281791e1933e1bc6a47f
+DIST nfs-utils-2.3.4.tar.bz2 906900 BLAKE2B 968fac7b37c7311bc8d29667c88db925aac0c062ed7ef8c13f9e5c11c3c88960ffaea56c1b6cfb5594a01238f9190e55ab7b837a79a7a804bc55dcca75908eea SHA512 25203b38be6683f25ad6583ac8534873c907124092a768955c1454899e2f467b9dd427b167556eb4f28992b5720da13078eb1eb086da991438454f268e1559a5
DIST nfs-utils-2.4.1.tar.bz2 910791 BLAKE2B 4419eff7fca21747e0bc4969ebb8a8b863aa951984af8f23f197e7dfc4faad3770173808862b84178714ca75f021be1af96f9e4408fecd7ef97999d261f2f21b SHA512 655a115955f35177b761f821e29c752693d614f4c6c2a90d392e0ab83b615247a397cf18e8ad453a93c6dc528d1fa90cfdf8b04de6626e0f4083b10e2e54f540
DIST nfs-utils-2.4.2.tar.bz2 918576 BLAKE2B a1dba3ae2e58794509ea7907d80e40fc49a0c5e72019222ba16daa74aa757cab5e6fde9ed066f6b5f379b40dbd61622a05fcafc298a79231e417ab2086127278 SHA512 f9724ff2ac185e6c29afd577b33da38b1d11803af1ccb905cd615afa3383c6ac7a3fa4e0f43ea8d062e9aedcdbae90adc9b55ae9d0abe4731f69aa3a6f8d2534
-EBUILD nfs-utils-2.4.1-r3.ebuild 6001 BLAKE2B 2cc1e77beb725f3d78b80d881865eb11ca50db5d1f9fe3e1d09236e355d0d2c65b661ea294f54a8310976439fc543fce83555afcc26844a9a09492335f681ad2 SHA512 a81ac62e01ddf000515f48bca196896cd56acec1fd447d912a659b825489b196e54b86b46606c1411f0eae4d740ce55fa95583b9b56c7d76b232c20eef889d22
-EBUILD nfs-utils-2.4.2.ebuild 5876 BLAKE2B 4c5fad2645a665852a93625397699a18e34f643a11e66048074a5b969f9ed75d5344f19d3f1780edfcc975a6718688cd2fa51f8f8d8374cb1379e0a4628ddb79 SHA512 00d04c4416287c9ea3c8940b843ed2bbd36791dce425641e7fe82fdc4bcc4936873d13252ede34a7b4b6f23bdb49a696d946e0a1fdee4a20658c4492ad2f1596
+EBUILD nfs-utils-2.3.4.ebuild 5269 BLAKE2B 5c940049177cd424d61b426d94edf488643ddad19e95de2245e5e8c581f9f0dce78bf55a73e6ead084ad0f293e7a5e6ea564078702bb5b72a104334fc5810fd1 SHA512 2856242c30e23c07ed63b1e2108d83acd5e322e4e3dc32ca93a52b444912a183e1c3a2d8dc34ea5b698b5cf4986392d005477456fd16dcfddc9b1757ab06484e
+EBUILD nfs-utils-2.4.1-r4.ebuild 6211 BLAKE2B 8164f3fafd11a4b42ab99e9e19e65e2490bad1370b2c1a19de323d51d0f624d61ba9a112ebb9018ebe89adbad46bc25a56c3e0ced2adab6caf4315dfd62073c5 SHA512 b1fec1ea6330e1142761fb6f0c4aabe3adfa661876c31a680e23d38e1c2ae42fed8806bfd20f5f41f65209bc7ad4e926816020f9f2bdd03329d6057a33f785f2
+EBUILD nfs-utils-2.4.2-r1.ebuild 6065 BLAKE2B 45f0c136d6ab0bc8ff79d2f7f7906c94288d0431a6189c0855970911341704921b96ec90d661c94aa6499e99d65fcb2105fab37ad47671f41ac7594ecbf06b40 SHA512 3e86d8a0083cd691ad91ed598290516ff93b2a2de2d5d654313b154d79e8db800f76fea20d2d18d4b35e64dfff1b71c15c76445620a69dd519bb09805125fcc0
MISC metadata.xml 932 BLAKE2B 14cb95a010cdb52373502bdad4de008234494be6e38f6b3fbf6b69e0848a6daa1315ed69b8eaadaad0cd546e84ba0e291b56ebf9db486b7c6e66011147b9a97c SHA512 eb45c97d7ed2bdaa8e43ce0a4fdb2f8a1d197bfd67a8b04f718c6083e7701873e2c22550700049edc25068daacb5278ca2535b63a02a10c1040efe0dbcef76a5
diff --git a/net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch b/net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch
new file mode 100644
index 000000000000..e64e2c6da385
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch
@@ -0,0 +1,115 @@
+From 1378280398ef9f5cd45f5542ae2945b9a360b132 Mon Sep 17 00:00:00 2001
+From: Doug Nazar <nazard@nazar.ca>
+Date: Sun, 17 Nov 2019 14:31:33 -0500
+Subject: [PATCH] Ensure consistent struct stat definition
+
+Although 2fbc62e2a13fc ("Fix include order between config.h and stat.h")
+reorganized those files that were already including config.h, not all
+files were including config.h.
+
+Fixes at least stack smashing crashes in mountd on 32-bit systems.
+
+Signed-off-by: Doug Nazar <nazard@nazar.ca>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ support/junction/junction.c | 4 ++++
+ support/misc/file.c | 4 ++++
+ support/misc/mountpoint.c | 4 ++++
+ support/nfs/cacheio.c | 4 ++++
+ utils/mount/fstab.c | 4 ++++
+ utils/nfsdcld/legacy.c | 4 ++++
+ 6 files changed, 24 insertions(+)
+
+diff --git a/support/junction/junction.c b/support/junction/junction.c
+index ab6caa6..41cce26 100644
+--- a/support/junction/junction.c
++++ b/support/junction/junction.c
+@@ -23,6 +23,10 @@
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
+ */
+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
+diff --git a/support/misc/file.c b/support/misc/file.c
+index e7c3819..06f6bb2 100644
+--- a/support/misc/file.c
++++ b/support/misc/file.c
+@@ -18,6 +18,10 @@
+ * along with nfs-utils. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <sys/stat.h>
+
+ #include <string.h>
+diff --git a/support/misc/mountpoint.c b/support/misc/mountpoint.c
+index c6217f2..14d6731 100644
+--- a/support/misc/mountpoint.c
++++ b/support/misc/mountpoint.c
+@@ -3,6 +3,10 @@
+ * check if a given path is a mountpoint
+ */
+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <string.h>
+ #include "xcommon.h"
+ #include <sys/stat.h>
+diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
+index 9dc4cf1..7c4cf37 100644
+--- a/support/nfs/cacheio.c
++++ b/support/nfs/cacheio.c
+@@ -15,6 +15,10 @@
+ *
+ */
+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <nfslib.h>
+ #include <stdio.h>
+ #include <stdio_ext.h>
+diff --git a/utils/mount/fstab.c b/utils/mount/fstab.c
+index eedbdda..8b0aaf1 100644
+--- a/utils/mount/fstab.c
++++ b/utils/mount/fstab.c
+@@ -7,6 +7,10 @@
+ * - Moved code to nfs-utils/support/nfs from util-linux/mount.
+ */
+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <errno.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+diff --git a/utils/nfsdcld/legacy.c b/utils/nfsdcld/legacy.c
+index 07f477a..3c6bea6 100644
+--- a/utils/nfsdcld/legacy.c
++++ b/utils/nfsdcld/legacy.c
+@@ -15,6 +15,10 @@
+ * Boston, MA 02110-1301, USA.
+ */
+
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <stdio.h>
+ #include <dirent.h>
+ #include <string.h>
+--
+1.8.3.1
+
diff --git a/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Add-check-for-struct-file_handle.patch b/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Add-check-for-struct-file_handle.patch
new file mode 100644
index 000000000000..2a89cc7665f0
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Add-check-for-struct-file_handle.patch
@@ -0,0 +1,54 @@
+From f100d07d923b5db60d42dc2453485fa0dba69a79 Mon Sep 17 00:00:00 2001
+From: Petr Vorel <petr.vorel@gmail.com>
+Date: Mon, 18 Nov 2019 08:58:36 -0500
+Subject: [PATCH] mountd: Add check for 'struct file_handle'
+
+From: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
+
+The code to check if name_to_handle_at() is implemented generates only a
+warning but with some toolchain it doesn't fail to link (the function must be
+implemented somewhere).
+However the "struct file_handle" type is not available.
+
+So, this patch adds a check for this struct.
+
+Patch taken from buildroot distribution.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+[ pvorel: rebased from nfs-utils-1-3-4 ]
+Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
+Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ configure.ac | 1 +
+ utils/mountd/cache.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9ba9d4b..949ff9f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -510,6 +510,7 @@ AC_TYPE_PID_T
+ AC_TYPE_SIZE_T
+ AC_HEADER_TIME
+ AC_STRUCT_TM
++AC_CHECK_TYPES([struct file_handle])
+
+ dnl *************************************************************
+ dnl Check for functions
+diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
+index 3861f84..31e9507 100644
+--- a/utils/mountd/cache.c
++++ b/utils/mountd/cache.c
+@@ -446,7 +446,7 @@ static int same_path(char *child, char *parent, int len)
+ if (count_slashes(p) != count_slashes(parent))
+ return 0;
+
+-#if HAVE_NAME_TO_HANDLE_AT
++#if defined(HAVE_NAME_TO_HANDLE_AT) && defined(HAVE_STRUCT_FILE_HANDLE)
+ struct {
+ struct file_handle fh;
+ unsigned char handle[128];
+--
+1.8.3.1
+
diff --git a/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Fix-compilation-for--disable-uuid.patch b/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Fix-compilation-for--disable-uuid.patch
new file mode 100644
index 000000000000..3bb9f8b3c9bf
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Fix-compilation-for--disable-uuid.patch
@@ -0,0 +1,35 @@
+From 31bb484b22c220c561f3a95c3b7ca3ea9b96cc9b Mon Sep 17 00:00:00 2001
+From: Petr Vorel <petr.vorel@gmail.com>
+Date: Mon, 18 Nov 2019 11:27:19 -0500
+Subject: [PATCH] mountd: Fix compilation for --disable-uuid
+
+Although code in configure.ac pretends to set USE_BLKID as 0
+via AC_DEFINE_UNQUOTED, it's actually not defined
+support/include/config.h.in
+support/include/config.h
+/* #undef USE_BLKID */
+
+Fixes: 8e643554 ("Allow disabling of libblkid usage.")
+
+Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ utils/mountd/cache.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
+index 31e9507..e5186c7 100644
+--- a/utils/mountd/cache.c
++++ b/utils/mountd/cache.c
+@@ -221,7 +221,7 @@ static void auth_unix_gid(int f)
+ xlog(L_ERROR, "auth_unix_gid: error writing reply");
+ }
+
+-#if USE_BLKID
++#ifdef USE_BLKID
+ static const char *get_uuid_blkdev(char *path)
+ {
+ /* We set *safe if we know that we need the
+--
+1.8.3.1
+
diff --git a/net-fs/nfs-utils/nfs-utils-2.3.4.ebuild b/net-fs/nfs-utils/nfs-utils-2.3.4.ebuild
new file mode 100644
index 000000000000..e13b00d0c3e0
--- /dev/null
+++ b/net-fs/nfs-utils/nfs-utils-2.3.4.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic multilib systemd
+
+DESCRIPTION="NFS client and server daemons"
+HOMEPAGE="http://linux-nfs.org/"
+
+if [[ "${PV}" = *_rc* ]] ; then
+ MY_PV="$(ver_rs 1- -)"
+ SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
+else
+ SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~riscv s390 sh sparc x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps ipv6 junction kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
+REQUIRED_USE="kerberos? ( nfsv4 )"
+RESTRICT="test" #315573
+
+# kth-krb doesn't provide the right include
+# files, and nfs-utils doesn't build against heimdal either,
+# so don't depend on virtual/krb.
+# (04 Feb 2005 agriffis)
+DEPEND="
+ >=dev-db/sqlite-3.3
+ dev-libs/libxml2
+ net-libs/libtirpc:=
+ >=net-nds/rpcbind-0.2.4
+ sys-libs/e2fsprogs-libs
+ caps? ( sys-libs/libcap )
+ ldap? ( net-nds/openldap )
+ libmount? ( sys-apps/util-linux )
+ nfsv4? (
+ dev-libs/libevent:=
+ >=sys-apps/keyutils-1.5.9
+ kerberos? (
+ >=net-libs/libtirpc-0.2.4-r1[kerberos]
+ app-crypt/mit-krb5
+ )
+ )
+ nfsv41? (
+ sys-fs/lvm2
+ )
+ tcpd? ( sys-apps/tcp-wrappers )
+ uuid? ( sys-apps/util-linux )"
+RDEPEND="${DEPEND}
+ !net-libs/libnfsidmap
+ !net-nds/portmap
+ !<sys-apps/openrc-0.13.9
+ selinux? (
+ sec-policy/selinux-rpc
+ sec-policy/selinux-rpcbind
+ )
+"
+BDEPEND="
+ net-libs/rpcsvc-proto
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
+ "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
+ "${FILESDIR}"/${PN}-2.3.4-no-werror.patch
+)
+
+src_prepare() {
+ default
+
+ sed \
+ -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
+ -i utils/*/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
+ export ac_cv_header_keyutils_h=$(usex nfsidmap)
+ local myeconfargs=(
+ --with-statedir="${EPREFIX%/}"/var/lib/nfs
+ --enable-tirpc
+ --with-tirpcinclude="${EPREFIX%/}"/usr/include/tirpc/
+ --with-pluginpath="${EPREFIX%/}"/usr/$(get_libdir)/libnfsidmap
+ --with-rpcgen
+ --with-systemd="$(systemd_get_systemunitdir)"
+ --without-gssglue
+ $(use_enable caps)
+ $(use_enable ipv6)
+ $(use_enable junction)
+ $(use_enable kerberos gss)
+ $(use_enable kerberos svcgss)
+ $(use_enable ldap)
+ $(use_enable libmount libmount-mount)
+ $(use_enable nfsdcld nfsdcltrack)
+ $(use_enable nfsv4)
+ $(use_enable nfsv41)
+ $(use_enable uuid)
+ $(use_with tcpd tcp-wrappers)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile(){
+ # remove compiled files bundled in the tarball
+ emake clean
+ default
+}
+
+src_install() {
+ default
+ rm linux-nfs/Makefile* || die
+ dodoc -r linux-nfs README
+
+ # Don't overwrite existing xtab/etab, install the original
+ # versions somewhere safe... more info in pkg_postinst
+ keepdir /var/lib/nfs/{,sm,sm.bak}
+ mv "${ED}"/var/lib/nfs "${ED}"/usr/$(get_libdir)/ || die
+
+ # Install some client-side binaries in /sbin
+ dodir /sbin
+ mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
+
+ if use nfsv4 && use nfsidmap ; then
+ # Install a config file for idmappers in newer kernels. #415625
+ insinto /etc/request-key.d
+ echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
+ doins id_resolver.conf
+ fi
+
+ insinto /etc
+ doins "${FILESDIR}"/exports
+ keepdir /etc/exports.d
+
+ local f list=() opt_need=""
+ if use nfsv4 ; then
+ opt_need="rpc.idmapd"
+ list+=( rpc.idmapd rpc.pipefs )
+ use kerberos && list+=( rpc.gssd rpc.svcgssd )
+ fi
+ for f in nfs nfsclient rpc.statd "${list[@]}" ; do
+ newinitd "${FILESDIR}"/${f}.initd ${f}
+ done
+ newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
+ for f in nfs nfsclient ; do
+ newconfd "${FILESDIR}"/${f}.confd ${f}
+ done
+ sed -i \
+ -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
+ "${ED}"/etc/conf.d/nfs || die #234132
+
+ local systemd_systemunitdir="$(systemd_get_systemunitdir)"
+ sed -i \
+ -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
+ "${ED}${systemd_systemunitdir}"/* || die
+
+ keepdir /var/lib/nfs #368505
+ keepdir /var/lib/nfs/v4recovery #603628
+
+}
+
+pkg_postinst() {
+ # Install default xtab and friends if there's none existing. In
+ # src_install we put them in /usr/lib/nfs for safe-keeping, but
+ # the daemons actually use the files in /var/lib/nfs. #30486
+ local f
+ for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
+ [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
+ einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
+ cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
+ done
+
+ if systemd_is_booted; then
+ for v in ${REPLACING_VERSIONS}; do
+ if ver_test "${v}" -lt 1.3.0; then
+ ewarn "We have switched to upstream systemd unit files. Since"
+ ewarn "they got renamed, you should probably enable the new ones."
+ ewarn "You can run 'equery files nfs-utils | grep systemd'"
+ ewarn "to know what services you need to enable now."
+ fi
+ done
+ else
+ ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
+ ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
+ ewarn "same runlevel as nfsmount."
+ fi
+}
diff --git a/net-fs/nfs-utils/nfs-utils-2.4.1-r3.ebuild b/net-fs/nfs-utils/nfs-utils-2.4.1-r4.ebuild
index 24e426f2374b..fc20760da240 100644
--- a/net-fs/nfs-utils/nfs-utils-2.4.1-r3.ebuild
+++ b/net-fs/nfs-utils/nfs-utils-2.4.1-r4.ebuild
@@ -70,6 +70,9 @@ PATCHES=(
"${FILESDIR}"/${P}-gssd-Look-in-lib32-for-gss-libs-aswell.patch
"${FILESDIR}"/${P}-Fix-include-order-between-config.h-and-stat.h.patch
"${FILESDIR}"/${PN}-2.4.1-statx.patch #688644
+ "${FILESDIR}"/${PN}-2.4.2-Ensure-consistent-struct-stat.patch
+ "${FILESDIR}"/${PN}-2.4.2-mountd-Add-check-for-struct-file_handle.patch
+ "${FILESDIR}"/${PN}-2.4.2-mountd-Fix-compilation-for--disable-uuid.patch
)
pkg_setup() {
diff --git a/net-fs/nfs-utils/nfs-utils-2.4.2.ebuild b/net-fs/nfs-utils/nfs-utils-2.4.2-r1.ebuild
index 4ff3af16fc9d..9bfa0765d646 100644
--- a/net-fs/nfs-utils/nfs-utils-2.4.2.ebuild
+++ b/net-fs/nfs-utils/nfs-utils-2.4.2-r1.ebuild
@@ -68,6 +68,9 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.2.8-cross-build.patch
"${FILESDIR}"/${PN}-2.4.2-no-werror.patch
"${FILESDIR}"/${PN}-2.4.1-statx.patch #688644
+ "${FILESDIR}"/${P}-Ensure-consistent-struct-stat.patch
+ "${FILESDIR}"/${P}-mountd-Add-check-for-struct-file_handle.patch
+ "${FILESDIR}"/${P}-mountd-Fix-compilation-for--disable-uuid.patch
)
pkg_setup() {