All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC
@ 2013-01-19 22:39 Khem Raj
  2013-01-19 22:40 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Khem Raj @ 2013-01-19 22:39 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

This patchset is about upgrading boost and nfs-utils to latest
KERNEL_CC is now formed using CC, this patch has been tested fair bit now

The following changes since commit 18bc7b44ef58cbcbe32d45504d71eed54ef695a4:

  guilt: add git 1.8.x support (2013-01-18 13:20:56 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib kraj/misc
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc

Khem Raj (4):
  kernel.bbclass,module-base.bbclass: Use CC to form KERNEL_CC
  nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2
  consolekit_0.4.5.bb: Package unpackaged systemd files
  boost: Upgrade 1.51 -> 1.52

 meta/classes/kernel-arch.bbclass                   |   13 +
 meta/classes/kernel.bbclass                        |   16 +-
 meta/classes/module-base.bbclass                   |   16 -
 .../nfs-utils/nfs-utils-1.0.6-uclibc.patch         |   37 +-
 .../nfs-utils-1.2.1-exp-subtree-warn-off.patch     |   12 +
 .../nfs-utils/nfs-utils-1.2.1-statdpath-man.patch  |   58 +++
 .../nfs-utils-1.2.3-sm-notify-res_init.patch       |   21 +
 .../nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch   |   12 +
 .../nfs-utils/nfs-utils-nfsctl-x32-fix.patch       |   30 --
 .../nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch  |  535 ++++++++++++++++++++
 .../nfs-utils/nfs-utils.1.2.8.rc2.patch.1          |  535 ++++++++++++++++++++
 .../{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb}     |   28 +-
 meta/recipes-support/boost/boost.inc               |    2 -
 .../boost/{boost_1.51.0.bb => boost_1.52.0.bb}     |    8 +-
 meta/recipes-support/boost/files/hash_enums.patch  |   45 --
 .../recipes-support/consolekit/consolekit_0.4.5.bb |    2 +-
 16 files changed, 1228 insertions(+), 142 deletions(-)
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
 delete mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
 rename meta/recipes-connectivity/nfs-utils/{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb} (63%)
 rename meta/recipes-support/boost/{boost_1.51.0.bb => boost_1.52.0.bb} (44%)
 delete mode 100644 meta/recipes-support/boost/files/hash_enums.patch

-- 
1.7.9.5




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-19 22:39 [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Khem Raj
@ 2013-01-19 22:40 ` Khem Raj
  2013-01-22 15:41   ` Enrico Scholz
                     ` (2 more replies)
  2013-01-19 22:40 ` [PATCH 2/4] nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2 Khem Raj
                   ` (3 subsequent siblings)
  4 siblings, 3 replies; 22+ messages in thread
From: Khem Raj @ 2013-01-19 22:40 UTC (permalink / raw)
  To: openembedded-core

kernel compiler is not special and we currently have it so
we want to pass -march and -mtune options as CFLAGS to kernel
build so that compiler picks the right subarch flags when
compiling assembly files in particular. Otherwise defaults
are chosen which may not be right in many case e.g. when
compiling kernel for collie machine we should use arch=armv4
but it uses toolchain/as defaults which is armv5te

in some case e.g. thumb1 we know that kernel can not be compiled
in thumb1 mode so we can provide that information e.g. -marm
option through KERNEL_HOST_CC_ARCH variable as we do now

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/classes/kernel-arch.bbclass |   13 +++++++++++++
 meta/classes/kernel.bbclass      |   16 +---------------
 meta/classes/module-base.bbclass |   16 ----------------
 3 files changed, 14 insertions(+), 31 deletions(-)

diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
index b3b78b6..a51e82b 100644
--- a/meta/classes/kernel-arch.bbclass
+++ b/meta/classes/kernel-arch.bbclass
@@ -43,3 +43,16 @@ def map_uboot_arch(a, d):
 
 export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', True), d)}"
 
+# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
+# specific options necessary for building the kernel and modules.
+TARGET_CC_KERNEL_ARCH ?= ""
+HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
+TARGET_LD_KERNEL_ARCH ?= ""
+HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
+TARGET_AR_KERNEL_ARCH ?= ""
+HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
+
+KERNEL_CC = "${CC} ${HOST_CC_KERNEL_ARCH}"
+KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}"
+KERNEL_AR = "${AR} ${HOST_AR_KERNEL_ARCH}"
+
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index d459569..e2a582b 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,7 +1,7 @@
 inherit linux-kernel-base module_strip
 
 PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
+DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native"
 
 # we include gcc above, we dont need virtual/libc
 INHIBIT_DEFAULT_DEPS = "1"
@@ -37,20 +37,6 @@ KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.
 
 KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 
-KERNEL_CCSUFFIX ?= ""
-KERNEL_LDSUFFIX ?= ""
-
-# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
-# specific options necessary for building the kernel and modules.
-#FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
-TARGET_CC_KERNEL_ARCH ?= ""
-HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
-TARGET_LD_KERNEL_ARCH ?= ""
-HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
-
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
-KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
-
 # Where built kernel lies in the kernel tree
 KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
 KERNEL_IMAGEDEST = "boot"
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
index 210c47c..cfee50a 100644
--- a/meta/classes/module-base.bbclass
+++ b/meta/classes/module-base.bbclass
@@ -7,22 +7,6 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
 
 export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
 KERNEL_OBJECT_SUFFIX = ".ko"
-KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}"
-KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}"
-KERNEL_ARSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-arsuffix')}"
-
-# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
-# specific options necessary for building the kernel and modules.
-TARGET_CC_KERNEL_ARCH ?= ""
-HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
-TARGET_LD_KERNEL_ARCH ?= ""
-HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
-TARGET_AR_KERNEL_ARCH ?= ""
-HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
-
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
-KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
-KERNEL_AR = "${HOST_PREFIX}ar${KERNEL_ARSUFFIX} ${HOST_AR_KERNEL_ARCH}"
 
 # kernel modules are generally machine specific
 PACKAGE_ARCH = "${MACHINE_ARCH}"
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/4] nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2
  2013-01-19 22:39 [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Khem Raj
  2013-01-19 22:40 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
@ 2013-01-19 22:40 ` Khem Raj
  2013-01-21  4:08   ` Saul Wold
  2013-01-19 22:40 ` [PATCH 3/4] consolekit_0.4.5.bb: Package unpackaged systemd files Khem Raj
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 22+ messages in thread
From: Khem Raj @ 2013-01-19 22:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj

From: Khem Raj <kraj@juniper.net>

Disable nfsv4l since it needs LVM2 which
is not available in OE-Core

Disable nfsdcltrack since its configure time check
for sqlite3 is not cross compiling safe

It can support ipv6 but thats disabled since
we disable libtirpc which is needed for ipv6
support in nfs-utils

Patches imported from fedora to take us to 1.2.8-rc2

Signed-off-by: Khem Raj <kraj@juniper.net>
---
 .../nfs-utils/nfs-utils-1.0.6-uclibc.patch         |   37 +-
 .../nfs-utils-1.2.1-exp-subtree-warn-off.patch     |   12 +
 .../nfs-utils/nfs-utils-1.2.1-statdpath-man.patch  |   58 +++
 .../nfs-utils-1.2.3-sm-notify-res_init.patch       |   21 +
 .../nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch   |   12 +
 .../nfs-utils/nfs-utils-nfsctl-x32-fix.patch       |   30 --
 .../nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch  |  535 ++++++++++++++++++++
 .../nfs-utils/nfs-utils.1.2.8.rc2.patch.1          |  535 ++++++++++++++++++++
 .../{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb}     |   28 +-
 9 files changed, 1210 insertions(+), 58 deletions(-)
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
 delete mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
 rename meta/recipes-connectivity/nfs-utils/{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb} (63%)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
index 6d46d3a..d3d3ac8 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
@@ -1,22 +1,25 @@
 Upstream-Status: Inappropriate [embedded specific]
 
-Index: nfs-utils-1.2.3/support/nfs/svc_socket.c
+Index: nfs-utils-1.2.6/support/nfs/svc_socket.c
 ===================================================================
---- nfs-utils-1.2.3.orig/support/nfs/svc_socket.c
-+++ nfs-utils-1.2.3/support/nfs/svc_socket.c
-@@ -67,6 +67,7 @@ svc_socket (u_long number, int type, int
-   memset (&addr, 0, sizeof (addr));
-   addr.sin_family = AF_INET;
+--- nfs-utils-1.2.6.orig/support/nfs/svc_socket.c	2012-05-14 07:40:52.000000000 -0700
++++ nfs-utils-1.2.6/support/nfs/svc_socket.c	2012-10-28 02:42:50.179222457 -0700
+@@ -40,8 +40,9 @@
+ 	char rpcdata[1024], servdata[1024];
+ 	struct rpcent rpcbuf, *rpcp;
+ 	struct servent servbuf, *servp = NULL;
+-	int ret;
++	int ret = 0;
  
-+#ifndef __UCLIBC__	/* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
-   ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
- 			  &rpcp);
-   if (ret == 0 && rpcp != NULL)
-@@ -100,6 +101,7 @@ svc_socket (u_long number, int type, int
++#ifndef __UCLIBC__     /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
+ 	ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
+ 				&rpcp);
+ 	if (ret == 0 && rpcp != NULL) {
+@@ -60,6 +61,7 @@
+ 			}
+ 		}
  	}
