Merge "lakitu: create package information file in the image"
diff --git a/PRESUBMIT.cfg b/PRESUBMIT.cfg
index 92221ad..806b478 100644
--- a/PRESUBMIT.cfg
+++ b/PRESUBMIT.cfg
@@ -7,7 +7,8 @@
 manifest_check: true
 
 # On by default, but required for options below.
-cros_license_check: true
+cros_license_check: false
+cos_ebuild_license_header_check: true
 
 [Hook Overrides Options]
 # Ignore generated chromeos-config C files.
diff --git a/overlay-lakitu/app-emulation/containerd/Manifest b/overlay-lakitu/app-emulation/containerd/Manifest
index cf4075d..d4e41a5 100644
--- a/overlay-lakitu/app-emulation/containerd/Manifest
+++ b/overlay-lakitu/app-emulation/containerd/Manifest
@@ -1 +1 @@
-DIST containerd-1.4.0_rc0.tar.gz 6073516 BLAKE2B 8d5ce4499e2520666abba6868796d390e17b13782c00966a64b8b6f3d5db0068485077f99033f86f015c6cbfadf8ef2d496e6010d258bd2c20b551a13cbf68dd SHA512 df50f6a73a4926bac975d3e2e665535edf8b813298bfeaaae95b8e721525c72a48ccb6ee4b623db1109110427f7065a650b4e2935c18153e5d707d83ac3be745
+DIST containerd-1.4.0.tar.gz 6165201 BLAKE2B d90d03fea9992827ac31e3b438d1891d50103c01387d4b5e66506ad72509e3f0ca97ca096384ec76843fc49c49684e139107914db486f3ec1aae023ceb5dd2cc SHA512 5ac733a0823f5b680d40f76cb5a8277e84efdd6642d15c1735049f8859bf9f87b212b4075bdc13e8f09a5564b55ce74d7d1290628b0ca92d9753ef9bfa9a0e44
diff --git a/overlay-lakitu/app-emulation/containerd/containerd-1.4.0-r1.ebuild b/overlay-lakitu/app-emulation/containerd/containerd-1.4.0-r1.ebuild
new file mode 120000
index 0000000..8578240
--- /dev/null
+++ b/overlay-lakitu/app-emulation/containerd/containerd-1.4.0-r1.ebuild
@@ -0,0 +1 @@
+containerd-1.4.0.ebuild
\ No newline at end of file
diff --git a/overlay-lakitu/app-emulation/containerd/containerd-1.4.0_rc0.ebuild b/overlay-lakitu/app-emulation/containerd/containerd-1.4.0.ebuild
similarity index 97%
rename from overlay-lakitu/app-emulation/containerd/containerd-1.4.0_rc0.ebuild
rename to overlay-lakitu/app-emulation/containerd/containerd-1.4.0.ebuild
index a0149dc..9bf9811 100644
--- a/overlay-lakitu/app-emulation/containerd/containerd-1.4.0_rc0.ebuild
+++ b/overlay-lakitu/app-emulation/containerd/containerd-1.4.0.ebuild
@@ -12,7 +12,7 @@
 else
 	MY_PV="${PV/_rc/-rc.}"
 	EGIT_COMMIT="v${MY_PV}"
-	CONTAINERD_COMMIT="85b15eff4581d7e5e3bccb40fdd4f35b6946f545"
+	CONTAINERD_COMMIT="09814d48d50816305a8e6c1a4ae3e2bcc4ba725a"
 	SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
 	KEYWORDS="*"
 	inherit golang-vcs-snapshot
diff --git a/overlay-lakitu/app-emulation/containerd/containerd-1.4.0_rc0-r1.ebuild b/overlay-lakitu/app-emulation/containerd/containerd-1.4.0_rc0-r1.ebuild
deleted file mode 120000
index b4bef80..0000000
--- a/overlay-lakitu/app-emulation/containerd/containerd-1.4.0_rc0-r1.ebuild
+++ /dev/null
@@ -1 +0,0 @@
-containerd-1.4.0_rc0.ebuild
\ No newline at end of file
diff --git a/overlay-lakitu/app-emulation/containerd/files/1.4.0-customize-containerd-service.patch b/overlay-lakitu/app-emulation/containerd/files/1.4.0-customize-containerd-service.patch
index 5016ac7..31fcf26 100644
--- a/overlay-lakitu/app-emulation/containerd/files/1.4.0-customize-containerd-service.patch
+++ b/overlay-lakitu/app-emulation/containerd/files/1.4.0-customize-containerd-service.patch
@@ -1,17 +1,8 @@
-From 8d4bffa5708bdb38787e3e7cda36a4f3c26a3bb0 Mon Sep 17 00:00:00 2001
-From: Vaibhav Rustagi <vaibhavrustagi@google.com>
-Date: Fri, 17 Apr 2020 12:10:40 -0700
-Subject: [PATCH 2/2] customize-containerd-service
-
----
- containerd.service | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
 diff --git a/containerd.service b/containerd.service
-index cae30ec7..f345d4f2 100644
+index d0f3be7..7bcc985 100644
 --- a/containerd.service
 +++ b/containerd.service
-@@ -5,12 +5,14 @@ After=network.target local-fs.target
+@@ -19,7 +19,7 @@ After=network.target local-fs.target
  
  [Service]
  ExecStartPre=-/sbin/modprobe overlay
@@ -20,13 +11,3 @@
  
  Type=notify
  Delegate=yes
- KillMode=process
-+OOMScoreAdjust=-999
- Restart=always
-+RestartSec=10
- # Having non-zero Limit*s causes performance problems due to accounting overhead
- # in the kernel. We recommend using cgroups to do container-local accounting.
- LimitNPROC=infinity
--- 
-2.27.0.212.ge8ba1cc988-goog
-
diff --git a/overlay-lakitu/net-fs/nfs-utils/Manifest b/overlay-lakitu/net-fs/nfs-utils/Manifest
new file mode 100644
index 0000000..6537569
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/Manifest
@@ -0,0 +1 @@
+DIST nfs-utils-2.5.1.tar.bz2 931848 BLAKE2B 84c93ef5707bd97e9e1107dcca0530a3c137cb5ad04c7533bb8aee595a53fdc72359252d009fde95b9833a61f1695db1d6b1726081e5e8efd6c528e831f9834c SHA512 36c11668a9d2a382206db3d73a3d03000cdd2be9836fcbbbd327eb38515ac0b451520f6ffdc69bc05b2b81c60ecb88d50a20a50f123b8092a5b63e1c1054a2eb
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/exports b/overlay-lakitu/net-fs/nfs-utils/files/exports
new file mode 100644
index 0000000..5102ef2
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/exports
@@ -0,0 +1 @@
+# /etc/exports: NFS file systems being exported.  See exports(5).
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch
new file mode 100644
index 0000000..c9e60af
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch
@@ -0,0 +1,39 @@
+ripped from Debian
+
+--- nfs-utils-1.1.4/utils/mount/fstab.c
++++ nfs-utils-1.1.4/utils/mount/fstab.c
+@@ -57,7 +57,7 @@ mtab_does_not_exist(void) {
+ 	return var_mtab_does_not_exist;
+ }
+ 
+-static int
++int
+ mtab_is_a_symlink(void) {
+         get_mtab_info();
+         return var_mtab_is_a_symlink;
+--- nfs-utils-1.1.4/utils/mount/fstab.h
++++ nfs-utils-1.1.4/utils/mount/fstab.h
+@@ -7,6 +7,7 @@
+ #define _PATH_FSTAB "/etc/fstab"
+ #endif
+ 
++int mtab_is_a_symlink(void);
+ int mtab_is_writable(void);
+ int mtab_does_not_exist(void);
+ void reset_mtab_info(void);
+--- nfs-utils-1.1.4/utils/mount/mount.c
++++ nfs-utils-1.1.4/utils/mount/mount.c
+@@ -230,6 +230,13 @@ create_mtab (void) {
+ 	int flags;
+ 	mntFILE *mfp;
+ 
++	/* Avoid writing if the mtab is a symlink to /proc/mounts, since
++	   that would create a file /proc/mounts in case the proc filesystem
++	   is not mounted, and the fchmod below would also fail. */
++	if (mtab_is_a_symlink()) {
++		return EX_SUCCESS;
++	}
++
+ 	lock_mtab();
+ 
+ 	mfp = nfs_setmntent (MOUNTED, "a+");
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch
new file mode 100644
index 0000000..366a85b
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch
@@ -0,0 +1,67 @@
+this is kind of hacky, but automake doesn't make this easy
+for us atm, so hack away :(
+
+(recent autotools will always add $(CFLAGS)/etc... to the compile)
+
+posted upstream:
+https://marc.info/?l=linux-nfs&m=136416341629788&w=2
+Date: Sun, 24 Mar 2013 22:21:08 +0000
+Message-ID: 1364163668-15490-1-git-send-email-vapier@gentoo.org
+
+From 269ae1346d9ccc97304205066d20e7e7b638f30e Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 24 Mar 2013 18:14:48 -0400
+Subject: [PATCH nfs-utils] locktes/rpcgen: tweak how we override compiler settings
+
+Newer autotools will use both CFLAGS and <target>_CFLAGS when compiling
+the <target>.  Adding the build settings to the target-specific flags no
+longer works as a way to compile build-time tools.
+
+Instead, clobber the global flags.  This triggers an automake warning,
+but the end result actually works (unlike the existing code).
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+--- a/tools/locktest/Makefile.am
++++ b/tools/locktest/Makefile.am
+@@ -1,12 +1,11 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+ CC=$(CC_FOR_BUILD)
+-LIBTOOL = @LIBTOOL@ --tag=CC
++CFLAGS=$(CFLAGS_FOR_BUILD)
++CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
++LDFLAGS=$(LDFLAGS_FOR_BUILD)
+ 
+ noinst_PROGRAMS = testlk
+ testlk_SOURCES = testlk.c
+-testlk_CFLAGS=$(CFLAGS_FOR_BUILD)
+-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
+-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+ 
+ MAINTAINERCLEANFILES = Makefile.in
+--- a/tools/rpcgen/Makefile.am
++++ b/tools/rpcgen/Makefile.am
+@@ -1,7 +1,9 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+ CC=$(CC_FOR_BUILD)
+-LIBTOOL = @LIBTOOL@ --tag=CC
++CFLAGS=$(CFLAGS_FOR_BUILD)
++CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
++LDFLAGS=$(LDFLAGS_FOR_BUILD)
+ 
+ noinst_PROGRAMS = rpcgen
+ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
+@@ -9,10 +11,6 @@
+ 		 rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \
+ 		 rpc_scan.h rpc_util.h
+ 
+-rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
+-rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
+-rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+-rpcgen_LDADD=$(LIBTIRPC)
+ 
+ MAINTAINERCLEANFILES = Makefile.in
+ 
+ EXTRA_DIST = rpcgen.new.1
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.3.4-no-werror.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.3.4-no-werror.patch
new file mode 100644
index 0000000..7fc0dd1
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.3.4-no-werror.patch
@@ -0,0 +1,67 @@
+From 04c9e3cc26dd330d9cb524c02de610c3bccd4b7b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 11 May 2019 22:51:35 +0200
+Subject: [PATCH] Don't build with -Werror flags
+
+https://bugs.gentoo.org/656984
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ configure.ac | 34 +---------------------------------
+ 1 file changed, 1 insertion(+), 33 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4d70961..e6e709c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -574,46 +574,14 @@ AC_SUBST(CPPFLAGS_FOR_BUILD)
+ AC_SUBST(LDFLAGS_FOR_BUILD)
+ 
+ my_am_cflags="\
+- -pipe \
+  -Wall \
+  -Wextra \
+  $rpcgen_cflags \
+- -Werror=missing-prototypes \
+- -Werror=missing-declarations \
+- -Werror=format=2 \
+- -Werror=undef \
+- -Werror=missing-include-dirs \
+- -Werror=strict-aliasing=2 \
+- -Werror=init-self \
+- -Werror=implicit-function-declaration \
+- -Werror=return-type \
+- -Werror=switch \
+- -Werror=overflow \
+- -Werror=parentheses \
+- -Werror=aggregate-return \
+- -Werror=unused-result \
+  -Wno-cast-function-type \
+  -fno-strict-aliasing \
+ "
+ 
+-AC_DEFUN([CHECK_CCSUPPORT], [
+-  my_save_cflags="$CFLAGS"
+-  CFLAGS=$1
+-  AC_MSG_CHECKING([whether CC supports $1])
+-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+-    [AC_MSG_RESULT([yes])]
+-    [$2+=$1],
+-    [AC_MSG_RESULT([no])]
+-  )
+-  CFLAGS="$my_save_cflags"
+-])
+-
+-CHECK_CCSUPPORT([-Werror=format-overflow=2], [flg1])
+-CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
+-CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
+-CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
+-
+-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
++AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
+ 
+ # Make sure that $ACLOCAL_FLAGS are used during a rebuild
+ AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
+-- 
+2.21.0
+
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-Fix-include-order-between-config.h-and-stat.h.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-Fix-include-order-between-config.h-and-stat.h.patch
new file mode 100644
index 0000000..836a2af
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-Fix-include-order-between-config.h-and-stat.h.patch
@@ -0,0 +1,151 @@
+From 2fbc62e2a13fc22b6ae4910e295a2c10fb790486 Mon Sep 17 00:00:00 2001
+From: Zoltan Karcagi <zkr7432@gmail.com>
+Date: Mon, 12 Aug 2019 13:27:16 -0400
+Subject: [PATCH] Fix include order between config.h and stat.h
+
+At least on Arch linux ARM, the definition of struct stat in stat.h depends
+on __USE_FILE_OFFSET64. This symbol comes from config.h when defined,
+therefore config.h must always be included before stat.h. Fix all
+occurrences where the order is wrong by moving config.h to the top.
+
+This fixes the client side error "Stale file handle" when mounting from
+a server running Arch Linux ARM.
+
+Signed-off-by: Zoltan Karcagi <zkr7432@gmail.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ support/misc/nfsd_path.c         | 5 ++++-
+ support/misc/xstat.c             | 5 ++++-
+ support/nfs/conffile.c           | 8 +++++++-
+ utils/blkmapd/device-discovery.c | 8 ++++----
+ utils/idmapd/idmapd.c            | 8 ++++----
+ 5 files changed, 23 insertions(+), 11 deletions(-)
+
+diff --git a/support/misc/nfsd_path.c b/support/misc/nfsd_path.c
+index 84e48028..f078a668 100644
+--- a/support/misc/nfsd_path.c
++++ b/support/misc/nfsd_path.c
+@@ -1,3 +1,7 @@
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -5,7 +9,6 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ 
+-#include "config.h"
+ #include "conffile.h"
+ #include "xmalloc.h"
+ #include "xlog.h"
+diff --git a/support/misc/xstat.c b/support/misc/xstat.c
+index fa047880..4c997eea 100644
+--- a/support/misc/xstat.c
++++ b/support/misc/xstat.c
+@@ -1,3 +1,7 @@
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+@@ -5,7 +9,6 @@
+ #include <sys/sysmacros.h>
+ #include <unistd.h>
+ 
+-#include "config.h"
+ #include "xstat.h"
+ 
+ #ifdef HAVE_FSTATAT
+diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
+index b6400bec..6ba8a35c 100644
+--- a/support/nfs/conffile.c
++++ b/support/nfs/conffile.c
+@@ -500,7 +500,7 @@ conf_readfile(const char *path)
+ 
+ 	if ((stat (path, &sb) == 0) || (errno != ENOENT)) {
+ 		char *new_conf_addr = NULL;
+-		size_t sz = sb.st_size;
++		off_t sz;
+ 		int fd = open (path, O_RDONLY, 0);
+ 
+ 		if (fd == -1) {
+@@ -517,6 +517,11 @@ conf_readfile(const char *path)
+ 
+ 		/* only after we have the lock, check the file size ready to read it */
+ 		sz = lseek(fd, 0, SEEK_END);
++		if (sz < 0) {
++			xlog_warn("conf_readfile: unable to determine file size: %s",
++				  strerror(errno));
++			goto fail;
++		}
+ 		lseek(fd, 0, SEEK_SET);
+ 
+ 		new_conf_addr = malloc(sz+1);
+@@ -2162,6 +2167,7 @@ conf_write(const char *filename, const char *section, const char *arg,
+ 	ret = 0;
+ 
+ cleanup:
++	flush_outqueue(&inqueue, NULL);
+ 	flush_outqueue(&outqueue, NULL);
+ 
+ 	if (buff)
+diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c
+index e811703d..f5f9b10b 100644
+--- a/utils/blkmapd/device-discovery.c
++++ b/utils/blkmapd/device-discovery.c
+@@ -26,6 +26,10 @@
+  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif /* HAVE_CONFIG_H */
++
+ #include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -51,10 +55,6 @@
+ #include <errno.h>
+ #include <libdevmapper.h>
+ 
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif /* HAVE_CONFIG_H */
+-
+ #include "device-discovery.h"
+ #include "xcommon.h"
+ #include "nfslib.h"
+diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
+index 62e37b8a..267acea5 100644
+--- a/utils/idmapd/idmapd.c
++++ b/utils/idmapd/idmapd.c
+@@ -34,6 +34,10 @@
+  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif /* HAVE_CONFIG_H */
++
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/inotify.h>
+@@ -62,10 +66,6 @@
+ #include <libgen.h>
+ #include <nfsidmap.h>
+ 
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif /* HAVE_CONFIG_H */
+-
+ #include "xlog.h"
+ #include "conffile.h"
+ #include "queue.h"
+-- 
+2.21.0
+
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-gssd-Look-in-lib32-for-gss-libs-aswell.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-gssd-Look-in-lib32-for-gss-libs-aswell.patch
new file mode 100644
index 0000000..8e34065
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-gssd-Look-in-lib32-for-gss-libs-aswell.patch
@@ -0,0 +1,39 @@
+From e2244412ae8b0b04446063ff6e8a1d0ebebe55a8 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Sun, 11 Aug 2019 14:50:01 -0700
+Subject: [PATCH] gssd: Look in lib32 for gss libs aswell.
+
+Akin to commit da999b81b058 ("Look in lib64 for gss libs aswell.")
+
+mips/n32 systems have libraries in lib32 (but not lib or lib64). Without
+checking lib32, configure fails with
+
+checking for Kerberos v5... configure: error: Kerberos v5 with GSS
+         support not found: consider --disable-gss or --with-krb5=
+
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+ aclocal/kerberos5.m4 | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4
+index 8a0f3e4c..faa58049 100644
+--- a/aclocal/kerberos5.m4
++++ b/aclocal/kerberos5.m4
+@@ -38,9 +38,11 @@ AC_DEFUN([AC_KERBEROS_V5],[
+       AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number])
+       if test -f $dir/include/gssapi/gssapi_krb5.h -a \
+                 \( -f $dir/lib/libgssapi_krb5.a -o \
++                   -f $dir/lib/libgssapi_krb5.so -o \
++                   -f $dir/lib32/libgssapi_krb5.a -o \
++                   -f $dir/lib32/libgssapi_krb5.so -o \
+                    -f $dir/lib64/libgssapi_krb5.a -o \
+-                   -f $dir/lib64/libgssapi_krb5.so -o \
+-                   -f $dir/lib/libgssapi_krb5.so \) ; then
++                   -f $dir/lib64/libgssapi_krb5.so \) ; then
+          AC_DEFINE(HAVE_KRB5, 1, [Define this if you have MIT Kerberos libraries])
+          KRBDIR="$dir"
+          gssapi_lib=gssapi_krb5
+-- 
+2.21.0
+
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-statx.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-statx.patch
new file mode 100644
index 0000000..7515a81
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.1-statx.patch
@@ -0,0 +1,31 @@
+From c8953944c5d34095d42f604f911022fbe144918c Mon Sep 17 00:00:00 2001
+From: Andreas Steinmetz <ast@domdv.de>
+Date: Wed, 30 Oct 2019 16:57:00 +0100
+Subject: [PATCH] Old kernels don't know statx calls and return EINVAL
+
+On a system with glibc-2.29 and kernel 4.9.128 nfs v3 mount fails as
+statx() with mask=STATX_BASIC_STATS returns EINVAL, probably from
+glibc, as strace of rpc.mountd shows no system call.
+
+Fixes: https://bugs.gentoo.org/688644
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ support/misc/xstat.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/support/misc/xstat.c b/support/misc/xstat.c
+index fa047880..6aca6e29 100644
+--- a/support/misc/xstat.c
++++ b/support/misc/xstat.c
+@@ -47,6 +47,8 @@ statx_do_stat(int fd, const char *pathname, struct stat *statbuf, int flags)
+ 			statx_copy(statbuf, &stxbuf);
+ 			return 0;
+ 		}
++		if (errno == EINVAL)
++			errno = ENOSYS;
+ 		if (errno == ENOSYS)
+ 			statx_supported = 0;
+ 	} else
+-- 
+2.24.0.rc1
+
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-Ensure-consistent-struct-stat.patch
new file mode 100644
index 0000000..e64e2c6
--- /dev/null
+++ b/overlay-lakitu/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/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Add-check-for-struct-file_handle.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Add-check-for-struct-file_handle.patch
new file mode 100644
index 0000000..2a89cc7
--- /dev/null
+++ b/overlay-lakitu/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/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Fix-compilation-for--disable-uuid.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-mountd-Fix-compilation-for--disable-uuid.patch
new file mode 100644
index 0000000..3bb9f8b
--- /dev/null
+++ b/overlay-lakitu/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/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-no-werror.patch b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-no-werror.patch
new file mode 100644
index 0000000..114942f
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs-utils-2.4.2-no-werror.patch
@@ -0,0 +1,68 @@
+From b7df6ae89846104b99f46336592b928a5421c3d8 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 16 Nov 2019 12:04:48 +0100
+Subject: [PATCH] Don't build with -Werror flags
+
+https://bugs.gentoo.org/656984
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ configure.ac | 33 +--------------------------------
+ 1 file changed, 1 insertion(+), 32 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9ba9d4b5..26663264 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -581,47 +581,16 @@ AC_SUBST(CPPFLAGS_FOR_BUILD)
+ AC_SUBST(LDFLAGS_FOR_BUILD)
+ 
+ my_am_cflags="\
+- -pipe \
+  -Wall \
+  -Wextra \
+  $rpcgen_cflags \
+- -Werror=missing-prototypes \
+- -Werror=missing-declarations \
+- -Werror=format=2 \
+- -Werror=undef \
+- -Werror=missing-include-dirs \
+- -Werror=strict-aliasing=2 \
+- -Werror=init-self \
+- -Werror=implicit-function-declaration \
+- -Werror=return-type \
+- -Werror=switch \
+- -Werror=overflow \
+- -Werror=parentheses \
+- -Werror=aggregate-return \
+- -Werror=unused-result \
+  -Wno-cast-function-type \
+  -fno-strict-aliasing \
+ "
+ 
+-AC_DEFUN([CHECK_CCSUPPORT], [
+-  my_save_cflags="$CFLAGS"
+-  CFLAGS=$1
+-  AC_MSG_CHECKING([whether CC supports $1])
+-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+-    [AC_MSG_RESULT([yes])]
+-    [$2+=$1],
+-    [AC_MSG_RESULT([no])]
+-  )
+-  CFLAGS="$my_save_cflags"
+-])
+-
+-CHECK_CCSUPPORT([-Werror=format-overflow=2], [flg1])
+-CHECK_CCSUPPORT([-Werror=int-conversion], [flg2])
+-CHECK_CCSUPPORT([-Werror=incompatible-pointer-types], [flg3])
+-CHECK_CCSUPPORT([-Werror=misleading-indentation], [flg4])
+ AX_GCC_FUNC_ATTRIBUTE([format])
+ 
+-AC_SUBST([AM_CFLAGS], ["$my_am_cflags $flg1 $flg2 $flg3 $flg4"])
++AC_SUBST([AM_CFLAGS], ["$my_am_cflags"])
+ 
+ # Make sure that $ACLOCAL_FLAGS are used during a rebuild
+ AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \$(ACLOCAL_FLAGS)"])
+-- 
+2.24.0
+
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs.confd b/overlay-lakitu/net-fs/nfs-utils/files/nfs.confd
new file mode 100644
index 0000000..9dc1405
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs.confd
@@ -0,0 +1,38 @@
+# /etc/conf.d/nfs
+
+# If you wish to set the port numbers for lockd,
+# please see /etc/sysctl.conf
+
+# Optional services to include in default `/etc/init.d/nfs start`
+# For NFSv4 users, you'll want to add "rpc.idmapd" here.
+NFS_NEEDED_SERVICES=""
+
+# Options to pass to rpc.nfsd
+OPTS_RPC_NFSD="8"
+
+# Options to pass to rpc.mountd
+# ex. OPTS_RPC_MOUNTD="-p 32767"
+OPTS_RPC_MOUNTD=""
+
+# Options to pass to rpc.statd
+# ex. OPTS_RPC_STATD="-p 32765 -o 32766"
+OPTS_RPC_STATD=""
+
+# Options to pass to rpc.idmapd
+OPTS_RPC_IDMAPD=""
+
+# Options to pass to rpc.gssd
+OPTS_RPC_GSSD=""
+
+# Options to pass to rpc.svcgssd
+OPTS_RPC_SVCGSSD=""
+
+# Options to pass to rpc.rquotad (requires sys-fs/quota)
+OPTS_RPC_RQUOTAD=""
+
+# Timeout (in seconds) for exportfs
+EXPORTFS_TIMEOUT=30
+
+# Options to set in the nfsd filesystem (/proc/fs/nfsd/).
+# Format is <option>=<value>.  Multiple options are allowed.
+#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfs.initd b/overlay-lakitu/net-fs/nfs-utils/files/nfs.initd
new file mode 100644
index 0000000..5912062
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfs.initd
@@ -0,0 +1,156 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+# The binary locations
+exportfs=/usr/sbin/exportfs
+  mountd=/usr/sbin/rpc.mountd
+    nfsd=/usr/sbin/rpc.nfsd
+smnotify=/usr/sbin/sm-notify
+
+depend() {
+	local myneed=""
+	# XXX: no way to detect NFSv4 is desired and so need rpc.idmapd
+	myneed="${myneed} $(
+		awk '!/^[[:space:]]*#/ {
+			# clear the path to avoid spurious matches
+			$1 = "";
+			if ($0 ~ /[(][^)]*sec=(krb|spkm)[^)]*[)]/) {
+				print "rpc.svcgssd"
+				exit 0
+			}
+		}' /etc/exports /etc/exports.d/*.exports 2>/dev/null
+	)"
+	config /etc/exports /etc/exports.d/*.exports
+	need portmap rpc.statd ${myneed} ${NFS_NEEDED_SERVICES}
+	use ypbind net dns rpc.rquotad rpc.idmapd rpc.svcgssd
+	after quota
+}
+
+mkdir_nfsdirs() {
+	local d
+	for d in v4recovery v4root ; do
+		d="/var/lib/nfs/${d}"
+		[ ! -d "${d}" ] && mkdir -p "${d}"
+	done
+}
+
+waitfor_exportfs() {
+	local pid=$1
+	( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 ${pid} 2>/dev/null ) &
+	wait $1
+}
+
+mount_nfsd() {
+	if [ -e /proc/modules ] ; then
+		# Make sure nfs support is loaded in the kernel #64709
+		if ! grep -qs nfsd /proc/filesystems ; then
+			modprobe -q nfsd
+		fi
+		# Restart idmapd if needed #220747
+		if grep -qs nfsd /proc/modules ; then
+			killall -q -HUP rpc.idmapd
+		fi
+	fi
+
+	# This is the new "kernel 2.6 way" to handle the exports file
+	if grep -qs nfsd /proc/filesystems ; then
+		if ! mountinfo -q /proc/fs/nfsd ; then
+			ebegin "Mounting nfsd filesystem in /proc"
+			mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd
+			eend $?
+		fi
+
+		local o
+		for o in ${OPTS_NFSD} ; do
+			echo "${o#*=}" > "/proc/fs/nfsd/${o%%=*}"
+		done
+	fi
+}
+
+start_it() {
+	ebegin "Starting NFS $1"
+	shift
+	"$@"
+	eend $?
+	ret=$((ret + $?))
+}
+start() {
+	mount_nfsd
+	mkdir_nfsdirs
+
+	# Exportfs likes to hang if networking isn't working.
+	# If that's the case, then try to kill it so the
+	# bootup process can continue.
+	if grep -qs '^[[:space:]]*"\?/' /etc/exports /etc/exports.d/*.exports ; then
+		ebegin "Exporting NFS directories"
+		${exportfs} -r &
+		waitfor_exportfs $!
+		eend $?
+	fi
+
+	local ret=0
+	start_it mountd ${mountd} ${OPTS_RPC_MOUNTD}
+	start_it daemon ${nfsd} ${OPTS_RPC_NFSD}
+	[ -x "${smnotify}" ] && start_it smnotify ${smnotify} ${OPTS_SMNOTIFY}
+	return ${ret}
+}
+
+stop() {
+	local ret=0
+
+	ebegin "Stopping NFS mountd"
+	start-stop-daemon --stop --exec ${mountd}
+	eend $?
+	ret=$((ret + $?))
+
+	# nfsd sets its process name to [nfsd] so don't look for $nfsd
+	ebegin "Stopping NFS daemon"
+	start-stop-daemon --stop --name nfsd --user root --signal 2
+	eend $?
+	ret=$((ret + $?))
+	# in case things don't work out ... #228127
+	rpc.nfsd 0
+
+	# When restarting the NFS server, running "exportfs -ua" probably
+	# isn't what the user wants.  Running it causes all entries listed
+	# in xtab to be removed from the kernel export tables, and the
+	# xtab file is cleared. This effectively shuts down all NFS
+	# activity, leaving all clients holding stale NFS filehandles,
+	# *even* when the NFS server has restarted.
+	#
+	# That's what you would want if you were shutting down the NFS
+	# server for good, or for a long period of time, but not when the
+	# NFS server will be running again in short order.  In this case,
+	# then "exportfs -r" will reread the xtab, and all the current
+	# clients will be able to resume NFS activity, *without* needing
+	# to umount/(re)mount the filesystem.
+	if [ "${RC_CMD}" != "restart" ] ; then
+		ebegin "Unexporting NFS directories"
+		# Exportfs likes to hang if networking isn't working.
+		# If that's the case, then try to kill it so the
+		# shutdown process can continue.
+		${exportfs} -ua &
+		waitfor_exportfs $!
+		eend $?
+	fi
+
+	return ${ret}
+}
+
+reload() {
+	# Exportfs likes to hang if networking isn't working.
+	# If that's the case, then try to kill it so the
+	# bootup process can continue.
+	ebegin "Reloading /etc/exports"
+	${exportfs} -r 1>&2 &
+	waitfor_exportfs $!
+	eend $?
+}
+
+restart() {
+	svc_stop
+	svc_start
+}
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfsclient.confd b/overlay-lakitu/net-fs/nfs-utils/files/nfsclient.confd
new file mode 100644
index 0000000..8a99557
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfsclient.confd
@@ -0,0 +1,18 @@
+# You need to decide which nfs protocol version you want to use.
+# If you are unsure, leave these alone.
+#
+# If you are using only nfsv4, uncomment this line:
+#
+#rc_need="!rpc.statd"
+#
+# If you are using only nfsv3, uncomment this line:
+#
+#rc_need="!rpc.idmapd"
+# 
+# You will need to set the dependencies in the nfsclient script to match
+# the network configuration tools you are using. This should be done in
+# this file by following the examples below, and not by changing the
+# service script itself.  See /etc/conf.d/netmount for more examples.
+#
+# This is a safe default.
+rc_after="net"
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfsclient.initd b/overlay-lakitu/net-fs/nfs-utils/files/nfsclient.initd
new file mode 100644
index 0000000..6724e91
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfsclient.initd
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+	local opts myneed=""
+	if [ -e /etc/fstab ] ; then
+		for opts in $(fstabinfo -o -t nfs,nfs4) ; do
+			case $opts in
+				*sec=krb*|*sec=spkm*) myneed="$myneed rpc.gssd" ;;
+			esac
+		done
+	fi
+	config /etc/fstab
+	need portmap rpc.statd rpc.idmapd ${myneed}
+	use ypbind dns
+}
+
+start() {
+	if [ -x /usr/sbin/sm-notify ] ; then
+		ebegin "Starting NFS sm-notify"
+		/usr/sbin/sm-notify ${OPTS_SMNOTIFY}
+		eend $?
+	fi
+
+	# Make sure nfs support is loaded in the kernel #64709
+	if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then
+		modprobe -q nfs
+	fi
+	return 0
+}
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/nfsmount.initd-1.3.1 b/overlay-lakitu/net-fs/nfs-utils/files/nfsmount.initd-1.3.1
new file mode 100644
index 0000000..68007ca
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/nfsmount.initd-1.3.1
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This is mostly as a fix for bug #537996, to avoid breaking existing users
+# with nfsmount in their runlevels.
+# If neither nfsclient nor netmount are in your runlevels, and you manually
+# start netmount before nfsclient, then this will break. A real solution is
+# forthcoming, but requires feature development, see bug #406021 for soft
+# dependencies
+depend() {
+	need nfsclient netmount
+}
+
+msg() {
+	ewarn "nfsmount is deprecated, please migrate as described in the news item: 2015-02-02-nfs-service-changes"
+	ewarn "This migration script will be removed after 01 Aug 2015."
+}
+
+start() {
+	msg
+}
+
+stop() {
+	msg
+}
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/rpc.gssd.initd b/overlay-lakitu/net-fs/nfs-utils/files/rpc.gssd.initd
new file mode 100644
index 0000000..445d44c
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/rpc.gssd.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+	use ypbind net
+	need portmap rpc.pipefs
+	after quota
+}
+
+start() {
+	ebegin "Starting gssd"
+	start-stop-daemon --start --exec /usr/sbin/rpc.gssd -- ${OPTS_RPC_GSSD}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping gssd"
+	start-stop-daemon --stop --exec /usr/sbin/rpc.gssd
+	eend $?
+}
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/rpc.idmapd.initd b/overlay-lakitu/net-fs/nfs-utils/files/rpc.idmapd.initd
new file mode 100644
index 0000000..61cfd4d
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/rpc.idmapd.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+rpc_bin=/usr/sbin/rpc.idmapd
+
+depend() {
+	use ypbind net
+	need portmap rpc.pipefs
+	after quota
+}
+
+start() {
+	ebegin "Starting idmapd"
+	${rpc_bin} ${OPTS_RPC_IDMAPD}
+	eend $? "make sure DNOTIFY support is enabled ..."
+}
+
+stop() {
+	ebegin "Stopping idmapd"
+	start-stop-daemon --stop --exec ${rpc_bin}
+	eend $?
+}
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/rpc.pipefs.initd b/overlay-lakitu/net-fs/nfs-utils/files/rpc.pipefs.initd
new file mode 100644
index 0000000..f971a49
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/rpc.pipefs.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MNT="/var/lib/nfs/rpc_pipefs"
+
+mount_pipefs() {
+	local fstype=rpc_pipefs
+
+	# if things are already mounted, nothing to do
+	mountinfo -q ${MNT} && return 0
+
+	# if rpc_pipefs is not available, try to load sunrpc for it #219566
+	grep -qs ${fstype} /proc/filesystems || modprobe -q sunrpc
+	# if still not available, the `mount` will issue an error for the user
+
+	# now just do it for kicks
+	mkdir -p ${MNT}
+	mount -t ${fstype} ${fstype} ${MNT}
+}
+
+start() {
+	ebegin "Setting up RPC pipefs"
+	mount_pipefs
+	eend $? "make sure you have NFS/SUNRPC enabled in your kernel"
+}
+
+stop() {
+	ebegin "Unmounting RPC pipefs"
+	umount ${MNT}
+	eend $?
+}
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/rpc.statd.initd b/overlay-lakitu/net-fs/nfs-utils/files/rpc.statd.initd
new file mode 100644
index 0000000..ea78b9a
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/rpc.statd.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+rpc_bin=/sbin/rpc.statd
+rpc_pid=/var/run/rpc.statd.pid
+
+depend() {
+	use ypbind net
+	need portmap
+	after quota
+}
+
+start() {
+	# Don't start rpc.statd if already started by someone else ...
+	# Don't try and kill it if it's already dead ...
+	if killall -q -0 ${rpc_bin} ; then
+		return 0
+	fi
+
+	ebegin "Starting NFS statd"
+	start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping NFS statd"
+	start-stop-daemon --stop --exec ${rpc_bin} --pidfile /var/run/rpc.statd.pid
+	eend $?
+}
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/rpc.svcgssd.initd b/overlay-lakitu/net-fs/nfs-utils/files/rpc.svcgssd.initd
new file mode 100644
index 0000000..c714e36
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/rpc.svcgssd.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+	use ypbind net
+	need portmap rpc.pipefs
+	after quota
+}
+
+start() {
+	ebegin "Starting svcgssd"
+	start-stop-daemon --start --exec /usr/sbin/rpc.svcgssd -- ${OPTS_RPC_SVCGSSD}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping svcgssd"
+	start-stop-daemon --stop --exec /usr/sbin/rpc.svcgssd
+	eend $?
+}
diff --git a/overlay-lakitu/net-fs/nfs-utils/files/tmpfiles.d b/overlay-lakitu/net-fs/nfs-utils/files/tmpfiles.d
new file mode 100644
index 0000000..663dd86
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/files/tmpfiles.d
@@ -0,0 +1,4 @@
+D /var/lib/nfs 0644 - - -
+D /var/lib/nfs/sm 0644 - - -
+D /var/lib/nfs/sm.bak 0644 - - -
+D /var/lib/nfs/v4recovery 0644 - - -
diff --git a/overlay-lakitu/net-fs/nfs-utils/metadata.xml b/overlay-lakitu/net-fs/nfs-utils/metadata.xml
new file mode 100644
index 0000000..45351e4
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="project">
+    <email>base-system@gentoo.org</email>
+    <name>Gentoo Base System</name>
+  </maintainer>
+  <longdescription>NFS client and server daemons</longdescription>
+  <use>
+    <flag name="junction">Enable NFS junction support in nfsref</flag>
+    <flag name="ldap">Add ldap support</flag>
+    <flag name="libmount">Link mount.nfs with libmount</flag>
+    <flag name="nfsdcld">Enable nfsdcld NFSv4 clientid tracking daemon</flag>
+    <flag name="nfsidmap">Enable support for newer nfsidmap helper</flag>
+    <flag name="nfsv4">Enable support for NFSv4</flag>
+    <flag name="nfsv41">Enable support for NFSv4.1</flag>
+    <flag name="uuid">Support UUID lookups in rpc.mountd</flag>
+  </use>
+  <upstream>
+    <remote-id type="sourceforge">nfs</remote-id>
+  </upstream>
+</pkgmetadata>
diff --git a/overlay-lakitu/net-fs/nfs-utils/nfs-utils-2.5.1-r1.ebuild b/overlay-lakitu/net-fs/nfs-utils/nfs-utils-2.5.1-r1.ebuild
new file mode 120000
index 0000000..f8df01e
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/nfs-utils-2.5.1-r1.ebuild
@@ -0,0 +1 @@
+overlay-lakitu/net-fs/nfs-utils/nfs-utils-2.5.1.ebuild
\ No newline at end of file
diff --git a/overlay-lakitu/net-fs/nfs-utils/nfs-utils-2.5.1.ebuild b/overlay-lakitu/net-fs/nfs-utils/nfs-utils-2.5.1.ebuild
new file mode 100644
index 0000000..518b0d9
--- /dev/null
+++ b/overlay-lakitu/net-fs/nfs-utils/nfs-utils-2.5.1.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic linux-info 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="*"
+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}-2.4.2-no-werror.patch
+	"${FILESDIR}"/${PN}-2.4.2-Ensure-consistent-struct-stat.patch
+)
+
+pkg_setup() {
+	linux-info_pkg_setup
+	if use nfsv4 && ! use nfsdcld && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then
+		ewarn "Your NFS server will be unable to track clients across server restarts!"
+		ewarn "Please enable the \"${HILITE}nfsdcld${NORMAL}\" USE flag to install the nfsdcltrack usermode"
+		ewarn "helper upcall program, or enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to"
+		ewarn "support the legacy, in-kernel client tracker."
+	fi
+}
+
+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
+	# these empty directories are not carried into image/var
+	keepdir /var/lib/nfs/{,sm,sm.bak}
+
+	# tmpfiles stuff to make sure var/lib/nfs and its 
+        # subdirs are installed
+	insinto /usr/lib/tmpfiles.d
+	newins "${FILESDIR}/tmpfiles.d" "nfs.conf"
+
+	mv "${ED}"/var/lib "${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
+		insinto /etc
+		doins support/nfsidmap/idmapd.conf
+
+		# 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)/lib/nfs/*; do
+		[[ -e ${EROOT}/var/lib/nfs/${f} ]] && continue
+		einfo "Copying default ${f} from ${EPREFIX}/usr/$(get_libdir)/lib/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/overlay-lakitu/profiles/base/package.use b/overlay-lakitu/profiles/base/package.use
index 7655748..4e462ea 100644
--- a/overlay-lakitu/profiles/base/package.use
+++ b/overlay-lakitu/profiles/base/package.use
@@ -56,6 +56,10 @@
 # HPN support in OpenSSH (b/64450408).
 net-misc/openssh -hpn
 
+# Enable warmstarts for rpcbind because if systemd is enabled it
+# requires warmstarts flag to be enabled
+net-nds/rpcbind warmstarts
+
 # Disable oobe_config to avoid surprising users (b/112722312).
 chromeos-base/chromeos-installer -oobe_config
 
diff --git a/overlay-lakitu/sys-kernel/lakitu-kernel-5_4/lakitu-kernel-5_4-5.4.60-r30.ebuild b/overlay-lakitu/sys-kernel/lakitu-kernel-5_4/lakitu-kernel-5_4-5.4.61-r31.ebuild
similarity index 98%
rename from overlay-lakitu/sys-kernel/lakitu-kernel-5_4/lakitu-kernel-5_4-5.4.60-r30.ebuild
rename to overlay-lakitu/sys-kernel/lakitu-kernel-5_4/lakitu-kernel-5_4-5.4.61-r31.ebuild
index 8ac5a11..1c1da92 100644
--- a/overlay-lakitu/sys-kernel/lakitu-kernel-5_4/lakitu-kernel-5_4-5.4.60-r30.ebuild
+++ b/overlay-lakitu/sys-kernel/lakitu-kernel-5_4/lakitu-kernel-5_4-5.4.61-r31.ebuild
@@ -9,7 +9,7 @@
 CROS_WORKON_REPO="https://cos.googlesource.com"
 CROS_WORKON_PROJECT="third_party/kernel"
 CROS_WORKON_EGIT_BRANCH="cos-5.4"
-CROS_WORKON_COMMIT="2fe856f46326db55fd94727dfb730d94ebab6dd4"
+CROS_WORKON_COMMIT="e4e286e9fa35f3e52882d3acbc010c51acb1c3be"
 CROS_WORKON_LOCALNAME="kernel/v5.4"
 CROS_WORKON_BLACKLIST="1"