-     }
-   else
-+#endif
-     {
- 	  addr.sin_port = 0;
- 	  if (bind (sock, (struct sockaddr *) &addr, len) < 0)
++#endif /* __UCLIBC__ */
+ 
+ 	if (ret == 0 && servp != NULL)
+ 		return ntohs(servp->s_port);
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
new file mode 100644
index 0000000..14e376c
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
@@ -0,0 +1,12 @@
+diff -up nfs-utils-1.2.1/support/nfs/exports.c.orig nfs-utils-1.2.1/support/nfs/exports.c
+--- nfs-utils-1.2.1/support/nfs/exports.c.orig	2010-01-15 10:48:49.631894982 -0500
++++ nfs-utils-1.2.1/support/nfs/exports.c	2010-01-15 11:05:02.009874055 -0500
+@@ -483,7 +483,7 @@ static void fix_pseudoflavor_flags(struc
+ static int
+ parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr)
+ {
+-	int	had_subtree_opt = 0;
++	int	had_subtree_opt = 1;
+ 	char 	*flname = efname?efname:"command line";
+ 	int	flline = efp?efp->x_line:0;
+ 	unsigned int active = 0;
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
new file mode 100644
index 0000000..8c2e0e2
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
@@ -0,0 +1,58 @@
+diff -up nfs-utils-1.2.1/utils/statd/sm-notify.man.save nfs-utils-1.2.1/utils/statd/sm-notify.man
+--- nfs-utils-1.2.1/utils/statd/sm-notify.man.save	2010-01-15 11:10:25.096874609 -0500
++++ nfs-utils-1.2.1/utils/statd/sm-notify.man	2010-01-15 11:14:12.636873981 -0500
+@@ -186,7 +186,7 @@ where NSM state information resides.
+ If this option is not specified,
+ .B sm-notify
+ uses
+-.I /var/lib/nfs
++.I /var/lib/nfs/statd
+ by default.
+ .IP
+ After starting,
+@@ -287,13 +287,13 @@ Currently, the
+ command supports sending notification only via datagram transport protocols.
+ .SH FILES
+ .TP 2.5i
+-.I /var/lib/nfs/sm
++.I /var/lib/nfs/statd/sm
+ directory containing monitor list
+ .TP 2.5i
+-.I /var/lib/nfs/sm.bak
++.I /var/lib/nfs/statd/sm.bak
+ directory containing notify list
+ .TP 2.5i
+-.I /var/lib/nfs/state
++.I /var/lib/nfs/statd/state
+ NSM state number for this host
+ .TP 2.5i
+ .I /proc/sys/fs/nfs/nsm_local_state
+diff -up nfs-utils-1.2.1/utils/statd/statd.man.save nfs-utils-1.2.1/utils/statd/statd.man
+--- nfs-utils-1.2.1/utils/statd/statd.man.save	2010-01-15 11:10:25.098906325 -0500
++++ nfs-utils-1.2.1/utils/statd/statd.man	2010-01-15 11:11:03.874769717 -0500
+@@ -232,7 +232,7 @@ where NSM state information resides.
+ If this option is not specified,
+ .B rpc.statd
+ uses
+-.I /var/lib/nfs
++.I /var/lib/nfs/statd
+ by default.
+ .IP
+ After starting,
+@@ -368,13 +368,13 @@ As long as at least one network transpor
+ will operate.
+ .SH FILES
+ .TP 2.5i
+-.I /var/lib/nfs/sm
++.I /var/lib/nfs/statd/sm
+ directory containing monitor list
+ .TP 2.5i
+-.I /var/lib/nfs/sm.bak
++.I /var/lib/nfs/statd/sm.bak
+ directory containing notify list
+ .TP 2.5i
+-.I /var/lib/nfs/state
++.I /var/lib/nfs/statd/state
+ NSM state number for this host
+ .TP 2.5i
+ .I /var/run/run.statd.pid
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
new file mode 100644
index 0000000..3ce55eb
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
@@ -0,0 +1,21 @@
+diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/statd/sm-notify.c
+--- nfs-utils-1.2.3/utils/statd/sm-notify.c.orig	2010-09-28 08:24:16.000000000 -0400
++++ nfs-utils-1.2.3/utils/statd/sm-notify.c	2010-10-15 16:44:43.487119601 -0400
+@@ -28,6 +28,9 @@
+ #include <netdb.h>
+ #include <errno.h>
+ #include <grp.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
++#include <resolv.h>
+ 
+ #include "sockaddr.h"
+ #include "xlog.h"
+@@ -84,6 +87,7 @@ smn_lookup(const char *name)
+ 	};
+ 	int error;
+ 
++	res_init();
+ 	error = getaddrinfo(name, NULL, &hint, &ai);
+ 	if (error != 0) {
+ 		xlog(D_GENERAL, "getaddrinfo(3): %s", gai_strerror(error));
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
new file mode 100644
index 0000000..8e00ed7
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
@@ -0,0 +1,12 @@
+diff -up nfs-utils-1.2.5/utils/nfsidmap/nfsidmap.c.orig nfs-utils-1.2.5/utils/nfsidmap/nfsidmap.c
+--- nfs-utils-1.2.5/utils/nfsidmap/nfsidmap.c.orig	2011-12-13 15:01:26.311660000 -0500
++++ nfs-utils-1.2.5/utils/nfsidmap/nfsidmap.c	2011-12-13 15:32:48.167354000 -0500
+@@ -261,7 +261,7 @@ int main(int argc, char **argv)
+ 
+ 	xlog_stderr(0);
+ 	if ((argc - optind) != 2) {
+-		xlog_err("Bad arg count. Check /etc/request-key.conf");
++		xlog_err("Bad arg count. Check /etc/request-key.d/id_resolver.conf");
+ 		xlog_warn(usage, progname);
+ 		return 1;
+ 	}
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
deleted file mode 100644
index 26b4631..0000000
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-
-Upstream-Status: Pending
-
-Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-
---- nfs-utils-1.2.3/support/nfs/nfsctl.c.x32	2010-09-28 05:24:16.000000000 -0700
-+++ nfs-utils-1.2.3/support/nfs/nfsctl.c	2011-11-30 13:34:09.369917161 -0800
-@@ -12,15 +12,22 @@
- 
- #include <unistd.h>
- #include <asm/unistd.h>
-+#include <errno.h>
- #include "nfslib.h"
- 
- /* compatibility hack... */
- #ifndef __NR_nfsctl
-+#ifdef __NR_nfsservctl
- #define __NR_nfsctl	__NR_nfsservctl
- #endif
-+#endif
- 
- int
- nfsctl (int cmd, struct nfsctl_arg * argp, union nfsctl_res * resp)
- {
-+#ifdef __NR_nfsctl
-   return syscall (__NR_nfsctl, cmd, argp, resp);
-+#else
-+  return -ENOSYS;
-+#endif
- }
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
new file mode 100644
index 0000000..2cda8c6
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
@@ -0,0 +1,535 @@
+diff --git a/support/export/rmtab.c b/support/export/rmtab.c
+index 31c0f50..d16b3b3 100644
+--- a/support/export/rmtab.c
++++ b/support/export/rmtab.c
+@@ -1,7 +1,7 @@
+ /*
+- * support/export/rmntab.c
++ * support/export/rmtab.c
+  *
+- * Interface to the rmnt file.
++ * Interface to the rmtab file.
+  *
+  */
+ 
+@@ -12,7 +12,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+-#include "xmalloc.h"
++
+ #include "misc.h"
+ #include "nfslib.h"
+ #include "exportfs.h"
+diff --git a/support/export/xtab.c b/support/export/xtab.c
+index 2a43193..e953071 100644
+--- a/support/export/xtab.c
++++ b/support/export/xtab.c
+@@ -14,7 +14,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "xmalloc.h"
++
+ #include "nfslib.h"
+ #include "exportfs.h"
+ #include "xio.h"
+diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
+index e641c45..61e07a8 100644
+--- a/support/nfs/cacheio.c
++++ b/support/nfs/cacheio.c
+@@ -162,11 +162,16 @@ int qword_eol(FILE *f)
+ {
+ 	int err;
+ 
+-	fprintf(f,"\n");
+-	err = fflush(f);
+-	if (err) {
+-		xlog_warn("qword_eol: fflush failed: errno %d (%s)",
++	err = fprintf(f,"\n");
++	if (err < 0) {
++		xlog_warn("qword_eol: fprintf failed: errno %d (%s)",
+ 			    errno, strerror(errno));
++	} else {
++		err = fflush(f);
++		if (err) {
++			xlog_warn("qword_eol: fflush failed: errno %d (%s)",
++				  errno, strerror(errno));
++		}
+ 	}
+ 	/*
+ 	 * We must send one line (and one line only) in a single write
+diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
+index ec251fa..d01ba2f 100644
+--- a/utils/gssd/gssd_proc.c
++++ b/utils/gssd/gssd_proc.c
+@@ -52,6 +52,7 @@
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <sys/fsuid.h>
++#include <sys/resource.h>
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -250,21 +251,10 @@ read_service_info(char *info_file_name, char **servicename, char **servername,
+ 	if ((p = strstr(buf, "port")) != NULL)
+ 		sscanf(p, "port: %127s\n", port);
+ 
+-	/* check service, program, and version */
+-	if (memcmp(service, "nfs", 3) != 0)
+-		return -1;
++	/* get program, and version numbers */
+ 	*prog = atoi(program + 1); /* skip open paren */
+ 	*vers = atoi(version);
+ 
+-	if (strlen(service) == 3 ) {
+-		if ((*prog != 100003) || ((*vers != 2) && (*vers != 3) &&
+-		    (*vers != 4)))
+-			goto fail;
+-	} else if (memcmp(service, "nfs4_cb", 7) == 0) {
+-		if (*vers != 1)
+-			goto fail;
+-	}
+-
+ 	if (!addrstr_to_sockaddr(addr, address, port))
+ 		goto fail;
+ 
+@@ -398,10 +388,10 @@ process_clnt_dir_files(struct clnt_info * clp)
+ static int
+ get_poll_index(int *ind)
+ {
+-	int i;
++	unsigned int i;
+ 
+ 	*ind = -1;
+-	for (i=0; i<FD_ALLOC_BLOCK; i++) {
++	for (i=0; i<pollsize; i++) {
+ 		if (pollarray[i].events == 0) {
+ 			*ind = i;
+ 			break;
+@@ -483,9 +473,13 @@ fail_keep_client:
+ void
+ init_client_list(void)
+ {
++	struct rlimit rlim;
+ 	TAILQ_INIT(&clnt_list);
+ 	/* Eventually plan to grow/shrink poll array: */
+ 	pollsize = FD_ALLOC_BLOCK;
++	if (getrlimit(RLIMIT_NOFILE, &rlim) < 0 &&
++	    rlim.rlim_cur != RLIM_INFINITY)
++		pollsize = rlim.rlim_cur;
+ 	pollarray = calloc(pollsize, sizeof(struct pollfd));
+ }
+ 
+@@ -567,9 +561,8 @@ process_pipedir(char *pipe_name)
+ 
+ 	update_old_clients(namelist, j, pipe_name);
+ 	for (i=0; i < j; i++) {
+-		if (i < FD_ALLOC_BLOCK
+-				&& !strncmp(namelist[i]->d_name, "clnt", 4)
+-				&& !find_client(namelist[i]->d_name, pipe_name))
++		if (!strncmp(namelist[i]->d_name, "clnt", 4)
++		    && !find_client(namelist[i]->d_name, pipe_name))
+ 			process_clnt_dir(namelist[i]->d_name, pipe_name);
+ 		free(namelist[i]);
+ 	}
+@@ -962,12 +955,6 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
+ 
+ 	printerr(1, "handling krb5 upcall (%s)\n", clp->dirname);
+ 
+-	if (tgtname) {
+-		if (clp->servicename) {
+-			free(clp->servicename);
+-			clp->servicename = strdup(tgtname);
+-		}
+-	}
+ 	token.length = 0;
+ 	token.value = NULL;
+ 	memset(&pd, 0, sizeof(struct authgss_private_data));
+@@ -1016,7 +1003,8 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
+ 			int success = 0;
+ 			do {
+ 				gssd_refresh_krb5_machine_credential(clp->servername,
+-								     NULL, service);
++								     NULL, service,
++								     tgtname);
+ 				/*
+ 				 * Get a list of credential cache names and try each
+ 				 * of them until one works or we've tried them all
+diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
+index 60ba594..aeb8f70 100644
+--- a/utils/gssd/krb5_util.c
++++ b/utils/gssd/krb5_util.c
+@@ -774,12 +774,16 @@ gssd_search_krb5_keytab(krb5_context context, krb5_keytab kt,
+ }
+ 
+ /*
+- * Find a keytab entry to use for a given target hostname.
++ * Find a keytab entry to use for a given target realm.
+  * Tries to find the most appropriate keytab to use given the
+  * name of the host we are trying to connect with.
++ *
++ * Note: the tgtname contains a hostname in the realm that we
++ * are authenticating to. It may, or may not be the same as
++ * the server hostname.
+  */
+ static int
+-find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname,
++find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname,
+ 		  krb5_keytab_entry *kte, const char **svcnames)
+ {
+ 	krb5_error_code code;
+@@ -795,7 +799,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname,
+ 
+ 
+ 	/* Get full target hostname */
+-	retval = get_full_hostname(hostname, targethostname,
++	retval = get_full_hostname(tgtname, targethostname,
+ 				   sizeof(targethostname));
+ 	if (retval)
+ 		goto out;
+@@ -1128,7 +1132,7 @@ gssd_get_krb5_machine_cred_list(char ***list)
+ 		if (ple->ccname) {
+ 			/* Make sure cred is up-to-date before returning it */
+ 			retval = gssd_refresh_krb5_machine_credential(NULL, ple,
+-				NULL);
++				NULL, NULL);
+ 			if (retval)
+ 				continue;
+ 			if (i + 1 > listsize) {
+@@ -1219,7 +1223,8 @@ gssd_destroy_krb5_machine_creds(void)
+ int
+ gssd_refresh_krb5_machine_credential(char *hostname,
+ 				     struct gssd_k5_kt_princ *ple, 
+-					 char *service)
++					 char *service,
++					 char *tgtname)
+ {
+ 	krb5_error_code code = 0;
+ 	krb5_context context;
+@@ -1258,7 +1263,10 @@ gssd_refresh_krb5_machine_credential(char *hostname,
+ 	if (ple == NULL) {
+ 		krb5_keytab_entry kte;
+ 
+-		code = find_keytab_entry(context, kt, hostname, &kte, svcnames);
++		if (tgtname == NULL)
++			tgtname = hostname;
++
++		code = find_keytab_entry(context, kt, tgtname, &kte, svcnames);
+ 		if (code) {
+ 			printerr(0, "ERROR: %s: no usable keytab entry found "
+ 				 "in keytab %s for connection with host %s\n",
+diff --git a/utils/gssd/krb5_util.h b/utils/gssd/krb5_util.h
+index cd6e107..9f41625 100644
+--- a/utils/gssd/krb5_util.h
++++ b/utils/gssd/krb5_util.h
+@@ -31,7 +31,8 @@ void gssd_setup_krb5_machine_gss_ccache(char *servername);
+ void gssd_destroy_krb5_machine_creds(void);
+ int  gssd_refresh_krb5_machine_credential(char *hostname,
+ 					  struct gssd_k5_kt_princ *ple, 
+-					  char *service);
++					  char *service,
++					  char *tgtname);
+ char *gssd_k5_err_msg(krb5_context context, krb5_error_code code);
+ void gssd_k5_get_default_realm(char **def_realm);
+ 
+diff --git a/utils/gssd/svcgssd_krb5.c b/utils/gssd/svcgssd_krb5.c
+index 6c34faf..1d44d34 100644
+--- a/utils/gssd/svcgssd_krb5.c
++++ b/utils/gssd/svcgssd_krb5.c
+@@ -38,6 +38,7 @@
+ 
+ #include <stdio.h>
+ #include <errno.h>
++#include <ctype.h>
+ #include <gssapi/gssapi.h>
+ #include <krb5.h>
+ 
+@@ -98,6 +99,12 @@ parse_enctypes(char *enctypes)
+ 	if (n == 0)
+ 		return ENOENT;
+ 
++	/* Skip pass any non digits */
++	while (*enctypes && isdigit(*enctypes) == 0)
++		enctypes++;
++	if (*enctypes == '\0')
++		return EINVAL;
++
+ 	/* Allocate space for enctypes array */
+ 	if ((parsed_enctypes = (int *) calloc(n, sizeof(int))) == NULL) {
+ 		return ENOMEM;
+diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
+index e80efb4..9d66225 100644
+--- a/utils/idmapd/idmapd.c
++++ b/utils/idmapd/idmapd.c
+@@ -145,7 +145,6 @@ static void svrreopen(int, short, void *);
+ static int  nfsopen(struct idmap_client *);
+ static void nfscb(int, short, void *);
+ static void nfsdcb(int, short, void *);
+-static int  validateascii(char *, u_int32_t);
+ static int  addfield(char **, ssize_t *, char *);
+ static int  getfield(char **, char *, size_t);
+ 
+@@ -642,6 +641,8 @@ out:
+ static void
+ imconv(struct idmap_client *ic, struct idmap_msg *im)
+ {
++	u_int32_t len;
++
+ 	switch (im->im_conv) {
+ 	case IDMAP_CONV_IDTONAME:
+ 		idtonameres(im);
+@@ -652,10 +653,10 @@ imconv(struct idmap_client *ic, struct idmap_msg *im)
+ 			    im->im_id, im->im_name);
+ 		break;
+ 	case IDMAP_CONV_NAMETOID:
+-		if (validateascii(im->im_name, sizeof(im->im_name)) == -1) {
+-			im->im_status |= IDMAP_STATUS_INVALIDMSG;
++		len = strnlen(im->im_name, IDMAP_NAMESZ - 1);
++		/* Check for NULL termination just to be careful */
++		if (im->im_name[len+1] != '\0')
+ 			return;
+-		}
+ 		nametoidres(im);
+ 		if (verbose > 1)
+ 			xlog_warn("%s %s: (%s) name \"%s\" -> id \"%d\"",
+@@ -855,25 +856,6 @@ nametoidres(struct idmap_msg *im)
+ }
+ 
+ static int
+-validateascii(char *string, u_int32_t len)
+-{
+-	u_int32_t i;
+-
+-	for (i = 0; i < len; i++) {
+-		if (string[i] == '\0')
+-			break;
+-
+-		if (string[i] & 0x80)
+-			return (-1);
+-	}
+-
+-	if ((i >= len) || string[i] != '\0')
+-		return (-1);
+-
+-	return (i + 1);
+-}
+-
+-static int
+ addfield(char **bpp, ssize_t *bsizp, char *fld)
+ {
+ 	char ch, *bp = *bpp;
+diff --git a/utils/mount/error.c b/utils/mount/error.c
+index 83ad1d2..f8fc13f 100644
+--- a/utils/mount/error.c
++++ b/utils/mount/error.c
+@@ -225,7 +225,7 @@ void mount_error(const char *spec, const char *mount_point, int error)
+ 	case ENOENT:
+ 		if (spec)
+ 			nfs_error(_("%s: mounting %s failed, "
+-				"reason given by server:\n  %s"),
++				"reason given by server: %s"),
+ 				progname, spec, strerror(error));
+ 		else
+ 			nfs_error(_("%s: mount point %s does not exist"),
+diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
+index 9b4197b..8ee3024 100644
+--- a/utils/mount/stropts.c
++++ b/utils/mount/stropts.c
+@@ -666,6 +666,7 @@ static int nfs_try_mount_v3v2(struct nfsmount_info *mi)
+ 		case EOPNOTSUPP:
+ 		case EHOSTUNREACH:
+ 		case ETIMEDOUT:
++		case EACCES:
+ 			continue;
+ 		default:
+ 			goto out;
+@@ -761,6 +762,7 @@ static int nfs_try_mount_v4(struct nfsmount_info *mi)
+ 		case ECONNREFUSED:
+ 		case EHOSTUNREACH:
+ 		case ETIMEDOUT:
++		case EACCES:
+ 			continue;
+ 		default:
+ 			goto out;
+diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
+index 508040a..330cab5 100644
+--- a/utils/mountd/auth.c
++++ b/utils/mountd/auth.c
+@@ -10,10 +10,12 @@
+ #include <config.h>
+ #endif
+ 
++#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <errno.h>
++#include <fcntl.h>
+ #include <unistd.h>
+ 
+ #include "sockaddr.h"
+@@ -21,7 +23,6 @@
+ #include "nfslib.h"
+ #include "exportfs.h"
+ #include "mountd.h"
+-#include "xmalloc.h"
+ #include "v4root.h"
+ 
+ enum auth_error
+diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
+index e950ec6..45012be 100644
+--- a/utils/mountd/cache.c
++++ b/utils/mountd/cache.c
+@@ -29,7 +29,6 @@
+ #include "nfslib.h"
+ #include "exportfs.h"
+ #include "mountd.h"
+-#include "xmalloc.h"
+ #include "fsloc.h"
+ #include "pseudoflavors.h"
+ 
+@@ -109,12 +108,10 @@ static void auth_unix_ip(FILE *f)
+ 		struct addrinfo *ai = NULL;
+ 
+ 		ai = client_resolve(tmp->ai_addr);
+-		if (ai == NULL)
+-			goto out;
+-		client = client_compose(ai);
+-		freeaddrinfo(ai);
+-		if (!client)
+-			goto out;
++		if (ai) {
++			client = client_compose(ai);
++			freeaddrinfo(ai);
++		}
+ 	}
+ 	qword_print(f, "nfsd");
+ 	qword_print(f, ipaddr);
+@@ -127,7 +124,6 @@ static void auth_unix_ip(FILE *f)
+ 	xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, client?client: "DEFAULT");
+ 
+ 	free(client);
+-out:
+ 	freeaddrinfo(tmp);
+ 
+ }
+@@ -347,6 +343,30 @@ static char *next_mnt(void **v, char *p)
+ 	return me->mnt_dir;
+ }
+ 
++static int is_subdirectory(char *child, char *parent)
++{
++	size_t l = strlen(parent);
++
++	if (strcmp(parent, "/") == 0)
++		return 1;
++
++	return strcmp(child, parent) == 0
++		|| (strncmp(child, parent, l) == 0 && child[l] == '/');
++}
++
++static int path_matches(nfs_export *exp, char *path)
++{
++	if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)
++		return is_subdirectory(path, exp->m_export.e_path);
++	return strcmp(path, exp->m_export.e_path) == 0;
++}
++
++static int
++export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
++{
++	return path_matches(exp, path) && client_matches(exp, dom, ai);
++}
++
+ /* True iff e1 is a child of e2 and e2 has crossmnt set: */
+ static bool subexport(struct exportent *e1, struct exportent *e2)
+ {
+@@ -354,8 +374,7 @@ static bool subexport(struct exportent *e1, struct exportent *e2)
+ 	size_t l2 = strlen(p2);
+ 
+ 	return e2->e_flags & NFSEXP_CROSSMOUNT
+-	       && strncmp(p1, p2, l2) == 0
+-	       && p1[l2] == '/';
++		&& is_subdirectory(p1, p2);
+ }
+ 
+ struct parsed_fsid {
+@@ -756,27 +775,6 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex
+ 	return qword_eol(f);
+ }
+ 
+-static int is_subdirectory(char *child, char *parent)
+-{
+-	size_t l = strlen(parent);
+-
+-	return strcmp(child, parent) == 0
+-		|| (strncmp(child, parent, l) == 0 && child[l] == '/');
+-}
+-
+-static int path_matches(nfs_export *exp, char *path)
+-{
+-	if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)
+-		return is_subdirectory(path, exp->m_export.e_path);
+-	return strcmp(path, exp->m_export.e_path) == 0;
+-}
+-
+-static int
+-export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
+-{
+-	return path_matches(exp, path) && client_matches(exp, dom, ai);
+-}
+-
+ static nfs_export *
+ lookup_export(char *dom, char *path, struct addrinfo *ai)
+ {
+@@ -830,6 +828,7 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
+ 
+ #ifdef HAVE_NFS_PLUGIN_H
+ #include <dlfcn.h>
++#include <link.h>
+ #include <nfs-plugin.h>
+ 
+ /*
+@@ -1094,6 +1093,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
+ 		struct addrinfo *ai)
+ {
+ 	struct exportent *exp;
++	struct link_map *map;
+ 	void *handle;
+ 
+ 	handle = dlopen("libnfsjunct.so", RTLD_NOW);
+@@ -1101,6 +1101,11 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
+ 		xlog(D_GENERAL, "%s: dlopen: %s", __func__, dlerror());
+ 		return NULL;
+ 	}
++
++	if (dlinfo(handle, RTLD_DI_LINKMAP, &map) == 0)
++		xlog(D_GENERAL, "%s: loaded plug-in %s",
++			__func__, map->l_name);
++
+ 	(void)dlerror();	/* Clear any error */
+ 
+ 	exp = invoke_junction_ops(handle, dom, pathname, ai);
+diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
+index 9801b9c..4334340 100644
+--- a/utils/nfsdcltrack/nfsdcltrack.c
++++ b/utils/nfsdcltrack/nfsdcltrack.c
+@@ -379,6 +379,17 @@ cltrack_legacy_gracedone(void)
+ 	while ((entry = readdir(v4recovery))) {
+ 		int len;
+ 
++		/* skip "." and ".." */
++		if (entry->d_name[0] == '.') {
++			switch (entry->d_name[1]) {
++			case '\0':
++				continue;
++			case '.':
++				if (entry->d_name[2] == '\0')
++					continue;
++			}
++		}
++
+ 		/* borrow the clientid blob for this */
+ 		len = snprintf((char *)blob, sizeof(blob), "%s/%s", dirname,
+ 				entry->d_name);
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1 b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
new file mode 100644
index 0000000..2cda8c6
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
@@ -0,0 +1,535 @@
+diff --git a/support/export/rmtab.c b/support/export/rmtab.c
+index 31c0f50..d16b3b3 100644
+--- a/support/export/rmtab.c
++++ b/support/export/rmtab.c
+@@ -1,7 +1,7 @@
+ /*
+- * support/export/rmntab.c
++ * support/export/rmtab.c
+  *
+- * Interface to the rmnt file.
++ * Interface to the rmtab file.
+  *
+  */
+ 
+@@ -12,7 +12,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+-#include "xmalloc.h"
++
+ #include "misc.h"
+ #include "nfslib.h"
+ #include "exportfs.h"
+diff --git a/support/export/xtab.c b/support/export/xtab.c
+index 2a43193..e953071 100644
+--- a/support/export/xtab.c
++++ b/support/export/xtab.c
+@@ -14,7 +14,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "xmalloc.h"
++
+ #include "nfslib.h"
+ #include "exportfs.h"
+ #include "xio.h"
+diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
+index e641c45..61e07a8 100644
+--- a/support/nfs/cacheio.c
++++ b/support/nfs/cacheio.c
+@@ -162,11 +162,16 @@ int qword_eol(FILE *f)
+ {
+ 	int err;
+ 
+-	fprintf(f,"\n");
+-	err = fflush(f);
+-	if (err) {
+-		xlog_warn("qword_eol: fflush failed: errno %d (%s)",
++	err = fprintf(f,"\n");
++	if (err < 0) {
++		xlog_warn("qword_eol: fprintf failed: errno %d (%s)",
+ 			    errno, strerror(errno));
++	} else {
++		err = fflush(f);
++		if (err) {
++			xlog_warn("qword_eol: fflush failed: errno %d (%s)",
++				  errno, strerror(errno));
++		}
+ 	}
+ 	/*
+ 	 * We must send one line (and one line only) in a single write
+diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
+index ec251fa..d01ba2f 100644
+--- a/utils/gssd/gssd_proc.c
++++ b/utils/gssd/gssd_proc.c
+@@ -52,6 +52,7 @@
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <sys/fsuid.h>
++#include <sys/resource.h>
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -250,21 +251,10 @@ read_service_info(char *info_file_name, char **servicename, char **servername,
+ 	if ((p = strstr(buf, "port")) != NULL)
+ 		sscanf(p, "port: %127s\n", port);
+ 
+-	/* check service, program, and version */
+-	if (memcmp(service, "nfs", 3) != 0)
+-		return -1;
++	/* get program, and version numbers */
+ 	*prog = atoi(program + 1); /* skip open paren */
+ 	*vers = atoi(version);
+ 
+-	if (strlen(service) == 3 ) {
+-		if ((*prog != 100003) || ((*vers != 2) && (*vers != 3) &&
+-		    (*vers != 4)))
+-			goto fail;
+-	} else if (memcmp(service, "nfs4_cb", 7) == 0) {
+-		if (*vers != 1)
+-			goto fail;
+-	}
+-
+ 	if (!addrstr_to_sockaddr(addr, address, port))
+ 		goto fail;
+ 
+@@ -398,10 +388,10 @@ process_clnt_dir_files(struct clnt_info * clp)
+ static int
+ get_poll_index(int *ind)
+ {
+-	int i;
++	unsigned int i;
+ 
+ 	*ind = -1;
+-	for (i=0; i<FD_ALLOC_BLOCK; i++) {
++	for (i=0; i<pollsize; i++) {
+ 		if (pollarray[i].events == 0) {
+ 			*ind = i;
+ 			break;
+@@ -483,9 +473,13 @@ fail_keep_client:
+ void
+ init_client_list(void)
+ {
++	struct rlimit rlim;
+ 	TAILQ_INIT(&clnt_list);
+ 	/* Eventually plan to grow/shrink poll array: */
+ 	pollsize = FD_ALLOC_BLOCK;
++	if (getrlimit(RLIMIT_NOFILE, &rlim) < 0 &&
++	    rlim.rlim_cur != RLIM_INFINITY)
++		pollsize = rlim.rlim_cur;
+ 	pollarray = calloc(pollsize, sizeof(struct pollfd));
+ }
+ 
+@@ -567,9 +561,8 @@ process_pipedir(char *pipe_name)
+ 
+ 	update_old_clients(namelist, j, pipe_name);
+ 	for (i=0; i < j; i++) {
+-		if (i < FD_ALLOC_BLOCK
+-				&& !strncmp(namelist[i]->d_name, "clnt", 4)
+-				&& !find_client(namelist[i]->d_name, pipe_name))
++		if (!strncmp(namelist[i]->d_name, "clnt", 4)
++		    && !find_client(namelist[i]->d_name, pipe_name))
+ 			process_clnt_dir(namelist[i]->d_name, pipe_name);
+ 		free(namelist[i]);
+ 	}
+@@ -962,12 +955,6 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
+ 
+ 	printerr(1, "handling krb5 upcall (%s)\n", clp->dirname);
+ 
+-	if (tgtname) {
+-		if (clp->servicename) {
+-			free(clp->servicename);
+-			clp->servicename = strdup(tgtname);
+-		}
+-	}
+ 	token.length = 0;
+ 	token.value = NULL;
+ 	memset(&pd, 0, sizeof(struct authgss_private_data));
+@@ -1016,7 +1003,8 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
+ 			int success = 0;
+ 			do {
+ 				gssd_refresh_krb5_machine_credential(clp->servername,
+-								     NULL, service);
++								     NULL, service,
++								     tgtname);
+ 				/*
+ 				 * Get a list of credential cache names and try each
+ 				 * of them until one works or we've tried them all
+diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
+index 60ba594..aeb8f70 100644
+--- a/utils/gssd/krb5_util.c
++++ b/utils/gssd/krb5_util.c
+@@ -774,12 +774,16 @@ gssd_search_krb5_keytab(krb5_context context, krb5_keytab kt,
+ }
+ 
+ /*
+- * Find a keytab entry to use for a given target hostname.
++ * Find a keytab entry to use for a given target realm.
+  * Tries to find the most appropriate keytab to use given the
+  * name of the host we are trying to connect with.
++ *
++ * Note: the tgtname contains a hostname in the realm that we
++ * are authenticating to. It may, or may not be the same as
++ * the server hostname.
+  */
+ static int
+-find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname,
++find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname,
+ 		  krb5_keytab_entry *kte, const char **svcnames)
+ {
+ 	krb5_error_code code;
+@@ -795,7 +799,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname,
+ 
+ 
+ 	/* Get full target hostname */
+-	retval = get_full_hostname(hostname, targethostname,
++	retval = get_full_hostname(tgtname, targethostname,
+ 				   sizeof(targethostname));
+ 	if (retval)
+ 		goto out;
+@@ -1128,7 +1132,7 @@ gssd_get_krb5_machine_cred_list(char ***list)
+ 		if (ple->ccname) {
+ 			/* Make sure cred is up-to-date before returning it */
+ 			retval = gssd_refresh_krb5_machine_credential(NULL, ple,
+-				NULL);
++				NULL, NULL);
+ 			if (retval)
+ 				continue;
+ 			if (i + 1 > listsize) {
+@@ -1219,7 +1223,8 @@ gssd_destroy_krb5_machine_creds(void)
+ int
+ gssd_refresh_krb5_machine_credential(char *hostname,
+ 				     struct gssd_k5_kt_princ *ple, 
+-					 char *service)
++					 char *service,
++					 char *tgtname)
+ {
+ 	krb5_error_code code = 0;
+ 	krb5_context context;
+@@ -1258,7 +1263,10 @@ gssd_refresh_krb5_machine_credential(char *hostname,
+ 	if (ple == NULL) {
+ 		krb5_keytab_entry kte;
+ 
+-		code = find_keytab_entry(context, kt, hostname, &kte, svcnames);
++		if (tgtname == NULL)
++			tgtname = hostname;
++
++		code = find_keytab_entry(context, kt, tgtname, &kte, svcnames);
+ 		if (code) {
+ 			printerr(0, "ERROR: %s: no usable keytab entry found "
+ 				 "in keytab %s for connection with host %s\n",
+diff --git a/utils/gssd/krb5_util.h b/utils/gssd/krb5_util.h
+index cd6e107..9f41625 100644
+--- a/utils/gssd/krb5_util.h
++++ b/utils/gssd/krb5_util.h
+@@ -31,7 +31,8 @@ void gssd_setup_krb5_machine_gss_ccache(char *servername);
+ void gssd_destroy_krb5_machine_creds(void);
+ int  gssd_refresh_krb5_machine_credential(char *hostname,
+ 					  struct gssd_k5_kt_princ *ple, 
+-					  char *service);
++					  char *service,
++					  char *tgtname);
+ char *gssd_k5_err_msg(krb5_context context, krb5_error_code code);
+ void gssd_k5_get_default_realm(char **def_realm);
+ 
+diff --git a/utils/gssd/svcgssd_krb5.c b/utils/gssd/svcgssd_krb5.c
+index 6c34faf..1d44d34 100644
+--- a/utils/gssd/svcgssd_krb5.c
++++ b/utils/gssd/svcgssd_krb5.c
+@@ -38,6 +38,7 @@
+ 
+ #include <stdio.h>
+ #include <errno.h>
++#include <ctype.h>
+ #include <gssapi/gssapi.h>
+ #include <krb5.h>
+ 
+@@ -98,6 +99,12 @@ parse_enctypes(char *enctypes)
+ 	if (n == 0)
+ 		return ENOENT;
+ 
++	/* Skip pass any non digits */
++	while (*enctypes && isdigit(*enctypes) == 0)
++		enctypes++;
++	if (*enctypes == '\0')
++		return EINVAL;
++
+ 	/* Allocate space for enctypes array */
+ 	if ((parsed_enctypes = (int *) calloc(n, sizeof(int))) == NULL) {
+ 		return ENOMEM;
+diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
+index e80efb4..9d66225 100644
+--- a/utils/idmapd/idmapd.c
++++ b/utils/idmapd/idmapd.c
+@@ -145,7 +145,6 @@ static void svrreopen(int, short, void *);
+ static int  nfsopen(struct idmap_client *);
+ static void nfscb(int, short, void *);
+ static void nfsdcb(int, short, void *);
+-static int  validateascii(char *, u_int32_t);
+ static int  addfield(char **, ssize_t *, char *);
+ static int  getfield(char **, char *, size_t);
+ 
+@@ -642,6 +641,8 @@ out:
+ static void
+ imconv(struct idmap_client *ic, struct idmap_msg *im)
+ {
++	u_int32_t len;
++
+ 	switch (im->im_conv) {
+ 	case IDMAP_CONV_IDTONAME:
+ 		idtonameres(im);
+@@ -652,10 +653,10 @@ imconv(struct idmap_client *ic, struct idmap_msg *im)
+ 			    im->im_id, im->im_name);
+ 		break;
+ 	case IDMAP_CONV_NAMETOID:
+-		if (validateascii(im->im_name, sizeof(im->im_name)) == -1) {
+-			im->im_status |= IDMAP_STATUS_INVALIDMSG;
++		len = strnlen(im->im_name, IDMAP_NAMESZ - 1);
++		/* Check for NULL termination just to be careful */
++		if (im->im_name[len+1] != '\0')
+ 			return;
+-		}
+ 		nametoidres(im);
+ 		if (verbose > 1)
+ 			xlog_warn("%s %s: (%s) name \"%s\" -> id \"%d\"",
+@@ -855,25 +856,6 @@ nametoidres(struct idmap_msg *im)
+ }
+ 
+ static int
+-validateascii(char *string, u_int32_t len)
+-{
+-	u_int32_t i;
+-
+-	for (i = 0; i < len; i++) {
+-		if (string[i] == '\0')
+-			break;
+-
+-		if (string[i] & 0x80)
+-			return (-1);
+-	}
+-
+-	if ((i >= len) || string[i] != '\0')
+-		return (-1);
+-
+-	return (i + 1);
+-}
+-
+-static int
+ addfield(char **bpp, ssize_t *bsizp, char *fld)
+ {
+ 	char ch, *bp = *bpp;
+diff --git a/utils/mount/error.c b/utils/mount/error.c
+index 83ad1d2..f8fc13f 100644
+--- a/utils/mount/error.c
++++ b/utils/mount/error.c
+@@ -225,7 +225,7 @@ void mount_error(const char *spec, const char *mount_point, int error)
+ 	case ENOENT:
+ 		if (spec)
+ 			nfs_error(_("%s: mounting %s failed, "
+-				"reason given by server:\n  %s"),
++				"reason given by server: %s"),
+ 				progname, spec, strerror(error));
+ 		else
+ 			nfs_error(_("%s: mount point %s does not exist"),
+diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
+index 9b4197b..8ee3024 100644
+--- a/utils/mount/stropts.c
++++ b/utils/mount/stropts.c
+@@ -666,6 +666,7 @@ static int nfs_try_mount_v3v2(struct nfsmount_info *mi)
+ 		case EOPNOTSUPP:
+ 		case EHOSTUNREACH:
+ 		case ETIMEDOUT:
++		case EACCES:
+ 			continue;
+ 		default:
+ 			goto out;
+@@ -761,6 +762,7 @@ static int nfs_try_mount_v4(struct nfsmount_info *mi)
+ 		case ECONNREFUSED:
+ 		case EHOSTUNREACH:
+ 		case ETIMEDOUT:
++		case EACCES:
+ 			continue;
+ 		default:
+ 			goto out;
+diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
+index 508040a..330cab5 100644
+--- a/utils/mountd/auth.c
++++ b/utils/mountd/auth.c
+@@ -10,10 +10,12 @@
+ #include <config.h>
+ #endif
+ 
++#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <errno.h>
++#include <fcntl.h>
+ #include <unistd.h>
+ 
+ #include "sockaddr.h"
+@@ -21,7 +23,6 @@
+ #include "nfslib.h"
+ #include "exportfs.h"
+ #include "mountd.h"
+-#include "xmalloc.h"
+ #include "v4root.h"
+ 
+ enum auth_error
+diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
+index e950ec6..45012be 100644
+--- a/utils/mountd/cache.c
++++ b/utils/mountd/cache.c
+@@ -29,7 +29,6 @@
+ #include "nfslib.h"
+ #include "exportfs.h"
+ #include "mountd.h"
+-#include "xmalloc.h"
+ #include "fsloc.h"
+ #include "pseudoflavors.h"
+ 
+@@ -109,12 +108,10 @@ static void auth_unix_ip(FILE *f)
+ 		struct addrinfo *ai = NULL;
+ 
+ 		ai = client_resolve(tmp->ai_addr);
+-		if (ai == NULL)
+-			goto out;
+-		client = client_compose(ai);
+-		freeaddrinfo(ai);
+-		if (!client)
+-			goto out;
++		if (ai) {
++			client = client_compose(ai);
++			freeaddrinfo(ai);
++		}
+ 	}
+ 	qword_print(f, "nfsd");
+ 	qword_print(f, ipaddr);
+@@ -127,7 +124,6 @@ static void auth_unix_ip(FILE *f)
+ 	xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, client?client: "DEFAULT");
+ 
+ 	free(client);
+-out:
+ 	freeaddrinfo(tmp);
+ 
+ }
+@@ -347,6 +343,30 @@ static char *next_mnt(void **v, char *p)
+ 	return me->mnt_dir;
+ }
+ 
++static int is_subdirectory(char *child, char *parent)
++{
++	size_t l = strlen(parent);
++
++	if (strcmp(parent, "/") == 0)
++		return 1;
++
++	return strcmp(child, parent) == 0
++		|| (strncmp(child, parent, l) == 0 && child[l] == '/');
++}
++
++static int path_matches(nfs_export *exp, char *path)
++{
++	if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)
++		return is_subdirectory(path, exp->m_export.e_path);
++	return strcmp(path, exp->m_export.e_path) == 0;
++}
++
++static int
++export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
++{
++	return path_matches(exp, path) && client_matches(exp, dom, ai);
++}
++
+ /* True iff e1 is a child of e2 and e2 has crossmnt set: */
+ static bool subexport(struct exportent *e1, struct exportent *e2)
+ {
+@@ -354,8 +374,7 @@ static bool subexport(struct exportent *e1, struct exportent *e2)
+ 	size_t l2 = strlen(p2);
+ 
+ 	return e2->e_flags & NFSEXP_CROSSMOUNT
+-	       && strncmp(p1, p2, l2) == 0
+-	       && p1[l2] == '/';
++		&& is_subdirectory(p1, p2);
+ }
+ 
+ struct parsed_fsid {
+@@ -756,27 +775,6 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex
+ 	return qword_eol(f);
+ }
+ 
+-static int is_subdirectory(char *child, char *parent)
+-{
+-	size_t l = strlen(parent);
+-
+-	return strcmp(child, parent) == 0
+-		|| (strncmp(child, parent, l) == 0 && child[l] == '/');
+-}
+-
+-static int path_matches(nfs_export *exp, char *path)
+-{
+-	if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)
+-		return is_subdirectory(path, exp->m_export.e_path);
+-	return strcmp(path, exp->m_export.e_path) == 0;
+-}
+-
+-static int
+-export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
+-{
+-	return path_matches(exp, path) && client_matches(exp, dom, ai);
+-}
+-
+ static nfs_export *
+ lookup_export(char *dom, char *path, struct addrinfo *ai)
+ {
+@@ -830,6 +828,7 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
+ 
+ #ifdef HAVE_NFS_PLUGIN_H
+ #include <dlfcn.h>
++#include <link.h>
+ #include <nfs-plugin.h>
+ 
+ /*
+@@ -1094,6 +1093,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
+ 		struct addrinfo *ai)
+ {
+ 	struct exportent *exp;
++	struct link_map *map;
+ 	void *handle;
+ 
+ 	handle = dlopen("libnfsjunct.so", RTLD_NOW);
+@@ -1101,6 +1101,11 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
+ 		xlog(D_GENERAL, "%s: dlopen: %s", __func__, dlerror());
+ 		return NULL;
+ 	}
++
++	if (dlinfo(handle, RTLD_DI_LINKMAP, &map) == 0)
++		xlog(D_GENERAL, "%s: loaded plug-in %s",
++			__func__, map->l_name);
++
+ 	(void)dlerror();	/* Clear any error */
+ 
+ 	exp = invoke_junction_ops(handle, dom, pathname, ai);
+diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
+index 9801b9c..4334340 100644
+--- a/utils/nfsdcltrack/nfsdcltrack.c
++++ b/utils/nfsdcltrack/nfsdcltrack.c
+@@ -379,6 +379,17 @@ cltrack_legacy_gracedone(void)
+ 	while ((entry = readdir(v4recovery))) {
+ 		int len;
+ 
++		/* skip "." and ".." */
++		if (entry->d_name[0] == '.') {
++			switch (entry->d_name[1]) {
++			case '\0':
++				continue;
++			case '.':
++				if (entry->d_name[2] == '\0')
++					continue;
++			}
++		}
++
+ 		/* borrow the clientid blob for this */
+ 		len = snprintf((char *)blob, sizeof(blob), "%s/%s", dirname,
+ 				entry->d_name);
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.3.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.7.bb
similarity index 63%
rename from meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.3.bb
rename to meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.7.bb
index 84b8e76..0fa7989 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.3.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.7.bb
@@ -4,24 +4,26 @@ NFS server and related tools."
 HOMEPAGE = "http://nfs.sourceforge.net/"
 SECTION = "console/network"
 
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+LICENSE = "MIT & GPLv2+ & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
 
 # util-linux for libblkid
-DEPENDS = "libcap libnfsidmap libevent util-linux tcp-wrappers"
+DEPENDS = "libcap libnfsidmap libevent util-linux tcp-wrappers sqlite3"
 RDEPENDS_${PN} = "rpcbind"
 RRECOMMENDS_${PN} = "kernel-module-nfsd"
 
-PR = "r5"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.bz2 \
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.bz2 \
+           file://nfs-utils.1.2.8.rc2.patch \
            file://nfs-utils-1.0.6-uclibc.patch \
            file://nfs-utils-1.2.3-uclibc-libio.h.patch \
-           file://nfs-utils-nfsctl-x32-fix.patch \
+           file://nfs-utils-1.2.1-exp-subtree-warn-off.patch \
+           file://nfs-utils-1.2.3-sm-notify-res_init.patch \
+           file://nfs-utils-1.2.5-idmap-errmsg.patch \
+           file://nfs-utils-1.2.1-statdpath-man.patch \
            file://nfsserver"
 
-SRC_URI[md5sum] = "1131dc5f27c4f3905a6e7ee0d594fd4d"
-SRC_URI[sha256sum] = "5575ece941097cbfa67fbe0d220dfa11b73f5e6d991e7939c9339bd72259ff19"
+SRC_URI[md5sum] = "3b5ca797197765dc0c3a4122720c7716"
+SRC_URI[sha256sum] = "7ef8e0a8b22cd7ff33f3afd28e770d45643fae303468a180640c2967833fe75e"
 
 PARALLEL_MAKE = ""
 
@@ -38,11 +40,15 @@ inherit autotools update-rc.d
 
 # --enable-uuid is need for cross-compiling
 EXTRA_OECONF = "--with-statduser=nobody \
-                --enable-nfsv41 \
+                --enable-mountconfig \
+                --enable-libmount-mount \
+                --disable-nfsv41 \
                 --enable-uuid \
                 --disable-gss \
                 --disable-tirpc \
-                --with-statedir=/var/lib/nfs"
+                --disable-nfsdcltrack \
+                --with-statdpath=/var/lib/nfs/statd \
+               "
 
 INHIBIT_AUTO_STAGE = "1"
 
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/4] consolekit_0.4.5.bb: Package unpackaged systemd files
  2013-01-19 22:39 [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Khem Raj
  2013-01-19 22:40 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
  2013-01-19 22:40 ` [PATCH 2/4] nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2 Khem Raj
@ 2013-01-19 22:40 ` Khem Raj
  2013-01-19 22:40 ` [PATCH 4/4] boost: Upgrade 1.51 -> 1.52 Khem Raj
  2013-01-19 23:05 ` [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Otavio Salvador
  4 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2013-01-19 22:40 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../recipes-support/consolekit/consolekit_0.4.5.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/consolekit/consolekit_0.4.5.bb b/meta/recipes-support/consolekit/consolekit_0.4.5.bb
index d1cc037..67899f6 100644
--- a/meta/recipes-support/consolekit/consolekit_0.4.5.bb
+++ b/meta/recipes-support/consolekit/consolekit_0.4.5.bb
@@ -29,7 +29,7 @@ EXTRA_OECONF = "${POLKITCONF} --with-systemdsystemunitdir=${systemd_unitdir}/sys
                 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam-module --with-pam-module-dir=${base_libdir}/security', '--disable-pam-module', d)} \
                "
 
-FILES_${PN} += "${localstatedir}/log/ConsoleKit ${libdir}/ConsoleKit ${base_libdir} ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
+FILES_${PN} += "${localstatedir}/log/ConsoleKit ${libdir}/ConsoleKit  ${systemd_unitdir} ${base_libdir} ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
 FILES_${PN}-dbg += "${base_libdir}/security/.debug"
 
 PACKAGES =+ "pam-plugin-ck-connector"
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 4/4] boost: Upgrade 1.51 -> 1.52
  2013-01-19 22:39 [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Khem Raj
                   ` (2 preceding siblings ...)
  2013-01-19 22:40 ` [PATCH 3/4] consolekit_0.4.5.bb: Package unpackaged systemd files Khem Raj
@ 2013-01-19 22:40 ` Khem Raj
  2013-01-19 23:05 ` [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Otavio Salvador
  4 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2013-01-19 22:40 UTC (permalink / raw)
  To: openembedded-core

Drop hash_enums.patch which is already applied upstream

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-support/boost/boost.inc               |    2 -
 .../boost/{boost_1.51.0.bb => boost_1.52.0.bb}     |    8 ++--
 meta/recipes-support/boost/files/hash_enums.patch  |   45 --------------------
 3 files changed, 3 insertions(+), 52 deletions(-)
 rename meta/recipes-support/boost/{boost_1.51.0.bb => boost_1.52.0.bb} (44%)
 delete mode 100644 meta/recipes-support/boost/files/hash_enums.patch

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 4fe5a35..1266666 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -16,8 +16,6 @@ BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}"
 BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}"
 BOOST_P = "boost_${BOOST_VER}"
 
-INC_PR = "r5"
-
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BOOST_P}.tar.bz2"
 
 S = "${WORKDIR}/${BOOST_P}"
diff --git a/meta/recipes-support/boost/boost_1.51.0.bb b/meta/recipes-support/boost/boost_1.52.0.bb
similarity index 44%
rename from meta/recipes-support/boost/boost_1.51.0.bb
rename to meta/recipes-support/boost/boost_1.52.0.bb
index b95049f..6c9dd3f 100644
--- a/meta/recipes-support/boost/boost_1.51.0.bb
+++ b/meta/recipes-support/boost/boost_1.52.0.bb
@@ -2,10 +2,8 @@ include boost.inc
 
 LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
 
-PR = "${INC_PR}.1"
-
 SRC_URI += "file://arm-intrinsics.patch \
-            file://hash_enums.patch \
            "
-SRC_URI[md5sum] = "4b6bd483b692fd138aef84ed2c8eb679"
-SRC_URI[sha256sum] = "fb2d2335a29ee7fe040a197292bfce982af84a645c81688a915c84c925b69696"
+SRC_URI[md5sum] = "3a855e0f919107e0ca4de4d84ad3f750"
+SRC_URI[sha256sum] = "222b6afd7723f396f5682c20130314a10196d3999feab5ba920d2a6bf53bac92"
+
diff --git a/meta/recipes-support/boost/files/hash_enums.patch b/meta/recipes-support/boost/files/hash_enums.patch
deleted file mode 100644
index 368da96..0000000
--- a/meta/recipes-support/boost/files/hash_enums.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Allow hashing of enums.
-Fixes errors like 
-
-/opt/poky/1.3.0-1/sysroots/i586-poky-linux/usr/include/boost/functional/hash/extensions.hpp:257:34: error: no matching function for call to 'hash_value(const myspace::idx&)'
-
-Upstream-Status: Pending
-Singed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: boost_1_51_0/boost/functional/hash/hash.hpp
-===================================================================
---- boost_1_51_0.orig/boost/functional/hash/hash.hpp	2012-07-15 16:28:30.000000000 -0700
-+++ boost_1_51_0/boost/functional/hash/hash.hpp	2012-09-26 14:00:57.738364002 -0700
-@@ -15,6 +15,8 @@
- #include <boost/functional/hash/detail/hash_float.hpp>
- #include <string>
- #include <boost/limits.hpp>
-+#include <boost/type_traits/is_enum.hpp>
-+#include <boost/utility/enable_if.hpp>
- 
- #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
- #include <boost/type_traits/is_pointer.hpp>
-@@ -89,6 +91,9 @@
-     typename boost::hash_detail::long_numbers<T>::type hash_value(T);
-     template <typename T>
-     typename boost::hash_detail::ulong_numbers<T>::type hash_value(T);
-+    template <typename T>
-+    typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
-+      hash_value(T);
- 
- #if !BOOST_WORKAROUND(__DMC__, <= 0x848)
-     template <class T> std::size_t hash_value(T* const&);
-@@ -178,7 +183,12 @@
-     {
-         return hash_detail::hash_value_unsigned(v);
-     }
--
-+    template <typename T>
-+    typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
-+      hash_value(T v)
-+    {
-+      return static_cast<std::size_t>(v);
-+    }
-     // Implementation by Alberto Barbati and Dave Harris.
- #if !BOOST_WORKAROUND(__DMC__, <= 0x848)
-     template <class T> std::size_t hash_value(T* const& v)
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC
  2013-01-19 22:39 [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Khem Raj
                   ` (3 preceding siblings ...)
  2013-01-19 22:40 ` [PATCH 4/4] boost: Upgrade 1.51 -> 1.52 Khem Raj
@ 2013-01-19 23:05 ` Otavio Salvador
  2013-01-20  3:38   ` Khem Raj
  4 siblings, 1 reply; 22+ messages in thread
From: Otavio Salvador @ 2013-01-19 23:05 UTC (permalink / raw)
  To: Khem Raj; +Cc: Khem Raj, Patches and discussions about the oe-core layer

On Sat, Jan 19, 2013 at 8:39 PM, Khem Raj <raj.khem@gmail.com> wrote:
> This patchset is about upgrading boost and nfs-utils to latest
> KERNEL_CC is now formed using CC, this patch has been tested fair bit now
>
> The following changes since commit 18bc7b44ef58cbcbe32d45504d71eed54ef695a4:
>
>   guilt: add git 1.8.x support (2013-01-18 13:20:56 +0000)
>
> are available in the git repository at:
>
>   git://git.openembedded.org/openembedded-core-contrib kraj/misc
>   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc
>
> Khem Raj (4):
>   kernel.bbclass,module-base.bbclass: Use CC to form KERNEL_CC
>   nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2
>   consolekit_0.4.5.bb: Package unpackaged systemd files
>   boost: Upgrade 1.51 -> 1.52
>
>  meta/classes/kernel-arch.bbclass                   |   13 +
>  meta/classes/kernel.bbclass                        |   16 +-
>  meta/classes/module-base.bbclass                   |   16 -
>  .../nfs-utils/nfs-utils-1.0.6-uclibc.patch         |   37 +-
>  .../nfs-utils-1.2.1-exp-subtree-warn-off.patch     |   12 +
>  .../nfs-utils/nfs-utils-1.2.1-statdpath-man.patch  |   58 +++
>  .../nfs-utils-1.2.3-sm-notify-res_init.patch       |   21 +
>  .../nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch   |   12 +
>  .../nfs-utils/nfs-utils-nfsctl-x32-fix.patch       |   30 --
>  .../nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch  |  535 ++++++++++++++++++++
>  .../nfs-utils/nfs-utils.1.2.8.rc2.patch.1          |  535 ++++++++++++++++++++
>  .../{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb}     |   28 +-
>  meta/recipes-support/boost/boost.inc               |    2 -
>  .../boost/{boost_1.51.0.bb => boost_1.52.0.bb}     |    8 +-
>  meta/recipes-support/boost/files/hash_enums.patch  |   45 --
>  .../recipes-support/consolekit/consolekit_0.4.5.bb |    2 +-
>  16 files changed, 1228 insertions(+), 142 deletions(-)
>  create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
>  create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
>  create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
>  create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
>  delete mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
>  create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
>  create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1

Something went wrong here... :)

>  rename meta/recipes-connectivity/nfs-utils/{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb} (63%)
>  rename meta/recipes-support/boost/{boost_1.51.0.bb => boost_1.52.0.bb} (44%)
>  delete mode 100644 meta/recipes-support/boost/files/hash_enums.patch
>
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC
  2013-01-19 23:05 ` [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Otavio Salvador
@ 2013-01-20  3:38   ` Khem Raj
  0 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2013-01-20  3:38 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Khem Raj, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3703 bytes --]

On Saturday, January 19, 2013, Otavio Salvador wrote:

> On Sat, Jan 19, 2013 at 8:39 PM, Khem Raj <raj.khem@gmail.com<javascript:;>>
> wrote:
> > This patchset is about upgrading boost and nfs-utils to latest
> > KERNEL_CC is now formed using CC, this patch has been tested fair bit now
> >
> > The following changes since commit
> 18bc7b44ef58cbcbe32d45504d71eed54ef695a4:
> >
> >   guilt: add git 1.8.x support (2013-01-18 13:20:56 +0000)
> >
> > are available in the git repository at:
> >
> >   git://git.openembedded.org/openembedded-core-contrib kraj/misc
> >
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc
> >
> > Khem Raj (4):
> >   kernel.bbclass,module-base.bbclass: Use CC to form KERNEL_CC
> >   nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2
> >   consolekit_0.4.5.bb: Package unpackaged systemd files
> >   boost: Upgrade 1.51 -> 1.52
> >
> >  meta/classes/kernel-arch.bbclass                   |   13 +
> >  meta/classes/kernel.bbclass                        |   16 +-
> >  meta/classes/module-base.bbclass                   |   16 -
> >  .../nfs-utils/nfs-utils-1.0.6-uclibc.patch         |   37 +-
> >  .../nfs-utils-1.2.1-exp-subtree-warn-off.patch     |   12 +
> >  .../nfs-utils/nfs-utils-1.2.1-statdpath-man.patch  |   58 +++
> >  .../nfs-utils-1.2.3-sm-notify-res_init.patch       |   21 +
> >  .../nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch   |   12 +
> >  .../nfs-utils/nfs-utils-nfsctl-x32-fix.patch       |   30 --
> >  .../nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch  |  535
> ++++++++++++++++++++
> >  .../nfs-utils/nfs-utils.1.2.8.rc2.patch.1          |  535
> ++++++++++++++++++++
> >  .../{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb}     |   28 +-
> >  meta/recipes-support/boost/boost.inc               |    2 -
> >  .../boost/{boost_1.51.0.bb => boost_1.52.0.bb}     |    8 +-
> >  meta/recipes-support/boost/files/hash_enums.patch  |   45 --
> >  .../recipes-support/consolekit/consolekit_0.4.5.bb |    2 +-
> >  16 files changed, 1228 insertions(+), 142 deletions(-)
> >  create mode 100644
> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
> >  create mode 100644
> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
> >  create mode 100644
> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
> >  create mode 100644
> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
> >  delete mode 100644
> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
> >  create mode 100644
> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
> >  create mode 100644
> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
>
> Something went wrong here... :)


Ah it's wget :) I have deleted the useless file from pull request

>
> >  rename meta/recipes-connectivity/nfs-utils/{nfs-utils_1.2.3.bb =>
> nfs-utils_1.2.7.bb} (63%)
> >  rename meta/recipes-support/boost/{boost_1.51.0.bb => boost_1.52.0.bb}
> (44%)
> >  delete mode 100644 meta/recipes-support/boost/files/hash_enums.patch
> >
> > --
> > 1.7.9.5
> >
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org <javascript:;>
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
>
> --
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br <javascript:;>
> http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
>

[-- Attachment #2: Type: text/html, Size: 5624 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/4] nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2
  2013-01-19 22:40 ` [PATCH 2/4] nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2 Khem Raj
@ 2013-01-21  4:08   ` Saul Wold
  2013-01-21 18:43     ` Khem Raj
  0 siblings, 1 reply; 22+ messages in thread
From: Saul Wold @ 2013-01-21  4:08 UTC (permalink / raw)
  To: Khem Raj; +Cc: Khem Raj, openembedded-core

On 01/19/2013 02:40 PM, Khem Raj wrote:
> From: Khem Raj <kraj@juniper.net>
>
> Disable nfsv4l since it needs LVM2 which
> is not available in OE-Core
>
> Disable nfsdcltrack since its configure time check
> for sqlite3 is not cross compiling safe
>
> It can support ipv6 but thats disabled since
> we disable libtirpc which is needed for ipv6
> support in nfs-utils
>
> Patches imported from fedora to take us to 1.2.8-rc2
>
> Signed-off-by: Khem Raj <kraj@juniper.net>
> ---
>   .../nfs-utils/nfs-utils-1.0.6-uclibc.patch         |   37 +-
>   .../nfs-utils-1.2.1-exp-subtree-warn-off.patch     |   12 +
>   .../nfs-utils/nfs-utils-1.2.1-statdpath-man.patch  |   58 +++
>   .../nfs-utils-1.2.3-sm-notify-res_init.patch       |   21 +
>   .../nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch   |   12 +
>   .../nfs-utils/nfs-utils-nfsctl-x32-fix.patch       |   30 --
>   .../nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch  |  535 ++++++++++++++++++++
>   .../nfs-utils/nfs-utils.1.2.8.rc2.patch.1          |  535 ++++++++++++++++++++
>   .../{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb}     |   28 +-
>   9 files changed, 1210 insertions(+), 58 deletions(-)
>   create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
>   create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
>   create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
>   create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
>   delete mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
>   create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
>   create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
>   rename meta/recipes-connectivity/nfs-utils/{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb} (63%)
>

Some of these patches do not have the proper Signed-off-by: and
Upstream-Status: tags.

Sau!


> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
> index 6d46d3a..d3d3ac8 100644
> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.0.6-uclibc.patch
> @@ -1,22 +1,25 @@
>   Upstream-Status: Inappropriate [embedded specific]
>
> -Index: nfs-utils-1.2.3/support/nfs/svc_socket.c
> +Index: nfs-utils-1.2.6/support/nfs/svc_socket.c
>   ===================================================================
> ---- nfs-utils-1.2.3.orig/support/nfs/svc_socket.c
> -+++ nfs-utils-1.2.3/support/nfs/svc_socket.c
> -@@ -67,6 +67,7 @@ svc_socket (u_long number, int type, int
> -   memset (&addr, 0, sizeof (addr));
> -   addr.sin_family = AF_INET;
> +--- nfs-utils-1.2.6.orig/support/nfs/svc_socket.c	2012-05-14 07:40:52.000000000 -0700
> ++++ nfs-utils-1.2.6/support/nfs/svc_socket.c	2012-10-28 02:42:50.179222457 -0700
> +@@ -40,8 +40,9 @@
> + 	char rpcdata[1024], servdata[1024];
> + 	struct rpcent rpcbuf, *rpcp;
> + 	struct servent servbuf, *servp = NULL;
> +-	int ret;
> ++	int ret = 0;
>
> -+#ifndef __UCLIBC__	/* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
> -   ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
> - 			  &rpcp);
> -   if (ret == 0 && rpcp != NULL)
> -@@ -100,6 +101,7 @@ svc_socket (u_long number, int type, int
> ++#ifndef __UCLIBC__     /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
> + 	ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
> + 				&rpcp);
> + 	if (ret == 0 && rpcp != NULL) {
> +@@ -60,6 +61,7 @@
> + 			}
> + 		}
>    	}
> -     }
> -   else
> -+#endif
> -     {
> - 	  addr.sin_port = 0;
> - 	  if (bind (sock, (struct sockaddr *) &addr, len) < 0)
> ++#endif /* __UCLIBC__ */
> +
> + 	if (ret == 0 && servp != NULL)
> + 		return ntohs(servp->s_port);
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
> new file mode 100644
> index 0000000..14e376c
> --- /dev/null
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
> @@ -0,0 +1,12 @@
> +diff -up nfs-utils-1.2.1/support/nfs/exports.c.orig nfs-utils-1.2.1/support/nfs/exports.c
> +--- nfs-utils-1.2.1/support/nfs/exports.c.orig	2010-01-15 10:48:49.631894982 -0500
> ++++ nfs-utils-1.2.1/support/nfs/exports.c	2010-01-15 11:05:02.009874055 -0500
> +@@ -483,7 +483,7 @@ static void fix_pseudoflavor_flags(struc
> + static int
> + parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr)
> + {
> +-	int	had_subtree_opt = 0;
> ++	int	had_subtree_opt = 1;
> + 	char 	*flname = efname?efname:"command line";
> + 	int	flline = efp?efp->x_line:0;
> + 	unsigned int active = 0;
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
> new file mode 100644
> index 0000000..8c2e0e2
> --- /dev/null
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
> @@ -0,0 +1,58 @@
> +diff -up nfs-utils-1.2.1/utils/statd/sm-notify.man.save nfs-utils-1.2.1/utils/statd/sm-notify.man
> +--- nfs-utils-1.2.1/utils/statd/sm-notify.man.save	2010-01-15 11:10:25.096874609 -0500
> ++++ nfs-utils-1.2.1/utils/statd/sm-notify.man	2010-01-15 11:14:12.636873981 -0500
> +@@ -186,7 +186,7 @@ where NSM state information resides.
> + If this option is not specified,
> + .B sm-notify
> + uses
> +-.I /var/lib/nfs
> ++.I /var/lib/nfs/statd
> + by default.
> + .IP
> + After starting,
> +@@ -287,13 +287,13 @@ Currently, the
> + command supports sending notification only via datagram transport protocols.
> + .SH FILES
> + .TP 2.5i
> +-.I /var/lib/nfs/sm
> ++.I /var/lib/nfs/statd/sm
> + directory containing monitor list
> + .TP 2.5i
> +-.I /var/lib/nfs/sm.bak
> ++.I /var/lib/nfs/statd/sm.bak
> + directory containing notify list
> + .TP 2.5i
> +-.I /var/lib/nfs/state
> ++.I /var/lib/nfs/statd/state
> + NSM state number for this host
> + .TP 2.5i
> + .I /proc/sys/fs/nfs/nsm_local_state
> +diff -up nfs-utils-1.2.1/utils/statd/statd.man.save nfs-utils-1.2.1/utils/statd/statd.man
> +--- nfs-utils-1.2.1/utils/statd/statd.man.save	2010-01-15 11:10:25.098906325 -0500
> ++++ nfs-utils-1.2.1/utils/statd/statd.man	2010-01-15 11:11:03.874769717 -0500
> +@@ -232,7 +232,7 @@ where NSM state information resides.
> + If this option is not specified,
> + .B rpc.statd
> + uses
> +-.I /var/lib/nfs
> ++.I /var/lib/nfs/statd
> + by default.
> + .IP
> + After starting,
> +@@ -368,13 +368,13 @@ As long as at least one network transpor
> + will operate.
> + .SH FILES
> + .TP 2.5i
> +-.I /var/lib/nfs/sm
> ++.I /var/lib/nfs/statd/sm
> + directory containing monitor list
> + .TP 2.5i
> +-.I /var/lib/nfs/sm.bak
> ++.I /var/lib/nfs/statd/sm.bak
> + directory containing notify list
> + .TP 2.5i
> +-.I /var/lib/nfs/state
> ++.I /var/lib/nfs/statd/state
> + NSM state number for this host
> + .TP 2.5i
> + .I /var/run/run.statd.pid
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
> new file mode 100644
> index 0000000..3ce55eb
> --- /dev/null
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
> @@ -0,0 +1,21 @@
> +diff -up nfs-utils-1.2.3/utils/statd/sm-notify.c.orig nfs-utils-1.2.3/utils/statd/sm-notify.c
> +--- nfs-utils-1.2.3/utils/statd/sm-notify.c.orig	2010-09-28 08:24:16.000000000 -0400
> ++++ nfs-utils-1.2.3/utils/statd/sm-notify.c	2010-10-15 16:44:43.487119601 -0400
> +@@ -28,6 +28,9 @@
> + #include <netdb.h>
> + #include <errno.h>
> + #include <grp.h>
> ++#include <netinet/in.h>
> ++#include <arpa/nameser.h>
> ++#include <resolv.h>
> +
> + #include "sockaddr.h"
> + #include "xlog.h"
> +@@ -84,6 +87,7 @@ smn_lookup(const char *name)
> + 	};
> + 	int error;
> +
> ++	res_init();
> + 	error = getaddrinfo(name, NULL, &hint, &ai);
> + 	if (error != 0) {
> + 		xlog(D_GENERAL, "getaddrinfo(3): %s", gai_strerror(error));
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
> new file mode 100644
> index 0000000..8e00ed7
> --- /dev/null
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
> @@ -0,0 +1,12 @@
> +diff -up nfs-utils-1.2.5/utils/nfsidmap/nfsidmap.c.orig nfs-utils-1.2.5/utils/nfsidmap/nfsidmap.c
> +--- nfs-utils-1.2.5/utils/nfsidmap/nfsidmap.c.orig	2011-12-13 15:01:26.311660000 -0500
> ++++ nfs-utils-1.2.5/utils/nfsidmap/nfsidmap.c	2011-12-13 15:32:48.167354000 -0500
> +@@ -261,7 +261,7 @@ int main(int argc, char **argv)
> +
> + 	xlog_stderr(0);
> + 	if ((argc - optind) != 2) {
> +-		xlog_err("Bad arg count. Check /etc/request-key.conf");
> ++		xlog_err("Bad arg count. Check /etc/request-key.d/id_resolver.conf");
> + 		xlog_warn(usage, progname);
> + 		return 1;
> + 	}
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
> deleted file mode 100644
> index 26b4631..0000000
> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -
> -Upstream-Status: Pending
> -
> -Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> -
> ---- nfs-utils-1.2.3/support/nfs/nfsctl.c.x32	2010-09-28 05:24:16.000000000 -0700
> -+++ nfs-utils-1.2.3/support/nfs/nfsctl.c	2011-11-30 13:34:09.369917161 -0800
> -@@ -12,15 +12,22 @@
> -
> - #include <unistd.h>
> - #include <asm/unistd.h>
> -+#include <errno.h>
> - #include "nfslib.h"
> -
> - /* compatibility hack... */
> - #ifndef __NR_nfsctl
> -+#ifdef __NR_nfsservctl
> - #define __NR_nfsctl	__NR_nfsservctl
> - #endif
> -+#endif
> -
> - int
> - nfsctl (int cmd, struct nfsctl_arg * argp, union nfsctl_res * resp)
> - {
> -+#ifdef __NR_nfsctl
> -   return syscall (__NR_nfsctl, cmd, argp, resp);
> -+#else
> -+  return -ENOSYS;
> -+#endif
> - }
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
> new file mode 100644
> index 0000000..2cda8c6
> --- /dev/null
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
> @@ -0,0 +1,535 @@
> +diff --git a/support/export/rmtab.c b/support/export/rmtab.c
> +index 31c0f50..d16b3b3 100644
> +--- a/support/export/rmtab.c
> ++++ b/support/export/rmtab.c
> +@@ -1,7 +1,7 @@
> + /*
> +- * support/export/rmntab.c
> ++ * support/export/rmtab.c
> +  *
> +- * Interface to the rmnt file.
> ++ * Interface to the rmtab file.
> +  *
> +  */
> +
> +@@ -12,7 +12,7 @@
> + #include <stdlib.h>
> + #include <string.h>
> + #include <errno.h>
> +-#include "xmalloc.h"
> ++
> + #include "misc.h"
> + #include "nfslib.h"
> + #include "exportfs.h"
> +diff --git a/support/export/xtab.c b/support/export/xtab.c
> +index 2a43193..e953071 100644
> +--- a/support/export/xtab.c
> ++++ b/support/export/xtab.c
> +@@ -14,7 +14,7 @@
> + #include <unistd.h>
> + #include <stdlib.h>
> + #include <string.h>
> +-#include "xmalloc.h"
> ++
> + #include "nfslib.h"
> + #include "exportfs.h"
> + #include "xio.h"
> +diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
> +index e641c45..61e07a8 100644
> +--- a/support/nfs/cacheio.c
> ++++ b/support/nfs/cacheio.c
> +@@ -162,11 +162,16 @@ int qword_eol(FILE *f)
> + {
> + 	int err;
> +
> +-	fprintf(f,"\n");
> +-	err = fflush(f);
> +-	if (err) {
> +-		xlog_warn("qword_eol: fflush failed: errno %d (%s)",
> ++	err = fprintf(f,"\n");
> ++	if (err < 0) {
> ++		xlog_warn("qword_eol: fprintf failed: errno %d (%s)",
> + 			    errno, strerror(errno));
> ++	} else {
> ++		err = fflush(f);
> ++		if (err) {
> ++			xlog_warn("qword_eol: fflush failed: errno %d (%s)",
> ++				  errno, strerror(errno));
> ++		}
> + 	}
> + 	/*
> + 	 * We must send one line (and one line only) in a single write
> +diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
> +index ec251fa..d01ba2f 100644
> +--- a/utils/gssd/gssd_proc.c
> ++++ b/utils/gssd/gssd_proc.c
> +@@ -52,6 +52,7 @@
> + #include <sys/socket.h>
> + #include <arpa/inet.h>
> + #include <sys/fsuid.h>
> ++#include <sys/resource.h>
> +
> + #include <stdio.h>
> + #include <stdlib.h>
> +@@ -250,21 +251,10 @@ read_service_info(char *info_file_name, char **servicename, char **servername,
> + 	if ((p = strstr(buf, "port")) != NULL)
> + 		sscanf(p, "port: %127s\n", port);
> +
> +-	/* check service, program, and version */
> +-	if (memcmp(service, "nfs", 3) != 0)
> +-		return -1;
> ++	/* get program, and version numbers */
> + 	*prog = atoi(program + 1); /* skip open paren */
> + 	*vers = atoi(version);
> +
> +-	if (strlen(service) == 3 ) {
> +-		if ((*prog != 100003) || ((*vers != 2) && (*vers != 3) &&
> +-		    (*vers != 4)))
> +-			goto fail;
> +-	} else if (memcmp(service, "nfs4_cb", 7) == 0) {
> +-		if (*vers != 1)
> +-			goto fail;
> +-	}
> +-
> + 	if (!addrstr_to_sockaddr(addr, address, port))
> + 		goto fail;
> +
> +@@ -398,10 +388,10 @@ process_clnt_dir_files(struct clnt_info * clp)
> + static int
> + get_poll_index(int *ind)
> + {
> +-	int i;
> ++	unsigned int i;
> +
> + 	*ind = -1;
> +-	for (i=0; i<FD_ALLOC_BLOCK; i++) {
> ++	for (i=0; i<pollsize; i++) {
> + 		if (pollarray[i].events == 0) {
> + 			*ind = i;
> + 			break;
> +@@ -483,9 +473,13 @@ fail_keep_client:
> + void
> + init_client_list(void)
> + {
> ++	struct rlimit rlim;
> + 	TAILQ_INIT(&clnt_list);
> + 	/* Eventually plan to grow/shrink poll array: */
> + 	pollsize = FD_ALLOC_BLOCK;
> ++	if (getrlimit(RLIMIT_NOFILE, &rlim) < 0 &&
> ++	    rlim.rlim_cur != RLIM_INFINITY)
> ++		pollsize = rlim.rlim_cur;
> + 	pollarray = calloc(pollsize, sizeof(struct pollfd));
> + }
> +
> +@@ -567,9 +561,8 @@ process_pipedir(char *pipe_name)
> +
> + 	update_old_clients(namelist, j, pipe_name);
> + 	for (i=0; i < j; i++) {
> +-		if (i < FD_ALLOC_BLOCK
> +-				&& !strncmp(namelist[i]->d_name, "clnt", 4)
> +-				&& !find_client(namelist[i]->d_name, pipe_name))
> ++		if (!strncmp(namelist[i]->d_name, "clnt", 4)
> ++		    && !find_client(namelist[i]->d_name, pipe_name))
> + 			process_clnt_dir(namelist[i]->d_name, pipe_name);
> + 		free(namelist[i]);
> + 	}
> +@@ -962,12 +955,6 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
> +
> + 	printerr(1, "handling krb5 upcall (%s)\n", clp->dirname);
> +
> +-	if (tgtname) {
> +-		if (clp->servicename) {
> +-			free(clp->servicename);
> +-			clp->servicename = strdup(tgtname);
> +-		}
> +-	}
> + 	token.length = 0;
> + 	token.value = NULL;
> + 	memset(&pd, 0, sizeof(struct authgss_private_data));
> +@@ -1016,7 +1003,8 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
> + 			int success = 0;
> + 			do {
> + 				gssd_refresh_krb5_machine_credential(clp->servername,
> +-								     NULL, service);
> ++								     NULL, service,
> ++								     tgtname);
> + 				/*
> + 				 * Get a list of credential cache names and try each
> + 				 * of them until one works or we've tried them all
> +diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
> +index 60ba594..aeb8f70 100644
> +--- a/utils/gssd/krb5_util.c
> ++++ b/utils/gssd/krb5_util.c
> +@@ -774,12 +774,16 @@ gssd_search_krb5_keytab(krb5_context context, krb5_keytab kt,
> + }
> +
> + /*
> +- * Find a keytab entry to use for a given target hostname.
> ++ * Find a keytab entry to use for a given target realm.
> +  * Tries to find the most appropriate keytab to use given the
> +  * name of the host we are trying to connect with.
> ++ *
> ++ * Note: the tgtname contains a hostname in the realm that we
> ++ * are authenticating to. It may, or may not be the same as
> ++ * the server hostname.
> +  */
> + static int
> +-find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname,
> ++find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname,
> + 		  krb5_keytab_entry *kte, const char **svcnames)
> + {
> + 	krb5_error_code code;
> +@@ -795,7 +799,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname,
> +
> +
> + 	/* Get full target hostname */
> +-	retval = get_full_hostname(hostname, targethostname,
> ++	retval = get_full_hostname(tgtname, targethostname,
> + 				   sizeof(targethostname));
> + 	if (retval)
> + 		goto out;
> +@@ -1128,7 +1132,7 @@ gssd_get_krb5_machine_cred_list(char ***list)
> + 		if (ple->ccname) {
> + 			/* Make sure cred is up-to-date before returning it */
> + 			retval = gssd_refresh_krb5_machine_credential(NULL, ple,
> +-				NULL);
> ++				NULL, NULL);
> + 			if (retval)
> + 				continue;
> + 			if (i + 1 > listsize) {
> +@@ -1219,7 +1223,8 @@ gssd_destroy_krb5_machine_creds(void)
> + int
> + gssd_refresh_krb5_machine_credential(char *hostname,
> + 				     struct gssd_k5_kt_princ *ple,
> +-					 char *service)
> ++					 char *service,
> ++					 char *tgtname)
> + {
> + 	krb5_error_code code = 0;
> + 	krb5_context context;
> +@@ -1258,7 +1263,10 @@ gssd_refresh_krb5_machine_credential(char *hostname,
> + 	if (ple == NULL) {
> + 		krb5_keytab_entry kte;
> +
> +-		code = find_keytab_entry(context, kt, hostname, &kte, svcnames);
> ++		if (tgtname == NULL)
> ++			tgtname = hostname;
> ++
> ++		code = find_keytab_entry(context, kt, tgtname, &kte, svcnames);
> + 		if (code) {
> + 			printerr(0, "ERROR: %s: no usable keytab entry found "
> + 				 "in keytab %s for connection with host %s\n",
> +diff --git a/utils/gssd/krb5_util.h b/utils/gssd/krb5_util.h
> +index cd6e107..9f41625 100644
> +--- a/utils/gssd/krb5_util.h
> ++++ b/utils/gssd/krb5_util.h
> +@@ -31,7 +31,8 @@ void gssd_setup_krb5_machine_gss_ccache(char *servername);
> + void gssd_destroy_krb5_machine_creds(void);
> + int  gssd_refresh_krb5_machine_credential(char *hostname,
> + 					  struct gssd_k5_kt_princ *ple,
> +-					  char *service);
> ++					  char *service,
> ++					  char *tgtname);
> + char *gssd_k5_err_msg(krb5_context context, krb5_error_code code);
> + void gssd_k5_get_default_realm(char **def_realm);
> +
> +diff --git a/utils/gssd/svcgssd_krb5.c b/utils/gssd/svcgssd_krb5.c
> +index 6c34faf..1d44d34 100644
> +--- a/utils/gssd/svcgssd_krb5.c
> ++++ b/utils/gssd/svcgssd_krb5.c
> +@@ -38,6 +38,7 @@
> +
> + #include <stdio.h>
> + #include <errno.h>
> ++#include <ctype.h>
> + #include <gssapi/gssapi.h>
> + #include <krb5.h>
> +
> +@@ -98,6 +99,12 @@ parse_enctypes(char *enctypes)
> + 	if (n == 0)
> + 		return ENOENT;
> +
> ++	/* Skip pass any non digits */
> ++	while (*enctypes && isdigit(*enctypes) == 0)
> ++		enctypes++;
> ++	if (*enctypes == '\0')
> ++		return EINVAL;
> ++
> + 	/* Allocate space for enctypes array */
> + 	if ((parsed_enctypes = (int *) calloc(n, sizeof(int))) == NULL) {
> + 		return ENOMEM;
> +diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
> +index e80efb4..9d66225 100644
> +--- a/utils/idmapd/idmapd.c
> ++++ b/utils/idmapd/idmapd.c
> +@@ -145,7 +145,6 @@ static void svrreopen(int, short, void *);
> + static int  nfsopen(struct idmap_client *);
> + static void nfscb(int, short, void *);
> + static void nfsdcb(int, short, void *);
> +-static int  validateascii(char *, u_int32_t);
> + static int  addfield(char **, ssize_t *, char *);
> + static int  getfield(char **, char *, size_t);
> +
> +@@ -642,6 +641,8 @@ out:
> + static void
> + imconv(struct idmap_client *ic, struct idmap_msg *im)
> + {
> ++	u_int32_t len;
> ++
> + 	switch (im->im_conv) {
> + 	case IDMAP_CONV_IDTONAME:
> + 		idtonameres(im);
> +@@ -652,10 +653,10 @@ imconv(struct idmap_client *ic, struct idmap_msg *im)
> + 			    im->im_id, im->im_name);
> + 		break;
> + 	case IDMAP_CONV_NAMETOID:
> +-		if (validateascii(im->im_name, sizeof(im->im_name)) == -1) {
> +-			im->im_status |= IDMAP_STATUS_INVALIDMSG;
> ++		len = strnlen(im->im_name, IDMAP_NAMESZ - 1);
> ++		/* Check for NULL termination just to be careful */
> ++		if (im->im_name[len+1] != '\0')
> + 			return;
> +-		}
> + 		nametoidres(im);
> + 		if (verbose > 1)
> + 			xlog_warn("%s %s: (%s) name \"%s\" -> id \"%d\"",
> +@@ -855,25 +856,6 @@ nametoidres(struct idmap_msg *im)
> + }
> +
> + static int
> +-validateascii(char *string, u_int32_t len)
> +-{
> +-	u_int32_t i;
> +-
> +-	for (i = 0; i < len; i++) {
> +-		if (string[i] == '\0')
> +-			break;
> +-
> +-		if (string[i] & 0x80)
> +-			return (-1);
> +-	}
> +-
> +-	if ((i >= len) || string[i] != '\0')
> +-		return (-1);
> +-
> +-	return (i + 1);
> +-}
> +-
> +-static int
> + addfield(char **bpp, ssize_t *bsizp, char *fld)
> + {
> + 	char ch, *bp = *bpp;
> +diff --git a/utils/mount/error.c b/utils/mount/error.c
> +index 83ad1d2..f8fc13f 100644
> +--- a/utils/mount/error.c
> ++++ b/utils/mount/error.c
> +@@ -225,7 +225,7 @@ void mount_error(const char *spec, const char *mount_point, int error)
> + 	case ENOENT:
> + 		if (spec)
> + 			nfs_error(_("%s: mounting %s failed, "
> +-				"reason given by server:\n  %s"),
> ++				"reason given by server: %s"),
> + 				progname, spec, strerror(error));
> + 		else
> + 			nfs_error(_("%s: mount point %s does not exist"),
> +diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> +index 9b4197b..8ee3024 100644
> +--- a/utils/mount/stropts.c
> ++++ b/utils/mount/stropts.c
> +@@ -666,6 +666,7 @@ static int nfs_try_mount_v3v2(struct nfsmount_info *mi)
> + 		case EOPNOTSUPP:
> + 		case EHOSTUNREACH:
> + 		case ETIMEDOUT:
> ++		case EACCES:
> + 			continue;
> + 		default:
> + 			goto out;
> +@@ -761,6 +762,7 @@ static int nfs_try_mount_v4(struct nfsmount_info *mi)
> + 		case ECONNREFUSED:
> + 		case EHOSTUNREACH:
> + 		case ETIMEDOUT:
> ++		case EACCES:
> + 			continue;
> + 		default:
> + 			goto out;
> +diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
> +index 508040a..330cab5 100644
> +--- a/utils/mountd/auth.c
> ++++ b/utils/mountd/auth.c
> +@@ -10,10 +10,12 @@
> + #include <config.h>
> + #endif
> +
> ++#include <sys/types.h>
> + #include <sys/stat.h>
> + #include <netinet/in.h>
> + #include <arpa/inet.h>
> + #include <errno.h>
> ++#include <fcntl.h>
> + #include <unistd.h>
> +
> + #include "sockaddr.h"
> +@@ -21,7 +23,6 @@
> + #include "nfslib.h"
> + #include "exportfs.h"
> + #include "mountd.h"
> +-#include "xmalloc.h"
> + #include "v4root.h"
> +
> + enum auth_error
> +diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
> +index e950ec6..45012be 100644
> +--- a/utils/mountd/cache.c
> ++++ b/utils/mountd/cache.c
> +@@ -29,7 +29,6 @@
> + #include "nfslib.h"
> + #include "exportfs.h"
> + #include "mountd.h"
> +-#include "xmalloc.h"
> + #include "fsloc.h"
> + #include "pseudoflavors.h"
> +
> +@@ -109,12 +108,10 @@ static void auth_unix_ip(FILE *f)
> + 		struct addrinfo *ai = NULL;
> +
> + 		ai = client_resolve(tmp->ai_addr);
> +-		if (ai == NULL)
> +-			goto out;
> +-		client = client_compose(ai);
> +-		freeaddrinfo(ai);
> +-		if (!client)
> +-			goto out;
> ++		if (ai) {
> ++			client = client_compose(ai);
> ++			freeaddrinfo(ai);
> ++		}
> + 	}
> + 	qword_print(f, "nfsd");
> + 	qword_print(f, ipaddr);
> +@@ -127,7 +124,6 @@ static void auth_unix_ip(FILE *f)
> + 	xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, client?client: "DEFAULT");
> +
> + 	free(client);
> +-out:
> + 	freeaddrinfo(tmp);
> +
> + }
> +@@ -347,6 +343,30 @@ static char *next_mnt(void **v, char *p)
> + 	return me->mnt_dir;
> + }
> +
> ++static int is_subdirectory(char *child, char *parent)
> ++{
> ++	size_t l = strlen(parent);
> ++
> ++	if (strcmp(parent, "/") == 0)
> ++		return 1;
> ++
> ++	return strcmp(child, parent) == 0
> ++		|| (strncmp(child, parent, l) == 0 && child[l] == '/');
> ++}
> ++
> ++static int path_matches(nfs_export *exp, char *path)
> ++{
> ++	if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)
> ++		return is_subdirectory(path, exp->m_export.e_path);
> ++	return strcmp(path, exp->m_export.e_path) == 0;
> ++}
> ++
> ++static int
> ++export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
> ++{
> ++	return path_matches(exp, path) && client_matches(exp, dom, ai);
> ++}
> ++
> + /* True iff e1 is a child of e2 and e2 has crossmnt set: */
> + static bool subexport(struct exportent *e1, struct exportent *e2)
> + {
> +@@ -354,8 +374,7 @@ static bool subexport(struct exportent *e1, struct exportent *e2)
> + 	size_t l2 = strlen(p2);
> +
> + 	return e2->e_flags & NFSEXP_CROSSMOUNT
> +-	       && strncmp(p1, p2, l2) == 0
> +-	       && p1[l2] == '/';
> ++		&& is_subdirectory(p1, p2);
> + }
> +
> + struct parsed_fsid {
> +@@ -756,27 +775,6 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex
> + 	return qword_eol(f);
> + }
> +
> +-static int is_subdirectory(char *child, char *parent)
> +-{
> +-	size_t l = strlen(parent);
> +-
> +-	return strcmp(child, parent) == 0
> +-		|| (strncmp(child, parent, l) == 0 && child[l] == '/');
> +-}
> +-
> +-static int path_matches(nfs_export *exp, char *path)
> +-{
> +-	if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)
> +-		return is_subdirectory(path, exp->m_export.e_path);
> +-	return strcmp(path, exp->m_export.e_path) == 0;
> +-}
> +-
> +-static int
> +-export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
> +-{
> +-	return path_matches(exp, path) && client_matches(exp, dom, ai);
> +-}
> +-
> + static nfs_export *
> + lookup_export(char *dom, char *path, struct addrinfo *ai)
> + {
> +@@ -830,6 +828,7 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
> +
> + #ifdef HAVE_NFS_PLUGIN_H
> + #include <dlfcn.h>
> ++#include <link.h>
> + #include <nfs-plugin.h>
> +
> + /*
> +@@ -1094,6 +1093,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
> + 		struct addrinfo *ai)
> + {
> + 	struct exportent *exp;
> ++	struct link_map *map;
> + 	void *handle;
> +
> + 	handle = dlopen("libnfsjunct.so", RTLD_NOW);
> +@@ -1101,6 +1101,11 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
> + 		xlog(D_GENERAL, "%s: dlopen: %s", __func__, dlerror());
> + 		return NULL;
> + 	}
> ++
> ++	if (dlinfo(handle, RTLD_DI_LINKMAP, &map) == 0)
> ++		xlog(D_GENERAL, "%s: loaded plug-in %s",
> ++			__func__, map->l_name);
> ++
> + 	(void)dlerror();	/* Clear any error */
> +
> + 	exp = invoke_junction_ops(handle, dom, pathname, ai);
> +diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
> +index 9801b9c..4334340 100644
> +--- a/utils/nfsdcltrack/nfsdcltrack.c
> ++++ b/utils/nfsdcltrack/nfsdcltrack.c
> +@@ -379,6 +379,17 @@ cltrack_legacy_gracedone(void)
> + 	while ((entry = readdir(v4recovery))) {
> + 		int len;
> +
> ++		/* skip "." and ".." */
> ++		if (entry->d_name[0] == '.') {
> ++			switch (entry->d_name[1]) {
> ++			case '\0':
> ++				continue;
> ++			case '.':
> ++				if (entry->d_name[2] == '\0')
> ++					continue;
> ++			}
> ++		}
> ++
> + 		/* borrow the clientid blob for this */
> + 		len = snprintf((char *)blob, sizeof(blob), "%s/%s", dirname,
> + 				entry->d_name);
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1 b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
> new file mode 100644
> index 0000000..2cda8c6
> --- /dev/null
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
> @@ -0,0 +1,535 @@
> +diff --git a/support/export/rmtab.c b/support/export/rmtab.c
> +index 31c0f50..d16b3b3 100644
> +--- a/support/export/rmtab.c
> ++++ b/support/export/rmtab.c
> +@@ -1,7 +1,7 @@
> + /*
> +- * support/export/rmntab.c
> ++ * support/export/rmtab.c
> +  *
> +- * Interface to the rmnt file.
> ++ * Interface to the rmtab file.
> +  *
> +  */
> +
> +@@ -12,7 +12,7 @@
> + #include <stdlib.h>
> + #include <string.h>
> + #include <errno.h>
> +-#include "xmalloc.h"
> ++
> + #include "misc.h"
> + #include "nfslib.h"
> + #include "exportfs.h"
> +diff --git a/support/export/xtab.c b/support/export/xtab.c
> +index 2a43193..e953071 100644
> +--- a/support/export/xtab.c
> ++++ b/support/export/xtab.c
> +@@ -14,7 +14,7 @@
> + #include <unistd.h>
> + #include <stdlib.h>
> + #include <string.h>
> +-#include "xmalloc.h"
> ++
> + #include "nfslib.h"
> + #include "exportfs.h"
> + #include "xio.h"
> +diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
> +index e641c45..61e07a8 100644
> +--- a/support/nfs/cacheio.c
> ++++ b/support/nfs/cacheio.c
> +@@ -162,11 +162,16 @@ int qword_eol(FILE *f)
> + {
> + 	int err;
> +
> +-	fprintf(f,"\n");
> +-	err = fflush(f);
> +-	if (err) {
> +-		xlog_warn("qword_eol: fflush failed: errno %d (%s)",
> ++	err = fprintf(f,"\n");
> ++	if (err < 0) {
> ++		xlog_warn("qword_eol: fprintf failed: errno %d (%s)",
> + 			    errno, strerror(errno));
> ++	} else {
> ++		err = fflush(f);
> ++		if (err) {
> ++			xlog_warn("qword_eol: fflush failed: errno %d (%s)",
> ++				  errno, strerror(errno));
> ++		}
> + 	}
> + 	/*
> + 	 * We must send one line (and one line only) in a single write
> +diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
> +index ec251fa..d01ba2f 100644
> +--- a/utils/gssd/gssd_proc.c
> ++++ b/utils/gssd/gssd_proc.c
> +@@ -52,6 +52,7 @@
> + #include <sys/socket.h>
> + #include <arpa/inet.h>
> + #include <sys/fsuid.h>
> ++#include <sys/resource.h>
> +
> + #include <stdio.h>
> + #include <stdlib.h>
> +@@ -250,21 +251,10 @@ read_service_info(char *info_file_name, char **servicename, char **servername,
> + 	if ((p = strstr(buf, "port")) != NULL)
> + 		sscanf(p, "port: %127s\n", port);
> +
> +-	/* check service, program, and version */
> +-	if (memcmp(service, "nfs", 3) != 0)
> +-		return -1;
> ++	/* get program, and version numbers */
> + 	*prog = atoi(program + 1); /* skip open paren */
> + 	*vers = atoi(version);
> +
> +-	if (strlen(service) == 3 ) {
> +-		if ((*prog != 100003) || ((*vers != 2) && (*vers != 3) &&
> +-		    (*vers != 4)))
> +-			goto fail;
> +-	} else if (memcmp(service, "nfs4_cb", 7) == 0) {
> +-		if (*vers != 1)
> +-			goto fail;
> +-	}
> +-
> + 	if (!addrstr_to_sockaddr(addr, address, port))
> + 		goto fail;
> +
> +@@ -398,10 +388,10 @@ process_clnt_dir_files(struct clnt_info * clp)
> + static int
> + get_poll_index(int *ind)
> + {
> +-	int i;
> ++	unsigned int i;
> +
> + 	*ind = -1;
> +-	for (i=0; i<FD_ALLOC_BLOCK; i++) {
> ++	for (i=0; i<pollsize; i++) {
> + 		if (pollarray[i].events == 0) {
> + 			*ind = i;
> + 			break;
> +@@ -483,9 +473,13 @@ fail_keep_client:
> + void
> + init_client_list(void)
> + {
> ++	struct rlimit rlim;
> + 	TAILQ_INIT(&clnt_list);
> + 	/* Eventually plan to grow/shrink poll array: */
> + 	pollsize = FD_ALLOC_BLOCK;
> ++	if (getrlimit(RLIMIT_NOFILE, &rlim) < 0 &&
> ++	    rlim.rlim_cur != RLIM_INFINITY)
> ++		pollsize = rlim.rlim_cur;
> + 	pollarray = calloc(pollsize, sizeof(struct pollfd));
> + }
> +
> +@@ -567,9 +561,8 @@ process_pipedir(char *pipe_name)
> +
> + 	update_old_clients(namelist, j, pipe_name);
> + 	for (i=0; i < j; i++) {
> +-		if (i < FD_ALLOC_BLOCK
> +-				&& !strncmp(namelist[i]->d_name, "clnt", 4)
> +-				&& !find_client(namelist[i]->d_name, pipe_name))
> ++		if (!strncmp(namelist[i]->d_name, "clnt", 4)
> ++		    && !find_client(namelist[i]->d_name, pipe_name))
> + 			process_clnt_dir(namelist[i]->d_name, pipe_name);
> + 		free(namelist[i]);
> + 	}
> +@@ -962,12 +955,6 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
> +
> + 	printerr(1, "handling krb5 upcall (%s)\n", clp->dirname);
> +
> +-	if (tgtname) {
> +-		if (clp->servicename) {
> +-			free(clp->servicename);
> +-			clp->servicename = strdup(tgtname);
> +-		}
> +-	}
> + 	token.length = 0;
> + 	token.value = NULL;
> + 	memset(&pd, 0, sizeof(struct authgss_private_data));
> +@@ -1016,7 +1003,8 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
> + 			int success = 0;
> + 			do {
> + 				gssd_refresh_krb5_machine_credential(clp->servername,
> +-								     NULL, service);
> ++								     NULL, service,
> ++								     tgtname);
> + 				/*
> + 				 * Get a list of credential cache names and try each
> + 				 * of them until one works or we've tried them all
> +diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
> +index 60ba594..aeb8f70 100644
> +--- a/utils/gssd/krb5_util.c
> ++++ b/utils/gssd/krb5_util.c
> +@@ -774,12 +774,16 @@ gssd_search_krb5_keytab(krb5_context context, krb5_keytab kt,
> + }
> +
> + /*
> +- * Find a keytab entry to use for a given target hostname.
> ++ * Find a keytab entry to use for a given target realm.
> +  * Tries to find the most appropriate keytab to use given the
> +  * name of the host we are trying to connect with.
> ++ *
> ++ * Note: the tgtname contains a hostname in the realm that we
> ++ * are authenticating to. It may, or may not be the same as
> ++ * the server hostname.
> +  */
> + static int
> +-find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname,
> ++find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname,
> + 		  krb5_keytab_entry *kte, const char **svcnames)
> + {
> + 	krb5_error_code code;
> +@@ -795,7 +799,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *hostname,
> +
> +
> + 	/* Get full target hostname */
> +-	retval = get_full_hostname(hostname, targethostname,
> ++	retval = get_full_hostname(tgtname, targethostname,
> + 				   sizeof(targethostname));
> + 	if (retval)
> + 		goto out;
> +@@ -1128,7 +1132,7 @@ gssd_get_krb5_machine_cred_list(char ***list)
> + 		if (ple->ccname) {
> + 			/* Make sure cred is up-to-date before returning it */
> + 			retval = gssd_refresh_krb5_machine_credential(NULL, ple,
> +-				NULL);
> ++				NULL, NULL);
> + 			if (retval)
> + 				continue;
> + 			if (i + 1 > listsize) {
> +@@ -1219,7 +1223,8 @@ gssd_destroy_krb5_machine_creds(void)
> + int
> + gssd_refresh_krb5_machine_credential(char *hostname,
> + 				     struct gssd_k5_kt_princ *ple,
> +-					 char *service)
> ++					 char *service,
> ++					 char *tgtname)
> + {
> + 	krb5_error_code code = 0;
> + 	krb5_context context;
> +@@ -1258,7 +1263,10 @@ gssd_refresh_krb5_machine_credential(char *hostname,
> + 	if (ple == NULL) {
> + 		krb5_keytab_entry kte;
> +
> +-		code = find_keytab_entry(context, kt, hostname, &kte, svcnames);
> ++		if (tgtname == NULL)
> ++			tgtname = hostname;
> ++
> ++		code = find_keytab_entry(context, kt, tgtname, &kte, svcnames);
> + 		if (code) {
> + 			printerr(0, "ERROR: %s: no usable keytab entry found "
> + 				 "in keytab %s for connection with host %s\n",
> +diff --git a/utils/gssd/krb5_util.h b/utils/gssd/krb5_util.h
> +index cd6e107..9f41625 100644
> +--- a/utils/gssd/krb5_util.h
> ++++ b/utils/gssd/krb5_util.h
> +@@ -31,7 +31,8 @@ void gssd_setup_krb5_machine_gss_ccache(char *servername);
> + void gssd_destroy_krb5_machine_creds(void);
> + int  gssd_refresh_krb5_machine_credential(char *hostname,
> + 					  struct gssd_k5_kt_princ *ple,
> +-					  char *service);
> ++					  char *service,
> ++					  char *tgtname);
> + char *gssd_k5_err_msg(krb5_context context, krb5_error_code code);
> + void gssd_k5_get_default_realm(char **def_realm);
> +
> +diff --git a/utils/gssd/svcgssd_krb5.c b/utils/gssd/svcgssd_krb5.c
> +index 6c34faf..1d44d34 100644
> +--- a/utils/gssd/svcgssd_krb5.c
> ++++ b/utils/gssd/svcgssd_krb5.c
> +@@ -38,6 +38,7 @@
> +
> + #include <stdio.h>
> + #include <errno.h>
> ++#include <ctype.h>
> + #include <gssapi/gssapi.h>
> + #include <krb5.h>
> +
> +@@ -98,6 +99,12 @@ parse_enctypes(char *enctypes)
> + 	if (n == 0)
> + 		return ENOENT;
> +
> ++	/* Skip pass any non digits */
> ++	while (*enctypes && isdigit(*enctypes) == 0)
> ++		enctypes++;
> ++	if (*enctypes == '\0')
> ++		return EINVAL;
> ++
> + 	/* Allocate space for enctypes array */
> + 	if ((parsed_enctypes = (int *) calloc(n, sizeof(int))) == NULL) {
> + 		return ENOMEM;
> +diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
> +index e80efb4..9d66225 100644
> +--- a/utils/idmapd/idmapd.c
> ++++ b/utils/idmapd/idmapd.c
> +@@ -145,7 +145,6 @@ static void svrreopen(int, short, void *);
> + static int  nfsopen(struct idmap_client *);
> + static void nfscb(int, short, void *);
> + static void nfsdcb(int, short, void *);
> +-static int  validateascii(char *, u_int32_t);
> + static int  addfield(char **, ssize_t *, char *);
> + static int  getfield(char **, char *, size_t);
> +
> +@@ -642,6 +641,8 @@ out:
> + static void
> + imconv(struct idmap_client *ic, struct idmap_msg *im)
> + {
> ++	u_int32_t len;
> ++
> + 	switch (im->im_conv) {
> + 	case IDMAP_CONV_IDTONAME:
> + 		idtonameres(im);
> +@@ -652,10 +653,10 @@ imconv(struct idmap_client *ic, struct idmap_msg *im)
> + 			    im->im_id, im->im_name);
> + 		break;
> + 	case IDMAP_CONV_NAMETOID:
> +-		if (validateascii(im->im_name, sizeof(im->im_name)) == -1) {
> +-			im->im_status |= IDMAP_STATUS_INVALIDMSG;
> ++		len = strnlen(im->im_name, IDMAP_NAMESZ - 1);
> ++		/* Check for NULL termination just to be careful */
> ++		if (im->im_name[len+1] != '\0')
> + 			return;
> +-		}
> + 		nametoidres(im);
> + 		if (verbose > 1)
> + 			xlog_warn("%s %s: (%s) name \"%s\" -> id \"%d\"",
> +@@ -855,25 +856,6 @@ nametoidres(struct idmap_msg *im)
> + }
> +
> + static int
> +-validateascii(char *string, u_int32_t len)
> +-{
> +-	u_int32_t i;
> +-
> +-	for (i = 0; i < len; i++) {
> +-		if (string[i] == '\0')
> +-			break;
> +-
> +-		if (string[i] & 0x80)
> +-			return (-1);
> +-	}
> +-
> +-	if ((i >= len) || string[i] != '\0')
> +-		return (-1);
> +-
> +-	return (i + 1);
> +-}
> +-
> +-static int
> + addfield(char **bpp, ssize_t *bsizp, char *fld)
> + {
> + 	char ch, *bp = *bpp;
> +diff --git a/utils/mount/error.c b/utils/mount/error.c
> +index 83ad1d2..f8fc13f 100644
> +--- a/utils/mount/error.c
> ++++ b/utils/mount/error.c
> +@@ -225,7 +225,7 @@ void mount_error(const char *spec, const char *mount_point, int error)
> + 	case ENOENT:
> + 		if (spec)
> + 			nfs_error(_("%s: mounting %s failed, "
> +-				"reason given by server:\n  %s"),
> ++				"reason given by server: %s"),
> + 				progname, spec, strerror(error));
> + 		else
> + 			nfs_error(_("%s: mount point %s does not exist"),
> +diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> +index 9b4197b..8ee3024 100644
> +--- a/utils/mount/stropts.c
> ++++ b/utils/mount/stropts.c
> +@@ -666,6 +666,7 @@ static int nfs_try_mount_v3v2(struct nfsmount_info *mi)
> + 		case EOPNOTSUPP:
> + 		case EHOSTUNREACH:
> + 		case ETIMEDOUT:
> ++		case EACCES:
> + 			continue;
> + 		default:
> + 			goto out;
> +@@ -761,6 +762,7 @@ static int nfs_try_mount_v4(struct nfsmount_info *mi)
> + 		case ECONNREFUSED:
> + 		case EHOSTUNREACH:
> + 		case ETIMEDOUT:
> ++		case EACCES:
> + 			continue;
> + 		default:
> + 			goto out;
> +diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c
> +index 508040a..330cab5 100644
> +--- a/utils/mountd/auth.c
> ++++ b/utils/mountd/auth.c
> +@@ -10,10 +10,12 @@
> + #include <config.h>
> + #endif
> +
> ++#include <sys/types.h>
> + #include <sys/stat.h>
> + #include <netinet/in.h>
> + #include <arpa/inet.h>
> + #include <errno.h>
> ++#include <fcntl.h>
> + #include <unistd.h>
> +
> + #include "sockaddr.h"
> +@@ -21,7 +23,6 @@
> + #include "nfslib.h"
> + #include "exportfs.h"
> + #include "mountd.h"
> +-#include "xmalloc.h"
> + #include "v4root.h"
> +
> + enum auth_error
> +diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
> +index e950ec6..45012be 100644
> +--- a/utils/mountd/cache.c
> ++++ b/utils/mountd/cache.c
> +@@ -29,7 +29,6 @@
> + #include "nfslib.h"
> + #include "exportfs.h"
> + #include "mountd.h"
> +-#include "xmalloc.h"
> + #include "fsloc.h"
> + #include "pseudoflavors.h"
> +
> +@@ -109,12 +108,10 @@ static void auth_unix_ip(FILE *f)
> + 		struct addrinfo *ai = NULL;
> +
> + 		ai = client_resolve(tmp->ai_addr);
> +-		if (ai == NULL)
> +-			goto out;
> +-		client = client_compose(ai);
> +-		freeaddrinfo(ai);
> +-		if (!client)
> +-			goto out;
> ++		if (ai) {
> ++			client = client_compose(ai);
> ++			freeaddrinfo(ai);
> ++		}
> + 	}
> + 	qword_print(f, "nfsd");
> + 	qword_print(f, ipaddr);
> +@@ -127,7 +124,6 @@ static void auth_unix_ip(FILE *f)
> + 	xlog(D_CALL, "auth_unix_ip: client %p '%s'", client, client?client: "DEFAULT");
> +
> + 	free(client);
> +-out:
> + 	freeaddrinfo(tmp);
> +
> + }
> +@@ -347,6 +343,30 @@ static char *next_mnt(void **v, char *p)
> + 	return me->mnt_dir;
> + }
> +
> ++static int is_subdirectory(char *child, char *parent)
> ++{
> ++	size_t l = strlen(parent);
> ++
> ++	if (strcmp(parent, "/") == 0)
> ++		return 1;
> ++
> ++	return strcmp(child, parent) == 0
> ++		|| (strncmp(child, parent, l) == 0 && child[l] == '/');
> ++}
> ++
> ++static int path_matches(nfs_export *exp, char *path)
> ++{
> ++	if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)
> ++		return is_subdirectory(path, exp->m_export.e_path);
> ++	return strcmp(path, exp->m_export.e_path) == 0;
> ++}
> ++
> ++static int
> ++export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
> ++{
> ++	return path_matches(exp, path) && client_matches(exp, dom, ai);
> ++}
> ++
> + /* True iff e1 is a child of e2 and e2 has crossmnt set: */
> + static bool subexport(struct exportent *e1, struct exportent *e2)
> + {
> +@@ -354,8 +374,7 @@ static bool subexport(struct exportent *e1, struct exportent *e2)
> + 	size_t l2 = strlen(p2);
> +
> + 	return e2->e_flags & NFSEXP_CROSSMOUNT
> +-	       && strncmp(p1, p2, l2) == 0
> +-	       && p1[l2] == '/';
> ++		&& is_subdirectory(p1, p2);
> + }
> +
> + struct parsed_fsid {
> +@@ -756,27 +775,6 @@ static int dump_to_cache(FILE *f, char *domain, char *path, struct exportent *ex
> + 	return qword_eol(f);
> + }
> +
> +-static int is_subdirectory(char *child, char *parent)
> +-{
> +-	size_t l = strlen(parent);
> +-
> +-	return strcmp(child, parent) == 0
> +-		|| (strncmp(child, parent, l) == 0 && child[l] == '/');
> +-}
> +-
> +-static int path_matches(nfs_export *exp, char *path)
> +-{
> +-	if (exp->m_export.e_flags & NFSEXP_CROSSMOUNT)
> +-		return is_subdirectory(path, exp->m_export.e_path);
> +-	return strcmp(path, exp->m_export.e_path) == 0;
> +-}
> +-
> +-static int
> +-export_matches(nfs_export *exp, char *dom, char *path, struct addrinfo *ai)
> +-{
> +-	return path_matches(exp, path) && client_matches(exp, dom, ai);
> +-}
> +-
> + static nfs_export *
> + lookup_export(char *dom, char *path, struct addrinfo *ai)
> + {
> +@@ -830,6 +828,7 @@ lookup_export(char *dom, char *path, struct addrinfo *ai)
> +
> + #ifdef HAVE_NFS_PLUGIN_H
> + #include <dlfcn.h>
> ++#include <link.h>
> + #include <nfs-plugin.h>
> +
> + /*
> +@@ -1094,6 +1093,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
> + 		struct addrinfo *ai)
> + {
> + 	struct exportent *exp;
> ++	struct link_map *map;
> + 	void *handle;
> +
> + 	handle = dlopen("libnfsjunct.so", RTLD_NOW);
> +@@ -1101,6 +1101,11 @@ static struct exportent *lookup_junction(char *dom, const char *pathname,
> + 		xlog(D_GENERAL, "%s: dlopen: %s", __func__, dlerror());
> + 		return NULL;
> + 	}
> ++
> ++	if (dlinfo(handle, RTLD_DI_LINKMAP, &map) == 0)
> ++		xlog(D_GENERAL, "%s: loaded plug-in %s",
> ++			__func__, map->l_name);
> ++
> + 	(void)dlerror();	/* Clear any error */
> +
> + 	exp = invoke_junction_ops(handle, dom, pathname, ai);
> +diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c
> +index 9801b9c..4334340 100644
> +--- a/utils/nfsdcltrack/nfsdcltrack.c
> ++++ b/utils/nfsdcltrack/nfsdcltrack.c
> +@@ -379,6 +379,17 @@ cltrack_legacy_gracedone(void)
> + 	while ((entry = readdir(v4recovery))) {
> + 		int len;
> +
> ++		/* skip "." and ".." */
> ++		if (entry->d_name[0] == '.') {
> ++			switch (entry->d_name[1]) {
> ++			case '\0':
> ++				continue;
> ++			case '.':
> ++				if (entry->d_name[2] == '\0')
> ++					continue;
> ++			}
> ++		}
> ++
> + 		/* borrow the clientid blob for this */
> + 		len = snprintf((char *)blob, sizeof(blob), "%s/%s", dirname,
> + 				entry->d_name);
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.3.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.7.bb
> similarity index 63%
> rename from meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.3.bb
> rename to meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.7.bb
> index 84b8e76..0fa7989 100644
> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.3.bb
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.7.bb
> @@ -4,24 +4,26 @@ NFS server and related tools."
>   HOMEPAGE = "http://nfs.sourceforge.net/"
>   SECTION = "console/network"
>
> -LICENSE = "GPLv2+"
> -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
> +LICENSE = "MIT & GPLv2+ & BSD"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
>
>   # util-linux for libblkid
> -DEPENDS = "libcap libnfsidmap libevent util-linux tcp-wrappers"
> +DEPENDS = "libcap libnfsidmap libevent util-linux tcp-wrappers sqlite3"
>   RDEPENDS_${PN} = "rpcbind"
>   RRECOMMENDS_${PN} = "kernel-module-nfsd"
>
> -PR = "r5"
> -
> -SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.bz2 \
> +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.bz2 \
> +           file://nfs-utils.1.2.8.rc2.patch \
>              file://nfs-utils-1.0.6-uclibc.patch \
>              file://nfs-utils-1.2.3-uclibc-libio.h.patch \
> -           file://nfs-utils-nfsctl-x32-fix.patch \
> +           file://nfs-utils-1.2.1-exp-subtree-warn-off.patch \
> +           file://nfs-utils-1.2.3-sm-notify-res_init.patch \
> +           file://nfs-utils-1.2.5-idmap-errmsg.patch \
> +           file://nfs-utils-1.2.1-statdpath-man.patch \
>              file://nfsserver"
>
> -SRC_URI[md5sum] = "1131dc5f27c4f3905a6e7ee0d594fd4d"
> -SRC_URI[sha256sum] = "5575ece941097cbfa67fbe0d220dfa11b73f5e6d991e7939c9339bd72259ff19"
> +SRC_URI[md5sum] = "3b5ca797197765dc0c3a4122720c7716"
> +SRC_URI[sha256sum] = "7ef8e0a8b22cd7ff33f3afd28e770d45643fae303468a180640c2967833fe75e"
>
>   PARALLEL_MAKE = ""
>
> @@ -38,11 +40,15 @@ inherit autotools update-rc.d
>
>   # --enable-uuid is need for cross-compiling
>   EXTRA_OECONF = "--with-statduser=nobody \
> -                --enable-nfsv41 \
> +                --enable-mountconfig \
> +                --enable-libmount-mount \
> +                --disable-nfsv41 \
>                   --enable-uuid \
>                   --disable-gss \
>                   --disable-tirpc \
> -                --with-statedir=/var/lib/nfs"
> +                --disable-nfsdcltrack \
> +                --with-statdpath=/var/lib/nfs/statd \
> +               "
>
>   INHIBIT_AUTO_STAGE = "1"
>
>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/4] nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2
  2013-01-21  4:08   ` Saul Wold
@ 2013-01-21 18:43     ` Khem Raj
  0 siblings, 0 replies; 22+ messages in thread
From: Khem Raj @ 2013-01-21 18:43 UTC (permalink / raw)
  To: Saul Wold; +Cc: Khem Raj, openembedded-core

On Sun, Jan 20, 2013 at 8:08 PM, Saul Wold <sgw@linux.intel.com> wrote:
> On 01/19/2013 02:40 PM, Khem Raj wrote:
>>
>> From: Khem Raj <kraj@juniper.net>
>>
>> Disable nfsv4l since it needs LVM2 which
>> is not available in OE-Core
>>
>> Disable nfsdcltrack since its configure time check
>> for sqlite3 is not cross compiling safe
>>
>> It can support ipv6 but thats disabled since
>> we disable libtirpc which is needed for ipv6
>> support in nfs-utils
>>
>> Patches imported from fedora to take us to 1.2.8-rc2
>>
>> Signed-off-by: Khem Raj <kraj@juniper.net>
>> ---
>>   .../nfs-utils/nfs-utils-1.0.6-uclibc.patch         |   37 +-
>>   .../nfs-utils-1.2.1-exp-subtree-warn-off.patch     |   12 +
>>   .../nfs-utils/nfs-utils-1.2.1-statdpath-man.patch  |   58 +++
>>   .../nfs-utils-1.2.3-sm-notify-res_init.patch       |   21 +
>>   .../nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch   |   12 +
>>   .../nfs-utils/nfs-utils-nfsctl-x32-fix.patch       |   30 --
>>   .../nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch  |  535
>> ++++++++++++++++++++
>>   .../nfs-utils/nfs-utils.1.2.8.rc2.patch.1          |  535
>> ++++++++++++++++++++
>>   .../{nfs-utils_1.2.3.bb => nfs-utils_1.2.7.bb}     |   28 +-
>>   9 files changed, 1210 insertions(+), 58 deletions(-)
>>   create mode 100644
>> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-exp-subtree-warn-off.patch
>>   create mode 100644
>> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.1-statdpath-man.patch
>>   create mode 100644
>> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.3-sm-notify-res_init.patch
>>   create mode 100644
>> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-1.2.5-idmap-errmsg.patch
>>   delete mode 100644
>> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-nfsctl-x32-fix.patch
>>   create mode 100644
>> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch
>>   create mode 100644
>> meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.1.2.8.rc2.patch.1
>>   rename meta/recipes-connectivity/nfs-utils/{nfs-utils_1.2.3.bb =>
>> nfs-utils_1.2.7.bb} (63%)
>>
>
> Some of these patches do not have the proper Signed-off-by: and
> Upstream-Status: tags.
>

Ignore this one, I have since updated to later RC3 and will do cleanups
and resend



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-19 22:40 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
@ 2013-01-22 15:41   ` Enrico Scholz
  2013-01-22 16:33     ` Khem Raj
  2013-01-22 17:34     ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
  2013-01-22 20:44   ` Darren Hart
  2013-02-04 20:13   ` McClintock Matthew-B29882
  2 siblings, 2 replies; 22+ messages in thread
From: Enrico Scholz @ 2013-01-22 15:41 UTC (permalink / raw)
  To: openembedded-core

Khem Raj <raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> +KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}"
> ...
> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"

that's bad... gold linker has serious problems to compile stuff like
kernel or bootloaders and setting 'KERNEL_LDSUFFIX = .bfd' was a good
way to workaround these problems.



Enrico



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-22 15:41   ` Enrico Scholz
@ 2013-01-22 16:33     ` Khem Raj
  2013-01-24 12:13       ` Changing between gold and bfd linker (was: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC) Enrico Scholz
  2013-01-22 17:34     ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
  1 sibling, 1 reply; 22+ messages in thread
From: Khem Raj @ 2013-01-22 16:33 UTC (permalink / raw)
  To: Enrico Scholz; +Cc: openembedded-core

On 1/22/13 7:41 AM, Enrico Scholz wrote:
> Khem Raj <raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> +KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}"
>> ...
>> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
>
> that's bad... gold linker has serious problems to compile stuff like
> kernel or bootloaders and setting 'KERNEL_LDSUFFIX = .bfd' was a good
> way to workaround these problems.
>

This was not the intended use of KERNEL_LD IMO.
There are is than kernel that does not go well when using gold, I think 
the right approach would be to check ld-is-gold being present in 
DISTRO_FEATURES and appending '.bfd' to LD variable like other recipes do

>
>
> Enrico
>




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-22 15:41   ` Enrico Scholz
  2013-01-22 16:33     ` Khem Raj
@ 2013-01-22 17:34     ` Khem Raj
  1 sibling, 0 replies; 22+ messages in thread
From: Khem Raj @ 2013-01-22 17:34 UTC (permalink / raw)
  To: Enrico Scholz; +Cc: openembedded-core

On 1/22/13 7:41 AM, Enrico Scholz wrote:
> Khem Raj <raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> +KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}"
>> ...
>> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
>
> that's bad... gold linker has serious problems to compile stuff like
> kernel or bootloaders and setting 'KERNEL_LDSUFFIX = .bfd' was a good
> way to workaround these problems.
>

something like this patch here

http://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/misc&id=70b3efc5fc4b31f8ad17c23e77e80cb6abcac258

should work for you. Can you try it out ?

>
>
> Enrico
>




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-19 22:40 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
  2013-01-22 15:41   ` Enrico Scholz
@ 2013-01-22 20:44   ` Darren Hart
  2013-01-22 21:44     ` Khem Raj
  2013-01-23  8:46     ` Andrea Adami
  2013-02-04 20:13   ` McClintock Matthew-B29882
  2 siblings, 2 replies; 22+ messages in thread
From: Darren Hart @ 2013-01-22 20:44 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core



On 01/19/2013 02:40 PM, Khem Raj wrote:
> kernel compiler is not special and we currently have it so
> we want to pass -march and -mtune options as CFLAGS to kernel
> build so that compiler picks the right subarch flags when
> compiling assembly files in particular. Otherwise defaults
> are chosen which may not be right in many case e.g. when
> compiling kernel for collie machine we should use arch=armv4
> but it uses toolchain/as defaults which is armv5te
> 
> in some case e.g. thumb1 we know that kernel can not be compiled
> in thumb1 mode so we can provide that information e.g. -marm
> option through KERNEL_HOST_CC_ARCH variable as we do now
> 

Makes me nervous... only because I'm not well versed enough across the
architectures to catch some little gotchas. How much testing has this
seen? Which architectures?

--
Darren

> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/classes/kernel-arch.bbclass |   13 +++++++++++++
>  meta/classes/kernel.bbclass      |   16 +---------------
>  meta/classes/module-base.bbclass |   16 ----------------
>  3 files changed, 14 insertions(+), 31 deletions(-)
> 
> diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
> index b3b78b6..a51e82b 100644
> --- a/meta/classes/kernel-arch.bbclass
> +++ b/meta/classes/kernel-arch.bbclass
> @@ -43,3 +43,16 @@ def map_uboot_arch(a, d):
>  
>  export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', True), d)}"
>  
> +# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
> +# specific options necessary for building the kernel and modules.
> +TARGET_CC_KERNEL_ARCH ?= ""
> +HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
> +TARGET_LD_KERNEL_ARCH ?= ""
> +HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
> +TARGET_AR_KERNEL_ARCH ?= ""
> +HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
> +
> +KERNEL_CC = "${CC} ${HOST_CC_KERNEL_ARCH}"
> +KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}"
> +KERNEL_AR = "${AR} ${HOST_AR_KERNEL_ARCH}"
> +
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index d459569..e2a582b 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -1,7 +1,7 @@
>  inherit linux-kernel-base module_strip
>  
>  PROVIDES += "virtual/kernel"
> -DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
> +DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native"
>  
>  # we include gcc above, we dont need virtual/libc
>  INHIBIT_DEFAULT_DEPS = "1"
> @@ -37,20 +37,6 @@ KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.
>  
>  KERNEL_RELEASE ?= "${KERNEL_VERSION}"
>  
> -KERNEL_CCSUFFIX ?= ""
> -KERNEL_LDSUFFIX ?= ""
> -
> -# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
> -# specific options necessary for building the kernel and modules.
> -#FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
> -TARGET_CC_KERNEL_ARCH ?= ""
> -HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
> -TARGET_LD_KERNEL_ARCH ?= ""
> -HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
> -
> -KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
> -
>  # Where built kernel lies in the kernel tree
>  KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
>  KERNEL_IMAGEDEST = "boot"
> diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
> index 210c47c..cfee50a 100644
> --- a/meta/classes/module-base.bbclass
> +++ b/meta/classes/module-base.bbclass
> @@ -7,22 +7,6 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
>  
>  export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
>  KERNEL_OBJECT_SUFFIX = ".ko"
> -KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}"
> -KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}"
> -KERNEL_ARSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-arsuffix')}"
> -
> -# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
> -# specific options necessary for building the kernel and modules.
> -TARGET_CC_KERNEL_ARCH ?= ""
> -HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
> -TARGET_LD_KERNEL_ARCH ?= ""
> -HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
> -TARGET_AR_KERNEL_ARCH ?= ""
> -HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
> -
> -KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
> -KERNEL_AR = "${HOST_PREFIX}ar${KERNEL_ARSUFFIX} ${HOST_AR_KERNEL_ARCH}"
>  
>  # kernel modules are generally machine specific
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-22 20:44   ` Darren Hart
@ 2013-01-22 21:44     ` Khem Raj
  2013-01-22 21:50       ` Darren Hart
  2013-01-23  8:46     ` Andrea Adami
  1 sibling, 1 reply; 22+ messages in thread
From: Khem Raj @ 2013-01-22 21:44 UTC (permalink / raw)
  To: Darren Hart; +Cc: openembedded-core

On Tue, Jan 22, 2013 at 12:44 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>
> Makes me nervous... only because I'm not well versed enough across the
> architectures to catch some little gotchas. How much testing has this
> seen? Which architectures?

little but then I did not propose it for inclusion into master yet so
why worry ?



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-22 21:44     ` Khem Raj
@ 2013-01-22 21:50       ` Darren Hart
  2013-01-22 22:12         ` Khem Raj
  0 siblings, 1 reply; 22+ messages in thread
From: Darren Hart @ 2013-01-22 21:50 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core



On 01/22/2013 01:44 PM, Khem Raj wrote:
> On Tue, Jan 22, 2013 at 12:44 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>>
>> Makes me nervous... only because I'm not well versed enough across the
>> architectures to catch some little gotchas. How much testing has this
>> seen? Which architectures?
> 
> little but then I did not propose it for inclusion into master yet so
> why worry ?

I assumed that would be the target eventually - is that not the case?


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-22 21:50       ` Darren Hart
@ 2013-01-22 22:12         ` Khem Raj
  2013-01-22 22:19           ` Darren Hart
  0 siblings, 1 reply; 22+ messages in thread
From: Khem Raj @ 2013-01-22 22:12 UTC (permalink / raw)
  To: Darren Hart; +Cc: openembedded-core

On Tue, Jan 22, 2013 at 1:50 PM, Darren Hart <dvhart@linux.intel.com> wrote:
> I assumed that would be the target eventually - is that not the case?

yes when we have tested it
However, I don’t see any other better way of coping with the case where we
would like to use gold as default linker distrowide. One could cook up
a patch for kernel
to demand ld.bfd always like I did for uboot but we have way too many kernels
to patch. I am open for other suggestions.



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-22 22:12         ` Khem Raj
@ 2013-01-22 22:19           ` Darren Hart
  0 siblings, 0 replies; 22+ messages in thread
From: Darren Hart @ 2013-01-22 22:19 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core



On 01/22/2013 02:12 PM, Khem Raj wrote:
> On Tue, Jan 22, 2013 at 1:50 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>> I assumed that would be the target eventually - is that not the case?
> 
> yes when we have tested it
> However, I don’t see any other better way of coping with the case where we
> would like to use gold as default linker distrowide. One could cook up
> a patch for kernel
> to demand ld.bfd always like I did for uboot but we have way too many kernels
> to patch. I am open for other suggestions.
> 

I don't object to the approach, I was just wanting to boost my
confidence level with testing results. Sounds like that's coming, and I
should probably do some runs myself.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-22 20:44   ` Darren Hart
  2013-01-22 21:44     ` Khem Raj
@ 2013-01-23  8:46     ` Andrea Adami
  1 sibling, 0 replies; 22+ messages in thread
From: Andrea Adami @ 2013-01-23  8:46 UTC (permalink / raw)
  To: openembedded-core

On Tue, Jan 22, 2013 at 9:44 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>
>
> On 01/19/2013 02:40 PM, Khem Raj wrote:
>> kernel compiler is not special and we currently have it so
>> we want to pass -march and -mtune options as CFLAGS to kernel
>> build so that compiler picks the right subarch flags when
>> compiling assembly files in particular. Otherwise defaults
>> are chosen which may not be right in many case e.g. when
>> compiling kernel for collie machine we should use arch=armv4
>> but it uses toolchain/as defaults which is armv5te
>>
>> in some case e.g. thumb1 we know that kernel can not be compiled
>> in thumb1 mode so we can provide that information e.g. -marm
>> option through KERNEL_HOST_CC_ARCH variable as we do now
>>
>
> Makes me nervous... only because I'm not well versed enough across the
> architectures to catch some little gotchas. How much testing has this
> seen? Which architectures?
>

I've built and booted kernels for strongarm/armv4) and for pxa/armv5te.


Andrea



> --
> Darren
>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  meta/classes/kernel-arch.bbclass |   13 +++++++++++++
>>  meta/classes/kernel.bbclass      |   16 +---------------
>>  meta/classes/module-base.bbclass |   16 ----------------
>>  3 files changed, 14 insertions(+), 31 deletions(-)
>>
>> diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
>> index b3b78b6..a51e82b 100644
>> --- a/meta/classes/kernel-arch.bbclass
>> +++ b/meta/classes/kernel-arch.bbclass
>> @@ -43,3 +43,16 @@ def map_uboot_arch(a, d):
>>
>>  export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', True), d)}"
>>
>> +# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
>> +# specific options necessary for building the kernel and modules.
>> +TARGET_CC_KERNEL_ARCH ?= ""
>> +HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
>> +TARGET_LD_KERNEL_ARCH ?= ""
>> +HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
>> +TARGET_AR_KERNEL_ARCH ?= ""
>> +HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
>> +
>> +KERNEL_CC = "${CC} ${HOST_CC_KERNEL_ARCH}"
>> +KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}"
>> +KERNEL_AR = "${AR} ${HOST_AR_KERNEL_ARCH}"
>> +
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index d459569..e2a582b 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -1,7 +1,7 @@
>>  inherit linux-kernel-base module_strip
>>
>>  PROVIDES += "virtual/kernel"
>> -DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
>> +DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native"
>>
>>  # we include gcc above, we dont need virtual/libc
>>  INHIBIT_DEFAULT_DEPS = "1"
>> @@ -37,20 +37,6 @@ KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.
>>
>>  KERNEL_RELEASE ?= "${KERNEL_VERSION}"
>>
>> -KERNEL_CCSUFFIX ?= ""
>> -KERNEL_LDSUFFIX ?= ""
>> -
>> -# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
>> -# specific options necessary for building the kernel and modules.
>> -#FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
>> -TARGET_CC_KERNEL_ARCH ?= ""
>> -HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
>> -TARGET_LD_KERNEL_ARCH ?= ""
>> -HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
>> -
>> -KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
>> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
>> -
>>  # Where built kernel lies in the kernel tree
>>  KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
>>  KERNEL_IMAGEDEST = "boot"
>> diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
>> index 210c47c..cfee50a 100644
>> --- a/meta/classes/module-base.bbclass
>> +++ b/meta/classes/module-base.bbclass
>> @@ -7,22 +7,6 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
>>
>>  export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
>>  KERNEL_OBJECT_SUFFIX = ".ko"
>> -KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}"
>> -KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}"
>> -KERNEL_ARSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-arsuffix')}"
>> -
>> -# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
>> -# specific options necessary for building the kernel and modules.
>> -TARGET_CC_KERNEL_ARCH ?= ""
>> -HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
>> -TARGET_LD_KERNEL_ARCH ?= ""
>> -HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
>> -TARGET_AR_KERNEL_ARCH ?= ""
>> -HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
>> -
>> -KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
>> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
>> -KERNEL_AR = "${HOST_PREFIX}ar${KERNEL_ARSUFFIX} ${HOST_AR_KERNEL_ARCH}"
>>
>>  # kernel modules are generally machine specific
>>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>>
>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Technical Lead - Linux Kernel
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Changing between gold and bfd linker (was: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC)
  2013-01-22 16:33     ` Khem Raj
@ 2013-01-24 12:13       ` Enrico Scholz
  0 siblings, 0 replies; 22+ messages in thread
From: Enrico Scholz @ 2013-01-24 12:13 UTC (permalink / raw)
  To: openembedded-core

Khem Raj <raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

>>> +KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}"
>>> ...
>>> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
>>
>> that's bad... gold linker has serious problems to compile stuff like
>> kernel or bootloaders and setting 'KERNEL_LDSUFFIX = .bfd' was a good
>> way to workaround these problems.
>>
>
> This was not the intended use of KERNEL_LD IMO.

ok; then I abused it for this purpose and stuff failed more or less
silently with recent oe ;)

Me wonders whether we should implement a more generic way to select
between .bfd and .gold linker.  Overriding LD works well when LD is used
by the build system, but when it is called through gcc -> collect there
is no way to select the linker.

For grub2 I use

------
PATH_prepend = "${S}/.bin:"
CC_prepend = "env COMPILER_PATH=${S}/.bin/gcc "

do_configure_prepend() {
    mkdir -p .bin/gcc
    { echo "#!/bin/sh"
      echo 'exec ${TARGET_PREFIX}ld.bfd "$@"'
    } > .bin/${TARGET_PREFIX}ld
    chmod +x .bin/${TARGET_PREFIX}ld
    ln -s ../${TARGET_PREFIX}ld .bin/gcc/ld
}
------

which might go into a more general .bbclass.

Modifying binutils or gcc to select the wanted linker is probably the
2nd best solution (after fixing gold linker). E.g. for binutils, the
'arm-linux-gnueabi-ld' binary (or however it is called) which is a copy
of .bfd or .gold atm can be replaced by a oe specific program which
calls the corresponding linker depending on an environment variable.

Changing gcc seems to be more difficultly because name of ld is determined
at multiple locations.

So we have to following options:

1. keep things as is; when problems with gold arise[1], people have to turn
   it of globally

2. create a 'custom-ld.bbclass' which is inherited on demand

3. create custom 'ld' program evaluating '${OE_LDSUFFIX}' which is set
   on demand

4. patch gcc/collect to call a linker specified by environment


I favor 3; what do you think?



Enrico

Footnotes: 
[1]  I am aware of
     * kernel (--> '--march=all' object file mismatch)
     * barebox (--> optimizing away constructors with '--gc-shared')
     * grub2 (--> disfunctional with gold; no further details)

-- 
SIGMA Chemnitz GmbH       Registergericht:   Amtsgericht Chemnitz HRB 1750
Am Erlenwald 13           Geschaeftsfuehrer: Grit Freitag, Frank Pyritz
09128 Chemnitz



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-01-19 22:40 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
  2013-01-22 15:41   ` Enrico Scholz
  2013-01-22 20:44   ` Darren Hart
@ 2013-02-04 20:13   ` McClintock Matthew-B29882
  2013-02-04 22:51     ` Khem Raj
  2 siblings, 1 reply; 22+ messages in thread
From: McClintock Matthew-B29882 @ 2013-02-04 20:13 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On Sat, Jan 19, 2013 at 4:40 PM, Khem Raj <raj.khem@gmail.com> wrote:
> kernel compiler is not special and we currently have it so
> we want to pass -march and -mtune options as CFLAGS to kernel
> build so that compiler picks the right subarch flags when
> compiling assembly files in particular. Otherwise defaults
> are chosen which may not be right in many case e.g. when
> compiling kernel for collie machine we should use arch=armv4
> but it uses toolchain/as defaults which is armv5te
>
> in some case e.g. thumb1 we know that kernel can not be compiled
> in thumb1 mode so we can provide that information e.g. -marm
> option through KERNEL_HOST_CC_ARCH variable as we do now
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/classes/kernel-arch.bbclass |   13 +++++++++++++
>  meta/classes/kernel.bbclass      |   16 +---------------
>  meta/classes/module-base.bbclass |   16 ----------------
>  3 files changed, 14 insertions(+), 31 deletions(-)
>
> diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
> index b3b78b6..a51e82b 100644
> --- a/meta/classes/kernel-arch.bbclass
> +++ b/meta/classes/kernel-arch.bbclass
> @@ -43,3 +43,16 @@ def map_uboot_arch(a, d):
>
>  export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', True), d)}"
>
> +# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
> +# specific options necessary for building the kernel and modules.
> +TARGET_CC_KERNEL_ARCH ?= ""
> +HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
> +TARGET_LD_KERNEL_ARCH ?= ""
> +HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
> +TARGET_AR_KERNEL_ARCH ?= ""
> +HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
> +
> +KERNEL_CC = "${CC} ${HOST_CC_KERNEL_ARCH}"

Why change to ${CC} from "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}?

It breaks some kernel builds we have...

-M



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-02-04 20:13   ` McClintock Matthew-B29882
@ 2013-02-04 22:51     ` Khem Raj
  2013-02-04 23:56       ` McClintock Matthew-B29882
  0 siblings, 1 reply; 22+ messages in thread
From: Khem Raj @ 2013-02-04 22:51 UTC (permalink / raw)
  To: McClintock Matthew-B29882; +Cc: openembedded-core

On Mon, Feb 4, 2013 at 12:13 PM, McClintock Matthew-B29882
<B29882@freescale.com> wrote:
>> +
>> +KERNEL_CC = "${CC} ${HOST_CC_KERNEL_ARCH}"
>
> Why change to ${CC} from "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}?
>
> It breaks some kernel builds we have...

you did not tell what exactly breaks.



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
  2013-02-04 22:51     ` Khem Raj
@ 2013-02-04 23:56       ` McClintock Matthew-B29882
  0 siblings, 0 replies; 22+ messages in thread
From: McClintock Matthew-B29882 @ 2013-02-04 23:56 UTC (permalink / raw)
  To: Khem Raj; +Cc: McClintock Matthew-B29882, openembedded-core

On Mon, Feb 4, 2013 at 4:51 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Mon, Feb 4, 2013 at 12:13 PM, McClintock Matthew-B29882
> <B29882@freescale.com> wrote:
>>> +
>>> +KERNEL_CC = "${CC} ${HOST_CC_KERNEL_ARCH}"
>>
>> Why change to ${CC} from "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}?
>>
>> It breaks some kernel builds we have...
>
> you did not tell what exactly breaks.

Shame on me. Our kernel gets built wrong if we pass the extra -march
or -mtune to the compiler during the kernel build. It might be
exposing another issue but not sure exactly. I need to dig up a log so
I can send that over later. Here was my fix:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=mattsm/master&id=f008446117106831585ed371453d1f052cdfd9eb

-M



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-02-05  0:58 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-19 22:39 [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Khem Raj
2013-01-19 22:40 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
2013-01-22 15:41   ` Enrico Scholz
2013-01-22 16:33     ` Khem Raj
2013-01-24 12:13       ` Changing between gold and bfd linker (was: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC) Enrico Scholz
2013-01-22 17:34     ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
2013-01-22 20:44   ` Darren Hart
2013-01-22 21:44     ` Khem Raj
2013-01-22 21:50       ` Darren Hart
2013-01-22 22:12         ` Khem Raj
2013-01-22 22:19           ` Darren Hart
2013-01-23  8:46     ` Andrea Adami
2013-02-04 20:13   ` McClintock Matthew-B29882
2013-02-04 22:51     ` Khem Raj
2013-02-04 23:56       ` McClintock Matthew-B29882
2013-01-19 22:40 ` [PATCH 2/4] nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2 Khem Raj
2013-01-21  4:08   ` Saul Wold
2013-01-21 18:43     ` Khem Raj
2013-01-19 22:40 ` [PATCH 3/4] consolekit_0.4.5.bb: Package unpackaged systemd files Khem Raj
2013-01-19 22:40 ` [PATCH 4/4] boost: Upgrade 1.51 -> 1.52 Khem Raj
2013-01-19 23:05 ` [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Otavio Salvador
2013-01-20  3:38   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.