Squashed 'yocto-poky/' content from commit ea562de

git-subtree-dir: yocto-poky
git-subtree-split: ea562de57590c966cd5a75fda8defecd397e6436
diff --git a/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch b/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
new file mode 100644
index 0000000..53ae28b
--- /dev/null
+++ b/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
@@ -0,0 +1,57 @@
+From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 16:35:30 -0700
+Subject: [PATCH] remove glibc assumption
+
+glibc time.h header has an undocumented __isleap macro
+that we are using anf musl is missing it.
+Since it is undocumented & does not appear
+on any other libc, stop using it and just define the macro in
+locally  instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ parsetime.y | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/parsetime.y b/parsetime.y
+index 7005e88..324e6d3 100644
+--- a/parsetime.y
++++ b/parsetime.y
+@@ -8,6 +8,9 @@
+ 
+ #define YYDEBUG 1
+ 
++#define is_leap_year(y) \
++    ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
++
+ struct tm exectm;
+ static int isgmt;
+ static int yearspec;
+@@ -217,8 +220,8 @@ date            : month_name day_number
+ 				 mnum == 12) && dnum > 31)
+ 			    || ((mnum ==  4 || mnum ==  6 || mnum ==  9 ||
+ 			         mnum == 11) && dnum > 30)
+-			    || (mnum ==  2 && dnum > 29 &&  __isleap(ynum+1900))
+-			    || (mnum ==  2 && dnum > 28 && !__isleap(ynum+1900))
++			    || (mnum ==  2 && dnum > 29 &&  is_leap_year(ynum+1900))
++			    || (mnum ==  2 && dnum > 28 && !is_leap_year(ynum+1900))
+ 			   )
+ 			{
+ 			    yyerror("Error in day of month");
+@@ -261,8 +264,8 @@ date            : month_name day_number
+ 				 mnum == 12) && dnum > 31)
+ 			    || ((mnum ==  4 || mnum ==  6 || mnum ==  9 ||
+ 			         mnum == 11) && dnum > 30)
+-			    || (mnum ==  2 && dnum > 29 &&  __isleap(ynum+1900))
+-			    || (mnum ==  2 && dnum > 28 && !__isleap(ynum+1900))
++			    || (mnum ==  2 && dnum > 29 &&  is_leap_year(ynum+1900))
++			    || (mnum ==  2 && dnum > 28 && !is_leap_year(ynum+1900))
+ 			   )
+ 			{
+ 			    yyerror("Error in day of month");
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/at/at/atd.init b/meta/recipes-extended/at/at/atd.init
new file mode 100644
index 0000000..eca379b
--- /dev/null
+++ b/meta/recipes-extended/at/at/atd.init
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Starts at daemon
+#
+
+umask 077
+
+# Source function library.
+. /etc/init.d/functions
+
+start() {
+	echo -n "Starting atd: "
+	start-stop-daemon --start --quiet --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
+	echo "OK"
+}
+stop() {
+	echo -n "Stopping atd: "
+	start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
+	echo "OK"
+}
+restart() {
+	stop
+	start
+}
+
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  restart|reload)
+	restart
+	;;
+  status)
+	status /usr/sbin/atd
+	;;
+  *)
+	echo $"Usage: $0 {start|stop|restart|status}"
+	exit 1
+esac
+
+exit $?
+
diff --git a/meta/recipes-extended/at/at/atd.service b/meta/recipes-extended/at/at/atd.service
new file mode 100644
index 0000000..6dc8445
--- /dev/null
+++ b/meta/recipes-extended/at/at/atd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Job spooling tools
+After=syslog.target
+
+[Service]
+ExecStart=@SBINDIR@/atd -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/at/at/configure-add-enable-pam.patch b/meta/recipes-extended/at/at/configure-add-enable-pam.patch
new file mode 100644
index 0000000..1e5efef
--- /dev/null
+++ b/meta/recipes-extended/at/at/configure-add-enable-pam.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+--- at-3.1.12/configure.ac	2011-06-23 14:51:03.653572945 +0800
++++ at-3.1.12/configure.ac.new	2011-06-27 16:12:14.903572945 +0800
+@@ -81,10 +81,18 @@
+ AC_FUNC_VPRINTF
+ AC_FUNC_GETLOADAVG
+ AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid)
++
++AC_ARG_WITH([pam],
++  [AS_HELP_STRING([--without-pam], [without PAM support])])
++
++if test "x$with_pam" != xno; then
+ AC_CHECK_HEADERS(security/pam_appl.h, [
+   PAMLIB="-lpam"
+-  AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])
+-])
++  AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])],
++   [if test "x$with_pam" = xyes; then
++   AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
++   fi])
++fi
+
+ dnl Checking for programs
+
diff --git a/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch
new file mode 100644
index 0000000..d5ef003
--- /dev/null
+++ b/meta/recipes-extended/at/at/file_replacement_with_gplv2.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Inappropriate [licensing]
+
+posixtm.[ch] files are replaced with gplv2 version from these locations:
+
+http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.c;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba
+http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/posixtm.h;hb=5661ab9d49512b4cf3c19caa11bb581d8ce561ba 
+
+update the Copyright file information to reflect the replaced files.
+
+Date: 2010/08/31
+Nitin A Kamble nitin.a.kamble@intel.com
+
+Index: at-3.1.12/Copyright
+===================================================================
+--- at-3.1.12.orig/Copyright
++++ at-3.1.12/Copyright
+@@ -31,10 +31,10 @@ The files posixtm.c and posixtm.h have t
+    Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
+    2005, 2006, 2007 Free Software Foundation Inc.
+ 
+-   This program is free software: you can redistribute it and/or modify
++   This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+-   the Free Software Foundation; either version 3 of the License, or
+-   (at your option) any later version.
++   the Free Software Foundation; either version 2, or (at your option)
++   any later version.
+ 
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/meta/recipes-extended/at/at/fix_parallel_build_error.patch b/meta/recipes-extended/at/at/fix_parallel_build_error.patch
new file mode 100644
index 0000000..66ff3e1
--- /dev/null
+++ b/meta/recipes-extended/at/at/fix_parallel_build_error.patch
@@ -0,0 +1,28 @@
+make -j was failing sometimesa like this
+| ccache i586-poky-linux-gcc -march=i586 --sysroot=/home/nitin/build/build0/tmp/sysroots/i586-poky-linux -I. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -o atd atd.o daemon.o  -lfl  -lpam -Wl,-O1 -Wl,--as-needed
+| parsetime.l:5:19: fatal error: y.tab.h: No such file or directory
+| compilation terminated.
+| make: *** [lex.yy.o] Error 1
+| make: *** Waiting for unfinished jobs....
+
+Fixed the issue by adding a dependency in the makefile.
+Nitin <nitin.a.kamble@intel.com>
+2010/09/02
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: at-3.1.12/Makefile.in
+===================================================================
+--- at-3.1.12.orig/Makefile.in
++++ at-3.1.12/Makefile.in
+@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y
+ lex.yy.c: parsetime.l
+ 	$(LEX) -i parsetime.l
+ 
++parsetime.l: y.tab.h
++
+ atrun: atrun.in
+ 	configure
+ 
diff --git a/meta/recipes-extended/at/at/makefile-fix-parallel.patch b/meta/recipes-extended/at/at/makefile-fix-parallel.patch
new file mode 100644
index 0000000..932a4c0
--- /dev/null
+++ b/meta/recipes-extended/at/at/makefile-fix-parallel.patch
@@ -0,0 +1,35 @@
+From 150b63a936af71b992a3a7b0fc2d2497e51fc800 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 28 Jan 2015 23:52:00 -0800
+Subject: [PATCH] Makefile: fix for parallel build
+
+Fixed:
+y.tab.c:1001:0: error: unterminated #if
+
+Let "$(YACC) -d parsetime.y" only run once will fix the problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 2a9b918..aa7c04a 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -75,7 +75,9 @@ at: $(ATOBJECTS)
+ atd: $(RUNOBJECTS)
+ 	$(CC) $(LDFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB)
+ 
+-y.tab.c y.tab.h: parsetime.y
++y.tab.h: y.tab.c
++
++y.tab.c: parsetime.y
+ 	$(YACC) -d parsetime.y
+ 
+ lex.yy.c: parsetime.l
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/at/at/pam.conf.patch b/meta/recipes-extended/at/at/pam.conf.patch
new file mode 100644
index 0000000..b5ceb9a
--- /dev/null
+++ b/meta/recipes-extended/at/at/pam.conf.patch
@@ -0,0 +1,27 @@
+oe doesn't support "@include", use the concrete directive instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+Index: at-3.1.15/pam.conf
+===================================================================
+--- at-3.1.15.orig/pam.conf
++++ at-3.1.15/pam.conf
+@@ -1,10 +1,11 @@
+ #
+ # The PAM configuration file for the at daemon
+ #
++ 
++auth    required    pam_env.so
++auth    include     common-auth
++account include     common-account
++session include     common-session-noninteractive
++session required    pam_limits.so
++session required    pam_loginuid.so
+ 
+-auth	required	pam_env.so
+-@include common-auth
+-@include common-account
+-session    required   pam_loginuid.so
+-@include common-session-noninteractive
+-session    required   pam_limits.so
diff --git a/meta/recipes-extended/at/at/posixtm.c b/meta/recipes-extended/at/at/posixtm.c
new file mode 100644
index 0000000..5514ba4
--- /dev/null
+++ b/meta/recipes-extended/at/at/posixtm.c
@@ -0,0 +1,328 @@
+/* Parse dates for touch and date.
+
+   Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
+   2005, 2006, 2007 Free Software Foundation Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Yacc-based version written by Jim Kingdon and David MacKenzie.
+   Rewritten by Jim Meyering.  */
+
+#include <config.h>
+
+#include "posixtm.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <string.h>
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+/* ISDIGIT differs from isdigit, as follows:
+   - Its arg may be any int or unsigned int; it need not be an unsigned char
+     or EOF.
+   - It's typically faster.
+   POSIX says that only '0' through '9' are digits.  Prefer ISDIGIT to
+   isdigit unless it's important to use the locale's definition
+   of `digit' even when the host does not conform to POSIX.  */
+#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
+
+time_t mktime ();
+
+/*
+  POSIX requires:
+
+  touch -t [[CC]YY]mmddhhmm[.ss] FILE...
+    8, 10, or 12 digits, followed by optional .ss
+    (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS)
+
+  touch mmddhhmm[YY] FILE... (obsoleted by POSIX 1003.1-2001)
+    8 or 10 digits, YY (if present) must be in the range 69-99
+    (PDS_TRAILING_YEAR | PDS_PRE_2000)
+
+  date mmddhhmm[[CC]YY]
+    8, 10, or 12 digits
+    (PDS_TRAILING_YEAR | PDS_CENTURY)
+
+*/
+
+static int
+year (struct tm *tm, const int *digit_pair, size_t n, unsigned int syntax_bits)
+{
+  switch (n)
+    {
+    case 1:
+      tm->tm_year = *digit_pair;
+      /* Deduce the century based on the year.
+	 POSIX requires that 00-68 be interpreted as 2000-2068,
+	 and that 69-99 be interpreted as 1969-1999.  */
+      if (digit_pair[0] <= 68)
+	{
+	  if (syntax_bits & PDS_PRE_2000)
+	    return 1;
+	  tm->tm_year += 100;
+	}
+      break;
+
+    case 2:
+      if (! (syntax_bits & PDS_CENTURY))
+	return 1;
+      tm->tm_year = digit_pair[0] * 100 + digit_pair[1] - 1900;
+      break;
+
+    case 0:
+      {
+	time_t now;
+	struct tm *tmp;
+
+	/* Use current year.  */
+	time (&now);
+	tmp = localtime (&now);
+	if (! tmp)
+	  return 1;
+	tm->tm_year = tmp->tm_year;
+      }
+      break;
+
+    default:
+      abort ();
+    }
+
+  return 0;
+}
+
+static int
+posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits)
+{
+  const char *dot = NULL;
+  int pair[6];
+  int *p;
+  size_t i;
+
+  size_t s_len = strlen (s);
+  size_t len = (((syntax_bits & PDS_SECONDS) && (dot = strchr (s, '.')))
+		? (size_t) (dot - s)
+		: s_len);
+
+  if (len != 8 && len != 10 && len != 12)
+    return 1;
+
+  if (dot)
+    {
+      if (!(syntax_bits & PDS_SECONDS))
+	return 1;
+
+      if (s_len - len != 3)
+	return 1;
+    }
+
+  for (i = 0; i < len; i++)
+    if (!ISDIGIT (s[i]))
+      return 1;
+
+  len /= 2;
+  for (i = 0; i < len; i++)
+    pair[i] = 10 * (s[2*i] - '0') + s[2*i + 1] - '0';
+
+  p = pair;
+  if (syntax_bits & PDS_LEADING_YEAR)
+    {
+      if (year (tm, p, len - 4, syntax_bits))
+	return 1;
+      p += len - 4;
+      len = 4;
+    }
+
+  /* Handle 8 digits worth of `MMDDhhmm'.  */
+  tm->tm_mon = *p++ - 1;
+  tm->tm_mday = *p++;
+  tm->tm_hour = *p++;
+  tm->tm_min = *p++;
+  len -= 4;
+
+  /* Handle any trailing year.  */
+  if (syntax_bits & PDS_TRAILING_YEAR)
+    {
+      if (year (tm, p, len, syntax_bits))
+	return 1;
+    }
+
+  /* Handle seconds.  */
+  if (!dot)
+    {
+      tm->tm_sec = 0;
+    }
+  else
+    {
+      int seconds;
+
+      ++dot;
+      if (!ISDIGIT (dot[0]) || !ISDIGIT (dot[1]))
+	return 1;
+      seconds = 10 * (dot[0] - '0') + dot[1] - '0';
+
+      tm->tm_sec = seconds;
+    }
+
+  return 0;
+}
+
+/* Parse a POSIX-style date, returning true if successful.  */
+
+bool
+posixtime (time_t *p, const char *s, unsigned int syntax_bits)
+{
+  struct tm tm0
+#ifdef lint
+  /* Placate gcc-4's -Wuninitialized.
+     posix_time_parse fails to set all of tm0 only when it returns
+     nonzero (due to year() returning nonzero), and in that case,
+     this code doesn't use the tm0 at all.  */
+    = { 0, }
+#endif
+    ;
+  struct tm tm1;
+  struct tm const *tm;
+  time_t t;
+
+  if (posix_time_parse (&tm0, s, syntax_bits))
+    return false;
+
+  tm1 = tm0;
+  tm1.tm_isdst = -1;
+  t = mktime (&tm1);
+
+  if (t != (time_t) -1)
+    tm = &tm1;
+  else
+    {
+      /* mktime returns -1 for errors, but -1 is also a valid time_t
+	 value.  Check whether an error really occurred.  */
+      tm = localtime (&t);
+      if (! tm)
+	return false;
+    }
+
+  /* Reject dates like "September 31" and times like "25:61".  */
+  if ((tm0.tm_year ^ tm->tm_year)
+      | (tm0.tm_mon ^ tm->tm_mon)
+      | (tm0.tm_mday ^ tm->tm_mday)
+      | (tm0.tm_hour ^ tm->tm_hour)
+      | (tm0.tm_min ^ tm->tm_min)
+      | (tm0.tm_sec ^ tm->tm_sec))
+    return false;
+
+  *p = t;
+  return true;
+}
+
+#ifdef TEST_POSIXTIME
+/*
+    Test mainly with syntax_bits == 13
+    (aka: (PDS_LEADING_YEAR | PDS_CENTURY | PDS_SECONDS))
+
+    This test data assumes Universal Time, e.g., TZ="UTC0".
+
+    This test data also assumes that time_t is signed and is at least
+    39 bits wide, so that it can represent all years from 0000 through
+    9999.  A host with 32-bit signed time_t can represent only time
+    stamps in the range 1901-12-13 20:45:52 through 2038-01-18
+    03:14:07 UTC, assuming POSIX time_t with no leap seconds, so test
+    cases outside this range will not work on such a host.
+
+    Also, the first two lines of test data assume that the current
+    year is 2002.
+
+BEGIN-DATA
+12131415.16     13   1039788916 Fri Dec 13 14:15:16 2002
+12131415.16     13   1039788916 Fri Dec 13 14:15:16 2002
+000001010000.00 13 -62167132800 Sun Jan  1 00:00:00 0000
+190112132045.52 13  -2147483648 Fri Dec 13 20:45:52 1901
+190112132045.53 13  -2147483647 Fri Dec 13 20:45:53 1901
+190112132046.52 13  -2147483588 Fri Dec 13 20:46:52 1901
+190112132145.52 13  -2147480048 Fri Dec 13 21:45:52 1901
+190112142045.52 13  -2147397248 Sat Dec 14 20:45:52 1901
+190201132045.52 13  -2144805248 Mon Jan 13 20:45:52 1902
+196912312359.59 13           -1 Wed Dec 31 23:59:59 1969
+197001010000.00 13            0 Thu Jan  1 00:00:00 1970
+197001010000.01 13            1 Thu Jan  1 00:00:01 1970
+197001010001.00 13           60 Thu Jan  1 00:01:00 1970
+197001010100.00 13         3600 Thu Jan  1 01:00:00 1970
+197001020000.00 13        86400 Fri Jan  2 00:00:00 1970
+197002010000.00 13      2678400 Sun Feb  1 00:00:00 1970
+197101010000.00 13     31536000 Fri Jan  1 00:00:00 1971
+197001000000.00 13            * *
+197000010000.00 13            * *
+197001010000.60 13            * *
+197001010060.00 13            * *
+197001012400.00 13            * *
+197001320000.00 13            * *
+197013010000.00 13            * *
+203801190314.06 13   2147483646 Tue Jan 19 03:14:06 2038
+203801190314.07 13   2147483647 Tue Jan 19 03:14:07 2038
+203801190314.08 13   2147483648 Tue Jan 19 03:14:08 2038
+999912312359.59 13 253402300799 Fri Dec 31 23:59:59 9999
+1112131415      13   1323785700 Tue Dec 13 14:15:00 2011
+1112131415.16   13   1323785716 Tue Dec 13 14:15:16 2011
+201112131415.16 13   1323785716 Tue Dec 13 14:15:16 2011
+191112131415.16 13  -1831974284 Wed Dec 13 14:15:16 1911
+203712131415.16 13   2144326516 Sun Dec 13 14:15:16 2037
+3712131415.16   13   2144326516 Sun Dec 13 14:15:16 2037
+6812131415.16   13   3122633716 Thu Dec 13 14:15:16 2068
+6912131415.16   13     -1590284 Sat Dec 13 14:15:16 1969
+7012131415.16   13     29945716 Sun Dec 13 14:15:16 1970
+1213141599       2    945094500 Mon Dec 13 14:15:00 1999
+1213141500       2    976716900 Wed Dec 13 14:15:00 2000
+END-DATA
+
+*/
+
+# define MAX_BUFF_LEN 1024
+
+int
+main (void)
+{
+  char buff[MAX_BUFF_LEN + 1];
+
+  buff[MAX_BUFF_LEN] = 0;
+  while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
+    {
+      char time_str[MAX_BUFF_LEN];
+      unsigned int syntax_bits;
+      time_t t;
+      if (sscanf (buff, "%s %u", time_str, &syntax_bits) != 2)
+	printf ("*\n");
+      else
+	{
+	  printf ("%-15s %2u ", time_str, syntax_bits);
+	  if (posixtime (&t, time_str, syntax_bits))
+	    printf ("%12ld %s", (long int) t, ctime (&t));
+	  else
+	    printf ("%12s %s", "*", "*\n");
+	}
+    }
+  exit (0);
+
+}
+#endif
+
+/*
+Local Variables:
+compile-command: "gcc -DTEST_POSIXTIME -g -O -Wall -W posixtm.c"
+End:
+*/
diff --git a/meta/recipes-extended/at/at/posixtm.h b/meta/recipes-extended/at/at/posixtm.h
new file mode 100644
index 0000000..e91749d
--- /dev/null
+++ b/meta/recipes-extended/at/at/posixtm.h
@@ -0,0 +1,37 @@
+/* Parse dates for touch and date.
+
+   Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Yacc-based version written by Jim Kingdon and David MacKenzie.
+   Rewritten by Jim Meyering.  */
+
+#ifndef POSIXTM_H_
+# define POSIXTM_H_
+
+# include <stdbool.h>
+# include <time.h>
+
+/* POSIX Date Syntax flags.  */
+# define PDS_LEADING_YEAR 1
+# define PDS_TRAILING_YEAR 2
+# define PDS_CENTURY 4
+# define PDS_SECONDS 8
+# define PDS_PRE_2000 16
+
+bool posixtime (time_t *p, const char *s, unsigned int syntax_bits);
+
+#endif
diff --git a/meta/recipes-extended/at/at_3.1.16.bb b/meta/recipes-extended/at/at_3.1.16.bb
new file mode 100644
index 0000000..0512bcb
--- /dev/null
+++ b/meta/recipes-extended/at/at_3.1.16.bb
@@ -0,0 +1,69 @@
+SUMMARY = "Delayed job execution and batch processing"
+DESCRIPTION = "At allows for commands to be run at a particular time.  Batch will execute commands when \
+the system load levels drop to a particular level."
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
+DEPENDS = "flex flex-native \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
+"
+
+PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
+
+RCONFLICTS_${PN} = "atd"
+RREPLACES_${PN} = "atd"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
+    file://fix_parallel_build_error.patch \
+    file://posixtm.c \
+    file://posixtm.h \
+    file://file_replacement_with_gplv2.patch \
+    file://atd.init \
+    file://atd.service \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+    file://makefile-fix-parallel.patch \
+    file://0001-remove-glibc-assumption.patch \
+    "
+
+PAM_SRC_URI = "file://pam.conf.patch \
+               file://configure-add-enable-pam.patch"
+
+SRC_URI[md5sum] = "d05da75d9b75d93917ffb16ab48b1e19"
+SRC_URI[sha256sum] = "cb9af59c6a54edce9536ba629841055409d1f89d8ae26494727a97141fb4d5c1"
+
+EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
+                 --with-daemon_username=root \
+                 --with-daemon_groupname=root \
+                 --with-jobdir=/var/spool/at/jobs \
+                 --with-atspool=/var/spool/at/spool \
+                 ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
+
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "atd"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "atd.service"
+
+
+do_compile_prepend () {
+	cp -f ${WORKDIR}/posixtm.[ch] ${S}
+}
+
+do_install () {
+	oe_runmake -e "IROOT=${D}" install
+
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755    ${WORKDIR}/atd.init		${D}${sysconfdir}/init.d/atd
+
+	# install systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
+
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+		install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
+	fi
+}
diff --git a/meta/recipes-extended/augeas/augeas.inc b/meta/recipes-extended/augeas/augeas.inc
new file mode 100644
index 0000000..23d12ca
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas.inc
@@ -0,0 +1,30 @@
+SUMMARY = "Augeas configuration API"
+HOMEPAGE = "http://augeas.net/"
+BUGTRACKER = "https://fedorahosted.org/augeas/report/1"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
+
+SRC_URI = "http://download.augeas.net/${BP}.tar.gz \
+           file://add-missing-argz-conditional.patch \
+           file://sepbuildfix.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+          "
+
+DEPENDS = "readline libxml2"
+
+inherit autotools pkgconfig
+
+PACKAGES =+ "${PN}-lenses lib${BPN}"
+
+FILES_${PN}-lenses = "${datadir}/augeas/lenses"
+FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}"
+
+RDEPENDS_lib${BPN} += "${PN}-lenses"
+RRECOMMENDS_lib${BPN} += "${PN}"
+
+LEAD_SONAME = "libaugeas.so"
+
+do_install_append() {
+	rm -fr ${D}${datadir}/vim
+}
diff --git a/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..9a19876
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: augeas-1.2.0/gnulib/lib/Makefile.am
+===================================================================
+--- augeas-1.2.0.orig/gnulib/lib/Makefile.am
++++ augeas-1.2.0/gnulib/lib/Makefile.am
+@@ -463,7 +463,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch b/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch
new file mode 100644
index 0000000..abbdbaa
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch
@@ -0,0 +1,20 @@
+Add missing GL_GENERATE_ARGZ_H conditional
+
+- GL_GENERATE_ARGZ_H is used in gnulib/lib/Makefile.am
+
+Upstream-Status: Pending
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+Index: augeas-1.0.0/configure.ac
+===================================================================
+--- augeas-1.0.0.orig/configure.ac
++++ augeas-1.0.0/configure.ac
+@@ -55,6 +55,8 @@ AC_ARG_WITH([failmalloc],
+ 
+ AM_CONDITIONAL([WITH_FAILMALLOC], [test x$with_failmalloc != xno])
+ 
++AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"])
++
+ dnl --enable-debug=(yes|no)
+ AC_ARG_ENABLE([debug],
+               [AC_HELP_STRING([--enable-debug=no/yes],
diff --git a/meta/recipes-extended/augeas/augeas/sepbuildfix.patch b/meta/recipes-extended/augeas/augeas/sepbuildfix.patch
new file mode 100644
index 0000000..b82a3ee
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas/sepbuildfix.patch
@@ -0,0 +1,22 @@
+Ensure that builds in separate builddirs (${B} != ${S}) correctly install the 
+lenses files.
+
+Upstream-Status: Pending
+
+RP 2013/4/17
+
+Index: augeas-1.0.0/Makefile.am
+===================================================================
+--- augeas-1.0.0.orig/Makefile.am	2012-11-02 15:20:11.000000000 +0000
++++ augeas-1.0.0/Makefile.am	2013-04-17 10:36:24.033400125 +0000
+@@ -5,8 +5,8 @@
+ lensdir=$(datadir)/augeas/lenses/dist
+ lenstestdir=$(datadir)/augeas/lenses/dist/tests
+ 
+-dist_lens_DATA=$(wildcard lenses/*.aug)
+-dist_lenstest_DATA=$(wildcard lenses/tests/*.aug)
++dist_lens_DATA=$(wildcard $(top_srcdir)/lenses/*.aug)
++dist_lenstest_DATA=$(wildcard $(top_srcdir)lenses/tests/*.aug)
+ 
+ EXTRA_DIST=augeas.spec build/aux/move-if-change Makefile.am HACKING
+ 
diff --git a/meta/recipes-extended/augeas/augeas_1.4.0.bb b/meta/recipes-extended/augeas/augeas_1.4.0.bb
new file mode 100644
index 0000000..1064ad4
--- /dev/null
+++ b/meta/recipes-extended/augeas/augeas_1.4.0.bb
@@ -0,0 +1,4 @@
+require augeas.inc
+
+SRC_URI[md5sum] = "a2536a9c3d744dc09d234228fe4b0c93"
+SRC_URI[sha256sum] = "659fae7ac229029e60a869a3b88c616cfd51cf2fba286cdfe3af3a052cb35b30"
diff --git a/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
new file mode 100644
index 0000000..91341ee
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
@@ -0,0 +1,44 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+
+Signed-off-by: Anders Roxell <anders.roxell@enea.com>
+Upstream-Status: Pending
+---
+diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in
+--- bash-3.2.48/Makefile.in.orig	2006-08-17 23:03:35.000000000 +0500
++++ bash-3.2.48/Makefile.in	2013-07-02 20:20:07.512709327 +0500
+@@ -803,17 +803,31 @@
+ 	fi
+ 
+ recho$(EXEEXT):		$(SUPPORT_SRC)recho.c
+-	@$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
++	@$(CC) $(CCFLAGS) -o $@ $<
+ 
+ zecho$(EXEEXT):		$(SUPPORT_SRC)zecho.c
+-	@$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
++	@$(CC) $(CCFLAGS) -o $@ $<
+ 
+ printenv$(EXEEXT):	$(SUPPORT_SRC)printenv.c
+-	@$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
++	@$(CC) $(CCFLAGS) -o $@ $<
+ 
+-test tests check:	force $(Program) $(TESTS_SUPPORT)
++test tests check:
++	@$(MAKE) install-test
++	@$(MAKE) runtest
++
++install-test: buildtest
++ifeq ($(origin INSTALL_TEST_DIR), undefined)
+ 	@-test -d tests || mkdir tests
+ 	@cp $(TESTS_SUPPORT) tests
++else
++	@-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
++	@cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
++	@cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
++endif
++
++buildtest: force $(Program) $(TESTS_SUPPORT)
++
++runtest:
+ 	@( cd $(srcdir)/tests && \
+ 		PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
+ 
diff --git a/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch b/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch
new file mode 100644
index 0000000..ee756dc
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/dont-include-target-CFLAGS-in-host-LDFLAGS.patch
@@ -0,0 +1,33 @@
+From 933bd886af49667e88e2385409449ab598813dab Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 15 Jul 2015 00:54:33 -0700
+Subject: [PATCH] dont include target CFLAGS in host LDFLAGS
+
+Building the host tool 'mkbuiltins' will fail if the target CFLAGS
+contains an option which isn't supported by the host's gcc. To prevent
+the issue, define LDFLAGS_FOR_BUILD based on CFLAGS_FOR_BUILD instead
+of CFLAGS.
+
+Upstream-Status: Inappropriate [required for bash 3.2.57 (GPLv2) recipe only]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ builtins/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builtins/Makefile.in b/builtins/Makefile.in
+index e027f7a..ebfddf3 100644
+--- a/builtins/Makefile.in
++++ b/builtins/Makefile.in
+@@ -63,7 +63,7 @@ LOCAL_DEFS = @LOCAL_DEFS@
+ 
+ LIBS = @LIBS@
+ LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
+-LDFLAGS_FOR_BUILD = $(LDFLAGS)
++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
+ LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
+ #LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
+ LIBS_FOR_BUILD = $(LIBS)
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch
new file mode 100644
index 0000000..c4229a7
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/mkbuiltins_have_stringize.patch
@@ -0,0 +1,29 @@
+On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by
+the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers
+use the STRING() macro from unistd.h. A header in the bash sources overrides
+the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the
+wrappers to generate calls to 'xread' and 'xopen', which do not exist,
+resulting in a failure to link.
+
+Assume we have stringize support when cross-compiling, which works around the
+issue.
+
+It may be best for upstream to either give up on supporting compilers without
+stringize support, or to not define STRING() at all when FORTIFY_SOURCES is
+defined, letting the unistd.h one be used, instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+--- bash-4.2.orig/builtins/mkbuiltins.c
++++ bash-4.2/builtins/mkbuiltins.c
+@@ -28,6 +28,7 @@
+ #  define HAVE_STDLIB_H
+
+ #  define HAVE_RENAME
++#  define HAVE_STRINGIZE
+ #endif /* CROSS_COMPILING */
+
+ #if defined (HAVE_UNISTD_H)
diff --git a/meta/recipes-extended/bash/bash-3.2.48/run-ptest b/meta/recipes-extended/bash/bash-3.2.48/run-ptest
new file mode 100644
index 0000000..8dd3b99
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
diff --git a/meta/recipes-extended/bash/bash-3.2.48/test-output.patch b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch
new file mode 100644
index 0000000..2b09b7d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/test-output.patch
@@ -0,0 +1,25 @@
+Add FAIL/PASS output to test output.
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-Status: Pending
+---
+diff -uNr a/tests/run-all b/tests/run-all
+--- a/tests/run-all	1999-10-08 17:07:46.000000000 +0200
++++ b/tests/run-all	2012-10-27 21:04:18.663331887 +0200
+@@ -22,7 +22,15 @@
+ 	case $x in
+ 	$0|run-minimal|run-gprof)	;;
+ 	*.orig|*~) ;;
+-	*)	echo $x ; sh $x ;;
++    *)  echo $x
++         output=`sh $x`
++         if [ -n "$output" ]; then
++             echo "$output"
++             echo "FAIL: $x"
++         else
++             echo "PASS: $x"
++         fi
++         ;;
+ 	esac
+ done
+ 
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
new file mode 100644
index 0000000..c06f157
--- /dev/null
+++ b/meta/recipes-extended/bash/bash.inc
@@ -0,0 +1,60 @@
+SUMMARY = "An sh-compatible command language interpreter"
+HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html"
+SECTION = "base/shell"
+
+DEPENDS = "ncurses bison-native"
+
+inherit autotools gettext texinfo update-alternatives ptest
+
+EXTRA_AUTORECONF += "--exclude=autoheader"
+EXTRA_OECONF = "--enable-job-control"
+
+# If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
+# startup files, even if they are not interactive.
+# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
+CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
+
+ALTERNATIVE_${PN} = "sh"
+ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
+ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
+ALTERNATIVE_PRIORITY = "100"
+
+RDEPENDS_${PN} += "base-files"
+RDEPENDS_${PN}_class-nativesdk = ""
+RDEPENDS_${PN}-ptest += "make"
+
+do_configure_prepend () {
+	if [ ! -e ${S}/acinclude.m4 ]; then
+		cat ${S}/aclocal.m4 > ${S}/acinclude.m4
+	fi
+}
+
+do_compile_ptest () {
+	oe_runmake buildtest
+}
+
+do_install_append () {
+	# Move /usr/bin/bash to /bin/bash, if need
+	if [ "${base_bindir}" != "${bindir}" ]; then
+		mkdir -p ${D}${base_bindir}
+		mv ${D}${bindir}/bash ${D}${base_bindir}
+	fi
+}
+do_install_append_class-target () {
+	# Clean host path in bashbug
+	sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug
+}
+
+do_install_ptest () {
+	make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
+	cp ${B}/Makefile ${D}${PTEST_PATH}
+        sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
+}
+
+pkg_postinst_${PN} () {
+	grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+	printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
diff --git a/meta/recipes-extended/bash/bash/build-tests.patch b/meta/recipes-extended/bash/bash/build-tests.patch
new file mode 100644
index 0000000..73a81b6
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/build-tests.patch
@@ -0,0 +1,55 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+
+Upstream-Status: Pending
+Signed-off-by: Anders Roxell <anders.roxell@enea.com>
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in | 24 +++++++++++++++++++-----
+ 1 file changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -848,20 +848,34 @@ maybe-clean:
+ 	fi
+ 
+ recho$(EXEEXT):		$(SUPPORT_SRC)recho.c
+-	@$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
++	@$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $<
+ 
+ zecho$(EXEEXT):		$(SUPPORT_SRC)zecho.c
+-	@$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
++	@$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $<
+ 
+ printenv$(EXEEXT):	$(SUPPORT_SRC)printenv.c
+-	@$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
++	@$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $<
+ 
+ xcase$(EXEEXT):	$(SUPPORT_SRC)xcase.c
+-	@$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)xcase.c ${LIBS_FOR_BUILD}
++	@$(CC) $(CCFLAGS) ${LDFLAGS} -o $@ $<
+ 
+-test tests check:	force $(Program) $(TESTS_SUPPORT)
++test tests check:
++	@$(MAKE) install-test
++	@$(MAKE) runtest
++
++install-test: buildtest
++ifeq ($(origin INSTALL_TEST_DIR), undefined)
+ 	@-test -d tests || mkdir tests
+ 	@cp $(TESTS_SUPPORT) tests
++else
++	@-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR)
++	@cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/
++	@cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR)
++endif
++
++buildtest: force $(Program) $(TESTS_SUPPORT)
++
++runtest:
+ 	@( cd $(srcdir)/tests && \
+ 		PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
+ 
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-extended/bash/bash/execute_cmd.patch b/meta/recipes-extended/bash/bash/execute_cmd.patch
new file mode 100644
index 0000000..81f8f0a
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/execute_cmd.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+--- execute_cmd.c.orig	Fri Jun  3 13:34:42 2011
++++ execute_cmd.c	Fri Jun  3 13:36:41 2011
+@@ -2202,7 +2202,11 @@
+   /* If the `lastpipe' option is set with shopt, and job control is not
+      enabled, execute the last element of non-async pipelines in the
+      current shell environment. */
+-  if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
++  if (lastpipe_opt && 
++#if defined(JOB_CONTROL)
++		job_control == 0 && 
++#endif
++		asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
+     {
+       lstdin = move_to_high_fd (0, 0, 255);
+       if (lstdin > 0)
diff --git a/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch
new file mode 100644
index 0000000..a9391d6
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/mkbuiltins_have_stringize.patch
@@ -0,0 +1,26 @@
+On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by
+the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers
+use the STRING() macro from unistd.h. A header in the bash sources overrides
+the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the
+wrappers to generate calls to 'xread' and 'xopen', which do not exist,
+resulting in a failure to link.
+
+Assume we have stringize support when cross-compiling, which works around the
+issue.
+
+It may be best for upstream to either give up on supporting compilers without
+stringize support, or to not define STRING() at all when FORTIFY_SOURCES is
+defined, letting the unistd.h one be used, instead.
+
+Upstream-Status: Pending
+
+--- bash-4.2.orig/builtins/mkbuiltins.c
++++ bash-4.2/builtins/mkbuiltins.c
+@@ -28,6 +28,7 @@
+ #  define HAVE_STDLIB_H
+
+ #  define HAVE_RENAME
++#  define HAVE_STRINGIZE
+ #endif /* CROSS_COMPILING */
+
+ #if defined (HAVE_UNISTD_H)
diff --git a/meta/recipes-extended/bash/bash/run-ptest b/meta/recipes-extended/bash/bash/run-ptest
new file mode 100644
index 0000000..e3f8133
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k THIS_SH=/bin/bash BUILD_DIR=. srcdir=.  runtest
diff --git a/meta/recipes-extended/bash/bash/test-output.patch b/meta/recipes-extended/bash/bash/test-output.patch
new file mode 100644
index 0000000..2b09b7d
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/test-output.patch
@@ -0,0 +1,25 @@
+Add FAIL/PASS output to test output.
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-Status: Pending
+---
+diff -uNr a/tests/run-all b/tests/run-all
+--- a/tests/run-all	1999-10-08 17:07:46.000000000 +0200
++++ b/tests/run-all	2012-10-27 21:04:18.663331887 +0200
+@@ -22,7 +22,15 @@
+ 	case $x in
+ 	$0|run-minimal|run-gprof)	;;
+ 	*.orig|*~) ;;
+-	*)	echo $x ; sh $x ;;
++    *)  echo $x
++         output=`sh $x`
++         if [ -n "$output" ]; then
++             echo "$output"
++             echo "FAIL: $x"
++         else
++             echo "PASS: $x"
++         fi
++         ;;
+ 	esac
+ done
+ 
diff --git a/meta/recipes-extended/bash/bash_3.2.48.bb b/meta/recipes-extended/bash/bash_3.2.48.bb
new file mode 100644
index 0000000..d42b292
--- /dev/null
+++ b/meta/recipes-extended/bash/bash_3.2.48.bb
@@ -0,0 +1,46 @@
+require bash.inc
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a"
+
+PR = "r11"
+
+SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-049;apply=yes;striplevel=0;name=patch049 \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-050;apply=yes;striplevel=0;name=patch050 \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-051;apply=yes;striplevel=0;name=patch051 \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-052;apply=yes;striplevel=0;name=patch052 \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-053;apply=yes;striplevel=0;name=patch053 \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-054;apply=yes;striplevel=0;name=patch054 \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-055;apply=yes;striplevel=0;name=patch055 \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-056;apply=yes;striplevel=0;name=patch056 \
+           ${GNU_MIRROR}/bash/bash-3.2-patches/bash32-057;apply=yes;striplevel=0;name=patch057 \
+           file://mkbuiltins_have_stringize.patch \
+           file://build-tests.patch \
+           file://test-output.patch \
+           file://run-ptest \
+           file://dont-include-target-CFLAGS-in-host-LDFLAGS.patch \
+          "
+
+SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
+SRC_URI[tarball.sha256sum] = "128d281bd5682ba5f6953122915da71976357d7a76490d266c9173b1d0426348"
+SRC_URI[patch049.md5sum] = "af571a2d164d5abdcae4499e94e8892c"
+SRC_URI[patch049.sha256sum] = "b1217ed94bdb95dc878fa5cabbf8a164435eb0d9da23a392198f48566ee34a2f"
+SRC_URI[patch050.md5sum] = "8443d4385d73ec835abe401d90591377"
+SRC_URI[patch050.sha256sum] = "081bb03c580ecee63ba03b40beb3caf509eca29515b2e8dd3c078503609a1642"
+SRC_URI[patch051.md5sum] = "15c6653042e9814aa87120098fc7a849"
+SRC_URI[patch051.sha256sum] = "354886097cd95b4def77028f32ee01e2e088d58a98184fede9d3ce9320e218ef"
+SRC_URI[patch052.md5sum] = "691023a944bbb9003cc92ad462d91fa1"
+SRC_URI[patch052.sha256sum] = "a0eccf9ceda50871db10d21efdd74b99e35efbd55c970c400eeade012816bb61"
+SRC_URI[patch053.md5sum] = "eb97d1c9230a55283d9dac69d3de2e46"
+SRC_URI[patch053.sha256sum] = "fe6f0e96e0b966eaed9fb5e930ca12891f4380f30f9e0a773d200ff2063a864e"
+SRC_URI[patch054.md5sum] = "1107744058c43b247f597584b88ba0a6"
+SRC_URI[patch054.sha256sum] = "c6dab911e85688c542ce75afc175dbb4e5011de5102758e19a4a80dac1e79359"
+SRC_URI[patch055.md5sum] = "05d201176d3499e2dfa4a73d09d42f05"
+SRC_URI[patch055.sha256sum] = "c0e816700837942ed548da74e5917f74b70cbbbb10c9f2caf73e8e06a0713d0a"
+SRC_URI[patch056.md5sum] = "222eaa3a2c26f54a15aa5e08817a534a"
+SRC_URI[patch056.sha256sum] = "063a8d8d74e4407bf07a32b965b8ef6d213a66abdb6af26cc3584a437a56bbb4"
+SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913"
+SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0"
+
+PARALLEL_MAKE = ""
diff --git a/meta/recipes-extended/bash/bash_4.3.30.bb b/meta/recipes-extended/bash/bash_4.3.30.bb
new file mode 100644
index 0000000..811e61c
--- /dev/null
+++ b/meta/recipes-extended/bash/bash_4.3.30.bb
@@ -0,0 +1,46 @@
+require bash.inc
+
+# GPLv2+ (< 4.0), GPLv3+ (>= 4.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-031;apply=yes;striplevel=0;name=patch031 \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-032;apply=yes;striplevel=0;name=patch032 \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-033;apply=yes;striplevel=0;name=patch033 \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-034;apply=yes;striplevel=0;name=patch034 \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-035;apply=yes;striplevel=0;name=patch035 \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-036;apply=yes;striplevel=0;name=patch036 \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-037;apply=yes;striplevel=0;name=patch037 \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-038;apply=yes;striplevel=0;name=patch038 \
+           ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-039;apply=yes;striplevel=0;name=patch039 \
+           file://execute_cmd.patch;striplevel=0 \
+           file://mkbuiltins_have_stringize.patch \
+           file://build-tests.patch \
+           file://test-output.patch \
+           file://run-ptest \
+           "
+
+SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447"
+SRC_URI[tarball.sha256sum] = "317881019bbf2262fb814b7dd8e40632d13c3608d2f237800a8828fbb8a640dd"
+
+SRC_URI[patch031.md5sum] = "236df1ac1130a033ed0dbe2d2115f28f"
+SRC_URI[patch031.sha256sum] = "cd529f59dd0f2fdd49d619fe34691da6f0affedf87cc37cd460a9f3fe812a61d"
+SRC_URI[patch032.md5sum] = "2360f7e79cfb28526f80021025ea5909"
+SRC_URI[patch032.sha256sum] = "889357d29a6005b2c3308ca5b6286cb223b5e9c083219e5db3156282dd554f4a"
+SRC_URI[patch033.md5sum] = "b551c4ee7b8713759e4143499d0bbd48"
+SRC_URI[patch033.sha256sum] = "fb2a7787a13fbe027a7335aca6eb3c21cdbd813e9edc221274b6a9d8692eaa16"
+SRC_URI[patch034.md5sum] = "c9a56fbe0348e05a886dff97f2872b74"
+SRC_URI[patch034.sha256sum] = "f1694f04f110defe1330a851cc2768e7e57ddd2dfdb0e3e350ca0e3c214ff889"
+SRC_URI[patch035.md5sum] = "e564e8ab44ed1ca3a4e315a9f6cabdc9"
+SRC_URI[patch035.sha256sum] = "370d85e51780036f2386dc18c5efe996eba8e652fc1973f0f4f2ab55a993c1e3"
+SRC_URI[patch036.md5sum] = "b00ff66c41a7c0f06e191200981980b0"
+SRC_URI[patch036.sha256sum] = "ac5f82445b36efdb543dbfae64afed63f586d7574b833e9aa9cd5170bc5fd27c"
+SRC_URI[patch037.md5sum] = "be2a7b05f6ae560313f3c9d5f7127bda"
+SRC_URI[patch037.sha256sum] = "33f170dd7400ab3418d749c55c6391b1d161ef2de7aced1873451b3a3fca5813"
+SRC_URI[patch038.md5sum] = "61e0522830b24fbe8c0d1b010f132470"
+SRC_URI[patch038.sha256sum] = "adbeaa500ca7a82535f0e88d673661963f8a5fcdc7ad63445e68bf5b49786367"
+SRC_URI[patch039.md5sum] = "a4775487abe958536751c8ce53cdf6f9"
+SRC_URI[patch039.sha256sum] = "ab94dced2215541097691f60c3eb323cc28ef2549463e6a5334bbcc1e61e74ec"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
new file mode 100644
index 0000000..d8c8a86
--- /dev/null
+++ b/meta/recipes-extended/bc/bc_1.06.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Arbitrary precision calculator language"
+HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
+
+LICENSE = "GPLv2+ & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
+                    file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \
+                    file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \
+                    file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199"
+
+SECTION = "base"
+DEPENDS = "flex"
+PR = "r3"
+
+SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
+           file://fix-segment-fault.patch "
+
+SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
+SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
+
+inherit autotools texinfo update-alternatives
+
+ALTERNATIVE_${PN} = "dc"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/bc/files/fix-segment-fault.patch b/meta/recipes-extended/bc/files/fix-segment-fault.patch
new file mode 100644
index 0000000..20c0da2
--- /dev/null
+++ b/meta/recipes-extended/bc/files/fix-segment-fault.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+when run command such as 'echo "a = 13" | bc -l', it segmentation faults.
+This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+--- bc-1.06/lib/number.c.orig	2003-09-26 21:14:02.000000000 +0000
++++ bc-1.06/lib/number.c	2003-09-26 21:14:26.000000000 +0000
+@@ -34,6 +34,7 @@
+ #include <number.h>
+ #include <assert.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <ctype.h>/* Prototypes needed for external utility routines. */
+ 
+ #define bc_rt_warn rt_warn
+--- bc-1.06/bc/load.c.orig	2003-09-26 21:14:14.000000000 +0000
++++ bc-1.06/bc/load.c	2003-09-26 21:14:26.000000000 +0000
+@@ -156,7 +156,7 @@
+   long  label_no;
+   long  vaf_name;	/* variable, array or function number. */
+   long  func;
+-  program_counter save_adr;
++  static program_counter save_adr;
+ 
+   /* Initialize. */
+   str = code;
diff --git a/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch b/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch
new file mode 100644
index 0000000..fee368d
--- /dev/null
+++ b/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch
@@ -0,0 +1,40 @@
+From 9cb1667f9d3a9bcfc3b83466cd8d3b79f0554ff0 Mon Sep 17 00:00:00 2001
+From: Azat Khuzhin <a3at.mail@gmail.com>
+Date: Wed, 8 Jul 2015 01:37:09 +0300
+Subject: [PATCH 1/3] fix typos in manpage
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
+
+---
+ blktool.8 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/blktool.8 b/blktool.8
+index a1f5c96..45b7724 100644
+--- a/blktool.8
++++ b/blktool.8
+@@ -191,7 +191,7 @@ Query or set device bus state (0 off, 1 on, 2 tristate)
+ Query the detected (or overridden, via -t) device class.
+ Typically this will result in 'ATA' or 'SCSI' for most devices.
+ Detection is based on device major; thus your SATA device may appear as
+-'SCSI'.
++\&'SCSI'.
+ 
+ .TP
+ .B cd-speed
+@@ -237,7 +237,7 @@ Omitting the on/off argument will print the current state.
+ 
+ .TP
+ .B media
+-Lock in (or unlock) a removeable device.
++Lock in (or unlock) a removable device.
+ 
+ .TP
+ .B multiple-count
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch b/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch
new file mode 100644
index 0000000..d08aba5
--- /dev/null
+++ b/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch
@@ -0,0 +1,31 @@
+From ddb1071da2c78d8155aab62e9f0d46f69500200f Mon Sep 17 00:00:00 2001
+From: Azat Khuzhin <a3at.mail@gmail.com>
+Date: Wed, 8 Jul 2015 01:42:24 +0300
+Subject: [PATCH 2/3] fix string error
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
+
+---
+ util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util.c b/util.c
+index 1f3a9ca..2ccf56a 100644
+--- a/util.c
++++ b/util.c
+@@ -28,7 +28,7 @@ void pdie(const char *msg, int perr)
+ 	if (perr)
+ 		perror(msg);
+ 	else
+-		fprintf(stderr, msg);
++		fprintf(stderr, "%s", msg);
+ 	if (blkdev >= 0)
+ 		close(blkdev);
+ 	exit(1);
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch b/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch
new file mode 100644
index 0000000..d7ed0b9
--- /dev/null
+++ b/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch
@@ -0,0 +1,78 @@
+From 68faa63aaad81f4a289e4a03173ab4cf798deb53 Mon Sep 17 00:00:00 2001
+From: Azat Khuzhin <a3at.mail@gmail.com>
+Date: Sat, 1 Nov 2014 22:24:32 +0300
+Subject: [PATCH 3/3] Fix 3-d argument for BLKROSET it must be 'const int *'
+
+Most of *SET ioctls have int type for 3-d argument, except BLKROSET.
+So add bc_arg_type enum, build it into bool_comand and install arg_type
+to bc_arg_int_ptr for BLKROSET only.
+
+Debian-bug-id: 641164
+Link: https://bugs.debian.org/641164
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
+
+---
+ blktool.c | 11 +++++++++--
+ blktool.h |  7 +++++++
+ 2 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/blktool.c b/blktool.c
+index fbefecd..221a195 100644
+--- a/blktool.c
++++ b/blktool.c
+@@ -85,7 +85,7 @@ static struct bool_command bool_cmd_tbl[] = {
+ 	{ { DEF_BOOL("pio-data"), dc_ata, DEF_HDIO(32BIT) },
+ 	  "16-bit", "32-bit" },
+ 	{ { DEF_BOOL("readonly"), dc_any, IOCNAME(BLKROGET), IOCNAME(BLKROSET) },
+-	  DEF_BOOLSTR },
++	  DEF_BOOLSTR, bc_arg_int_ptr },
+ 	{ { DEF_BOOL("unmask-irq"), dc_ata, DEF_HDIO(UNMASKINTR) },
+ 	  DEF_BOOLSTR },
+ 	{ { "wcache", ct_bool, handle_wcache, dc_any,
+@@ -171,7 +171,14 @@ static void handle_bool(int argc, char **argv, struct command *cmd)
+ 
+ 	} else if ((argc == 4) && (cmd->write_ioctl_name != NULL)) {
+ 		do_32 = parse_bool(argc, argv, bcm);
+-		if (ioctl(blkdev, cmd->write_ioctl, do_32))
++		
++		int ret;
++		if (bcm->arg_type == bc_arg_int_ptr) {
++			ret = ioctl(blkdev, cmd->write_ioctl, &do_32);
++		} else {
++			ret = ioctl(blkdev, cmd->write_ioctl, do_32);
++		}
++		if (ret)
+ 			pdie(cmd->write_ioctl_name, 1);
+ 	}
+ 	else {
+diff --git a/blktool.h b/blktool.h
+index fce4387..85add83 100644
+--- a/blktool.h
++++ b/blktool.h
+@@ -85,11 +85,18 @@ struct command {
+ 	const char		*write_ioctl_name;
+ };
+ 
++enum bc_arg_type {
++	bc_arg_int,
++	bc_arg_int_ptr,
++};
++
+ struct bool_command {
+ 	struct command		cmd;
+ 
+ 	const char		*str_false;
+ 	const char		*str_true;
++
++	enum bc_arg_type arg_type;
+ };
+ 
+ struct class_operations {
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/blktool/blktool_4-7.bb b/meta/recipes-extended/blktool/blktool_4-7.bb
new file mode 100644
index 0000000..679196b
--- /dev/null
+++ b/meta/recipes-extended/blktool/blktool_4-7.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Tune low-level block device parameters"
+DESCRIPTION = "blktool is used for querying and/or changing settings \
+of a block device. It is like hdparm but a more general tool, as it \
+works on SCSI, IDE and SATA devices."
+HOMEPAGE = "http://packages.debian.org/unstable/admin/blktool"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://blktool.c;beginline=7;endline=8;md5=a5e798ea98fd50972088968a15e5f373"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \
+           file://0001-fix-typos-in-manpage.patch \
+           file://0002-fix-string-error.patch \
+           file://0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch \
+          "
+
+SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40"
+SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
+
+S = "${WORKDIR}/${BPN}-4.orig"
+
+inherit autotools pkgconfig
diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc
new file mode 100644
index 0000000..f9f8d6b
--- /dev/null
+++ b/meta/recipes-extended/byacc/byacc.inc
@@ -0,0 +1,21 @@
+SUMMARY = "Berkeley LALR Yacc parser generator"
+DESCRIPTION = "A parser generator utility that reads a grammar specification from a file and generates an LR(1) \
+parser for it.  The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C \
+programming language."
+SECTION = "devel"
+LICENSE = "PD"
+
+SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \
+           file://byacc-open.patch"
+
+EXTRA_OECONF += "--program-transform-name='s,^,b,'"
+
+BBCLASSEXTEND = "native"
+
+inherit autotools
+
+do_configure() {
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
+	oe_runconf
+}
diff --git a/meta/recipes-extended/byacc/byacc/byacc-open.patch b/meta/recipes-extended/byacc/byacc/byacc-open.patch
new file mode 100644
index 0000000..9160543
--- /dev/null
+++ b/meta/recipes-extended/byacc/byacc/byacc-open.patch
@@ -0,0 +1,13 @@
+diff --git a/main.c b/main.c
+index 620ce3f..82071a4 100644
+--- a/main.c
++++ b/main.c
+@@ -526,7 +526,7 @@ my_mkstemp(char *temp)
+     }
+     if ((name = tempnam(dname, fname)) != 0)
+     {
+-	fd = open(name, O_CREAT | O_EXCL | O_RDWR);
++      fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0666);
+ 	strcpy(temp, name);
+     }
+     else
diff --git a/meta/recipes-extended/byacc/byacc_20150711.bb b/meta/recipes-extended/byacc/byacc_20150711.bb
new file mode 100644
index 0000000..e5b5451
--- /dev/null
+++ b/meta/recipes-extended/byacc/byacc_20150711.bb
@@ -0,0 +1,11 @@
+# Sigh. This is one of those places where everyone licenses it differently. Someone
+# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
+# "I've found no reliable source which states that byacc must bear a UCB copyright."
+# Setting to PD as this is what the upstream has it as.
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=c52fb2d1b3f75b3b7534927807a1b714"
+require byacc.inc
+
+SRC_URI[md5sum] = "2700401030583c4e9169ac7ea7d08de8"
+SRC_URI[sha256sum] = "c354e4ee14c4a1bf11e55dde9275011d14887ef066406a088b6fa56caf039248"
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
new file mode 100644
index 0000000..1d163b6
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
@@ -0,0 +1,71 @@
+
+lib_LTLIBRARIES = libbz2.la
+
+libbz2_la_SOURCES = blocksort.c  \
+                    huffman.c    \
+                    crctable.c   \
+                    randtable.c  \
+                    compress.c   \
+                    decompress.c \
+                    bzlib.c
+
+bin_PROGRAMS = bzip2 bzip2recover
+
+bzip2_SOURCES = bzip2.c
+bzip2_LDADD = libbz2.la
+bzip2_DEPENDENCIES = libbz2.la
+
+include_HEADERS = bzlib.h
+
+bzip2recover_SOURCES = bzip2recover.c
+bzip2recover_LDADD = libbz2.la
+bzip2recover_DEPENDENCIES = libbz2.la
+
+bin_SCRIPTS = bzgrep bzmore bzdiff
+
+man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
+EXTRA_DIST = $(man_MANS)
+
+runtest:
+	./bzip2 -1  < sample1.ref > sample1.rb2
+	./bzip2 -2  < sample2.ref > sample2.rb2
+	./bzip2 -3  < sample3.ref > sample3.rb2
+	./bzip2 -d  < sample1.bz2 > sample1.tst
+	./bzip2 -d  < sample2.bz2 > sample2.tst
+	./bzip2 -ds < sample3.bz2 > sample3.tst
+	@if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\
+	else echo "FAIL: sample1 compress"; fi
+	@if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\
+	else echo "FAIL: sample2 compress"; fi
+	@if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\
+	else echo "FAIL: sample3 compress"; fi
+	@if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\
+	else echo "FAIL: sample1 decompress"; fi
+	@if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\
+	else echo "FAIL: sample2 decompress"; fi
+	@if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
+	else echo "FAIL: sample3 decompress"; fi
+
+install-ptest:
+	cp $(srcdir)/Makefile		$(DESTDIR)/
+	cp $(srcdir)/sample1.ref	$(DESTDIR)/
+	cp $(srcdir)/sample2.ref	$(DESTDIR)/
+	cp $(srcdir)/sample3.ref	$(DESTDIR)/
+	cp $(srcdir)/sample1.bz2	$(DESTDIR)/
+	cp $(srcdir)/sample2.bz2	$(DESTDIR)/
+	cp $(srcdir)/sample3.bz2	$(DESTDIR)/
+	ln -s $(bindir)/bzip2		$(DESTDIR)/bzip2
+
+install-exec-hook:
+	ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
+	ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
+	ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT)
+	ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT)
+	ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT)
+	ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT)
+
+install-data-hook:
+	echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1
+	echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1
+	echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1
+	echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
new file mode 100644
index 0000000..47ee576
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
@@ -0,0 +1,14 @@
+AC_PREREQ([2.57])
+
+AC_INIT(bzip2, 2.0.5, , libXrender)
+AM_INIT_AUTOMAKE(foreign)
+AM_MAINTAINER_MODE
+
+#AM_CONFIG_HEADER(config.h)
+
+# Check for progs
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+AC_OUTPUT([Makefile])
+
diff --git a/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
new file mode 100644
index 0000000..3b20fce
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2-1.0.6/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k runtest
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
new file mode 100644
index 0000000..233fe4c
--- /dev/null
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Very high-quality data compression program"
+DESCRIPTION = "bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and \
+Huffman coding. Compression is generally considerably better than that achieved by more conventional \
+LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors."
+HOMEPAGE = "http://www.bzip.org/"
+SECTION = "console/utils"
+LICENSE = "bzip2"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=8;endline=37;md5=40d9d1eb05736d1bfc86cfdd9106e6b2"
+PR = "r5"
+
+SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \
+           file://configure.ac;subdir=${BP} \
+           file://Makefile.am;subdir=${BP} \
+           file://run-ptest"
+
+SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
+SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
+
+PACKAGES =+ "libbz2"
+
+CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
+
+inherit autotools update-alternatives ptest
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "bunzip2 bzcat"
+
+#install binaries to bzip2-native under sysroot for replacement-native
+EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
+
+do_install_ptest () {
+	cp -f ${B}/Makefile ${D}${PTEST_PATH}/Makefile
+	sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
+}
+
+FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
+
+PROVIDES_append_class-native = " bzip2-replacement-native"
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
new file mode 100644
index 0000000..7fd34aa
--- /dev/null
+++ b/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
@@ -0,0 +1,43 @@
+require recipes-extended/chkconfig/chkconfig_1.3.58.bb
+
+SUMMARY = "${SUMMARY_chkconfig-alternatives}"
+DESCRIPTION = "${DESCRIPTION_chkconfig-alternatives}"
+DEPENDS = ""
+PROVIDES += "virtual/update-alternatives-native"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+# The sysroot branch is 1.3.59 + some git commits from master + --sysroot
+# support for alternatives.
+SRC_URI = "git://github.com/kergoth/chkconfig;branch=sysroot"
+S = "${WORKDIR}/git"
+
+SRCREV = "cd437ecbd8986c894442f8fce1e0061e20f04dee"
+PV = "1.3.59+${SRCPV}"
+
+inherit native
+
+# We want our native recipes to build using the target paths rather than paths
+# into the sysroot, as we may use them to construct the rootfs. As such, we
+# only adjust the paths to match the metadata for the target, not native.
+obey_variables () {
+	sed -i 's,ALTERNATIVES_ROOT,OPKG_OFFLINE_ROOT,' alternatives.c
+}
+
+do_compile () {
+	oe_runmake alternatives
+}
+
+do_install () {
+	install -d ${D}${sysconfdir}/alternatives \
+	           ${D}${localstatedir}/lib/alternatives
+
+	install -D -m 0755 alternatives ${D}${bindir}/alternatives
+	install -D -m 0644 alternatives.8 ${D}${mandir}/man8/alternatives.8
+
+	ln -s alternatives ${D}${bindir}/update-alternatives
+	ln -s alternatives.8 ${D}${mandir}/man8/update-alternatives.8
+}
+
+do_install_append_linuxstdbase() {
+	rm -rf ${D}${libdir}/lsb
+}
diff --git a/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
new file mode 100644
index 0000000..488847a
--- /dev/null
+++ b/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
@@ -0,0 +1,65 @@
+SUMMARY = "A system tool for maintaining the /etc/rc*.d hierarchy"
+DESCRIPTION = "Chkconfig is a basic system utility.  It updates and queries runlevel \
+information for system services.  Chkconfig manipulates the numerous \
+symbolic links in /etc/rc.d, to relieve system administrators of some \
+of the drudgery of manually editing the symbolic links."
+
+RECIPE_NO_UPDATE_REASON = "Version 1.5 requires selinux"
+
+HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
+
+DEPENDS = "libnewt popt"
+PROVIDES += "virtual/update-alternatives"
+
+PR = "r7"
+
+SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
+SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"
+
+inherit gettext
+
+# Makefile uses RPM_OPT_FLAGS to construct CFLAGS
+#
+EXTRA_OEMAKE = "\
+    'RPM_OPT_FLAGS=${CFLAGS}' \
+    'LDFLAGS=${LDFLAGS}' \
+    'BINDIR=${base_sbindir}' \
+    'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' \
+    'ALTDIR=${localstatedir}/lib/alternatives' \
+    'ALTDATADIR=${sysconfdir}/alternatives' \
+"
+
+do_unpack[postfuncs] += "obey_variables"
+do_unpack[vardeps] += "obey_variables"
+obey_variables () {
+	sed -i -e 's,/etc,${sysconfdir},; s,/lib/systemd,${base_libdir}/systemd,' ${S}/leveldb.h
+	sed -i -e 's,/etc/alternatives,${sysconfdir}/alternatives,' \
+	       -e 's,/var/lib/alternatives,${localstatedir}/lib/alternatives,' \
+	       -e 's,/usr/share/locale,${datadir}/locale,' ${S}/alternatives.c
+}
+
+do_install() {
+	oe_runmake 'DESTDIR=${D}' 'INSTALLNLSDIR=${D}${datadir}/locale' \
+		'BINDIR=${sbindir}' install
+	install -d ${D}${sysconfdir}/chkconfig.d
+}
+
+PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc"
+SUMMARY_${PN}-alternatives = "Maintain symbolic links determining default commands"
+DESCRIPTION_${PN}-alternatives = "alternatives creates, removes, maintains and displays \
+information about the symbolic links comprising the alternatives system."
+SUMMARY_${PN}-alternatives-doc = "${SUMMARY_${PN}-alternatives} - Documentation files"
+DESCRIPTION_${PN}-alternatives-doc = "${DESCRIPTION_${PN}-alternatives}  \
+This package contains documentation."
+RPROVIDES_${PN}-alternatives += "update-alternatives"
+RCONFLICTS_${PN}-alternatives = "update-alternatives-opkg update-alternatives-dpkg"
+FILES_${PN}-alternatives = "${sbindir}/alternatives ${sbindir}/update-alternatives \
+			    ${sysconfdir}/alternatives ${localstatedir}/lib/alternatives"
+FILES_${PN}-alternatives-doc = "${mandir}/man8/alternatives.8 \
+                                ${mandir}/man8/update-alternatives.8"
diff --git a/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..6ae2139
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: cpio-2.11/gnu/Makefile.am
+===================================================================
+--- cpio-2.11.orig/gnu/Makefile.am
++++ cpio-2.11/gnu/Makefile.am
+@@ -734,7 +734,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch b/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch
new file mode 100644
index 0000000..b54afb8
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch
@@ -0,0 +1,154 @@
+Description: CVE-2015-1197
+ Apply patch by Vitezslav Cizek of SuSE to fix CVE-2015-1197.
+ Upstream is dormant or no longer existing. To restore the old
+ behaviour use --extract-over-symlinks (Closes: #774669)
+ This issue has been discovered by Alexander Cherepanov.
+Author: Vitezslav Cizek <vcizek@suse.cz>
+Bug-Debian: https://bugs.debian.org/774669
+
+Upstream-Status: Backport
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+--- cpio-2.11+dfsg.orig/doc/cpio.1
++++ cpio-2.11+dfsg/doc/cpio.1
+@@ -22,6 +22,7 @@ cpio \- copy files to and from archives
+ [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message]
+ [\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse]
+ [\-\-only\-verify\-crc] [\-\-to\-stdout] [\-\-quiet] [\-\-rsh-command=command]
++[\-\-extract\-over\-symlinks]
+ [\-\-help] [\-\-version] [pattern...] [< archive]
+ 
+ .B cpio
+--- cpio-2.11+dfsg.orig/src/copyin.c
++++ cpio-2.11+dfsg/src/copyin.c
+@@ -700,6 +700,51 @@ copyin_link (struct cpio_file_stat *file
+   free (link_name);
+ }
+ 
++
++static int
++path_contains_symlink(char *path)
++{
++  struct stat st;
++  char *slash;
++  char *nextslash;
++
++  /* we got NULL pointer or empty string */
++  if (!path || !*path) {
++    return false;
++  }
++
++  slash = path;
++
++  while ((nextslash = strchr(slash + 1, '/')) != NULL) {
++    slash = nextslash;
++    *slash = '\0';
++
++    if (lstat(path, &st) != 0) {
++      if (errno == ELOOP) {
++        /* ELOOP - too many symlinks */
++        *slash = '/';
++        return true;
++      } else if (errno == ENOMEM) {
++        /* No memory for lstat - terminate */
++        xalloc_die();
++      } else {
++        /* cannot lstat path - give up */
++        *slash = '/';
++        return false;
++      }
++    }
++
++    if (S_ISLNK(st.st_mode)) {
++      *slash = '/';
++      return true;
++    }
++
++    *slash = '/';
++  }
++
++  return false;
++}
++
+ static void
+ copyin_file (struct cpio_file_stat *file_hdr, int in_file_des)
+ {
+@@ -1471,6 +1516,23 @@ process_copy_in ()
+ 	{
+ 	  /* Copy the input file into the directory structure.  */
+ 
++          /* Can we write files over symlinks? */
++          if (!extract_over_symlinks)
++            {
++              if (path_contains_symlink(file_hdr.c_name))
++                {
++                  /* skip the file */
++                  /*
++                  fprintf(stderr, "Can't write over symlinks. Skipping %s\n", file_hdr.c_name);
++                  tape_toss_input (in_file_des, file_hdr.c_filesize);
++                  tape_skip_padding (in_file_des, file_hdr.c_filesize);
++                  continue;
++                  */
++                  /* terminate */
++	          error (1, 0, _("Can't write over symlinks: %s\n"), file_hdr.c_name);
++                }
++            }
++
+ 	  /* Do we need to rename the file? */
+ 	  if (rename_flag || rename_batch_file)
+ 	    {
+--- cpio-2.11+dfsg.orig/src/extern.h
++++ cpio-2.11+dfsg/src/extern.h
+@@ -95,6 +95,7 @@ extern char input_is_special;
+ extern char output_is_special;
+ extern char input_is_seekable;
+ extern char output_is_seekable;
++extern bool extract_over_symlinks;
+ extern int (*xstat) ();
+ extern void (*copy_function) ();
+ 
+--- cpio-2.11+dfsg.orig/src/global.c
++++ cpio-2.11+dfsg/src/global.c
+@@ -187,6 +187,9 @@ bool to_stdout_option = false;
+ /* The name this program was run with.  */
+ char *program_name;
+ 
++/* Extract files over symbolic links */
++bool extract_over_symlinks;
++
+ /* A pointer to either lstat or stat, depending on whether
+    dereferencing of symlinks is done for input files.  */
+ int (*xstat) ();
+--- cpio-2.11+dfsg.orig/src/main.c
++++ cpio-2.11+dfsg/src/main.c
+@@ -57,7 +57,8 @@ enum cpio_options {
+   FORCE_LOCAL_OPTION,            
+   DEBUG_OPTION,                  
+   BLOCK_SIZE_OPTION,             
+-  TO_STDOUT_OPTION
++  TO_STDOUT_OPTION,
++  EXTRACT_OVER_SYMLINKS
+ };
+ 
+ const char *program_authors[] =
+@@ -222,6 +223,8 @@ static struct argp_option options[] = {
+    N_("Create leading directories where needed"), GRID+1 },
+   {"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0,
+    N_("Do not change the ownership of the files"), GRID+1 },
++  {"extract-over-symlinks", EXTRACT_OVER_SYMLINKS, 0, 0,
++   N_("Force writing over symbolic links"), GRID+1 },
+   {"unconditional", 'u', NULL, 0,
+    N_("Replace all files unconditionally"), GRID+1 },
+   {"sparse", SPARSE_OPTION, NULL, 0,
+@@ -412,6 +415,10 @@ crc newc odc bin ustar tar (all-caps als
+       no_chown_flag = true;
+       break;
+ 
++    case EXTRACT_OVER_SYMLINKS:		        /* --extract-over-symlinks */
++      extract_over_symlinks = true;
++      break;
++
+     case 'o':		/* Copy-out mode.  */
+       if (copy_function != 0)
+ 	error (PAXEXIT_FAILURE, 0, _("Mode already defined"));
diff --git a/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
new file mode 100644
index 0000000..89cd3cf
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
@@ -0,0 +1,220 @@
+cpio: Fix memory overrun on reading improperly created link records
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
+
+  * src/copyin.c (get_link_name): New function.
+  (list_file, copyin_link): use get_link_name
+
+  * tests/symlink-bad-length.at: New file.
+  * tests/symlink-long.at: New file.
+  * tests/Makefile.am: Add new files.
+  * tests/testsuite.at: Likewise.
+
+  See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
+
+Upstream-Status: Backport
+
+Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua>
+
+diff -Nurp cpio-2.11.orig/src/copyin.c cpio-2.11/src/copyin.c
+--- cpio-2.11.orig/src/copyin.c	2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/src/copyin.c	2014-12-08 13:14:04.355547508 +0800
+@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, off_
+ }
+ 
+ 
++static char *
++get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
++{
++  off_t n = file_hdr->c_filesize + 1;
++  char *link_name;
++
++  if (n == 0 || n > SIZE_MAX)
++    {
++      error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
++      link_name = NULL;
++    }
++  else
++    {
++      link_name = xmalloc (n);
++      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
++      link_name[file_hdr->c_filesize] = '\0';
++      tape_skip_padding (in_file_des, file_hdr->c_filesize);
++    }
++  return link_name;
++}
++
++
+ static void
+ list_file(struct cpio_file_stat* file_hdr, int in_file_des)
+ {
+@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
+ 	{
+ 	  if (archive_format != arf_tar && archive_format != arf_ustar)
+ 	    {
+-	      char *link_name = NULL;	/* Name of hard and symbolic links.  */
+-
+-	      link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+-	      link_name[file_hdr->c_filesize] = '\0';
+-	      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+-	      long_format (file_hdr, link_name);
+-	      free (link_name);
+-	      tape_skip_padding (in_file_des, file_hdr->c_filesize);
+-	      return;
++	      char *link_name = get_link_name (file_hdr, in_file_des);
++	      if (link_name)
++		{
++		  long_format (file_hdr, link_name);
++		  free (link_name);
++		}
+ 	    }
+ 	  else
+-	    {
+ 	      long_format (file_hdr, file_hdr->c_tar_linkname);
+-	      return;
+-	    }
++	  return;
+ 	}
+       else
+ #endif
+@@ -650,10 +667,7 @@ copyin_link(struct cpio_file_stat *file_
+ 
+   if (archive_format != arf_tar && archive_format != arf_ustar)
+     {
+-      link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+-      link_name[file_hdr->c_filesize] = '\0';
+-      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+-      tape_skip_padding (in_file_des, file_hdr->c_filesize);
++      link_name = get_link_name (file_hdr, in_file_des);
+     }
+   else
+     {
+diff -Nurp cpio-2.11.orig/tests/Makefile.am cpio-2.11/tests/Makefile.am
+--- cpio-2.11.orig/tests/Makefile.am	2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/tests/Makefile.am	2014-12-08 13:14:49.931545727 +0800
+@@ -52,6 +52,8 @@ TESTSUITE_AT = \
+  setstat04.at\
+  setstat05.at\
+  symlink.at\
++ symlink-bad-length.at\
++ symlink-long.at\
+  version.at
+ 
+ TESTSUITE = $(srcdir)/testsuite
+diff -Nurp cpio-2.11.orig/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at
+--- cpio-2.11.orig/tests/symlink-bad-length.at	1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.11/tests/symlink-bad-length.at	2014-12-08 13:17:45.979538847 +0800
+@@ -0,0 +1,49 @@
++# Process this file with autom4te to create testsuite.  -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11 did segfault with badly set symlink length.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-bad-length])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_DATA([ARCHIVE.base64],
++[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
++JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
++UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
++])
++
++AT_CHECK([
++base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
++cpio -ntv < ARCHIVE
++test $? -eq 2
++],
++[0],
++[-rw-rw-r--   1 10029    10031          13 Nov 25 13:52 FILE
++],[cpio: LINK: stored filename length too big
++cpio: premature end of file
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.11.orig/tests/symlink-long.at cpio-2.11/tests/symlink-long.at
+--- cpio-2.11.orig/tests/symlink-long.at	1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.11/tests/symlink-long.at	2014-12-08 13:17:57.219538408 +0800
+@@ -0,0 +1,46 @@
++# Process this file with autom4te to create testsuite.  -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11.90 changed the way symlink name is read from archive.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-long])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_CHECK([
++
++# len(dirname) > READBUFSIZE
++dirname=
++for i in {1..52}; do
++    dirname="xxxxxxxxx/$dirname"
++    mkdir "$dirname"
++done
++ln -s "$dirname" x || AT_SKIP_TEST
++
++echo x | cpio -o > ar
++list=`cpio -tv < ar | sed 's|.*-> ||'`
++test "$list" = "$dirname" && echo success || echo fail
++],
++[0],
++[success
++],[2 blocks
++2 blocks
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.11.orig/tests/testsuite.at cpio-2.11/tests/testsuite.at
+--- cpio-2.11.orig/tests/testsuite.at	2010-02-15 18:02:23.000000000 +0800
++++ cpio-2.11/tests/testsuite.at	2014-12-08 13:15:13.515544805 +0800
+@@ -31,6 +31,8 @@ m4_include([version.at])
+ 
+ m4_include([inout.at])
+ m4_include([symlink.at])
++m4_include([symlink-bad-length.at])
++m4_include([symlink-long.at])
+ m4_include([interdir.at])
+ 
+ m4_include([setstat01.at])
diff --git a/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
new file mode 100644
index 0000000..b4d113d
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
@@ -0,0 +1,20 @@
+ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: cpio-2.11/gnu/stdio.in.h
+===================================================================
+--- cpio-2.11.orig/gnu/stdio.in.h	2012-07-04 12:13:43.133066247 -0700
++++ cpio-2.11/gnu/stdio.in.h	2012-07-04 12:14:10.189067564 -0700
+@@ -138,8 +138,10 @@
+ /* It is very rare that the developer ever has full control of stdin,
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
++#if defined gets
+ #undef gets
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/meta/recipes-extended/cpio/cpio-2.11/statdef.patch b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
new file mode 100644
index 0000000..a6b8e82
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
@@ -0,0 +1,17 @@
+Avoid multiple stat definitions
+Patch taken from cpio mailing list posting 2010-03-19
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
+--- cpio-2.11.orig/src/filetypes.h	2010-02-12 02:19:23.000000000 -0800
++++ cpio-2.11/src/filetypes.h	2010-07-23 13:17:25.000000000 -0700
+@@ -82,4 +82,6 @@
+ #define lstat stat
+ #endif
+ int lstat ();
++#ifndef stat
+ int stat ();
++#endif
diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
new file mode 100644
index 0000000..49a7cf5
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+
+This patch avoids heap overflow reported by :
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
+
+This is a clean patch for the GPLv2 tar recipe.
+
+the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio 
+recipe, as they share code.
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
+
+Index: tar-1.17/lib/rtapelib.c
+===================================================================
+--- tar-1.17.orig/lib/rtapelib.c
++++ tar-1.17/lib/rtapelib.c
+@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
+ 
+   sprintf (command_buffer, "R%lu\n", (unsigned long) length);
+   if (do_command (handle, command_buffer) == -1
+-      || (status = get_status (handle)) == SAFE_READ_ERROR)
++      || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
+     return SAFE_READ_ERROR;
+ 
+   for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch
new file mode 100644
index 0000000..0148e70
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch
@@ -0,0 +1,217 @@
+cpio: Fix memory overrun on reading improperly created link records
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
+
+  * src/copyin.c (get_link_name): New function.
+  (list_file, copyin_link): use get_link_name
+
+  * tests/symlink-bad-length.at: New file.
+  * tests/symlink-long.at: New file.
+  * tests/Makefile.am: Add new files.
+  * tests/testsuite.at: Likewise.
+
+  See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
+
+Upstream-Status: Backport
+
+Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua>
+
+diff -Nurp cpio-2.8.orig/src/copyin.c cpio-2.8/src/copyin.c
+--- cpio-2.8.orig/src/copyin.c	2007-06-07 19:58:03.000000000 +0800
++++ cpio-2.8/src/copyin.c	2014-12-08 11:30:01.159791484 +0800
+@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, int
+ }
+ 
+ 
++static char *
++get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
++{
++  off_t n = file_hdr->c_filesize + 1;
++  char *link_name;
++
++  if (n == 0 || n > SIZE_MAX)
++    {
++      error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
++      link_name = NULL;
++    }
++  else
++    {
++      link_name = xmalloc (n);
++      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
++      link_name[file_hdr->c_filesize] = '\0';
++      tape_skip_padding (in_file_des, file_hdr->c_filesize);
++    }
++  return link_name;
++}
++
++
+ static void
+ list_file(struct cpio_file_stat* file_hdr, int in_file_des)
+ {
+@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
+ 	{
+ 	  if (archive_format != arf_tar && archive_format != arf_ustar)
+ 	    {
+-	      char *link_name = NULL;	/* Name of hard and symbolic links.  */
+-
+-	      link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+-	      link_name[file_hdr->c_filesize] = '\0';
+-	      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+-	      long_format (file_hdr, link_name);
+-	      free (link_name);
+-	      tape_skip_padding (in_file_des, file_hdr->c_filesize);
+-	      return;
++	      char *link_name = get_link_name (file_hdr, in_file_des);
++	      if (link_name)
++		{
++		  long_format (file_hdr, link_name);
++		  free (link_name);
++		}
+ 	    }
+ 	  else
+-	    {
+ 	      long_format (file_hdr, file_hdr->c_tar_linkname);
+-	      return;
+-	    }
++	  return;
+ 	}
+       else
+ #endif
+@@ -732,10 +749,7 @@ copyin_link(struct cpio_file_stat *file_
+ 
+   if (archive_format != arf_tar && archive_format != arf_ustar)
+     {
+-      link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
+-      link_name[file_hdr->c_filesize] = '\0';
+-      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
+-      tape_skip_padding (in_file_des, file_hdr->c_filesize);
++      link_name = get_link_name (file_hdr, in_file_des);
+     }
+   else
+     {
+diff -Nurp cpio-2.8.orig/tests/Makefile.am cpio-2.8/tests/Makefile.am
+--- cpio-2.8.orig/tests/Makefile.am	2006-10-24 18:32:13.000000000 +0800
++++ cpio-2.8/tests/Makefile.am	2014-12-08 11:30:52.387789482 +0800
+@@ -45,6 +45,8 @@ TESTSUITE_AT = \
+  testsuite.at\
+  inout.at\
+  symlink.at\
++ symlink-bad-length.at\
++ symlink-long.at\
+  version.at
+ 
+ TESTSUITE = $(srcdir)/testsuite
+diff -Nurp cpio-2.8.orig/tests/symlink-bad-length.at cpio-2.8/tests/symlink-bad-length.at
+--- cpio-2.8.orig/tests/symlink-bad-length.at	1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.8/tests/symlink-bad-length.at	2014-12-08 11:33:25.283783507 +0800
+@@ -0,0 +1,49 @@
++# Process this file with autom4te to create testsuite.  -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11 did segfault with badly set symlink length.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-bad-length])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_DATA([ARCHIVE.base64],
++[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
++JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
++UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
++AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
++])
++
++AT_CHECK([
++base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
++cpio -ntv < ARCHIVE
++test $? -eq 2
++],
++[0],
++[-rw-rw-r--   1 10029    10031          13 Nov 25 13:52 FILE
++],[cpio: LINK: stored filename length too big
++cpio: premature end of file
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.8.orig/tests/symlink-long.at cpio-2.8/tests/symlink-long.at
+--- cpio-2.8.orig/tests/symlink-long.at	1970-01-01 08:00:00.000000000 +0800
++++ cpio-2.8/tests/symlink-long.at	2014-12-08 11:34:28.807781024 +0800
+@@ -0,0 +1,46 @@
++# Process this file with autom4te to create testsuite.  -*- Autotest -*-
++# Copyright (C) 2014 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301 USA.
++
++# Cpio v2.11.90 changed the way symlink name is read from archive.
++# References:
++# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
++
++AT_SETUP([symlink-long])
++AT_KEYWORDS([symlink-long copyout])
++
++AT_CHECK([
++
++# len(dirname) > READBUFSIZE
++dirname=
++for i in {1..52}; do
++    dirname="xxxxxxxxx/$dirname"
++    mkdir "$dirname"
++done
++ln -s "$dirname" x || AT_SKIP_TEST
++
++echo x | cpio -o > ar
++list=`cpio -tv < ar | sed 's|.*-> ||'`
++test "$list" = "$dirname" && echo success || echo fail
++],
++[0],
++[success
++],[2 blocks
++2 blocks
++])
++
++AT_CLEANUP
+diff -Nurp cpio-2.8.orig/tests/testsuite.at cpio-2.8/tests/testsuite.at
+--- cpio-2.8.orig/tests/testsuite.at	2006-10-24 18:32:13.000000000 +0800
++++ cpio-2.8/tests/testsuite.at	2014-12-08 11:34:56.515779942 +0800
+@@ -31,3 +31,5 @@ m4_include([version.at])
+ 
+ m4_include([inout.at])
+ m4_include([symlink.at])
++m4_include([symlink-bad-length.at])
++m4_include([symlink-long.at])
diff --git a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
new file mode 100644
index 0000000..e16585d
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
+# This is needed to configure correctly with newer versions of autoconf.
+
+diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4
+--- cpio-2.8.orig/m4/extensions.m4	2006-10-12 04:34:45.000000000 -0700
++++ cpio-2.8/m4/extensions.m4	2010-07-23 14:37:36.000000000 -0700
+@@ -1,4 +1,4 @@
+-# serial 4  -*- Autoconf -*-
++# serial 5  -*- Autoconf -*-
+ # Enable extensions on systems that normally disable them.
+ 
+ # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+@@ -16,6 +16,7 @@
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
+ # typically due to standards-conformance issues.
++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
+ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+ [
+   AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+@@ -48,7 +49,7 @@
+     AC_DEFINE([__EXTENSIONS__])
+   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+   AC_DEFINE([_TANDEM_SOURCE])
+-])
++])])
+ 
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
new file mode 100644
index 0000000..a00799f
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Avoid multiple stat definitions
+# Patch taken from cpio mailing list posting 2010-03-19
+
+diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
+--- cpio-2.11.orig/src/filetypes.h	2010-02-12 02:19:23.000000000 -0800
++++ cpio-2.11/src/filetypes.h	2010-07-23 13:17:25.000000000 -0700
+@@ -82,4 +82,6 @@
+ #define lstat stat
+ #endif
+ int lstat ();
++#ifndef stat
+ int stat ();
++#endif
diff --git a/meta/recipes-extended/cpio/cpio_2.11.bb b/meta/recipes-extended/cpio/cpio_2.11.bb
new file mode 100644
index 0000000..c5d92bf
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.11.bb
@@ -0,0 +1,15 @@
+include cpio_v2.inc
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+PR = "r5"
+
+SRC_URI += "file://remove-gets.patch \
+        file://fix-memory-overrun.patch \
+        file://cpio-CVE-2015-1197.patch \
+        file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+        "
+
+SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
+SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb
new file mode 100644
index 0000000..3f97dbe
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -0,0 +1,17 @@
+require cpio_v2.inc
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
+
+PR = "r4"
+
+SRC_URI += "file://m4extensions.patch \
+	    file://avoid_heap_overflow.patch \
+	    file://fix-memory-overrun.patch \
+	   "
+
+SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1"
+SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad"
+
+# Required to build with gcc 4.3 and later:
+CFLAGS += "-fgnu89-inline"
diff --git a/meta/recipes-extended/cpio/cpio_v2.inc b/meta/recipes-extended/cpio/cpio_v2.inc
new file mode 100644
index 0000000..93de4bb
--- /dev/null
+++ b/meta/recipes-extended/cpio/cpio_v2.inc
@@ -0,0 +1,40 @@
+SUMMARY = "GNU cpio is a program to manage archives of files"
+DESCRIPTION = "GNU cpio is a tool for creating and extracting archives, or copying files from one place to \
+another. It handles a number of cpio formats as well as reading and writing tar files."
+HOMEPAGE = "http://www.gnu.org/software/cpio/"
+SECTION = "base"
+
+DEPENDS = "texinfo-native"
+
+SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
+    file://statdef.patch \
+    "
+
+inherit autotools gettext texinfo
+
+S = "${WORKDIR}/cpio-${PV}"
+
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
+
+do_install () {
+    autotools_do_install
+    install -d ${D}${base_bindir}/
+    mv "${D}${bindir}/cpio" "${D}${base_bindir}/cpio"
+    rmdir ${D}${bindir}/
+}
+
+PACKAGES =+ "${PN}-rmt"
+
+FILES_${PN}-rmt = "${base_sbindir}/rmt*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "cpio"
+ALTERNATIVE_${PN}-rmt = "rmt"
+
+ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
+
+ALTERNATIVE_PRIORITY[rmt] = "50"
+ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
diff --git a/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch
new file mode 100644
index 0000000..adbe7df
--- /dev/null
+++ b/meta/recipes-extended/cracklib/cracklib/0001-packlib.c-support-dictionary-byte-order-dependent.patch
@@ -0,0 +1,339 @@
+From 8a6e43726ad0ae41bd1cc2c248d91deb31459357 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Tue, 9 Jun 2015 11:11:48 +0900
+Subject: [PATCH] packlib.c: support dictionary byte order dependent
+
+The previous dict files are NOT byte-order independent, in fact they are
+probably ARCHITECTURE SPECIFIC.
+Create the dict files in big endian, and convert to host endian while
+load them. This could fix the endian issue on multiple platform.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Upstream-Status: Pending
+
+We can't use the endian.h, htobe* and be*toh functions because they are
+not available on older versions of glibc, such as that found in RHEL
+5.9.
+
+Change to checking endian and directly calling bswap_* as defined in
+byteswap.h.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ lib/packlib.c | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 210 insertions(+), 4 deletions(-)
+
+diff --git a/lib/packlib.c b/lib/packlib.c
+index f851424..3aac805 100644
+--- a/lib/packlib.c
++++ b/lib/packlib.c
+@@ -16,6 +16,12 @@
+ #ifdef HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
++
++#ifndef _BSD_SOURCE
++#define _BSD_SOURCE             /* See feature_test_macros(7) */
++#endif
++#include <endian.h>
++#include <byteswap.h>
+ #include "packer.h"
+ 
+ static const char vers_id[] = "packlib.c : v2.3p2 Alec Muffett 18 May 1993";
+@@ -45,6 +51,185 @@ typedef struct
+     char data_get[NUMWORDS][MAXWORDLEN];
+ } PWDICT64;
+ 
++enum{
++    en_is32,
++    en_is64
++};
++
++static int
++IheaderHostToBigEndian(char *pHeader, int nBitType)
++{
++    if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader;
++
++        pHeader64->pih_magic = bswap_64(pHeader64->pih_magic);
++        pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords);
++        pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen);
++        pHeader64->pih_pad = bswap_16(pHeader64->pih_pad);
++
++#if DEBUG
++        printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n",
++          pHeader64->pih_magic, pHeader64->pih_numwords,
++          pHeader64->pih_blocklen, pHeader64->pih_pad);
++#endif
++    }
++    else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        struct pi_header *pHeader32 = (struct pi_header*)pHeader;
++
++        pHeader32->pih_magic = bswap_32(pHeader32->pih_magic);
++        pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords);
++        pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen);
++        pHeader32->pih_pad = bswap_16(pHeader32->pih_pad);
++
++#if DEBUG
++        printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n",
++          pHeader32->pih_magic, pHeader32->pih_numwords,
++          pHeader32->pih_blocklen, pHeader32->pih_pad);
++#endif
++    }
++    else if (__BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
++        return (-1);
++    }
++
++    return 0;
++}
++
++static int
++IheaderBigEndianToHost(char *pHeader, int nBitType)
++{
++    if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        struct pi_header64 *pHeader64 = (struct pi_header64*)pHeader;
++
++        pHeader64->pih_magic = bswap_64(pHeader64->pih_magic);
++        pHeader64->pih_numwords = bswap_64(pHeader64->pih_numwords);
++        pHeader64->pih_blocklen = bswap_16(pHeader64->pih_blocklen);
++        pHeader64->pih_pad = bswap_16(pHeader64->pih_pad);
++
++#if DEBUG
++        printf("Header64: magic %x, numwords %x, blocklen %x, pad %x\n",
++          pHeader64->pih_magic, pHeader64->pih_numwords,
++          pHeader64->pih_blocklen, pHeader64->pih_pad);
++#endif
++    }
++    else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        struct pi_header *pHeader32 = (struct pi_header*)pHeader;
++
++        pHeader32->pih_magic = bswap_32(pHeader32->pih_magic);
++        pHeader32->pih_numwords = bswap_32(pHeader32->pih_numwords);
++        pHeader32->pih_blocklen = bswap_16(pHeader32->pih_blocklen);
++        pHeader32->pih_pad = bswap_16(pHeader32->pih_pad);
++
++#if DEBUG
++        printf("Header32: magic %x, numwords %x, blocklen %x, pad %x\n",
++            pHeader32->pih_magic, pHeader32->pih_numwords,
++            pHeader32->pih_blocklen, pHeader32->pih_pad);
++#endif
++    }
++    else if (__BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
++        return (-1);
++    }
++
++    return 0;
++}
++
++static int
++HwmsHostToBigEndian(char *pHwms, int nLen,int nBitType)
++{
++    int i = 0;
++
++    if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        uint64_t *pHwms64 = (uint64_t*)pHwms;
++
++        for (i = 0; i < nLen / sizeof(uint64_t); i++)
++        {
++            *pHwms64 = bswap_64(*pHwms64);
++            *pHwms64++;
++        }
++
++    }
++    else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        uint32_t *pHwms32 = (uint32_t*)pHwms;
++
++        for (i = 0; i < nLen / sizeof(uint32_t); i++)
++        {
++            *pHwms32 = bswap_32(*pHwms32);
++            *pHwms32++;
++        }
++
++    }
++    else if (__BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
++        return (-1);
++    }
++
++#if DEBUG
++    for (i = 0; i < nLen; i+=8)
++    {
++        printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n",
++            nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF,
++            pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF,
++            pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF);
++    }
++#endif
++
++    return 0;
++}
++
++static int
++HwmsBigEndianToHost(char *pHwms, int nLen, int nBitType)
++{
++    int i = 0;
++
++    if (nBitType == en_is64 && __BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        uint64_t *pHwms64 = (uint64_t*)pHwms;
++
++        for (i = 0; i < nLen / sizeof(uint64_t); i++)
++        {
++            *pHwms64++ = bswap_64(*pHwms64);
++        }
++
++    }
++    else if (nBitType == en_is32 && __BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        uint32_t *pHwms32 = (uint32_t*)pHwms;
++
++        for (i = 0; i < nLen / sizeof(uint32_t); i++)
++        {
++            *pHwms32 = bswap_32(*pHwms32);
++            *pHwms32++;
++        }
++
++    }
++    else if (__BYTE_ORDER == __LITTLE_ENDIAN)
++    {
++        fprintf(stderr, "Neither 32 or 64: %d\n", nBitType);
++        return (-1);
++    }
++
++#if DEBUG
++    for (i = 0; i < nLen; i+=8)
++    {
++        printf("hwms%s: %02X %02X %02X %02X %02X %02X %02X %02X\n",
++            nBitType==en_is64?"64":"32", pHwms[i+0]&0xFF, pHwms[i+1]&0xFF,
++            pHwms[i+2]&0xFF, pHwms[i+3]&0xFF, pHwms[i+4]&0xFF,
++            pHwms[i+5]&0xFF, pHwms[i+6]&0xFF, pHwms[i+7]&0xFF);
++    }
++#endif
++
++    return 0;
++}
+ 
+ static int
+ _PWIsBroken64(FILE *ifp)
+@@ -57,6 +242,7 @@ _PWIsBroken64(FILE *ifp)
+        return 0;
+     }
+ 
++    IheaderBigEndianToHost((char *) &pdesc64.header, en_is64);
+     return (pdesc64.header.pih_magic == PIH_MAGIC);
+ }
+ 
+@@ -149,7 +335,11 @@ PWOpen(prefix, mode)
+ 	pdesc.header.pih_blocklen = NUMWORDS;
+ 	pdesc.header.pih_numwords = 0;
+ 
+-	fwrite((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp);
++	struct pi_header tmpheader32;
++
++	memcpy(&tmpheader32,  &pdesc.header, sizeof(pdesc.header));
++	IheaderHostToBigEndian((char *) &tmpheader32, en_is32);
++	fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, ifp);
+     } else
+     {
+ 	pdesc.flags &= ~PFOR_WRITE;
+@@ -173,6 +363,7 @@ PWOpen(prefix, mode)
+ 	    return NULL;
+ 	}
+ 
++        IheaderBigEndianToHost((char *) &pdesc.header, en_is32);
+         if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0))
+         {
+             /* uh-oh. either a broken "64-bit" file or a garbage file. */
+@@ -195,6 +386,7 @@ PWOpen(prefix, mode)
+ 		}
+                 return NULL;
+             }
++            IheaderBigEndianToHost((char *) &pdesc64.header, en_is64);
+             if (pdesc64.header.pih_magic != PIH_MAGIC)
+             {
+                 /* nope, not "64-bit" after all */
+@@ -290,6 +482,7 @@ PWOpen(prefix, mode)
+                 {
+                     pdesc.flags &= ~PFOR_USEHWMS;
+                 }
++                HwmsBigEndianToHost((char*)pdesc64.hwms, sizeof(pdesc64.hwms), en_is64);
+                 for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++)
+                 {
+                     pdesc.hwms[i] = pdesc64.hwms[i];
+@@ -299,6 +492,7 @@ PWOpen(prefix, mode)
+ 	    {
+ 		pdesc.flags &= ~PFOR_USEHWMS;
+ 	    }
++	    HwmsBigEndianToHost((char*)pdesc.hwms, sizeof(pdesc.hwms), en_is32);
+ #if DEBUG
+             for (i=1; i<=0xff; i++)
+             {
+@@ -332,7 +526,11 @@ PWClose(pwp)
+ 	    return (-1);
+ 	}
+ 
+-	if (!fwrite((char *) &pwp->header, sizeof(pwp->header), 1, pwp->ifp))
++	struct pi_header tmpheader32;
++
++	memcpy(&tmpheader32,  &pwp->header, sizeof(pwp->header));
++	IheaderHostToBigEndian((char *) &tmpheader32, en_is32);
++	if (!fwrite((char *) &tmpheader32, sizeof(tmpheader32), 1, pwp->ifp))
+ 	{
+ 	    fprintf(stderr, "index magic fwrite failed\n");
+ 	    return (-1);
+@@ -351,7 +549,12 @@ PWClose(pwp)
+ 	    	printf("hwm[%02x] = %d\n", i, pwp->hwms[i]);
+ #endif
+ 	    }
+-	    fwrite(pwp->hwms, 1, sizeof(pwp->hwms), pwp->wfp);
++
++	    PWDICT tmp_pwp;
++
++	    memcpy(&tmp_pwp, pwp, sizeof(PWDICT));
++	    HwmsHostToBigEndian(tmp_pwp.hwms, sizeof(tmp_pwp.hwms), en_is32);
++	    fwrite(tmp_pwp.hwms, 1, sizeof(tmp_pwp.hwms), pwp->wfp);
+ 	}
+     }
+ 
+@@ -405,7 +608,8 @@ PutPW(pwp, string)
+ 
+ 	datum = (uint32_t) ftell(pwp->dfp);
+ 
+-	fwrite((char *) &datum, sizeof(datum), 1, pwp->ifp);
++	uint32_t tmpdatum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum;
++	fwrite((char *) &tmpdatum, sizeof(tmpdatum), 1, pwp->ifp);
+ 
+ 	fputs(pwp->data_put[0], pwp->dfp);
+ 	putc(0, pwp->dfp);
+@@ -464,6 +668,7 @@ GetPW(pwp, number)
+            perror("(index fread failed)");
+            return NULL;
+        }
++       datum64 = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_64(datum64) : datum64;
+        datum = datum64;
+     } else {
+        if (fseek(pwp->ifp, sizeof(struct pi_header) + (thisblock * sizeof(uint32_t)), 0))
+@@ -477,6 +682,7 @@ GetPW(pwp, number)
+            perror("(index fread failed)");
+            return NULL;
+        }
++       datum = (__BYTE_ORDER == __LITTLE_ENDIAN) ? bswap_32(datum) : datum;
+     }
+ 
+ 	int r = 1;
+-- 
+1.8.4.2
+
diff --git a/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch
new file mode 100644
index 0000000..6210e82
--- /dev/null
+++ b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch
@@ -0,0 +1,53 @@
+From 06f9a88b5dd5597f9198ea0cb34f5e96f180e6e3 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 27 Apr 2013 16:02:30 +0800
+Subject: [PATCH] craklib:fix testnum and teststr failed
+
+Error log:
+...
+$ ./testnum
+(null).pwd.gz: No such file or directory
+PWOpen: No such file or directory
+
+$ ./util/teststr
+(null).pwd.gz: No such file or directory
+PWOpen: No such file or directory
+...
+Set DEFAULT_CRACKLIB_DICT as the path of  PWOpen
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Upstream-Status: Pending
+---
+ util/testnum.c |    2 +-
+ util/teststr.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/util/testnum.c b/util/testnum.c
+index ae2246d..ca210ff 100644
+--- a/util/testnum.c
++++ b/util/testnum.c
+@@ -20,7 +20,7 @@ main ()
+     PWDICT *pwp;
+     char buffer[STRINGSIZE];
+ 
+-    if (!(pwp = PWOpen (NULL, "r")))
++    if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r")))
+     {
+ 	perror ("PWOpen");
+ 	return (-1);
+diff --git a/util/teststr.c b/util/teststr.c
+index 2a31fa4..9fb9cda 100644
+--- a/util/teststr.c
++++ b/util/teststr.c
+@@ -15,7 +15,7 @@ main ()
+     PWDICT *pwp;
+     char buffer[STRINGSIZE];
+ 
+-    if (!(pwp = PWOpen (NULL, "r")))
++    if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r")))
+     {
+ 	perror ("PWOpen");
+ 	return (-1);
+-- 
+1.7.10.4
+
diff --git a/meta/recipes-extended/cracklib/cracklib_2.9.5.bb b/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
new file mode 100644
index 0000000..c0ffe33
--- /dev/null
+++ b/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Password strength checker library"
+HOMEPAGE = "http://sourceforge.net/projects/cracklib"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
+
+DEPENDS = "cracklib-native zlib python"
+RDEPEND_${PN}-python += "python"
+
+PACKAGES += "${PN}-python"
+
+EXTRA_OECONF = "--with-python --libdir=${base_libdir}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \
+           file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \
+           file://0002-craklib-fix-testnum-and-teststr-failed.patch"
+
+SRC_URI[md5sum] = "376790a95c1fb645e59e6e9803c78582"
+SRC_URI[sha256sum] = "59ab0138bc8cf90cccb8509b6969a024d5e58d2d02bcbdccbb9ba9b88be3fa33"
+
+inherit autotools gettext pythonnative python-dir
+
+do_install_append_class-target() {
+	create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
+}
+
+do_install_append() {
+	src_dir="${D}${base_libdir}/${PYTHON_DIR}/site-packages"
+	rm -f $src_dir/*.pyo
+	rm -f $src_dir/test_cracklib.py
+	# Move python files from ${base_libdir} to ${libdir} since used --libdir=${base_libdir}
+	install -d -m 0755 ${D}${PYTHON_SITEPACKAGES_DIR}/
+	mv $src_dir/* ${D}${PYTHON_SITEPACKAGES_DIR}
+	rm -fr ${D}${base_libdir}/${PYTHON_DIR}
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/cracklib.py \
+	${PYTHON_SITEPACKAGES_DIR}/_cracklib.so \
+    "
+FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/_cracklib.so"
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_cracklib.a \
+	${PYTHON_SITEPACKAGES_DIR}/_cracklib.la \
+    "
diff --git a/meta/recipes-extended/cronie/cronie/crond.init b/meta/recipes-extended/cronie/cronie/crond.init
new file mode 100755
index 0000000..53b8514
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crond.init
@@ -0,0 +1,58 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: crond crontab
+# Default-Start:  2345
+# Default-Stop:   016
+# Short-Description: run cron daemon
+# Description: cron is a standard UNIX program that runs user-specified
+#              programs at periodic scheduled times. vixie cron adds a
+#              number of features to the basic UNIX cron, including better
+#              security and more powerful configuration options.
+### END INIT INFO
+
+CROND=/usr/sbin/crond
+CONFIG=/etc/sysconfig/crond
+
+[ -f $CONFIG ] || exit 1
+[ -x $CROND ] || exit 1
+
+. $CONFIG
+
+# Source function library.
+. /etc/init.d/functions
+
+case "$1" in
+  start)
+    echo -n "Starting crond: "
+    start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS
+    RETVAL=$?
+    if [ $RETVAL -eq 0 ] ; then
+        echo "OK"
+    else
+        echo "FAIL"
+    fi
+    ;;
+  stop)
+    echo -n "Stopping crond: "
+    start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid
+    RETVAL=$?
+    if [ $RETVAL -eq 0 ] ; then
+        echo "OK"
+    else
+        echo "FAIL"
+    fi
+    ;;
+  status)
+    status crond
+    exit $?
+    ;;
+  restart)
+    $0 stop && sleep 1 && $0 start
+    ;;
+  *)
+    echo "Usage: /etc/init.d/crond {start|stop|status|restart}"
+    exit 1
+esac
+
+exit 0
+
diff --git a/meta/recipes-extended/cronie/cronie/crond.service b/meta/recipes-extended/cronie/cronie/crond.service
new file mode 100644
index 0000000..d435a6e
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crond.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Periodic Command Scheduler
+
+[Service]
+EnvironmentFile=/etc/sysconfig/crond
+ExecStart=@SBINDIR@/crond -n $CRONDARGS
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/cronie/cronie/crond_pam_config.patch b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
new file mode 100644
index 0000000..675872c
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
@@ -0,0 +1,19 @@
+password-auth is the Fedora's common pam configure file, use oe common pam
+configure files instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+--- cronie-1.4.7/pam/crond.orig	2010-12-16 16:59:02.000000000 +0800
++++ cronie-1.4.7/pam/crond	2011-07-20 09:47:16.080819203 +0800
+@@ -4,7 +4,7 @@
+ #
+ # No PAM authentication called, auth modules not needed
+ account    required   pam_access.so
+-account    include    password-auth
++account    include    common-account
+ session    required   pam_loginuid.so
+-session    include    password-auth
+-auth       include    password-auth
++session    include    common-session-noninteractive
++auth       include    common-auth
diff --git a/meta/recipes-extended/cronie/cronie/crontab b/meta/recipes-extended/cronie/cronie/crontab
new file mode 100644
index 0000000..22c4feb
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crontab
@@ -0,0 +1,14 @@
+# /etc/crontab: system-wide crontab
+# Unlike any other crontab you don't have to run the `crontab'
+# command to install the new version when you edit this file
+# and files in /etc/cron.d. These files also have username fields,
+# that none of the other crontabs do.
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+#  m  h  dom mon dow user	command
+#  1  *     * * *    root        cd / && run-parts /etc/cron.hourly
+# 30  7     * * *    root        cd / && run-parts /etc/cron.daily
+# 42  7     * * 7    root        cd / && run-parts /etc/cron.weekly
+# 55  7     1 * *    root        cd / && run-parts /etc/cron.monthly
diff --git a/meta/recipes-extended/cronie/cronie_1.5.0.bb b/meta/recipes-extended/cronie/cronie_1.5.0.bb
new file mode 100644
index 0000000..38bd593
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie_1.5.0.bb
@@ -0,0 +1,81 @@
+SUMMARY = "Cron daemon for executing programs at set times"
+DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
+specified programs at scheduled times and related tools. It is based on the \
+original cron and has security and configuration enhancements like the \
+ability to use pam and SELinux."
+HOMEPAGE = "https://fedorahosted.org/cronie/"
+BUGTRACKER = "mmaslano@redhat.com"
+
+# Internet Systems Consortium License
+LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
+                    file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
+                    file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
+
+SECTION = "utils"
+
+SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
+           file://crond.init \
+           file://crontab \
+           file://crond.service \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+PAM_SRC_URI = "file://crond_pam_config.patch"
+PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
+
+SRC_URI[md5sum] = "9db75e1884d83a45e002d145c6c54d45"
+SRC_URI[sha256sum] = "9cf0e3f4f5042a9c09413d62c8e0c055e12401f70b112465f0f81f2c84ebfb3f"
+
+inherit autotools update-rc.d useradd systemd
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+
+PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
+
+INITSCRIPT_NAME = "crond"
+INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system crontab"
+
+SYSTEMD_SERVICE_${PN} = "crond.service"
+
+do_install_append () {
+	install -d ${D}${sysconfdir}/sysconfig/
+	install -d ${D}${sysconfdir}/init.d/
+	install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
+	install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
+
+	# install systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+	       -e 's,@SBINDIR@,${sbindir},g' \
+	       ${D}${systemd_unitdir}/system/crond.service
+
+	# below are necessary for a complete cron environment
+	install -d ${D}${localstatedir}/spool/cron
+	install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
+	mkdir -p ${D}${sysconfdir}/cron.d
+	mkdir -p ${D}${sysconfdir}/cron.hourly
+	mkdir -p ${D}${sysconfdir}/cron.daily
+	mkdir -p ${D}${sysconfdir}/cron.weekly
+	mkdir -p ${D}${sysconfdir}/cron.monthly
+	touch ${D}${sysconfdir}/cron.deny
+
+	# below setting is necessary to allow normal user using crontab
+
+	# setgid for crontab binary
+	chown root:crontab ${D}${bindir}/crontab
+	chmod 2755 ${D}${bindir}/crontab
+
+	# allow 'crontab' group write to /var/spool/cron
+	chown root:crontab ${D}${localstatedir}/spool/cron
+	chmod 770 ${D}${localstatedir}/spool/cron
+
+	chmod 600 ${D}${sysconfdir}/crontab
+}
+
+FILES_${PN} += "${sysconfdir}/cron*"
+CONFFILES_${PN} += "${sysconfdir}/crontab"
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
new file mode 100644
index 0000000..57cdf26
--- /dev/null
+++ b/meta/recipes-extended/cups/cups.inc
@@ -0,0 +1,123 @@
+SUMMARY = "An Internet printing system for Unix"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & LGPLv2"
+DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
+
+SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
+           file://use_echo_only_in_init.patch \
+           file://0001-don-t-try-to-run-generated-binaries.patch \
+           file://cups_serverbin.patch \
+           file://cups.socket \
+           file://cups.path \
+           file://cups.service \
+	  "
+
+LEAD_SONAME = "libcupsdriver.so"
+
+CLEANBROKEN = "1"
+
+inherit autotools-brokensep binconfig useradd systemd
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system lpadmin"
+
+SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
+PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
+
+EXTRA_OECONF = " \
+               --enable-gnutls \
+               --enable-dbus \
+               --enable-browsing \
+               --disable-gssapi \
+               --enable-debug \
+               --disable-relro \
+               --enable-libusb \
+               --without-php \
+               --without-perl \
+               --without-python \
+               --without-java \
+               "
+
+EXTRA_AUTORECONF += "--exclude=autoheader"
+
+do_compile () {
+	echo "all:"    >  man/Makefile
+	echo "libs:" >> man/Makefile
+	echo "install:" >> man/Makefile
+	echo "install-data:" >> man/Makefile
+	echo "install-exec:" >> man/Makefile
+	echo "install-headers:" >> man/Makefile
+	echo "install-libs:" >> man/Makefile
+
+	oe_runmake
+}
+
+do_install () {
+	oe_runmake "DSTROOT=${D}" install
+
+	# Remove /var/run from package as cupsd will populate it on startup
+	rm -fr ${D}/${localstatedir}/run
+	rmdir ${D}/${libdir}/${BPN}/driver
+
+	# Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES
+	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
+	    rm -rf ${D}${sysconfdir}/init.d/
+	    rm -rf ${D}${sysconfdir}/rc*
+	fi
+
+	# Install systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
+}
+
+python do_package_append() {
+    import subprocess
+    # Change permissions back the way they were, they probably had a reason...
+    workdir = d.getVar('WORKDIR', True)
+    subprocess.call('chmod 0511 %s/install/cups/var/run/cups/certs' % workdir, shell=True)
+}
+
+PACKAGES =+ "${PN}-lib ${PN}-libimage"
+
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'procps', '', d)}"
+FILES_${PN} += "${libdir}/cups/backend \
+		${libdir}/cups/cgi-bin \
+		${libdir}/cups/filter \
+		${libdir}/cups/monitor \
+		${libdir}/cups/notifier \
+		${libdir}/cups/daemon \
+	       "
+
+FILES_${PN}-lib = "${libdir}/libcups.so.*"
+
+FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
+
+FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
+                    ${libdir}/cups/cgi-bin/.debug \
+                    ${libdir}/cups/filter/.debug \
+                    ${libdir}/cups/monitor/.debug \
+                    ${libdir}/cups/notifier/.debug \
+                    ${libdir}/cups/daemon/.debug \
+                   "
+
+#package the html for the webgui inside the main packages (~1MB uncompressed)
+
+FILES_${PN} += "${datadir}/doc/cups/images \
+                ${datadir}/doc/cups/*html \
+                ${datadir}/doc/cups/*.css \
+                ${datadir}/icons/ \
+               "
+CONFFILES_${PN} += "${sysconfdir}/cups/cupsd.conf"
+
+SYSROOT_PREPROCESS_FUNCS += "cups_sysroot_preprocess"
+cups_sysroot_preprocess () {
+	sed -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/cups-config -e 's:cups_datadir=.*:cups_datadir=${datadir}/cups:' -e 's:cups_serverbin=.*:cups_serverbin=${libdir}/cups:'
+}
diff --git a/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
new file mode 100644
index 0000000..5379eb6
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/0001-don-t-try-to-run-generated-binaries.patch
@@ -0,0 +1,69 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+From 90069586167b930befce7303aea57078f04b4ed8 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Sun, 30 Jan 2011 16:37:27 +0100
+Subject: [PATCH] don't try to run generated binaries
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ ppdc/Makefile |   30 +++++++++++++++---------------
+ 1 files changed, 15 insertions(+), 15 deletions(-)
+
+Index: cups-2.0.0/ppdc/Makefile
+===================================================================
+--- cups-2.0.0.orig/ppdc/Makefile
++++ cups-2.0.0/ppdc/Makefile
+@@ -242,8 +242,8 @@ genstrings:		genstrings.o libcupsppdc.a
+ 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \
+ 		libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \
+ 		$(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+-	echo Generating localization strings...
+-	./genstrings >sample.c
++#	echo Generating localization strings...
++#	./genstrings >sample.c
+ 
+ 
+ #
+@@ -260,9 +260,9 @@ ppdc-static:		ppdc.o libcupsppdc.a ../cu
+ 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
+ 		../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ 		$(COMMONLIBS) $(LIBZ)
+-	echo Testing PPD compiler...
+-	./ppdc-static -l en,fr -I ../data foo.drv
+-	./ppdc-static -l en,fr -z -I ../data foo.drv
++#	echo Testing PPD compiler...
++#	./ppdc-static -l en,fr -I ../data foo.drv
++#	./ppdc-static -l en,fr -z -I ../data foo.drv
+ 
+ 
+ #
+@@ -288,17 +288,17 @@ ppdi-static:		ppdc-static ppdi.o libcups
+ 	$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdi-static ppdi.o libcupsppdc.a \
+ 		../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
+ 		$(COMMONLIBS) $(LIBZ)
+-	echo Testing PPD importer...
+-	$(RM) -r ppd ppd2 sample-import.drv
+-	./ppdc-static -l en -I ../data sample.drv
+-	./ppdi-static -I ../data -o sample-import.drv ppd/*
+-	./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
+-	if diff -r ppd ppd2 >/dev/null; then \
+-		echo PPD import OK; \
+-	else \
+-		echo PPD import FAILED; \
+-		exit 1; \
+-	fi
++#	echo Testing PPD importer...
++#	$(RM) -r ppd ppd2 sample-import.drv
++#	./ppdc-static -l en -I ../data sample.drv
++#	./ppdi-static -I ../data -o sample-import.drv ppd/*
++#	./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
++#	if diff -r ppd ppd2 >/dev/null; then \
++#		echo PPD import OK; \
++#	else \
++#		echo PPD import FAILED; \
++#		exit 1; \
++#	fi
+ 
+ 
+ #
diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path
new file mode 100644
index 0000000..de8cc57
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printer Service Spool
+
+[Path]
+PathExistsGlob=/var/spool/cups/d*
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service
new file mode 100644
index 0000000..7d3e839
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=CUPS Printing Service
+
+[Service]
+ExecStart=@SBINDIR@/cupsd -f
+PrivateTmp=true
+
+[Install]
+Also=cups.socket cups.path
+WantedBy=printer.target
diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket
new file mode 100644
index 0000000..3314870
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=CUPS Printing Service Sockets
+
+[Socket]
+ListenStream=/var/run/cups/cups.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/meta/recipes-extended/cups/cups/cups_serverbin.patch b/meta/recipes-extended/cups/cups/cups_serverbin.patch
new file mode 100644
index 0000000..f7b44a7
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups_serverbin.patch
@@ -0,0 +1,32 @@
+Make CUPS_SERVERBIN relative to libdir otherwise on 64bit arches
+e.g. ppc64 where base libdir is lib64 this does not go well
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [OE config specific]
+
+Index: cups-1.4.6/config-scripts/cups-directories.m4
+===================================================================
+--- cups-1.4.6.orig/config-scripts/cups-directories.m4	2009-04-12 16:04:51.000000000 -0700
++++ cups-1.4.6/config-scripts/cups-directories.m4	2012-07-21 12:12:05.896405923 -0700
+@@ -397,7 +397,7 @@
+ 	*)
+ 		# All others
+ 		INSTALL_SYSV="install-sysv"
+-		CUPS_SERVERBIN="$exec_prefix/lib/cups"
++		CUPS_SERVERBIN="$libdir/cups"
+ 		;;
+ esac
+ 
+Index: cups-1.4.6/configure
+===================================================================
+--- cups-1.4.6.orig/configure	2012-07-21 12:13:34.512405950 -0700
++++ cups-1.4.6/configure	2012-07-21 12:14:05.724406017 -0700
+@@ -11181,7 +11181,7 @@
+ 	*)
+ 		# All others
+ 		INSTALL_SYSV="install-sysv"
+-		CUPS_SERVERBIN="$exec_prefix/lib/cups"
++		CUPS_SERVERBIN="$libdir/cups"
+ 		;;
+ esac
+ 
diff --git a/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch
new file mode 100644
index 0000000..696f137
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/use_echo_only_in_init.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Index: cups-1.6.1/scheduler/cups.sh.in
+===================================================================
+--- cups-1.6.1.orig/scheduler/cups.sh.in
++++ cups-1.6.1/scheduler/cups.sh.in
+@@ -67,7 +67,7 @@ case "`uname`" in
+ 		ECHO_ERROR=:
+ 		;;
+ 
+-	Linux*)
++	DisableLinux*)
+ 		IS_ON=/bin/true
+ 		if test -f /etc/init.d/functions; then
+ 			. /etc/init.d/functions
diff --git a/meta/recipes-extended/cups/cups_2.0.4.bb b/meta/recipes-extended/cups/cups_2.0.4.bb
new file mode 100644
index 0000000..bad73b3
--- /dev/null
+++ b/meta/recipes-extended/cups/cups_2.0.4.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
+
+SRC_URI[md5sum] = "f5c847d9a4fac6c4c66fb0526a7afaae"
+SRC_URI[sha256sum] = "e1d5e68d9f24faca317aeaebc164c34102813bc0f1d69c00b3a59b49c49f4abd"
diff --git a/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
new file mode 100644
index 0000000..43ea3ce
--- /dev/null
+++ b/meta/recipes-extended/cwautomacros/cwautomacros_20110201.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Collection of autoconf m4 macros"
+SECTION = "base"
+HOMEPAGE = "http://sourceforge.net/projects/cwautomacros.berlios/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}.berlios/${BP}.tar.bz2"
+SRC_URI[md5sum] = "074afcb50d0a8bff10786a2954b2b02d"
+SRC_URI[sha256sum] = "3115603b891f3a163c0bbb5fea2f3742113a183fa6745ee5e89e5f6d0e9f6121"
+
+do_configure() {
+	:
+}
+
+do_install() {
+	oe_runmake CWAUTOMACROSPREFIX=${D}${prefix} install
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
new file mode 100644
index 0000000..cc05d1d
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
@@ -0,0 +1,27 @@
+Upstream-Status: Pending
+
+automake 1.12 has depricated automatic de-ANSI-fication support
+
+this patch avoids these kinds of errors:
+
+| configure.ac:90: error: automatic de-ANSI-fication support has been removed
+| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
+| /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/diffutils-2.8.1-r4/diffutils-2.8.1/m4/prereq.m4:110: jm_PREREQ_QUOTEARG is expanded from...
+| configure.ac:90: the top level
+| autom4te: m4 failed with exit status: 1
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/05/04
+
+Index: diffutils-2.8.1/m4/prereq.m4
+===================================================================
+--- diffutils-2.8.1.orig/m4/prereq.m4
++++ diffutils-2.8.1/m4/prereq.m4
+@@ -115,7 +115,6 @@ AC_DEFUN([jm_PREREQ_QUOTEARG],
+   AC_HEADER_STDC
+   AC_C_BACKSLASH_A
+   AC_MBSTATE_T
+-  AM_C_PROTOTYPES
+ ])
+ 
+ AC_DEFUN([jm_PREREQ_REGEX],
diff --git a/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..ba1a4ba
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest b/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest
new file mode 100644
index 0000000..695c5e8
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -C tests check-TESTS
diff --git a/meta/recipes-extended/diffutils/diffutils.inc b/meta/recipes-extended/diffutils/diffutils.inc
new file mode 100644
index 0000000..243341a
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Diffutils contains tools used for finding differences between files"
+DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
+sdiff, and cmp utilities. These programs are usually \
+used for creating patch files."
+SECTION = "base"
+
+inherit autotools texinfo update-alternatives gettext
+
+# diffutils assumes non-glibc compilation with uclibc and
+# this causes it to generate its own implementations of
+# standard functionality.  regex.c actually breaks compilation
+# because it uses __mempcpy, there are other things (TBD:
+# see diffutils.mk in buildroot)
+EXTRA_OECONF_libc-uclibc = "--without-included-regex"
+
+ALTERNATIVE_${PN} = "diff cmp"
+ALTERNATIVE_PRIORITY = "100"
+
diff --git a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
new file mode 100644
index 0000000..bf425bb
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
@@ -0,0 +1,16 @@
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+require diffutils.inc
+
+PR = "r7.0"
+
+SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \
+           file://diffutils_fix_for_automake-1.12.patch"
+
+SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428"
+SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a"
+
+do_configure_prepend () {
+	chmod u+w ${S}/po/Makefile.in.in
+}
diff --git a/meta/recipes-extended/diffutils/diffutils_3.3.bb b/meta/recipes-extended/diffutils/diffutils_3.3.bb
new file mode 100644
index 0000000..5008690
--- /dev/null
+++ b/meta/recipes-extended/diffutils/diffutils_3.3.bb
@@ -0,0 +1,37 @@
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+require diffutils.inc
+
+SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://run-ptest \
+"
+
+EXTRA_OECONF += "--without-libsigsegv-prefix"
+
+do_configure_prepend () {
+	# Need to remove gettext macros with weird mix of versions
+	for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do
+		rm -f ${S}/m4/$i
+	done
+}
+
+SRC_URI[md5sum] = "99180208ec2a82ce71f55b0d7389f1b3"
+SRC_URI[sha256sum] = "a25e89a8ab65fded1731e4186be1bb25cda967834b6df973599cdcd5abdfc19c"
+
+inherit ptest
+
+do_install_ptest() {
+	t=${D}${PTEST_PATH}
+	install -D ${S}/build-aux/test-driver $t/build-aux/test-driver
+	cp -r ${S}/tests $t/
+	install ${B}/tests/Makefile $t/tests/
+	sed -e 's|^Makefile:|_Makefile:|' \
+	    -e 's|bash|sh|' \
+	    -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \
+	    -e 's|^srcdir = \(.*\)|srcdir = .|' \
+	    -e 's|"`$(built_programs)`"|diff|' \
+	    -e 's|gawk|awk|g' \
+	    -i $t/tests/Makefile
+}
diff --git a/meta/recipes-extended/ed/ed_0.5.bb b/meta/recipes-extended/ed/ed_0.5.bb
new file mode 100644
index 0000000..143e636
--- /dev/null
+++ b/meta/recipes-extended/ed/ed_0.5.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Line-oriented text editor"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
+                    file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
+
+PR = "r2"
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
+SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e"
+
+inherit autotools texinfo
+
+EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
+
+CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}"
+CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}"
+
+
diff --git a/meta/recipes-extended/ed/ed_1.9.bb b/meta/recipes-extended/ed/ed_1.9.bb
new file mode 100644
index 0000000..8e94eed
--- /dev/null
+++ b/meta/recipes-extended/ed/ed_1.9.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Line-oriented text editor"
+HOMEPAGE = "http://www.gnu.org/software/ed/"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+                    file://ed.h;endline=20;md5=375a20cc2545ac1115eeb7b323c60ae3 \
+                    file://main.c;endline=17;md5=14dbb325c1f2d4daf50e0aa5c5038e96"
+
+SECTION = "base"
+
+# LSB states that ed should be in /bin/
+bindir = "${base_bindir}"
+
+SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "565b6d1d5a9a8816b9b304fc4ed9405d"
+SRC_URI[sha256sum] = "d5b372cfadf073001823772272fceac2cfa87552c5cd5a8efc1c8aae61f45a88"
+
+inherit texinfo
+
+do_configure() {
+	${S}/configure
+}
+
+do_install() {
+	oe_runmake 'DESTDIR=${D}' install
+	# Info dir listing isn't interesting at this point so remove it if it exists.
+	if [ -e "${D}${infodir}/dir" ]; then
+		rm -f ${D}${infodir}/dir
+	fi
+}
diff --git a/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
new file mode 100644
index 0000000..bf66267
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch
@@ -0,0 +1,19 @@
+ptest needs buildtest-TESTS and runtest-TESTS targets.
+serial-tests is required to generate those targets.
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Inappropriate
+(default automake behavior incompatible with ptest)
+
+diff -ruN a/configure.ac b/configure.ac
+--- a/configure.ac	2014-05-28 18:19:13.513980977 +0200
++++ b/configure.ac	2014-05-28 18:19:21.129660215 +0200
+@@ -2,7 +2,7 @@
+ AC_INIT(ethtool, 3.14, netdev@vger.kernel.org)
+ AC_PREREQ(2.52)
+ AC_CONFIG_SRCDIR([ethtool.c])
+-AM_INIT_AUTOMAKE([gnu])
++AM_INIT_AUTOMAKE([gnu serial-tests])
+ AC_CONFIG_HEADERS([ethtool-config.h])
+ 
+ AM_MAINTAINER_MODE
diff --git a/meta/recipes-extended/ethtool/ethtool/run-ptest b/meta/recipes-extended/ethtool/ethtool/run-ptest
new file mode 100644
index 0000000..1e245da
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool/run-ptest
@@ -0,0 +1,2 @@
+#!/bin/sh
+make -k runtest-TESTS
diff --git a/meta/recipes-extended/ethtool/ethtool_4.0.bb b/meta/recipes-extended/ethtool/ethtool_4.0.bb
new file mode 100644
index 0000000..13f2b1c
--- /dev/null
+++ b/meta/recipes-extended/ethtool/ethtool_4.0.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Display or change ethernet card settings"
+DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
+HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
+           file://run-ptest \
+           file://avoid_parallel_tests.patch \
+           "
+
+SRC_URI[md5sum] = "0a1c78787c7dcf077016ed86372a472f"
+SRC_URI[sha256sum] = "e200516727cc9583e8b63fd6e72f667f9ed41bb4f0577ff4803b60c64cfd1dbc"
+
+inherit autotools ptest
+RDEPENDS_${PN}-ptest += "make"
+
+do_compile_ptest() {
+   oe_runmake buildtest-TESTS
+}
+
+do_install_ptest () {
+   cp ${B}/Makefile                 ${D}${PTEST_PATH}
+   install ${B}/test-cmdline        ${D}${PTEST_PATH}
+   install ${B}/test-features       ${D}${PTEST_PATH}
+   install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
+   sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
+}
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch
new file mode 100644
index 0000000..2076e44
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch
@@ -0,0 +1,53 @@
+From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Tue, 17 Sep 2013 16:11:16 +0800
+Subject: [PATCH] findutils: fix doc build error
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ doc/find.texi |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/doc/find.texi b/doc/find.texi
+index 5b5f0cf..b3d9c6b 100644
+--- a/doc/find.texi
++++ b/doc/find.texi
+@@ -63,7 +63,7 @@ translation approved by the Foundation.
+
+ @page
+ @vskip 0pt plus 1filll
+-@insertcopying{}
++@insertcopying
+ @end titlepage
+
+ @contents
+@@ -1466,6 +1466,7 @@ no output is ever sent to it.
+ * Escapes::
+ * Format Directives::
+ * Time Formats::
++* Formatting Flags::
+ @end menu
+
+ @node Escapes
+@@ -1534,7 +1535,6 @@ from the novel you are reading.
+ * Size Directives::
+ * Location Directives::
+ * Time Directives::
+-* Formatting Flags::
+ @end menu
+
+ @node Name Directives
+@@ -1780,7 +1780,7 @@ setting the TZ environment variable).  This is a GNU extension.
+ @end table
+
+ @node Formatting Flags
+-@subsubsection Formatting Flags
++@subsection Formatting Flags
+
+ The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0}
+ and @samp{+} flags, but the other directives do not, even if they
+--
+1.7.4.1
+
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
new file mode 100644
index 0000000..2d0ddb4
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Pending
+
+automake 1.12 has depricated automatic de-ANSI-fication support
+
+this patch avoids these kinds of errors:
+
+| configure.in:75: error: automatic de-ANSI-fication support has been removed
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/05/04
+
+Index: findutils-4.2.31/configure.in
+===================================================================
+--- findutils-4.2.31.orig/configure.in
++++ findutils-4.2.31/configure.in
+@@ -72,7 +72,6 @@ dnl gl_EARLY calls AC_GNU_SOURCE anyway.
+ 
+ 
+ AC_ISC_POSIX
+-AM_C_PROTOTYPES
+ 
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch
new file mode 100644
index 0000000..65bd642
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch
@@ -0,0 +1,56 @@
+Upstream-Status: Inappropriate [legacy version]
+
+the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE
+
+against 4.2.31
+07/08/2010 - qhe
+
+diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
+index 143a9e5..0f27ceb 100644
+--- a/gnulib/m4/extensions.m4
++++ b/gnulib/m4/extensions.m4
+@@ -12,44 +12,6 @@
+ # enough in this area it's likely we'll need to redefine
+ # AC_USE_SYSTEM_EXTENSIONS for quite some time.
+ 
+-# AC_USE_SYSTEM_EXTENSIONS
+-# ------------------------
+-# Enable extensions on systems that normally disable them,
+-# typically due to standards-conformance issues.
+-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+-[
+-  AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+-  AC_BEFORE([$0], [AC_RUN_IFELSE])
+-
+-  AC_REQUIRE([AC_GNU_SOURCE])
+-  AC_REQUIRE([AC_AIX])
+-  AC_REQUIRE([AC_MINIX])
+-
+-  AH_VERBATIM([__EXTENSIONS__],
+-[/* Enable extensions on Solaris.  */
+-#ifndef __EXTENSIONS__
+-# undef __EXTENSIONS__
+-#endif
+-#ifndef _POSIX_PTHREAD_SEMANTICS
+-# undef _POSIX_PTHREAD_SEMANTICS
+-#endif
+-#ifndef _TANDEM_SOURCE
+-# undef _TANDEM_SOURCE
+-#endif])
+-  AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+-    [ac_cv_safe_to_define___extensions__],
+-    [AC_COMPILE_IFELSE(
+-       [AC_LANG_PROGRAM([
+-#	  define __EXTENSIONS__ 1
+-	  AC_INCLUDES_DEFAULT])],
+-       [ac_cv_safe_to_define___extensions__=yes],
+-       [ac_cv_safe_to_define___extensions__=no])])
+-  test $ac_cv_safe_to_define___extensions__ = yes &&
+-    AC_DEFINE([__EXTENSIONS__])
+-  AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+-  AC_DEFINE([_TANDEM_SOURCE])
+-])
+-
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
diff --git a/meta/recipes-extended/findutils/findutils.inc b/meta/recipes-extended/findutils/findutils.inc
new file mode 100644
index 0000000..37c84cc
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils.inc
@@ -0,0 +1,24 @@
+SUMMARY = "find, locate, and xargs binaries"
+DESCRIPTION = "The GNU Find Utilities are the basic directory searching utilities of the GNU operating system. \
+These programs are typically used in conjunction with other programs to provide modular and powerful directory \
+search and file locating capabilities to other commands."
+HOMEPAGE = "http://www.gnu.org/software/findutils/"
+BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
+SECTION = "console/utils"
+
+
+SRC_URI = "ftp://alpha.gnu.org/gnu/${BPN}/${BP}.tar.gz"
+
+inherit autotools gettext texinfo update-alternatives
+
+ALTERNATIVE_${PN} = "find xargs"
+ALTERNATIVE_PRIORITY = "100"
+
+# diffutils assumes non-glibc compilation with uclibc and
+# this causes it to generate its own implementations of
+# standard functionality.  regex.c actually breaks compilation
+# because it uses __mempcpy, there are other things (TBD:
+# see diffutils.mk in buildroot)
+EXTRA_OECONF_libc-uclibc = "--without-included-regex"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..8729e1b
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: findutils-4.5.14/gl/lib/Makefile.am
+===================================================================
+--- findutils-4.5.14.orig/gl/lib/Makefile.am
++++ findutils-4.5.14/gl/lib/Makefile.am
+@@ -1220,7 +1220,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/findutils/findutils_4.2.31.bb b/meta/recipes-extended/findutils/findutils_4.2.31.bb
new file mode 100644
index 0000000..7dee018
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils_4.2.31.bb
@@ -0,0 +1,14 @@
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+PR = "r4"
+
+require findutils.inc
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+           file://gnulib-extension.patch \
+           file://findutils_fix_for_automake-1.12.patch \
+           file://findutils-fix-doc-build-error.patch \
+           "
+
+SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a"
+SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204"
diff --git a/meta/recipes-extended/findutils/findutils_4.5.14.bb b/meta/recipes-extended/findutils/findutils_4.5.14.bb
new file mode 100644
index 0000000..a58a82f
--- /dev/null
+++ b/meta/recipes-extended/findutils/findutils_4.5.14.bb
@@ -0,0 +1,17 @@
+require findutils.inc
+
+# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+ 
+DEPENDS = "bison-native"
+
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+
+SRC_URI[md5sum] = "a8a8176282fd28e8d1234c84d847fa66"
+SRC_URI[sha256sum] = "0de3cf625a5c9f154eee3171e072515ffdde405244dd00502af617ac57b73ae2"
+
+# http://savannah.gnu.org/bugs/?27299
+CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
+
+EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
new file mode 100644
index 0000000..790c981
--- /dev/null
+++ b/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
@@ -0,0 +1,37 @@
+SUMMARY = "OpenPrinting printer support - filters"
+DESCRIPTION = "Foomatic is a printer database designed to make it easier to set up \
+common printers for use with UNIX-like operating systems.\
+It provides the "glue" between a print spooler (like CUPS or lpr) and \
+the printer, by processing files sent to the printer. \
+ \
+This package consists of filters used by the printer spoolers \
+to convert the incoming PostScript data into the printer's native \
+format using a printer-specific, but spooler-independent PPD file. \
+"
+
+DEPENDS += "cups perl libxml2"
+PR = "r1"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "b05f5dcbfe359f198eef3df5b283d896"
+SRC_URI[sha256sum] = "a2e2e53e502571e88eeb9010c45a0d54671f15707ee104f5c9c22b59ea7a33e3"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops"
+
+do_configure_prepend() {
+    export PERL="${bindir}/env perl"
+    export CUPS_SERVERBIN=${exec_prefix}/lib/cups       # /usr/lib NOT libdir
+}
+
+do_install_append_linuxstdbase() {
+    install -d ${D}${exec_prefix}/lib/cups/filter
+    ln -sf ${bindir}/foomatic-rip ${D}${exec_prefix}/lib/cups/filter
+}
+
+FILES_${PN} += "${exec_prefix}/lib/cups/ ${exec_prefix}/lib/ppr/"
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
new file mode 100644
index 0000000..b3e7987
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Pending
+
+automake 1.12 has depricated automatic de-ANSI-fication support
+
+this patch avoids these kinds of errors:
+
+| configure.ac:127: error: automatic de-ANSI-fication support has been removed
+| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
+| configure.ac:127: the top level
+| autom4te: m4 failed with exit status: 1
+...
+| Makefile.am:27: error: automatic de-ANSI-fication support has been removed
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/05/04
+
+Index: gawk-3.1.5/configure.ac
+===================================================================
+--- gawk-3.1.5.orig/configure.ac
++++ gawk-3.1.5/configure.ac
+@@ -124,7 +124,6 @@ fi
+ 
+ dnl check for C compiler for automake
+ AM_PROG_CC_STDC
+-AM_C_PROTOTYPES
+ 
+ dnl Cygwin doesn't like to get libs with full paths
+ dnl since that overrides linking against DLLs.
+Index: gawk-3.1.5/Makefile.am
+===================================================================
+--- gawk-3.1.5.orig/Makefile.am
++++ gawk-3.1.5/Makefile.am
+@@ -24,7 +24,7 @@
+ ## process this file with automake to produce Makefile.in
+ 
+ # Automatic de-ANSI-fication if needed, make .bz2 files also.
+-AUTOMAKE_OPTIONS = ansi2knr dist-bzip2
++AUTOMAKE_OPTIONS = dist-bzip2
+ 
+ # This undocumented variable insures that aclocal runs
+ # correctly after changing configure.ac
diff --git a/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest b/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest
new file mode 100644
index 0000000..d23f0bf
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-4.1.3/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd test
+for i in `grep -vE "@|^$|#|Gt-dummy" Maketests |awk -F: '{print $1}'`; \
+  do LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} srcdir=`pwd` AWK=gawk CMP=cmp \
+  make -f Maketests $i >$i.tmp 2>&1; \
+  grep -q "Error" $i.tmp; \
+  if [ $? -eq 0 ]; then echo "FAIL: $i"; \
+  else echo "PASS: $i"; rm -f $i.tmp; fi; \
+done
diff --git a/meta/recipes-extended/gawk/gawk_3.1.5.bb b/meta/recipes-extended/gawk/gawk_3.1.5.bb
new file mode 100644
index 0000000..c7af4a9
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_3.1.5.bb
@@ -0,0 +1,42 @@
+SUMMARY = "GNU awk text processing utility"
+DESCRIPTION = "The GNU version of awk, a text processing utility. \
+Awk interprets a special-purpose programming language to do \
+quick and easy text pattern matching and reformatting jobs."
+HOMEPAGE = "www.gnu.org/software/gawk"
+BUGTRACKER  = "bug-gawk@gnu.org"
+SECTION = "console/utils"
+
+# gawk <= 3.1.5: GPLv2
+# gawk >= 3.1.6: GPLv3
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+RDEPENDS_gawk += "gawk-common"
+RDEPENDS_pgawk += "gawk-common"
+PR = "r2"
+
+SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
+	file://gawk-3.1.5_fix_for_automake-1.12.patch"
+
+SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30"
+SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8"
+
+inherit autotools gettext texinfo update-alternatives
+
+PACKAGES += "gawk-common pgawk"
+
+FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
+FILES_gawk-common += "${datadir}/awk/* ${libdir}/gawk/awk/*"
+FILES_pgawk = "${bindir}/pgawk*"
+FILES_${PN}-dbg += "${libdir}/gawk/awk/.debug"
+
+ALTERNATIVE_${PN} = "awk"
+ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
+ALTERNATIVE_PRIORITY = "100"
+
+CFLAGS += "-D PROTOTYPES"
+
+do_install_append() {
+	# remove the link since we don't package it
+	rm ${D}${bindir}/awk
+}
diff --git a/meta/recipes-extended/gawk/gawk_4.1.3.bb b/meta/recipes-extended/gawk/gawk_4.1.3.bb
new file mode 100644
index 0000000..d1a88e4
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk_4.1.3.bb
@@ -0,0 +1,47 @@
+SUMMARY = "GNU awk text processing utility"
+DESCRIPTION = "The GNU version of awk, a text processing utility. \
+Awk interprets a special-purpose programming language to do \
+quick and easy text pattern matching and reformatting jobs."
+HOMEPAGE = "https://www.gnu.org/software/gawk/"
+BUGTRACKER  = "bug-gawk@gnu.org"
+SECTION = "console/utils"
+
+# gawk <= 3.1.5: GPLv2
+# gawk >= 3.1.6: GPLv3
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS += "readline"
+
+PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
+
+SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
+           file://run-ptest \
+"
+
+SRC_URI[md5sum] = "55d37f4069502677f25d1340df8eec97"
+SRC_URI[sha256sum] = "524effa5b9ecd4ed940f2581c5d3c1df4e4bd7e6f768aa033c1916f47dfc6e29"
+
+inherit autotools gettext texinfo update-alternatives
+
+FILES_${PN} += "${datadir}/awk"
+FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
+FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
+
+ALTERNATIVE_${PN} = "awk"
+ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install_append() {
+	# remove the link since we don't package it
+	rm ${D}${bindir}/awk
+}
+
+inherit ptest
+
+do_install_ptest() {
+	mkdir ${D}${PTEST_PATH}/test
+	for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: '{print $1}'` Maketests; \
+	  do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
+	done
+}
diff --git a/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h
new file mode 100644
index 0000000..a05de29
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h
new file mode 100644
index 0000000..e8772cd
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h
new file mode 100644
index 0000000..359097f
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch
new file mode 100644
index 0000000..d97d4ec
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch
@@ -0,0 +1,36 @@
+base/genht.c: add a preprocessor define to allow fopen calling
+
+The commit in upstream:
+http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643
+
+Replace all fopen calls with gp_fopen and add a preprocessor define so
+that any unintential calls directly to fopen will cause an error.
+
+Only exceptions are those in the platform specific code, and mkromfs.c.
+This patch add a preprocessor define to allow fopen calling in base/genht.c.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/genht.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/base/genht.c b/base/genht.c
+index 4b04085..cc82fff 100644
+--- a/base/genht.c
++++ b/base/genht.c
+@@ -16,6 +16,10 @@
+ 
+ /* Generate C code for compiling halftones into ROM. */
+ #include "malloc_.h"
++
++/* prevent gp.h from defining fopen */
++#define fopen fopen
++
+ #include "stdio_.h"
+ #include "string_.h"
+ #include "gscdefs.h"
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
new file mode 100644
index 0000000..a1c9368
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch
@@ -0,0 +1,31 @@
+Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it
+
+Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
+
+This addresses the cryto dependency seen during build.
+
+Upstream-Status: Backport
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+Rebase the patch to ghostscript-9.15
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ cups/libs/cups/http-private.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/cups/libs/cups/http-private.h b/cups/libs/cups/http-private.h
+index 99a85c3..a674852 100644
+--- a/cups/libs/cups/http-private.h
++++ b/cups/libs/cups/http-private.h
+@@ -80,7 +80,6 @@ typedef int socklen_t;
+ #  elif defined HAVE_GNUTLS
+ #    include <gnutls/gnutls.h>
+ #    include <gnutls/x509.h>
+-#    include <gcrypt.h>
+ #  elif defined(HAVE_CDSASSL)
+ #    include <CoreFoundation/CoreFoundation.h>
+ #    include <Security/Security.h>
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
new file mode 100644
index 0000000..e28a949
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch
@@ -0,0 +1,28 @@
+Import patch from windriver linux for cross compilation, and split patches
+into oe way under different directories such as i586, powerpc etc according 
+to Richard's opinion.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+# Author: Chi Xu <chi.xu@windriver.com>
+# Date: Feb 26 2010
+# Summary: Generate arch.h for ppc32
+#
+
+diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
+--- ghostscript-8.64.orig/base/lib.mak	2010-02-10 10:30:02.000000000 +0800
++++ ghostscript-8.64/base/lib.mak	2010-02-10 10:56:21.000000000 +0800
+@@ -67,8 +67,8 @@
+ stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+ stdint__h=$(GLSRC)stdint_.h $(std_h)
+ 
+-$(GLGEN)arch.h : $(GENARCH_XE)
+-	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE)
++##$(GLGEN)arch.h : $(GENARCH_XE)
++##	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE)
+ 
+ # Platform interfaces
+ 
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
new file mode 100644
index 0000000..bc29be5
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
@@ -0,0 +1,100 @@
+ust use commands provided by ghostscript-native, preventing recompile them when
+compile ghostscript.
+Way to enable cross compile.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+diff --git a/base/unix-aux.mak b/base/unix-aux.mak
+index a91fb26..c991d11 100644
+--- a/base/unix-aux.mak
++++ b/base/unix-aux.mak
+@@ -69,46 +69,46 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\
+  $(MAKEDIRS)
+ 	$(GLCC) $(GLO_)gp_sysv.$(OBJ) $(C_) $(GLSRC)gp_sysv.c
+ 
+-# -------------------------- Auxiliary programs --------------------------- #
+-
+-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
+-	$(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
+-
+-# On the RS/6000 (at least), compiling genarch.c with gcc with -O
+-# produces a buggy executable.
+-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
+-	$(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
+-
+-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
+-	$(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
+-
+-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
+-	$(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
+-
+-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
+-	$(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
+-
+-# To get GS to use the system zlib, you remove/hide the gs/zlib directory
+-# which means that the mkromfs build can't find the zlib source it needs.
+-# So it's split into two targets, one using the zlib source directly.....
+-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
+-
+-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(MAKEDIRS)
+-	$(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
+-
+-# .... and one using the zlib library linked via the command line
+-MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
+- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
+-
+-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(MAKEDIRS)
+-	$(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
+-
+-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
+-	$(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
++## -------------------------- Auxiliary programs --------------------------- #
++#
++#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
++#	$(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
++#
++## On the RS/6000 (at least), compiling genarch.c with gcc with -O
++## produces a buggy executable.
++#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
++#	$(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
++#
++#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
++#	$(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
++#
++#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
++#	$(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
++#
++#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
++#	$(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
++#
++## To get GS to use the system zlib, you remove/hide the gs/zlib directory
++## which means that the mkromfs build can't find the zlib source it needs.
++## So it's split into two targets, one using the zlib source directly.....
++#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
++# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
++# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
++#
++#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(MAKEDIRS)
++#	$(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
++#
++## .... and one using the zlib library linked via the command line
++#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
++# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
++# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
++# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
++#
++#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(MAKEDIRS)
++#	$(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
++#
++#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
++#	$(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
+ 
+ # Query the environment to construct gconfig_.h.
+ # These are all defined conditionally (except the JasPER one), so that
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch
new file mode 100644
index 0000000..797b894
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch
@@ -0,0 +1,40 @@
+From be1e1b33191afdcfe3c2ecc4ff3e361a5859e9c6 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Fri, 30 Jan 2015 00:40:22 -0800
+Subject: [PATCH] contrib.mak: fix for parallel build
+
+Fixed:
+rm: cannot remove `/usr/share/ghostscript/9.15/lib': Is a directory
+
+Create lib before install to fix the race issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ contrib/contrib.mak |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/contrib/contrib.mak b/contrib/contrib.mak
+index 08a80d1..de2e20d 100644
+--- a/contrib/contrib.mak
++++ b/contrib/contrib.mak
+@@ -947,6 +947,7 @@ $(DEVOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h
+ 	$(DEVCC) $(O_)$@ $(C_) $(JAPSRC)dviprlib.c
+ 
+ extra-dmprt-install:
++	mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib
+ 	$(INSTALL_DATA) $(JAPSRC)dmp_init.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
+ 	$(INSTALL_DATA) $(JAPSRC)dmp_site.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
+ 	$(INSTALL_DATA) $(JAPSRC)escp_24.src $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
+@@ -1088,6 +1089,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH)
+ ### ----------------- Additional .upp files ---------------- ###
+ 
+ extra-upp-install:
++	mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib
+ 	for f in $(CONTRIBSRC)uniprint$(D)*.upp; do \
+ 	    $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \
+ 	done
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch
new file mode 100644
index 0000000..d786482
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch
@@ -0,0 +1,30 @@
+From 5d5c83c89be0cff29dde2267fa168e6f7146be8c Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 4 May 2015 22:31:48 -0700
+Subject: [PATCH] base/gendev.c: fix for -Werror=return-type
+
+Fixed:
+base/gendev.c:80:1: error: return type defaults to 'int' [-Werror=return-type]
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ base/gendev.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/base/gendev.c b/base/gendev.c
+index 68a745f..8058b5a 100644
+--- a/base/gendev.c
++++ b/base/gendev.c
+@@ -77,6 +77,7 @@ static const char *indent_item = "";
+ /* Forward definitions */
+ void add_entry(config *, const char *, const char *, bool);
+ 
++int
+ main(int argc, char *argv[])
+ {
+     config conf;
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch
new file mode 100644
index 0000000..9158117
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-native-fix-disable-system-libtiff.patch
@@ -0,0 +1,37 @@
+ghostscript-native:fix disable-system-libtiff
+
+Modify configure to add the check to make sure
+ghostscrip could work while system-libtiff is
+disabled.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Upstream-Status: Pending
+---
+ configure.ac | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -1055,6 +1055,7 @@ Disabling tiff output devices.])
+ esac
+ 
+ if test $SHARE_LIBTIFF -eq 0; then
++    if test -e $LIBTIFFDIR/configure; then
+       echo
+       echo "Running libtiff configure script..."
+       olddir=`pwd`
+@@ -1069,6 +1070,10 @@ if test $SHARE_LIBTIFF -eq 0; then
+       cd "$olddir"
+       echo
+       echo "Continuing with Ghostscript configuration..."
++    else
++      AC_MSG_NOTICE([Could not find local copy of libtiff.
++Disabling tiff output devices.])
++    fi
+ fi
+ 
+ AC_SUBST(SHARE_LIBTIFF)
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h
new file mode 100644
index 0000000..5817b7a
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h
@@ -0,0 +1,41 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 4
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
+
diff --git a/meta/recipes-extended/ghostscript/ghostscript/i686 b/meta/recipes-extended/ghostscript/ghostscript/i686
new file mode 120000
index 0000000..87aaca5
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/i686
@@ -0,0 +1 @@
+i586
\ No newline at end of file
diff --git a/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h
new file mode 100644
index 0000000..63232fd
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 4
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h
new file mode 100644
index 0000000..3ec8101
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 4
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h
new file mode 100644
index 0000000..b8b637c
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 4
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h
new file mode 100644
index 0000000..0d0a16b
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h
new file mode 100644
index 0000000..a05de29
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64el/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h
new file mode 100644
index 0000000..a05de29
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64eln32/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h
new file mode 100644
index 0000000..0d0a16b
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mips64n32/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h
new file mode 100644
index 0000000..29f90dd
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/mipsel/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 4
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h
new file mode 100644
index 0000000..359097f
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h
new file mode 100644
index 0000000..0d0a16b
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 1
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h
new file mode 100644
index 0000000..a05de29
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 8
+#define ARCH_ALIGN_PTR_MOD 8
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 8
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 3
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 8
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.16.bb b/meta/recipes-extended/ghostscript/ghostscript_9.16.bb
new file mode 100644
index 0000000..ec4acc6
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.16.bb
@@ -0,0 +1,103 @@
+SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
+DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing.  Usually as \
+a back-end to a program such as ghostview, it can display PostScript and PDF \
+documents in an X11 environment. \
+\
+Furthermore, it can render PostScript and PDF files as graphics to be printed \
+on non-PostScript printers. Supported printers include common \
+dot-matrix, inkjet and laser models. \
+"
+HOMEPAGE = "http://www.ghostscript.com"
+SECTION = "console/utils"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a"
+
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
+DEPENDS_class-native = ""
+
+SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz \
+                file://ghostscript-9.15-parallel-make.patch \
+                file://ghostscript-9.16-Werror-return-type.patch \
+"
+
+SRC_URI = "${SRC_URI_BASE} \
+           file://ghostscript-9.02-prevent_recompiling.patch \
+           file://ghostscript-9.02-genarch.patch \
+           file://objarch.h \
+           file://cups-no-gcrypt.patch \
+           "
+
+SRC_URI_class-native = "${SRC_URI_BASE} \
+                        file://ghostscript-native-fix-disable-system-libtiff.patch \
+                        file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
+                        "
+
+SRC_URI[md5sum] = "829319325bbdb83f5c81379a8f86f38f"
+SRC_URI[sha256sum] = "746d77280cca8afdd3d4c2c1389e332ed9b0605bd107bcaae1d761b061d1a68d"
+
+EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
+                --with-fontpath=${datadir}/fonts \
+                --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
+                --with-cups-datadir=${datadir}/cups \
+                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--enable-little-endian', '--enable-big-endian', d)} \
+                "
+
+EXTRA_OECONF_append_mips = " --with-large_color_index=0"
+EXTRA_OECONF_append_mipsel = " --with-large_color_index=0"
+
+# Explicity disable libtiff, fontconfig,
+# freetype, cups for ghostscript-native
+EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
+                             --without-jbig2dec \
+                             --with-fontpath=${datadir}/fonts \
+                             --without-libidn --disable-fontconfig \
+                             --disable-freetype --disable-cups"
+
+# This has been fixed upstream but for now we need to subvert the check for time.h
+# http://bugs.ghostscript.com/show_bug.cgi?id=692443
+# http://bugs.ghostscript.com/show_bug.cgi?id=692426
+CFLAGS += "-DHAVE_SYS_TIME_H=1"
+BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
+
+inherit autotools
+
+do_configure_prepend () {
+	mkdir -p obj
+	mkdir -p soobj
+	if [ -e ${WORKDIR}/objarch.h ]; then
+		cp ${WORKDIR}/objarch.h obj/arch.h
+	fi
+}
+
+do_configure_append () {
+	# copy tools from the native ghostscript build
+	if [ "${PN}" != "ghostscript-native" ]; then
+		mkdir -p obj/aux soobj
+		for i in genarch genconf mkromfs echogs gendev genht; do
+			cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
+		done
+	fi
+}
+
+do_install_append () {
+    mkdir -p ${D}${datadir}/ghostscript/${PV}/
+    cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
+    cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
+}
+
+do_compile_class-native () {
+    mkdir -p obj
+    for i in genarch genconf mkromfs echogs gendev genht; do
+        oe_runmake obj/aux/$i
+    done
+}
+
+do_install_class-native () {
+    install -d ${D}${bindir}/ghostscript-${PV}
+    for i in genarch genconf mkromfs echogs gendev genht; do
+        install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
+    done
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gperf/gperf.inc b/meta/recipes-extended/gperf/gperf.inc
new file mode 100644
index 0000000..a8ce230
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf.inc
@@ -0,0 +1,22 @@
+DESCRIPTION = "GNU gperf is a perfect hash function generator"
+HOMEPAGE = "http://www.gnu.org/software/gperf"
+SUMMARY  = "Generate a perfect hash function from a set of keywords"
+LICENSE  = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://src/main.cc;beginline=8;endline=19;md5=dec8f611845d047387ed56b5b85fa99b"
+
+SRC_URI  = "${GNU_MIRROR}/gperf/gperf-${PV}.tar.gz"
+
+inherit autotools
+
+# autoreconf couldn't find acinclude.m4 when stepping into subdirectory. Instead of
+# duplicating acinclude.m4 in every subdirectory, use absolute include path to aclocal
+EXTRA_AUTORECONF += " -I ${S}"
+
+do_configure_prepend() {
+        if [ ! -e ${S}/acinclude.m4 ]; then
+                cat ${S}/aclocal.m4 > ${S}/acinclude.m4
+        fi
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gperf/gperf_3.0.3.bb b/meta/recipes-extended/gperf/gperf_3.0.3.bb
new file mode 100644
index 0000000..7728861
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf_3.0.3.bb
@@ -0,0 +1,10 @@
+require gperf.inc
+
+LICENSE  = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \
+                    file://src/main.cc;beginline=8;endline=19;md5=72a3034a19e72f08ee48ef8244a121fd"
+
+PR = "r1"
+
+SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00"
+SRC_URI[sha256sum] = "63287527c8d9e27e801cf0804436f3494bd569db05d49dcdd2a942ae72fa9055"
diff --git a/meta/recipes-extended/gperf/gperf_3.0.4.bb b/meta/recipes-extended/gperf/gperf_3.0.4.bb
new file mode 100644
index 0000000..64003fc
--- /dev/null
+++ b/meta/recipes-extended/gperf/gperf_3.0.4.bb
@@ -0,0 +1,5 @@
+require gperf.inc
+
+
+SRC_URI[md5sum] = "c1f1db32fb6598d6a93e6e88796a8632"
+SRC_URI[sha256sum] = "767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e"
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/Makevars b/meta/recipes-extended/grep/grep-2.5.1a/Makevars
new file mode 100644
index 0000000..8b09f53
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/Makevars
@@ -0,0 +1,25 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
new file mode 100644
index 0000000..5a4149c
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Inappropriate [Poky Specific this is gplv2 version]
+
+Signed-off-by Saul Wold <sgw@linux.intel.com>
+
+Index: grep-2.5.1a/doc/grep.texi
+===================================================================
+--- grep-2.5.1a.orig/doc/grep.texi
++++ grep-2.5.1a/doc/grep.texi
+@@ -288,7 +288,7 @@ This version number should be included i
+ Print a usage message briefly summarizing these command-line options
+ and the bug-reporting address, then exit.
+ 
+-@itemx --binary-files=@var{type}
++@item --binary-files=@var{type}
+ @opindex --binary-files
+ @cindex binary files
+ If the first few bytes of a file indicate that the file contains binary
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
new file mode 100644
index 0000000..3b91520
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
@@ -0,0 +1,17 @@
+Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure
+Upstream-Status: Inappropriate [ old version that will not be maintained ]
+Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com>
+
+diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c
+--- grep-2.5.1a-orig/lib/hard-locale.c	2001-03-04 07:33:12.000000000 +0200
++++ grep-2.5.1a/lib/hard-locale.c	2013-03-11 17:05:52.086444891 +0200
+@@ -38,9 +38,7 @@
+ # endif
+ #endif
+ 
+-#if HAVE_LOCALE_H
+ # include <locale.h>
+-#endif
+ 
+ #if HAVE_STRING_H
+ # include <string.h>
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch
new file mode 100644
index 0000000..5746335
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch
@@ -0,0 +1,15 @@
+Enable operation with later versions of gettext.
+
+Upstream-Status: Inappropriate
+RP 2012/10/19
+
+Index: grep-2.5.1a/configure.in
+===================================================================
+--- grep-2.5.1a.orig/configure.in	2012-10-19 12:57:51.646970204 +0000
++++ grep-2.5.1a/configure.in	2012-10-19 12:59:49.946968803 +0000
+@@ -140,4 +140,4 @@
+ 	AC_CHECK_LIB(pcre, pcre_exec)
+ fi
+ 
+-AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; echo timestamp > stamp-h])
++AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [echo timestamp > stamp-h])
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
new file mode 100644
index 0000000..059d068
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
@@ -0,0 +1,32 @@
+The patch to fix CVE-2012-5667
+Reference: https://bugzilla.redhat.com/attachment.cgi?id=686605&action=diff
+
+Multiple integer overflows in GNU Grep before 2.11 might allow
+context-dependent attackers to execute arbitrary code via vectors
+involving a long input line that triggers a heap-based buffer overflow.
+
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5667
+
+Upstream-Status: Inappropriate [other]
+This version of GNU Grep has been abandoned upstream and they are no longer
+accepting patches.  This is not a backport.
+
+Signed-off-by Ming Liu <ming.liu@windriver.com>
+---
+ grep.c |    7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+--- a/src/grep.c	2013-05-15 13:39:33.359191769 +0800
++++ a/src/grep.c	2013-05-15 13:50:22.609191882 +0800
+@@ -306,6 +306,11 @@ fillbuf (size_t save, struct stats const
+   int cc = 1;
+   char *readbuf;
+   size_t readsize;
++  const size_t max_save = INT_MAX / 2;
++
++  /* Limit the amount of saved data to INT_MAX to fix CVE-2012-5667 */
++  if (save > max_save)
++     error (2, 0, _("line too long"));
+ 
+   /* Offset from start of buffer to start of old stuff
+      that we want to save.  */
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch
new file mode 100644
index 0000000..327ee56
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch
@@ -0,0 +1,1342 @@
+From c884dd12ec062569335702848fc5f29f436c28fa Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Mon, 25 May 2015 10:15:57 +0900
+Subject: [PATCH] grep egrep fgrep: Fix LSB NG cases.
+
+The LSB core test requires grep egrep and fgrep can
+perform pattern matching in searches without regard
+to case if -i option is specified.
+
+Upstream-Status: backport.
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ lib/posix/regex.h |   4 +
+ src/dfa.c         |  22 +-
+ src/grep.c        |  96 ++++---
+ src/search.c      | 833 +++++++++++++++++++++++++++++++++++++++++++++---------
+ 4 files changed, 768 insertions(+), 187 deletions(-)
+
+diff --git a/lib/posix/regex.h b/lib/posix/regex.h
+index 63c2fef..7bb2b0e 100644
+--- a/lib/posix/regex.h
++++ b/lib/posix/regex.h
+@@ -109,6 +109,10 @@ typedef unsigned long int reg_syntax_t;
+    If not set, \{, \}, {, and } are literals.  */
+ #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+ 
++/* If this bit is set, then ignore case when matching.
++   If not set, then case is significant.  */
++#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
++
+ /* If this bit is set, +, ? and | aren't recognized as operators.
+    If not set, they are.  */
+ #define RE_LIMITED_OPS (RE_INTERVALS << 1)
+diff --git a/src/dfa.c b/src/dfa.c
+index 590bfa7..27c876a 100644
+--- a/src/dfa.c
++++ b/src/dfa.c
+@@ -414,7 +414,7 @@ update_mb_len_index (unsigned char const *p, int len)
+ 
+ /* This function fetch a wide character, and update cur_mb_len,
+    used only if the current locale is a multibyte environment.  */
+-static wchar_t
++static wint_t
+ fetch_wc (char const *eoferr)
+ {
+   wchar_t wc;
+@@ -423,7 +423,7 @@ fetch_wc (char const *eoferr)
+       if (eoferr != 0)
+ 	dfaerror (eoferr);
+       else
+-	return -1;
++	return WEOF;
+     }
+ 
+   cur_mb_len = mbrtowc(&wc, lexptr, lexleft, &mbs);
+@@ -459,7 +459,7 @@ fetch_wc (char const *eoferr)
+ static void
+ parse_bracket_exp_mb ()
+ {
+-  wchar_t wc, wc1, wc2;
++  wint_t wc, wc1, wc2;
+ 
+   /* Work area to build a mb_char_classes.  */
+   struct mb_char_classes *work_mbc;
+@@ -496,7 +496,7 @@ parse_bracket_exp_mb ()
+     work_mbc->invert = 0;
+   do
+     {
+-      wc1 = -1; /* mark wc1 is not initialized".  */
++      wc1 = WEOF; /* mark wc1 is not initialized".  */
+ 
+       /* Note that if we're looking at some other [:...:] construct,
+ 	 we just treat it as a bunch of ordinary characters.  We can do
+@@ -586,7 +586,7 @@ parse_bracket_exp_mb ()
+ 		      work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem;
+ 		    }
+  		}
+-	      wc = -1;
++	      wc1 = wc = WEOF;
+ 	    }
+ 	  else
+ 	    /* We treat '[' as a normal character here.  */
+@@ -600,7 +600,7 @@ parse_bracket_exp_mb ()
+ 	    wc = fetch_wc(("Unbalanced ["));
+ 	}
+ 
+-      if (wc1 == -1)
++      if (wc1 == WEOF)
+ 	wc1 = fetch_wc(_("Unbalanced ["));
+ 
+       if (wc1 == L'-')
+@@ -630,17 +630,17 @@ parse_bracket_exp_mb ()
+ 	    }
+ 	  REALLOC_IF_NECESSARY(work_mbc->range_sts, wchar_t,
+ 			       range_sts_al, work_mbc->nranges + 1);
+-	  work_mbc->range_sts[work_mbc->nranges] = wc;
++	  work_mbc->range_sts[work_mbc->nranges] = (wchar_t)wc;
+ 	  REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t,
+ 			       range_ends_al, work_mbc->nranges + 1);
+-	  work_mbc->range_ends[work_mbc->nranges++] = wc2;
++	  work_mbc->range_ends[work_mbc->nranges++] = (wchar_t)wc2;
+ 	}
+-      else if (wc != -1)
++      else if (wc != WEOF)
+ 	/* build normal characters.  */
+ 	{
+ 	  REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al,
+ 			       work_mbc->nchars + 1);
+-	  work_mbc->chars[work_mbc->nchars++] = wc;
++	  work_mbc->chars[work_mbc->nchars++] = (wchar_t)wc;
+ 	}
+     }
+   while ((wc = wc1) != L']');
+@@ -2552,6 +2552,8 @@ match_mb_charset (struct dfa *d, int s, position pos, int index)
+     }
+ 
+   /* match with a character?  */
++  if (case_fold)
++    wc = towlower (wc);
+   for (i = 0; i<work_mbc->nchars; i++)
+     {
+       if (wc == work_mbc->chars[i])
+diff --git a/src/grep.c b/src/grep.c
+index 2fb2fac..3fd4b47 100644
+--- a/src/grep.c
++++ b/src/grep.c
+@@ -30,6 +30,12 @@
+ # include <sys/time.h>
+ # include <sys/resource.h>
+ #endif
++#if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC
++/* We can handle multibyte string.  */
++# define MBS_SUPPORT
++# include <wchar.h>
++# include <wctype.h>
++#endif
+ #include <stdio.h>
+ #include "system.h"
+ #include "getopt.h"
+@@ -255,19 +261,6 @@ reset (int fd, char const *file, struct stats *stats)
+   bufbeg[-1] = eolbyte;
+   bufdesc = fd;
+ 
+-  if (fstat (fd, &stats->stat) != 0)
+-    {
+-      error (0, errno, "fstat");
+-      return 0;
+-    }
+-  if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
+-    return 0;
+-#ifndef DJGPP
+-  if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode)))
+-#else
+-  if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode)))
+-#endif
+-    return 0;
+   if (S_ISREG (stats->stat.st_mode))
+     {
+       if (file)
+@@ -558,33 +551,6 @@ prline (char const *beg, char const *lim, int sep)
+     {
+       size_t match_size;
+       size_t match_offset;
+-      if(match_icase)
+-        {
+-	  /* Yuck, this is tricky */
+-          char *buf = (char*) xmalloc (lim - beg);
+-	  char *ibeg = buf;
+-	  char *ilim = ibeg + (lim - beg);
+-	  int i;
+-	  for (i = 0; i < lim - beg; i++)
+-	    ibeg[i] = tolower (beg[i]);
+-	  while ((match_offset = (*execute) (ibeg, ilim-ibeg, &match_size, 1))
+-		 != (size_t) -1)
+-	    {
+-	      char const *b = beg + match_offset;
+-	      if (b == lim)
+-		break;
+-	      fwrite (beg, sizeof (char), match_offset, stdout);
+-	      printf ("\33[%sm", grep_color);
+-	      fwrite (b, sizeof (char), match_size, stdout);
+-	      fputs ("\33[00m", stdout);
+-	      beg = b + match_size;
+-	      ibeg = ibeg + match_offset + match_size;
+-	    }
+-	  fwrite (beg, 1, lim - beg, stdout);
+-	  free (buf);
+-	  lastout = lim;
+-	  return;
+-	}
+       while (lim-beg && (match_offset = (*execute) (beg, lim - beg, &match_size, 1))
+ 	     != (size_t) -1)
+ 	{
+@@ -601,6 +567,7 @@ prline (char const *beg, char const *lim, int sep)
+ 	  fputs ("\33[00m", stdout);
+ 	  beg = b + match_size;
+ 	}
++      fputs ("\33[K", stdout);
+     }
+   fwrite (beg, 1, lim - beg, stdout);
+   if (ferror (stdout))
+@@ -623,7 +590,7 @@ prpending (char const *lim)
+       size_t match_size;
+       --pending;
+       if (outleft
+-	  || (((*execute) (lastout, nl - lastout, &match_size, 0) == (size_t) -1)
++	  || (((*execute) (lastout, nl + 1 - lastout, &match_size, 0) == (size_t) -1)
+ 	      == !out_invert))
+ 	prline (lastout, nl + 1, '-');
+       else
+@@ -895,6 +862,19 @@ grepfile (char const *file, struct stats *stats)
+     }
+   else
+     {
++      if (stat (file, &stats->stat) != 0)
++        {
++          suppressible_error (file, errno);
++          return 1;
++        }
++      if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
++        return 1;
++#ifndef DJGPP
++      if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode)))
++#else
++      if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode)))
++#endif
++        return 1;
+       while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR)
+ 	continue;
+ 
+@@ -1681,9 +1661,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"))
+ 	  out_invert ^= 1;
+ 	  match_lines = match_words = 0;
+ 	}
+-      else
+-	/* Strip trailing newline. */
+-        --keycc;
+     }
+   else
+     if (optind < argc)
+@@ -1697,6 +1674,37 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"))
+   if (!install_matcher (matcher) && !install_matcher ("default"))
+     abort ();
+ 
++#ifdef MBS_SUPPORT
++  if (MB_CUR_MAX != 1 && match_icase)
++    {
++      wchar_t wc;
++      mbstate_t cur_state, prev_state;
++      int i, len = strlen(keys);
++
++      memset(&cur_state, 0, sizeof(mbstate_t));
++      for (i = 0; i <= len ;)
++	{
++	  size_t mbclen;
++	  mbclen = mbrtowc(&wc, keys + i, len - i, &cur_state);
++	  if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0)
++	    {
++	      /* An invalid sequence, or a truncated multibyte character.
++		 We treat it as a singlebyte character.  */
++	      mbclen = 1;
++	    }
++	  else
++	    {
++	      if (iswupper((wint_t)wc))
++		{
++		  wc = towlower((wint_t)wc);
++		  wcrtomb(keys + i, wc, &cur_state);
++		}
++	    }
++	  i += mbclen;
++	}
++    }
++#endif /* MBS_SUPPORT */
++
+   (*compile)(keys, keycc);
+ 
+   if ((argc - optind > 1 && !no_filenames) || with_filenames)
+diff --git a/src/search.c b/src/search.c
+index 7bd233f..3c6a485 100644
+--- a/src/search.c
++++ b/src/search.c
+@@ -18,9 +18,13 @@
+ 
+ /* Written August 1992 by Mike Haertel. */
+ 
++#ifndef _GNU_SOURCE
++# define _GNU_SOURCE 1
++#endif
+ #ifdef HAVE_CONFIG_H
+ # include <config.h>
+ #endif
++#include <assert.h>
+ #include <sys/types.h>
+ #if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC
+ /* We can handle multibyte string.  */
+@@ -31,7 +35,7 @@
+ 
+ #include "system.h"
+ #include "grep.h"
+-#include "regex.h"
++#include <regex.h>
+ #include "dfa.h"
+ #include "kwset.h"
+ #include "error.h"
+@@ -39,6 +43,9 @@
+ #ifdef HAVE_LIBPCRE
+ # include <pcre.h>
+ #endif
++#ifdef HAVE_LANGINFO_CODESET
++# include <langinfo.h>
++#endif
+ 
+ #define NCHAR (UCHAR_MAX + 1)
+ 
+@@ -70,9 +77,10 @@ static kwset_t kwset;
+    call the regexp matcher at all. */
+ static int kwset_exact_matches;
+ 
+-#if defined(MBS_SUPPORT)
+-static char* check_multibyte_string PARAMS ((char const *buf, size_t size));
+-#endif
++/* UTF-8 encoding allows some optimizations that we can't otherwise
++   assume in a multibyte encoding. */
++static int using_utf8;
++
+ static void kwsinit PARAMS ((void));
+ static void kwsmusts PARAMS ((void));
+ static void Gcompile PARAMS ((char const *, size_t));
+@@ -84,6 +92,15 @@ static void Pcompile PARAMS ((char const *, size_t ));
+ static size_t Pexecute PARAMS ((char const *, size_t, size_t *, int));
+ 
+ void
++check_utf8 (void)
++{
++#ifdef HAVE_LANGINFO_CODESET
++  if (strcmp (nl_langinfo (CODESET), "UTF-8") == 0)
++    using_utf8 = 1;
++#endif
++}
++
++void
+ dfaerror (char const *mesg)
+ {
+   error (2, 0, mesg);
+@@ -141,38 +158,6 @@ kwsmusts (void)
+     }
+ }
+ 
+-#ifdef MBS_SUPPORT
+-/* This function allocate the array which correspond to "buf".
+-   Then this check multibyte string and mark on the positions which
+-   are not singlebyte character nor the first byte of a multibyte
+-   character.  Caller must free the array.  */
+-static char*
+-check_multibyte_string(char const *buf, size_t size)
+-{
+-  char *mb_properties = malloc(size);
+-  mbstate_t cur_state;
+-  int i;
+-  memset(&cur_state, 0, sizeof(mbstate_t));
+-  memset(mb_properties, 0, sizeof(char)*size);
+-  for (i = 0; i < size ;)
+-    {
+-      size_t mbclen;
+-      mbclen = mbrlen(buf + i, size - i, &cur_state);
+-
+-      if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0)
+-	{
+-	  /* An invalid sequence, or a truncated multibyte character.
+-	     We treat it as a singlebyte character.  */
+-	  mbclen = 1;
+-	}
+-      mb_properties[i] = mbclen;
+-      i += mbclen;
+-    }
+-
+-  return mb_properties;
+-}
+-#endif
+-
+ static void
+ Gcompile (char const *pattern, size_t size)
+ {
+@@ -181,7 +166,8 @@ Gcompile (char const *pattern, size_t size)
+   size_t total = size;
+   char const *motif = pattern;
+ 
+-  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE);
++  check_utf8 ();
++  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0));
+   dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte);
+ 
+   /* For GNU regex compiler we have to pass the patterns separately to detect
+@@ -218,6 +204,10 @@ Gcompile (char const *pattern, size_t size)
+       motif = sep;
+     } while (sep && total != 0);
+ 
++  /* Strip trailing newline. */
++  if (size && pattern[size - 1] == '\n')
++    size--;
++
+   /* In the match_words and match_lines cases, we use a different pattern
+      for the DFA matcher that will quickly throw out cases that won't work.
+      Then if DFA succeeds we do some hairy stuff using the regex matcher
+@@ -233,7 +223,7 @@ Gcompile (char const *pattern, size_t size)
+       static char const line_end[] = "\\)$";
+       static char const word_beg[] = "\\(^\\|[^[:alnum:]_]\\)\\(";
+       static char const word_end[] = "\\)\\([^[:alnum:]_]\\|$\\)";
+-      char *n = malloc (sizeof word_beg - 1 + size + sizeof word_end);
++      char *n = xmalloc (sizeof word_beg - 1 + size + sizeof word_end);
+       size_t i;
+       strcpy (n, match_lines ? line_beg : word_beg);
+       i = strlen (n);
+@@ -257,14 +247,15 @@ Ecompile (char const *pattern, size_t size)
+   size_t total = size;
+   char const *motif = pattern;
+ 
++  check_utf8 ();
+   if (strcmp (matcher, "awk") == 0)
+     {
+-      re_set_syntax (RE_SYNTAX_AWK);
++      re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0));
+       dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte);
+     }
+   else
+     {
+-      re_set_syntax (RE_SYNTAX_POSIX_EGREP);
++      re_set_syntax (RE_SYNTAX_POSIX_EGREP | (match_icase ? RE_ICASE : 0));
+       dfasyntax (RE_SYNTAX_POSIX_EGREP, match_icase, eolbyte);
+     }
+ 
+@@ -301,6 +292,10 @@ Ecompile (char const *pattern, size_t size)
+       motif = sep;
+     } while (sep && total != 0);
+ 
++  /* Strip trailing newline. */
++  if (size && pattern[size - 1] == '\n')
++    size--;
++
+   /* In the match_words and match_lines cases, we use a different pattern
+      for the DFA matcher that will quickly throw out cases that won't work.
+      Then if DFA succeeds we do some hairy stuff using the regex matcher
+@@ -316,7 +311,7 @@ Ecompile (char const *pattern, size_t size)
+       static char const line_end[] = ")$";
+       static char const word_beg[] = "(^|[^[:alnum:]_])(";
+       static char const word_end[] = ")([^[:alnum:]_]|$)";
+-      char *n = malloc (sizeof word_beg - 1 + size + sizeof word_end);
++      char *n = xmalloc (sizeof word_beg - 1 + size + sizeof word_end);
+       size_t i;
+       strcpy (n, match_lines ? line_beg : word_beg);
+       i = strlen(n);
+@@ -339,15 +334,34 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
+   char eol = eolbyte;
+   int backref, start, len;
+   struct kwsmatch kwsm;
+-  size_t i;
++  size_t i, ret_val;
++  static int use_dfa;
++  static int use_dfa_checked = 0;
+ #ifdef MBS_SUPPORT
+-  char *mb_properties = NULL;
++  int mb_cur_max = MB_CUR_MAX;
++  mbstate_t mbs;
++  memset (&mbs, '\0', sizeof (mbstate_t));
+ #endif /* MBS_SUPPORT */
+ 
++  if (!use_dfa_checked)
++    {
++      char *grep_use_dfa = getenv ("GREP_USE_DFA");
++      if (!grep_use_dfa)
++	{
+ #ifdef MBS_SUPPORT
+-  if (MB_CUR_MAX > 1 && kwset)
+-    mb_properties = check_multibyte_string(buf, size);
++	  /* Turn off DFA when processing multibyte input. */
++	  use_dfa = (MB_CUR_MAX == 1);
++#else
++	  use_dfa = 1;
+ #endif /* MBS_SUPPORT */
++	}
++      else
++	{
++	  use_dfa = atoi (grep_use_dfa);
++	}
++
++      use_dfa_checked = 1;
++    }
+ 
+   buflim = buf + size;
+ 
+@@ -358,47 +372,120 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
+ 	  if (kwset)
+ 	    {
+ 	      /* Find a possible match using the KWset matcher. */
+-	      size_t offset = kwsexec (kwset, beg, buflim - beg, &kwsm);
++#ifdef MBS_SUPPORT
++	      size_t bytes_left = 0;
++#endif /* MBS_SUPPORT */
++	      size_t offset;
++#ifdef MBS_SUPPORT
++	      /* kwsexec doesn't work with match_icase and multibyte input. */
++	      if (match_icase && mb_cur_max > 1)
++		/* Avoid kwset */
++		offset = 0;
++	      else
++#endif /* MBS_SUPPORT */
++	      offset = kwsexec (kwset, beg, buflim - beg, &kwsm);
+ 	      if (offset == (size_t) -1)
+-		{
++	        goto failure;
+ #ifdef MBS_SUPPORT
+-		  if (MB_CUR_MAX > 1)
+-		    free(mb_properties);
+-#endif
+-		  return (size_t)-1;
++	      if (mb_cur_max > 1 && !using_utf8)
++		{
++		  bytes_left = offset;
++		  while (bytes_left)
++		    {
++		      size_t mlen = mbrlen (beg, bytes_left, &mbs);
++		      if (mlen == (size_t) -1 || mlen == 0)
++			{
++			  /* Incomplete character: treat as single-byte. */
++			  memset (&mbs, '\0', sizeof (mbstate_t));
++			  beg++;
++			  bytes_left--;
++			  continue;
++			}
++
++		      if (mlen == (size_t) -2)
++			/* Offset points inside multibyte character:
++			 * no good. */
++			break;
++
++		      beg += mlen;
++		      bytes_left -= mlen;
++		    }
+ 		}
++	      else
++#endif /* MBS_SUPPORT */
+ 	      beg += offset;
+ 	      /* Narrow down to the line containing the candidate, and
+ 		 run it through DFA. */
+ 	      end = memchr(beg, eol, buflim - beg);
+ 	      end++;
+ #ifdef MBS_SUPPORT
+-	      if (MB_CUR_MAX > 1 && mb_properties[beg - buf] == 0)
++	      if (mb_cur_max > 1 && bytes_left)
+ 		continue;
+-#endif
++#endif /* MBS_SUPPORT */
+ 	      while (beg > buf && beg[-1] != eol)
+ 		--beg;
+-	      if (kwsm.index < kwset_exact_matches)
+-		goto success;
+-	      if (dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1)
++	      if (
++#ifdef MBS_SUPPORT
++		  !(match_icase && mb_cur_max > 1) &&
++#endif /* MBS_SUPPORT */
++		  (kwsm.index < kwset_exact_matches))
++		goto success_in_beg_and_end;
++	      if (use_dfa &&
++		  dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1)
+ 		continue;
+ 	    }
+ 	  else
+ 	    {
+ 	      /* No good fixed strings; start with DFA. */
+-	      size_t offset = dfaexec (&dfa, beg, buflim - beg, &backref);
++#ifdef MBS_SUPPORT
++	      size_t bytes_left = 0;
++#endif /* MBS_SUPPORT */
++	      size_t offset = 0;
++	      if (use_dfa)
++		offset = dfaexec (&dfa, beg, buflim - beg, &backref);
+ 	      if (offset == (size_t) -1)
+ 		break;
+ 	      /* Narrow down to the line we've found. */
++#ifdef MBS_SUPPORT
++	      if (mb_cur_max > 1 && !using_utf8)
++		{
++		  bytes_left = offset;
++		  while (bytes_left)
++		    {
++		      size_t mlen = mbrlen (beg, bytes_left, &mbs);
++		      if (mlen == (size_t) -1 || mlen == 0)
++			{
++			  /* Incomplete character: treat as single-byte. */
++			  memset (&mbs, '\0', sizeof (mbstate_t));
++			  beg++;
++			  bytes_left--;
++			  continue;
++			}
++
++		      if (mlen == (size_t) -2)
++			/* Offset points inside multibyte character:
++			 * no good. */
++			break;
++
++		      beg += mlen;
++		      bytes_left -= mlen;
++		    }
++		}
++	      else
++#endif /* MBS_SUPPORT */
+ 	      beg += offset;
+ 	      end = memchr (beg, eol, buflim - beg);
+ 	      end++;
++#ifdef MBS_SUPPORT
++	      if (mb_cur_max > 1 && bytes_left)
++		continue;
++#endif /* MBS_SUPPORT */
+ 	      while (beg > buf && beg[-1] != eol)
+ 		--beg;
+ 	    }
+ 	  /* Successful, no backreferences encountered! */
+-	  if (!backref)
+-	    goto success;
++	  if (use_dfa && !backref)
++	    goto success_in_beg_and_end;
+ 	}
+       else
+ 	end = beg + size;
+@@ -413,14 +500,11 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
+ 				       end - beg - 1, &(patterns[i].regs))))
+ 	    {
+ 	      len = patterns[i].regs.end[0] - start;
+-	      if (exact)
+-		{
+-		  *match_size = len;
+-		  return start;
+-		}
++	      if (exact && !match_words)
++	        goto success_in_start_and_len;
+ 	      if ((!match_lines && !match_words)
+ 		  || (match_lines && len == end - beg - 1))
+-		goto success;
++		goto success_in_beg_and_end;
+ 	      /* If -w, check if the match aligns with word boundaries.
+ 		 We do this iteratively because:
+ 		 (a) the line may contain more than one occurence of the
+@@ -431,10 +515,114 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
+ 	      if (match_words)
+ 		while (start >= 0)
+ 		  {
+-		    if ((start == 0 || !WCHAR ((unsigned char) beg[start - 1]))
+-			&& (len == end - beg - 1
+-			    || !WCHAR ((unsigned char) beg[start + len])))
+-		      goto success;
++		    int lword_match = 0;
++		    if (start == 0)
++		      lword_match = 1;
++		    else
++		      {
++			assert (start > 0);
++#ifdef MBS_SUPPORT
++			if (mb_cur_max > 1)
++			  {
++			    const char *s;
++			    size_t mr;
++			    wchar_t pwc;
++
++			    /* Locate the start of the multibyte character
++			       before the match position (== beg + start). */
++			    if (using_utf8)
++			      {
++				/* UTF-8 is a special case: scan backwards
++				   until we find a 7-bit character or a
++				   lead byte. */
++				s = beg + start - 1;
++				while (s > buf
++				       && (unsigned char) *s >= 0x80
++				       && (unsigned char) *s <= 0xbf)
++				  --s;
++			      }
++			    else
++			      {
++				/* Scan forwards to find the start of the
++				   last complete character before the
++				   match position.  */
++				size_t bytes_left = start - 1;
++				s = beg;
++				while (bytes_left > 0)
++				  {
++				    mr = mbrlen (s, bytes_left, &mbs);
++				    if (mr == (size_t) -1 || mr == 0)
++				      {
++					memset (&mbs, '\0', sizeof (mbs));
++					s++;
++					bytes_left--;
++					continue;
++				      }
++				    if (mr == (size_t) -2)
++				      {
++					memset (&mbs, '\0', sizeof (mbs));
++					break;
++				      }
++				    s += mr;
++				    bytes_left -= mr;
++				  }
++			      }
++			    mr = mbrtowc (&pwc, s, beg + start - s, &mbs);
++			    if (mr == (size_t) -2 || mr == (size_t) -1 ||
++				mr == 0)
++			      {
++				memset (&mbs, '\0', sizeof (mbstate_t));
++				lword_match = 1;
++			      }
++			    else if (!(iswalnum (pwc) || pwc == L'_')
++				     && mr == beg + start - s)
++			      lword_match = 1;
++			  }
++			else
++#endif /* MBS_SUPPORT */
++			if (!WCHAR ((unsigned char) beg[start - 1]))
++			  lword_match = 1;
++		      }
++
++		    if (lword_match)
++		      {
++			int rword_match = 0;
++			if (start + len == end - beg - 1)
++			  rword_match = 1;
++			else
++			  {
++#ifdef MBS_SUPPORT
++			    if (mb_cur_max > 1)
++			      {
++				wchar_t nwc;
++				int mr;
++
++				mr = mbtowc (&nwc, beg + start + len,
++					     end - beg - start - len - 1);
++				if (mr <= 0)
++				  {
++				    memset (&mbs, '\0', sizeof (mbstate_t));
++				    rword_match = 1;
++				  }
++				else if (!iswalnum (nwc) && nwc != L'_')
++				  rword_match = 1;
++			      }
++			    else
++#endif /* MBS_SUPPORT */
++			    if (!WCHAR ((unsigned char) beg[start + len]))
++			      rword_match = 1;
++			  }
++
++			if (rword_match)
++			  {
++			    if (!exact)
++			      /* Returns the whole line. */
++			      goto success_in_beg_and_end;
++			    else
++			      /* Returns just this word match. */
++			      goto success_in_start_and_len;
++			  }
++		      }
+ 		    if (len > 0)
+ 		      {
+ 			/* Try a shorter length anchored at the same place. */
+@@ -461,26 +649,154 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact)
+ 	    }
+ 	} /* for Regex patterns.  */
+     } /* for (beg = end ..) */
+-#ifdef MBS_SUPPORT
+-  if (MB_CUR_MAX > 1 && mb_properties)
+-    free (mb_properties);
+-#endif /* MBS_SUPPORT */
++
++ failure:
+   return (size_t) -1;
+ 
+- success:
+-#ifdef MBS_SUPPORT
+-  if (MB_CUR_MAX > 1 && mb_properties)
+-    free (mb_properties);
+-#endif /* MBS_SUPPORT */
+-  *match_size = end - beg;
+-  return beg - buf;
++ success_in_beg_and_end:
++  len = end - beg;
++  start = beg - buf;
++  /* FALLTHROUGH */
++
++ success_in_start_and_len:
++  *match_size = len;
++  return start;
+ }
+ 
++#ifdef MBS_SUPPORT
++static int f_i_multibyte; /* whether we're using the new -Fi MB method */
++static struct
++{
++  wchar_t **patterns;
++  size_t count, maxlen;
++  unsigned char *match;
++} Fimb;
++#endif
++
+ static void
+ Fcompile (char const *pattern, size_t size)
+ {
++  int mb_cur_max = MB_CUR_MAX;
+   char const *beg, *lim, *err;
+ 
++  check_utf8 ();
++#ifdef MBS_SUPPORT
++  /* Support -F -i for UTF-8 input. */
++  if (match_icase && mb_cur_max > 1)
++    {
++      mbstate_t mbs;
++      wchar_t *wcpattern = xmalloc ((size + 1) * sizeof (wchar_t));
++      const char *patternend = pattern;
++      size_t wcsize;
++      kwset_t fimb_kwset = NULL;
++      char *starts = NULL;
++      wchar_t *wcbeg, *wclim;
++      size_t allocated = 0;
++
++      memset (&mbs, '\0', sizeof (mbs));
++# ifdef __GNU_LIBRARY__
++      wcsize = mbsnrtowcs (wcpattern, &patternend, size, size, &mbs);
++      if (patternend != pattern + size)
++	wcsize = (size_t) -1;
++# else
++      {
++	char *patterncopy = xmalloc (size + 1);
++
++	memcpy (patterncopy, pattern, size);
++	patterncopy[size] = '\0';
++	patternend = patterncopy;
++	wcsize = mbsrtowcs (wcpattern, &patternend, size, &mbs);
++	if (patternend != patterncopy + size)
++	  wcsize = (size_t) -1;
++	free (patterncopy);
++      }
++# endif
++      if (wcsize + 2 <= 2)
++	{
++fimb_fail:
++	  free (wcpattern);
++	  free (starts);
++	  if (fimb_kwset)
++	    kwsfree (fimb_kwset);
++	  free (Fimb.patterns);
++	  Fimb.patterns = NULL;
++	}
++      else
++	{
++	  if (!(fimb_kwset = kwsalloc (NULL)))
++	    error (2, 0, _("memory exhausted"));
++
++	  starts = xmalloc (mb_cur_max * 3);
++	  wcbeg = wcpattern;
++	  do
++	    {
++	      int i;
++	      size_t wclen;
++
++	      if (Fimb.count >= allocated)
++		{
++		  if (allocated == 0)
++		    allocated = 128;
++		  else
++		    allocated *= 2;
++		  Fimb.patterns = xrealloc (Fimb.patterns,
++					    sizeof (wchar_t *) * allocated);
++		}
++	      Fimb.patterns[Fimb.count++] = wcbeg;
++	      for (wclim = wcbeg;
++		   wclim < wcpattern + wcsize && *wclim != L'\n'; ++wclim)
++		*wclim = towlower (*wclim);
++	      *wclim = L'\0';
++	      wclen = wclim - wcbeg;
++	      if (wclen > Fimb.maxlen)
++		Fimb.maxlen = wclen;
++	      if (wclen > 3)
++		wclen = 3;
++	      if (wclen == 0)
++		{
++		  if ((err = kwsincr (fimb_kwset, "", 0)) != 0)
++		    error (2, 0, err);
++		}
++	      else
++		for (i = 0; i < (1 << wclen); i++)
++		  {
++		    char *p = starts;
++		    int j, k;
++
++		    for (j = 0; j < wclen; ++j)
++		      {
++			wchar_t wc = wcbeg[j];
++			if (i & (1 << j))
++			  {
++			    wc = towupper (wc);
++			    if (wc == wcbeg[j])
++			      continue;
++			  }
++			k = wctomb (p, wc);
++			if (k <= 0)
++			  goto fimb_fail;
++			p += k;
++		      }
++		    if ((err = kwsincr (fimb_kwset, starts, p - starts)) != 0)
++		      error (2, 0, err);
++		  }
++	      if (wclim < wcpattern + wcsize)
++		++wclim;
++	      wcbeg = wclim;
++	    }
++	  while (wcbeg < wcpattern + wcsize);
++	  f_i_multibyte = 1;
++	  kwset = fimb_kwset;
++	  free (starts);
++	  Fimb.match = xmalloc (Fimb.count);
++	  if ((err = kwsprep (kwset)) != 0)
++	    error (2, 0, err);
++	  return;
++	}
++    }
++#endif /* MBS_SUPPORT */
++
++
+   kwsinit ();
+   beg = pattern;
+   do
+@@ -499,6 +815,76 @@ Fcompile (char const *pattern, size_t size)
+     error (2, 0, err);
+ }
+ 
++#ifdef MBS_SUPPORT
++static int
++Fimbexec (const char *buf, size_t size, size_t *plen, int exact)
++{
++  size_t len, letter, i;
++  int ret = -1;
++  mbstate_t mbs;
++  wchar_t wc;
++  int patterns_left;
++
++  assert (match_icase && f_i_multibyte == 1);
++  assert (MB_CUR_MAX > 1);
++
++  memset (&mbs, '\0', sizeof (mbs));
++  memset (Fimb.match, '\1', Fimb.count);
++  letter = len = 0;
++  patterns_left = 1;
++  while (patterns_left && len <= size)
++    {
++      size_t c;
++
++      patterns_left = 0;
++      if (len < size)
++	{
++	  c = mbrtowc (&wc, buf + len, size - len, &mbs);
++	  if (c + 2 <= 2)
++	    return ret;
++
++	  wc = towlower (wc);
++	}
++      else
++	{
++	  c = 1;
++	  wc = L'\0';
++	}
++
++      for (i = 0; i < Fimb.count; i++)
++	{
++	  if (Fimb.match[i])
++	    {
++	      if (Fimb.patterns[i][letter] == L'\0')
++		{
++		  /* Found a match. */
++		  *plen = len;
++		  if (!exact && !match_words)
++		    return 0;
++		  else
++		    {
++		      /* For -w or exact look for longest match.  */
++		      ret = 0;
++		      Fimb.match[i] = '\0';
++		      continue;
++		    }
++		}
++
++	      if (Fimb.patterns[i][letter] == wc)
++		patterns_left = 1;
++	      else
++		Fimb.match[i] = '\0';
++	    }
++	}
++
++      len += c;
++      letter++;
++    }
++
++  return ret;
++}
++#endif /* MBS_SUPPORT */
++
+ static size_t
+ Fexecute (char const *buf, size_t size, size_t *match_size, int exact)
+ {
+@@ -506,88 +892,268 @@ Fexecute (char const *buf, size_t size, size_t *match_size, int exact)
+   register size_t len;
+   char eol = eolbyte;
+   struct kwsmatch kwsmatch;
++  size_t ret_val;
+ #ifdef MBS_SUPPORT
+-  char *mb_properties;
+-  if (MB_CUR_MAX > 1)
+-    mb_properties = check_multibyte_string (buf, size);
++  int mb_cur_max = MB_CUR_MAX;
++  mbstate_t mbs;
++  memset (&mbs, '\0', sizeof (mbstate_t));
++  const char *last_char = NULL;
+ #endif /* MBS_SUPPORT */
+ 
+-  for (beg = buf; beg <= buf + size; ++beg)
++  for (beg = buf; beg < buf + size; ++beg)
+     {
+-      size_t offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch);
++      size_t offset;
++      offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch);
++
+       if (offset == (size_t) -1)
+-	{
++	goto failure;
+ #ifdef MBS_SUPPORT
+-	  if (MB_CUR_MAX > 1)
+-	    free(mb_properties);
+-#endif /* MBS_SUPPORT */
+-	  return offset;
++      if (mb_cur_max > 1 && !using_utf8)
++	{
++	  size_t bytes_left = offset;
++	  while (bytes_left)
++	    {
++	      size_t mlen = mbrlen (beg, bytes_left, &mbs);
++
++	      last_char = beg;
++	      if (mlen == (size_t) -1 || mlen == 0)
++		{
++		  /* Incomplete character: treat as single-byte. */
++		  memset (&mbs, '\0', sizeof (mbstate_t));
++		  beg++;
++		  bytes_left--;
++		  continue;
++		}
++
++	      if (mlen == (size_t) -2)
++		/* Offset points inside multibyte character: no good. */
++		break;
++
++	      beg += mlen;
++	      bytes_left -= mlen;
++	    }
++
++	  if (bytes_left)
++	    continue;
+ 	}
+-#ifdef MBS_SUPPORT
+-      if (MB_CUR_MAX > 1 && mb_properties[offset+beg-buf] == 0)
+-	continue; /* It is a part of multibyte character.  */
++      else
+ #endif /* MBS_SUPPORT */
+       beg += offset;
+-      len = kwsmatch.size[0];
+-      if (exact)
+-	{
+-	  *match_size = len;
+ #ifdef MBS_SUPPORT
+-	  if (MB_CUR_MAX > 1)
+-	    free (mb_properties);
++      /* For f_i_multibyte, the string at beg now matches first 3 chars of
++	 one of the search strings (less if there are shorter search strings).
++	 See if this is a real match.  */
++      if (f_i_multibyte
++	  && Fimbexec (beg, buf + size - beg, &kwsmatch.size[0], exact))
++	goto next_char;
+ #endif /* MBS_SUPPORT */
+-	  return beg - buf;
+-	}
++      len = kwsmatch.size[0];
++      if (exact && !match_words)
++	goto success_in_beg_and_len;
+       if (match_lines)
+ 	{
+ 	  if (beg > buf && beg[-1] != eol)
+-	    continue;
++	    goto next_char;
+ 	  if (beg + len < buf + size && beg[len] != eol)
+-	    continue;
++	    goto next_char;
+ 	  goto success;
+ 	}
+       else if (match_words)
+-	for (try = beg; len; )
+-	  {
+-	    if (try > buf && WCHAR((unsigned char) try[-1]))
+-	      break;
+-	    if (try + len < buf + size && WCHAR((unsigned char) try[len]))
+-	      {
+-		offset = kwsexec (kwset, beg, --len, &kwsmatch);
+-		if (offset == (size_t) -1)
+-		  {
++	{
++	  while (len)
++	    {
++	      int word_match = 0;
++	      if (beg > buf)
++		{
+ #ifdef MBS_SUPPORT
+-		    if (MB_CUR_MAX > 1)
+-		      free (mb_properties);
++		  if (mb_cur_max > 1)
++		    {
++		      const char *s;
++		      int mr;
++		      wchar_t pwc;
++
++		      if (using_utf8)
++			{
++			  s = beg - 1;
++			  while (s > buf
++				 && (unsigned char) *s >= 0x80
++				 && (unsigned char) *s <= 0xbf)
++			    --s;
++			}
++		      else
++			s = last_char;
++		      mr = mbtowc (&pwc, s, beg - s);
++		      if (mr <= 0)
++			memset (&mbs, '\0', sizeof (mbstate_t));
++		      else if ((iswalnum (pwc) || pwc == L'_')
++			       && mr == (int) (beg - s))
++			goto next_char;
++		    }
++		  else
+ #endif /* MBS_SUPPORT */
+-		    return offset;
+-		  }
+-		try = beg + offset;
+-		len = kwsmatch.size[0];
+-	      }
+-	    else
+-	      goto success;
+-	  }
++		  if (WCHAR ((unsigned char) beg[-1]))
++		    goto next_char;
++		}
++#ifdef MBS_SUPPORT
++	      if (mb_cur_max > 1)
++		{
++		  wchar_t nwc;
++		  int mr;
++
++		  mr = mbtowc (&nwc, beg + len, buf + size - beg - len);
++		  if (mr <= 0)
++		    {
++		      memset (&mbs, '\0', sizeof (mbstate_t));
++		      word_match = 1;
++		    }
++		  else if (!iswalnum (nwc) && nwc != L'_')
++		    word_match = 1;
++		}
++	      else
++#endif /* MBS_SUPPORT */
++		if (beg + len >= buf + size || !WCHAR ((unsigned char) beg[len]))
++		  word_match = 1;
++	      if (word_match)
++		{
++		  if (!exact)
++		    /* Returns the whole line now we know there's a word match. */
++		    goto success;
++		  else
++		    /* Returns just this word match. */
++		    goto success_in_beg_and_len;
++		}
++	      if (len > 0)
++		{
++		  /* Try a shorter length anchored at the same place. */
++		  --len;
++		  offset = kwsexec (kwset, beg, len, &kwsmatch);
++
++		  if (offset == -1)
++		    goto next_char; /* Try a different anchor. */
++#ifdef MBS_SUPPORT
++		  if (mb_cur_max > 1 && !using_utf8)
++		    {
++		      size_t bytes_left = offset;
++		      while (bytes_left)
++			{
++			  size_t mlen = mbrlen (beg, bytes_left, &mbs);
++
++			  last_char = beg;
++			  if (mlen == (size_t) -1 || mlen == 0)
++			    {
++			      /* Incomplete character: treat as single-byte. */
++			      memset (&mbs, '\0', sizeof (mbstate_t));
++			      beg++;
++			      bytes_left--;
++			      continue;
++			    }
++
++			  if (mlen == (size_t) -2)
++			    {
++			      /* Offset points inside multibyte character:
++			       * no good. */
++			      break;
++			    }
++
++			  beg += mlen;
++			  bytes_left -= mlen;
++			}
++
++		      if (bytes_left)
++			{
++			  memset (&mbs, '\0', sizeof (mbstate_t));
++			  goto next_char; /* Try a different anchor. */
++			}
++		    }
++		  else
++#endif /* MBS_SUPPORT */
++		  beg += offset;
++#ifdef MBS_SUPPORT
++		  /* The string at beg now matches first 3 chars of one of
++		     the search strings (less if there are shorter search
++		     strings).  See if this is a real match.  */
++		  if (f_i_multibyte
++		      && Fimbexec (beg, len - offset, &kwsmatch.size[0],
++				   exact))
++		    goto next_char;
++#endif /* MBS_SUPPORT */
++		  len = kwsmatch.size[0];
++		}
++	    }
++	}
+       else
+ 	goto success;
+-    }
+-
++next_char:;
+ #ifdef MBS_SUPPORT
+-  if (MB_CUR_MAX > 1)
+-    free (mb_properties);
++      /* Advance to next character.  For MB_CUR_MAX == 1 case this is handled
++	 by ++beg above.  */
++      if (mb_cur_max > 1)
++	{
++	  if (using_utf8)
++	    {
++	      unsigned char c = *beg;
++	      if (c >= 0xc2)
++		{
++		  if (c < 0xe0)
++		    ++beg;
++		  else if (c < 0xf0)
++		    beg += 2;
++		  else if (c < 0xf8)
++		    beg += 3;
++		  else if (c < 0xfc)
++		    beg += 4;
++		  else if (c < 0xfe)
++		    beg += 5;
++		}
++	    }
++	  else
++	    {
++	      size_t l = mbrlen (beg, buf + size - beg, &mbs);
++
++	      last_char = beg;
++	      if (l + 2 >= 2)
++		beg += l - 1;
++	      else
++		memset (&mbs, '\0', sizeof (mbstate_t));
++	    }
++	}
+ #endif /* MBS_SUPPORT */
++    }
++
++ failure:
+   return -1;
+ 
+  success:
++#ifdef MBS_SUPPORT
++  if (mb_cur_max > 1 && !using_utf8)
++    {
++      end = beg + len;
++      while (end < buf + size)
++	{
++	  size_t mlen = mbrlen (end, buf + size - end, &mbs);
++	  if (mlen == (size_t) -1 || mlen == (size_t) -2 || mlen == 0)
++	    {
++	      memset (&mbs, '\0', sizeof (mbstate_t));
++	      mlen = 1;
++	    }
++	  if (mlen == 1 && *end == eol)
++	    break;
++
++	  end += mlen;
++	}
++    }
++  else
++#endif /* MBS_SUPPORT */
+   end = memchr (beg + len, eol, (buf + size) - (beg + len));
++
+   end++;
+   while (buf < beg && beg[-1] != eol)
+     --beg;
+-  *match_size = end - beg;
+-#ifdef MBS_SUPPORT
+-  if (MB_CUR_MAX > 1)
+-    free (mb_properties);
+-#endif /* MBS_SUPPORT */
++  len = end - beg;
++  /* FALLTHROUGH */
++
++ success_in_beg_and_len:
++  *match_size = len;
+   return beg - buf;
+ }
+ 
+@@ -701,8 +1267,9 @@ Pexecute (char const *buf, size_t size, size_t *match_size, int exact)
+       char eol = eolbyte;
+       if (!exact)
+ 	{
+-	  end = memchr (end, eol, buflim - end);
+-	  end++;
++	  while (end < buflim)
++	    if (*end++ == eol)
++	      break;
+ 	  while (buf < beg && beg[-1] != eol)
+ 	    --beg;
+ 	}
+-- 
+1.8.4.2
+
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
new file mode 100644
index 0000000..3ccce5f
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Pending
+
+automake 1.12 has depricated automatic de-ANSI-fication support
+
+this patch avoids these kinds of errors:
+
+| configure.in:33: error: automatic de-ANSI-fication support has been removed
+| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from...
+| configure.in:33: the top level
+| autom4te: m4 failed with exit status: 1
+...
+| lib/Makefile.am:2: error: automatic de-ANSI-fication support has been removed
+| src/Makefile.am:2: error: automatic de-ANSI-fication support has been removed
+| autoreconf: automake failed with exit status: 1
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/05/04
+
+Index: grep-2.5.1a/configure.in
+===================================================================
+--- grep-2.5.1a.orig/configure.in
++++ grep-2.5.1a/configure.in
+@@ -30,7 +30,6 @@ AC_PROG_RANLIB
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_SYS_LARGEFILE
+-AM_C_PROTOTYPES
+ AC_TYPE_SIZE_T
+ AC_CHECK_TYPE(ssize_t, int)
+ AC_C_CONST
+Index: grep-2.5.1a/lib/Makefile.am
+===================================================================
+--- grep-2.5.1a.orig/lib/Makefile.am
++++ grep-2.5.1a/lib/Makefile.am
+@@ -1,5 +1,5 @@
+ #
+-AUTOMAKE_OPTIONS = ../src/ansi2knr
++AUTOMAKE_OPTIONS = 
+ 
+ SUBDIRS = posix
+ 
+Index: grep-2.5.1a/src/Makefile.am
+===================================================================
+--- grep-2.5.1a.orig/src/Makefile.am
++++ grep-2.5.1a/src/Makefile.am
+@@ -1,5 +1,5 @@
+ ## Process this file with automake to create Makefile.in
+-AUTOMAKE_OPTIONS = ansi2knr no-dependencies
++AUTOMAKE_OPTIONS = no-dependencies
+ 
+ LN = ln
+ 
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch
new file mode 100644
index 0000000..de054fc
--- /dev/null
+++ b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch
@@ -0,0 +1,55 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which
+# doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have
+# mempcpy, we'll just use that instead.
+# Patch source: OpenEmbedded
+
+Index: grep-2.5.1/intl/localealias.c
+===================================================================
+--- grep-2.5.1.orig/intl/localealias.c	2002-03-14 00:39:06.000000000 +1100
++++ grep-2.5.1/intl/localealias.c	2007-05-17 13:53:58.000000000 +1000
+@@ -65,7 +65,7 @@
+ # define strcasecmp __strcasecmp
+ 
+ # ifndef mempcpy
+-#  define mempcpy __mempcpy
++#  error "mempcpy not detected"
+ # endif
+ # define HAVE_MEMPCPY	1
+ # define HAVE___FSETLOCKING	1
+Index: grep-2.5.1/lib/getopt.c
+===================================================================
+--- grep-2.5.1.orig/lib/getopt.c	2001-03-04 16:33:12.000000000 +1100
++++ grep-2.5.1/lib/getopt.c	2007-05-17 13:51:44.000000000 +1000
+@@ -326,7 +326,7 @@
+ 	nonoption_flags_len = nonoption_flags_max_len = 0;
+       else
+ 	{
+-	  memset (__mempcpy (new_str, __getopt_nonoption_flags,
++	  memset (mempcpy (new_str, __getopt_nonoption_flags,
+ 			     nonoption_flags_max_len),
+ 		  '\0', top + 1 - nonoption_flags_max_len);
+ 	  nonoption_flags_max_len = top + 1;
+@@ -437,7 +437,7 @@
+ 	      if (__getopt_nonoption_flags == NULL)
+ 		nonoption_flags_max_len = -1;
+ 	      else
+-		memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
++		memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
+ 			'\0', nonoption_flags_max_len - len);
+ 	    }
+ 	}
+Index: grep-2.5.1/lib/regex.c
+===================================================================
+--- grep-2.5.1.orig/lib/regex.c	2001-04-03 04:04:45.000000000 +1000
++++ grep-2.5.1/lib/regex.c	2007-05-17 13:51:48.000000000 +1000
+@@ -7842,7 +7842,7 @@
+       if (msg_size > errbuf_size)
+         {
+ #if defined HAVE_MEMPCPY || defined _LIBC
+-	  *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
++	  *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
+ #else
+           memcpy (errbuf, msg, errbuf_size - 1);
+           errbuf[errbuf_size - 1] = 0;
diff --git a/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..ba1a4ba
--- /dev/null
+++ b/meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch b/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch
new file mode 100644
index 0000000..e88a988
--- /dev/null
+++ b/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch
@@ -0,0 +1,154 @@
+Upstream-Status: Backport
+
+Backport patch to fix CVE-2015-1345.
+http://git.savannah.gnu.org/cgit/grep.git/commit/?id=83a95bd
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From 83a95bd8c8561875b948cadd417c653dbe7ef2e2 Mon Sep 17 00:00:00 2001
+From: Yuliy Pisetsky <ypisetsky@fb.com>
+Date: Thu, 1 Jan 2015 15:36:55 -0800
+Subject: [PATCH] grep -F: fix a heap buffer (read) overrun
+
+grep's read buffer is often filled to its full size, except when
+reading the final buffer of a file.  In that case, the number of
+bytes read may be far less than the size of the buffer.  However, for
+certain unusual pattern/text combinations, grep -F would mistakenly
+examine bytes in that uninitialized region of memory when searching
+for a match.  With carefully chosen inputs, one can cause grep -F to
+read beyond the end of that buffer altogether.  This problem arose via
+commit v2.18-90-g73893ff with the introduction of a more efficient
+heuristic using what is now the memchr_kwset function. The use of
+that function in bmexec_trans could leave TP much larger than EP,
+and the subsequent call to bm_delta2_search would mistakenly access
+beyond end of the main input read buffer.
+
+* src/kwset.c (bmexec_trans): When TP reaches or exceeds EP,
+do not call bm_delta2_search.
+* tests/kwset-abuse: New file.
+* tests/Makefile.am (TESTS): Add it.
+* THANKS.in: Update.
+* NEWS (Bug fixes): Mention it.
+
+Prior to this patch, this command would trigger a UMR:
+
+  printf %0360db 0 | valgrind src/grep -F $(printf %019dXb 0)
+
+  Use of uninitialised value of size 8
+     at 0x4142BE: bmexec_trans (kwset.c:657)
+     by 0x4143CA: bmexec (kwset.c:678)
+     by 0x414973: kwsexec (kwset.c:848)
+     by 0x414DC4: Fexecute (kwsearch.c:128)
+     by 0x404E2E: grepbuf (grep.c:1238)
+     by 0x4054BF: grep (grep.c:1417)
+     by 0x405CEB: grepdesc (grep.c:1645)
+     by 0x405EC1: grep_command_line_arg (grep.c:1692)
+     by 0x4077D4: main (grep.c:2570)
+
+See the accompanying test for how to trigger the heap buffer overrun.
+
+Thanks to Nima Aghdaii for testing and finding numerous
+ways to break early iterations of this patch.
+---
+ NEWS              |  5 +++++
+ THANKS.in         |  1 +
+ src/kwset.c       |  2 ++
+ tests/Makefile.am |  1 +
+ tests/kwset-abuse | 32 ++++++++++++++++++++++++++++++++
+ 5 files changed, 41 insertions(+)
+ create mode 100755 tests/kwset-abuse
+
+diff --git a/NEWS b/NEWS
+index 975440d..3835d8d 100644
+--- a/NEWS
++++ b/NEWS
+@@ -2,6 +2,11 @@ GNU grep NEWS                                    -*- outline -*-
+ 
+ * Noteworthy changes in release ?.? (????-??-??) [?]
+ 
++** Bug fixes
++
++  grep no longer reads from uninitialized memory or from beyond the end
++  of the heap-allocated input buffer.
++
+ 
+ * Noteworthy changes in release 2.21 (2014-11-23) [stable]
+ 
+diff --git a/THANKS.in b/THANKS.in
+index aeaf516..624478d 100644
+--- a/THANKS.in
++++ b/THANKS.in
+@@ -62,6 +62,7 @@ Michael Aichlmayr                   mikla@nx.com
+ Miles Bader                         miles@ccs.mt.nec.co.jp
+ Mirraz Mirraz                       mirraz1@rambler.ru
+ Nelson H. F. Beebe                  beebe@math.utah.edu
++Nima Aghdaii                        naghdaii@fb.com
+ Olaf Kirch                          okir@ns.lst.de
+ Paul Kimoto                         kimoto@spacenet.tn.cornell.edu
+ Péter Radics                        mitchnull@gmail.com
+diff --git a/src/kwset.c b/src/kwset.c
+index 4003c8d..376f7c3 100644
+--- a/src/kwset.c
++++ b/src/kwset.c
+@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size)
+                     if (! tp)
+                       return -1;
+                     tp++;
++                    if (ep <= tp)
++                      break;
+                   }
+               }
+           }
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 2cba2cd..0508cd2 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -75,6 +75,7 @@ TESTS =						\
+   inconsistent-range				\
+   invalid-multibyte-infloop			\
+   khadafy					\
++  kwset-abuse					\
+   long-line-vs-2GiB-read			\
+   match-lines					\
+   max-count-overread				\
+diff --git a/tests/kwset-abuse b/tests/kwset-abuse
+new file mode 100755
+index 0000000..6d8ec0c
+--- /dev/null
++++ b/tests/kwset-abuse
+@@ -0,0 +1,32 @@
++#! /bin/sh
++# Evoke a segfault in a hard-to-reach code path of kwset.c.
++# This bug affected grep versions 2.19 through 2.21.
++#
++# Copyright (C) 2015 Free Software Foundation, Inc.
++#
++# This program is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 3 of the License, or
++# (at your option) any later version.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++
++. "${srcdir=.}/init.sh"; path_prepend_ ../src
++
++fail=0
++
++# This test case chooses a haystack of size 260,000, since prodding
++# with gdb showed a reallocation slightly larger than that in fillbuf.
++# To reach the buggy code, the needle must have length < 1/11 that of
++# the haystack, and 10,000 is a nice round number that fits the bill.
++printf '%0260000dXy\n' 0 | grep -F $(printf %010000dy 0)
++
++test $? = 1 || fail=1
++
++Exit $fail
+-- 
+2.4.1
+
diff --git a/meta/recipes-extended/grep/grep_2.21.bb b/meta/recipes-extended/grep/grep_2.21.bb
new file mode 100644
index 0000000..3661098
--- /dev/null
+++ b/meta/recipes-extended/grep/grep_2.21.bb
@@ -0,0 +1,42 @@
+SUMMARY = "GNU grep utility"
+HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
+BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
+SECTION = "console/utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
+
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://grep-fix-CVE-2015-1345.patch \
+          "
+
+SRC_URI[md5sum] = "43c48064d6409862b8a850db83c8038a"
+SRC_URI[sha256sum] = "5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de"
+
+inherit autotools gettext texinfo
+
+EXTRA_OECONF = "--disable-perl-regexp"
+
+do_configure_prepend () {
+	rm -f ${S}/m4/init.m4
+}
+
+do_install () {
+	autotools_do_install
+	install -d ${D}${base_bindir}
+	mv ${D}${bindir}/grep ${D}${base_bindir}/grep
+	mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
+	mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
+	rmdir ${D}${bindir}/
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "grep egrep fgrep"
+ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
+ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
+ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
new file mode 100644
index 0000000..5a2da28
--- /dev/null
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -0,0 +1,56 @@
+SUMMARY = "Pattern matching utilities"
+DESCRIPTION = "The GNU versions of commonly used grep utilities.  The grep command searches one or more input \
+files for lines containing a match to a specified pattern."
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+PR = "r2"
+
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
+           file://uclibc-fix.patch \
+           file://grep_fix_for_automake-1.12.patch \
+           file://gettext.patch \
+           file://fix64-int-to-pointer.patch \
+           file://Makevars \
+           file://grep-CVE-2012-5667.patch \
+           file://fix-for-texinfo-5.1.patch \
+           file://grep-egrep-fgrep-Fix-LSB-NG-cases.patch \
+          "
+
+SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c"
+SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132"
+
+inherit autotools gettext texinfo
+
+EXTRA_OECONF_INCLUDED_REGEX = "--without-included-regex"
+EXTRA_OECONF_INCLUDED_REGEX_libc-musl = "--with-included-regex"
+
+EXTRA_OECONF = "--disable-perl-regexp \
+                ${EXTRA_OECONF_INCLUDED_REGEX}"
+
+CFLAGS += "-D PROTOTYPES"
+do_configure_prepend () {
+	rm -f ${S}/m4/init.m4
+	cp -f ${WORKDIR}/Makevars ${S}/po/
+}
+
+do_install () {
+	autotools_do_install
+	install -d ${D}${base_bindir}
+	mv ${D}${bindir}/grep ${D}${base_bindir}/grep
+	mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
+	mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
+	rmdir ${D}${bindir}/
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "grep egrep fgrep"
+ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
+ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
+ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch
new file mode 100644
index 0000000..559ae72
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch
@@ -0,0 +1,39 @@
+Upstream-Status: Inappropriate [embedded]
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+---
+ Makefile.sub |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/contrib/groffer/Makefile.sub
++++ b/contrib/groffer/Makefile.sub
+@@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version.
+ 	$(RM) $@;
+ 	sed \
+             -e "s|@g@|$(g)|g" \
+-	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
++	    -e "s|@BINDIR@|$(bindir)|g" \
+ 	    -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
+ 	    -e "s|@VERSION@|$(version)$(revision)|g" \
+ 	    $(srcdir)/groffer.sh >$@;
+ 	chmod +x $@
+ 
+ install_data: groffer
+-	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
+-	-$(RM) $(DESTDIR)$(bindir)/groffer
+-	$(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer
++	-test -d $(bindir) || $(mkinstalldirs) $(bindir)
++	-$(RM) $(bindir)/groffer
++	$(INSTALL_SCRIPT) groffer $(bindir)/groffer
+ 	-test -d $(DESTDIR)$(libdir)/groff/groffer || \
+           $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
+@@ -58,7 +58,7 @@ install_data: groffer
+ 	$(DESTDIR)$(libdir)/groff/groffer/version.sh
+ 
+ uninstall_sub:
+-	-$(RM) $(DESTDIR)$(bindir)/groffer
++	-$(RM) $(bindir)/groffer
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh
+ 	-rmdir $(DESTDIR)$(libdir)/groff/groffer
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch
new file mode 100644
index 0000000..c24eff9
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch
@@ -0,0 +1,39 @@
+
+Upstream-Status: Inappropriate [embedded]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ groff-1.18.1.4/Makefile.in |    7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -460,27 +460,22 @@ OTHERDIRS=\
+   src/roff/grog \
+   src/roff/nroff \
+   contrib/mm \
+   contrib/pic2graph \
+   contrib/eqn2graph \
+-  contrib/groffer \
+-  contrib/mom \
+-  doc
++  contrib/groffer
+ ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
+   $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS)
+ EXTRADIRS=\
+   font/devps/generate \
+   font/devdvi/generate \
+   font/devlj4/generate \
+-  src/xditview \
+   doc
+ NOMAKEDIRS=\
+   arch/djgpp \
+   contrib/mm/examples \
+   contrib/mm/mm \
+-  contrib/mom/examples \
+-  contrib/mom/momdoc \
+   src/libs/snprintf
+ DISTDIRS=\
+   $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \
+   $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS)
+ TARGETS=all install install_bin install_data clean distclean mostlyclean \
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch
new file mode 100644
index 0000000..e3f1aa6
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch
@@ -0,0 +1,36 @@
+Upstream-Status: Inappropriate [embedded]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: groff-1.18.1.4/tmac/man.local
+===================================================================
+--- groff-1.18.1.4.orig/tmac/man.local	2000-10-26 22:15:17.000000000 +0800
++++ groff-1.18.1.4/tmac/man.local	2010-08-24 14:17:52.070006664 +0800
+@@ -1,2 +1,27 @@
+ .\" This file is loaded after an-old.tmac.
+ .\" Put any local modifications to an-old.tmac here.
++.
++.if n \{\
++.  \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other
++.  \" than utf8.
++.  if !'\*[.T]'utf8' \
++.    tr \[oq]'
++.
++.  \" Debian: Disable the use of SGR (ANSI colour) escape sequences by
++.  \" grotty.
++.  if '\V[GROFF_SGR]'' \
++.    output x X tty: sgr 0
++.
++.  \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make
++.  \" searching in man pages easier.
++.  if '\*[.T]'utf8' \
++.    char \- \N'45'
++.
++.  \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such
++.  \" as those in command-line options. This is a bug in those pages, but
++.  \" too many fonts are missing the Unicode HYPHEN character, so we render
++.  \" this as the ASCII-compatible HYPHEN-MINUS instead.
++.  if '\*[.T]'utf8' \
++.    char - \N'45'
++.\}
++
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch
new file mode 100644
index 0000000..409c1a5
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch
@@ -0,0 +1,36 @@
+
+Upstream-Status: Inappropriate [embedded]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: groff-1.18.1.4/tmac/mdoc.local
+===================================================================
+--- groff-1.18.1.4.orig/tmac/mdoc.local	2001-03-23 08:17:51.000000000 +0800
++++ groff-1.18.1.4/tmac/mdoc.local	2010-08-24 14:20:22.014006846 +0800
+@@ -1,2 +1,26 @@
+ .\" This file is loaded after doc.tmac.
+ .\" Put any local modifications to doc.tmac here.
++.
++.if n \{\
++.  \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other
++.  \" than utf8.
++.  if !'\*[.T]'utf8' \
++.    tr \[oq]'
++.
++.  \" Debian: Disable the use of SGR (ANSI colour) escape sequences by
++.  \" grotty.
++.  if '\V[GROFF_SGR]'' \
++.    output x X tty: sgr 0
++.
++.  \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make
++.  \" searching in man pages easier.
++.  if '\*[.T]'utf8' \
++.    char \- \N'45'
++.
++.  \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such
++.  \" as those in command-line options. This is a bug in those pages, but
++.  \" too many fonts are missing the Unicode HYPHEN character, so we render
++.  \" this as the ASCII-compatible HYPHEN-MINUS instead.
++.  if '\*[.T]'utf8' \
++.    char - \N'45'
++.\}
diff --git a/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..b61b432
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: groff-1.22.3/src/libs/gnulib/lib/Makefile.am
+===================================================================
+--- groff-1.22.3.orig/src/libs/gnulib/lib/Makefile.am
++++ groff-1.22.3/src/libs/gnulib/lib/Makefile.am
+@@ -113,7 +113,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch b/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch
new file mode 100644
index 0000000..c73328a
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch
@@ -0,0 +1,34 @@
+Correct the install path of man.local to fix following error:
+    /yocto/build/tmp/sysroots/x86_64-linux/usr/share/groff/1.22.2/tmac/an-old.tmac:690: warning: can't find macro file `man.local'
+
+Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
+Upstream-Status: Pending
+
+diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
+index 1506232..f1468c5 100644
+--- a/tmac/Makefile.sub
++++ b/tmac/Makefile.sub
+@@ -121,9 +121,9 @@ install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
+ 	  $(RM) $(DESTDIR)$(mdocdir)/$$f; \
+ 	  $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \
+ 	done
+-	-test -f $(DESTDIR)$(localtmacdir)/man.local \
++	-test -f $(DESTDIR)$(tmacdir)/man.local \
+ 	  || $(INSTALL_DATA) $(srcdir)/man.local \
+-	       $(DESTDIR)$(localtmacdir)/man.local
++	       $(DESTDIR)$(tmacdir)/man.local
+ 	-test -f $(DESTDIR)$(localtmacdir)/mdoc.local \
+ 	  || $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local
+ 
+@@ -164,9 +164,9 @@ uninstall_sub:
+ 	$(RM) $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
+ 	$(RM) $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
+ 	$(RM) $(DESTDIR)$(tmacdir)/www.tmac
+-	-if cmp -s $(DESTDIR)$(localtmacdir)/man.local \
++	-if cmp -s $(DESTDIR)$(tmacdir)/man.local \
+ 	           $(srcdir)/man.local; then \
+-	  $(RM) $(DESTDIR)$(localtmacdir)/man.local; \
++	  $(RM) $(DESTDIR)$(tmacdir)/man.local; \
+ 	fi
+ 	-if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \
+ 	           $(srcdir)/mdoc.local; then \
diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb
new file mode 100644
index 0000000..bd786a3
--- /dev/null
+++ b/meta/recipes-extended/groff/groff_1.18.1.4.bb
@@ -0,0 +1,49 @@
+SUMMARY = "GNU Troff software"
+DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
+formatting commands and produces formatted output."
+SECTION = "console/utils"
+HOMEPAGE = "http://www.gnu.org/software/groff/"
+LICENSE = "GPLv2"
+PR = "r1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/old/${BP}.tar.gz \
+          file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \
+          file://man-local.patch \
+          file://mdoc-local.patch \
+          file://groff-1.18.1.4-fix-bindir.patch \
+" 
+
+inherit autotools texinfo
+
+EXTRA_OECONF="--without-x --prefix=${D} --exec-prefix=${D} --bindir=${D}${bindir} --datadir=${D}${datadir} --mandir=${D}${datadir}/man --infodir=${D}${datadir}info --with-appresdir=${D}${datadir}"
+
+SRC_URI[md5sum] = "ceecb81533936d251ed015f40e5f7287"
+SRC_URI[sha256sum] = "ff3c7c3b6cae5e8cc5062a144de5eff0022e8e970e1774529cc2d5dde46ce50d"
+PARALLEL_MAKE = ""
+
+do_configure (){
+    oe_runconf
+}
+
+do_install_append() {
+	# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
+	# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
+	for i in afmtodit mmroff; do
+		if [ -f ${D}${bindir}/$i ]; then
+			sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
+		fi
+	done
+
+	mkdir -p ${D}${sysconfdir}/groff
+	cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${sysconfdir}/groff/
+	cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${datadir}/groff/${PV}/tmac/
+}
+
+pkg_postinst_${PN}() {
+	ln -s tbl $D${bindir}/gtbl
+	echo "export GROFF_FONT_PATH=/usr/share/groff/${PV}/font" >> $D${sysconfdir}/profile
+	echo "export GROFF_TMAC_PATH=/usr/share/groff/${PV}/tmac" >> $D${sysconfdir}/profile
+}
+
diff --git a/meta/recipes-extended/groff/groff_1.22.3.bb b/meta/recipes-extended/groff/groff_1.22.3.bb
new file mode 100644
index 0000000..4bffa81
--- /dev/null
+++ b/meta/recipes-extended/groff/groff_1.22.3.bb
@@ -0,0 +1,70 @@
+SUMMARY = "GNU Troff software"
+DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \
+formatting commands and produces formatted output."
+SECTION = "base"
+HOMEPAGE = "http://www.gnu.org/software/groff/"
+LICENSE = "GPLv3"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
+	file://groff-1.22.2-correct-man.local-install-path.patch \
+	file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+"
+
+SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
+SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5"
+
+DEPENDS = "groff-native"
+DEPENDS_class-native = ""
+RDEPENDS_${PN} += "perl sed"
+
+inherit autotools texinfo
+
+EXTRA_OECONF = "--without-x"
+PARALLEL_MAKE = ""
+
+do_configure_prepend() {
+	if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
+		sed -i \
+		    -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \
+		    -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \
+		    -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
+		    -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \
+		    ${S}/contrib/*/Makefile.sub \
+		    ${S}/doc/Makefile.in \
+		    ${S}/doc/Makefile.sub
+	fi
+}
+
+do_configure_append() {
+    # generate gnulib configure script
+    olddir=`pwd`
+    cd ${S}/src/libs/gnulib/
+    ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
+    cd ${olddir}
+}
+
+do_install_append() {
+	# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
+	# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
+	for i in afmtodit mmroff gropdf pdfmom grog; do
+		if [ -f ${D}${bindir}/$i ]; then
+			sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i
+		fi
+	done
+	if [ -e ${D}${libdir}/charset.alias ]; then
+		rm -rf ${D}${libdir}/charset.alias
+	fi
+}
+
+do_install_append_class-native() {
+	create_cmdline_wrapper ${D}/${bindir}/groff \
+		-F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \
+		-M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac
+}
+
+FILES_${PN} += "${libdir}/${BPN}/site-tmac \
+                ${libdir}/${BPN}/groffer/"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch
new file mode 100644
index 0000000..d9e8d21
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch
@@ -0,0 +1,48 @@
+gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict.
+
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Upstream-Status: Inappropriate [licensing]
+
+Index: gzip-1.3.12/gzip.c
+===================================================================
+--- gzip-1.3.12.orig/gzip.c	2010-08-13 10:29:38.000000000 +0800
++++ gzip-1.3.12/gzip.c	2010-08-13 10:29:44.000000000 +0800
+@@ -1637,7 +1637,7 @@
+ 	}
+       }
+ 
+-    if (futimens (ofd, ofname, timespec) != 0)
++    if (futimens_gnulib (ofd, ofname, timespec) != 0)
+       {
+ 	int e = errno;
+ 	WARN ((stderr, "%s: ", program_name));
+Index: gzip-1.3.12/lib/utimens.c
+===================================================================
+--- gzip-1.3.12.orig/lib/utimens.c	2010-08-13 10:33:47.000000000 +0800
++++ gzip-1.3.12/lib/utimens.c	2010-08-13 10:34:02.000000000 +0800
+@@ -75,7 +75,7 @@
+    Return 0 on success, -1 (setting errno) on failure.  */
+ 
+ int
+-futimens (int fd ATTRIBUTE_UNUSED,
++futimens_gnulib (int fd ATTRIBUTE_UNUSED,
+ 	  char const *file, struct timespec const timespec[2])
+ {
+   /* Some Linux-based NFS clients are buggy, and mishandle time stamps
+@@ -185,5 +185,5 @@
+ int
+ utimens (char const *file, struct timespec const timespec[2])
+ {
+-  return futimens (-1, file, timespec);
++  return futimens_gnulib (-1, file, timespec);
+ }
+Index: gzip-1.3.12/lib/utimens.h
+===================================================================
+--- gzip-1.3.12.orig/lib/utimens.h	2010-08-13 10:14:57.000000000 +0800
++++ gzip-1.3.12/lib/utimens.h	2010-08-13 10:21:45.000000000 +0800
+@@ -1,3 +1,3 @@
+ #include <time.h>
+-int futimens (int, char const *, struct timespec const [2]);
++int futimens_gnulib (int, char const *, struct timespec const [2]);
+ int utimens (char const *, struct timespec const [2]);
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch
new file mode 100644
index 0000000..6b2f698
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch
@@ -0,0 +1,56 @@
+remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular
+dependency of AC_GNU_SOURCE"
+
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Upstream-Status: Inappropriate [licensing]
+
+Index: gzip-1.3.12/m4/extensions.m4
+===================================================================
+--- gzip-1.3.12.orig/m4/extensions.m4	2010-08-16 14:18:16.000000000 +0800
++++ gzip-1.3.12/m4/extensions.m4	2010-08-16 14:21:54.000000000 +0800
+@@ -12,44 +12,6 @@
+ # enough in this area it's likely we'll need to redefine
+ # AC_USE_SYSTEM_EXTENSIONS for quite some time.
+ 
+-# AC_USE_SYSTEM_EXTENSIONS
+-# ------------------------
+-# Enable extensions on systems that normally disable them,
+-# typically due to standards-conformance issues.
+-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+-[
+-  AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+-  AC_BEFORE([$0], [AC_RUN_IFELSE])
+-
+-  AC_REQUIRE([AC_GNU_SOURCE])
+-  AC_REQUIRE([AC_AIX])
+-  AC_REQUIRE([AC_MINIX])
+-
+-  AH_VERBATIM([__EXTENSIONS__],
+-[/* Enable extensions on Solaris.  */
+-#ifndef __EXTENSIONS__
+-# undef __EXTENSIONS__
+-#endif
+-#ifndef _POSIX_PTHREAD_SEMANTICS
+-# undef _POSIX_PTHREAD_SEMANTICS
+-#endif
+-#ifndef _TANDEM_SOURCE
+-# undef _TANDEM_SOURCE
+-#endif])
+-  AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+-    [ac_cv_safe_to_define___extensions__],
+-    [AC_COMPILE_IFELSE(
+-       [AC_LANG_PROGRAM([
+-#	  define __EXTENSIONS__ 1
+-	  AC_INCLUDES_DEFAULT])],
+-       [ac_cv_safe_to_define___extensions__=yes],
+-       [ac_cv_safe_to_define___extensions__=no])])
+-  test $ac_cv_safe_to_define___extensions__ = yes &&
+-    AC_DEFINE([__EXTENSIONS__])
+-  AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+-  AC_DEFINE([_TANDEM_SOURCE])
+-])
+-
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
diff --git a/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
new file mode 100644
index 0000000..92863d6
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
@@ -0,0 +1,31 @@
+fix MakeMaker issues with using wrong SHELL/GREP
+
+A set of substitution is being processed to all target scripts with sed by
+replacing some key words with the detected values at configure time, this
+is exactly not compliant with cross compling, and will cause missing path
+errors at run time like:
+"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
+
+Fixed by removing unneeded substitution and using real runtime paths
+instead.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+Upstream-Status: Pending
+
+Index: gzip-1.3.12/Makefile.am
+===================================================================
+diff -urpN a/Makefile.am b/Makefile.am
+--- a/Makefile.am	2013-11-30 10:06:09.402234871 +0800
++++ b/Makefile.am	2013-11-30 10:13:42.952236025 +0800
+@@ -81,9 +81,8 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
+ SUFFIXES = .in
+ .in:
+ 	$(AM_V_GEN)sed \
+-		-e 's|/bin/sh|$(SHELL)|g' \
+ 		-e 's|[@]bindir@|'\''$(bindir)'\''|g' \
+-		-e 's|[@]GREP@|$(GREP)|g' \
++		-e 's|[@]GREP@|$(base_bindir)/grep|g' \
+ 		-e 's|[@]VERSION@|$(VERSION)|g' \
+ 		$(srcdir)/$@.in >$@-t \
+ 	  && chmod a+x $@-t \
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
new file mode 100644
index 0000000..94480ec
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -0,0 +1,29 @@
+SUMMARY = "Standard GNU compressor"
+DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \
+project. Mark Adler wrote the decompression part"
+HOMEPAGE = "http://www.gnu.org/software/gzip/"
+SECTION = "console/utils"
+# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
+
+inherit autotools texinfo
+
+EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep"
+
+do_install_append () {
+	# Rename and move files into /bin (FHS), which is typical place for gzip
+	install -d ${D}${base_bindir}
+	mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip
+	mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip
+	mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat
+	mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "gunzip gzip zcat"
+ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
+ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
+ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/gzip/gzip_1.3.12.bb b/meta/recipes-extended/gzip/gzip_1.3.12.bb
new file mode 100644
index 0000000..e406282
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip_1.3.12.bb
@@ -0,0 +1,15 @@
+require gzip.inc
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+                    file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \
+                    file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 "
+
+SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \
+           file://m4-extensions-fix.patch \
+           file://dup-def-fix.patch"
+
+SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1"
+SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af"
+
+PR = "r2"
diff --git a/meta/recipes-extended/gzip/gzip_1.6.bb b/meta/recipes-extended/gzip/gzip_1.6.bb
new file mode 100644
index 0000000..b347f0b
--- /dev/null
+++ b/meta/recipes-extended/gzip/gzip_1.6.bb
@@ -0,0 +1,17 @@
+require gzip.inc
+
+LICENSE = "GPLv3+"
+
+SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
+SRC_URI_append_class-target = " file://wrong-path-fix.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
+
+PROVIDES_append_class-native = " gzip-replacement-native"
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "38603cb2843bf5681ff41aab3bcd6a20"
+SRC_URI[sha256sum] = "97eb83b763d9e5ad35f351fe5517e6b71521d7aac7acf3e3cacdb6b1496d8f7e"
diff --git a/meta/recipes-extended/hdparm/hdparm_9.48.bb b/meta/recipes-extended/hdparm/hdparm_9.48.bb
new file mode 100644
index 0000000..8267fd9
--- /dev/null
+++ b/meta/recipes-extended/hdparm/hdparm_9.48.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
+DESCRIPTION = "hdparm is a Linux shell utility for viewing \
+and manipulating various IDE drive and driver parameters."
+SECTION = "console/utils"
+LICENSE = "BSD"
+LICENSE_wiper = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
+                    file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
+                    file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
+                    file://wiper/wiper.sh;beginline=7;endline=31;md5=b7bc642addc152ea307505bf1a296f09"
+
+
+PACKAGES =+ "wiper"
+
+FILES_wiper = "${bindir}/wiper.sh"
+
+RDEPENDS_wiper = "bash gawk stat"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/${BP}.tar.gz "
+
+SRC_URI[md5sum] = "213efdbe7471fad3408198918e164354"
+SRC_URI[sha256sum] = "ce97b4a71cb04146f54cf6f69787e7f97ddfda9836dc803b459d3b3df3a4fbee"
+
+EXTRA_OEMAKE += 'STRIP="echo"'
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "hdparm"
+ALTERNATIVE_LINK_NAME[hdparm] = "${base_sbindir}/hdparm"
+ALTERNATIVE_PRIORITY = "100"
+
+do_install () {
+	install -d ${D}/${base_sbindir} ${D}/${mandir}/man8 ${D}/${bindir}
+	oe_runmake 'DESTDIR=${D}' 'sbindir=${base_sbindir}' install
+	cp ${S}/wiper/wiper.sh ${D}/${bindir}
+}
diff --git a/meta/recipes-extended/images/core-image-full-cmdline.bb b/meta/recipes-extended/images/core-image-full-cmdline.bb
new file mode 100644
index 0000000..4d69073
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-full-cmdline.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "A console-only image with more full-featured Linux system \
+functionality installed."
+
+IMAGE_FEATURES += "splash ssh-server-openssh"
+
+IMAGE_INSTALL = "\
+    packagegroup-core-boot \
+    packagegroup-core-full-cmdline \
+    ${CORE_IMAGE_EXTRA_INSTALL} \
+    "
+
+inherit core-image
diff --git a/meta/recipes-extended/images/core-image-kernel-dev.bb b/meta/recipes-extended/images/core-image-kernel-dev.bb
new file mode 100644
index 0000000..6b636ed
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-kernel-dev.bb
@@ -0,0 +1,20 @@
+DESCRIPTION = "A development image that builds the kernel and packages that are \
+sensitive to kernel updates and version changes"
+
+# Could also be core-image-basic, but we'll keep this small for now
+require recipes-core/images/core-image-minimal.bb
+
+KERNEL_DEV_UTILS ?= "dropbear connman"
+KERNEL_DEV_TOOLS ?= "packagegroup-core-tools-profile packagegroup-core-buildessential kernel-devsrc"
+KERNEL_DEV_MODULE ?= "kernel-modules"
+
+CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
+                             ${KERNEL_DEV_UTILS} \
+                             ${KERNEL_DEV_TOOLS} \
+                            "
+
+# We need extra space for things like kernel builds, etc.
+IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 3000000"
+
+# Let's define our own subset to test, we can later add a on-target kernel build even!
+DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date dmesg parselogs"
diff --git a/meta/recipes-extended/images/core-image-lsb-dev.bb b/meta/recipes-extended/images/core-image-lsb-dev.bb
new file mode 100644
index 0000000..d2dc9e2
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb-dev.bb
@@ -0,0 +1,7 @@
+require core-image-lsb.bb
+
+DESCRIPTION = "Basic image without X support suitable for development work. It \
+can be used for customization and implementations that conform to Linux \
+Standard Base (LSB)."
+
+IMAGE_FEATURES += "dev-pkgs"
diff --git a/meta/recipes-extended/images/core-image-lsb-sdk.bb b/meta/recipes-extended/images/core-image-lsb-sdk.bb
new file mode 100644
index 0000000..c3b6e7c
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb-sdk.bb
@@ -0,0 +1,9 @@
+require core-image-lsb.bb
+
+DESCRIPTION = "Basic image without X support suitable for Linux Standard Base \
+(LSB) implementations. It includes the full meta-toolchain, plus development \
+headers and libraries to form a standalone SDK."
+
+IMAGE_FEATURES += "tools-sdk dev-pkgs tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks"
+
+IMAGE_INSTALL += "kernel-devsrc"
diff --git a/meta/recipes-extended/images/core-image-lsb.bb b/meta/recipes-extended/images/core-image-lsb.bb
new file mode 100644
index 0000000..ab61c6e
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-lsb.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "An image containing packages that are required to conform \
+to the Linux Standard Base (LSB) specification."
+
+IMAGE_FEATURES += "splash ssh-server-openssh hwcodecs package-management"
+
+IMAGE_INSTALL = "\
+    ${CORE_IMAGE_BASE_INSTALL} \
+    packagegroup-core-full-cmdline \
+    packagegroup-core-lsb \
+    "
+
+inherit core-image distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "pam"
diff --git a/meta/recipes-extended/images/core-image-testmaster-initramfs.bb b/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
new file mode 100644
index 0000000..563260d
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Small image capable of booting a device with custom install scripts, \
+adding a second rootfs, used for testing."
+
+# use -testfs live-install scripts
+PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install-testfs initramfs-live-install-efi-testfs busybox udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = ""
+
+export IMAGE_BASENAME = "core-image-testmaster-initramfs"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/meta/recipes-extended/images/core-image-testmaster.bb b/meta/recipes-extended/images/core-image-testmaster.bb
new file mode 100644
index 0000000..78295c5
--- /dev/null
+++ b/meta/recipes-extended/images/core-image-testmaster.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "A master image to be deployed on a target useful for testing other images"
+
+IMAGE_FEATURES += "ssh-server-openssh package-management"
+
+inherit core-image
+
+# the deploy code requires bash and
+# normal linux utilities not busybox ones
+IMAGE_INSTALL += "\
+    bash coreutils util-linux tar gzip bzip2 kmod \
+    python-modules python-misc \
+    e2fsprogs e2fsprogs-mke2fs parted \
+    "
+# we need a particular initramfs for live images
+# that pulls custom install scripts which take
+# care of partitioning for us
+INITRD_IMAGE = "core-image-testmaster-initramfs"
+
diff --git a/meta/recipes-extended/images/wic-image-minimal.bb b/meta/recipes-extended/images/wic-image-minimal.bb
new file mode 100644
index 0000000..073c569
--- /dev/null
+++ b/meta/recipes-extended/images/wic-image-minimal.bb
@@ -0,0 +1,14 @@
+SUMMARY = "An example of partitioned image."
+
+IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
+
+IMAGE_FSTYPES = "wic.bz2"
+RM_OLD_IMAGE = "1"
+
+# core-image-minimal is referenced in .wks, so we need its rootfs
+# to be ready before our rootfs
+do_rootfs[depends] += "core-image-minimal:do_rootfs"
+
+IMAGE_ROOTFS_EXTRA_SPACE = "2000"
+
+inherit image
diff --git a/meta/recipes-extended/images/wic-image-minimal.wks b/meta/recipes-extended/images/wic-image-minimal.wks
new file mode 100644
index 0000000..29cd8f2
--- /dev/null
+++ b/meta/recipes-extended/images/wic-image-minimal.wks
@@ -0,0 +1,10 @@
+# short-description: Example of partitioned image with complex layout
+# long-description: This image contains boot partition and 3 rootfs partitions
+# created from core-image-minimal and wic-image-minimal image recipes.
+
+part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
+part / --source rootfs --ondisk sda --fstype=ext2 --label platform --align 1024
+part /core --source rootfs --rootfs-dir=core-image-minimal --ondisk sda --fstype=ext2 --label core --align 1024
+part /backup --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext2 --label backup --align 1024
+
+bootloader  --timeout=0  --append="rootwait console=tty0"
diff --git a/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
new file mode 100644
index 0000000..ab609e2
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
@@ -0,0 +1,47 @@
+From 5c47cf5061b852c02178f01e23690bfe38a99d93 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 17 Mar 2013 11:21:35 -0700
+Subject: [PATCH] configure: Add option to enable/disable libnfnetlink
+
+This changes the configure behaviour from autodetecting
+for libnfnetlink to having an option to disable it explicitly
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ configure.ac |   11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ba616ab..ce2d315 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,6 +53,9 @@ AC_ARG_ENABLE([libipq],
+ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
+ 	[Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
+ 	[pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
++AC_ARG_ENABLE([libnfnetlink],
++	AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
++	[enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
+ 
+ libiptc_LDFLAGS2="";
+ AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed],
+@@ -89,9 +92,11 @@ AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"])
+ AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"])
+ AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"])
+ 
+-PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
+-	[nfnetlink=1], [nfnetlink=0])
+-AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
++AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
++  PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0])
++  ])
++
++AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"])
+ 
+ regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
+ 	-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
new file mode 100644
index 0000000..7a003d9
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
@@ -0,0 +1,89 @@
+From 7c07b7fd4fdd7844dd032af822306f08e4422c34 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 20:47:29 -0700
+Subject: [PATCH] fix build with musl
+
+Add needed headers they are just not needed for glibc6+ but also
+for musl
+Define additional TCOPTS if not there
+
+u_initX types are in sys/types.h be explicit about it
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ extensions/libxt_TCPOPTSTRIP.c           | 15 +++++++++++++++
+ include/libiptc/ipt_kernel_headers.h     | 12 ------------
+ include/linux/netfilter_ipv4/ip_tables.h |  1 +
+ 3 files changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c
+index 6897857..8a170b2 100644
+--- a/extensions/libxt_TCPOPTSTRIP.c
++++ b/extensions/libxt_TCPOPTSTRIP.c
+@@ -12,6 +12,21 @@
+ #ifndef TCPOPT_MD5SIG
+ #	define TCPOPT_MD5SIG 19
+ #endif
++#ifndef TCPOPT_MAXSEG
++#	define TCPOPT_MAXSEG 2
++#endif
++#ifndef TCPOPT_WINDOW
++#	define TCPOPT_WINDOW 3
++#endif
++#ifndef TCPOPT_SACK_PERMITTED
++#	define TCPOPT_SACK_PERMITTED 4
++#endif
++#ifndef TCPOPT_SACK
++#	define TCPOPT_SACK 5
++#endif
++#ifndef TCPOPT_TIMESTAMP
++#	define TCPOPT_TIMESTAMP 8
++#endif
+ 
+ enum {
+ 	O_STRIP_OPTION = 0,
+diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h
+index 18861fe..a5963e9 100644
+--- a/include/libiptc/ipt_kernel_headers.h
++++ b/include/libiptc/ipt_kernel_headers.h
+@@ -5,7 +5,6 @@
+ 
+ #include <limits.h>
+ 
+-#if defined(__GLIBC__) && __GLIBC__ == 2
+ #include <netinet/ip.h>
+ #include <netinet/in.h>
+ #include <netinet/ip_icmp.h>
+@@ -13,15 +12,4 @@
+ #include <netinet/udp.h>
+ #include <net/if.h>
+ #include <sys/types.h>
+-#else /* libc5 */
+-#include <sys/socket.h>
+-#include <linux/ip.h>
+-#include <linux/in.h>
+-#include <linux/if.h>
+-#include <linux/icmp.h>
+-#include <linux/tcp.h>
+-#include <linux/udp.h>
+-#include <linux/types.h>
+-#include <linux/in6.h>
+-#endif
+ #endif
+diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
+index 57fd82a..4807246 100644
+--- a/include/linux/netfilter_ipv4/ip_tables.h
++++ b/include/linux/netfilter_ipv4/ip_tables.h
+@@ -15,6 +15,7 @@
+ #ifndef _IPTABLES_H
+ #define _IPTABLES_H
+ 
++#include <sys/types.h>
+ #include <linux/types.h>
+ 
+ #include <linux/netfilter_ipv4.h>
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
new file mode 100644
index 0000000..24ee29e
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables/types.h-add-defines-that-are-required-for-if_packet.patch
@@ -0,0 +1,49 @@
+From 19593491f43b70c1a71c3b9b8f4ff4fd14500014 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Fri, 23 Mar 2012 14:27:20 -0400
+Subject: [PATCH] types.h: add defines that are required for if_packet.h
+
+The iptables local linux/types.h overrides the kernel/sysroot
+types.h. As such, we need to provide some defines that are required
+to build against 3.2+ kernel headers.
+
+ifndef protection is provided for the defines to ensure that
+configuration that already have these defines are still buildable.
+
+This commit is temporary until a new version of iptables can be
+used that contains the defines.
+
+This is similar to the commit in the iptables git repository:
+
+  https://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commit;h=dbe77cc974cee656eae37e75039dd1a410a4535b
+
+Upstream-Status: Backport
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ include/linux/types.h |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/types.h b/include/linux/types.h
+index 8b483c8..ebf6432 100644
+--- a/include/linux/types.h
++++ b/include/linux/types.h
+@@ -34,5 +34,15 @@ typedef __u64 __bitwise __be64;
+ typedef __u16 __bitwise __sum16;
+ typedef __u32 __bitwise __wsum;
+ 
++#ifndef __aligned_u64
++#define __aligned_u64 __u64 __attribute__((aligned(8)))
++#endif
++#ifndef __aligned_be64
++#define __aligned_be64 __be64 __attribute__((aligned(8)))
++#endif
++#ifndef __aligned_le64
++#define __aligned_le64 __le64 __attribute__((aligned(8)))
++#endif
++
+ #endif /*  __ASSEMBLY__ */
+ #endif /* _LINUX_TYPES_H */
+-- 
+1.7.0.4
+
diff --git a/meta/recipes-extended/iptables/iptables_1.4.21.bb b/meta/recipes-extended/iptables/iptables_1.4.21.bb
new file mode 100644
index 0000000..31c017b
--- /dev/null
+++ b/meta/recipes-extended/iptables/iptables_1.4.21.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Tools for managing kernel packet filtering capabilities"
+DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
+filtering code in Linux."
+HOMEPAGE = "http://www.netfilter.org/"
+BUGTRACKER = "http://bugzilla.netfilter.org/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
+                    file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
+
+RRECOMMENDS_${PN} = "kernel-module-x-tables \
+                     kernel-module-ip-tables \
+                     kernel-module-iptable-filter \
+                     kernel-module-iptable-nat \
+                     kernel-module-nf-defrag-ipv4 \
+                     kernel-module-nf-conntrack \
+                     kernel-module-nf-conntrack-ipv4 \
+                     kernel-module-nf-nat \
+                     kernel-module-ipt-masquerade"
+FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
+FILES_${PN}-dbg =+ "${libdir}/xtables/.debug"
+
+SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
+           file://types.h-add-defines-that-are-required-for-if_packet.patch \
+           file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
+           file://0001-fix-build-with-musl.patch \
+          "
+
+SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0"
+SRC_URI[sha256sum] = "52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
+               "
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
+                 "
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# libnfnetlink recipe is in meta-networking layer
+PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink"
+
+do_configure_prepend() {
+	# Remove some libtool m4 files
+	# Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
+	rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
+}
diff --git a/meta/recipes-extended/iputils/files/debian/targets.diff b/meta/recipes-extended/iputils/files/debian/targets.diff
new file mode 100644
index 0000000..2cb5576
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/targets.diff
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [disable feature]
+
+Index: iputils-s20121221/Makefile
+===================================================================
+--- iputils-s20121221.orig/Makefile
++++ iputils-s20121221/Makefile
+@@ -106,7 +106,7 @@ endif
+ endif
+ 
+ # -------------------------------------
+-IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
++IPV4_TARGETS=tracepath ping clockdiff arping
+ IPV6_TARGETS=tracepath6 traceroute6 ping6
+ TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
+ 
diff --git a/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
new file mode 100644
index 0000000..d3b1886
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/debian/use_gethostbyname2.diff
@@ -0,0 +1,31 @@
+Upstream-Status: Pending [from other distro Debian]
+
+Index: iputils-s20121221/tracepath.c
+===================================================================
+--- iputils-s20121221.orig/tracepath.c
++++ iputils-s20121221/tracepath.c
+@@ -370,9 +370,9 @@ main(int argc, char **argv)
+ 	}
+ #endif
+ 
+-	he = gethostbyname(p);
++	he = gethostbyname2(argv[0], AF_INET);
+ 	if (he == NULL) {
+-		herror("gethostbyname");
++		herror("gethostbyname2");
+ 		exit(1);
+ 	}
+ 
+Index: iputils-s20121221/ping.c
+===================================================================
+--- iputils-s20121221.orig/ping.c
++++ iputils-s20121221/ping.c
+@@ -279,7 +279,7 @@ main(int argc, char **argv)
+ #else
+ 			idn = target;
+ #endif
+-			hp = gethostbyname(idn);
++			hp = gethostbyname2(idn, AF_INET);
+ 			if (!hp) {
+ 				fprintf(stderr, "ping: unknown host %s\n", target);
+ 				exit(2);
diff --git a/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
new file mode 100644
index 0000000..b9cd82e
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Backport
+
+From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001
+From: Arjan van de Ven <arjanvandeven@gmail.com>
+Date: Wed, 16 Jan 2013 03:12:15 +0900
+Subject: [PATCH] ping6: Fix build command line argument with gnutls.
+
+The ping6 command can use either openssl or gnutls...
+and the Makefile has a bunch of setup for defining which of the two to use.
+
+Unfortunately, the final -D define on the commandline to enable gnutls
+inside the ping6.c file didn't actually make it onto the gcc
+commandline.
+This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap.
+
+Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com>
+Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+---
+ Makefile |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c62d9df..89249f5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP)
+ DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
+ DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
+ LIB_ping  = $(LIB_CAP) $(LIB_IDN)
+-DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR)
++DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
+ LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
+ 
+ ping: ping_common.o
+-- 
+1.7.2.5
+
diff --git a/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
new file mode 100644
index 0000000..92bf946
--- /dev/null
+++ b/meta/recipes-extended/iputils/files/nsgmls-path-fix.patch
@@ -0,0 +1,27 @@
+Fix nsgmls path issue
+
+Upstream-Status: Pending
+
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Index: iputils-s20101006/doc/Makefile
+===================================================================
+--- iputils-s20101006.orig/doc/Makefile	2011-09-13 20:42:27.000000000 +0800
++++ iputils-s20101006/doc/Makefile	2011-09-13 21:01:52.000000000 +0800
+@@ -27,10 +27,15 @@
+ # docbook2man produces utterly ugly output and I did not find
+ # any way to customize this but hacking backend perl script a little.
+ # Well, hence...
++# nsgmls seems append path to search directory according to the sysid path.
++# e.g. if input ../index.db, it would search $search_directory/../ rather than
++# $search_directory, which leads searching failure. Fixing nsgmls probably
++# introduce some side effects, so use this ugly hack: running nsgmls in current
++# directory, and running docbook2man in tmp directory.
+ 
+ $(MANFILES): index.db
+ 	@-mkdir tmp.db2man
+-	@set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
++	@set -e; nsgmls $< >tmp.db2man/output; cd tmp.db2man; cat output | sgmlspl ../docbook2man-spec.pl ;	mv $@ ..
+ 	@-rm -rf tmp.db2man
+ 
+ clean:
diff --git a/meta/recipes-extended/iputils/iputils_s20121221.bb b/meta/recipes-extended/iputils/iputils_s20121221.bb
new file mode 100644
index 0000000..e87a32a
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils_s20121221.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Network monitoring tools"
+DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
+tracepath, tracepath6, ping, ping6 and arping."
+HOMEPAGE = "http://www.skbuff.net/iputils"
+SECTION = "console/network"
+
+LICENSE = "BSD & GPLv2+"
+
+LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
+                    file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
+                    file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
+                    file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
+
+DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap"
+
+
+SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
+           file://debian/use_gethostbyname2.diff \
+           file://debian/targets.diff \
+           file://nsgmls-path-fix.patch \
+           file://fix-build-command-line-argument-with-gnutls.patch \
+          "
+
+SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171"
+SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f"
+
+do_compile () {
+	oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man
+}
+
+do_install () {
+	install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
+	# SUID root programs
+	install -m 4555 ping ${D}${base_bindir}/ping
+	install -m 4555 ping6 ${D}${base_bindir}/ping6
+	install -m 4555 traceroute6 ${D}${base_bindir}/
+	install -m 4555 clockdiff ${D}${base_bindir}/
+	# Other programgs
+	for i in arping tracepath tracepath6; do
+	  install -m 0755 $i ${D}${base_bindir}/
+	done
+	# Manual pages for things we build packages for
+	for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
+	  install -m 0644 doc/$i ${D}${mandir}/man8/ || true
+	done
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-ping = "ping"
+ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
+
+ALTERNATIVE_${PN}-ping6 = "ping6"
+ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
+
+PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
+
+FILES_${PN}	= ""
+FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
+FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
+FILES_${PN}-arping = "${base_bindir}/arping"
+FILES_${PN}-tracepath = "${base_bindir}/tracepath"
+FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
+FILES_${PN}-traceroute6	= "${base_bindir}/traceroute6"
+FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
+FILES_${PN}-doc	= "${mandir}/man8"
diff --git a/meta/recipes-extended/less/less_479.bb b/meta/recipes-extended/less/less_479.bb
new file mode 100644
index 0000000..618954b
--- /dev/null
+++ b/meta/recipes-extended/less/less_479.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Text file viewer similar to more"
+DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
+based program for viewing text files and the output from other \
+programs. Less offers many features beyond those that more does."
+HOMEPAGE = "http://www.greenwoodsoftware.com/"
+SECTION = "console/utils"
+
+# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
+# Including email author giving permissing to use BSD
+#
+# From: Mark Nudelman <markn@greenwoodsoftware.com>
+# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
+# Date: 12/19/11
+#
+# Hi Elizabeth,
+# Using a generic BSD license for less is fine with me.
+# Thanks,
+#
+# --Mark
+#
+
+LICENSE = "GPLv3+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://LICENSE;md5=48c26a307f91af700e1f00585f215aaf"
+DEPENDS = "ncurses"
+
+SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
+	  "
+
+SRC_URI[md5sum] = "049f51ccfe2686009c6ce943eeb4bbaf"
+SRC_URI[sha256sum] = "5bf06cb30ee2a2bd1f79f39aa91e46444e7cb19b48c95c4992fa63cfe4527a80"
+
+inherit autotools update-alternatives
+
+do_install () {
+        oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
+}
+
+ALTERNATIVE_${PN} = "less"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/libaio/libaio/00_arches.patch b/meta/recipes-extended/libaio/libaio/00_arches.patch
new file mode 100644
index 0000000..9d6447d
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/00_arches.patch
@@ -0,0 +1,607 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+from openembedded, added by Qing He <qing.he@intel.com>
+
+Index: libaio-0.3.110/src/syscall-m68k.h
+===================================================================
+--- /dev/null
++++ libaio-0.3.110/src/syscall-m68k.h
+@@ -0,0 +1,78 @@
++#define __NR_io_setup		241
++#define __NR_io_destroy		242
++#define __NR_io_getevents	243
++#define __NR_io_submit		244
++#define __NR_io_cancel		245
++
++#define io_syscall1(type,fname,sname,atype,a) \
++type fname(atype a) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++__asm__ __volatile__ ("trap  #0" \
++		      : "+d" (__res) \
++		      : "d" (__a)  ); \
++return (type) __res; \
++}
++
++#define io_syscall2(type,fname,sname,atype,a,btype,b) \
++type fname(atype a,btype b) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++register long __b __asm__ ("%d2") = (long)(b); \
++__asm__ __volatile__ ("trap  #0" \
++		      : "+d" (__res) \
++		      : "d" (__a), "d" (__b) \
++		     ); \
++return (type) __res; \
++}
++
++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
++type fname(atype a,btype b,ctype c) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++register long __b __asm__ ("%d2") = (long)(b); \
++register long __c __asm__ ("%d3") = (long)(c); \
++__asm__ __volatile__ ("trap  #0" \
++		      : "+d" (__res) \
++		      : "d" (__a), "d" (__b), \
++			"d" (__c) \
++		     ); \
++return (type) __res; \
++}
++
++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
++type fname (atype a, btype b, ctype c, dtype d) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++register long __b __asm__ ("%d2") = (long)(b); \
++register long __c __asm__ ("%d3") = (long)(c); \
++register long __d __asm__ ("%d4") = (long)(d); \
++__asm__ __volatile__ ("trap  #0" \
++		      : "+d" (__res) \
++		      : "d" (__a), "d" (__b), \
++			"d" (__c), "d" (__d)  \
++		     ); \
++return (type) __res; \
++}
++
++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
++type fname (atype a,btype b,ctype c,dtype d,etype e) \
++{ \
++register long __res __asm__ ("%d0") = __NR_##sname; \
++register long __a __asm__ ("%d1") = (long)(a); \
++register long __b __asm__ ("%d2") = (long)(b); \
++register long __c __asm__ ("%d3") = (long)(c); \
++register long __d __asm__ ("%d4") = (long)(d); \
++register long __e __asm__ ("%d5") = (long)(e); \
++__asm__ __volatile__ ("trap  #0" \
++		      : "+d" (__res) \
++		      : "d" (__a), "d" (__b), \
++			"d" (__c), "d" (__d), "d" (__e)  \
++		     ); \
++return (type) __res; \
++}
++
+Index: libaio-0.3.110/src/syscall.h
+===================================================================
+--- libaio-0.3.110.orig/src/syscall.h
++++ libaio-0.3.110/src/syscall.h
+@@ -28,6 +28,12 @@
+ #include "syscall-sparc.h"
+ #elif defined(__aarch64__)
+ #include "syscall-arm64.h"
++#elif defined(__m68k__)
++#include "syscall-m68k.h"
++#elif defined(__hppa__)
++#include "syscall-parisc.h"
++#elif defined(__mips__)
++#include "syscall-mips.h"
+ #else
+ #warning "using generic syscall method"
+ #include "syscall-generic.h"
+Index: libaio-0.3.110/src/syscall-mips.h
+===================================================================
+--- /dev/null
++++ libaio-0.3.110/src/syscall-mips.h
+@@ -0,0 +1,223 @@
++/*
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License.  See the file "COPYING" in the main directory of this archive
++ * for more details.
++ *
++ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
++ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
++ *
++ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
++ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
++ */
++
++#ifndef _MIPS_SIM_ABI32
++#define _MIPS_SIM_ABI32			1
++#define _MIPS_SIM_NABI32		2
++#define _MIPS_SIM_ABI64			3
++#endif
++
++#if _MIPS_SIM == _MIPS_SIM_ABI32
++
++/*
++ * Linux o32 style syscalls are in the range from 4000 to 4999.
++ */
++#define __NR_Linux			4000
++#define __NR_io_setup			(__NR_Linux + 241)
++#define __NR_io_destroy			(__NR_Linux + 242)
++#define __NR_io_getevents		(__NR_Linux + 243)
++#define __NR_io_submit			(__NR_Linux + 244)
++#define __NR_io_cancel			(__NR_Linux + 245)
++
++#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
++
++#if _MIPS_SIM == _MIPS_SIM_ABI64
++
++/*
++ * Linux 64-bit syscalls are in the range from 5000 to 5999.
++ */
++#define __NR_Linux			5000
++#define __NR_io_setup			(__NR_Linux + 200)
++#define __NR_io_destroy			(__NR_Linux + 201)
++#define __NR_io_getevents		(__NR_Linux + 202)
++#define __NR_io_submit			(__NR_Linux + 203)
++#define __NR_io_cancel			(__NR_Linux + 204)
++#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
++
++#if _MIPS_SIM == _MIPS_SIM_NABI32
++
++/*
++ * Linux N32 syscalls are in the range from 6000 to 6999.
++ */
++#define __NR_Linux			6000
++#define __NR_io_setup			(__NR_Linux + 200)
++#define __NR_io_destroy			(__NR_Linux + 201)
++#define __NR_io_getevents		(__NR_Linux + 202)
++#define __NR_io_submit			(__NR_Linux + 203)
++#define __NR_io_cancel			(__NR_Linux + 204)
++#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
++
++#define io_syscall1(type,fname,sname,atype,a) \
++type fname(atype a) \
++{ \
++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
++	register unsigned long __a3 asm("$7"); \
++	unsigned long __v0; \
++	\
++	__asm__ volatile ( \
++	".set\tnoreorder\n\t" \
++	"li\t$2, %3\t\t\t# " #fname "\n\t" \
++	"syscall\n\t" \
++	"move\t%0, $2\n\t" \
++	".set\treorder" \
++	: "=&r" (__v0), "=r" (__a3) \
++	: "r" (__a0), "i" (__NR_##sname) \
++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++	  "memory"); \
++	\
++	if (__a3 == 0) \
++		return (type) __v0; \
++	return (type) -1; \
++}
++
++#define io_syscall2(type,fname,sname,atype,a,btype,b) \
++type fname(atype a, btype b) \
++{ \
++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
++	register unsigned long __a3 asm("$7"); \
++	unsigned long __v0; \
++	\
++	__asm__ volatile ( \
++	".set\tnoreorder\n\t" \
++	"li\t$2, %4\t\t\t# " #fname "\n\t" \
++	"syscall\n\t" \
++	"move\t%0, $2\n\t" \
++	".set\treorder" \
++	: "=&r" (__v0), "=r" (__a3) \
++	: "r" (__a0), "r" (__a1), "i" (__NR_##sname) \
++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++	  "memory"); \
++	\
++	if (__a3 == 0) \
++		return (type) __v0; \
++	return (type) -1; \
++}
++
++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
++type fname(atype a, btype b, ctype c) \
++{ \
++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
++	register unsigned long __a2 asm("$6") = (unsigned long) c; \
++	register unsigned long __a3 asm("$7"); \
++	unsigned long __v0; \
++	\
++	__asm__ volatile ( \
++	".set\tnoreorder\n\t" \
++	"li\t$2, %5\t\t\t# " #fname "\n\t" \
++	"syscall\n\t" \
++	"move\t%0, $2\n\t" \
++	".set\treorder" \
++	: "=&r" (__v0), "=r" (__a3) \
++	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++	  "memory"); \
++	\
++	if (__a3 == 0) \
++		return (type) __v0; \
++	return (type) -1; \
++}
++
++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
++type fname(atype a, btype b, ctype c, dtype d) \
++{ \
++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
++	register unsigned long __a2 asm("$6") = (unsigned long) c; \
++	register unsigned long __a3 asm("$7") = (unsigned long) d; \
++	unsigned long __v0; \
++	\
++	__asm__ volatile ( \
++	".set\tnoreorder\n\t" \
++	"li\t$2, %5\t\t\t# " #fname "\n\t" \
++	"syscall\n\t" \
++	"move\t%0, $2\n\t" \
++	".set\treorder" \
++	: "=&r" (__v0), "+r" (__a3) \
++	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \
++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++	  "memory"); \
++	\
++	if (__a3 == 0) \
++		return (type) __v0; \
++	return (type) -1; \
++}
++
++#if (_MIPS_SIM == _MIPS_SIM_ABI32)
++
++/*
++ * Using those means your brain needs more than an oil change ;-)
++ */
++
++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
++type fname(atype a, btype b, ctype c, dtype d, etype e) \
++{ \
++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
++	register unsigned long __a2 asm("$6") = (unsigned long) c; \
++	register unsigned long __a3 asm("$7") = (unsigned long) d; \
++	unsigned long __v0; \
++	\
++	__asm__ volatile ( \
++	".set\tnoreorder\n\t" \
++	"lw\t$2, %6\n\t" \
++	"subu\t$29, 32\n\t" \
++	"sw\t$2, 16($29)\n\t" \
++	"li\t$2, %5\t\t\t# " #fname "\n\t" \
++	"syscall\n\t" \
++	"move\t%0, $2\n\t" \
++	"addiu\t$29, 32\n\t" \
++	".set\treorder" \
++	: "=&r" (__v0), "+r" (__a3) \
++	: "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \
++	  "m" ((unsigned long)e) \
++	: "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++	  "memory"); \
++	\
++	if (__a3 == 0) \
++		return (type) __v0; \
++	return (type) -1; \
++}
++
++#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
++
++#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
++
++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
++type fname (atype a,btype b,ctype c,dtype d,etype e) \
++{ \
++	register unsigned long __a0 asm("$4") = (unsigned long) a; \
++	register unsigned long __a1 asm("$5") = (unsigned long) b; \
++	register unsigned long __a2 asm("$6") = (unsigned long) c; \
++	register unsigned long __a3 asm("$7") = (unsigned long) d; \
++	register unsigned long __a4 asm("$8") = (unsigned long) e; \
++	unsigned long __v0; \
++	\
++	__asm__ volatile ( \
++	".set\tnoreorder\n\t" \
++	"li\t$2, %6\t\t\t# " #fname "\n\t" \
++	"syscall\n\t" \
++	"move\t%0, $2\n\t" \
++	".set\treorder" \
++	: "=&r" (__v0), "+r" (__a3) \
++	: "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \
++	: "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
++	  "memory"); \
++	\
++	if (__a3 == 0) \
++		return (type) __v0; \
++	return (type) -1; \
++}
++
++#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
++
+Index: libaio-0.3.110/src/syscall-parisc.h
+===================================================================
+--- /dev/null
++++ libaio-0.3.110/src/syscall-parisc.h
+@@ -0,0 +1,146 @@
++/*
++ * Linux system call numbers.
++ *
++ * Cary Coutant says that we should just use another syscall gateway
++ * page to avoid clashing with the HPUX space, and I think he's right:
++ * it will would keep a branch out of our syscall entry path, at the
++ * very least.  If we decide to change it later, we can ``just'' tweak
++ * the LINUX_GATEWAY_ADDR define at the bottom and make __NR_Linux be
++ * 1024 or something.  Oh, and recompile libc. =)
++ *
++ * 64-bit HPUX binaries get the syscall gateway address passed in a register
++ * from the kernel at startup, which seems a sane strategy.
++ */
++
++#define __NR_Linux                0
++#define __NR_io_setup           (__NR_Linux + 215)
++#define __NR_io_destroy         (__NR_Linux + 216)
++#define __NR_io_getevents       (__NR_Linux + 217)
++#define __NR_io_submit          (__NR_Linux + 218)
++#define __NR_io_cancel          (__NR_Linux + 219)
++
++#define SYS_ify(syscall_name)   __NR_##syscall_name
++
++/* Assume all syscalls are done from PIC code just to be
++ * safe. The worst case scenario is that you lose a register
++ * and save/restore r19 across the syscall. */
++#define PIC
++
++/* Definition taken from glibc 2.3.3
++ * sysdeps/unix/sysv/linux/hppa/sysdep.h
++ */
++
++#ifdef PIC
++/* WARNING: CANNOT BE USED IN A NOP! */
++# define K_STW_ASM_PIC	"       copy %%r19, %%r4\n"
++# define K_LDW_ASM_PIC	"       copy %%r4, %%r19\n"
++# define K_USING_GR4	"%r4",
++#else
++# define K_STW_ASM_PIC	" \n"
++# define K_LDW_ASM_PIC	" \n"
++# define K_USING_GR4
++#endif
++
++/* GCC has to be warned that a syscall may clobber all the ABI
++   registers listed as "caller-saves", see page 8, Table 2
++   in section 2.2.6 of the PA-RISC RUN-TIME architecture
++   document. However! r28 is the result and will conflict with
++   the clobber list so it is left out. Also the input arguments
++   registers r20 -> r26 will conflict with the list so they
++   are treated specially. Although r19 is clobbered by the syscall
++   we cannot say this because it would violate ABI, thus we say
++   r4 is clobbered and use that register to save/restore r19
++   across the syscall. */
++
++#define K_CALL_CLOB_REGS "%r1", "%r2", K_USING_GR4 \
++			 "%r20", "%r29", "%r31"
++
++#undef K_INLINE_SYSCALL
++#define K_INLINE_SYSCALL(name, nr, args...)	({			\
++	long __sys_res;							\
++	{								\
++		register unsigned long __res __asm__("r28");		\
++		K_LOAD_ARGS_##nr(args)					\
++		/* FIXME: HACK stw/ldw r19 around syscall */		\
++		__asm__ volatile(					\
++			K_STW_ASM_PIC					\
++			"	ble  0x100(%%sr2, %%r0)\n"		\
++			"	ldi %1, %%r20\n"			\
++			K_LDW_ASM_PIC					\
++			: "=r" (__res)					\
++			: "i" (SYS_ify(name)) K_ASM_ARGS_##nr		\
++			: "memory", K_CALL_CLOB_REGS K_CLOB_ARGS_##nr	\
++		);							\
++		__sys_res = (long)__res;				\
++	}								\
++	__sys_res;							\
++})
++
++#define K_LOAD_ARGS_0()
++#define K_LOAD_ARGS_1(r26)					\
++	register unsigned long __r26 __asm__("r26") = (unsigned long)(r26);   \
++	K_LOAD_ARGS_0()
++#define K_LOAD_ARGS_2(r26,r25)					\
++	register unsigned long __r25 __asm__("r25") = (unsigned long)(r25);   \
++	K_LOAD_ARGS_1(r26)
++#define K_LOAD_ARGS_3(r26,r25,r24)				\
++	register unsigned long __r24 __asm__("r24") = (unsigned long)(r24);   \
++	K_LOAD_ARGS_2(r26,r25)
++#define K_LOAD_ARGS_4(r26,r25,r24,r23)				\
++	register unsigned long __r23 __asm__("r23") = (unsigned long)(r23);   \
++	K_LOAD_ARGS_3(r26,r25,r24)
++#define K_LOAD_ARGS_5(r26,r25,r24,r23,r22)			\
++	register unsigned long __r22 __asm__("r22") = (unsigned long)(r22);   \
++	K_LOAD_ARGS_4(r26,r25,r24,r23)
++#define K_LOAD_ARGS_6(r26,r25,r24,r23,r22,r21)			\
++	register unsigned long __r21 __asm__("r21") = (unsigned long)(r21);   \
++	K_LOAD_ARGS_5(r26,r25,r24,r23,r22)
++
++/* Even with zero args we use r20 for the syscall number */
++#define K_ASM_ARGS_0
++#define K_ASM_ARGS_1 K_ASM_ARGS_0, "r" (__r26)
++#define K_ASM_ARGS_2 K_ASM_ARGS_1, "r" (__r25)
++#define K_ASM_ARGS_3 K_ASM_ARGS_2, "r" (__r24)
++#define K_ASM_ARGS_4 K_ASM_ARGS_3, "r" (__r23)
++#define K_ASM_ARGS_5 K_ASM_ARGS_4, "r" (__r22)
++#define K_ASM_ARGS_6 K_ASM_ARGS_5, "r" (__r21)
++
++/* The registers not listed as inputs but clobbered */
++#define K_CLOB_ARGS_6
++#define K_CLOB_ARGS_5 K_CLOB_ARGS_6, "%r21"
++#define K_CLOB_ARGS_4 K_CLOB_ARGS_5, "%r22"
++#define K_CLOB_ARGS_3 K_CLOB_ARGS_4, "%r23"
++#define K_CLOB_ARGS_2 K_CLOB_ARGS_3, "%r24"
++#define K_CLOB_ARGS_1 K_CLOB_ARGS_2, "%r25"
++#define K_CLOB_ARGS_0 K_CLOB_ARGS_1, "%r26"
++
++#define io_syscall1(type,fname,sname,type1,arg1)			\
++type fname(type1 arg1)							\
++{									\
++    return K_INLINE_SYSCALL(sname, 1, arg1);				\
++}
++
++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2)		\
++type fname(type1 arg1, type2 arg2)					\
++{									\
++    return K_INLINE_SYSCALL(sname, 2, arg1, arg2);			\
++}
++
++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3)	\
++type fname(type1 arg1, type2 arg2, type3 arg3)				\
++{									\
++    return K_INLINE_SYSCALL(sname, 3, arg1, arg2, arg3);		\
++}
++
++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4)		\
++{									\
++    return K_INLINE_SYSCALL(sname, 4, arg1, arg2, arg3, arg4);		\
++}
++
++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5)	\
++{									\
++    return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5);	\
++}
++
+Index: libaio-0.3.110/src/syscall-arm.h
+===================================================================
+--- libaio-0.3.110.orig/src/syscall-arm.h
++++ libaio-0.3.110/src/syscall-arm.h
+@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3
+   return (type) __res_r0;						\
+ }
+ 
++/*
++ *  linux/include/asm-arm/unistd.h
++ *
++ *  Copyright (C) 2001-2005 Russell King
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk,
++ * no matter what the change is.  Thanks!
++ */
++
++#define __NR_OABI_SYSCALL_BASE	0x900000
++
++#if defined(__thumb__) || defined(__ARM_EABI__)
++#define __NR_SYSCALL_BASE	0
++#else
++#define __NR_SYSCALL_BASE	__NR_OABI_SYSCALL_BASE
++#endif
++
++#define __NR_io_setup			(__NR_SYSCALL_BASE+243)
++#define __NR_io_destroy			(__NR_SYSCALL_BASE+244)
++#define __NR_io_getevents		(__NR_SYSCALL_BASE+245)
++#define __NR_io_submit			(__NR_SYSCALL_BASE+246)
++#define __NR_io_cancel			(__NR_SYSCALL_BASE+247)
++
++#define __sys2(x) #x
++#define __sys1(x) __sys2(x)
++
++#if defined(__thumb__) || defined(__ARM_EABI__)
++#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name;
++#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs
++#define __syscall(name) "swi\t0"
++#else
++#define __SYS_REG(name)
++#define __SYS_REG_LIST(regs...) regs
++#define __syscall(name) "swi\t" __sys1(__NR_##name) ""
++#endif
++
++#define io_syscall1(type,fname,sname,type1,arg1)			\
++type fname(type1 arg1) {						\
++  __SYS_REG(sname)							\
++  register long __r0 __asm__("r0") = (long)arg1;			\
++  register long __res_r0 __asm__("r0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_r0)						\
++	: __SYS_REG_LIST( "0" (__r0) )					\
++	: "memory" );							\
++  return (type) __res_r0;						\
++}
++
++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2)		\
++type fname(type1 arg1,type2 arg2) {					\
++  __SYS_REG(sname)							\
++  register long __r0 __asm__("r0") = (long)arg1;			\
++  register long __r1 __asm__("r1") = (long)arg2;			\
++  register long __res_r0 __asm__("r0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_r0)						\
++	: __SYS_REG_LIST( "0" (__r0), "r" (__r1) )			\
++	: "memory" );							\
++  return (type) __res_r0;						\
++}
++
++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3)	\
++type fname(type1 arg1,type2 arg2,type3 arg3) {				\
++  __SYS_REG(sname)							\
++  register long __r0 __asm__("r0") = (long)arg1;			\
++  register long __r1 __asm__("r1") = (long)arg2;			\
++  register long __r2 __asm__("r2") = (long)arg3;			\
++  register long __res_r0 __asm__("r0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_r0)						\
++	: __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) )		\
++	: "memory" );							\
++  return (type) __res_r0;						\
++}
++
++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) {		\
++  __SYS_REG(sname)							\
++  register long __r0 __asm__("r0") = (long)arg1;			\
++  register long __r1 __asm__("r1") = (long)arg2;			\
++  register long __r2 __asm__("r2") = (long)arg3;			\
++  register long __r3 __asm__("r3") = (long)arg4;			\
++  register long __res_r0 __asm__("r0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_r0)						\
++	: __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \
++	: "memory" );							\
++  return (type) __res_r0;						\
++}
++
++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5)	\
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\
++  __SYS_REG(sname)							\
++  register long __r0 __asm__("r0") = (long)arg1;			\
++  register long __r1 __asm__("r1") = (long)arg2;			\
++  register long __r2 __asm__("r2") = (long)arg3;			\
++  register long __r3 __asm__("r3") = (long)arg4;			\
++  register long __r4 __asm__("r4") = (long)arg5;			\
++  register long __res_r0 __asm__("r0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_r0)						\
++	: __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2),		\
++			  "r" (__r3), "r" (__r4) )			\
++	: "memory" );							\
++  return (type) __res_r0;						\
++}
++
diff --git a/meta/recipes-extended/libaio/libaio/destdir.patch b/meta/recipes-extended/libaio/libaio/destdir.patch
new file mode 100644
index 0000000..dad9601
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/destdir.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Pending
+
+from openembedded, added by Qing He <qing.he@intel.com>
+
+Index: libaio-0.3.106/Makefile
+===================================================================
+--- libaio-0.3.106.orig/Makefile	2004-02-26 07:25:10.000000000 -0800
++++ libaio-0.3.106/Makefile	2006-10-14 09:19:07.000000000 -0700
+@@ -15,7 +15,7 @@
+ 	@$(MAKE) -C src
+ 
+ install:
+-	@$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir)
++	@$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
+ 
+ 
+ clean:
diff --git a/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch b/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch
new file mode 100644
index 0000000..bba7e55
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch
@@ -0,0 +1,65 @@
+From: Nathan Rossi <nathan.rossi@xilinx.com>
+Date: Tue, 27 Jan 2015 14:59:35 +1000
+Subject: [PATCH] Generic arch dectection for padding defines
+
+When available use the GNU C defines for endian and bitwidth to
+determine the padding required. This reduces the need to define the
+padding selection for every architecture.
+
+Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
+Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
+Upstream-Status: Backport
+---
+ src/libaio.h | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/src/libaio.h b/src/libaio.h
+index 1223146..4a4e0f5 100644
+--- a/src/libaio.h
++++ b/src/libaio.h
+@@ -52,14 +52,18 @@ typedef enum io_iocb_cmd {
+ /* little endian, 32 bits */
+ #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
+     defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
+-    defined(__cris__)
++    defined(__cris__) || \
++    (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
++         __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
+ #define PADDED(x, y)	x; unsigned y
+ #define PADDEDptr(x, y)	x; unsigned y
+ #define PADDEDul(x, y)	unsigned long x; unsigned y
+ 
+ /* little endian, 64 bits */
+ #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
+-      (defined(__aarch64__) && defined(__AARCH64EL__))
++      (defined(__aarch64__) && defined(__AARCH64EL__)) || \
++      (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
++          __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 8)
+ #define PADDED(x, y)	x, y
+ #define PADDEDptr(x, y)	x
+ #define PADDEDul(x, y)	unsigned long x
+@@ -67,7 +71,9 @@ typedef enum io_iocb_cmd {
+ /* big endian, 64 bits */
+ #elif defined(__powerpc64__) || defined(__s390x__) || \
+       (defined(__sparc__) && defined(__arch64__)) || \
+-      (defined(__aarch64__) && defined(__AARCH64EB__))
++      (defined(__aarch64__) && defined(__AARCH64EB__)) || \
++      (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
++           __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8)
+ #define PADDED(x, y)	unsigned y; x
+ #define PADDEDptr(x,y)	x
+ #define PADDEDul(x, y)	unsigned long x
+@@ -76,7 +82,9 @@ typedef enum io_iocb_cmd {
+ #elif defined(__PPC__) || defined(__s390__) || \
+       (defined(__arm__) && defined(__ARMEB__)) || \
+       defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
+-      defined(__hppa__) || defined(__frv__) || defined(__avr32__)
++      defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
++      (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
++           __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 4)
+ #define PADDED(x, y)	unsigned y; x
+ #define PADDEDptr(x, y)	unsigned y; x
+ #define PADDEDul(x, y)	unsigned y; unsigned long x
+-- 
+2.1.1
+
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch
new file mode 100644
index 0000000..9c6850c
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips_syscalls.patch
@@ -0,0 +1,62 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Phil Staub <Phil.Staub@windriver.com>
+
+Index: libaio-0.3.109/src/syscall-mips.h
+===================================================================
+--- libaio-0.3.109.orig/src/syscall-mips.h
++++ libaio-0.3.109/src/syscall-mips.h
+@@ -76,7 +76,7 @@ type fname(atype a) \
+ 	\
+ 	if (__a3 == 0) \
+ 		return (type) __v0; \
+-	return (type) -1; \
++	return (type) (-(__v0)); \
+ }
+ 
+ #define io_syscall2(type,fname,sname,atype,a,btype,b) \
+@@ -100,7 +100,7 @@ type fname(atype a, btype b) \
+ 	\
+ 	if (__a3 == 0) \
+ 		return (type) __v0; \
+-	return (type) -1; \
++	return (type) (-(__v0)); \
+ }
+ 
+ #define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \
+@@ -125,7 +125,7 @@ type fname(atype a, btype b, ctype c) \
+ 	\
+ 	if (__a3 == 0) \
+ 		return (type) __v0; \
+-	return (type) -1; \
++	return (type) (-(__v0)); \
+ }
+ 
+ #define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \
+@@ -150,7 +150,7 @@ type fname(atype a, btype b, ctype c, dt
+ 	\
+ 	if (__a3 == 0) \
+ 		return (type) __v0; \
+-	return (type) -1; \
++	return (type) (-(__v0)); \
+ }
+ 
+ #if (_MIPS_SIM == _MIPS_SIM_ABI32)
+@@ -186,7 +186,7 @@ type fname(atype a, btype b, ctype c, dt
+ 	\
+ 	if (__a3 == 0) \
+ 		return (type) __v0; \
+-	return (type) -1; \
++	return (type) (-(__v0)); \
+ }
+ 
+ #endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */
+@@ -216,7 +216,7 @@ type fname (atype a,btype b,ctype c,dtyp
+ 	\
+ 	if (__a3 == 0) \
+ 		return (type) __v0; \
+-	return (type) -1; \
++	return (type) (-(__v0)); \
+ }
+ 
+ #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
new file mode 100644
index 0000000..508f5a1
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
@@ -0,0 +1,61 @@
+Upstream-Status: Pending
+
+Properly load arguments 5 an 6 for x86-64 syscall
+Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64
+syscall so that it works with both x32 and x86-64.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2011/12/02
+
+--- libaio-0.3.109/src/syscall-x86_64.h.x32	2009-10-09 11:17:02.000000000 -0700
++++ libaio-0.3.109/src/syscall-x86_64.h	2011-12-02 09:09:07.537603224 -0800
+@@ -1,8 +1,18 @@
++#ifndef __NR_io_setup
+ #define __NR_io_setup		206
++#endif
++#ifndef __NR_io_destroy
+ #define __NR_io_destroy		207
++#endif
++#ifndef __NR_io_getevents
+ #define __NR_io_getevents	208
++#endif
++#ifndef __NR_io_submit
+ #define __NR_io_submit		209
++#endif
++#ifndef __NR_io_cancel
+ #define __NR_io_cancel		210
++#endif
+ 
+ #define __syscall_clobber "r11","rcx","memory" 
+ #define __syscall "syscall"
+@@ -42,10 +52,11 @@ return __res;								\
+ type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4)		\
+ {									\
+ long __res;								\
+-__asm__ volatile ("movq %5,%%r10 ;" __syscall				\
++register long __a4 asm ("r10") = (long) arg4;				\
++__asm__ volatile (__syscall						\
+ 	: "=a" (__res)							\
+ 	: "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)),	\
+-	  "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \
++	  "d" ((long)(arg3)),"r" (__a4)); \
+ return __res;								\
+ } 
+ 
+@@ -54,10 +65,11 @@ return __res;								\
+ type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5)	\
+ {									\
+ long __res;								\
+-__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall		\
++register long __a4 asm ("r10") = (long) arg4;				\
++register long __a5 asm ("r8") = (long) arg5;				\
++__asm__ volatile ( __syscall						\
+ 	: "=a" (__res)							\
+ 	: "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)),	\
+-	  "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) :	\
+-	__syscall_clobber,"r8","r10" );					\
++	  "d" ((long)(arg3)),"r" (__a4),"r" (__a5));			\
+ return __res;								\
+ }
diff --git a/meta/recipes-extended/libaio/libaio_0.3.110.bb b/meta/recipes-extended/libaio/libaio_0.3.110.bb
new file mode 100644
index 0000000..cbe29ce
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio_0.3.110.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Asynchronous I/O library"
+DESCRIPTION = "Asynchronous input/output library that uses the kernels native interface"
+HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
+           file://generic-arch-dectection-for-padding-defines.patch \
+           file://00_arches.patch \
+           file://destdir.patch \
+           file://libaio_fix_for_x32.patch \
+           file://libaio_fix_for_mips_syscalls.patch \
+"
+
+SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8"
+SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e"
+
+EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
+# Need libc for stack-protector's __stack_chk_fail_local() bounce function
+LDFLAGS_append_x86 = " -lc"
+
+do_configure () {
+    sed -i 's#LINK_FLAGS=.*#LINK_FLAGS=$(LDFLAGS)#' src/Makefile
+}
+
+do_install () {
+    oe_runmake install DESTDIR=${D}
+}
diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Add-ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS-option.patch b/meta/recipes-extended/libarchive/libarchive/0001-Add-ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS-option.patch
new file mode 100644
index 0000000..4ca779c
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/0001-Add-ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS-option.patch
@@ -0,0 +1,151 @@
+From 59357157706d47c365b2227739e17daba3607526 Mon Sep 17 00:00:00 2001
+From: Alessandro Ghedini <alessandro@ghedini.me>
+Date: Sun, 1 Mar 2015 12:07:45 +0100
+Subject: [PATCH] Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
+
+This fixes a directory traversal in the cpio tool.
+
+
+Upstream-Status: backport
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ cpio/bsdcpio.1                           |    3 ++-
+ cpio/cpio.c                              |    2 ++
+ libarchive/archive.h                     |    2 ++
+ libarchive/archive_write_disk.3          |    3 +++
+ libarchive/archive_write_disk_posix.c    |   14 +++++++++++---
+ libarchive/test/test_write_disk_secure.c |   23 +++++++++++++++++++++++
+ 6 files changed, 43 insertions(+), 4 deletions(-)
+
+diff --git a/cpio/bsdcpio.1 b/cpio/bsdcpio.1
+index f966aa0..e52546e 100644
+--- a/cpio/bsdcpio.1
++++ b/cpio/bsdcpio.1
+@@ -156,7 +156,8 @@ See above for description.
+ .It Fl Fl insecure
+ (i and p mode only)
+ Disable security checks during extraction or copying.
+-This allows extraction via symbolic links and path names containing
++This allows extraction via symbolic links, absolute paths,
++and path names containing
+ .Sq ..
+ in the name.
+ .It Fl J , Fl Fl xz
+diff --git a/cpio/cpio.c b/cpio/cpio.c
+index 0acde11..b267e9b 100644
+--- a/cpio/cpio.c
++++ b/cpio/cpio.c
+@@ -171,6 +171,7 @@ main(int argc, char *argv[])
+ 	cpio->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER;
+ 	cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_SYMLINKS;
+ 	cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NODOTDOT;
++	cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS;
+ 	cpio->extract_flags |= ARCHIVE_EXTRACT_PERM;
+ 	cpio->extract_flags |= ARCHIVE_EXTRACT_FFLAGS;
+ 	cpio->extract_flags |= ARCHIVE_EXTRACT_ACL;
+@@ -256,6 +257,7 @@ main(int argc, char *argv[])
+ 		case OPTION_INSECURE:
+ 			cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_SYMLINKS;
+ 			cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT;
++			cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS;
+ 			break;
+ 		case 'L': /* GNU cpio */
+ 			cpio->option_follow_links = 1;
+diff --git a/libarchive/archive.h b/libarchive/archive.h
+index 1f0fc38..ef635ac 100644
+--- a/libarchive/archive.h
++++ b/libarchive/archive.h
+@@ -649,6 +649,8 @@ __LA_DECL int archive_read_set_passphrase_callback(struct archive *,
+ /* Default: Do not use HFS+ compression if it was not compressed. */
+ /* This has no effect except on Mac OS v10.6 or later. */
+ #define	ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED	(0x8000)
++/* Default: Do not reject entries with absolute paths */
++#define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000)
+ 
+ __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *,
+ 		     int flags);
+diff --git a/libarchive/archive_write_disk.3 b/libarchive/archive_write_disk.3
+index fa925cc..a2e7afa 100644
+--- a/libarchive/archive_write_disk.3
++++ b/libarchive/archive_write_disk.3
+@@ -177,6 +177,9 @@ The default is to not refuse such paths.
+ Note that paths ending in
+ .Pa ..
+ always cause an error, regardless of this flag.
++.It Cm ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS
++Refuse to extract an absolute path.
++The default is to not refuse such paths.
+ .It Cm ARCHIVE_EXTRACT_SPARSE
+ Scan data for blocks of NUL bytes and try to recreate them with holes.
+ This results in sparse files, independent of whether the archive format
+diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
+index ab3bdac..c1290eb 100644
+--- a/libarchive/archive_write_disk_posix.c
++++ b/libarchive/archive_write_disk_posix.c
+@@ -2509,8 +2509,9 @@ cleanup_pathname_win(struct archive_write_disk *a)
+ /*
+  * Canonicalize the pathname.  In particular, this strips duplicate
+  * '/' characters, '.' elements, and trailing '/'.  It also raises an
+- * error for an empty path, a trailing '..' or (if _SECURE_NODOTDOT is
+- * set) any '..' in the path.
++ * error for an empty path, a trailing '..', (if _SECURE_NODOTDOT is
++ * set) any '..' in the path or (if ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS
++ * is set) if the path is absolute.
+  */
+ static int
+ cleanup_pathname(struct archive_write_disk *a)
+@@ -2529,8 +2530,15 @@ cleanup_pathname(struct archive_write_disk *a)
+ 	cleanup_pathname_win(a);
+ #endif
+ 	/* Skip leading '/'. */
+-	if (*src == '/')
++	if (*src == '/') {
++		if (a->flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) {
++			archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
++			                  "Path is absolute");
++			return (ARCHIVE_FAILED);
++		}
++
+ 		separator = *src++;
++	}
+ 
+ 	/* Scan the pathname one element at a time. */
+ 	for (;;) {
+diff --git a/libarchive/test/test_write_disk_secure.c b/libarchive/test/test_write_disk_secure.c
+index 31c5bfd..2c94206 100644
+--- a/libarchive/test/test_write_disk_secure.c
++++ b/libarchive/test/test_write_disk_secure.c
+@@ -178,6 +178,29 @@ DEFINE_TEST(test_write_disk_secure)
+ 	assert(S_ISDIR(st.st_mode));
+ 	archive_entry_free(ae);
+ 
++	/*
++	 * Without security checks, we should be able to
++	 * extract an absolute path.
++	 */
++	assert((ae = archive_entry_new()) != NULL);
++	archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
++	archive_entry_set_mode(ae, S_IFREG | 0777);
++	assert(0 == archive_write_header(a, ae));
++	assert(0 == archive_write_finish_entry(a));
++	assertFileExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
++	assert(0 == unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"));
++
++	/* But with security checks enabled, this should fail. */
++	assert(archive_entry_clear(ae) != NULL);
++	archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
++	archive_entry_set_mode(ae, S_IFREG | 0777);
++	archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS);
++	failure("Extracting an absolute path should fail here.");
++	assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae));
++	archive_entry_free(ae);
++	assert(0 == archive_write_finish_entry(a));
++	assertFileNotExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
++
+ 	assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+ 
+ 	/* Test the entries on disk. */
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch b/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
new file mode 100644
index 0000000..126f80e
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
@@ -0,0 +1,38 @@
+From 2f55d6bd308ea61975558c2469ae349dba297e89 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 22 Feb 2014 14:35:59 +0800
+Subject: [PATCH] Fix CVE-2013-0211
+
+This patch comes from:https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4
+
+Upstream-Status: Backport
+
+Signed-off-by: Baogen shang <baogen.shang@windriver.com>
+
+Update the patch because of uprev on 20140222
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ libarchive/archive_write.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c
+index a3d1a33..a323588 100644
+--- a/libarchive/archive_write.c
++++ b/libarchive/archive_write.c
+@@ -671,8 +671,12 @@ static ssize_t
+ _archive_write_data(struct archive *_a, const void *buff, size_t s)
+ {
+ 	struct archive_write *a = (struct archive_write *)_a;
++	const size_t max_write = INT_MAX;
+ 	archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
+ 	    ARCHIVE_STATE_DATA, "archive_write_data");
++	/* In particular, this catches attempts to pass negative values. */
++	if (s > max_write)
++		s = max_write;
+ 	archive_clear_error(&a->archive);
+ 	return ((a->format_write_data)(a, buff, s));
+ }
+-- 
+1.8.2.1
+
diff --git a/meta/recipes-extended/libarchive/libarchive/mkdir.patch b/meta/recipes-extended/libarchive/libarchive/mkdir.patch
new file mode 100644
index 0000000..509a295
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/mkdir.patch
@@ -0,0 +1,45 @@
+Add missing mkdir calls so that out-of-tree builds work.
+
+Upstream-Status: Submitted (https://github.com/libarchive/libarchive/pull/534)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index 3fa2d22..5ecca52 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -508,6 +508,7 @@ libarchive_test_LDADD= $(LTLIBICONV)
+ # Building it automatically provides a sanity-check on libarchive_test_SOURCES
+ # above.
+ libarchive/test/list.h: Makefile
++	$(MKDIR_P) libarchive/test
+ 	cat $(top_srcdir)/libarchive/test/test_*.c | grep DEFINE_TEST > libarchive/test/list.h
+ 
+ libarchive_TESTS_ENVIRONMENT= LIBARCHIVE_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/libarchive/test LRZIP=NOCONFIG
+@@ -835,6 +836,7 @@ bsdtar_test_CPPFLAGS=\
+ 	$(PLATFORMCPPFLAGS)
+ 
+ tar/test/list.h: Makefile
++	$(MKDIR_P) tar/test
+ 	cat $(top_srcdir)/tar/test/test_*.c | grep DEFINE_TEST > tar/test/list.h
+ 
+ if BUILD_BSDTAR
+@@ -975,6 +977,7 @@ bsdcpio_test_CPPFLAGS= \
+ bsdcpio_test_LDADD=libarchive_fe.la
+ 
+ cpio/test/list.h: Makefile
++	$(MKDIR_P) cpio/test
+ 	cat $(top_srcdir)/cpio/test/test_*.c | grep DEFINE_TEST > cpio/test/list.h
+ 
+ if BUILD_BSDCPIO
+diff --git a/configure.ac b/configure.ac
+index 38bd299..7bdb00c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -102,6 +102,7 @@ AC_USE_SYSTEM_EXTENSIONS
+ AC_LIBTOOL_WIN32_DLL
+ AC_PROG_LIBTOOL
+ AC_CHECK_TOOL([STRIP],[strip])
++AC_PROG_MKDIR_P
+ 
+ #
+ # Options for building bsdtar.
diff --git a/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch b/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch
new file mode 100644
index 0000000..346af91
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch
@@ -0,0 +1,25 @@
+Use pkg-config for the libxml2 dependency, not the -config script.
+
+Upstream-Status: Pending
+
+RP 2014/5/22
+
+Index: libarchive-3.1.2/configure.ac
+===================================================================
+--- libarchive-3.1.2.orig/configure.ac	2013-02-09 17:23:03.000000000 +0000
++++ libarchive-3.1.2/configure.ac	2014-05-13 15:26:45.446499108 +0000
+@@ -329,10 +329,10 @@
+   AS_HELP_STRING([--without-expat], [Don't build support for xar through expat]))
+ 
+ if test "x$with_xml2" != "xno"; then
+-  AC_PATH_PROG([XML2_CONFIG], [xml2-config],, [${PATH}])
+-  if test "x$XML2_CONFIG" != "x"; then
+-    CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`"
+-    LIBS="${LIBS} `${XML2_CONFIG} --libs`"
++  PKG_CHECK_MODULES(PKG_XML2, [libxml-2.0],,)
++  if test "x$PKG_XML2_CFLAGS" != "x"; then
++    CPPFLAGS="${CPPFLAGS} ${PKG_XML2_CFLAGS}"
++    LIBS="${LIBS} ${PKG_XML2_LIBS}"
+     AC_CHECK_LIB(xml2,xmlInitParser,[true],AC_MSG_FAILURE(Missing xml2 library))
+   else
+     AC_CHECK_LIB(xml2,xmlInitParser)
diff --git a/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
new file mode 100644
index 0000000..aaa3255
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
@@ -0,0 +1,53 @@
+SUMMARY = "Support for reading various archive formats"
+DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
+HOMEPAGE = "http://www.libarchive.org/"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b4e3ffd607d6686c6cb2f63394370841"
+
+DEPENDS = "e2fsprogs-native"
+
+PACKAGECONFIG ?= "libxml2 zlib bz2"
+
+PACKAGECONFIG_append_class-target = "\
+	${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
+	${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
+	${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
+"
+
+PACKAGECONFIG_append_class-nativesdk = " largefile"
+
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
+PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2,"
+PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz,"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
+PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
+PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
+PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
+PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
+
+SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
+           file://libarchive-CVE-2013-0211.patch \
+           file://pkgconfig.patch \
+           file://0001-Add-ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS-option.patch \
+           file://mkdir.patch \
+           "
+
+SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a"
+SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e"
+
+inherit autotools lib_package pkgconfig
+
+CPPFLAGS += "-I${WORKDIR}/extra-includes"
+
+do_configure[cleandirs] += "${WORKDIR}/extra-includes"
+do_configure_prepend() {
+	# We just need the headers for some type constants, so no need to
+	# build all of e2fsprogs for the target
+	cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
new file mode 100644
index 0000000..3476bb9
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Inappropriate 
+
+automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that,
+and the warnings are treated as errors because of the -Werror parameter.
+
+These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not 
+eliminated these deprecated macros yet. So disable the treatment of warnings
+as errors until gettext is updated to remove the deprecated macros.
+
+Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/07/10
+
+Index: libidn-1.24/configure.ac
+===================================================================
+--- libidn-1.24.orig/configure.ac
++++ libidn-1.24/configure.ac
+@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 2002-2011 Si
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_HEADERS(config.h)
+-AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override])
++AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override])
+ AM_SILENT_RULES([yes])
+ 
+ # Library code modified:                              REVISION++
diff --git a/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch b/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch
new file mode 100644
index 0000000..0863530
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn/dont-depend-on-help2man.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurdd libidn-1.26/doc/Makefile.am libidn-1.26/doc/Makefile.am
+--- libidn-1.26/doc/Makefile.am	2012-09-18 11:25:45.000000000 +0300
++++ libidn-1.26/doc/Makefile.am	2013-02-08 07:41:24.591431462 +0200
+@@ -49,15 +49,9 @@
+
+ # Man pages.
+
+-dist_man_MANS = idn.1 $(gdoc_MANS)
++dist_man_MANS = $(gdoc_MANS)
+ MAINTAINERCLEANFILES = $(dist_man_MANS)
+
+-idn.1: $(top_srcdir)/src/idn.c $(top_srcdir)/src/idn.ggo \
+-		$(top_srcdir)/configure.ac
+-	$(HELP2MAN) \
+-		--name="Internationalized Domain Names command line tool" \
+-		--output=$@ $(top_builddir)/src/idn$(EXEEXT)
+-
+ # GDOC
+
+ GDOC_BIN = $(srcdir)/gdoc
diff --git a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
new file mode 100644
index 0000000..20afd25
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
@@ -0,0 +1,26 @@
+Upstream-Status: Pending
+
+This patch fixes following issue with automake 1.12
+
+| automake: warnings are treated as errors
+| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libidn.la': linking libtool libraries using a non-POSIX
+| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/05/03
+
+Index: libidn-1.24/configure.ac
+===================================================================
+--- libidn-1.24.orig/configure.ac
++++ libidn-1.24/configure.ac
+@@ -34,6 +34,10 @@ AC_SUBST(LT_CURRENT, 17)
+ AC_SUBST(LT_REVISION, 7)
+ AC_SUBST(LT_AGE, 6)
+ 
++# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
++m4_pattern_allow([AM_PROG_AR])
++AM_PROG_AR
++
+ AC_PROG_CC
+ gl_EARLY
+ lgl_EARLY
diff --git a/meta/recipes-extended/libidn/libidn_0.6.14.bb b/meta/recipes-extended/libidn/libidn_0.6.14.bb
new file mode 100644
index 0000000..4df1d08
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn_0.6.14.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Internationalized Domain Name support library"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+HOMEPAGE = "http://www.gnu.org/software/libidn/"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+ & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
+                    file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+                    file://lib/idna.h;beginline=6;endline=18;md5=1336e848ca7b8e25767c3c7e8fa38a89 \
+                    file://src/idn.c;beginline=6;endline=18;md5=56c89e359652a71cda128d75f0ffdac4"
+PR = "r1"
+
+inherit pkgconfig autotools gettext texinfo
+
+SRC_URI = "http://alpha.gnu.org/gnu/libidn/${BPN}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "040f012a45feb56168853998bb87ad4d"
+SRC_URI[sha256sum] = "98910c2ad664bdf4eed2c2fff88e24f8882636ec9d26669366ff03b469c05ae3"
+
+do_configure_prepend() {
+	# this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from 
+	# autoconf CVS because atm the autoconf it uses is a bit old
+	# now with cross autotool, that macro is already there and this
+	# local definition causes circular dependency. Actually AC_GNU_SOURCE
+	# is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local
+	# references to the latter here.
+	sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4
+	rm -f ${S}/lib/gl/m4/extensions.m4
+}
+
+do_install_append() {
+	rm -rf ${D}${libdir}/Libidn.dll
+	rm -rf ${D}${datadir}/emacs
+}
diff --git a/meta/recipes-extended/libidn/libidn_1.30.bb b/meta/recipes-extended/libidn/libidn_1.30.bb
new file mode 100644
index 0000000..7234747
--- /dev/null
+++ b/meta/recipes-extended/libidn/libidn_1.30.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Internationalized Domain Name support library"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+HOMEPAGE = "http://www.gnu.org/software/libidn/"
+SECTION = "libs"
+LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \
+                    file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
+                    file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+                    file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://lib/idna.h;endline=21;md5=7c0b3828d1b153663be9a04ad4f7975f \
+                    file://src/idn.c;endline=20;md5=f4235f2a2cb2b65786b2979fb3cf7fbf"
+
+inherit pkgconfig autotools gettext texinfo
+
+SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
+           file://libidn_fix_for_automake-1.12.patch \
+           file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
+           file://dont-depend-on-help2man.patch \
+"
+
+SRC_URI[md5sum] = "b17edc8551cd31cc5f14c82a9dabf58e"
+SRC_URI[sha256sum] = "39b9fc94d74081c185757b12e0891ce5a22db55268e7d1bb24533ff4432eb053"
+
+# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
+# so package command into a separate package
+PACKAGES =+ "idn"
+FILES_idn = "${bindir}/*"
+
+EXTRA_OECONF = "--disable-csharp"
+
+do_install_append() {
+	rm -rf ${D}${datadir}/emacs
+}
diff --git a/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch
new file mode 100644
index 0000000..4a785d3
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc/libtirpc-0.2.1-fortify.patch
@@ -0,0 +1,26 @@
+Fix a possible overflow (reported by _FORTIFY_SOURCE=2)
+
+Ported from Gentoo
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libtirpc-0.2.1/src/getrpcport.c
+===================================================================
+--- libtirpc-0.2.1.orig/src/getrpcport.c
++++ libtirpc-0.2.1/src/getrpcport.c
+@@ -54,11 +54,11 @@ getrpcport(host, prognum, versnum, proto
+ 
+ 	if ((hp = gethostbyname(host)) == NULL)
+ 		return (0);
++	if (hp->h_length != sizeof(addr.sin_addr.s_addr))
++		return (0);
+ 	memset(&addr, 0, sizeof(addr));
+ 	addr.sin_family = AF_INET;
+ 	addr.sin_port =  0;
+-	if (hp->h_length > sizeof(addr))
+-	  hp->h_length = sizeof(addr);
+ 	memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length);
+ 	/* Inconsistent interfaces need casts! :-( */
+ 	return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, 
diff --git a/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch b/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch
new file mode 100644
index 0000000..d003348
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch
@@ -0,0 +1,38 @@
+uclibc does not provide des functionality unlike eglibc so lets disable ssl support
+
+Upstream-Status: Inappropriate [uclibc specific]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libtirpc-0.2.3/src/rpc_soc.c
+===================================================================
+--- libtirpc-0.2.3.orig/src/rpc_soc.c	2013-03-10 16:00:51.355282153 -0700
++++ libtirpc-0.2.3/src/rpc_soc.c	2013-03-10 16:00:51.703282148 -0700
+@@ -520,6 +520,7 @@
+ 	    (resultproc_t) rpc_wrap_bcast, "udp");
+ }
+ 
++#if 0
+ /*
+  * Create the client des authentication object. Obsoleted by
+  * authdes_seccreate().
+@@ -551,6 +552,7 @@
+ 	dummy = authdes_seccreate(servername, window, NULL, ckey);
+ 	return (dummy);
+ }
++#endif
+ 
+ /*
+  * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
+Index: libtirpc-0.2.3/src/Makefile.am
+===================================================================
+--- libtirpc-0.2.3.orig/src/Makefile.am	2013-03-10 16:00:51.355282153 -0700
++++ libtirpc-0.2.3/src/Makefile.am	2013-03-10 16:00:51.703282148 -0700
+@@ -50,7 +50,7 @@
+         rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
+         rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
+         svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
+-        auth_time.c auth_des.c authdes_prot.c
++        auth_time.c
+ 
+ ## XDR
+ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c
diff --git a/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
new file mode 100644
index 0000000..3edf002
--- /dev/null
+++ b/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Transport-Independent RPC library"
+DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux"
+SECTION = "libs/network"
+HOMEPAGE = "http://sourceforge.net/projects/libtirpc/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
+                    file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
+
+DEPENDS += "xz-native"
+PROVIDES = "virtual/librpc"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \
+           ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
+           file://libtirpc-0.2.1-fortify.patch \
+          "
+
+SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch"
+
+SRC_URI[libtirpc.md5sum] = "8cd41a5ef5a9b50d0fb6abb98af15368"
+SRC_URI[libtirpc.sha256sum] = "62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db"
+SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
+SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-gssapi"
+
+do_configure_prepend () {
+        cp -r ${S}/../tirpc ${S}
+}
+
+do_install_append() {
+        chown root:root ${D}${sysconfdir}/netconfig
+}
diff --git a/meta/recipes-extended/libuser/libuser_0.62.bb b/meta/recipes-extended/libuser/libuser_0.62.bb
new file mode 100644
index 0000000..c4ed459
--- /dev/null
+++ b/meta/recipes-extended/libuser/libuser_0.62.bb
@@ -0,0 +1,30 @@
+SUMMARY = "user and group account administration library"
+DESCRIPTION = "The libuser library implements a standardized interface for manipulating and administering user \
+and group accounts"
+HOMEPAGE = "https://fedorahosted.org/libuser/"
+BUGTRACKER = "https://fedorahosted.org/libuser/newticket"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+                    file://lib/user.h;endline=19;md5=76b301f63c39fa992062395efbdc9558 \
+                    file://samples/testuser.c;endline=19;md5=3b87fa660fa3f4a6bb31d624afe30ba1"
+
+SECTION = "base"
+
+SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
+           "
+
+SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2"
+SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b"
+
+DEPENDS = "popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native python"
+
+inherit autotools gettext pythonnative python-dir pkgconfig
+
+EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}"
+
+PACKAGES += "${PN}-python "
+
+FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
+
diff --git a/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch b/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch
new file mode 100644
index 0000000..a9df174
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch
@@ -0,0 +1,387 @@
+From e6ccbab5d42b110ac4f6ce1f72cb1e9ccbe4400a Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Tue, 16 Jun 2015 19:02:38 +0900
+Subject: [PATCH] mod_cgi buffers data without bound so fix it
+
+Upstream-Status: Submitted [http://redmine.lighttpd.net/issues/1264]
+
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+
+Update context for 1.4.36.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ doc/config/lighttpd.conf |   8 ++
+ src/mod_cgi.c            | 188 ++++++++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 187 insertions(+), 9 deletions(-)
+
+diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf
+index 60b0ae1..9c101a7 100644
+--- a/doc/config/lighttpd.conf
++++ b/doc/config/lighttpd.conf
+@@ -375,6 +375,14 @@ server.upload-dirs = ( "/var/tmp" )
+ ##
+ #######################################################################
+ 
++#######################################################################
++##
++##
++## maximum bytes in send_raw before backing off [KByte]
++##  cgi.high-waterlevel        = 10240
++## minimum bytes in send_raw to disable backoff [KByte]
++##  cgi.low-waterlevel         = 5120
++#######################################################################
+ 
+ #######################################################################
+ ##
+diff --git a/src/mod_cgi.c b/src/mod_cgi.c
+index 01b1877..7c67eb5 100644
+--- a/src/mod_cgi.c
++++ b/src/mod_cgi.c
+@@ -38,6 +38,10 @@
+ 
+ #include "version.h"
+ 
++/* for output logs */
++char msgbuf[2048];
++
++
+ enum {EOL_UNSET, EOL_N, EOL_RN};
+ 
+ typedef struct {
+@@ -53,9 +57,19 @@ typedef struct {
+ 	size_t size;
+ } buffer_pid_t;
+ 
++struct handler_ctx;
++
++typedef struct {
++	struct handler_ctx **hctx;
++	size_t used;
++	size_t size;
++} buffer_ctx_t;
++
+ typedef struct {
+ 	array *cgi;
+ 	unsigned short execute_x_only;
++	unsigned int high_waterlevel; /* maximum bytes in send_raw before backing off */
++	unsigned int low_waterlevel;  /* minimum bytes in send_raw to disable backoff */
+ } plugin_config;
+ 
+ typedef struct {
+@@ -68,9 +82,11 @@ typedef struct {
+ 	plugin_config **config_storage;
+ 
+ 	plugin_config conf;
++
++	buffer_ctx_t cgi_ctx;
+ } plugin_data;
+ 
+-typedef struct {
++typedef struct handler_ctx {
+ 	pid_t pid;
+ 	int fd;
+ 	int fde_ndx; /* index into the fd-event buffer */
+@@ -78,11 +94,16 @@ typedef struct {
+ 	connection *remote_conn;  /* dumb pointer */
+ 	plugin_data *plugin_data; /* dumb pointer */
+ 
++	int throttling;        /* 1=waiting for send_raw buffer to drain */
++	off_t high_waterlevel; /* maximum bytes in send_raw before backing off */
++	off_t low_waterlevel;  /* minimum bytes in send_raw to disable backoff */
++	off_t bytes_in_buffer;
++
+ 	buffer *response;
+ 	buffer *response_header;
+ } handler_ctx;
+ 
+-static handler_ctx * cgi_handler_ctx_init(void) {
++static handler_ctx * cgi_handler_ctx_init(plugin_data *p) {
+ 	handler_ctx *hctx = calloc(1, sizeof(*hctx));
+ 
+ 	force_assert(hctx);
+@@ -90,13 +111,26 @@ static handler_ctx * cgi_handler_ctx_init(void) {
+ 	hctx->response = buffer_init();
+ 	hctx->response_header = buffer_init();
+ 
++	hctx->throttling = 0;
++	hctx->high_waterlevel = (off_t)p->conf.high_waterlevel * 1024;
++	hctx->low_waterlevel  = (off_t)p->conf.low_waterlevel  * 1024;
++	if (hctx->low_waterlevel >= hctx->high_waterlevel) {
++	    hctx->low_waterlevel = hctx->high_waterlevel * 3 / 4; /* 75% */
++	}
++	hctx->bytes_in_buffer = 0;
++
+ 	return hctx;
+ }
+ 
+-static void cgi_handler_ctx_free(handler_ctx *hctx) {
++static void cgi_handler_ctx_free(server *srv, handler_ctx *hctx) {
+ 	buffer_free(hctx->response);
+ 	buffer_free(hctx->response_header);
+ 
++	/* to avoid confusion */
++	if (hctx->throttling) {
++	    log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled");
++	}
++
+ 	free(hctx);
+ }
+ 
+@@ -154,6 +188,8 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
+ 	config_values_t cv[] = {
+ 		{ "cgi.assign",                  NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },       /* 0 */
+ 		{ "cgi.execute-x-only",          NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION },     /* 1 */
++		{ "cgi.high-waterlevel",         NULL, T_CONFIG_INT,   T_CONFIG_SCOPE_CONNECTION },       /* 2 */
++		{ "cgi.low-waterlevel",          NULL, T_CONFIG_INT,   T_CONFIG_SCOPE_CONNECTION },       /* 3 */
+ 		{ NULL,                          NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET}
+ 	};
+ 
+@@ -169,9 +205,13 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
+ 
+ 		s->cgi    = array_init();
+ 		s->execute_x_only = 0;
++		s->high_waterlevel = 0; /* 0 == disabled */
++		s->low_waterlevel  = 0;
+ 
+ 		cv[0].destination = s->cgi;
+ 		cv[1].destination = &(s->execute_x_only);
++		cv[2].destination = &(s->high_waterlevel);
++		cv[3].destination = &(s->low_waterlevel);
+ 
+ 		p->config_storage[i] = s;
+ 
+@@ -184,6 +224,51 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
+ }
+ 
+ 
++static void cgi_recount_bytes_in_buffer(handler_ctx *hctx)
++{
++	chunkqueue *cq = hctx->remote_conn->write_queue;
++	hctx->bytes_in_buffer = chunkqueue_length(cq) - chunkqueue_written(cq);
++}
++
++
++static void cgi_throttling_control(server *srv, handler_ctx *hctx)
++{
++	cgi_recount_bytes_in_buffer(hctx);
++
++#ifdef DEBUG
++	sprintf(msgbuf, "throttling=%d, chars=%llu, high=%llu, low=%llu",
++		hctx->throttling, hctx->bytes_in_buffer,
++		hctx->high_waterlevel, hctx->low_waterlevel);
++	log_error_write(srv, __FILE__, __LINE__, "ss",
++			"(debug) throttling control,", msgbuf);
++#endif
++
++	if (hctx->throttling) {
++		sprintf(msgbuf, "throttling; chars in queue=%llu,"
++			" low-waterlevel=%llu, high-waterlevel=%llu",
++			hctx->bytes_in_buffer,
++			hctx->low_waterlevel, hctx->high_waterlevel);
++		log_error_write(srv, __FILE__, __LINE__, "s", msgbuf);
++		if (hctx->bytes_in_buffer <= hctx->low_waterlevel) {
++			fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);
++			hctx->throttling = 0;
++			log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled");
++		}
++	} else {
++		if (hctx->high_waterlevel != 0 &&
++			hctx->high_waterlevel <= hctx->bytes_in_buffer) {
++			fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd);
++			hctx->throttling = 1;
++			sprintf(msgbuf, "throttled; chars in queue=%llu,"
++				" low-waterlevel=%llu, high-waterlevel=%llu",
++				hctx->bytes_in_buffer,
++				hctx->low_waterlevel, hctx->high_waterlevel);
++			log_error_write(srv, __FILE__, __LINE__, "s", msgbuf);
++		}
++	}
++}
++
++
+ static int cgi_pid_add(server *srv, plugin_data *p, pid_t pid) {
+ 	int m = -1;
+ 	size_t i;
+@@ -230,6 +315,39 @@ static int cgi_pid_del(server *srv, plugin_data *p, pid_t pid) {
+ 	return 0;
+ }
+ 
++
++static void cgi_ctx_add(plugin_data *p, handler_ctx *hctx) {
++	buffer_ctx_t *r = &(p->cgi_ctx);
++
++	if (r->size == 0) {
++		r->size = 16;
++		r->hctx = malloc(sizeof(*r->hctx) * r->size);
++	} else if (r->used == r->size) {
++		r->size += 16;
++		r->hctx = realloc(r->hctx, sizeof(*r->hctx) * r->size);
++	}
++
++	r->hctx[r->used++] = hctx;
++}
++
++static void cgi_ctx_del(plugin_data *p, handler_ctx *hctx) {
++	size_t i;
++	buffer_ctx_t *r = &(p->cgi_ctx);
++
++	for (i = 0; i < r->used; i++) {
++		if (r->hctx[i] == hctx) break;
++	}
++
++	if (i != r->used) {
++		/* found */
++
++		if (i != r->used - 1) {
++			r->hctx[i] = r->hctx[r->used - 1];
++		}
++		r->used--;
++	}
++}
++
+ static int cgi_response_parse(server *srv, connection *con, plugin_data *p, buffer *in) {
+ 	char *ns;
+ 	const char *s;
+@@ -380,6 +498,14 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) {
+ 
+ 		buffer_commit(hctx->response, n);
+ 
++#ifdef DEBUG
++		sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu", n,
++			(unsigned long long)con->write_queue->bytes_out,
++			(unsigned long long)con->write_queue->bytes_in);
++		log_error_write(srv, __FILE__, __LINE__, "ss",
++				"(debug) read,", msgbuf);
++#endif
++
+ 		/* split header from body */
+ 
+ 		if (con->file_started == 0) {
+@@ -503,7 +629,20 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) {
+ 			}
+ 		} else {
+ 			http_chunk_append_buffer(srv, con, hctx->response);
++#ifdef DEBUG
++			sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu, limit=%llu", n,
++				(unsigned long long)con->write_queue->bytes_out,
++				(unsigned long long)con->write_queue->bytes_in,
++				(unsigned long long)hctx->high_waterlevel);
++			log_error_write(srv, __FILE__, __LINE__,
++					"ss", "(debug) append,", msgbuf);
++#endif
+ 			joblist_append(srv, con);
++
++			cgi_throttling_control(srv, hctx);
++			if (hctx->throttling) {
++				return FDEVENT_HANDLED_NOT_FINISHED;
++			}
+ 		}
+ 
+ #if 0
+@@ -553,8 +692,9 @@ static handler_t cgi_connection_close(server *srv, handler_ctx *hctx) {
+ 	con->plugin_ctx[p->id] = NULL;
+ 
+ 	/* is this a good idea ? */
+-	cgi_handler_ctx_free(hctx);
+-
++	cgi_ctx_del(p, hctx);
++	cgi_handler_ctx_free(srv, hctx);
++	
+ 	/* if waitpid hasn't been called by response.c yet, do it here */
+ 	if (pid) {
+ 		/* check if the CGI-script is already gone */
+@@ -1105,7 +1245,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
+ 		con->mode = p->id;
+ 		buffer_reset(con->physical.path);
+ 
+-		hctx = cgi_handler_ctx_init();
++		hctx = cgi_handler_ctx_init(p);
++		cgi_ctx_add(p, hctx);
+ 
+ 		hctx->remote_conn = con;
+ 		hctx->plugin_data = p;
+@@ -1114,6 +1255,11 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
+ 		hctx->fde_ndx = -1;
+ 
+ 		con->plugin_ctx[p->id] = hctx;
++#ifdef DEBUG
++		sprintf(msgbuf, "hctx=%p, con=%p", (void*)hctx, (void*)con);
++		log_error_write(srv, __FILE__, __LINE__, "ss",
++				"(debug) hctx generated, ", msgbuf);
++#endif
+ 
+ 		fdevent_register(srv->ev, hctx->fd, cgi_handle_fdevent, hctx);
+ 		fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);
+@@ -1128,7 +1274,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
+ 
+ 			close(hctx->fd);
+ 
+-			cgi_handler_ctx_free(hctx);
++			cgi_ctx_del(p, hctx);
++			cgi_handler_ctx_free(srv, hctx);
+ 
+ 			con->plugin_ctx[p->id] = NULL;
+ 
+@@ -1153,6 +1300,8 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
+ 
+ 	PATCH(cgi);
+ 	PATCH(execute_x_only);
++	PATCH(high_waterlevel);
++	PATCH(low_waterlevel);
+ 
+ 	/* skip the first, the global context */
+ 	for (i = 1; i < srv->config_context->used; i++) {
+@@ -1170,6 +1319,10 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
+ 				PATCH(cgi);
+ 			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.execute-x-only"))) {
+ 				PATCH(execute_x_only);
++			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.high-waterlevel"))) {
++				PATCH(high_waterlevel);
++			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.low-waterlevel"))) {
++				PATCH(low_waterlevel);
+ 			}
+ 		}
+ 	}
+@@ -1222,6 +1375,21 @@ URIHANDLER_FUNC(cgi_is_handled) {
+ TRIGGER_FUNC(cgi_trigger) {
+ 	plugin_data *p = p_d;
+ 	size_t ndx;
++
++	for (ndx = 0; ndx < p->cgi_ctx.used; ndx++) {
++		handler_ctx *hctx = p->cgi_ctx.hctx[ndx];
++#ifdef DEBUG
++		connection *con = hctx->remote_conn;
++	
++		sprintf(msgbuf, "hctx=%p, con=%p, bytes_in_buffer=%llu",
++			(void*)hctx, (void*)con,
++			(unsigned long long)hctx->bytes_in_buffer);
++		log_error_write(srv, __FILE__, __LINE__, "ss",
++				"(debug) found using ctx,", msgbuf);
++#endif
++		cgi_throttling_control(srv, hctx);
++	}
++
+ 	/* the trigger handle only cares about lonely PID which we have to wait for */
+ #ifndef __WIN32
+ 
+@@ -1330,7 +1498,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
+ 			log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno));
+ 		}
+ 
+-		cgi_handler_ctx_free(hctx);
++		cgi_ctx_del(p, hctx);
++		cgi_handler_ctx_free(srv, hctx);
+ 
+ 		con->plugin_ctx[p->id] = NULL;
+ 
+@@ -1362,7 +1531,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
+ 			log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno));
+ 		}
+ 
+-		cgi_handler_ctx_free(hctx);
++		cgi_ctx_del(p, hctx);
++		cgi_handler_ctx_free(srv, hctx);
+ 
+ 		con->plugin_ctx[p->id] = NULL;
+ 		return HANDLER_FINISHED;
diff --git a/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd b/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd
new file mode 100644
index 0000000..f5f1c37
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/index.html.lighttpd
@@ -0,0 +1 @@
+<html><body><h1>It works!</h1></body></html>
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
new file mode 100644
index 0000000..bf89a60
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/lighttpd
+NAME=lighttpd
+DESC="Lighttpd Web Server"
+OPTS="-f /etc/lighttpd.conf"
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon --start -x "$DAEMON" -- $OPTS
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon --stop -x "$DAEMON"
+	echo "$NAME."
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: "
+	start-stop-daemon --stop -x "$DAEMON"
+	sleep 1
+	start-stop-daemon --start -x "$DAEMON" -- $OPTS
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
new file mode 100644
index 0000000..6e8402d
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.conf
@@ -0,0 +1,331 @@
+# lighttpd configuration file
+#
+# use it as a base for lighttpd 1.0.0 and above
+#
+# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
+
+############ Options you really have to take care of ####################
+
+## modules to load
+# at least mod_access and mod_accesslog should be loaded
+# all other module should only be loaded if really neccesary
+# - saves some time
+# - saves memory
+server.modules              = (
+#                               "mod_rewrite",
+#                               "mod_redirect",
+#                               "mod_alias",
+                                "mod_access",
+#                               "mod_cml",
+#                               "mod_trigger_b4_dl",
+#                               "mod_auth",
+#                               "mod_status",
+#                               "mod_setenv",
+#                               "mod_fastcgi",
+#                               "mod_proxy",
+#                               "mod_simple_vhost",
+#                               "mod_evhost",
+#                               "mod_userdir",
+#                               "mod_cgi",
+#                               "mod_compress",
+#                               "mod_ssi",
+#                               "mod_usertrack",
+#                               "mod_expire",
+#                               "mod_secdownload",
+#                               "mod_rrdtool",
+#				"mod_webdav",
+                                "mod_accesslog" )
+
+## a static document-root, for virtual-hosting take look at the
+## server.virtual-* options
+server.document-root        = "/www/pages/"
+
+## where to send error-messages to
+server.errorlog             = "/www/logs/lighttpd.error.log"
+
+# files to check for if .../ is requested
+index-file.names            = ( "index.php", "index.html",
+                                "index.htm", "default.htm" )
+
+## set the event-handler (read the performance section in the manual)
+# server.event-handler = "freebsd-kqueue" # needed on OS X
+
+# mimetype mapping
+mimetype.assign             = (
+  ".pdf"          =>      "application/pdf",
+  ".sig"          =>      "application/pgp-signature",
+  ".spl"          =>      "application/futuresplash",
+  ".class"        =>      "application/octet-stream",
+  ".ps"           =>      "application/postscript",
+  ".torrent"      =>      "application/x-bittorrent",
+  ".dvi"          =>      "application/x-dvi",
+  ".gz"           =>      "application/x-gzip",
+  ".pac"          =>      "application/x-ns-proxy-autoconfig",
+  ".swf"          =>      "application/x-shockwave-flash",
+  ".tar.gz"       =>      "application/x-tgz",
+  ".tgz"          =>      "application/x-tgz",
+  ".tar"          =>      "application/x-tar",
+  ".zip"          =>      "application/zip",
+  ".mp3"          =>      "audio/mpeg",
+  ".m3u"          =>      "audio/x-mpegurl",
+  ".wma"          =>      "audio/x-ms-wma",
+  ".wax"          =>      "audio/x-ms-wax",
+  ".ogg"          =>      "application/ogg",
+  ".wav"          =>      "audio/x-wav",
+  ".gif"          =>      "image/gif",
+  ".jpg"          =>      "image/jpeg",
+  ".jpeg"         =>      "image/jpeg",
+  ".png"          =>      "image/png",
+  ".xbm"          =>      "image/x-xbitmap",
+  ".xpm"          =>      "image/x-xpixmap",
+  ".xwd"          =>      "image/x-xwindowdump",
+  ".css"          =>      "text/css",
+  ".html"         =>      "text/html",
+  ".htm"          =>      "text/html",
+  ".js"           =>      "text/javascript",
+  ".asc"          =>      "text/plain",
+  ".c"            =>      "text/plain",
+  ".cpp"          =>      "text/plain",
+  ".log"          =>      "text/plain",
+  ".conf"         =>      "text/plain",
+  ".text"         =>      "text/plain",
+  ".txt"          =>      "text/plain",
+  ".dtd"          =>      "text/xml",
+  ".xml"          =>      "text/xml",
+  ".mpeg"         =>      "video/mpeg",
+  ".mpg"          =>      "video/mpeg",
+  ".mov"          =>      "video/quicktime",
+  ".qt"           =>      "video/quicktime",
+  ".avi"          =>      "video/x-msvideo",
+  ".asf"          =>      "video/x-ms-asf",
+  ".asx"          =>      "video/x-ms-asf",
+  ".wmv"          =>      "video/x-ms-wmv",
+  ".bz2"          =>      "application/x-bzip",
+  ".tbz"          =>      "application/x-bzip-compressed-tar",
+  ".tar.bz2"      =>      "application/x-bzip-compressed-tar"
+ )
+
+# Use the "Content-Type" extended attribute to obtain mime type if possible
+#mimetype.use-xattr        = "enable"
+
+
+## send a different Server: header
+## be nice and keep it at lighttpd
+# server.tag                 = "lighttpd"
+
+#### accesslog module
+accesslog.filename          = "/www/logs/access.log"
+debug.log-request-handling = "enable"
+
+
+
+
+## deny access the file-extensions
+#
+# ~    is for backupfiles from vi, emacs, joe, ...
+# .inc is often used for code includes which should in general not be part
+#      of the document-root
+url.access-deny             = ( "~", ".inc" )
+
+$HTTP["url"] =~ "\.pdf$" {
+  server.range-requests = "disable"
+}
+
+##
+# which extensions should not be handle via static-file transfer
+#
+# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
+
+######### Options that are good to be but not neccesary to be changed #######
+
+## bind to port (default: 80)
+#server.port                = 81
+
+## bind to localhost (default: all interfaces)
+#server.bind                = "grisu.home.kneschke.de"
+
+## error-handler for status 404
+#server.error-handler-404   = "/error-handler.html"
+#server.error-handler-404   = "/error-handler.php"
+
+## to help the rc.scripts
+#server.pid-file            = "/var/run/lighttpd.pid"
+
+
+###### virtual hosts
+##
+##  If you want name-based virtual hosting add the next three settings and load
+##  mod_simple_vhost
+##
+## document-root =
+##   virtual-server-root + virtual-server-default-host + virtual-server-docroot
+## or
+##   virtual-server-root + http-host + virtual-server-docroot
+##
+#simple-vhost.server-root   = "/home/weigon/wwwroot/servers/"
+#simple-vhost.default-host  = "grisu.home.kneschke.de"
+#simple-vhost.document-root = "/pages/"
+
+
+##
+## Format: <errorfile-prefix><status-code>.html
+## -> ..../status-404.html for 'File not found'
+#server.errorfile-prefix    = "/home/weigon/projects/lighttpd/doc/status-"
+
+## virtual directory listings
+#dir-listing.activate       = "enable"
+
+## enable debugging
+#debug.log-request-header   = "enable"
+#debug.log-response-header  = "enable"
+#debug.log-request-handling = "enable"
+#debug.log-file-not-found   = "enable"
+
+### only root can use these options
+#
+# chroot() to directory (default: no chroot() )
+#server.chroot              = "/"
+
+## change uid to <uid> (default: don't care)
+#server.username            = "wwwrun"
+
+## change uid to <uid> (default: don't care)
+#server.groupname           = "wwwrun"
+
+#### compress module
+#compress.cache-dir         = "/tmp/lighttpd/cache/compress/"
+#compress.filetype          = ("text/plain", "text/html")
+
+#### proxy module
+## read proxy.txt for more info
+#proxy.server               = ( ".php" =>
+#                               ( "localhost" =>
+#                                 (
+#                                   "host" => "192.168.0.101",
+#                                   "port" => 80
+#                                 )
+#                               )
+#                             )
+
+#### fastcgi module
+## read fastcgi.txt for more info
+## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
+#fastcgi.server             = ( ".php" =>
+#                               ( "localhost" =>
+#                                 (
+#                                   "socket" => "/tmp/php-fastcgi.socket",
+#                                   "bin-path" => "/usr/local/bin/php"
+#                                 )
+#                               )
+#                            )
+
+#### CGI module
+#cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
+#                               ".cgi" => "/usr/bin/perl" )
+#
+
+#### SSL engine
+#ssl.engine                 = "enable"
+#ssl.pemfile                = "server.pem"
+
+#### status module
+#status.status-url          = "/server-status"
+#status.config-url          = "/server-config"
+
+#### auth module
+## read authentication.txt for more info
+#auth.backend               = "plain"
+#auth.backend.plain.userfile = "lighttpd.user"
+#auth.backend.plain.groupfile = "lighttpd.group"
+
+#auth.backend.ldap.hostname = "localhost"
+#auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
+#auth.backend.ldap.filter   = "(uid=$)"
+
+#auth.require               = ( "/server-status" =>
+#                               (
+#                                 "method"  => "digest",
+#                                 "realm"   => "download archiv",
+#                                 "require" => "user=jan"
+#                               ),
+#                               "/server-config" =>
+#                               (
+#                                 "method"  => "digest",
+#                                 "realm"   => "download archiv",
+#                                 "require" => "valid-user"
+#                               )
+#                             )
+
+#### url handling modules (rewrite, redirect, access)
+#url.rewrite                = ( "^/$"             => "/server-status" )
+#url.redirect               = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
+
+#### both rewrite/redirect support back reference to regex conditional using %n
+#$HTTP["host"] =~ "^www\.(.*)" {
+#  url.redirect            = ( "^/(.*)" => "http://%1/$1" )
+#}
+
+#
+# define a pattern for the host url finding
+# %% => % sign
+# %0 => domain name + tld
+# %1 => tld
+# %2 => domain name without tld
+# %3 => subdomain 1 name
+# %4 => subdomain 2 name
+#
+#evhost.path-pattern        = "/home/storage/dev/www/%3/htdocs/"
+
+#### expire module
+#expire.url                 = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
+
+#### ssi
+#ssi.extension              = ( ".shtml" )
+
+#### rrdtool
+#rrdtool.binary             = "/usr/bin/rrdtool"
+#rrdtool.db-name            = "/var/www/lighttpd.rrd"
+
+#### setenv
+#setenv.add-request-header  = ( "TRAV_ENV" => "mysql://user@host/db" )
+#setenv.add-response-header = ( "X-Secret-Message" => "42" )
+
+## for mod_trigger_b4_dl
+# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
+# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
+# trigger-before-download.trigger-url = "^/trigger/"
+# trigger-before-download.download-url = "^/download/"
+# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
+# trigger-before-download.trigger-timeout = 10
+
+## for mod_cml
+## don't forget to add index.cml to server.indexfiles
+# cml.extension               = ".cml"
+# cml.memcache-hosts          = ( "127.0.0.1:11211" )
+
+#### variable usage:
+## variable name without "." is auto prefixed by "var." and becomes "var.bar"
+#bar = 1
+#var.mystring = "foo"
+
+## integer add
+#bar += 1
+## string concat, with integer cast as string, result: "www.foo1.com"
+#server.name = "www." + mystring + var.bar + ".com"
+## array merge
+#index-file.names = (foo + ".php") + index-file.names
+#index-file.names += (foo + ".php")
+
+#### include
+#include /etc/lighttpd/lighttpd-inc.conf
+## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
+#include "lighttpd-inc.conf"
+
+#### include_shell
+#include_shell "echo var.a=1"
+## the above is same as:
+#var.a=1
+
+# include other config file fragments from lighttpd.d subdir
+include_shell "find /etc/lighttpd.d -maxdepth 1 -name '*.conf' -exec cat {} \;" 
diff --git a/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service
new file mode 100644
index 0000000..66a907a
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/lighttpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Lightning Fast Webserver With Light System Requirements
+After=network.target
+
+[Service]
+ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf
+ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch b/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch
new file mode 100644
index 0000000..e395f92
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch
@@ -0,0 +1,33 @@
+Use pkg-config for pcre dependency instead of -config script.
+
+Upstream-Status: Pending
+
+RP 2014/5/22
+
+
+Index: lighttpd-1.4.35/configure.ac
+===================================================================
+--- lighttpd-1.4.35.orig/configure.ac	2014-03-06 14:08:00.000000000 +0000
++++ lighttpd-1.4.35/configure.ac	2014-05-13 16:58:30.758471169 +0000
+@@ -309,16 +309,14 @@
+ AC_MSG_RESULT([$WITH_PCRE])
+ 
+ if test "$WITH_PCRE" != "no"; then
+-  AC_PATH_PROG(PCRECONFIG, pcre-config)
+-
+-  if test x"$PCRECONFIG" != x; then
+-    PCRE_LIB=`$PCRECONFIG --libs`
+-    CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
++  PKG_CHECK_MODULES(PCREPKG, [libpcre], [
++    PCRE_LIB=${PCREPKG_LIBS}
++    CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
+     AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
+     AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
+-  else
++  ], [
+      AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre])
+-  fi
++  ])
+ fi
+ 
+ AC_SUBST(PCRE_LIB)
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb
new file mode 100644
index 0000000..67b6e37
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb
@@ -0,0 +1,77 @@
+SUMMARY = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/"
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
+
+SECTION = "net"
+DEPENDS = "zlib libpcre"
+RDEPENDS_${PN} += " \
+               lighttpd-module-access \
+               lighttpd-module-accesslog \
+               lighttpd-module-indexfile \
+               lighttpd-module-dirlisting \
+               lighttpd-module-staticfile \
+"
+
+SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
+        file://index.html.lighttpd \
+        file://lighttpd.conf \
+        file://lighttpd \
+        file://lighttpd.service \
+        file://pkgconfig.patch \
+        file://0001-mod_cgi-buffers-data-without-bound.patch \
+        "
+
+SRC_URI[md5sum] = "1843daffcb018aa528f6d15d43544654"
+SRC_URI[sha256sum] = "897ab6b1cc7bd51671f8af759e7846245fbbca0685c30017e93a5882a9ac1a53"
+
+PACKAGECONFIG ??= "openssl"
+PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
+
+EXTRA_OECONF = " \
+             --without-bzip2 \
+             --without-ldap \
+             --without-lua \
+             --without-memcache \
+             --with-pcre \
+             --without-webdav-props \
+             --without-webdav-locks \
+             --disable-static \
+"
+
+inherit autotools pkgconfig update-rc.d gettext systemd
+
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
+
+SYSTEMD_SERVICE_${PN} = "lighttpd.service"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
+	install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+	install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+	install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' \
+		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+		-e 's,@BASE_BINDIR@,${base_bindir},g' \
+		${D}${systemd_unitdir}/system/lighttpd.service
+	#For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
+	ln -sf ${localstatedir}/log ${D}/www/logs
+	ln -sf ${localstatedir}/tmp ${D}/www/var
+}
+
+FILES_${PN} += "${sysconfdir} /www"
+
+CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
+
+PACKAGES_DYNAMIC += "^lighttpd-module-.*"
+
+python populate_packages_prepend () {
+    lighttpd_libdir = d.expand('${libdir}')
+    do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}
diff --git a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
new file mode 100644
index 0000000..2e931a2
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch
@@ -0,0 +1,147 @@
+From 68f29ab490cf987aa34b5f4caf1784b58a021308 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 17 Feb 2015 21:08:07 -0800
+Subject: [PATCH] Act as the "mv" command when rotate log
+
+Act as the "mv" command when rotate log, first rename, if failed, then
+read and write.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ logrotate.c |   71 +++++++++++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 59 insertions(+), 12 deletions(-)
+
+diff --git a/logrotate.c b/logrotate.c
+index d3deb6a..cf8bf2c 100644
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -1157,6 +1157,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force)
+     return 0;
+ }
+ 
++/* Act as the "mv" command, if rename failed, then read the old file and
++ * write to new file. The function which invokes the mvFile will use
++ * the strerror(errorno) to handle the error message, so we don't have
++ * to print the error message here */
++
++int mvFile (char *oldName, char *newName, struct logInfo *log, acl_type acl)
++{
++    struct stat sbprev;
++    int fd_old, fd_new, n;
++    char buf[BUFSIZ];
++
++    /* Do the rename first */
++    if (!rename(oldName, newName))
++        return 0;
++
++    /* If the errno is EXDEV, then read old file, write newfile and
++     * remove the oldfile */
++    if (errno == EXDEV) {
++        /* Open the old file to read */
++        if ((fd_old = open(oldName, O_RDONLY)) < 0)
++            return 1;
++
++        /* Create the file to write, keep the same attribute as the old file */
++        if (stat(oldName, &sbprev))
++            return 1;
++        else {
++            if ((fd_new = createOutputFile(newName,
++                O_WRONLY | O_CREAT | O_TRUNC, &sbprev, acl, 0)) < 0 )
++                return 1;
++        }
++
++        /* Read and write */
++        while ((n = read(fd_old, buf, BUFSIZ)) > 0)
++            if (write(fd_new, buf, n) != n)
++                return 1;
++
++        if ((close(fd_old) < 0) ||
++            removeLogFile(oldName, log) ||
++            (close(fd_new) < 0))
++            return 1;
++
++        return 0;
++    }
++
++    return 1;
++}
++
+ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+ 		       struct logNames *rotNames)
+ {
+@@ -1523,15 +1570,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+ 		}
+ 
+ 	    message(MESS_DEBUG,
+-		    "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n",
++		    "moving %s to %s (rotatecount %d, logstart %d, i %d), \n",
+ 		    oldName, newName, rotateCount, logStart, i);
+ 
+-	    if (!debug && rename(oldName, newName)) {
++	    if (!debug && mvFile(oldName, newName, log, prev_acl)) {
+ 		if (errno == ENOENT) {
+ 		    message(MESS_DEBUG, "old log %s does not exist\n",
+ 			    oldName);
+ 		} else {
+-		    message(MESS_ERROR, "error renaming %s to %s: %s\n",
++		    message(MESS_ERROR, "error moving %s to %s: %s\n",
+ 			    oldName, newName, strerror(errno));
+ 		    hasErrors = 1;
+ 		}
+@@ -1669,21 +1716,21 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+ 				return 1;
+ 			}
+ 
+-			message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
++			message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
+ 				tmpFilename);
+-			if (!debug && !hasErrors && rename(log->files[logNum], tmpFilename)) {
+-			message(MESS_ERROR, "failed to rename %s to %s: %s\n",
++			if (!debug && !hasErrors && mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
++			message(MESS_ERROR, "failed to move %s to %s: %s\n",
+ 				log->files[logNum], tmpFilename,
+ 				strerror(errno));
+ 				hasErrors = 1;
+ 			}
+ 		}
+ 		else {
+-			message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
++			message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
+ 				rotNames->finalName);
+ 			if (!debug && !hasErrors &&
+-			rename(log->files[logNum], rotNames->finalName)) {
+-				message(MESS_ERROR, "failed to rename %s to %s: %s\n",
++			mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
++				message(MESS_ERROR, "failed to move %s to %s: %s\n",
+ 					log->files[logNum], tmpFilename,
+ 					strerror(errno));
+ 					hasErrors = 1;
+@@ -2063,7 +2110,7 @@ int rotateLogSet(struct logInfo *log, int force)
+     return hasErrors;
+ }
+ 
+-static int writeState(char *stateFilename)
++static int writeState(struct logInfo *log, char *stateFilename)
+ {
+ 	struct logState *p;
+ 	FILE *f;
+@@ -2227,7 +2274,7 @@ static int writeState(char *stateFilename)
+ 		fclose(f);
+ 
+ 	if (error == 0) {
+-		if (rename(tmpFilename, stateFilename)) {
++		if (mvFile(tmpFilename, stateFilename, log, prev_acl)) {
+ 			unlink(tmpFilename);
+ 			error = 1;
+ 			message(MESS_ERROR, "error renaming temp state file %s\n",
+@@ -2525,7 +2572,7 @@ int main(int argc, const char **argv)
+ 		rc |= rotateLogSet(log, force);
+ 
+ 	if (!debug)
+-		rc |= writeState(stateFile);
++		rc |= writeState(log, stateFile);
+ 
+ 	return (rc != 0);
+ }
diff --git a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
new file mode 100644
index 0000000..793d702
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch
@@ -0,0 +1,32 @@
+Disable the check for different filesystems
+
+The logrotate supports rotate log across different filesystems now, so
+disable the check for different filesystems.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ config.c |    9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/config.c b/config.c
+index dbbf563..64e66f6 100644
+--- a/config.c
++++ b/config.c
+@@ -1493,15 +1493,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+ 							goto error;
+ 						}
+ 					}
+-
+-					if (sb.st_dev != sb2.st_dev
+-						&& !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY | LOG_FLAG_TMPFILENAME))) {
+-						message(MESS_ERROR,
+-							"%s:%d olddir %s and log file %s "
+-							"are on different devices\n", configFile,
+-							lineNum, newlog->oldDir, newlog->files[i]);
+-						goto error;
+-					}
+ 				}
+ 			}
+ 
diff --git a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch
new file mode 100644
index 0000000..50d037d
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch
@@ -0,0 +1,38 @@
+From e0b0fe30e9c49234994a20a86aacfaf80e690087 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 17 Feb 2015 21:14:37 -0800
+Subject: [PATCH] Update the manual
+
+Update the manual for rotating on different filesystems.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ logrotate.8 |   10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/logrotate.8 b/logrotate.8
+index e4e5f48..84407d0 100644
+--- a/logrotate.8
++++ b/logrotate.8
+@@ -405,12 +405,10 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
+ 
+ .TP
+ \fBolddir \fIdirectory\fR
+-Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR must be
+-on the same physical device as the log file being rotated, unless \fBcopy\fR,
+-\fBcopytruncate\fR or \fBrenamecopy\fR option is used. The \fIdirectory\fR
+-is assumed to be relative to the directory holding the log file
+-unless an absolute path name is specified. When this option is used all
+-old versions of the log end up in \fIdirectory\fR.  This option may be
++Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR
++is assumed to be relative to the directory holding the log file unless
++an absolute path name is specified. When this option is used all old
++versions of the log end up in \fIdirectory\fR. This option may be
+ overridden by the \fBnoolddir\fR option.
+ 
+ .TP
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/logrotate/logrotate_3.9.1.bb b/meta/recipes-extended/logrotate/logrotate_3.9.1.bb
new file mode 100644
index 0000000..7d0a159
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate_3.9.1.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Rotates, compresses, removes and mails system log files"
+SECTION = "console/utils"
+HOMEPAGE = "https://fedorahosted.org/logrotate/"
+LICENSE = "GPLv2"
+
+# TODO: logrotate 3.8.8 adds autotools/automake support, update recipe to use it.
+# TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox?
+
+DEPENDS="coreutils popt"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
+
+SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \
+           file://act-as-mv-when-rotate.patch \
+           file://update-the-manual.patch \
+           file://disable-check-different-filesystems.patch \
+            "
+
+SRC_URI[md5sum] = "4492b145b6d542e4a2f41e77fa199ab0"
+SRC_URI[sha256sum] = "022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545"
+
+PACKAGECONFIG ?= "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+"
+
+PACKAGECONFIG[acl] = ",,acl"
+PACKAGECONFIG[selinux] = ",,libselinux"
+
+CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
+		    ${sysconfdir}/logrotate.conf"
+
+# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
+# optimization variables, so use it rather than EXTRA_CFLAGS.
+EXTRA_OEMAKE = "\
+    LFS= \
+    OS_NAME='${OS_NAME}' \
+    'CC=${CC}' \
+    'RPM_OPT_FLAGS=${CFLAGS}' \
+    'EXTRA_LDFLAGS=${LDFLAGS}' \
+    ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
+"
+
+# OS_NAME in the makefile defaults to `uname -s`. The behavior for
+# freebsd/netbsd is questionable, so leave it as Linux, which only sets
+# INSTALL=install and BASEDIR=/usr.
+OS_NAME = "Linux"
+
+do_compile_prepend() {
+    # Make sure the recompile is OK
+    rm -f ${B}/.depend
+}
+
+do_install(){
+    oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} BINDIR=${bindir}
+    mkdir -p ${D}${sysconfdir}/logrotate.d
+    mkdir -p ${D}${sysconfdir}/cron.daily
+    mkdir -p ${D}${localstatedir}/lib
+    install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
+    install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate
+    touch ${D}${localstatedir}/lib/logrotate.status
+}
diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions
new file mode 100755
index 0000000..7c1dce2
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/init-functions
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# LSB initscript functions, as defined in the LSB Spec 1.1.0
+#
+# Lawrence Lim <llim@core.com> - Tue, 26 June 2007
+# Updated to the latest LSB 3.1 spec
+# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt
+
+start_daemon () {
+	/etc/core-lsb/lsb_start_daemon "$@"
+}
+
+killproc () {
+	/etc/core-lsb/lsb_killproc "$@"
+}
+
+pidofproc () {
+	/etc/core-lsb/lsb_pidofproc "$@"
+}
+
+log_success_msg () {
+	/etc/core-lsb/lsb_log_message success "$@"
+}
+
+log_failure_msg () {
+	/etc/core-lsb/lsb_log_message failure "$@"
+}
+
+log_warning_msg () {
+	/etc/core-lsb/lsb_log_message warning "$@"
+}
+
+# int log_begin_message (char *message)
+log_begin_msg () {
+	if [ -z "$1" ]; then
+		return 1
+	fi
+	echo " * $@"
+}
+
+
+log_end_msg () {
+	/etc/core-lsb/lsb_log_message end "$@"
+}
diff --git a/meta/recipes-extended/lsb/lsb/lsb_killproc b/meta/recipes-extended/lsb/lsb/lsb_killproc
new file mode 100755
index 0000000..866c1a9
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_killproc
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /etc/init.d/functions
+
+LSB=LSB-1.1 killproc $*
+exit $?
diff --git a/meta/recipes-extended/lsb/lsb/lsb_log_message b/meta/recipes-extended/lsb/lsb/lsb_log_message
new file mode 100755
index 0000000..10343b0
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_log_message
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+. /etc/init.d/functions
+
+ACTION=$1
+shift
+
+case "$ACTION" in
+  success)
+  	echo -n $*
+	success "$*"
+	echo
+	;;
+  failure)
+  	echo -n $*
+	failure "$*"
+	echo
+	;;
+  warning)
+  	echo -n $*
+	warning "$*"
+	echo
+	;;
+  *)
+  	;;
+esac
+exit 0
diff --git a/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
new file mode 100755
index 0000000..6d1fd0f
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /etc/init.d/functions
+
+pidofproc $*
+exit $?
diff --git a/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
new file mode 100755
index 0000000..de62c23
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+. /etc/init.d/functions
+
+nice=
+force=
+pidfile=
+user=
+check=
+RETVAL=
+while [ "$1" != "${1##[-+]}" ]; do
+	case $1 in
+	     -f)
+	     	force="--force"
+		shift
+		;;
+	     -n)
+	     	nice=$2
+		shift 2
+		;;
+	     -p)
+		pidfile="--pidfile $2"
+		shift 2
+		;;
+	     -u)
+	        user="--user $2"
+		shift 2
+		;;
+	     -c)
+	        check="--check $2"
+		shift 2
+		;;
+	      *)     
+ 		echo "Unknown Option $1"
+ 		echo "Options are:"
+ 		echo "-f" 
+		echo "-p {pidfile}"
+		echo "-n [+/-nicelevel]"
+		echo "-u {user}"
+		echo "-c {base}"
+	        exit 1;;	
+	esac
+done
+LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $*
+exit $?
diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
new file mode 100644
index 0000000..6215b62
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -0,0 +1,127 @@
+SUMMARY = "LSB support for OpenEmbedded"
+SECTION = "console/utils"
+HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
+LICENSE = "GPLv2+"
+PR = "r2"
+
+LSB_CORE = "lsb-core-${TARGET_ARCH}"
+LSB_CORE_x86 = "lsb-core-ia32"
+LSB_CORE_x86-64 = "lsb-core-amd64"
+RPROVIDES_${PN} += "${LSB_CORE}"
+
+# lsb_release needs getopt
+RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_getopt}"
+
+LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/1.4/lsb-release-1.4.tar.gz \
+           file://init-functions \
+           file://lsb_killproc \
+           file://lsb_log_message \
+           file://lsb_pidofproc \
+           file://lsb_start_daemon \
+           "
+
+SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
+SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
+S = "${WORKDIR}/lsb-release-1.4"
+
+CLEANBROKEN = "1"
+
+do_install(){
+	oe_runmake install prefix=${D}  mandir=${D}/${datadir}/man/ DESTDIR=${D}
+
+	# this 2 dirs are needed by package lsb-dist-checker
+	mkdir -p ${D}${sysconfdir}/opt
+	mkdir -p ${D}${localstatedir}/opt
+
+	mkdir -p ${D}${base_bindir}
+	mkdir -p ${D}/${baselib}
+	mkdir -p ${D}${sysconfdir}/lsb-release.d
+	printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
+
+	if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
+		printf "core-4.1-ia32" >>  ${D}${sysconfdir}/lsb-release
+	else
+		printf "core-4.1-${TARGET_ARCH}" >>  ${D}${sysconfdir}/lsb-release
+	fi
+	echo "\"" >> ${D}${sysconfdir}/lsb-release
+	echo "DISTRIB_ID=${DISTRO}" >> ${D}${sysconfdir}/lsb-release
+	echo "DISTRIB_RELEASE=${DISTRO_VERSION}" >> ${D}${sysconfdir}/lsb-release
+	if [ -n "${DISTRO_CODENAME}" ]; then
+		echo "DISTRIB_CODENAME=${DISTRO_CODENAME}" >> ${D}${sysconfdir}/lsb-release
+	fi
+	echo "DISTRIB_DESCRIPTION=\"${DISTRO_NAME} ${DISTRO_VERSION}\"" >> ${D}${sysconfdir}/lsb-release
+
+	if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
+		mkdir -p ${D}${sysconfdir}/lsb-release.d
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ia32
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ia32
+	elif [ "${TARGET_ARCH}" = "x86_64" ];then
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-amd64
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-amd64
+	fi
+	if [ "${TARGET_ARCH}" = "powerpc" ];then
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc32
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc32
+	elif [ "${TARGET_ARCH}" = "powerpc64" ];then
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-noarch
+		touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}-ppc64
+		touch ${D}${sysconfdir}/lsb-release.d/desktop-${PV}-ppc64
+	fi
+}
+
+do_install_append(){
+       install -d ${D}${sysconfdir}/core-lsb
+       for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
+       do
+           install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
+       done
+
+       install -d ${D}/lib/lsb
+       install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb
+
+       # creat links for LSB test
+       install -d ${D}/usr/lib/lsb
+       ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd
+       ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd
+
+       if [ "${TARGET_ARCH}" = "x86_64" ];then
+	       cd ${D}
+               if [ "${baselib}" != "lib64" ]; then
+                   ln -sf ${baselib} lib64
+               fi
+	       cd ${D}/${baselib}
+               ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
+               ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+       fi
+       if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
+	       cd ${D}/${baselib}
+               ln -sf ld-linux.so.2 ld-lsb.so.2
+               ln -sf ld-linux.so.2 ld-lsb.so.3
+       fi
+
+       if [ "${TARGET_ARCH}" = "powerpc64" ];then
+               cd ${D}
+               if [ "${baselib}" != "lib64" ]; then
+                   ln -sf ${baselib} lib64
+               fi
+               cd ${D}/${baselib}
+               ln -sf ld64.so.1 ld-lsb-ppc64.so.2
+               ln -sf ld64.so.1 ld-lsb-ppc64.so.3
+       fi
+       if [ "${TARGET_ARCH}" = "powerpc" ];then
+	       cd ${D}/${baselib}
+               ln -sf ld.so.1 ld-lsb-ppc32.so.2
+               ln -sf ld.so.1 ld-lsb-ppc32.so.3
+       fi
+}
+FILES_${PN} += "/lib64 \
+                /usr/lib/lsb \
+                ${base_libdir}/lsb/* \
+                /lib/lsb/* \
+               "
diff --git a/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch b/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
new file mode 100644
index 0000000..0809c9b
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Pending
+
+Subject: functions: avoid exit 1 which causes init scripts to fail
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ rc.d/init.d/functions | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
+index 6850046..11223f7 100644
+--- a/rc.d/init.d/functions
++++ b/rc.d/init.d/functions
+@@ -597,5 +597,5 @@ if [ "$_use_systemctl" = "1" ]; then
+ 	fi
+ fi
+ 
+-strstr "$(cat /proc/cmdline)" "rc.debug" && set -x
++strstr "$(cat /proc/cmdline)" "rc.debug" && set -x || true
+ 
+-- 
+2.1.0
+
diff --git a/meta/recipes-extended/lsb/lsbinitscripts/functions.patch b/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
new file mode 100644
index 0000000..a756d04
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbinitscripts/functions.patch
@@ -0,0 +1,26 @@
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: initscripts-9.43/rc.d/init.d/functions
+===================================================================
+--- initscripts-9.43.orig/rc.d/init.d/functions
++++ initscripts-9.43/rc.d/init.d/functions
+@@ -13,6 +13,7 @@ umask 022
+ PATH="/sbin:/usr/sbin:/bin:/usr/bin"
+ export PATH
+ 
++
+ if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \
+ 		( /bin/mountpoint -q /cgroup/systemd || /bin/mountpoint -q /sys/fs/cgroup/systemd ) ; then
+         case "$0" in
+@@ -54,7 +55,7 @@ systemctl_redirect () {
+ [ -z "${COLUMNS:-}" ] && COLUMNS=80
+ 
+ if [ -z "${CONSOLETYPE:-}" ]; then
+-  if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then
++  if [ -c "/dev/stderr" -a -r "/dev/stderr" -a -e /sbin/consoletype ]; then
+     CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
+   else
+     CONSOLETYPE="serial"
diff --git a/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb b/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
new file mode 100644
index 0000000..6db667c
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
@@ -0,0 +1,32 @@
+SUMMARY = "SysV init scripts which are only used in an LSB image"
+SECTION = "base"
+LICENSE = "GPLv2"
+DEPENDS = "popt glib-2.0"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
+
+S="${WORKDIR}/initscripts-${PV}"
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}.tar.bz2/9cce2ae1009750e84be37c09a028757e/initscripts-${PV}.tar.bz2 \
+           file://functions.patch \
+           file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \
+          " 
+
+SRC_URI[md5sum] = "9cce2ae1009750e84be37c09a028757e"
+SRC_URI[sha256sum] = "48b59ce8157cfc58bbd4b1dfa58ad1087245761ae11c2033b66ae3864ea7e1cf"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "functions"
+ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
+
+# Since we are only taking the patched version of functions, no need to
+# configure or compile anything so do not execute these
+do_configure[noexec] = "1" 
+do_compile[noexec] = "1" 
+
+do_install(){
+	install -d ${D}${sysconfdir}/init.d/
+	install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
+	sed -i 's,${base_bindir}/mountpoint,${bindir}/mountpoint,g' ${D}${sysconfdir}/init.d/functions
+}
diff --git a/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
new file mode 100644
index 0000000..b9971a1
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -0,0 +1,526 @@
+#!/bin/sh
+
+# Copyright (C) 2012 Wind River Systems, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+WORK_DIR="/opt/lsb-test"
+
+if [ `id -u` -ne 0 ]
+then
+	cat << EOF
+	In order to install and run LSB testsuite, you need administrator privileges.
+	You are currently running this script as an unprivileged user.
+
+EOF
+	exit 1
+fi
+
+ARCH=`uname -m`
+if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ] && [ ${ARCH} != "ppc64" ]
+then
+	echo "Error: Unsupported architecture"
+	exit 1
+fi
+
+which rpm
+if [ $? -ne 0 ]
+then
+	echo "No rpm command found"
+	exit 1
+fi
+
+RET=0
+
+cd ${WORK_DIR} || exit 1
+# Step 1: Download the LSB Packages
+echo ""
+echo "Download LSB packages..."
+echo ""
+
+if [ ! -e ./packages_list ]
+then
+	echo "Error: Could not find packages list" >&2
+	exit 1
+fi
+
+. ./packages_list
+
+PACKAGES_DIR="/var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb"
+
+BASE_PACKAGES_DIR="${PACKAGES_DIR}/base/${LSB_RELEASE}/binary"
+RUNTIME_BASE_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/released-all/binary/runtime"
+RUNTIME_PACKAGES_DIR="${PACKAGES_DIR}/test_suites/${LSB_RELEASE}/binary/runtime"
+APP_PACKAGES_DIR="${PACKAGES_DIR}/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
+APP_TESTFILES_DIR="${PACKAGES_DIR}/app-battery/tests"
+SNAPSHOTS_TESTFILES_DIR="${PACKAGES_DIR}/snapshots/appbat/tests"
+
+if [ ! -d ${PACKAGES_DIR} ]
+then
+	mkdir -p ${PACKAGES_DIR}
+fi
+
+if [ ! -d ${BASE_PACKAGES_DIR} ]
+then
+	mkdir -p ${BASE_PACKAGES_DIR}
+fi
+
+if [ ! -d ${RUNTIME_BASE_PACKAGES_DIR} ]
+then
+	mkdir -p ${RUNTIME_BASE_PACKAGES_DIR}
+fi
+
+if [ ! -d ${RUNTIME_PACKAGES_DIR} ]
+then
+	mkdir -p ${RUNTIME_PACKAGES_DIR}
+fi
+
+if [ ! -d ${APP_PACKAGES_DIR} ]
+then
+	mkdir -p ${APP_PACKAGES_DIR}
+fi
+
+if [ ! -d ${APP_TESTFILES_DIR} ]
+then
+	mkdir -p ${APP_TESTFILES_DIR}
+fi
+
+# Official download server list. You can replace them with your own server.
+SERVER_IPADDR="140.211.169.23"
+SERVER_NAME="ftp.linuxfoundation.org"
+
+if ! `grep -F -q "${SERVER_NAME}" /etc/hosts`; then
+	echo "${SERVER_IPADDR}	${SERVER_NAME}	${SERVER_NAME}" >> /etc/hosts
+fi
+
+#ping -c 5 ${SERVER_NAME}
+#if [ $? -ne 0 ]
+#then
+#	echo "The server: ${SERVER_NAME} is unreachable"
+#	exit 1
+#fi
+
+SERVER1="\
+	http://${SERVER_NAME}/pub/lsb/base/${LSB_RELEASE}/binary"
+SERVER2="\
+	http://${SERVER_NAME}/pub/lsb/test_suites/released-all/binary/runtime"
+SERVER3="\
+	http://${SERVER_NAME}/pub/lsb/test_suites/${LSB_RELEASE}/binary/runtime"
+SERVER4="\
+	http://${SERVER_NAME}/pub/lsb/app-battery/${LSB_RELEASE}/${LSB_ARCH}"
+SERVER5="\
+	http://${SERVER_NAME}/pub/lsb/app-battery/tests"
+
+# We using "curl" as a download tool, "wget" is an alternative.
+CURL=`which curl`
+WGET=`which wget`
+if [ ! -z ${CURL} ]
+then
+	DOWNLOAD_CMD="${CURL} -R -L -f --retry 3 --retry-delay 4 --connect-timeout 180 --compressed -C - -o"
+elif [ ! -z ${WGET} ]
+then
+	DOWNLOAD_CMD="${WGET} -c -t 5 -O"
+else
+	echo "Can not find a download tool, please install curl or wget."
+	exit 1
+fi
+
+cd ${BASE_PACKAGES_DIR}
+for pkg in ${BASE_PACKAGES_LIST}; do
+	if [ ! -f ${pkg} ]
+	then
+		#${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg} > /dev/null 2>&1
+		${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER1}/${pkg}
+		if [ $? -eq 0 ]
+		then
+			mv -f ${pkg}".#part" ${pkg}
+			echo "Download ${pkg} successfully."
+		else
+			echo "Download ${pkg} failed."
+			RET=1
+		fi
+	fi
+done
+
+cd ${RUNTIME_BASE_PACKAGES_DIR}
+for pkg in ${RUNTIME_BASE_PACKAGES_LIST}; do
+	if [ ! -f ${pkg} ]
+	then
+		#${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg} > /dev/null 2>&1
+		${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER2}/${pkg}
+		if [ $? -eq 0 ]
+		then
+			mv -f ${pkg}".#part" ${pkg}
+			echo "Download ${pkg} successfully."
+		else
+			echo "Download ${pkg} failed."
+			RET=1
+		fi
+	fi
+done
+
+cd ${RUNTIME_PACKAGES_DIR}
+for pkg in ${RUNTIME_PACKAGES_LIST}; do
+	if [ ! -f ${pkg} ]
+	then
+		#${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg} > /dev/null 2>&1
+		${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER3}/${pkg}
+		if [ $? -eq 0 ]
+		then
+			mv -f ${pkg}".#part" ${pkg}
+			echo "Download ${pkg} successfully."
+		else
+			echo "Download ${pkg} failed."
+			RET=1
+		fi
+	fi
+done
+
+cd ${APP_PACKAGES_DIR}
+for pkg in ${APP_PACKAGES_LIST}; do
+	if [ ! -f ${pkg} ]
+	then
+		#${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg} > /dev/null 2>&1
+		${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER4}/${pkg}
+		if [ $? -eq 0 ]
+		then
+			mv -f ${pkg}".#part" ${pkg}
+			echo "Download ${pkg} successfully."
+		else
+			echo "Download ${pkg} failed."
+			RET=1
+		fi
+	fi
+done
+
+cd ${APP_TESTFILES_DIR}
+for pkg in ${APP_TESTFILES_LIST}; do
+	if [ ! -f ${pkg} ]
+	then
+		#${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg} > /dev/null 2>&1
+		${DOWNLOAD_CMD} ${pkg}".#part" ${SERVER5}/${pkg}
+		if [ $? -eq 0 ]
+		then
+			mv -f ${pkg}".#part" ${pkg}
+			echo "Download ${pkg} successfully."
+		else
+			echo "Download ${pkg} failed."
+			RET=1
+		fi
+	fi
+done
+
+if [ ${RET} -ne 0 ]
+then
+	echo "Download some packages failed. Please download them again."
+	exit 1
+fi
+
+# Step 2: Install the LSB Packages
+echo ""
+echo "Install LSB packages..."
+echo ""
+
+# Kill lighttpd
+ps aux | grep "lighttpd" | grep -v -q "grep"
+if [ $? -eq 0 ]
+then
+	killall lighttpd >/dev/null 2>&1
+fi
+
+# Start avahi-daemon
+ps aux | grep "avahi-daemon" | grep -v -q "grep"
+if [ $? -ne 0 ]
+then
+	/etc/init.d/avahi-daemon start >/dev/null 2>&1
+fi
+
+LSB_START_CMD="/opt/lsb/test/manager/bin/dist-checker-start.pl"
+LSB_STOP_CMD="/opt/lsb/test/manager/bin/dist-checker-stop.pl"
+
+PLATFORM_FILE="/etc/rpm/platform"
+
+RPM_INSTALL_CMD="rpm --quiet --nodeps --replacepkgs --nosignature -i"
+RPM_INSTALL_CMD_NOSCRIPTS="rpm --quiet --nodeps --replacepkgs --noscripts --nosignature -i"
+
+# If the lsb has been started, stop it first.
+if [ -x ${LSB_STOP_CMD} ]
+then
+	${LSB_STOP_CMD}
+fi
+
+if [ ! -d /etc/rpm ]
+then
+	mkdir -p /etc/rpm
+fi
+
+if [ ! -f ${PLATFORM_FILE} ]
+then
+	touch ${PLATFORM_FILE}
+fi
+
+if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then
+	if [ ${ARCH} = i686 ];then
+		echo "i486-suse" >> ${PLATFORM_FILE}
+		echo "i486-noarch" >> ${PLATFORM_FILE}
+		echo "i486-pc" >> ${PLATFORM_FILE}
+		echo "noarch-suse" >> ${PLATFORM_FILE}
+	elif [ ${ARCH} = x86_64 ]; then
+		echo "i486-suse" >> ${PLATFORM_FILE}
+		echo "i486-noarch" >> ${PLATFORM_FILE}
+		echo "i486-pc" >> ${PLATFORM_FILE}
+		echo "i486-.*-linux.*" >> ${PLATFORM_FILE}
+		echo "noarch-suse" >> ${PLATFORM_FILE}
+		echo "${ARCH}-suse" >> ${PLATFORM_FILE}
+		echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
+		echo "${ARCH}-pc" >> ${PLATFORM_FILE}
+	else
+		echo "${ARCH}-suse" >> ${PLATFORM_FILE}
+		echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
+		echo "${ARCH}-pc" >> ${PLATFORM_FILE}
+		echo "noarch-suse" >> ${PLATFORM_FILE}
+	fi
+fi
+
+if [ -d ${BASE_PACKAGES_DIR} ]
+then
+	cd ${BASE_PACKAGES_DIR}
+	for pkg in ${BASE_PACKAGES_LIST}
+	do
+		rpm --quiet -q ${pkg%\.*}
+		if [ $? -ne 0 ]; then
+			$RPM_INSTALL_CMD ${pkg}
+		fi
+	done
+fi
+
+if [ -d ${RUNTIME_BASE_PACKAGES_DIR} ]
+then
+	cd ${RUNTIME_BASE_PACKAGES_DIR}
+	for pkg in ${RUNTIME_BASE_PACKAGES_LIST}
+	do
+		rpm --quiet -q ${pkg%\.*}
+		if [ $? -ne 0 ]; then
+			$RPM_INSTALL_CMD ${pkg}
+		fi
+	done
+fi
+
+if [ -d ${RUNTIME_PACKAGES_DIR} ]
+then
+	cd ${RUNTIME_PACKAGES_DIR}
+	for pkg in ${RUNTIME_PACKAGES_LIST}
+	do
+		rpm --quiet -q ${pkg%\.*}
+		if [ $? -ne 0 ]; then
+			$RPM_INSTALL_CMD ${pkg}
+		fi
+	done
+fi
+
+if [ -d ${APP_PACKAGES_DIR} ]
+then
+	cd ${APP_PACKAGES_DIR}
+	for pkg in ${APP_PACKAGES_LIST}
+	do
+		echo "${pkg}" | grep -q "apache\|xpdf"
+		if [ $? -eq 0 ]
+		then
+			rpm --quiet -q ${pkg%\.*}
+			if [ $? -ne 0 ]; then
+				$RPM_INSTALL_CMD_NOSCRIPTS ${pkg}
+			fi
+		else
+			rpm --quiet -q ${pkg%\.*}
+			if [ $? -ne 0 ]; then
+				$RPM_INSTALL_CMD ${pkg}
+			fi
+		fi
+	done
+fi
+
+if [ ! -d ${SNAPSHOTS_TESTFILES_DIR} ]
+then
+	mkdir -p ${SNAPSHOTS_TESTFILES_DIR}
+fi
+
+if [ -d ${APP_TESTFILES_DIR} ]
+then
+	cd ${APP_TESTFILES_DIR}
+	for pkg in ${APP_TESTFILES_LIST}
+	do
+		cp -f ${pkg} ${SNAPSHOTS_TESTFILES_DIR}
+	done
+fi
+
+cd ${WORK_DIR}
+
+# Step 3: Set environment
+echo ""
+echo "Set environment..."
+echo ""
+
+check ()
+{
+	if [ $? -eq 0 ]
+	then
+		echo "PASS"
+	else 
+		echo "FAIL"
+		exit 1
+	fi
+}
+
+echo ""
+echo "---------------------------------"
+echo "Create the Dirnames on target"
+
+if [ ! -d /etc/rpm/sysinfo ]
+then
+	mkdir -p /etc/rpm/sysinfo
+fi
+
+cat > /etc/rpm/sysinfo/Dirnames << EOF
+/etc/opt/lsb
+/home/tet/LSB.tools
+/opt/lsb-tet3-lite/lib/ksh
+/opt/lsb-tet3-lite/lib/perl
+/opt/lsb-tet3-lite/lib/posix_sh
+/opt/lsb-tet3-lite/lib/tet3
+/opt/lsb-tet3-lite/lib/xpg3sh
+/opt/lsb/appbat/lib/python2.4/site-packages/qm
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/external
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes
+/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web
+/opt/lsb/test/doc
+/opt/lsb/test/lib
+/opt/lsb/test/qm/diagnostics
+/opt/lsb/test/qm/doc
+/opt/lsb/test/qm/doc/test/html
+/opt/lsb/test/qm/doc/test/print
+/opt/lsb/test/qm/dtml
+/opt/lsb/test/qm/dtml/test
+/opt/lsb/test/qm/messages/test
+/opt/lsb/test/qm/tutorial/test/tdb
+/opt/lsb/test/qm/tutorial/test/tdb/QMTest
+/opt/lsb/test/qm/web
+/opt/lsb/test/qm/web/images
+/opt/lsb/test/qm/web/stylesheets
+/opt/lsb/test/qm/xml
+/opt/lsb/test/share
+/usr/share/doc/lsb-runtime-test
+/var/opt/lsb
+/opt/lsb/test/desktop
+/opt/lsb/test/desktop/fontconfig
+/opt/lsb/test/desktop/freetype
+/opt/lsb/test/desktop/gtkvts
+/opt/lsb/test/desktop/libpng
+/opt/lsb/test/desktop/qt3
+/opt/lsb/test/desktop/xft
+/opt/lsb/test/desktop/xml
+/opt/lsb/test/desktop/xrender
+
+
+EOF
+
+if [ -f /etc/rpm/sysinfo/Dirnames ]
+then
+	echo "Success to creat Dirnames file"
+else 
+	echo "Fail to creat Dirnames file"
+fi
+
+[ -x /sbin/ldconfig ] && {
+echo ""
+echo "---------------------------------"
+echo "Update cache"
+/sbin/ldconfig
+check;
+}
+
+# Check loop device
+if [ ! -b /dev/loop0 ]
+then
+	insmod /lib/modules/`uname -r`/kernel/drivers/block/loop.ko
+	if [ $? != 0 ];then
+		echo "Insmod loop.ko failed."
+	fi
+fi
+
+# Resolve localhost
+LOCALHOST=`hostname`
+if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then
+	echo "127.0.0.1	$LOCALHOST" >> /etc/hosts
+fi
+
+# Workaround to add part of locales for LSB test
+localedef -i de_DE -f ISO-8859-1 de_DE
+localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15
+localedef -i de_DE -f UTF-8 de_DE.UTF-8
+localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
+localedef -i en_HK -f ISO-8859-1 en_HK
+localedef -i en_PH -f ISO-8859-1 en_PH
+localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
+localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1
+localedef -i en_US -f ISO-8859-1 en_US
+localedef -i en_US -f UTF-8 en_US.UTF-8
+localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1
+localedef -i es_MX -f ISO-8859-1 es_MX
+localedef -i fr_FR -f ISO-8859-1 fr_FR
+localedef -i it_IT -f ISO-8859-1 it_IT
+localedef -i ja_JP -f EUC-JP ja_JP.eucjp
+localedef -i se_NO -f UTF-8 se_NO.UTF-8
+localedef -i ta_IN -f UTF-8 ta_IN
+localedef -i es_ES -f ISO-8859-1 es_ES
+localedef -i fr_FR@euro -f ISO-8859-1 fr_FR@euro
+localedef -i is_IS -f UTF-8 is_IS.UTF-8
+localedef -i zh_TW -f BIG5 zh_TW.BIG5
+localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
+
+echo ""
+echo "Installation done!"
+echo ""
+
+# Step 4: Start LSB test
+if [ -x ${LSB_START_CMD} ]
+then
+	${LSB_START_CMD}
+fi
+
+echo "---------------------------------"
+echo "Run all the certification version of LSB Tests"
+echo "---------------------------------"
+
+LSB_DIST_CHECKER="/opt/lsb/test/manager/utils/dist-checker.pl"
+SESSION="${WORK_DIR}/session"
+if [ ! -e ${SESSION} ]
+then
+	echo "Error: Could not find session file."
+	echo "You must run LSB test from webbrower."
+	exit 1
+fi
+
+if [ -x ${LSB_DIST_CHECKER} ]
+then
+	${LSB_DIST_CHECKER} -v2 -f ${SESSION}
+	check
+fi
+
+echo ""
+echo "LSB test complete. Please check the log file in /var/opt/lsb/test/manager/results/"
+echo ""
+
diff --git a/meta/recipes-extended/lsb/lsbtest/packages_list b/meta/recipes-extended/lsb/lsbtest/packages_list
new file mode 100644
index 0000000..27d8352
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/packages_list
@@ -0,0 +1,50 @@
+LSB_RELEASE="released-4.1.0"
+LSB_ARCH="lsbarch"
+
+BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm"
+
+RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-5.0.0.1-1.targetarch.rpm \
+	lsb-tet3-lite-3.7-27.lsb5.targetarch.rpm \
+	lsb-tet3-lite-devel-3.7-27.lsb5.targetarch.rpm \
+	lsb-xvfb-1.2.0-22.targetarch.rpm \
+	"
+
+RUNTIME_PACKAGES_LIST="lsb-cmdchk-4.1.4-5.targetarch.rpm \
+	lsb-libchk-4.1.4-5.targetarch.rpm \
+	lsb-qm-2.2-12.lsb4.targetarch.rpm \
+	lsb-task-dist-testkit-4.1.9-1.noarch.rpm \
+	lsb-test-core-4.1.15-1.targetarch.rpm \
+	lsb-test-cpp-t2c-4.1.0-1.targetarch.rpm \
+	lsb-test-desktop-4.1.9-1.targetarch.rpm \
+	lsb-test-desktop-t2c-4.1.3-3.targetarch.rpm \
+	lsb-test-libstdcpp-4.1.0-18.lsb4.targetarch.rpm \
+	lsb-test-olver-core-4.1.4-1.targetarch.rpm \
+	lsb-test-perl-4.1.8-1.noarch.rpm \
+	lsb-test-printing-4.1.2-1.targetarch.rpm \
+	lsb-test-python-4.1.5-1.targetarch.rpm \
+	lsb-test-qt3-azov-4.1.1-3.targetarch.rpm \
+	lsb-test-qt4-azov-4.1.3-1.targetarch.rpm \
+	lsb-test-xts5-5.1.5-45.lsb4.targetarch.rpm \
+	lsb-test-alsa-t2c-4.1.0-1.targetarch.rpm \
+	lsb-test-core-t2c-4.1.2-3.targetarch.rpm \
+	lsb-test-xml2-azov-4.1.0-1.targetarch.rpm \
+	"
+
+APP_PACKAGES_LIST="lsb-python-2.4.6-7.lsb4.targetarch.rpm \
+	lsb-apache-2.2.14-8.lsb4.targetarch.rpm \
+	lsb-tcl-8.5.7-8.lsb4.targetarch.rpm \
+	lsb-expect-5.43.0-13.lsb4.targetarch.rpm \
+	lsb-groff-1.20.1-7.lsb4.targetarch.rpm \
+	lsb-raptor-1.4.19-5.lsb4.targetarch.rpm \
+	lsb-xpdf-1.01-14.lsb4.targetarch.rpm \
+	lsb-samba-3.4.3-9.lsb4.targetarch.rpm \
+	lsb-rsync-3.0.6-6.lsb4.targetarch.rpm \
+	"
+
+APP_TESTFILES_LIST="expect-tests.tar \
+	tcl-tests.tar \
+	raptor-tests.tar \
+	test1.pdf \
+	test2.pdf \
+	"
+
diff --git a/meta/recipes-extended/lsb/lsbtest/session b/meta/recipes-extended/lsb/lsbtest/session
new file mode 100644
index 0000000..85ca2ef
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest/session
@@ -0,0 +1,194 @@
+[GENERAL]
+VERBOSE_LEVEL:   1
+ARCHITECTURE:    targetarch
+USE_INTERNET:    1
+STD_VERSION:     LSB 4.1
+STD_PROFILE:     no
+[cmdchk]
+RUN: 1
+VERSION: local|*
+
+[libchk]
+RUN: 1
+VERSION: local|*
+
+[alsa-t2c]
+RUN: 1
+VERSION: local|*
+
+[alsa-t2c|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/alsa-t2c
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/alsa-t2c/results
+
+[core]
+RUN: 1
+VERSION: local|*
+
+[core|local|*]
+AUTOREPLY_PROVIDES_BASH: n
+AUTOREPLY_TESTRUN_PATH: /home/tet/test_sets
+AUTOREPLY_PERSON: Automated
+AUTOREPLY_KERNEL_NAME: vmlinuz
+AUTOREPLY_INSTALL_LSBPAM_CONF: y
+AUTOREPLY_PROVIDES_C_SHELL: n
+AUTOREPLY_ORGANISATION: N/A
+AUTOREPLY_SET_PASS_MIN_DAYS: y
+AUTOREPLY_PROVIDES_SYSV_INIT: 
+AUTOREPLY_ISNTALL_DEVS: y
+AUTOREPLY_SUPPORTS_FILE_CMD: y
+AUTOREPLY_TEST_SYSTEM: Distribution Checker
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core/tet/test_sets
+AUTOREPLY_SUPPORTS_NLS: n
+AUTOREPLY_SUPPORTS_PROCESS_ACCOUNTING: n
+AUTOREPLY_PATH_TO_RC.D: 
+AUTOREPLY_ALLOWS_MAKEDEV: n
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core/tet/test_sets/results
+
+[core-t2c]
+RUN: 1
+VERSION: local|*
+
+[core-t2c|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/core-t2c
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/core-t2c/results
+
+[cpp-t2c]
+RUN: 1
+VERSION: local|*
+
+[cpp-t2c|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/cpp-t2c
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/cpp-t2c/results
+
+[desktop]
+RUN: 1
+VERSION: local|*
+
+[desktop|local|*]
+AUTOREPLY_DESKTOP_ENVIRONMENT: [default]
+AUTOREPLY_PERSON: Automated
+AUTOREPLY_X_CLIENT_HOSTNAME: 
+AUTOREPLY_TEST_SYSTEM: Distribution Checker
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop
+AUTOREPLY_X11_FONT_PATH: [default]
+AUTOREPLY_SHOW_SUMMARY_REPORT: 
+AUTOREPLY_ORGANISATION: N/A
+AUTOREPLY_XVFB_DISPLAY: [default]
+
+[desktop-t2c]
+RUN: 1
+VERSION: local|*
+
+[desktop-t2c|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/desktop-t2c
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/desktop-t2c/results
+
+[libstdcpp]
+RUN: 1
+VERSION: local|*
+
+[libstdcpp|local|*]
+AUTOREPLY_TEST_SYSTEM: Distribution Checker
+AUTOREPLY_PERSON: Automated
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/libstdcpp_4.1.0
+AUTOREPLY_ORGANISATION: N/A
+AUTOREPLY_GNU_TRIPLET: 
+
+[olver]
+RUN: 1
+VERSION: local|*
+
+[olver|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/olver-core
+AUTOREPLY_RESULTS_DIR: /var/opt/lsb/test/olver-core
+
+[perl]
+RUN: 1
+VERSION: local|*
+
+[perl|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/perl
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/perl/results
+
+[printing]
+RUN: 1
+VERSION: local|*
+
+[printing|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/printing
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/printing/results
+
+[python]
+RUN: 1
+VERSION: local|*
+
+[python|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results
+
+[qt3-azov]
+RUN: 1
+VERSION: local|*
+
+[qt3-azov|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt3-azov
+AUTOREPLY_X11_FONT_PATH: [default]
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt3-azov/results
+
+[qt4-azov]
+RUN: 1
+VERSION: local|*
+
+[qt4-azov|local|*]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt4-azov
+AUTOREPLY_X11_FONT_PATH: [default]
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt4-azov/results
+
+[xml2-azov]
+RUN: 1
+VERSION: local|*
+
+[xts5]
+RUN: 1
+VERSION: local|*
+
+[xts5|local|*]
+AUTOREPLY_XT_FONTPATH_GOOD: [default]
+AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/xts5
+AUTOREPLY_XVFB_DISPLAY: [default]
+AUTOREPLY_RESULTS_DIR: /opt/lsb/test/xts5/xts5/results
+AUTOREPLY_XT_FONTPATH: [default]
+AUTOREPLY_X_CLIENT_HOSTNAME: 
+
+[apache]
+RUN: 1
+VERSION: local|*
+
+[expect]
+RUN: 1
+VERSION: local|*
+
+[groff]
+RUN: 1
+VERSION: local|*
+
+[raptor]
+RUN: 1
+VERSION: local|*
+
+[rsync]
+RUN: 1
+VERSION: local|*
+
+[samba]
+RUN: 1
+VERSION: local|*
+
+[tcl]
+RUN: 1
+VERSION: local|*
+
+[xpdf]
+RUN: 1
+VERSION: local|*
+
diff --git a/meta/recipes-extended/lsb/lsbtest_1.0.bb b/meta/recipes-extended/lsb/lsbtest_1.0.bb
new file mode 100644
index 0000000..ea12502
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbtest_1.0.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Automates Linux Standard Base (LSB) tests"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+PR = "r3"
+
+LIC_FILES_CHKSUM = "file://LSB_Test.sh;beginline=3;endline=16;md5=7063bb54b04719df0716b513447f4fc0"
+
+SRC_URI = "file://LSB_Test.sh \
+		   file://packages_list \
+		   file://session \
+		   "
+RDEPENDS_${PN} = "rpm"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 ${S}/LSB_Test.sh ${D}${bindir}
+	install -d  ${D}/opt/lsb-test
+	install -m 0644 ${S}/packages_list ${D}/opt/lsb-test/packages_list
+	install -m 0644 ${S}/session ${D}/opt/lsb-test/session
+	if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
+		sed -i -e 's/lsbarch/ia32/g' -e 's/targetarch/i486/g' ${D}/opt/lsb-test/packages_list
+		sed -i -e 's/targetarch/x86/g' ${D}/opt/lsb-test/session
+	fi
+	if [ "${TARGET_ARCH}" = "x86_64" ];then
+		sed -i -e 's/lsbarch/amd64/g' -e 's/targetarch/x86_64/g' ${D}/opt/lsb-test/packages_list
+		sed -i -e 's/targetarch/x86-64/g' ${D}/opt/lsb-test/session
+	fi
+	if [ "${TARGET_ARCH}" = "powerpc" ];then
+		sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
+		sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
+	fi
+
+	# For a ppc64 target. the default userspace is 32b.
+	# Therefore, only change the lsbarch and targetarch
+	# in the package_list when MLIB=lib64 is being used.
+	# Otherwise, by default, the ppc32 LSB packages
+	# will be downloaded by LSB_Test.sh
+	if [ "${TARGET_ARCH}" = "powerpc64" ];then
+		if [ "${PN}" != "${BPN}" ];then
+			sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list
+			sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session
+		fi
+	fi
+}
+
+FILES_${PN} += "/opt/lsb-test/* \
+               "
diff --git a/meta/recipes-extended/lsof/lsof_4.89.bb b/meta/recipes-extended/lsof/lsof_4.89.bb
new file mode 100644
index 0000000..9b7de9a
--- /dev/null
+++ b/meta/recipes-extended/lsof/lsof_4.89.bb
@@ -0,0 +1,57 @@
+SUMMARY = "LiSt Open Files tool"
+DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
+Its name stands for LiSt Open Files, and it does just that."
+SECTION = "devel"
+LICENSE = "BSD"
+
+SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "1b9cd34f3fb86856a125abbf2be3a386"
+SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718"
+
+LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
+S = "${WORKDIR}/lsof_${PV}_src"
+
+LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
+
+python do_unpack () {
+    # temporarily change S for unpack
+    # of lsof_${PV}
+    s = d.getVar('S', False)
+    d.setVar('S', '${WORKDIR}/lsof_${PV}')
+    bb.build.exec_func('base_do_unpack', d)
+    # temporarily change SRC_URI for unpack
+    # of lsof_${PV}_src
+    src_uri = d.getVar('SRC_URI', False)
+    d.setVar('SRC_URI', '${LOCALSRC}')
+    d.setVar('S', s)
+    bb.build.exec_func('base_do_unpack', d)
+    d.setVar('SRC_URI', src_uri)
+}
+
+export LSOF_INCLUDE = "${STAGING_INCDIR}"
+
+do_configure () {
+	export LSOF_AR="${AR} cr"
+	export LSOF_RANLIB="${RANLIB}"
+        if [ "x${GLIBCVERSION}" != "x" ];then
+                LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
+                LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
+                export LINUX_CLIB
+        fi
+	yes | ./Configure linux
+}
+
+export I = "${STAGING_INCDIR}"
+export L = "${STAGING_INCDIR}"
+export EXTRA_OEMAKE = ""
+
+do_compile () {
+	oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
+}
+
+do_install () {
+	install -d ${D}${sbindir} ${D}${mandir}/man8
+	install -m 4755 lsof ${D}${sbindir}/lsof
+	install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
+}
diff --git a/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
new file mode 100644
index 0000000..1b4d232
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
@@ -0,0 +1,202 @@
+From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Sat, 7 Dec 2013 18:24:32 +0100
+Subject: [PATCH] Rename runtests_noltp.sh script so have unique name
+
+* they are installed in the same target path
+  /opt/ltp/testcases/bin/runtests_noltp.sh
+  and overwrite each other in non-deterministic way
+  when multiple processes are used in "make install"
+
+  ./temp/log.do_install:install -m 00775
+    "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh"
+    "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
+  ./temp/log.do_install:install -m 00775
+    "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh"
+    "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ .../kernel/containers/sysvipc/runipctests_noltp.sh | 31 ++++++++++++++++
+ .../kernel/containers/sysvipc/runtests_noltp.sh    | 31 ----------------
+ .../kernel/containers/utsname/runtests_noltp.sh    | 41 ----------------------
+ .../kernel/containers/utsname/runutstests_noltp.sh | 41 ++++++++++++++++++++++
+ 4 files changed, 72 insertions(+), 72 deletions(-)
+ create mode 100644 testcases/kernel/containers/sysvipc/runipctests_noltp.sh
+ delete mode 100644 testcases/kernel/containers/sysvipc/runtests_noltp.sh
+ delete mode 100755 testcases/kernel/containers/utsname/runtests_noltp.sh
+ create mode 100755 testcases/kernel/containers/utsname/runutstests_noltp.sh
+
+diff --git a/testcases/kernel/containers/sysvipc/runipctests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
+new file mode 100644
+index 0000000..84f398f
+--- /dev/null
++++ b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
+@@ -0,0 +1,31 @@
++#!/bin/sh
++################################################################################
++##                                                                            ##
++## Copyright (c) International Business Machines  Corp., 2007                 ##
++##                                                                            ##
++## This program is free software;  you can redistribute it and#or modify      ##
++## it under the terms of the GNU General Public License as published by       ##
++## the Free Software Foundation; either version 2 of the License, or          ##
++## (at your option) any later version.                                        ##
++##                                                                            ##
++## This program is distributed in the hope that it will be useful, but        ##
++## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
++## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
++## for more details.                                                          ##
++##                                                                            ##
++## You should have received a copy of the GNU General Public License          ##
++## along with this program;  if not, write to the Free Software               ##
++## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
++##                                                                            ##
++################################################################################
++
++exit_code=0
++echo "sysvipc tests"
++for type in none clone unshare; do
++      echo "**sysvipc $type"
++      ./shmnstest_noltp $type
++      if [ $? -ne 0 ]; then
++              exit_code=$?
++      fi
++done
++exit $exit_code
+diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runtests_noltp.sh
+deleted file mode 100644
+index 84f398f..0000000
+--- a/testcases/kernel/containers/sysvipc/runtests_noltp.sh
++++ /dev/null
+@@ -1,31 +0,0 @@
+-#!/bin/sh
+-################################################################################
+-##                                                                            ##
+-## Copyright (c) International Business Machines  Corp., 2007                 ##
+-##                                                                            ##
+-## This program is free software;  you can redistribute it and#or modify      ##
+-## it under the terms of the GNU General Public License as published by       ##
+-## the Free Software Foundation; either version 2 of the License, or          ##
+-## (at your option) any later version.                                        ##
+-##                                                                            ##
+-## This program is distributed in the hope that it will be useful, but        ##
+-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
+-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
+-## for more details.                                                          ##
+-##                                                                            ##
+-## You should have received a copy of the GNU General Public License          ##
+-## along with this program;  if not, write to the Free Software               ##
+-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
+-##                                                                            ##
+-################################################################################
+-
+-exit_code=0
+-echo "sysvipc tests"
+-for type in none clone unshare; do
+-      echo "**sysvipc $type"
+-      ./shmnstest_noltp $type
+-      if [ $? -ne 0 ]; then
+-              exit_code=$?
+-      fi
+-done
+-exit $exit_code
+diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runtests_noltp.sh
+deleted file mode 100755
+index 43cb7e2..0000000
+--- a/testcases/kernel/containers/utsname/runtests_noltp.sh
++++ /dev/null
+@@ -1,41 +0,0 @@
+-#!/bin/sh
+-################################################################################
+-##                                                                            ##
+-## Copyright (c) International Business Machines  Corp., 2007                 ##
+-##                                                                            ##
+-## This program is free software;  you can redistribute it and#or modify      ##
+-## it under the terms of the GNU General Public License as published by       ##
+-## the Free Software Foundation; either version 2 of the License, or          ##
+-## (at your option) any later version.                                        ##
+-##                                                                            ##
+-## This program is distributed in the hope that it will be useful, but        ##
+-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
+-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
+-## for more details.                                                          ##
+-##                                                                            ##
+-## You should have received a copy of the GNU General Public License          ##
+-## along with this program;  if not, write to the Free Software               ##
+-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
+-##                                                                            ##
+-################################################################################
+-
+-oldhostname=`hostname`
+-exit_code=0
+-echo "unshare tests"
+-for i in `seq 1 5`; do
+-	echo "test $i (unshare)"
+-	./utstest_noltp unshare $i
+-	if [ $? -ne 0 ]; then
+-		exit_code=$?
+-	fi
+-done
+-echo "clone tests"
+-for i in `seq 1 5`; do
+-	echo "test $i (clone)"
+-	./utstest_noltp clone $i
+-	if [ $? -ne 0 ]; then
+-		exit_code=$?
+-	fi
+-done
+-hostname "$oldhostname"
+-exit $exit_code
+diff --git a/testcases/kernel/containers/utsname/runutstests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh
+new file mode 100755
+index 0000000..43cb7e2
+--- /dev/null
++++ b/testcases/kernel/containers/utsname/runutstests_noltp.sh
+@@ -0,0 +1,41 @@
++#!/bin/sh
++################################################################################
++##                                                                            ##
++## Copyright (c) International Business Machines  Corp., 2007                 ##
++##                                                                            ##
++## This program is free software;  you can redistribute it and#or modify      ##
++## it under the terms of the GNU General Public License as published by       ##
++## the Free Software Foundation; either version 2 of the License, or          ##
++## (at your option) any later version.                                        ##
++##                                                                            ##
++## This program is distributed in the hope that it will be useful, but        ##
++## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
++## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
++## for more details.                                                          ##
++##                                                                            ##
++## You should have received a copy of the GNU General Public License          ##
++## along with this program;  if not, write to the Free Software               ##
++## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
++##                                                                            ##
++################################################################################
++
++oldhostname=`hostname`
++exit_code=0
++echo "unshare tests"
++for i in `seq 1 5`; do
++	echo "test $i (unshare)"
++	./utstest_noltp unshare $i
++	if [ $? -ne 0 ]; then
++		exit_code=$?
++	fi
++done
++echo "clone tests"
++for i in `seq 1 5`; do
++	echo "test $i (clone)"
++	./utstest_noltp clone $i
++	if [ $? -ne 0 ]; then
++		exit_code=$?
++	fi
++done
++hostname "$oldhostname"
++exit $exit_code
+-- 
+1.8.4.3
+
diff --git a/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch b/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch
new file mode 100644
index 0000000..905eafb
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch
@@ -0,0 +1,34 @@
+From 243881d71d2d49027c3dc15fe27ebe7f4ee68700 Mon Sep 17 00:00:00 2001
+From: Chuang Dong <Chuang.Dong@windriver.com>
+Date: Wed, 10 Jun 2015 09:51:09 +0800
+Subject: [PATCH] ltp: vma03 fix the alginment of page size
+
+the offset the param of mmap2() doesn't align the page size, but,
+this param allow must be a multiple of the page size as returned
+by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a
+multiple of the system page size, so modify the input param of offset
+pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
+
+Upstream-Status: Submitted
+
+Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com>
+---
+ testcases/kernel/mem/vma/vma03.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
+index 6af9960..b86d7ce 100644
+--- a/testcases/kernel/mem/vma/vma03.c
++++ b/testcases/kernel/mem/vma/vma03.c
+@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
+ 		if (fd == -1)
+ 			tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
+ 
+-		pgoff = ULONG_MAX - 1;
++		pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
+ 		map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+ 			    fd, pgoff);
+ 		if (map == MAP_FAILED)
+-- 
+1.8.5.2.233.g932f7e4
+
diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
new file mode 100644
index 0000000..064f00a
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
@@ -0,0 +1,39 @@
+[PATCH] add knob to control whether numa support should be checked
+
+Upstream-Status: Pending
+
+otherwise the random dependency will be generated
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ configure.ac                                       |   10 +-
+diff --git a/configure.ac b/configure.ac
+index 9f397e7..1357256 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -142,6 +142,12 @@ else
+     AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
+ fi
+ 
++AC_ARG_WITH([numa],
++  AC_HELP_STRING([--without-numa],
++    [without the numa support]),
++  [],[with_numa=yes],
++)
++
+ AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
+ 
+ # END testsuites knobs
+@@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL
+ LTP_CHECK_SYSCALL_EVENTFD
+ LTP_CHECK_SYSCALL_KEYCTL
+ LTP_CHECK_SYSCALL_MODIFY_LDT
++if test "x$with_numa" = xyes; then
+ LTP_CHECK_SYSCALL_NUMA
++fi
+ LTP_CHECK_SYSCALL_QUOTACTL
+ LTP_CHECK_SYSCALL_SIGNALFD
+ LTP_CHECK_SYSCALL_UNSHARE
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch b/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
new file mode 100644
index 0000000..36ff4c7
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
@@ -0,0 +1,37 @@
+[PATCH] add knob to control whether tirpc support should be checked
+
+Upstream-Status: Pending
+
+tirpc support is broken upstream. in the meantime, allow to disable tirpc.
+
+Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
+---
+ configure.ac |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,6 +98,13 @@ if test "x$with_python" = xyes; then
+ else
+     AC_SUBST([WITH_PYTHON],["no"])
+ fi
++
++# TI RPC
++AC_ARG_WITH([tirpc],
++  AC_HELP_STRING([--without-tirpc],
++    [without libtirpc support]),
++  [],[with_tirpc=yes],
++)
+ # END tools knobs
+ 
+ # Testsuites knobs
+@@ -182,7 +189,9 @@ LTP_CHECK_RENAMEAT
+ LTP_CHECK_FALLOCATE
+ LTP_CHECK_SYSCALL_FCNTL
+ LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
++if test "x$with_tirpc" = xyes; then
+ LTP_CHECK_TIRPC
++fi
+ LTP_CHECK_TEE
+ LTP_CHECK_SPLICE
+ LTP_CHECK_VMSPLICE
diff --git a/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
new file mode 100644
index 0000000..20fd4c3
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
@@ -0,0 +1,31 @@
+From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001
+From: Chong Lu <Chong.Lu@windriver.com>
+Date: Tue, 11 Mar 2014 14:47:22 +0800
+Subject: [PATCH] ltp: Don't link against libfl
+
+We have already defined yywrap function in scan.l file. After this, we no longer need to
+link against libfl and so no longer get errors about undefined references to yylex.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ pan/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pan/Makefile b/pan/Makefile
+index 4cc6466..a4b575b 100644
+--- a/pan/Makefile
++++ b/pan/Makefile
+@@ -31,7 +31,7 @@ CPPFLAGS		+= -Wno-error
+ 
+ CPPFLAGS		+= -I$(abs_srcdir)
+ 
+-LDLIBS			+= -lm $(LEXLIB)
++LDLIBS			+= -lm
+ 
+ LFLAGS			+= -l
+ 
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
new file mode 100644
index 0000000..4836010
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
@@ -0,0 +1,61 @@
+[PATCH] make setregid02 work
+
+Upstream-Status: Inappropriate [configuration]
+
+there is no "nobody" group in oe-core, the user "nobody" belongs to
+"nogroup" group, so replace nobody with nogroup to make the test pass
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
+index 8058627..866bee4 100644
+--- a/testcases/kernel/syscalls/setregid/setregid02.c
++++ b/testcases/kernel/syscalls/setregid/setregid02.c
+@@ -41,7 +41,7 @@ static gid_t neg_one = -1;
+ 
+ static struct passwd *ltpuser;
+ 
+-static struct group nobody, root, bin;
++static struct group nogroup, root, bin;
+ 
+ /*
+  * The following structure contains all test data.  Each structure in the array
+@@ -57,17 +57,17 @@ struct test_data_t {
+ 	char *test_msg;
+ } test_data[] = {
+ 	{
+-	&neg_one, &root.gr_gid, EPERM, &nobody, &nobody,
++	&neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(-1, root),"}, {
+-	&neg_one, &bin.gr_gid, EPERM, &nobody, &nobody,
++	&neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(-1, bin)"}, {
+-	&root.gr_gid, &neg_one, EPERM, &nobody, &nobody,
++	&root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(root,-1),"}, {
+-	&bin.gr_gid, &neg_one, EPERM, &nobody, &nobody,
++	&bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(bin, -1),"}, {
+-	&root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody,
++	&root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(root, bin)"}, {
+-	&bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody,
++	&bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup,
+ 		    "After setregid(bin, root),"}
+ };
+ 
+@@ -165,7 +165,7 @@ static void setup(void)
+ } while (0)
+ 
+ 	GET_GID(root);
+-	GET_GID(nobody);
++	GET_GID(nogroup);
+ 	GET_GID(bin);
+ 
+ 	TEST_PAUSE;
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/ltp/ltp_20150420.bb b/meta/recipes-extended/ltp/ltp_20150420.bb
new file mode 100644
index 0000000..108ebf1
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp_20150420.bb
@@ -0,0 +1,86 @@
+SUMMARY = "Linux Test Project"
+DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
+HOMEPAGE = "http://ltp.sourceforge.net"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
+LIC_FILES_CHKSUM = "\
+    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+    file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
+    file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+    file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+    file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \
+    file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+    file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
+    file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
+    file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \
+    file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+    file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+    file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
+"
+
+DEPENDS = "attr libaio libcap acl openssl zip-native"
+SRCREV = "77d0b7fd0148ce657c5a25060667e978c07662a0"
+
+SRC_URI = "git://github.com/linux-test-project/ltp.git \
+    file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
+    file://ltp-Do-not-link-against-libfl.patch \
+    file://make-setregid02-work.patch \
+    file://add-knob-for-numa.patch \
+    file://add-knob-for-tirpc.patch \
+    file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+export prefix = "/opt/ltp"
+export exec_prefix = "/opt/ltp"
+
+PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
+EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
+# ltp network/rpc test cases ftbfs when libtirpc is found
+EXTRA_OECONF += " --without-tirpc "
+
+# The makefiles make excessive use of make -C and several include testcases.mk
+# which triggers a build of the syscall header. To reproduce, build ltp,
+# then delete the header, then "make -j XX" and watch regen.sh run multiple
+# times. Its easier to generate this once here instead.
+do_compile_prepend () {
+	( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h )
+}
+
+do_install(){
+    install -d ${D}/opt/ltp/
+    oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
+
+    # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
+    cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
+}
+
+RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect"
+
+FILES_${PN}-dbg += "\
+    /opt/ltp/runtest/.debug \
+    /opt/ltp/testcases/*/.debug \
+    /opt/ltp/testcases/*/*/.debug \
+    /opt/ltp/testcases/*/*/*/.debug \
+    /opt/ltp/scenario_groups/.debug \
+    /opt/ltp/testscripts/.debug \
+    /opt/ltp/testscripts/open_posix_testsuite/.debug \
+"
+
+FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
+
+FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*"
+
+# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+# However, test_arch_stripped is already stripped, so...
+INSANE_SKIP_${PN} += "already-stripped"
+
diff --git a/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch b/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch
new file mode 100644
index 0000000..77da333
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch
@@ -0,0 +1,59 @@
+From: Luk Claes <luk@debian.org>
+Date: Sat, 4 Jul 2009 10:54:53 +0200
+Subject: Don't reuse weak symbol optopt to fix FTBFS on mips*
+
+This patch is taken from 
+ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+---
+ getopt.c |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/getopt.c b/getopt.c
+index 83ce628..82e983c 100644
+--- a/getopt.c
++++ b/getopt.c
+@@ -43,7 +43,7 @@ typedef	int	ssize_t;
+ char	*optarg;
+ int	optind = 1;
+ int	opterr = 1;
+-int	optopt;
++int	optoptc;
+ 
+ static void
+ error(const char *s, int c)
+@@ -69,7 +69,7 @@ error(const char *s, int c)
+ 		*bp++ = *s++;
+ 	while (*msg)
+ 		*bp++ = *msg++;
+-	*bp++ = optopt;
++	*bp++ = optoptc;
+ 	*bp++ = '\n';
+ 	write(2, buf, bp - buf);
+ 	ac_free(buf);
+@@ -101,13 +101,13 @@ getopt(int argc, char *const argv[], const char *optstring)
+ 		}
+ 		curp = &argv[optind][1];
+ 	}
+-	optopt = curp[0] & 0377;
++	optoptc = curp[0] & 0377;
+ 	while (optstring[0]) {
+ 		if (optstring[0] == ':') {
+ 			optstring++;
+ 			continue;
+ 		}
+-		if ((optstring[0] & 0377) == optopt) {
++		if ((optstring[0] & 0377) == optoptc) {
+ 			if (optstring[1] == ':') {
+ 				if (curp[1] != '\0') {
+ 					optarg = (char *)&curp[1];
+@@ -127,7 +127,7 @@ getopt(int argc, char *const argv[], const char *optstring)
+ 					optind++;
+ 				optarg = 0;
+ 			}
+-			return optopt;
++			return optoptc;
+ 		}
+ 		optstring++;
+ 	}
diff --git a/meta/recipes-extended/mailx/files/0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch b/meta/recipes-extended/mailx/files/0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch
new file mode 100644
index 0000000..6bad433
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch
@@ -0,0 +1,41 @@
+From: Hilko Bengen <bengen@debian.org>
+Date: Wed, 27 Apr 2011 00:18:42 +0200
+Subject: Patched out SSL2 support since it is no longer supported by OpenSSL.
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+---
+ mailx.1   |    2 +-
+ openssl.c |    4 +---
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/mailx.1 b/mailx.1
+index 417ea04..a02e430 100644
+--- a/mailx.1
++++ b/mailx.1
+@@ -3575,7 +3575,7 @@ Only applicable if SSL/TLS support is built using OpenSSL.
+ .TP
+ .B ssl-method
+ Selects a SSL/TLS protocol version;
+-valid values are `ssl2', `ssl3', and `tls1'.
++valid values are `ssl3', and `tls1'.
+ If unset, the method is selected automatically,
+ if possible.
+ .TP
+diff --git a/openssl.c b/openssl.c
+index b4e33fc..44fe4e5 100644
+--- a/openssl.c
++++ b/openssl.c
+@@ -216,9 +216,7 @@ ssl_select_method(const char *uhp)
+ 
+ 	cp = ssl_method_string(uhp);
+ 	if (cp != NULL) {
+-		if (equal(cp, "ssl2"))
+-			method = SSLv2_client_method();
+-		else if (equal(cp, "ssl3"))
++		if (equal(cp, "ssl3"))
+ 			method = SSLv3_client_method();
+ 		else if (equal(cp, "tls1"))
+ 			method = TLSv1_client_method();
diff --git a/meta/recipes-extended/mailx/files/0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch b/meta/recipes-extended/mailx/files/0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch
new file mode 100644
index 0000000..13b73ae
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch
@@ -0,0 +1,25 @@
+From: Hilko Bengen <bengen@debian.org>
+Date: Sat, 14 Apr 2012 20:22:43 +0200
+Subject: Fixed Lintian warning (warning: macro `N' not defined)
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+---
+ mailx.1 |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mailx.1 b/mailx.1
+index a02e430..b0723bd 100644
+--- a/mailx.1
++++ b/mailx.1
+@@ -3781,7 +3781,7 @@ you could examine the first message by giving the command:
+ .sp
+ .fi
+ which might cause
+-.N mailx
++.I mailx
+ to respond with, for example:
+ .nf
+ .sp
diff --git a/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch b/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
new file mode 100644
index 0000000..5d61645
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
@@ -0,0 +1,70 @@
+From 9984ae5cb0ea0d61df1612b06952a61323c083d9 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 17 Nov 2014 11:13:38 +0100
+Subject: [PATCH 1/4] outof: Introduce expandaddr flag
+
+Document that address expansion is disabled unless the expandaddr
+binary option is set.
+
+This has been assigned CVE-2014-7844 for BSD mailx, but it is not
+a vulnerability in Heirloom mailx because this feature was documented.
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+---
+ mailx.1 | 14 ++++++++++++++
+ names.c |  3 +++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/mailx.1 b/mailx.1
+index 70a7859..22a171b 100644
+--- a/mailx.1
++++ b/mailx.1
+@@ -656,6 +656,14 @@ but any reply returned to the machine
+ will have the system wide alias expanded
+ as all mail goes through sendmail.
+ .SS "Recipient address specifications"
++If the
++.I expandaddr
++option is not set (the default), recipient addresses must be names of
++local mailboxes or Internet mail addresses.
++.PP
++If the
++.I expandaddr
++option is set, the following rules apply:
+ When an address is used to name a recipient
+ (in any of To, Cc, or Bcc),
+ names of local mail folders
+@@ -2391,6 +2399,12 @@ and exits immediately.
+ If this option is set,
+ \fImailx\fR starts even with an empty mailbox.
+ .TP
++.B expandaddr
++Causes
++.I mailx
++to expand message recipient addresses, as explained in the section,
++Recipient address specifications.
++.TP
+ .B flipr
+ Exchanges the
+ .I Respond
+diff --git a/names.c b/names.c
+index 66e976b..c69560f 100644
+--- a/names.c
++++ b/names.c
+@@ -268,6 +268,9 @@ outof(struct name *names, FILE *fo, struct header *hp)
+ 	FILE *fout, *fin;
+ 	int ispipe;
+ 
++	if (value("expandaddr") == NULL)
++		return names;
++
+ 	top = names;
+ 	np = names;
+ 	time(&now);
+-- 
+1.9.3
+
+
diff --git a/meta/recipes-extended/mailx/files/0012-unpack-Disable-option-processing-for-email-addresses.patch b/meta/recipes-extended/mailx/files/0012-unpack-Disable-option-processing-for-email-addresses.patch
new file mode 100644
index 0000000..8cdbfd8
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/0012-unpack-Disable-option-processing-for-email-addresses.patch
@@ -0,0 +1,79 @@
+From e34e2ac67b80497080ebecccec40c3b61456167d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 17 Nov 2014 11:14:06 +0100
+Subject: [PATCH 2/4] unpack: Disable option processing for email addresses
+ when calling sendmail
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+---
+ extern.h  | 2 +-
+ names.c   | 8 ++++++--
+ sendout.c | 2 +-
+ 3 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/extern.h b/extern.h
+index 6b85ba0..8873fe8 100644
+--- a/extern.h
++++ b/extern.h
+@@ -396,7 +396,7 @@ struct name *outof(struct name *names, FILE *fo, struct header *hp);
+ int is_fileaddr(char *name);
+ struct name *usermap(struct name *names);
+ struct name *cat(struct name *n1, struct name *n2);
+-char **unpack(struct name *np);
++char **unpack(struct name *smopts, struct name *np);
+ struct name *elide(struct name *names);
+ int count(struct name *np);
+ struct name *delete_alternates(struct name *np);
+diff --git a/names.c b/names.c
+index c69560f..45bbaed 100644
+--- a/names.c
++++ b/names.c
+@@ -549,7 +549,7 @@ cat(struct name *n1, struct name *n2)
+  * Return an error if the name list won't fit.
+  */
+ char **
+-unpack(struct name *np)
++unpack(struct name *smopts, struct name *np)
+ {
+ 	char **ap, **top;
+ 	struct name *n;
+@@ -564,7 +564,7 @@ unpack(struct name *np)
+ 	 * the terminating 0 pointer.  Additional spots may be needed
+ 	 * to pass along -f to the host mailer.
+ 	 */
+-	extra = 2;
++	extra = 3 + count(smopts);
+ 	extra++;
+ 	metoo = value("metoo") != NULL;
+ 	if (metoo)
+@@ -581,6 +581,10 @@ unpack(struct name *np)
+ 		*ap++ = "-m";
+ 	if (verbose)
+ 		*ap++ = "-v";
++	for (; smopts != NULL; smopts = smopts->n_flink)
++		if ((smopts->n_type & GDEL) == 0)
++			*ap++ = smopts->n_name;
++	*ap++ = "--";
+ 	for (; n != NULL; n = n->n_flink)
+ 		if ((n->n_type & GDEL) == 0)
+ 			*ap++ = n->n_name;
+diff --git a/sendout.c b/sendout.c
+index 7b7f2eb..c52f15d 100644
+--- a/sendout.c
++++ b/sendout.c
+@@ -835,7 +835,7 @@ start_mta(struct name *to, struct name *mailargs, FILE *input,
+ #endif	/* HAVE_SOCKETS */
+ 
+ 	if ((smtp = value("smtp")) == NULL) {
+-		args = unpack(cat(mailargs, to));
++		args = unpack(mailargs, to);
+ 		if (debug || value("debug")) {
+ 			printf(catgets(catd, CATSET, 181,
+ 					"Sendmail arguments:"));
+-- 
+1.9.3
+
+
diff --git a/meta/recipes-extended/mailx/files/0013-fio.c-Unconditionally-require-wordexp-support.patch b/meta/recipes-extended/mailx/files/0013-fio.c-Unconditionally-require-wordexp-support.patch
new file mode 100644
index 0000000..5558d86
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/0013-fio.c-Unconditionally-require-wordexp-support.patch
@@ -0,0 +1,113 @@
+From 2bae8ecf04ec2ba6bb9f0af5b80485dd0edb427d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 17 Nov 2014 12:48:25 +0100
+Subject: [PATCH 3/4] fio.c: Unconditionally require wordexp support
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+---
+ fio.c | 67 +++++--------------------------------------------------------------
+ 1 file changed, 5 insertions(+), 62 deletions(-)
+
+diff --git a/fio.c b/fio.c
+index 65e8f10..1529236 100644
+--- a/fio.c
++++ b/fio.c
+@@ -43,12 +43,15 @@ static char sccsid[] = "@(#)fio.c	2.76 (gritter) 9/16/09";
+ #endif /* not lint */
+ 
+ #include "rcv.h"
++
++#ifndef HAVE_WORDEXP
++#error wordexp support is required
++#endif
++
+ #include <sys/stat.h>
+ #include <sys/file.h>
+ #include <sys/wait.h>
+-#ifdef	HAVE_WORDEXP
+ #include <wordexp.h>
+-#endif	/* HAVE_WORDEXP */
+ #include <unistd.h>
+ 
+ #if defined (USE_NSS)
+@@ -481,7 +484,6 @@ next:
+ static char *
+ globname(char *name)
+ {
+-#ifdef	HAVE_WORDEXP
+ 	wordexp_t we;
+ 	char *cp;
+ 	sigset_t nset;
+@@ -527,65 +529,6 @@ globname(char *name)
+ 	}
+ 	wordfree(&we);
+ 	return cp;
+-#else	/* !HAVE_WORDEXP */
+-	char xname[PATHSIZE];
+-	char cmdbuf[PATHSIZE];		/* also used for file names */
+-	int pid, l;
+-	char *cp, *shell;
+-	int pivec[2];
+-	extern int wait_status;
+-	struct stat sbuf;
+-
+-	if (pipe(pivec) < 0) {
+-		perror("pipe");
+-		return name;
+-	}
+-	snprintf(cmdbuf, sizeof cmdbuf, "echo %s", name);
+-	if ((shell = value("SHELL")) == NULL)
+-		shell = SHELL;
+-	pid = start_command(shell, 0, -1, pivec[1], "-c", cmdbuf, NULL);
+-	if (pid < 0) {
+-		close(pivec[0]);
+-		close(pivec[1]);
+-		return NULL;
+-	}
+-	close(pivec[1]);
+-again:
+-	l = read(pivec[0], xname, sizeof xname);
+-	if (l < 0) {
+-		if (errno == EINTR)
+-			goto again;
+-		perror("read");
+-		close(pivec[0]);
+-		return NULL;
+-	}
+-	close(pivec[0]);
+-	if (wait_child(pid) < 0 && WTERMSIG(wait_status) != SIGPIPE) {
+-		fprintf(stderr, catgets(catd, CATSET, 81,
+-				"\"%s\": Expansion failed.\n"), name);
+-		return NULL;
+-	}
+-	if (l == 0) {
+-		fprintf(stderr, catgets(catd, CATSET, 82,
+-					"\"%s\": No match.\n"), name);
+-		return NULL;
+-	}
+-	if (l == sizeof xname) {
+-		fprintf(stderr, catgets(catd, CATSET, 83,
+-				"\"%s\": Expansion buffer overflow.\n"), name);
+-		return NULL;
+-	}
+-	xname[l] = 0;
+-	for (cp = &xname[l-1]; *cp == '\n' && cp > xname; cp--)
+-		;
+-	cp[1] = '\0';
+-	if (strchr(xname, ' ') && stat(xname, &sbuf) < 0) {
+-		fprintf(stderr, catgets(catd, CATSET, 84,
+-				"\"%s\": Ambiguous.\n"), name);
+-		return NULL;
+-	}
+-	return savestr(xname);
+-#endif	/* !HAVE_WORDEXP */
+ }
+ 
+ /*
+-- 
+1.9.3
+
+
diff --git a/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch b/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
new file mode 100644
index 0000000..f65cfa8
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
@@ -0,0 +1,30 @@
+From 73fefa0c1ac70043ec84f2d8b8f9f683213f168d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 17 Nov 2014 13:11:32 +0100
+Subject: [PATCH 4/4] globname: Invoke wordexp with WRDE_NOCMD (CVE-2004-2771)
+
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+---
+ fio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fio.c b/fio.c
+index 1529236..774a204 100644
+--- a/fio.c
++++ b/fio.c
+@@ -497,7 +497,7 @@ globname(char *name)
+ 	sigemptyset(&nset);
+ 	sigaddset(&nset, SIGCHLD);
+ 	sigprocmask(SIG_BLOCK, &nset, NULL);
+-	i = wordexp(name, &we, 0);
++	i = wordexp(name, &we, WRDE_NOCMD);
+ 	sigprocmask(SIG_UNBLOCK, &nset, NULL);
+ 	switch (i) {
+ 	case 0:
+-- 
+1.9.3
+
+
diff --git a/meta/recipes-extended/mailx/files/0015-usr-sbin-sendmail.patch b/meta/recipes-extended/mailx/files/0015-usr-sbin-sendmail.patch
new file mode 100644
index 0000000..2b59914
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/0015-usr-sbin-sendmail.patch
@@ -0,0 +1,38 @@
+Description: Sendmail is at /usr/sbin/sendmail
+ As per Debian Policy §11.6
+Author: Ryan Kavanagh <rak@debian.org>
+Origin: Debian
+Forwarded: no
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: heirloom-mailx-12.5/Makefile
+===================================================================
+This patch is taken from
+ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
+
+Upstream-Status: Inappropriate [upstream is dead]
+
+--- heirloom-mailx-12.5.orig/Makefile	2011-04-26 17:23:22.000000000 -0400
++++ heirloom-mailx-12.5/Makefile	2015-01-27 13:20:04.733542801 -0500
+@@ -13,7 +13,7 @@
+ 
+ MAILRC		= $(SYSCONFDIR)/nail.rc
+ MAILSPOOL	= /var/mail
+-SENDMAIL	= /usr/lib/sendmail
++SENDMAIL	= /usr/sbin/sendmail
+ 
+ DESTDIR		=
+ 
+Index: heirloom-mailx-12.5/mailx.1
+===================================================================
+--- heirloom-mailx-12.5.orig/mailx.1	2015-01-27 13:18:49.000000000 -0500
++++ heirloom-mailx-12.5/mailx.1	2015-01-27 13:20:32.382336867 -0500
+@@ -4922,7 +4922,7 @@
+ which just acts as a proxy.
+ .PP
+ \fIMailx\fR immediately contacts the SMTP server (or
+-.IR \%/usr/lib/sendmail )
++.IR \%/usr/sbin/sendmail )
+ even when operating in
+ .I disconnected
+ mode.
diff --git a/meta/recipes-extended/mailx/files/explicitly.disable.krb5.support.patch b/meta/recipes-extended/mailx/files/explicitly.disable.krb5.support.patch
new file mode 100644
index 0000000..b74fd04
--- /dev/null
+++ b/meta/recipes-extended/mailx/files/explicitly.disable.krb5.support.patch
@@ -0,0 +1,46 @@
+krb5 support is autodetected from sysroot making builds undeterministic
+feel free to improve this to support explicitly enabling/disabling it
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- a/makeconfig	2013-07-21 15:06:11.177792334 +0200
++++ b/makeconfig	2013-07-21 15:07:20.028793994 +0200
+@@ -424,36 +424,6 @@
+ }
+ !
+ 
+-<$tmp2.c link_check gssapi 'for GSSAPI in libgss' \
+-		'#define USE_GSSAPI' '-lgss' ||
+-	<$tmp2.c link_check gssapi 'for GSSAPI in libgssapi_krb5' \
+-			'#define USE_GSSAPI' '-lgssapi_krb5' ||
+-		link_check gssapi 'for GSSAPI in libgssapi_krb5, old-style' \
+-				'#define USE_GSSAPI
+-#define GSSAPI_OLD_STYLE' '-lgssapi_krb5' <<\! || \
+-			link_check gssapi 'for GSSAPI in libgssapi' \
+-				'#define USE_GSSAPI
+-#define	GSSAPI_REG_INCLUDE' '-lgssapi' <<\%
+-#include <gssapi/gssapi.h>
+-#include <gssapi/gssapi_generic.h>
+-
+-int main(void)
+-{
+-	gss_import_name(0, 0, gss_nt_service_name, 0);
+-	gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0);
+-	return 0;
+-}
+-!
+-#include <gssapi.h>
+-
+-int main(void)
+-{
+-	gss_import_name(0, 0, GSS_C_NT_HOSTBASED_SERVICE, 0);
+-	gss_init_sec_context(0,0,0,0,0,0,0,0,0,0,0,0,0);
+-	return 0;
+-}
+-%
+-
+ cat >$tmp2.c <<\!
+ #include "config.h"
+ #ifdef HAVE_NL_LANGINFO
diff --git a/meta/recipes-extended/mailx/mailx_12.5-5.bb b/meta/recipes-extended/mailx/mailx_12.5-5.bb
new file mode 100644
index 0000000..ffa9049
--- /dev/null
+++ b/meta/recipes-extended/mailx/mailx_12.5-5.bb
@@ -0,0 +1,43 @@
+SUMMARY = "mailx is the traditional command-line-mode mail user agent"
+
+DESCRIPTION = "Mailx is derived from Berkeley Mail and is intended provide the \
+functionality of the POSIX mailx command with additional support \
+for MIME, IMAP, POP3, SMTP, and S/MIME."
+
+HOMEPAGE = "http://heirloom.sourceforge.net/mailx.html"
+SECTION = "console/network"
+LICENSE = "BSD & MPL-1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4202a0a62910cf94f7af8a3436a2a2dd"
+
+DEPENDS = "openssl"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_12.5.orig.tar.gz;name=archive \
+           file://0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch \
+           file://0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch \
+           file://0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch \
+           file://0011-outof-Introduce-expandaddr-flag.patch \
+           file://0012-unpack-Disable-option-processing-for-email-addresses.patch \
+           file://0013-fio.c-Unconditionally-require-wordexp-support.patch \
+           file://0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch \
+           file://0015-usr-sbin-sendmail.patch \
+           file://explicitly.disable.krb5.support.patch \
+          "
+
+SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2"
+SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad"
+
+S = "${WORKDIR}/heirloom-mailx-12.5"
+
+inherit autotools-brokensep
+
+CFLAGS_append = " -D_BSD_SOURCE -DDEBIAN -I${S}/EXT"
+
+# "STRIP=true" means that 'true' command will be used to 'strip' files which will achieve the effect of not stripping them
+# mailx's Makefile doesn't allow a more straightforward way to avoid stripping
+EXTRA_OEMAKE = "SENDMAIL=${sbindir}/sendmail IPv6=-DHAVE_IPv6_FUNCS PREFIX=/usr UCBINSTALL=/usr/bin/install STRIP=true"
+
+# The makeconfig can't run parallelly, otherwise the checking results
+# might be incorrect and lead to errors:
+# fio.c:56:17: fatal error: ssl.h: No such file or directory
+# #include <ssl.h>
+PARALLEL_MAKE = ""
diff --git a/meta/recipes-extended/man-pages/man-pages_4.02.bb b/meta/recipes-extended/man-pages/man-pages_4.02.bb
new file mode 100644
index 0000000..1b90a44
--- /dev/null
+++ b/meta/recipes-extended/man-pages/man-pages_4.02.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Linux man-pages"
+DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
+SECTION = "console/utils"
+HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
+SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "93df3279798a3345bb2c709584c83639"
+SRC_URI[sha256sum] = "42324f9ed47c89a43cb37b6bb0d5fbcad44838eee45cd394e181c98d038c49ff"
+
+RDEPENDS_${PN} = "man"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+        oe_runmake install DESTDIR=${D}
+}
+
+# Only deliveres man-pages so FILES_${PN} gets everything
+FILES_${PN}-doc = ""
+FILES_${PN} = "${mandir}/*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/meta/recipes-extended/man/man/configure_sed.patch b/meta/recipes-extended/man/man/configure_sed.patch
new file mode 100644
index 0000000..d49e683
--- /dev/null
+++ b/meta/recipes-extended/man/man/configure_sed.patch
@@ -0,0 +1,32 @@
+man: replace ',' with '#'
+
+Sometimes, the parameters of CC/BUILD_CC contains the ',', which
+cause the sed command failed, so replace the ',' with '#'
+
+Upstream-Status: Pending
+
+Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 9f62cf9..9a565ae 100755
+--- a/configure
++++ b/configure
+@@ -1321,9 +1321,9 @@ do
+   echo "Creating $infile from $infile.in"
+   sed -e '
+ s,@version@,$version,
+-s,@CC@,$CC,
++s#@CC@#$CC#
+ s,@EXEEXT@,$EXEEXT,
+-s,@BUILD_CC@,$BUILD_CC,
++s#@BUILD_CC@#$BUILD_CC#
+ s,@INSTALL@,$INSTALL,
+ s,@DEFS@,$DEFS,
+ s,@LIBS@,$LIBS,
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch b/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
new file mode 100644
index 0000000..6f834bd
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5g-nonrootbuild.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -u -r man-1.5g.old/configure man-1.5g/configure
+--- man-1.5g.old/configure	Wed Apr  7 04:16:05 1999
++++ man-1.5g/configure	Mon May 15 15:22:44 2000
+@@ -791,7 +791,7 @@
+     read mode
+     if test "$mode" != ""; then man_mode=$mode; fi
+   fi
+-  man_install_flags="-m $man_mode -o $man_user -g $man_group"
++  man_install_flags=""
+ fi
+ 
+ # What sections do we anticipate?
diff --git a/meta/recipes-extended/man/man/man-1.5h1-gencat.patch b/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
new file mode 100644
index 0000000..044b14c
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5h1-gencat.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- gencat/genlib.c	2006-08-02 20:11:44.000000000 +0200
++++ gencat/genlib.c.oden	2008-12-21 19:18:50.000000000 +0100
+@@ -47,6 +47,7 @@ up-to-date.  Many thanks.
+ 01/14/91   4 nazgul	Off by one on number specified entries
+ */
+ 
++#undef _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdlib.h>
+ #ifdef SYSV
diff --git a/meta/recipes-extended/man/man/man-1.5h1-make.patch b/meta/recipes-extended/man/man/man-1.5h1-make.patch
new file mode 100644
index 0000000..8631eb2
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5h1-make.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5g/man/Makefile.in.mike	Fri Apr  9 13:35:54 1999
++++ man-1.5g/man/Makefile.in	Fri Apr  9 13:36:45 1999
+@@ -1,8 +1,8 @@
+ # only executed from a subdir
+ MAN1 = man whatis apropos
+-MAN5 = man.conf
++MAN5 = man.config
+ MAN8 = makewhatis
+-ALL = man.1 whatis.1 apropos.1 man.conf.5
++ALL = man.1 whatis.1 apropos.1 man.config.5
+ MAYBE8 = makewhatis
+ 
+ .SUFFIXES: .man .1 .5 .8
diff --git a/meta/recipes-extended/man/man/man-1.5i2-initial.patch b/meta/recipes-extended/man/man/man-1.5i2-initial.patch
new file mode 100644
index 0000000..fe56c07
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5i2-initial.patch
@@ -0,0 +1,19 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5i2/src/makewhatis.sh.initial	Tue Jul  3 15:38:39 2001
++++ man-1.5i2/src/makewhatis.sh	Tue Jul  3 15:39:39 2001
+@@ -81,8 +81,10 @@
+ 	continue;;
+     -s) setsections=1
+ 	continue;;
+-    -u) findarg="-newer /var/cache/man/whatis"
+-	update=1
++    -u) if [ -e /var/cache/man/whatis ]; then
++	  findarg="-newer /var/cache/man/whatis"
++	  update=1
++	fi
+ 	continue;;
+     -v) verbose=1
+ 	continue;;
diff --git a/meta/recipes-extended/man/man/man-1.5i2-newline.patch b/meta/recipes-extended/man/man/man-1.5i2-newline.patch
new file mode 100644
index 0000000..611df5d
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5i2-newline.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- src/man.c	2008-12-21 19:17:31.000000000 +0100
++++ src/man.c.oden	2008-12-21 19:17:38.000000000 +0100
+@@ -391,7 +391,7 @@ again:
+ 	  beg++;
+ 
+      end = beg;
+-     while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0')
++     while (*end != ' ' && *end != '\t' && *end != '\n' && *end != '\0' && (end-buf)<BUFSIZE)
+ 	  end++;		/* note that buf is NUL-terminated */
+      *end = '\0';
+ 
diff --git a/meta/recipes-extended/man/man/man-1.5i2-overflow.patch b/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
new file mode 100644
index 0000000..52d2881
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5i2-overflow.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5i2/src/man.c.overflow	Mon Jun 25 00:01:45 2001
++++ man-1.5i2/src/man.c	Mon Jun 25 00:01:45 2001
+@@ -381,6 +381,9 @@
+ 	  strcat(name, "/");
+ 	  strcat(name, beg);
+      }
++     /* If this is too long, bad things have already happened. *
++      * we should quit IMMEDIATELY.                            */
++     if(strlen(name)>sizeof(ultname)) _exit(1);
+ 
+      goto again;
+ }
diff --git a/meta/recipes-extended/man/man/man-1.5j-i18n.patch b/meta/recipes-extended/man/man/man-1.5j-i18n.patch
new file mode 100644
index 0000000..2ae09c0
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5j-i18n.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5j/msgs/inst.sh.i18n	Wed Apr 25 10:40:50 2001
++++ man-1.5j/msgs/inst.sh	Wed Apr 25 10:41:17 2001
+@@ -27,8 +27,7 @@
+ for j in $M; do
+   if [ -f $j ]; then
+     i=`echo $j | sed -e 's/mess.//; s/.cat//'`
+-    dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
+-    dest=${PREFIX}$dest
++    dest=${PREFIX}/`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"`
+     echo "mkdir -p `dirname $dest`"
+     mkdir -p `dirname $dest`;
+     echo "install -c -m 644 $j $dest"
diff --git a/meta/recipes-extended/man/man/man-1.5j-nocache.patch b/meta/recipes-extended/man/man/man-1.5j-nocache.patch
new file mode 100644
index 0000000..751dddd
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5j-nocache.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5j/src/man.conf.in.nocache	Thu Nov 22 15:07:12 2001
++++ man-1.5j/src/man.conf.in	Thu Nov 22 15:07:12 2001
+@@ -81,6 +81,9 @@
+ # 
+ #NOCACHE
+ #
++# NOCACHE keeps man from creating cache pages
++NOCACHE
++#
+ # Useful paths - note that COL should not be defined when
+ # NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
+ # not only is it superfluous, but it actually damages the output.
diff --git a/meta/recipes-extended/man/man/man-1.5j-utf8.patch b/meta/recipes-extended/man/man/man-1.5j-utf8.patch
new file mode 100644
index 0000000..33d3e4c
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5j-utf8.patch
@@ -0,0 +1,61 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5j/configure.utf8	Thu Nov 22 15:02:35 2001
++++ man-1.5j/configure	Thu Nov 22 15:03:15 2001
+@@ -408,9 +408,9 @@
+   Fgawk=/bin/gawk
+   Fawk=/bin/gawk
+   Fmawk=missing
+-  troff=""
+-  nroff=""
+-  jnroff=""
++  troff=/usr/bin/troff
++  nroff=/usr/bin/nroff
++  jnroff=/usr/bin/nroff
+   eqn=""
+   neqn=""
+   jneqn=""
+@@ -453,6 +453,8 @@
+     done
+   done
+   Fgroff=/usr/bin/groff
++  Fnroff=/usr/bin/nroff
++  Fjnroff=/usr/bin/nroff
+   Fgeqn=/usr/bin/geqn
+   Fgtbl=/usr/bin/gtbl
+   Fcol=/usr/bin/col
+@@ -485,25 +487,25 @@
+   then
+     if test $Fnroff = "missing"
+     then
+-      nroff="nroff -Tlatin1 -mandoc"
++      nroff="nroff -Tutf8 -mandoc"
+     else
+-      nroff="$Fnroff -Tlatin1 -mandoc"
++      nroff="$Fnroff -Tutf8 -mandoc"
+     fi
+     troff="troff -mandoc"
+     echo "Warning: could not find groff"
+   else
+     if test $Fnroff = "missing"
+     then
+-      nroff="$Fgroff -Tlatin1 -mandoc"
++      nroff="$Fgroff -Tutf8 -mandoc"
+     else
+-      nroff="$Fnroff -Tlatin1 -mandoc"
++      nroff="$Fnroff -Tutf8 -mandoc"
+     fi
+     troff="$Fgroff -Tps -mandoc"
+-    jnroff="$Fgroff -Tnippon -mandocj"
++    jnroff="$Fjnroff -Tutf8 -mandocj"
+   fi
+   eqn="$Fgeqn -Tps"
+-  neqn="$Fgeqn -Tlatin1"
+-  jneqn="$Fgeqn -Tnippon"
++  neqn="$Fgeqn -Tutf8"
++  jneqn="$Fgeqn -Tutf8"
+   tbl="$Fgtbl"
+   col="$Fcol"
+   vgrind="$Fvgrind"
diff --git a/meta/recipes-extended/man/man/man-1.5k-confpath.patch b/meta/recipes-extended/man/man/man-1.5k-confpath.patch
new file mode 100644
index 0000000..b5746c2
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5k-confpath.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- configure	2006-05-01 19:56:14.000000000 +0200
++++ configure.oden	2008-12-21 19:16:50.000000000 +0100
+@@ -198,7 +198,7 @@
+     confdir="${confprefix}/share/misc"
+   fi
+ fi
+-conffilename="man.conf"
++conffilename="man.config"
+ 
+ if test "$RANDOM" = "$RANDOM"; then
+   # Plain old Bourne shell.
diff --git a/meta/recipes-extended/man/man/man-1.5k-nonascii.patch b/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
new file mode 100644
index 0000000..d662d9b
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5k-nonascii.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- ./src/apropos.sh.nonascii	2001-11-23 00:30:42.000000000 +0100
++++ ./src/apropos.sh	2002-08-13 15:44:53.000000000 +0200
+@@ -18,9 +18,9 @@
+ 
+ # When man pages in your favorite locale look to grep like binary files
+ # (and you use GNU grep) you may want to add the 'a' option to *grepopt1.
+-aproposgrepopt1='i'
++aproposgrepopt1='ia'
+ aproposgrepopt2=''
+-whatisgrepopt1='iw'
++whatisgrepopt1='iwa'
+ whatisgrepopt2='^'
+ grepopt1=$%apropos_or_whatis%grepopt1
+ grepopt2=$%apropos_or_whatis%grepopt2
diff --git a/meta/recipes-extended/man/man/man-1.5k-sofix.patch b/meta/recipes-extended/man/man/man-1.5k-sofix.patch
new file mode 100644
index 0000000..50b9252
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5k-sofix.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5j/src/man.c.sofix	Thu Nov 22 14:51:44 2001
++++ man-1.5j/src/man.c	Thu Nov 22 14:52:44 2001
+@@ -300,7 +300,7 @@
+ 
+      if (strlen(name0) >= sizeof(ultname))
+ 	     return name0;
+-     strcpy(ultname, name0);
++     strncpy(ultname, name0, BUFSIZE-32);
+      name = ultname;
+ 
+ again:
+@@ -332,7 +332,7 @@
+ 	   * .so files - we could glob for all possible extensions,
+ 	   * for now: only try .gz
+ 	   */
+-	  else if (fp == NULL && get_expander(".gz") &&
++	  if (fp == NULL && get_expander(".gz") &&
+ 		   strlen(name)+strlen(".gz") < BUFSIZE) {
+ 	       strcat(name, ".gz");
+ 	       fp = fopen (name, "r");
diff --git a/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch b/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
new file mode 100644
index 0000000..0512999
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-bug11621.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- ./configure.ad	2003-12-11 19:17:10.000000000 +0100
++++ ./configure	2003-12-11 19:17:27.000000000 +0100
+@@ -26,7 +26,7 @@
+ # (Indeed, -r may cause the terminal to get into funny states.
+ # Very inconvenient. For viewing pages in strange locales, set LC_*.)
+ #
+-DEFAULTLESSOPT="-is"
++DEFAULTLESSOPT="-isr"
+ #
+ # Note that not creating any cat directories (/var/cache/man or so)
+ # and not making man suid or sgid is recommended.
diff --git a/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch b/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
new file mode 100644
index 0000000..bc97f56
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-buildroot.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- ./configure.less	2003-12-11 19:18:15.000000000 +0100
++++ ./configure	2003-12-11 19:20:03.000000000 +0100
+@@ -401,18 +401,13 @@
+ 
+ if test "$ans" = "false"
+ then
+-  for i in more less cmp cat awk gawk mawk
+-  do
+-    eval F$i="missing"
+-    for j in $DEFPATH
+-    do
+-      if test -f $j/$i
+-      then
+-	eval F$i=$j/$i
+-	break
+-      fi
+-    done
+-  done
++  Fmore=/bin/more
++  Fless=/usr/bin/less
++  Fcmp=/usr/bin/cmp
++  Fcat=/bin/cat
++  Fgawk=/bin/gawk
++  Fawk=/bin/gawk
++  Fmawk=missing
+   troff=""
+   nroff=""
+   jnroff=""
+@@ -457,6 +452,19 @@
+       fi
+     done
+   done
++  Fgroff=/usr/bin/groff
++  Fgeqn=/usr/bin/geqn
++  Fgtbl=/usr/bin/gtbl
++  Fcol=/usr/bin/col
++  Fgrefer=/usr/bin/grefer
++  Fgpic=/usr/bin/gpic
++  Fmore=/bin/more
++  Fless=/usr/bin/less
++  Fcmp=/usr/bin/cmp
++  Fcat=/bin/cat
++  Fgawk=/bin/gawk
++
++
+   for i in eqn tbl refer pic
+   do
+     if test `eval echo \\$Fg$i` = "missing"
diff --git a/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch b/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
new file mode 100644
index 0000000..c85ff1d
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-no-color-for-printing.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5m2/configure.color	2006-09-16 18:27:37.000000000 +0200
++++ man-1.5m2/configure	2006-09-16 18:28:44.000000000 +0200
+@@ -539,6 +539,8 @@
+     troff="$troff -c"
+     nroff="$nroff -c"
+     jnroff="$jnroff -c"
++else
++    troff="$troff -c"
+ fi
+ 
+ if [ x$default = x ]; then
diff --git a/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch b/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
new file mode 100644
index 0000000..8af78ea
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-sigpipe.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.5m2/src/util.c_sigpipe	2006-12-09 13:43:21.000000000 +0100
++++ man-1.5m2/src/util.c	2006-12-09 13:53:13.000000000 +0100
+@@ -116,11 +116,14 @@
+ static int
+ system1 (const char *command) {
+ 	void (*prev_handler)(int) = signal (SIGINT,catch_int);
++	signal (SIGPIPE,SIG_IGN);
+ 	int ret = system(command);
+ 
+ 	/* child terminated with signal? */
+ 	if (WIFSIGNALED(ret) &&
+-	    (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
++	    (WTERMSIG(ret) == SIGINT ||
++		 WTERMSIG(ret) == SIGPIPE ||
++		 WTERMSIG(ret) == SIGQUIT))
+ 		exit(1);
+ 
+ 	/* or we caught an interrupt? */
+@@ -128,6 +131,7 @@
+ 		exit(1);
+ 
+ 	signal(SIGINT,prev_handler);
++	signal(SIGPIPE,SIG_DFL);
+ 	return ret;
+ }
+ 
diff --git a/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch b/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch
new file mode 100644
index 0000000..fe66d759
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man/Makefile.in	2008-12-21 19:19:33.000000000 +0100
++++ man/Makefile.in.oden	2008-12-21 19:19:39.000000000 +0100
+@@ -34,6 +34,15 @@
+ 	for i in $(MAN8); \
+ 		do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done
+ 
++install-l10n: $(ALL)
++	mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8
++	for i in $(MAN1); \
++		do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done
++	for i in $(MAN5); \
++		do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done
++	for i in $(MAN8); \
++		do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done
++
+ clean:
+ 	rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
+ 
+@@ -49,7 +58,7 @@
+ 	@for i in @languages@; do if test -d $$i; then echo; \
+ 		echo "==== Installing the `cat $$i.txt` man pages. ===="; \
+ 		cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
+-		export SLANG; make -f ../Makefile install; cd ..; \
++		export SLANG; make -f ../Makefile install-l10n; cd ..; \
+ 		else echo "==== No $$i man pages found. ===="; fi; done
+ 
+ cleansubdirs:
diff --git a/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch b/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
new file mode 100644
index 0000000..e321325
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-i18n_whatis.patch
@@ -0,0 +1,145 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -Naur man-1.6e.orig/src/apropos.sh man-1.6e/src/apropos.sh
+--- man-1.6e.orig/src/apropos.sh	2007-05-18 13:49:31.000000000 -0300
++++ man-1.6e/src/apropos.sh	2007-05-18 14:24:33.000000000 -0300
+@@ -60,16 +60,56 @@
+     esac
+ done
+ 
++# list of languages to look for
++LANG_LIST=`echo $LANGUAGE:$LC_ALL:$LC_MESSAGES:$LANG | tr ':' ' '`
++DIR_LIST=""
++for d in /var/cache/man $manpath /usr/lib
++do
++    for l in $LANG_LIST
++    do
++        if [ -d $d/$l ]
++        then
++            # check that the path is not already in the list
++            if ! echo "$DIR_LIST" | grep " $d/$l\b" > /dev/null
++            then
++                DIR_LIST="$DIR_LIST $d/$l"
++            fi
++        fi
++    done
++    DIR_LIST="$DIR_LIST $d"
++    # check that the path is not already in the list
++    if ! echo "$DIR_LIST" | grep " $d\b" > /dev/null
++    then
++        DIR_LIST="$DIR_LIST $d/$l"
++    fi
++done
++
+ while [ "$1" != "" ]
+ do
+     found=0
+-    for d in /var/cache/man $manpath /usr/lib
++    # in order not to display lines in more than one language for
++    # a same man page; we check that a given man page name
++    # hasn't already been displayed
++    BAZ=""
++    for d in $DIR_LIST
+     do
+         if [ -f $d/whatis ]
+         then
+-            if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
++            if FOO=`grep -"$grepopt1" "$grepopt2""$1" $d/whatis`
+             then
+-                found=1
++                # the LC_ALL=C is needed in case the text is
++                # in a different encoding than the locale
++                BAR=`echo -e "$FOO" | LC_ALL=C sed 's/ - .*$//' | tr ' []' '_' | sort -u`
++                for i in $BAR
++                do
++                    if ! echo "$BAZ" | grep "$i" > /dev/null
++                    then
++                        BAZ="$BAZ $i"
++                        i="^`echo $i | sed 's:_\+:\\\(\[_ \]\\\|\\\[\\\|\\\]\\\)\\\+:g'`"
++                        echo -e "$FOO" | grep "$i"
++                        found=1
++                    fi
++                done
+ # Some people are satisfied with a single occurrence
+ # But it is better to give all
+ #               break
+diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
+--- man-1.6e.orig/src/makewhatis.sh	2007-05-18 13:49:31.000000000 -0300
++++ man-1.6e/src/makewhatis.sh	2007-05-18 13:50:07.000000000 -0300
+@@ -41,12 +41,32 @@
+ 
+ program=`basename $0`
+ 
++# this allows to define language specific values fro NAME, DESCRIPTION
++# if not defined, using those default values
++if [ -z "$MAN_NAME" ]
++then
++	MAN_NAME="ИМЕ|NOM|JMÉNO|NAVN|ΟΝΟΜΑ|NOMBRE|NIME|IZENA|NIMI|IME|\
++NÉV|NOME|名前|이름|NAAM|NAZWA|NUME|ИМЯ|MENO|НАЗВА|名称|名稱"
++fi
++if [ -z "$MAN_DESCRIPTION" ]
++then
++	MAN_DESCRIPTION="ОПИСАНИЕ|DESCRIPCIÓ|POPIS|BESKRIVELSE|BESCHREIBUNG|\
++ΠΕΡΙΓΡΑΦΗ|DESCRIPCIÓN|KIRJELDUS|AZALPENA|KUVAUS|OPIS|LEÍRÁS|DESCRIZIONE|\
++説明|설명|BESCHRIJVING|DESCRIÇÃO|DESCRIERE|ОПИС|描述"
++fi
++# make them into awk regexp
++MAN_NAME="^(${MAN_NAME})";
++MAN_DESCRIPTION="^(${MAN_DESCRIPTION})";
++
+ # In case both /usr/man and /usr/share/man exist, the former is local
+ # and should be first.
+ # It is a bug to add /var/cache/man to DEFCATPATH.
+ dm=
+ for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
+ do
++    if [ -n "$LANG" -a -d "$d/$LANG" ]; then
++	if [ x$dm = x ]; then dm="$d/$LANG"; else dm=$dm:"$d/$LANG"; fi
++    fi
+     if [ -d $d ]; then
+ 	if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
+     fi
+@@ -55,6 +75,9 @@
+ dc=
+ for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
+ do
++    if [ -n "$LANG" -a -d "$d/$LANG" ]; then
++	if [ x$dc = x ]; then dm="$d/$LANG"; else dm=$dc:"$d/$LANG"; fi
++    fi
+     if [ -d $d ]; then
+ 	if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
+     fi
+@@ -194,7 +217,7 @@
+ 	    section=$i
+ 	    curdir=$mandir/${pages}$i
+ 	    export section verbose curdir
+-	    find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | $AWK '
++	    find $mandir/${pages}$i/. -name '*' $findarg0 $findarg -print | LC_ALL=C $AWK -v MAN_NAME="$MAN_NAME" -v MAN_DESCRIPTION="$MAN_DESCRIPTION" '
+ 
+ 	    function readline() {
+ 	      if (use_zcat || use_bzcat) {
+@@ -261,13 +284,7 @@
+ 		gsub(/.\b/, "");
+ 		if (($1 ~ /^\.[Ss][Hh]/ &&
+ 		  ($2 ~ /[Nn][Aa][Mm][Ee]/ ||
+-		   $2 ~ /^JMÉNO/ || $2 ~ /^NAVN/ || $2 ~ /^NUME/ ||
+-		   $2 ~ /^BEZEICHNUNG/ || $2 ~ /^NOMBRE/ ||
+-		   $2 ~ /^NIMI/ || $2 ~ /^NOM/ || $2 ~ /^IME/ ||
+-		   $2 ~ /^N[ÉE]V/ || $2 ~ /^NAMA/ || $2 ~ /^̾Á°/ ||
+-		   $2 ~ /^̾¾Î/ || $2 ~ /^À̸§/ || $2 ~ /^NAZWA/ ||
+-		   $2 ~ /^îáú÷áîéå/ || $2 ~ /^Ãû³Æ/ || $2 ~ /^¦WºÙ/ ||
+-		   $2 ~ /^NOME/ || $2 ~ /^NAAM/ || $2 ~ /^ÈÌÅ/)) ||
++		   $2 ~ MAN_NAME )) ||
+ 		  (pages == "cat" && $1 ~ /^NAME/)) {
+ 		    if (!insh) {
+ 		      insh = 1;
+@@ -278,6 +295,7 @@
+ 		  if ($1 ~ /^\.[Ss][HhYS]/ ||
+ 		    (pages == "cat" &&
+ 		    ($1 ~ /^S[yYeE]/ || $1 ~ /^DESCRIPTION/ ||
++		     $1 ~ MAN_DESCRIPTION ||
+ 		     $1 ~ /^COMMAND/ || $1 ~ /^OVERVIEW/ ||
+ 		     $1 ~ /^STRUCTURES/ || $1 ~ /^INTRODUCTION/ ||
+ 		     $0 ~ /^[^ ]/))) {
diff --git a/meta/recipes-extended/man/man/man-1.6e-mandirs.patch b/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
new file mode 100644
index 0000000..b240064
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-mandirs.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.6e.orig/src/man.conf.in	2005-08-20 20:26:06.000000000 -0300
++++ man-1.6e/src/man.conf.in	2007-05-18 10:30:29.000000000 -0300
+@@ -36,11 +36,12 @@
+ #
+ # Every automatically generated MANPATH includes these fields
+ #
+-MANPATH	/usr/man
+ MANPATH	/usr/share/man
++MANPATH	/usr/X11R6/man
+ MANPATH	/usr/local/man
+ MANPATH	/usr/local/share/man
+-MANPATH	/usr/X11R6/man
++MANPATH	/usr/kerberos/man
++MANPATH	/usr/man
+ #
+ # Uncomment if you want to include one of these by default
+ #
+@@ -67,6 +68,9 @@
+ MANPATH_MAP	/usr/X11R6/bin		/usr/X11R6/man
+ MANPATH_MAP	/usr/bin/X11		/usr/X11R6/man
+ MANPATH_MAP	/usr/bin/mh		/usr/share/man
++MANPATH_MAP	/usr/kerberos/bin		/usr/kerberos/man
++MANPATH_MAP	/usr/kerberos/sbin		/usr/kerberos/man
++
+ #
+ # NOAUTOPATH keeps man from automatically adding directories that look like
+ # manual page directories to the path.
diff --git a/meta/recipes-extended/man/man/man-1.6e-new_sections.patch b/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
new file mode 100644
index 0000000..fb9773c
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-new_sections.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- man-1.6e.orig/configure	2006-05-01 14:56:14.000000000 -0300
++++ man-1.6e/configure	2007-05-18 14:35:43.000000000 -0300
+@@ -960,7 +960,7 @@
+ 
+ # What sections do we anticipate?
+ 
+-tmpsections="1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o"
++tmpsections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p tcl n l p o"
+ 
+ if [ x$default = x ]; then
+   echo ""
diff --git a/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch b/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
new file mode 100644
index 0000000..1d1cb0c
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-ro_usr.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: man-1.6f/src/makewhatis.sh
+===================================================================
+--- man-1.6f.orig/src/makewhatis.sh	2010-12-29 13:42:34.000000000 -0800
++++ man-1.6f/src/makewhatis.sh	2010-12-29 13:42:35.667428347 -0800
+@@ -124,7 +124,7 @@
+ 	continue;;
+     -s) setsections=1
+ 	continue;;
+-    -u) findarg="-ctime 0"
++    -u) findarg="-newer /var/cache/man/whatis"
+ 	update=1
+ 	continue;;
+     -v) verbose=1
+@@ -165,14 +165,7 @@
+ # first truncate all the whatis files that will be created new,
+ # then only update - we might visit the same directory twice
+ if [ x$update = x ]; then
+-   for pages in man cat
+-   do
+-      eval path="\$$pages"path
+-      for mandir in $path
+-      do
+-	 cp /dev/null $mandir/whatis
+-      done
+-   done
++   cp /dev/null /var/cache/man/whatis
+ fi
+ 
+ for pages in man cat
diff --git a/meta/recipes-extended/man/man/man-1.6e-security.patch b/meta/recipes-extended/man/man/man-1.6e-security.patch
new file mode 100644
index 0000000..312a882
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-security.patch
@@ -0,0 +1,62 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -Naur man-1.6e.orig/src/makewhatis.sh man-1.6e/src/makewhatis.sh
+--- man-1.6e.orig/src/makewhatis.sh	2006-07-19 01:58:08.000000000 -0300
++++ man-1.6e/src/makewhatis.sh	2007-05-18 10:18:31.000000000 -0300
+@@ -45,7 +45,7 @@
+ # and should be first.
+ # It is a bug to add /var/cache/man to DEFCATPATH.
+ dm=
+-for d in /usr/man /usr/share/man /usr/X11R6/man /usr/local/man
++for d in /usr/share/man /usr/man /usr/X11R6/man /usr/local/man
+ do
+     if [ -d $d ]; then
+ 	if [ x$dm = x ]; then dm=$d; else dm=$dm:$d; fi
+@@ -53,7 +53,7 @@
+ done
+ DEFMANPATH=$dm
+ dc=
+-for d in /usr/man/preformat /usr/man /usr/share/man/preformat /usr/share/man
++for d in /var/cache/man /usr/share/man/preformat /usr/man/preformat /usr/share/man /usr/man
+ do
+     if [ -d $d ]; then
+ 	if [ x$dc = x ]; then dc=$d; else dc=$dc:$d; fi
+@@ -76,12 +76,12 @@
+ # We try here to be careful (and avoid preconstructed symlinks)
+ # in case makewhatis is run as root, by creating a subdirectory of /tmp.
+ 
+-TMPFILEDIR=/tmp/whatis.tmp.dir.$$
+-rm -rf $TMPFILEDIR
+-if ! mkdir -m 0700 $TMPFILEDIR; then
+-    echo Could not create $TMPFILEDIR
+-    exit 1;
++TMPFILEDIR=`mktemp -d /tmp/makewhatisXXXXXX`
++if [ $? -ne 0 ]; then
++   echo "$0: Can't create temp file, exiting..."
++   exit 1
+ fi
++chmod 0700 $TMPFILEDIR
+ TMPFILE=$TMPFILEDIR/w
+ 
+ # make sure TMPFILEDIR is deleted if program is killed or terminates
+diff -Naur man-1.6e.orig/src/man.c man-1.6e/src/man.c
+--- man-1.6e.orig/src/man.c	2006-05-01 17:34:22.000000000 -0300
++++ man-1.6e/src/man.c	2007-05-18 10:11:33.000000000 -0300
+@@ -1234,7 +1234,6 @@
+ #endif
+ 
+ 
+-#if 0
+      {
+ 	/* There are no known cases of buffer overflow caused by
+ 	   excessively long environment variables. In case you find one,
+@@ -1257,7 +1256,6 @@
+ 	   MAN_ICONV_PATH, MAN_ICONV_OPT, MAN_ICONV_INPUT_CHARSET,
+ 	   MAN_ICONV_OUTPUT_CHARSET, NLSPATH, PATH */
+      }
+-#endif
+ 
+ 
+ #ifndef __FreeBSD__ 
diff --git a/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch b/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
new file mode 100644
index 0000000..568f742
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-use_i18n_vars_in_a_std_way.patch
@@ -0,0 +1,160 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -Naur man-1.6e.orig/catopen/catopen.c man-1.6e/catopen/catopen.c
+--- man-1.6e.orig/catopen/catopen.c	2005-08-20 20:26:06.000000000 -0300
++++ man-1.6e/catopen/catopen.c	2007-05-18 11:31:05.000000000 -0300
+@@ -9,22 +9,63 @@
+ extern char *index (const char *, int);         /* not always in <string.h> */
+ extern char *my_malloc(int);	/* in util.c */
+ 
++/* if the program has sgid/suid privileges then getenv doesn't return
++ * NLSPATH; so we set here a good default value.
++ */
+ #ifndef DEFAULT_NLSPATH
+ # if __GLIBC__ >= 2
+-#  define DEFAULT_NLSPATH "/usr/share/locale/%L/%N"
++#  define DEFAULT_NLSPATH "/usr/share/locale/%L/%N:/usr/share/locale/%l_%t/%N:/usr/share/locale/%l/%N"
+ # else
+ #  define DEFAULT_NLSPATH "/usr/lib/locale/%N/%L"
+ # endif
+ #endif
+ 
+-static nl_catd my_catopenpath(char *name, char *path);
++static nl_catd my_catopenpath(char *name, char *path, char *lang);
+ 
+ static				/* this source included in gripes.c */
+ nl_catd
+ my_catopen(char *name, int oflag) {
+-  nl_catd fd;
++  nl_catd fd = (nl_catd) -1;
++
++  /* using first the my_catopenpath, which looks with LANGUAGE
++   * and only if it fails ressort to catopen, it gives better i18n
++   */
++  {
++    char *nlspath, *lang, *s;
+ 
+-  fd = catopen(name, oflag);
++    /*
++     * "If NLSPATH does not exist in the environment, or if a
++     * message catalog cannot be opened in any of the paths specified
++     * by NLSPATH, then an implementation defined default path is used"
++     */
++    nlspath = getenv("NLSPATH");
++    if (!nlspath)
++      nlspath = DEFAULT_NLSPATH;
++ 
++    lang = getenv("LANGUAGE");
++    if (!lang)
++      lang = getenv("LC_ALL");
++    if (!lang)
++      lang = getenv("LC_MESSAGES");
++    if (!lang)
++      lang = getenv("LANG");
++    if (!lang)
++      lang = "";
++ 
++    while(*lang && (fd == (nl_catd) -1)) {
++      s = index(lang, ':');
++      if (s) *s = 0;
++        fd = my_catopenpath(name, nlspath, lang);
++      if (s) lang=s+1;
++      else lang = "";
++    }
++    if (fd == (nl_catd) -1)
++      fd = my_catopenpath(name, nlspath, "en");
++  }
++
++  /* still not found, use the system catopen */
++  if (fd == (nl_catd) -1)
++    fd = catopen(name, oflag);
+ 
+   if (fd == (nl_catd) -1 && oflag) {
+     oflag = 0;
+@@ -32,8 +73,6 @@
+   }
+ 
+   if (fd == (nl_catd) -1) {
+-    char *nlspath;
+-
+     /* The libc catopen fails - let us see if we can do better */
+     /* The quotes below are from X/Open, XPG 1987, Vol. 3. */
+ 
+@@ -58,17 +97,6 @@
+ #endif
+     }
+ 
+-    /*
+-     * "If NLSPATH does not exist in the environment, or if a
+-     * message catalog cannot be opened in any of the paths specified
+-     * by NLSPATH, then an implementation defined default path is used"
+-     */
+-
+-    nlspath = getenv("NLSPATH");
+-    if (nlspath)
+-      fd = my_catopenpath(name, nlspath);
+-    if (fd == (nl_catd) -1)
+-      fd = my_catopenpath(name, DEFAULT_NLSPATH);
+   }
+   return fd;
+ }
+@@ -90,15 +118,13 @@
+  *
+  */
+ static nl_catd
+-my_catopenpath(char *name, char *nlspath) {
+-  int fd;
++my_catopenpath(char *name, char *nlspath, char *lang) {
+   nl_catd cfd = (nl_catd) -1;
+-  char *path0, *path, *s, *file, *lang, *lang_l, *lang_t, *lang_c;
++  char *path0, *path, *s, *file, *lang_l, *lang_t, *lang_c;
+   int langsz, namesz, sz, lang_l_sz, lang_t_sz, lang_c_sz;
+ 
+   namesz = strlen(name);
+ 
+-  lang = getenv("LANG");
+   if (!lang)
+     lang = "";
+   langsz = strlen(lang);
+@@ -194,14 +220,9 @@
+       path = s+1;
+     } else
+       path = 0;
+-    fd = open(file, O_RDONLY);
+-    if (fd != -1) {
+-      /* we found the right catalog - but we don't know the
+-	 type of nl_catd, so close it again and ask libc */
+-      close(fd);
+-      cfd = catopen(file, 0);
+-      break;
+-    }
++	cfd = catopen(file, 0);
++	if (cfd != (nl_catd) -1)
++			break;
+   }
+ 
+   free(path0);
+diff -Naur man-1.6e.orig/src/manpath.c man-1.6e/src/manpath.c
+--- man-1.6e.orig/src/manpath.c	2006-08-03 18:18:33.000000000 -0300
++++ man-1.6e/src/manpath.c	2007-05-18 11:02:48.000000000 -0300
+@@ -282,13 +282,14 @@
+ 		/* We cannot use "lang = setlocale(LC_MESSAGES, NULL)" or so:
+ 		   the return value of setlocale is an opaque string. */
+ 		/* POSIX prescribes the order: LC_ALL, LC_MESSAGES, LANG */
+-		if((lang = getenv("LC_ALL")) != NULL)
++	        /* LANGUAGE is GNU/Linux and overrules all */
++		if((lang = getenv("LANGUAGE")) != NULL)
+ 			split2(dir, lang, add_to_mandirlist_x, perrs);
+-		if((lang = getenv("LC_MESSAGES")) != NULL)
++		else if((lang = getenv("LC_ALL")) != NULL)
+ 			split2(dir, lang, add_to_mandirlist_x, perrs);
+-		if((lang = getenv("LANG")) != NULL)
++		else if((lang = getenv("LC_MESSAGES")) != NULL)
+ 			split2(dir, lang, add_to_mandirlist_x, perrs);
+-		if((lang = getenv("LANGUAGE")) != NULL)
++		else if((lang = getenv("LANG")) != NULL)
+ 			split2(dir, lang, add_to_mandirlist_x, perrs);
+ 		add_to_mandirlist_x(dir, 0, perrs);
+ 	}
diff --git a/meta/recipes-extended/man/man/man-1.6e-whatis2.patch b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
new file mode 100644
index 0000000..fc4ed31
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6e-whatis2.patch
@@ -0,0 +1,59 @@
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: man-1.6f/src/makewhatis.sh
+===================================================================
+--- man-1.6f.orig/src/makewhatis.sh	2010-12-29 13:51:45.000000000 -0800
++++ man-1.6f/src/makewhatis.sh	2010-12-29 13:59:35.399799412 -0800
+@@ -164,10 +164,15 @@
+ fi
+ catpath=`echo ${catpath} | tr : ' '`
+ 
++#WHATIS_DIR=$DESTDIR/var/cache/man/`echo $here|sed -e 's!.*/man/!!g'`
++WHATIS_DIR=$DESTDIR/var/cache/man/$LANG
++[[ -d $WHATIS_DIR ]] || mkdir -p $WHATIS_DIR/
++
+ # first truncate all the whatis files that will be created new,
+ # then only update - we might visit the same directory twice
+ if [ x$update = x ]; then
+-   cp /dev/null /var/cache/man/whatis
++   mkdir -p $WHATIS_DIR/
++   /bin/echo -n > $WHATIS_DIR/whatis
+ fi
+ 
+ for pages in man cat
+@@ -180,13 +185,7 @@
+ 	echo "about to enter $mandir" > /dev/stderr
+      fi
+ 
+-     # kludge for Slackware's /usr/man/preformat
+-     if [ $mandir = /usr/man/preformat ]
+-     then
+-	mandir1=/usr/man
+-     else
+-	mandir1=$mandir
+-     fi
++     mandir1=$WHATIS_DIR
+ 
+      # if $mandir is on a readonly partition, and the whatis file
+      # is not a symlink, then let's skip trying to update it
+@@ -207,11 +206,6 @@
+ 	fi
+      fi
+ 
+-     if [ -s ${mandir}/whatis -a $pages = man -a x$update = x ]; then
+-	if [ x$verbose != x ]; then
+-	   echo skipping $mandir - we did it already > /dev/stderr
+-	fi
+-     else      
+        here=`pwd`
+        cd $mandir
+        for i in $sections
+@@ -447,7 +447,6 @@
+
+        chmod 644 ${mandir1}/whatis
+        rm $TMPFILE
+-     fi
+    done
+ done
diff --git a/meta/recipes-extended/man/man/man-1.6g-whatis3.patch b/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
new file mode 100644
index 0000000..6334456
--- /dev/null
+++ b/meta/recipes-extended/man/man/man-1.6g-whatis3.patch
@@ -0,0 +1,20 @@
+Do not use absolute path for awk while getting the path of awk
+when running makewhatis.
+This can avoid errors if path of awk changes.
+
+Upstream-Status: Submitted [man-1.6g]
+
+Signed-off-by: Jian Liu <jian.liu@windriver.com>
+
+diff -Nur man-1.6g.orig/src/makewhatis.sh man-1.6g/src/makewhatis.sh
+--- man-1.6g.orig/src/makewhatis.sh	2015-02-25 16:13:12.657611419 +0800
++++ man-1.6g/src/makewhatis.sh	2015-02-25 16:14:49.334694815 +0800
+@@ -67,7 +67,7 @@
+ # but that leads to problems and bugs.
+
+ # AWK=/usr/bin/gawk
+-AWK=@awk@
++AWK=`which awk`
+
+ # Find a place for our temporary files. If security is not a concern, use
+ #	TMPFILE=/tmp/whatis$$; TMPFILEDIR=none
diff --git a/meta/recipes-extended/man/man/man.1.gz b/meta/recipes-extended/man/man/man.1.gz
new file mode 100644
index 0000000..c368045
--- /dev/null
+++ b/meta/recipes-extended/man/man/man.1.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man/man.7.gz b/meta/recipes-extended/man/man/man.7.gz
new file mode 100644
index 0000000..e85af82
--- /dev/null
+++ b/meta/recipes-extended/man/man/man.7.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man/man.conf b/meta/recipes-extended/man/man/man.conf
new file mode 100644
index 0000000..fc10be2
--- /dev/null
+++ b/meta/recipes-extended/man/man/man.conf
@@ -0,0 +1,141 @@
+#
+# Generated automatically from man.conf.in by the
+# configure script.
+#
+# man.conf from man-1.5p
+#
+# For more information about this file, see the man pages man(1)
+# and man.conf(5).
+#
+# This file is read by man to configure the default manpath (also used
+# when MANPATH contains an empty substring), to find out where the cat
+# pages corresponding to given man pages should be stored,
+# and to map each PATH element to a manpath element.
+# It may also record the pathname of the man binary. [This is unused.]
+# The format is:
+#
+# MANBIN		pathname
+# MANPATH		manpath_element	[corresponding_catdir]
+# MANPATH_MAP		path_element	manpath_element
+#
+# If no catdir is given, it is assumed to be equal to the mandir
+# (so that this dir has both man1 etc. and cat1 etc. subdirs).
+# This is the traditional Unix setup.
+# Certain versions of the FSSTND recommend putting formatted versions
+# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
+# The keyword FSSTND will cause this behaviour.
+# Certain versions of the FHS recommend putting formatted versions of
+# /usr/.../share/man/[locale/]manx/page.x into
+# /var/cache/man/.../[locale/]catx/page.x.
+# The keyword FHS will cause this behaviour (and overrides FSSTND).
+# Explicitly given catdirs override.
+#
+# FSSTND
+FHS
+#
+# This file is also read by man in order to find how to call nroff, less, etc.,
+# and to determine the correspondence between extensions and decompressors.
+#
+# MANBIN		/usr/local/bin/man
+#
+# Every automatically generated MANPATH includes these fields
+#
+MANPATH	/usr/man
+MANPATH	/usr/share/man
+MANPATH	/usr/local/man
+MANPATH	/usr/local/share/man
+MANPATH	/usr/X11R6/man
+#
+# Uncomment if you want to include one of these by default
+#
+# MANPATH	/opt/*/man
+# MANPATH	/usr/lib/*/man
+# MANPATH	/usr/share/*/man
+# MANPATH	/usr/kerberos/man
+#
+# Set up PATH to MANPATH mapping
+#
+# If people ask for "man foo" and have "/dir/bin/foo" in their PATH
+# and the docs are found in "/dir/man", then no mapping is required.
+#
+# The below mappings are superfluous when the right hand side is
+# in the mandatory manpath already, but will keep man from statting
+# lots of other nearby files and directories.
+#
+MANPATH_MAP	/bin			/usr/share/man
+MANPATH_MAP	/sbin			/usr/share/man
+MANPATH_MAP	/usr/bin		/usr/share/man
+MANPATH_MAP	/usr/sbin		/usr/share/man
+MANPATH_MAP	/usr/local/bin		/usr/local/share/man
+MANPATH_MAP	/usr/local/sbin		/usr/local/share/man
+MANPATH_MAP	/usr/X11R6/bin		/usr/X11R6/man
+MANPATH_MAP	/usr/bin/X11		/usr/X11R6/man
+MANPATH_MAP	/usr/bin/mh		/usr/share/man
+#
+# NOAUTOPATH keeps man from automatically adding directories that look like
+# manual page directories to the path.
+#
+#NOAUTOPATH
+#
+# NOCACHE keeps man from creating cache pages ("cat pages")
+# (generally one enables/disable cat page creation by creating/deleting
+# the directory they would live in - man never does mkdir)
+# 
+#NOCACHE
+#
+# Useful paths - note that COL should not be defined when
+# NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
+# not only is it superfluous, but it actually damages the output.
+# For use with utf-8, NROFF should be "nroff -mandoc" without -T option.
+# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
+#
+# If you have a new troff (version 1.18.1?) and its colored output
+# causes problems, add the -c option to TROFF, NROFF, JNROFF.
+#
+TROFF		/usr/bin/groff -Tps -mandoc
+NROFF		/usr/bin/nroff -Tlatin1 -mandoc
+JNROFF		/usr/bin/groff -Tnippon -mandocj
+EQN		/usr/bin/eqn -Tps
+NEQN		/usr/bin/eqn -Tlatin1
+JNEQN		/usr/bin/eqn -Tnippon
+TBL		/usr/bin/tbl
+# COL		/usr/bin/col
+REFER		/usr/bin/refer
+PIC		/usr/bin/pic
+VGRIND		
+GRAP		
+PAGER		/usr/bin/less -isR
+CAT		/bin/cat
+#
+# The command "man -a xyzzy" will show all man pages for xyzzy.
+# When CMP is defined man will try to avoid showing the same
+# text twice. (But compressed pages compare unequal.)
+#
+CMP		/usr/bin/cmp -s
+#
+# Compress cat pages
+#
+COMPRESS	/bin/bzip2
+COMPRESS_EXT	.bz2
+#
+# Default manual sections (and order) to search if -S is not specified
+# and the MANSECT environment variable is not set.
+#
+MANSECT		1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
+#
+# Default options to use when man is invoked without options
+# This is mainly for the benefit of those that think -a should be the default
+# Note that some systems have /usr/man/allman, causing pages to be shown twice.
+#
+#MANDEFOPTIONS	-a
+#
+# Decompress with given decompressor when input file has given extension
+# The command given must act as a filter.
+#
+.gz		/bin/gunzip -c
+.bz2		/usr/bin/bunzip2 -c
+.xz		/usr/bin/unxz -c
+.z		
+.Z		/bin/zcat
+.F		
+.Y		
diff --git a/meta/recipes-extended/man/man/manpath.5.gz b/meta/recipes-extended/man/man/manpath.5.gz
new file mode 100644
index 0000000..c012ff8
--- /dev/null
+++ b/meta/recipes-extended/man/man/manpath.5.gz
Binary files differ
diff --git a/meta/recipes-extended/man/man_1.6g.bb b/meta/recipes-extended/man/man_1.6g.bb
new file mode 100644
index 0000000..fa4736b
--- /dev/null
+++ b/meta/recipes-extended/man/man_1.6g.bb
@@ -0,0 +1,84 @@
+SUMMARY = "Online documentation tools"
+DESCRIPTION = "A set of documentation tools: man, apropos and whatis"
+SECTION = "console/utils"
+HOMEPAGE = "http://primates.ximian.com/~flucifredi/man"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+PR = "r1"
+
+DEPENDS = "groff less"
+
+def compress_pkg(d):
+    if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
+         compress = d.getVar("DOC_COMPRESS", True)
+         if compress == "gz":
+             return "gzip"
+         elif compress == "bz2":
+             return "bzip2"
+         elif compress == "xz":
+             return "xz"
+    return ""
+
+RDEPENDS_${PN} += "${@compress_pkg(d)}"
+
+SRC_URI = "http://pkgs.fedoraproject.org/lookaside/pkgs/man2html/${BP}.tar.gz/ba154d5796928b841c9c69f0ae376660/${BP}.tar.gz \
+           file://man-1.5k-confpath.patch;striplevel=0 \
+           file://man-1.5h1-make.patch \
+           file://man-1.5k-nonascii.patch \
+           file://man-1.6e-security.patch \
+           file://man-1.6e-mandirs.patch \
+           file://man-1.5m2-bug11621.patch \
+           file://man-1.5k-sofix.patch \
+           file://man-1.5m2-buildroot.patch \
+           file://man-1.6e-ro_usr.patch \
+           file://man-1.5i2-newline.patch;striplevel=0 \
+           file://man-1.5j-utf8.patch \
+           file://man-1.5i2-overflow.patch \
+           file://man-1.5j-nocache.patch \
+           file://man-1.5i2-initial.patch \
+           file://man-1.5h1-gencat.patch;striplevel=0 \
+           file://man-1.5g-nonrootbuild.patch \
+           file://man-1.5m2-tv_fhs.patch;striplevel=0 \
+           file://man-1.5j-i18n.patch \
+           file://man-1.6e-whatis2.patch \
+           file://man-1.6e-use_i18n_vars_in_a_std_way.patch \
+           file://man-1.5m2-no-color-for-printing.patch \
+           file://man-1.5m2-sigpipe.patch \
+           file://man-1.6e-i18n_whatis.patch \
+           file://man-1.6e-new_sections.patch \
+           file://man.1.gz;unpack=false \
+           file://man.7.gz;unpack=false \
+           file://man.conf \
+           file://manpath.5.gz;unpack=false \
+           file://man-1.6g-whatis3.patch \
+           file://configure_sed.patch \
+"
+
+SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660"
+SRC_URI[sha256sum] = "ccdcb8c3f4e0080923d7e818f0e4a202db26c46415eaef361387c20995b8959f"
+
+CFLAGS += "-DSYSV"
+
+do_configure () {
+        ${S}/configure -default -confdir /etc +sgid +fhs +lang all
+}
+
+
+do_install() {
+        oe_runmake install DESTDIR=${D}
+}
+
+do_install_append(){
+	mkdir -p  ${D}${sysconfdir}
+        mkdir -p ${D}${datadir}/man/man5
+        mkdir -p ${D}${datadir}/man/man7
+	cp ${WORKDIR}/man.conf ${D}${sysconfdir}/man.config
+        cp ${WORKDIR}/man.1.gz ${D}${datadir}/man/man1/
+        cp ${WORKDIR}/man.7.gz ${D}${datadir}/man/man7/
+        cp ${WORKDIR}/manpath.5.gz ${D}${datadir}/man/man5/
+}
+
+
+RDEPENDS_${PN} = "less groff"
+FILES_${PN} += "${datadir}/locale ${sysconfdir}/man.config"
diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch
new file mode 100644
index 0000000..ee4ba9f
--- /dev/null
+++ b/meta/recipes-extended/mc/mc/mc-CTRL.patch
@@ -0,0 +1,31 @@
+Fix build with musl by ensuring CTRL is defined.
+
+musl does not define CTRL in <termios.h>, we could include <sys/ttydefaults.h>
+explicitly but it's easier just to ensure CTRL is defined.
+
+This patch is taken from Sabotage Linux, the license statement for patches and
+build scripts in Sabotage Linux says:
+
+    To the extent possible under law, Christian Neukirchen has waived
+    all copyright and related or neighboring rights to this work.
+
+    http://creativecommons.org/publicdomain/zero/1.0/
+
+Therefore this should be good to include in OpenEmbedded.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-Status: Accepted (should be included in v4.8.14)
+
+diff -u mc-4.8.1.7.org/lib/tty/tty-ncurses.c mc-4.8.1.7/lib/tty/tty-ncurses.c
+--- mc-4.8.1.7.org/lib/tty/tty-ncurses.c
++++ mc-4.8.1.7/lib/tty/tty-ncurses.c
+@@ -65,7 +65,7 @@
+ 
+ /*** file scope macro definitions ****************************************************************/
+ 
+-#if defined(_AIX) && !defined(CTRL)
++#if !defined(CTRL)
+ #define CTRL(x) ((x) & 0x1f)
+ #endif
+ 
diff --git a/meta/recipes-extended/mc/mc_4.7.5.2.bb b/meta/recipes-extended/mc/mc_4.7.5.2.bb
new file mode 100644
index 0000000..b47eb02
--- /dev/null
+++ b/meta/recipes-extended/mc/mc_4.7.5.2.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Midnight Commander is an ncurses based file manager"
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+PR = "r3"
+
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+           file://mc-CTRL.patch \
+           "
+
+SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6"
+SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab"
+
+inherit autotools gettext pkgconfig
+
+EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba"
+
+FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
+
+do_install_append () {
+	sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+	sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
+}
+
+PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
+
+SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
+FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
+                             ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
+                             ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
+                             ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ 
+                             ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ 
+                             ${libexecdir}/mc/extfs.d/uzip"
+RDEPENDS_${BPN}-helpers-perl = "perl"
+
+SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
+FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
+RDEPENDS_${BPN}-helpers-python = "python"
+
+SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
+FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
+
+SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
+FILES_${BPN}-fish = "${libexecdir}/mc/fish"
+
diff --git a/meta/recipes-extended/mc/mc_4.8.14.bb b/meta/recipes-extended/mc/mc_4.8.14.bb
new file mode 100644
index 0000000..3b6c2ff
--- /dev/null
+++ b/meta/recipes-extended/mc/mc_4.8.14.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Midnight Commander is an ncurses based file manager"
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0 util-linux"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+           "
+
+SRC_URI[md5sum] = "fe1cb75643c2bd4df64bbcf2dab76905"
+SRC_URI[sha256sum] = "61fd0fd2280c3d09d7e0aec8ab001fc89dad8e4fd9941f386414667b55152ec5"
+
+inherit autotools gettext pkgconfig
+
+#
+# Both Samba (smb) and sftp require package delivered from meta-openembedded
+#
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
+PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
+
+EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
+
+FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
+
+do_install_append () {
+	sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+	sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
+}
+
+PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
+
+SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
+FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
+                             ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
+                             ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
+                             ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ 
+                             ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ 
+                             ${libexecdir}/mc/extfs.d/uzip"
+RDEPENDS_${BPN}-helpers-perl = "perl"
+
+SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
+FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
+RDEPENDS_${BPN}-helpers-python = "python"
+
+SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
+FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
+
+SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
+FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch b/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch
new file mode 100644
index 0000000..df70b1c
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Fix-typo-in-comparision.patch
@@ -0,0 +1,86 @@
+From 18d360d74271a066a849bc1fba4f10dbb23ed251 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Sep 2015 08:17:42 +0000
+Subject: [PATCH] Fix typo in comparision
+
+error: comparison of array 'devnm' equal to a null pointer is always false
+
+User bitwise '&' operator as it is a mask
+
+Fixes
+error: use of logical '&&' with constant operand
+
+Remove extraneous parens
+
+error: equality comparison with extraneous parentheses
+
+Remove dead code
+
+restripe.c:465:21: error: explicitly assigning value of variable of type 'int' to itself
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ mdmon.h       | 2 +-
+ mdopen.c      | 2 +-
+ restripe.c    | 3 ---
+ super-intel.c | 2 +-
+ 4 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/mdmon.h b/mdmon.h
+index aa750c6..0b08c3d 100644
+--- a/mdmon.h
++++ b/mdmon.h
+@@ -101,7 +101,7 @@ static inline int is_resync_complete(struct mdinfo *array)
+ 		break;
+ 	case 10:
+ 		l = array->array.layout;
+-		ncopies = (l & 0xff) * ((l >> 8) && 0xff);
++		ncopies = (l & 0xff) * ((l >> 8) & 0xff);
+ 		sync_size = array->component_size * array->array.raid_disks;
+ 		sync_size /= ncopies;
+ 		break;
+diff --git a/mdopen.c b/mdopen.c
+index 28410f4..c5ee2a6 100644
+--- a/mdopen.c
++++ b/mdopen.c
+@@ -318,7 +318,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
+ 	else if (num < 0) {
+ 		/* need to choose a free number. */
+ 		char *_devnm = find_free_devnm(use_mdp);
+-		if (devnm == NULL) {
++		if (_devnm == NULL) {
+ 			pr_err("No avail md devices - aborting\n");
+ 			return -1;
+ 		}
+diff --git a/restripe.c b/restripe.c
+index 4d92190..cfe9666 100644
+--- a/restripe.c
++++ b/restripe.c
+@@ -461,9 +461,6 @@ int raid6_check_disks(int data_disks, int start, int chunk_size,
+ 			curr_broken_disk = diskD;
+ 		}
+ 
+-		if((Px == 0) && (Qx == 0))
+-			curr_broken_disk = curr_broken_disk;
+-
+ 		if(curr_broken_disk >= data_disks + 2)
+ 			broken_status = 2;
+ 
+diff --git a/super-intel.c b/super-intel.c
+index 3f812d6..1838012 100644
+--- a/super-intel.c
++++ b/super-intel.c
+@@ -10027,7 +10027,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st,
+ 				geo->size = max_size;
+ 		}
+ 
+-		if ((direction == ROLLBACK_METADATA_CHANGES)) {
++		if (direction == ROLLBACK_METADATA_CHANGES) {
+ 			/* accept size for rollback only
+ 			*/
+ 		} else {
+-- 
+2.5.1
+
diff --git a/meta/recipes-extended/mdadm/files/gcc-4.9.patch b/meta/recipes-extended/mdadm/files/gcc-4.9.patch
new file mode 100644
index 0000000..54bf1d7
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/gcc-4.9.patch
@@ -0,0 +1,22 @@
+super-intel.c:5063:2: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
+  snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
+  ^
+cc1: all warnings being treated as errors
+make: *** [super-intel.o] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: mdadm-3.3/super-intel.c
+===================================================================
+--- mdadm-3.3.orig/super-intel.c	2014-05-02 15:08:21.154319651 -0700
++++ mdadm-3.3/super-intel.c	2014-05-02 15:09:31.470985794 -0700
+@@ -5060,7 +5060,7 @@
+ 	spare->cache_size = mpb->cache_size,
+ 	spare->pwr_cycle_count = __cpu_to_le32(1),
+ 
+-	snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
++	(void)snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
+ 		 MPB_SIGNATURE MPB_VERSION_RAID0);
+ 
+ 	for (d = super->disks; d; d = d->next) {
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
new file mode 100644
index 0000000..3b3db0a
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
@@ -0,0 +1,23 @@
+Upstream-Status: pending
+
+By hardcoding CC's definition in the Makefile, all the gcc parameters 
+set by tune settings are lost. Causing compile failure with x32 toolchain
+
+As the bitbake defined CC is good, there is no need to redfine CC in the 
+make file, hence making the CC definition in the Makefile conditional.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
+
+Index: mdadm-3.3/Makefile
+===================================================================
+--- mdadm-3.3.orig/Makefile	2013-09-03 07:47:47.000000000 +0300
++++ mdadm-3.3/Makefile	2013-10-16 16:44:23.542295487 +0300
+@@ -41,7 +41,7 @@
+ 
+ KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32
+ 
+-CC = $(CROSS_COMPILE)gcc
++CC ?= $(CROSS_COMPILE)gcc
+ CXFLAGS ?= -ggdb
+ CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
+ ifdef WARN_UNUSED
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
new file mode 100644
index 0000000..c656d07
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
@@ -0,0 +1,25 @@
+When try to print time_t values as a long int it causes an error because time_t
+data type in x32 ABI is long long int.
+
+Upstream-Status: Pending
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+Index: mdadm-3.3.4/monitor.c
+===================================================================
+--- mdadm-3.3.4.orig/monitor.c
++++ mdadm-3.3.4/monitor.c
+@@ -257,9 +257,12 @@ static int read_and_act(struct active_ar
+ 			mdi->curr_state = read_dev_state(mdi->state_fd);
+ 		}
+ 	}
+-
+ 	gettimeofday(&tv, NULL);
++#if defined(__x86_64__) && defined(__ILP32__)
++	dprintf("(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n",
++#else
+ 	dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
++#endif
+ 		a->info.container_member,
+ 		tv.tv_sec, tv.tv_usec,
+ 		array_states[a->curr_state],
diff --git a/meta/recipes-extended/mdadm/files/run-ptest b/meta/recipes-extended/mdadm/files/run-ptest
new file mode 100644
index 0000000..5b27609
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+./test &>./test.log
+if [ $? -eq 0 ]
+then
+	echo "PASS: mdadm"
+	rm test.log
+else
+	echo "FAIL: mdadm"
+fi
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
new file mode 100644
index 0000000..1198167
--- /dev/null
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Tool for managing software RAID under Linux"
+HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
+
+# Some files are GPLv2+ while others are GPLv2.
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
+                    file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
+
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
+           file://mdadm-3.2.2_fix_for_x32.patch \
+           file://gcc-4.9.patch \
+           file://mdadm-3.3.2_x32_abi_time_t.patch \
+           file://0001-Fix-typo-in-comparision.patch \
+           file://run-ptest \
+	  "
+SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
+SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68"
+
+CFLAGS += "-fno-strict-aliasing"
+
+inherit autotools-brokensep
+
+EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
+# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
+# prevents 64-bit userland from seeing this definition, instead defaulting
+# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
+# int-ll64.h included
+EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
+EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
+EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
+
+do_compile() {
+	oe_runmake
+}
+
+do_install() {
+	export STRIP=""
+	autotools_do_install
+}
+
+FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules"
+
+inherit ptest
+
+do_compile_ptest() {
+	oe_runmake test
+}
+
+do_install_ptest() {
+	cp -a ${S}/tests ${D}${PTEST_PATH}/tests
+	cp ${S}/test ${D}${PTEST_PATH}
+	sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
+	ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
+	for prg in test_stripe swap_super raid6check
+	do
+		install -D -m 755 $prg ${D}${PTEST_PATH}/
+	done
+}
+RDEPENDS_${PN}-ptest += "bash"
+RRECOMMENDS_${PN}-ptest += " \
+    coreutils \
+    util-linux \
+    kernel-module-loop \
+    kernel-module-linear \
+    kernel-module-raid0 \
+    kernel-module-raid1 \
+    kernel-module-raid10 \
+    kernel-module-raid456 \
+"
diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb
new file mode 100644
index 0000000..3c16228
--- /dev/null
+++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Compact getty terminal handler for virtual consoles only"
+SECTION = "console/utils"
+HOMEPAGE = "http://sourceforge.net/projects/mingetty/"
+LICENSE = "GPLv2"
+PR = "r3"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e"
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "2a75ad6487ff271424ffc00a64420990"
+SRC_URI[sha256sum] = "0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17"
+
+# substitute our CFLAGS for "-O2 -Wall -W -pipe"
+#
+EXTRA_OEMAKE = "CC='${CC}' \
+                CFLAGS='${CFLAGS} -D_GNU_SOURCE'"
+
+do_install(){
+    install -d ${D}${mandir}/man8 ${D}/${base_sbindir}
+    oe_runmake install DESTDIR=${D}
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "getty"
+ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
+ALTERNATIVE_TARGET[getty] = "${base_sbindir}/mingetty"
+ALTERNATIVE_PRIORITY = "10"
diff --git a/meta/recipes-extended/minicom/minicom/0001-Fix-build-issus-surfaced-due-to-musl.patch b/meta/recipes-extended/minicom/minicom/0001-Fix-build-issus-surfaced-due-to-musl.patch
new file mode 100644
index 0000000..fec67fd
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom/0001-Fix-build-issus-surfaced-due-to-musl.patch
@@ -0,0 +1,47 @@
+From d62a5862e26ed3fc58d789efe9c40ca6c911d36b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Aug 2015 22:35:31 +0000
+Subject: [PATCH] Fix build issus surfaced due to musl
+
+src/getsdir.h:28:14: error: 'MAXNAMLEN' undeclared here (not in a function)
+   char fname[MAXNAMLEN + 1];  /* filename + terminating null */
+
+src/dial.c:352:22: error: 'KIOCSOUND' undeclared (first use in this function)
+|      ioctl(consolefd, KIOCSOUND, k);
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/dial.c    | 2 +-
+ src/getsdir.c | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/dial.c b/src/dial.c
+index a90c1d2..bf02574 100644
+--- a/src/dial.c
++++ b/src/dial.c
+@@ -39,7 +39,7 @@
+ #include "intl.h"
+ 
+ #ifdef VC_MUSIC
+-#  if defined(__GLIBC__)
++#  if defined(__GLIBC__) || defined(__linux__)
+ #    include <sys/ioctl.h>
+ #    include <sys/kd.h>
+ #    include <sys/time.h>
+diff --git a/src/getsdir.c b/src/getsdir.c
+index 2195b27..b61a361 100644
+--- a/src/getsdir.c
++++ b/src/getsdir.c
+@@ -30,6 +30,7 @@
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/param.h>
+ #include <errno.h>
+ 
+ #include "getsdir.h"
+-- 
+2.5.1
+
diff --git a/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch b/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch
new file mode 100644
index 0000000..bd8261c
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom/0001-fix-minicom-h-v-return-value-is-not-0.patch
@@ -0,0 +1,35 @@
+Subject: [PATCH] fix minicom -h/-v return value is not 0
+
+Upstream-Status: Pending
+
+Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
+
+---
+ src/minicom.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/minicom.c b/src/minicom.c
+index e1a557b..730da7c 100644
+--- a/src/minicom.c
++++ b/src/minicom.c
+@@ -1166,15 +1166,13 @@ int main(int argc, char **argv)
+ 	         "modify it under the terms of the GNU General Public License\n"
+                  "as published by the Free Software Foundation; either version\n"
+                  "2 of the License, or (at your option) any later version.\n\n");
+-          exit(1);
+-          break;
++          exit(0);
+         case 's': /* setup mode */
+           dosetup = 1;
+           break;
+         case 'h':
+           helpthem();
+-          exit(1);
+-          break;
++          exit(0);
+         case 'p': /* Pseudo terminal to use. */
+           if (strncmp(optarg, "/dev/", 5) == 0)
+             optarg += 5;
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch b/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch
new file mode 100644
index 0000000..f5c0889
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- a/configure.in	2013-02-06 18:18:13.000000000 +0100
++++ b/configure.in	2013-07-21 15:31:27.614828894 +0200
+@@ -40,7 +40,13 @@
+ fi
+ 
+ PKG_PROG_PKG_CONFIG
+-if test -n "$PKG_CONFIG"; then
++
++AC_ARG_ENABLE([lockdev],
++        AS_HELP_STRING([--enable-lockdev],
++                       [Enable lockdev support (def: enabled)]),
++        [], [enable_lockdev="yes"])
++
++if test -n "$PKG_CONFIG" && test "x$enable_lockdev" = xyes; then
+ 	PKG_CHECK_MODULES([LOCKDEV], [lockdev], AC_DEFINE([HAVE_LOCKDEV],[1],[Define if you have lockdev]),[:])
+ fi
+ 
diff --git a/meta/recipes-extended/minicom/minicom_2.7.bb b/meta/recipes-extended/minicom/minicom_2.7.bb
new file mode 100644
index 0000000..1575cfb
--- /dev/null
+++ b/meta/recipes-extended/minicom/minicom_2.7.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Text-based modem control and terminal emulation program"
+DESCRIPTION = "Minicom is a text-based modem control and terminal emulation program for Unix-like operating systems"
+SECTION = "console/network"
+DEPENDS = "ncurses virtual/libiconv"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \
+                    file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81"
+
+SRC_URI = "https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz \
+           file://allow.to.disable.lockdev.patch \
+           file://0001-fix-minicom-h-v-return-value-is-not-0.patch \
+           file://0001-Fix-build-issus-surfaced-due-to-musl.patch \
+          "
+
+SRC_URI[md5sum] = "7044ca3e291268c33294f171d426dc2d"
+SRC_URI[sha256sum] = "9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev"
+
+inherit autotools gettext pkgconfig
+
+do_install() {
+	for d in doc extras man lib src; do make -C $d DESTDIR=${D} install; done
+}
+
diff --git a/meta/recipes-extended/mktemp/files/disable-strip.patch b/meta/recipes-extended/mktemp/files/disable-strip.patch
new file mode 100644
index 0000000..e06869e
--- /dev/null
+++ b/meta/recipes-extended/mktemp/files/disable-strip.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [configuration]
+
+diff --git a/Makefile.in b/Makefile.in
+index 37b3cc9..f1026f3 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -95,7 +95,7 @@ install-dirs:
+ 	    $(DESTDIR)$(mandir)/man1
+ 
+ install-binaries: $(PROG)
+-	$(INSTALL) -m 0555 -s $(PROG) $(DESTDIR)$(bindir)/$(PROG)
++	$(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
+ 
+ install-man:
+ 	$(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \
diff --git a/meta/recipes-extended/mktemp/files/fix-parallel-make.patch b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch
new file mode 100644
index 0000000..f3b6dcc
--- /dev/null
+++ b/meta/recipes-extended/mktemp/files/fix-parallel-make.patch
@@ -0,0 +1,24 @@
+This fixes the parallel make install failure
+
+Upstream-Status: Accepted
+http://www.gratisoft.us/bugzilla/show_bug.cgi?id=528
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: mktemp-1.7/Makefile.in
+===================================================================
+--- mktemp-1.7.orig/Makefile.in
++++ mktemp-1.7/Makefile.in
+@@ -94,10 +94,10 @@ install-dirs:
+ 	$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) \
+ 	    $(DESTDIR)$(mandir)/man1
+ 
+-install-binaries: $(PROG)
++install-binaries: install-dirs $(PROG)
+ 	$(INSTALL) -m 0555 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
+ 
+-install-man:
++install-man: install-dirs
+ 	$(INSTALL) -m 0444 $(srcdir)/mktemp.$(mantype) \
+ 	    $(DESTDIR)$(mandir)/man1/mktemp.1
+ 
diff --git a/meta/recipes-extended/mktemp/mktemp_1.7.bb b/meta/recipes-extended/mktemp/mktemp_1.7.bb
new file mode 100644
index 0000000..fe238ee
--- /dev/null
+++ b/meta/recipes-extended/mktemp/mktemp_1.7.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Enables safe temporary file creation from shell scripts"
+HOMEPAGE = "http://www.mktemp.org/"
+BUGTRACKER = "http://www.mktemp.org/bugs"
+SECTION = "console/utils"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=430680f6322a1eb87199b5e01a82c0d4"
+
+PR = "r3"
+
+SRC_URI = "ftp://ftp.mktemp.org/pub/mktemp/${BPN}-${PV}.tar.gz \
+        file://disable-strip.patch \
+        file://fix-parallel-make.patch \
+        "
+
+SRC_URI[md5sum] = "787bbed9fa2ee8e7645733c0e8e65172"
+SRC_URI[sha256sum] = "8e94b9e1edf866b2609545da65b627996ac5d158fda071e492bddb2f4a482675"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF = "--with-libc"
+
+do_install_append () {
+	install -d ${D}${base_bindir}
+	mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp
+	rmdir ${D}${bindir}
+}
+
+ALTERNATIVE_${PN} = "mktemp"
+ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-doc = "mktemp.1"
+ALTERNATIVE_PRIORITY_${PN}-doc = "300"
+ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
diff --git a/meta/recipes-extended/msmtp/msmtp_1.6.2.bb b/meta/recipes-extended/msmtp/msmtp_1.6.2.bb
new file mode 100644
index 0000000..f9bf563
--- /dev/null
+++ b/meta/recipes-extended/msmtp/msmtp_1.6.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "msmtp is an SMTP client"
+DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
+HOMEPAGE = "http://msmtp.sourceforge.net/"
+SECTION = "console/network"
+
+LICENSE = "GPLv3"
+DEPENDS = "zlib gnutls"
+
+#COPYING or Licence
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
+          "
+
+SRC_URI[md5sum] = "3baca93c7e5f1aa9d36a2e5b38739ab9"
+SRC_URI[sha256sum] = "2f6ecd7cbfadf548fd55205bd24cb63b84bcbb1185efed917dd7800595a48789"
+
+inherit gettext autotools update-alternatives pkgconfig
+
+EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
+
+ALTERNATIVE_${PN} = "sendmail"
+ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_PRIORITY = "100"
+
+pkg_postinst_${PN}_linuxstdbase () {
+	# /usr/lib/sendmial is required by LSB core test
+	[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
+}
diff --git a/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch
new file mode 100644
index 0000000..06f8142
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch
@@ -0,0 +1,32 @@
+From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka@redhat.com>
+Date: Wed, 7 Dec 2011 19:14:09 +0100
+Subject: [PATCH] ifconfig interface:0 del <IP> will remove the aliased IP on IA64
+
+Upstream-Status: Backport
+
+commit 81814dc2b14843009193efd307d814c26baa61f0 from
+git://git.code.sf.net/p/net-tools/code
+
+---
+ ifconfig.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/ifconfig.c b/ifconfig.c
+index bc405c6..dae8922 100644
+--- a/ifconfig.c
++++ b/ifconfig.c
+@@ -890,7 +890,9 @@ int main(int argc, char **argv)
+ 		    continue;
+ 		}
+ 		
+-		memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
++		/* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */
++		ip = 0;
++		memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr));
+ 		
+ 		if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
+ 		    fprintf(stderr, _("Interface %s not initialized\n"),
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-config.h b/meta/recipes-extended/net-tools/net-tools/net-tools-config.h
new file mode 100644
index 0000000..6d39c2a
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools/net-tools-config.h
@@ -0,0 +1,75 @@
+/*
+* config.h	Automatically generated configuration includefile
+*
+* NET-TOOLS	A collection of programs that form the base set of the
+*		NET-3 Networking Distribution for the LINUX operating
+*		system.
+*
+*		DO  NOT  EDIT  DIRECTLY
+*
+*/
+
+/* 
+ * 
+ * Internationalization
+ * 
+ * The net-tools package has currently been translated to French,
+ * German and Brazilian Portugese.  Other translations are, of
+ * course, welcome.  Answer `n' here if you have no support for
+ * internationalization on your system.
+ * 
+ */
+#define I18N 1
+
+/* 
+ * 
+ * Protocol Families.
+ * 
+ */
+#define HAVE_AFUNIX 1
+#define HAVE_AFINET 1
+#define HAVE_AFINET6 1
+#define HAVE_AFIPX 0
+#define HAVE_AFATALK 0
+#define HAVE_AFAX25 0
+#define HAVE_AFNETROM 1
+#define HAVE_AFROSE 0
+#define HAVE_AFX25 0
+#define HAVE_AFECONET 0
+#define HAVE_AFDECnet 0
+#define HAVE_AFASH 0
+
+/* 
+ * 
+ * Device Hardware types.
+ * 
+ */
+#define HAVE_HWETHER 1
+#define HAVE_HWARC 1
+#define HAVE_HWSLIP 1
+#define HAVE_HWPPP 1
+#define HAVE_HWTUNNEL 1
+#define HAVE_HWSTRIP 0
+#define HAVE_HWTR 0
+#define HAVE_HWAX25 0
+#define HAVE_HWROSE 0
+#define HAVE_HWNETROM 1
+#define HAVE_HWX25 0
+#define HAVE_HWFR 1
+#define HAVE_HWSIT 0
+#define HAVE_HWFDDI 0
+#define HAVE_HWHIPPI 0
+#define HAVE_HWASH 0
+#define HAVE_HWHDLCLAPB 0
+#define HAVE_HWIRDA 1
+#define HAVE_HWEC 0
+#define HAVE_HWIB 0
+
+/* 
+ * 
+ * Other Features.
+ * 
+ */
+#define HAVE_FW_MASQUERADE 1
+#define HAVE_IP_TOOLS 1
+#define HAVE_MII 1
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-config.make b/meta/recipes-extended/net-tools/net-tools/net-tools-config.make
new file mode 100644
index 0000000..ec516f2
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools/net-tools-config.make
@@ -0,0 +1,36 @@
+I18N=1
+HAVE_AFUNIX=1
+HAVE_AFINET=1
+HAVE_AFINET6=1
+# HAVE_AFIPX=0
+# HAVE_AFATALK=0
+# HAVE_AFAX25=0
+HAVE_AFNETROM=1
+# HAVE_AFROSE=0
+# HAVE_AFX25=0
+# HAVE_AFECONET=0
+# HAVE_AFDECnet=0
+# HAVE_AFASH=0
+HAVE_HWETHER=1
+HAVE_HWARC=1
+HAVE_HWSLIP=1
+HAVE_HWPPP=1
+HAVE_HWTUNNEL=1
+HAVE_HWSTRIP=1
+HAVE_HWTR=1
+# HAVE_HWAX25=0
+# HAVE_HWROSE=0
+HAVE_HWNETROM=1
+# HAVE_HWX25=0
+HAVE_HWFR=1
+# HAVE_HWSIT=0
+# HAVE_HWFDDI=0
+# HAVE_HWHIPPI=0
+# HAVE_HWASH=0
+# HAVE_HWHDLCLAPB=0
+HAVE_HWIRDA=1
+# HAVE_HWEC=0
+# HAVE_HWIB=0
+HAVE_FW_MASQUERADE=1
+HAVE_IP_TOOLS=1
+HAVE_MII=1
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
new file mode 100644
index 0000000..aefc1e6
--- /dev/null
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
@@ -0,0 +1,89 @@
+SUMMARY = "Basic networking tools"
+DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system"
+HOMEPAGE = "http://net-tools.berlios.de/"
+BUGTRACKER = "http://bugs.debian.org/net-tools"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+                    file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/n/${BPN}/${BPN}_1.60.orig.tar.gz;name=tarball \
+           http://snapshot.debian.org/archive/debian//20150831T093342Z/pool/main/n/${BPN}/${BPN}_${PV}.diff.gz;apply=no;name=patch \
+           file://net-tools-config.h \
+           file://net-tools-config.make \
+           file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \
+	   "
+
+S = "${WORKDIR}/net-tools-1.60"
+
+SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d"
+SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5"
+
+SRC_URI[patch.md5sum] = "ea3592f49ac8380962bc4d9b66c7e7e9"
+SRC_URI[patch.sha256sum] = "aeeeafaff68866a446f01bb639d4e0146a60af34dcd20e31a3e46585022fc76c"
+
+inherit gettext
+
+# The Makefile is lame, no parallel build
+PARALLEL_MAKE = ""
+
+# Unlike other Debian packages, net-tools *.diff.gz contains another series of
+# patches maintained by quilt. So manually apply them before applying other local
+# patches. Also remove all temp files before leaving, because do_patch() will pop 
+# up all previously applied patches in the start
+nettools_do_patch() {
+	cd ${S}
+	quilt pop -a || true
+	if [ -d ${S}/.pc-nettools ]; then
+		rm -rf ${S}/.pc
+		mv ${S}/.pc-nettools ${S}/.pc
+		QUILT_PATCHES=${S}/debian/patches quilt pop -a
+		rm -rf ${S}/.pc ${S}/debian
+	fi
+	patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff	
+	QUILT_PATCHES=${S}/debian/patches quilt push -a
+	mv ${S}/.pc ${S}/.pc-nettools
+}
+
+do_unpack[cleandirs] += "${S}"
+
+# We invoke base do_patch at end, to incorporate any local patch
+python do_patch() {
+    bb.build.exec_func('nettools_do_patch', d)
+    bb.build.exec_func('patch_do_patch', d)
+}
+
+do_configure() {
+	# net-tools has its own config mechanism requiring "make config"
+	# we pre-generate desired options and copy to source directory instead
+	cp ${WORKDIR}/net-tools-config.h    ${S}/config.h
+	cp ${WORKDIR}/net-tools-config.make ${S}/config.make
+}
+
+do_compile() {
+	# net-tools use COPTS/LOPTS to allow adding custom options
+	export COPTS="$CFLAGS"
+	export LOPTS="$LDFLAGS"
+	unset CFLAGS
+	unset LDFLAGS
+
+	oe_runmake
+}
+
+do_install() {
+	oe_runmake 'BASEDIR=${D}' install
+}
+
+inherit update-alternatives
+
+base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach"
+base_bindir_progs  = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname"
+
+ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}"
+python __anonymous() {
+	for prog in d.getVar('base_sbindir_progs', True).split():
+		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
+	for prog in d.getVar('base_bindir_progs', True).split():
+		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
+}
+ALTERNATIVE_PRIORITY = "100"
+
diff --git a/meta/recipes-extended/newt/files/cross_ar.patch b/meta/recipes-extended/newt/files/cross_ar.patch
new file mode 100644
index 0000000..03007aa
--- /dev/null
+++ b/meta/recipes-extended/newt/files/cross_ar.patch
@@ -0,0 +1,58 @@
+Fix cross link using autoconf detected AR
+
+If building on 32bit host and creating 64bit libraries, the target
+package builds should not invoke the 32bit hosts's ar.  Specifically
+you will get an error message like:
+
+x86_64-linux-gcc    -m64 --sysroot=/opt/qemux86-64/tmp/sysroots/qemux86-64 -g -o test test.o libnewt.a -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lslang
+libnewt.a: could not read symbols: Archive has no index; run ranlib to add one
+collect2: error: ld returned 1 exit status
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in  | 3 ++-
+ configure.ac | 4 ++++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -7,6 +7,7 @@ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+ CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ 
+ GNU_LD = @GNU_LD@
++AR = @AR@
+ 
+ VERSION = @VERSION@
+ TAG = r$(subst .,-,$(VERSION))
+@@ -109,7 +110,7 @@ whiptcl.$(SOEXT): $(WHIPTCLOBJS) $(LIBNEWTSH)
+ 	$(CC) -shared $(SHCFLAGS) $(LDFLAGS) -o whiptcl.$(SOEXT) $(WHIPTCLOBJS) -L. -lnewt  $(LIBTCL) -lpopt $(LIBS)
+ 
+ $(LIBNEWT): $(LIBOBJS)
+-	ar rv $@ $^
++	$(AR) rv $@ $^
+ 
+ newt.o $(SHAREDDIR)/newt.o: newt.c Makefile
+ 
+diff --git a/configure.ac b/configure.ac
+index 92e6da8..cd83d57 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -15,6 +15,10 @@ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_GREP
+ AC_SYS_LARGEFILE
++AN_MAKEVAR([AR], [AC_PROG_AR])
++AN_PROGRAM([ar], [AC_PROG_AR])
++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
++AC_PROG_AR
+ 
+ # Are we using GNU ld?
+ AC_MSG_CHECKING([for GNU ld])
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch
new file mode 100644
index 0000000..b0a1e8c
--- /dev/null
+++ b/meta/recipes-extended/newt/files/fix_SHAREDDIR.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Pending
+
+Author: dexuan.cui@intel.com
+Date: Fri Apr 15 16:17:39 CST 2011
+
+The patch fixes a parallel-make issue: when generating $(SHAREDDIR)/%.o, we should
+ensure the directory ${SHAREDDIR} exists.
+
+We need to push the patch to upstream.
+
+Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -128,12 +128,12 @@ $(SHAREDDIR):
+ 
+ sharedlib: $(LIBNEWTSH)
+ 
+-$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
++$(LIBNEWTSH): $(SHAREDOBJS)
+ 	$(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) $(SHAREDOBJS) $(LDFLAGS) $(LIBS)
+ 	ln -fs $(LIBNEWTSONAME) libnewt.$(SOEXT)
+ 	ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
+ 
+-$(SHAREDDIR)/%.o : %.c
++$(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
+ 	$(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
+ 
+ install: $(LIBNEWT) install-sh whiptail
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-extended/newt/files/remove_slang_include.patch b/meta/recipes-extended/newt/files/remove_slang_include.patch
new file mode 100644
index 0000000..a2634ec
--- /dev/null
+++ b/meta/recipes-extended/newt/files/remove_slang_include.patch
@@ -0,0 +1,16 @@
+
+Upstream-Status: Pending
+
+Index: git/Makefile.in
+===================================================================
+--- git.orig/Makefile.in
++++ git/Makefile.in
+@@ -5,7 +5,7 @@ CC = @CC@
+ CPP = @CPP@
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@
+-CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ 
++CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ 
+ GNU_LD = @GNU_LD@
+ 
+ VERSION = @VERSION@
diff --git a/meta/recipes-extended/newt/libnewt-python_0.52.18.bb b/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
new file mode 100644
index 0000000..94a41a3
--- /dev/null
+++ b/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
@@ -0,0 +1,29 @@
+require recipes-extended/newt/libnewt_${PV}.bb
+
+SUMMARY .= " - python"
+DEPENDS = "libnewt python"
+RDEPENDS_${PN} += "python-core"
+
+inherit pythonnative python-dir
+
+EXTRA_OECONF += "--with-python"
+EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
+
+
+do_compile () {
+	VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
+	oe_runmake _snack.so
+}
+
+do_install () {
+	install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+	install -m 0755 ${PYTHON_DIR}/_snack.so ${D}${PYTHON_SITEPACKAGES_DIR}/
+	install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/
+}
+
+PACKAGES_remove = "whiptail"
+
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/newt/libnewt_0.52.18.bb b/meta/recipes-extended/newt/libnewt_0.52.18.bb
new file mode 100644
index 0000000..302e418
--- /dev/null
+++ b/meta/recipes-extended/newt/libnewt_0.52.18.bb
@@ -0,0 +1,56 @@
+SUMMARY = "A library for text mode user interfaces"
+
+DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
+interfaces.  Newt can be used to add stacked windows, entry widgets, \
+checkboxes, radio buttons, labels, plain text fields, scrollbars, \
+etc., to text mode user interfaces.  This package also contains the \
+shared library needed by programs built with newt, as well as a \
+/usr/bin/dialog replacement called whiptail.  Newt is based on the \
+slang library."
+
+HOMEPAGE = "https://fedorahosted.org/newt/"
+SECTION = "libs"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+# slang needs to be >= 2.2
+DEPENDS = "slang popt"
+
+SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
+           file://remove_slang_include.patch \
+           file://fix_SHAREDDIR.patch \
+           file://cross_ar.patch \
+"
+
+SRC_URI[md5sum] = "685721bee1a318570704b19dcf31d268"
+SRC_URI[sha256sum] = "771b0e634ede56ae6a6acd910728bb5832ac13ddb0d1d27919d2498dab70c91e"
+
+S = "${WORKDIR}/newt-${PV}"
+
+EXTRA_OECONF = "--without-tcl --without-python"
+
+inherit autotools-brokensep
+
+CLEANBROKEN = "1"
+
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+export BUILD_SYS
+export HOST_SYS
+
+PACKAGES_prepend = "whiptail "
+
+do_configure_prepend() {
+    sh autogen.sh
+}
+
+do_compile_prepend() {
+    # Make sure the recompile is OK
+    rm -f ${B}/.depend
+}
+
+FILES_whiptail = "${bindir}/whiptail"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
new file mode 100644
index 0000000..1d7e608
--- /dev/null
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
@@ -0,0 +1,162 @@
+#
+# Copyright (C) 2010 Intel Corporation
+#
+
+SUMMARY = "Standard full-featured Linux system"
+DESCRIPTION = "Package group bringing in packages needed for a more traditional full-featured Linux system"
+PR = "r6"
+LICENSE = "MIT"
+
+inherit packagegroup
+
+PACKAGES = "\
+    packagegroup-core-full-cmdline \
+    packagegroup-core-full-cmdline-libs \
+    packagegroup-core-full-cmdline-utils \
+    packagegroup-core-full-cmdline-extended \
+    packagegroup-core-full-cmdline-dev-utils \
+    packagegroup-core-full-cmdline-multiuser \
+    packagegroup-core-full-cmdline-initscripts \
+    packagegroup-core-full-cmdline-sys-services \
+    "
+
+python __anonymous () {
+    # For backwards compatibility after rename
+    namemap = {}
+    namemap["packagegroup-core-full-cmdline"] = "packagegroup-core-basic"
+    namemap["packagegroup-core-full-cmdline-libs"] = "packagegroup-core-basic-libs"
+    namemap["packagegroup-core-full-cmdline-utils"] = "packagegroup-core-basic-utils"
+    namemap["packagegroup-core-full-cmdline-extended"] = "packagegroup-core-basic-extended"
+    namemap["packagegroup-core-full-cmdline-dev-utils"] = "packagegroup-core-dev-utils"
+    namemap["packagegroup-core-full-cmdline-multiuser"] = "packagegroup-core-multiuser"
+    namemap["packagegroup-core-full-cmdline-initscripts"] = "packagegroup-core-initscripts"
+    namemap["packagegroup-core-full-cmdline-sys-services"] = "packagegroup-core-sys-services"
+
+    packages = d.getVar("PACKAGES", True).split()
+    for pkg in packages:
+        if pkg.endswith('-dev'):
+            mapped = namemap.get(pkg[:-4], None)
+            if mapped:
+                mapped += '-dev'
+        elif pkg.endswith('-dbg'):
+            mapped = namemap.get(pkg[:-4], None)
+            if mapped:
+                mapped += '-dbg'
+        else:
+            mapped = namemap.get(pkg, None)
+
+        if mapped:
+            oldtaskname = mapped.replace("packagegroup-core", "task-core")
+            mapstr = " %s %s" % (mapped, oldtaskname)
+            d.appendVar("RPROVIDES_%s" % pkg, mapstr)
+            d.appendVar("RREPLACES_%s" % pkg, mapstr)
+            d.appendVar("RCONFLICTS_%s" % pkg, mapstr)
+}
+
+
+RDEPENDS_packagegroup-core-full-cmdline = "\
+    packagegroup-core-full-cmdline-libs \
+    packagegroup-core-full-cmdline-utils \
+    packagegroup-core-full-cmdline-extended \
+    packagegroup-core-full-cmdline-dev-utils \
+    packagegroup-core-full-cmdline-multiuser \
+    packagegroup-core-full-cmdline-initscripts \
+    packagegroup-core-full-cmdline-sys-services \
+    "
+
+RDEPENDS_packagegroup-core-full-cmdline-libs = "\
+    glib-2.0 \
+    "
+
+RDEPENDS_packagegroup-core-full-cmdline-utils = "\
+    bash \
+    acl \
+    attr \
+    bc \
+    coreutils \
+    cpio \
+    e2fsprogs \
+    ed \
+    file \
+    findutils \
+    gawk \
+    gmp \
+    grep \
+    makedevs \
+    mc \
+    mc-fish \
+    mc-helpers \
+    mc-helpers-perl \
+    mc-helpers-python \
+    mktemp \
+    ncurses \
+    net-tools \
+    pax \
+    popt \
+    procps \
+    psmisc \
+    sed \
+    tar \
+    time \
+    util-linux \
+    zlib \
+    "
+
+RDEPENDS_packagegroup-core-full-cmdline-extended = "\
+    iproute2 \
+    iputils \
+    iptables \
+    module-init-tools \
+    openssl \
+    "
+
+RDEPENDS_packagegroup-core-full-cmdline-dev-utils = "\
+    byacc \
+    diffutils \
+    m4 \
+    make \
+    patch \
+    "
+
+VIRTUAL-RUNTIME_initscripts ?= "initscripts"
+VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
+VIRTUAL-RUNTIME_login_manager ?= "busybox"
+VIRTUAL-RUNTIME_syslog ?= "sysklogd"
+RDEPENDS_packagegroup-core-full-cmdline-initscripts = "\
+    ${VIRTUAL-RUNTIME_initscripts} \
+    ${VIRTUAL-RUNTIME_init_manager} \
+    ethtool \
+    ${VIRTUAL-RUNTIME_login_manager} \
+    ${VIRTUAL-RUNTIME_syslog} \
+    "
+
+RDEPENDS_packagegroup-core-full-cmdline-multiuser = "\
+    cracklib \
+    gzip \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libuser', '', d)} \
+    shadow \
+    sudo \
+    "
+
+RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\
+    at \
+    bzip2 \
+    cronie \
+    dbus \
+    dbus-glib \
+    python-dbus \
+    elfutils \
+    gzip \
+    less \
+    libcap \
+    libevent \
+    logrotate \
+    nfs-utils \
+    pciutils \
+    libpcre \
+    rpcbind \
+    sysfsutils \
+    tcp-wrappers \
+    tzdata \
+    "
+
diff --git a/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
new file mode 100644
index 0000000..ce82385
--- /dev/null
+++ b/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -0,0 +1,278 @@
+#
+# Copyright (C) 2010 Intel Corporation
+#
+
+SUMMARY = "Linux Standard Base (LSB)"
+DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specification"
+PR = "r10"
+LICENSE = "MIT"
+
+inherit packagegroup distro_features_check
+
+# The libxt, libxtst and others require x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+#
+# We will skip parsing this packagegeoup for non-glibc systems
+#
+python __anonymous () {
+    if d.getVar('TCLIBC', True) != "glibc":
+        raise bb.parse.SkipPackage("incompatible with %s C library" %
+                                   d.getVar('TCLIBC', True))
+}
+
+PACKAGES = "\
+    packagegroup-core-lsb \
+    packagegroup-core-sys-extended \
+    packagegroup-core-db \
+    packagegroup-core-perl \
+    packagegroup-core-python \
+    packagegroup-core-tcl \
+    packagegroup-core-lsb-misc \
+    packagegroup-core-lsb-core \
+    packagegroup-core-lsb-perl \
+    packagegroup-core-lsb-python \
+    packagegroup-core-lsb-desktop \
+    packagegroup-core-lsb-runtime-add \
+    "
+
+
+RDEPENDS_packagegroup-core-lsb = "\
+    packagegroup-core-sys-extended \
+    packagegroup-core-db \
+    packagegroup-core-perl \
+    packagegroup-core-python \
+    packagegroup-core-tcl \
+    packagegroup-core-lsb-misc \
+    packagegroup-core-lsb-core \
+    packagegroup-core-lsb-perl \
+    packagegroup-core-lsb-python \
+    packagegroup-core-lsb-desktop \
+    packagegroup-core-lsb-runtime-add \
+    "
+
+
+RDEPENDS_packagegroup-core-sys-extended = "\
+    curl \
+    dhcp-client \
+    hdparm \
+    lighttpd \
+    libaio \
+    lrzsz \
+    lzo \
+    mc \
+    mc-fish \
+    mc-helpers \
+    mc-helpers-perl \
+    mc-helpers-python \
+    mdadm \
+    minicom \
+    neon \
+    parted \
+    ${PTH} \
+    quota \
+    screen \
+    setserial \
+    sysstat \
+    udev-extraconf \
+    unzip \
+    watchdog \
+    wget \
+    which \
+    xinetd \
+    zip \
+    "
+
+RDEPENDS_packagegroup-core-db = "\
+    db \
+    sqlite3 \
+    "
+
+RDEPENDS_packagegroup-core-perl = "\
+    gdbm \
+    perl \
+    zlib \
+    "
+
+
+RDEPENDS_packagegroup-core-python = "\
+    expat \
+    gdbm \
+    gmp \
+    ncurses \
+    openssl \
+    python \
+    readline \
+    zip \
+    "
+
+RDEPENDS_packagegroup-core-tcl = "\
+    tcl \
+    "
+
+# Miscellaneous packages required by LSB (or LSB tests)
+RDEPENDS_packagegroup-core-lsb-misc = "\
+    chkconfig \
+    gettext \
+    gettext-runtime \
+    groff \
+    lsbinitscripts \
+    lsbtest \
+    lsof \
+    strace \
+    libusb1 \
+    usbutils \
+    rpm \
+    "
+
+SUMMARY_packagegroup-core-lsb-core = "LSB Core"
+DESCRIPTION_packagegroup-core-lsb-core = "Packages required to support commands/libraries \
+    specified in the LSB Core specification"
+RDEPENDS_packagegroup-core-lsb-core = "\
+    at \
+    bash \
+    bc \
+    binutils \
+    binutils-symlinks \
+    coreutils \
+    cpio \
+    cronie \
+    cups \
+    diffutils \
+    ed \
+    glibc-utils \
+    elfutils \
+    file \
+    findutils \
+    fontconfig-utils \
+    foomatic-filters \
+    gawk \
+    ghostscript \
+    grep \
+    gzip \
+    localedef \
+    lsb \
+    m4 \
+    mailx \
+    make \
+    man \
+    man-pages \
+    mktemp \
+    msmtp \
+    patch \
+    pax \
+    procps \
+    psmisc \
+    sed \
+    shadow \
+    tar \
+    time \
+    util-linux \
+    xdg-utils \
+    \
+    glibc \
+    libgcc \
+    libpam \
+    libxml2 \
+    ncurses \
+    zlib \
+    nspr \
+    libpng12 \
+    nss \
+"
+
+SUMMARY_packagegroup-core-lsb-perl = "LSB Runtime Languages (Perl)"
+DESCRIPTION_packagegroup-core-lsb-perl = "Packages required to support libraries \
+    specified in the LSB Runtime languages specification (Perl parts)"
+RDEPENDS_packagegroup-core-lsb-perl = "\
+    perl \
+    perl-modules \
+    perl-misc \
+    perl-pod \
+    perl-dev \
+    perl-doc \
+"
+
+SUMMARY_packagegroup-core-lsb-python = "LSB Runtime Languages (Python)"
+DESCRIPTION_packagegroup-core-lsb-python = "Packages required to support libraries \
+    specified in the LSB Runtime languages specification (Python parts)"
+RDEPENDS_packagegroup-core-lsb-python = "\
+    python \
+    python-modules \
+    python-misc \
+"
+
+def get_libqt3(d):
+    if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) or "":
+        if 'qt3' in d.getVar('BBFILE_COLLECTIONS', False) or "":
+            return 'libqt-mt3'
+
+        bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x' \
+                'libraries. Its intended use is for passing LSB tests as Qt3 is' \
+                'a requirement for LSB.')
+    return ''
+
+QT4PKGS = " \
+    libqtcore4 \
+    libqtgui4 \
+    libqtsql4 \
+    libqtsvg4 \
+    libqtxml4 \
+    libqtnetwork4 \
+    qt4-plugin-sqldriver-sqlite \
+    ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libqtopengl4", "", d)} \
+    "
+QT4PKGS_mips64 = ""
+QT4PKGS_mips64n32 = ""
+
+SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop"
+DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \
+    specified in the LSB Desktop specification"
+RDEPENDS_packagegroup-core-lsb-desktop = "\
+    libxt \
+    libxxf86vm \
+    libdrm \
+    libglu \
+    libxi \
+    libxtst \
+    libx11-locale \
+    xorg-minimal-fonts \
+    gdk-pixbuf-loader-ico \
+    gdk-pixbuf-loader-bmp \
+    gdk-pixbuf-loader-ani \
+    gdk-pixbuf-xlib \
+    liberation-fonts \
+    gtk+ \
+    atk \
+    libasound \
+    ${QT4PKGS} \
+    ${@get_libqt3(d)} \
+"
+
+RDEPENDS_packagegroup-core-lsb-runtime-add = "\
+    ldd \
+    pam-plugin-wheel \
+    e2fsprogs-mke2fs \
+    mkfontdir \
+    liburi-perl \
+    libxml-parser-perl \
+    libxml-perl \
+    libxml-sax-perl \
+    glibc-localedatas \
+    glibc-gconvs \
+    glibc-charmaps \
+    glibc-binaries \
+    glibc-localedata-posix \
+    glibc-extra-nss \
+    glibc-pcprofile \
+    libclass-isa-perl \
+    libenv-perl \
+    libdumpvalue-perl \
+    libfile-checktree-perl \
+    libi18n-collate-perl \
+    libpod-plainer-perl \
+"
+
+PTH = "pth"
+PTH_libc-uclibc = ""
+
diff --git a/meta/recipes-extended/pam/libpam/99_pam b/meta/recipes-extended/pam/libpam/99_pam
new file mode 100644
index 0000000..97e990d
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/99_pam
@@ -0,0 +1 @@
+d root root 0755 /var/run/sepermit none
diff --git a/meta/recipes-extended/pam/libpam/crypt_configure.patch b/meta/recipes-extended/pam/libpam/crypt_configure.patch
new file mode 100644
index 0000000..bec82a5
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/crypt_configure.patch
@@ -0,0 +1,31 @@
+This patch fixes a case where it find crypt defined in libc (musl) but
+not in specified libraries then it ends up assigning
+
+LIBCRYPT="-l" which then goes into makefile cause all sort of problems
+e.g.
+
+ld: cannot find -l-m32
+| collect2: error: ld returned 1 exit status
+
+The reason is that -l appears on commandline with out any library and
+compiler treats the next argument as library name whatever it is.
+
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: Linux-PAM-1.1.6/configure.in
+===================================================================
+--- Linux-PAM-1.1.6.org/configure.ac
++++ Linux-PAM-1.1.6/configure.ac
+@@ -400,7 +400,9 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" =
+   [crypt_libs="crypt"])
+ 
+ BACKUP_LIBS=$LIBS
+-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
++AC_SEARCH_LIBS([crypt],[$crypt_libs],
++	       [test "$ac_cv_search_crypt" = "none required" ||
++		LIBCRYPT="$ac_cv_search_crypt"])
+ AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
+ LIBS=$BACKUP_LIBS
+ AC_SUBST(LIBCRYPT)
diff --git a/meta/recipes-extended/pam/libpam/fixsepbuild.patch b/meta/recipes-extended/pam/libpam/fixsepbuild.patch
new file mode 100644
index 0000000..8a9c3b2
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/fixsepbuild.patch
@@ -0,0 +1,24 @@
+Fix the build error when a separate build directory is used:
+
+Making install in xtestsmake[1]: Entering directory `/media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/build/xtests'/usr/bin/install -c -d /media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/image/usr/share/Linux-PAM/xtestsfor file in run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd tst-pam_dispatch5.pamd tst-pam_cracklib1.pamd tst-pam_cracklib2.pamd tst-pam_unix1.pamd tst-pam_unix2.pamd tst-pam_unix3.pamd tst-pam_unix4.pamd tst-pam_unix1.sh tst-pam_unix2.sh tst-pam_unix3.sh tst-pam_unix4.sh access.conf tst-pam_access1.pamd tst-pam_access1.sh tst-pam_access2.pamd tst-pam_access2.sh tst-pam_access3.pamd tst-pam_access3.sh tst-pam_access4.pamd tst-pam_access4.sh limits.conf tst-pam_limits1.pamd tst-pam_limits1.sh tst-pam_succeed_if1.pamd tst-pam_succeed_if1.sh group.conf tst-pam_group1.pamd tst-pam_group1.sh tst-pam_authfail.pamd tst-pam_authsucceed.pamd tst-pam_substack1.pamd tst-pam_substack1a.pamd tst-pam_substack1.sh tst-pam_substack2.pamd tst-pam_substack2a.pamd tst-pam_substack2.sh tst-pam_substack3.pamd tst-pam_substack3a.pamd tst-pam_substack3.sh tst-pam_substack4.pamd tst-pam_substack4a.pamd tst-pam_substack4.sh tst-pam_substack5.pamd tst-pam_substack5a.pamd tst-pam_substack5.sh tst-pam_assemble_line1.pamd tst-pam_assemble_line1.sh tst-pam_pwhistory1.pamd tst-pam_pwhistory1.sh tst-pam_time1.pamd time.conf ; do \/usr/bin/install -c $file /media/build1/poky/build1/tmp/work/i586-poky-linux/libpam/1.1.6-r2/image/usr/share/Linux-PAM/xtests ; \	done
+/usr/bin/install: cannot stat `run-xtests.sh': No such file or directory
+/usr/bin/install: cannot stat `tst-pam_dispatch1.pamd': No such file or directory
+/usr/bin/install: cannot stat `tst-pam_dispatch2.pamd': No such file or directory
+
+Upstream-Status: Pending
+
+RP 2013/03/21
+
+Index: Linux-PAM-1.1.6/xtests/Makefile.am
+===================================================================
+--- Linux-PAM-1.1.6.orig/xtests/Makefile.am	2013-03-08 12:26:30.360266000 +0000
++++ Linux-PAM-1.1.6/xtests/Makefile.am	2013-03-21 11:39:58.557166650 +0000
+@@ -59,7 +59,7 @@
+ install_xtests:
+ 	$(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests
+ 	for file in $(EXTRA_DIST) ; do \
+-		$(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \
++		$(INSTALL) $(srcdir)/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
+ 	done
+ 	for file in $(XTESTS); do \
+ 		$(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch
new file mode 100644
index 0000000..680029a
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/libpam-xtests-remove-bash-dependency.patch
@@ -0,0 +1,226 @@
+From 555407ff6e2f742df64ae93859f14a0fc1397829 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Fri, 12 Sep 2014 05:35:05 -0400
+Subject: [PATCH] libpam/xtests: remove bash dependency
+
+There's not bash specific syntax in the xtest scripts:
+
+  # after below patches applied:
+  $ cd Linux-PAM-1.1.6/xtests
+  $ checkbashisms *.sh
+  No output
+
+Just remove the runtime dependency to bash.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ xtests/run-xtests.sh             |    2 +-
+ xtests/tst-pam_access1.sh        |    2 +-
+ xtests/tst-pam_access2.sh        |    2 +-
+ xtests/tst-pam_access3.sh        |    2 +-
+ xtests/tst-pam_access4.sh        |    2 +-
+ xtests/tst-pam_assemble_line1.sh |    2 +-
+ xtests/tst-pam_group1.sh         |    2 +-
+ xtests/tst-pam_limits1.sh        |    2 +-
+ xtests/tst-pam_pwhistory1.sh     |    2 +-
+ xtests/tst-pam_substack1.sh      |    2 +-
+ xtests/tst-pam_substack2.sh      |    2 +-
+ xtests/tst-pam_substack3.sh      |    2 +-
+ xtests/tst-pam_substack4.sh      |    2 +-
+ xtests/tst-pam_substack5.sh      |    2 +-
+ xtests/tst-pam_succeed_if1.sh    |    2 +-
+ xtests/tst-pam_unix1.sh          |    2 +-
+ xtests/tst-pam_unix2.sh          |    2 +-
+ xtests/tst-pam_unix3.sh          |    2 +-
+ xtests/tst-pam_unix4.sh          |    2 +-
+ 19 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/xtests/run-xtests.sh b/xtests/run-xtests.sh
+index 3a89057..1cf8684 100755
+--- a/xtests/run-xtests.sh
++++ b/xtests/run-xtests.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ SRCDIR=$1
+ shift 1
+diff --git a/xtests/tst-pam_access1.sh b/xtests/tst-pam_access1.sh
+index 180d256..70521d2 100755
+--- a/xtests/tst-pam_access1.sh
++++ b/xtests/tst-pam_access1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/groupadd tstpamaccess
+ /usr/sbin/useradd -G tstpamaccess -p '!!' tstpamaccess1
+diff --git a/xtests/tst-pam_access2.sh b/xtests/tst-pam_access2.sh
+index 0a30275..7e3e60f 100755
+--- a/xtests/tst-pam_access2.sh
++++ b/xtests/tst-pam_access2.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/groupadd tstpamaccess
+ /usr/sbin/useradd -p '!!' tstpamaccess2
+diff --git a/xtests/tst-pam_access3.sh b/xtests/tst-pam_access3.sh
+index 348e0c3..3630e2e 100755
+--- a/xtests/tst-pam_access3.sh
++++ b/xtests/tst-pam_access3.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/useradd -p '!!' tstpamaccess3
+ ./tst-pam_access3
+diff --git a/xtests/tst-pam_access4.sh b/xtests/tst-pam_access4.sh
+index 61e7b44..4538df4 100755
+--- a/xtests/tst-pam_access4.sh
++++ b/xtests/tst-pam_access4.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/useradd -p '!!' tstpamaccess4
+ ./tst-pam_access4
+diff --git a/xtests/tst-pam_assemble_line1.sh b/xtests/tst-pam_assemble_line1.sh
+index 248d47e..dc2a675 100755
+--- a/xtests/tst-pam_assemble_line1.sh
++++ b/xtests/tst-pam_assemble_line1.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ exec ./tst-pam_authfail tst-pam_assemble_line1
+diff --git a/xtests/tst-pam_group1.sh b/xtests/tst-pam_group1.sh
+index b76377f..44faca9 100755
+--- a/xtests/tst-pam_group1.sh
++++ b/xtests/tst-pam_group1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/groupadd tstpamgrpg
+ /usr/sbin/useradd -p '!!' tstpamgrp
+diff --git a/xtests/tst-pam_limits1.sh b/xtests/tst-pam_limits1.sh
+index 4faa822..32c021d 100755
+--- a/xtests/tst-pam_limits1.sh
++++ b/xtests/tst-pam_limits1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/useradd -p '!!' tstpamlimits
+ ./tst-pam_limits1
+diff --git a/xtests/tst-pam_pwhistory1.sh b/xtests/tst-pam_pwhistory1.sh
+index ddb3b8b..0f212e2 100644
+--- a/xtests/tst-pam_pwhistory1.sh
++++ b/xtests/tst-pam_pwhistory1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/useradd tstpampwhistory
+ ./tst-pam_pwhistory1
+diff --git a/xtests/tst-pam_substack1.sh b/xtests/tst-pam_substack1.sh
+index 5260175..f1b72a7 100755
+--- a/xtests/tst-pam_substack1.sh
++++ b/xtests/tst-pam_substack1.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ exec ./tst-pam_authfail tst-pam_substack1
+diff --git a/xtests/tst-pam_substack2.sh b/xtests/tst-pam_substack2.sh
+index c02f597..3804fa7 100755
+--- a/xtests/tst-pam_substack2.sh
++++ b/xtests/tst-pam_substack2.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ exec ./tst-pam_authsucceed tst-pam_substack2
+diff --git a/xtests/tst-pam_substack3.sh b/xtests/tst-pam_substack3.sh
+index 0e572aa..aa48e8e 100755
+--- a/xtests/tst-pam_substack3.sh
++++ b/xtests/tst-pam_substack3.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ exec ./tst-pam_authsucceed tst-pam_substack3
+diff --git a/xtests/tst-pam_substack4.sh b/xtests/tst-pam_substack4.sh
+index a3ef08a..958a07a 100755
+--- a/xtests/tst-pam_substack4.sh
++++ b/xtests/tst-pam_substack4.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ exec ./tst-pam_authsucceed tst-pam_substack4
+diff --git a/xtests/tst-pam_substack5.sh b/xtests/tst-pam_substack5.sh
+index e2714fd..7e0da74 100755
+--- a/xtests/tst-pam_substack5.sh
++++ b/xtests/tst-pam_substack5.sh
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ exec ./tst-pam_authfail tst-pam_substack5
+diff --git a/xtests/tst-pam_succeed_if1.sh b/xtests/tst-pam_succeed_if1.sh
+index a643b2e..58e57b4 100755
+--- a/xtests/tst-pam_succeed_if1.sh
++++ b/xtests/tst-pam_succeed_if1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/useradd -p '!!' tstpamtest
+ /usr/sbin/useradd -p '!!' pamtest
+diff --git a/xtests/tst-pam_unix1.sh b/xtests/tst-pam_unix1.sh
+index f75bd84..72deac0 100755
+--- a/xtests/tst-pam_unix1.sh
++++ b/xtests/tst-pam_unix1.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ /usr/sbin/useradd -p '!!' tstpamunix
+ ./tst-pam_unix1
+diff --git a/xtests/tst-pam_unix2.sh b/xtests/tst-pam_unix2.sh
+index 7093155..c04d6e6 100755
+--- a/xtests/tst-pam_unix2.sh
++++ b/xtests/tst-pam_unix2.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # pamunix0 = 0aXKZztA.d1KY
+ /usr/sbin/useradd -p 0aXKZztA.d1KY  tstpamunix
+diff --git a/xtests/tst-pam_unix3.sh b/xtests/tst-pam_unix3.sh
+index ef4a07c..b52db2b 100755
+--- a/xtests/tst-pam_unix3.sh
++++ b/xtests/tst-pam_unix3.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
+ /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
+diff --git a/xtests/tst-pam_unix4.sh b/xtests/tst-pam_unix4.sh
+index 787c2f9..e7976fd 100755
+--- a/xtests/tst-pam_unix4.sh
++++ b/xtests/tst-pam_unix4.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ 
+ # pamunix01 = 0aXKZztA.d1KYIuFXArmd2jU
+ /usr/sbin/useradd -p 0aXKZztA.d1KYIuFXArmd2jU tstpamunix
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
new file mode 100644
index 0000000..be68745
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
@@ -0,0 +1,35 @@
+This patch is used to create a new sub package libpam-xtests to do more checks.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+--- Linux-PAM-1.1.4/xtests/Makefile.am.orig	2011-07-19 17:00:09.619980001 +0800
++++ Linux-PAM-1.1.4/xtests/Makefile.am	2011-07-19 16:54:00.229979998 +0800
+@@ -7,7 +7,7 @@
+ AM_LDFLAGS = -L$(top_builddir)/libpam -lpam \
+ 	-L$(top_builddir)/libpam_misc -lpam_misc
+ 
+-CLEANFILES = *~ $(XTESTS)
++CLEANFILES = *~
+ 
+ EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
+ 	tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
+@@ -51,3 +51,18 @@
+ 
+ xtests: $(XTESTS) run-xtests.sh
+ 	"$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
++
++all: $(XTESTS)
++
++install: install_xtests
++
++install_xtests:
++	$(INSTALL) -d $(DESTDIR)$(pkgdatadir)/xtests
++	for file in $(EXTRA_DIST) ; do \
++		$(INSTALL) $$file $(DESTDIR)$(pkgdatadir)/xtests ; \
++	done
++	for file in $(XTESTS); do \
++		$(INSTALL) .libs/$$file $(DESTDIR)$(pkgdatadir)/xtests ; \
++	done
++
++.PHONY: all install_xtests
diff --git a/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch
new file mode 100644
index 0000000..5e551ac
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch
@@ -0,0 +1,97 @@
+innetgr may not be there so make sure that when innetgr is not present
+then we inform about it and not use it.
+
+-Khem
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: Linux-PAM-1.1.3/modules/pam_group/pam_group.c
+===================================================================
+--- Linux-PAM-1.1.3.orig/modules/pam_group/pam_group.c
++++ Linux-PAM-1.1.3/modules/pam_group/pam_group.c
+@@ -659,7 +659,11 @@ static int check_account(pam_handle_t *p
+ 	}
+ 	/* If buffer starts with @, we are using netgroups */
+ 	if (buffer[0] == '@')
+-	  good &= innetgr (&buffer[1], NULL, user, NULL);
++#ifdef HAVE_INNETGR
++           good &= innetgr (&buffer[1], NULL, user, NULL);
++#else
++           pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
++#endif
+ 	/* otherwise, if the buffer starts with %, it's a UNIX group */
+ 	else if (buffer[0] == '%')
+           good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
+Index: Linux-PAM-1.1.3/modules/pam_time/pam_time.c
+===================================================================
+--- Linux-PAM-1.1.3.orig/modules/pam_time/pam_time.c
++++ Linux-PAM-1.1.3/modules/pam_time/pam_time.c
+@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const
+ 	  }
+ 	  /* If buffer starts with @, we are using netgroups */
+ 	  if (buffer[0] == '@')
+-	    good &= innetgr (&buffer[1], NULL, user, NULL);
++#ifdef HAVE_INNETGR
++	       good &= innetgr (&buffer[1], NULL, user, NULL);
++#else
++	       pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
++#endif
+ 	  else
+-	    good &= logic_field(pamh, user, buffer, count, is_same);
++	       good &= logic_field(pamh, user, buffer, count, is_same);
+ 	  D(("with user: %s", good ? "passes":"fails" ));
+ 
+ 	  /* here we get the time field */
+Index: Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
+===================================================================
+--- Linux-PAM-1.1.3.orig/modules/pam_succeed_if/pam_succeed_if.c
++++ Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
+@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh,
+ }
+ /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
+ static int
+-evaluate_innetgr(const char *host, const char *user, const char *group)
++evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
+ {
++#ifdef HAVE_INNETGR
+ 	if (innetgr(group, host, user, NULL) == 1)
+ 		return PAM_SUCCESS;
++#else
++        pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
++#endif
++
+ 	return PAM_AUTH_ERR;
+ }
+ /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
+ static int
+-evaluate_notinnetgr(const char *host, const char *user, const char *group)
++evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
+ {
++#ifdef HAVE_INNETGR
+ 	if (innetgr(group, host, user, NULL) == 0)
+ 		return PAM_SUCCESS;
++#else
++	pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
++#endif
+ 	return PAM_AUTH_ERR;
+ }
+ 
+@@ -361,14 +370,14 @@ evaluate(pam_handle_t *pamh, int debug,
+ 		const void *rhost;
+ 		if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
+ 			rhost = NULL;
+-		return evaluate_innetgr(rhost, user, right);
++		return evaluate_innetgr(pamh, rhost, user, right);
+ 	}
+ 	/* (Rhost, user) is not in this group. */
+ 	if (strcasecmp(qual, "notinnetgr") == 0) {
+ 		const void *rhost;
+ 		if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
+ 			rhost = NULL;
+-		return evaluate_notinnetgr(rhost, user, right);
++		return evaluate_notinnetgr(pamh, rhost, user, right);
+ 	}
+ 	/* Fail closed. */
+ 	return PAM_SERVICE_ERR;
diff --git a/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
new file mode 100644
index 0000000..f1834f6
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam-security-abstract-securetty-handling.patch
@@ -0,0 +1,200 @@
+Description: extract the securetty logic for use with the "nullok_secure" option
+ introduced in the "055_pam_unix_nullok_secure" patch.
+
+Upstream-Status: Pending
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+===================================================================
+diff -urpN a/modules/pam_securetty/Makefile.am b/modules/pam_securetty/Makefile.am
+--- a/modules/pam_securetty/Makefile.am	2013-07-05 11:08:23.224483237 +0800
++++ b/modules/pam_securetty/Makefile.am	2013-07-05 11:15:21.304486456 +0800
+@@ -24,6 +24,10 @@ endif
+ securelib_LTLIBRARIES = pam_securetty.la
+ pam_securetty_la_LIBADD = -L$(top_builddir)/libpam -lpam
+ 
++pam_securetty_la_SOURCES =	\
++	pam_securetty.c		\
++	tty_secure.c
++
+ if ENABLE_REGENERATE_MAN
+ noinst_DATA = README
+ README: pam_securetty.8.xml
+diff -urpN a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c
+--- a/modules/pam_securetty/pam_securetty.c	2013-07-05 11:07:50.064483568 +0800
++++ b/modules/pam_securetty/pam_securetty.c	2013-07-05 11:12:23.994483344 +0800
+@@ -1,7 +1,5 @@
+ /* pam_securetty module */
+ 
+-#define SECURETTY_FILE "/etc/securetty"
+-#define TTY_PREFIX     "/dev/"
+ #define CMDLINE_FILE   "/proc/cmdline"
+ #define CONSOLEACTIVE_FILE	"/sys/class/tty/console/active"
+ 
+@@ -40,6 +38,9 @@
+ #include <security/pam_modutil.h>
+ #include <security/pam_ext.h>
+ 
++extern int _pammodutil_tty_secure(const pam_handle_t *pamh,
++                                  const char *uttyname);
++
+ #define PAM_DEBUG_ARG       0x0001
+ #define PAM_NOCONSOLE_ARG   0x0002
+ 
+@@ -73,11 +74,7 @@ securetty_perform_check (pam_handle_t *p
+     const char *username;
+     const char *uttyname;
+     const void *void_uttyname;
+-    char ttyfileline[256];
+-    char ptname[256];
+-    struct stat ttyfileinfo;
+     struct passwd *user_pwd;
+-    FILE *ttyfile;
+ 
+     /* log a trail for debugging */
+     if (ctrl & PAM_DEBUG_ARG) {
+@@ -105,50 +102,7 @@ securetty_perform_check (pam_handle_t *p
+ 	return PAM_SERVICE_ERR;
+     }
+ 
+-    /* The PAM_TTY item may be prefixed with "/dev/" - skip that */
+-    if (strncmp(TTY_PREFIX, uttyname, sizeof(TTY_PREFIX)-1) == 0) {
+-	uttyname += sizeof(TTY_PREFIX)-1;
+-    }
+-
+-    if (stat(SECURETTY_FILE, &ttyfileinfo)) {
+-	pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m", SECURETTY_FILE);
+-	return PAM_SUCCESS; /* for compatibility with old securetty handling,
+-			       this needs to succeed.  But we still log the
+-			       error. */
+-    }
+-
+-    if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) {
+-	/* If the file is world writable or is not a
+-	   normal file, return error */
+-	pam_syslog(pamh, LOG_ERR,
+-		   "%s is either world writable or not a normal file",
+-		   SECURETTY_FILE);
+-	return PAM_AUTH_ERR;
+-    }
+-
+-    ttyfile = fopen(SECURETTY_FILE,"r");
+-    if (ttyfile == NULL) { /* Check that we opened it successfully */
+-	pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE);
+-	return PAM_SERVICE_ERR;
+-    }
+-
+-    if (isdigit(uttyname[0])) {
+-	snprintf(ptname, sizeof(ptname), "pts/%s", uttyname);
+-    } else {
+-	ptname[0] = '\0';
+-    }
+-
+-    retval = 1;
+-
+-    while ((fgets(ttyfileline, sizeof(ttyfileline)-1, ttyfile) != NULL)
+-	   && retval) {
+-	if (ttyfileline[strlen(ttyfileline) - 1] == '\n')
+-	    ttyfileline[strlen(ttyfileline) - 1] = '\0';
+-
+-	retval = ( strcmp(ttyfileline, uttyname)
+-		   && (!ptname[0] || strcmp(ptname, uttyname)) );
+-    }
+-    fclose(ttyfile);
++    retval = _pammodutil_tty_secure(pamh, uttyname);
+ 
+     if (retval && !(ctrl & PAM_NOCONSOLE_ARG)) {
+         FILE *cmdlinefile;
+diff -urpN a/modules/pam_securetty/tty_secure.c b/modules/pam_securetty/tty_secure.c
+--- a/modules/pam_securetty/tty_secure.c	1970-01-01 08:30:00.000000000 +0830
++++ b/modules/pam_securetty/tty_secure.c	2013-07-05 11:14:21.534482900 +0800
+@@ -0,0 +1,90 @@
++/*
++ * A function to determine if a particular line is in /etc/securetty
++ */
++
++
++#define SECURETTY_FILE "/etc/securetty"
++#define TTY_PREFIX     "/dev/"
++
++/* This function taken out of pam_securetty by Sam Hartman
++ * <hartmans@debian.org>*/
++/*
++ * by Elliot Lee <sopwith@redhat.com>, Red Hat Software.
++ * July 25, 1996.
++ * Slight modifications AGM. 1996/12/3
++ */
++
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <security/pam_modules.h>
++#include <stdarg.h>
++#include <syslog.h>
++#include <sys/syslog.h>
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++#include <ctype.h>
++#include <security/pam_modutil.h>
++#include <security/pam_ext.h>
++
++extern int _pammodutil_tty_secure(const pam_handle_t *pamh,
++                                  const char *uttyname);
++
++int _pammodutil_tty_secure(const pam_handle_t *pamh, const char *uttyname)
++{
++    int retval = PAM_AUTH_ERR;
++    char ttyfileline[256];
++    char ptname[256];
++    struct stat ttyfileinfo;
++    FILE *ttyfile;
++    /* The PAM_TTY item may be prefixed with "/dev/" - skip that */
++    if (strncmp(TTY_PREFIX, uttyname, sizeof(TTY_PREFIX)-1) == 0)
++	uttyname += sizeof(TTY_PREFIX)-1;
++
++    if (stat(SECURETTY_FILE, &ttyfileinfo)) {
++	pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m",
++	           SECURETTY_FILE);
++	return PAM_SUCCESS; /* for compatibility with old securetty handling,
++			       this needs to succeed.  But we still log the
++			       error. */
++    }
++
++    if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) {
++	/* If the file is world writable or is not a
++	   normal file, return error */
++	pam_syslog(pamh, LOG_ERR,
++	           "%s is either world writable or not a normal file",
++	           SECURETTY_FILE);
++	return PAM_AUTH_ERR;
++    }
++
++    ttyfile = fopen(SECURETTY_FILE,"r");
++    if(ttyfile == NULL) { /* Check that we opened it successfully */
++	pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE);
++	return PAM_SERVICE_ERR;
++    }
++
++    if (isdigit(uttyname[0])) {
++	snprintf(ptname, sizeof(ptname), "pts/%s", uttyname);
++    } else {
++	ptname[0] = '\0';
++    }
++
++    retval = 1;
++
++    while ((fgets(ttyfileline,sizeof(ttyfileline)-1, ttyfile) != NULL) 
++	   && retval) {
++	if(ttyfileline[strlen(ttyfileline) - 1] == '\n')
++	    ttyfileline[strlen(ttyfileline) - 1] = '\0';
++	retval = ( strcmp(ttyfileline,uttyname)
++	           && (!ptname[0] || strcmp(ptname, uttyname)) );
++    }
++    fclose(ttyfile);
++
++    if(retval) {
++	retval = PAM_AUTH_ERR;
++    }
++
++    return retval;
++}
diff --git a/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch b/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch
new file mode 100644
index 0000000..3241e82
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch
@@ -0,0 +1,240 @@
+From 9bdc197474795f2d000c2bc04f58f7cef8898f21 Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Wed, 15 Jul 2015 13:07:20 +0300
+Subject: [PATCH] Debian patch to add a new 'nullok_secure' option to pam_unix,
+ which accepts users with null passwords only when the applicant is connected
+ from a tty listed in /etc/securetty.
+
+Authors: Sam Hartman <hartmans@debian.org>,
+         Steve Langasek <vorlon@debian.org>
+
+Upstream-Status: Pending
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+v2:
+	- Forward ported from v1.1.6 to v1.2.1
+
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+ modules/pam_unix/Makefile.am    |  3 ++-
+ modules/pam_unix/README         | 11 ++++++++++-
+ modules/pam_unix/pam_unix.8     |  9 ++++++++-
+ modules/pam_unix/pam_unix.8.xml | 19 ++++++++++++++++++-
+ modules/pam_unix/support.c      | 40 +++++++++++++++++++++++++++++++++++-----
+ modules/pam_unix/support.h      |  8 ++++++--
+ 6 files changed, 79 insertions(+), 11 deletions(-)
+
+diff --git a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am
+index 56ed591..9a372ac 100644
+--- a/modules/pam_unix/Makefile.am
++++ b/modules/pam_unix/Makefile.am
+@@ -30,7 +30,8 @@ if HAVE_VERSIONING
+   pam_unix_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
+ endif
+ pam_unix_la_LIBADD = $(top_builddir)/libpam/libpam.la \
+-	@LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS)
++	@LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) \
++	../pam_securetty/tty_secure.lo
+ 
+ securelib_LTLIBRARIES = pam_unix.la
+ 
+diff --git a/modules/pam_unix/README b/modules/pam_unix/README
+index 3935dba..7880d91 100644
+--- a/modules/pam_unix/README
++++ b/modules/pam_unix/README
+@@ -67,7 +67,16 @@ nullok
+ 
+     The default action of this module is to not permit the user access to a
+     service if their official password is blank. The nullok argument overrides
+-    this default.
++    this default and allows any user with a blank password to access the
++    service.
++
++nullok_secure
++
++    The default action of this module is to not permit the user access to a
++    service if their official password is blank. The nullok_secure argument
++    overrides this default and allows any user with a blank password to access
++    the service as long as the value of PAM_TTY is set to one of the values
++    found in /etc/securetty.
+ 
+ try_first_pass
+ 
+diff --git a/modules/pam_unix/pam_unix.8 b/modules/pam_unix/pam_unix.8
+index 339178b..a4bd906 100644
+--- a/modules/pam_unix/pam_unix.8
++++ b/modules/pam_unix/pam_unix.8
+@@ -92,7 +92,14 @@ Turns off informational messages namely messages about session open and close vi
+ .RS 4
+ The default action of this module is to not permit the user access to a service if their official password is blank\&. The
+ \fBnullok\fR
+-argument overrides this default\&.
++argument overrides this default and allows any user with a blank password to access the service\&.
++.RE
++.PP
++\fBnullok_secure\fR
++.RS 4
++The default action of this module is to not permit the user access to a service if their official password is blank\&. The
++\fBnullok_secure\fR
++argument overrides this default and allows any user with a blank password to access the service as long as the value of PAM_TTY is set to one of the values found in /etc/securetty\&.
+ .RE
+ .PP
+ \fBtry_first_pass\fR
+diff --git a/modules/pam_unix/pam_unix.8.xml b/modules/pam_unix/pam_unix.8.xml
+index a8b64bb..1ced6f4 100644
+--- a/modules/pam_unix/pam_unix.8.xml
++++ b/modules/pam_unix/pam_unix.8.xml
+@@ -159,7 +159,24 @@
+           <para>
+             The default action of this module is to not permit the
+             user access to a service if their official password is blank.
+-            The <option>nullok</option> argument overrides this default.
++            The <option>nullok</option> argument overrides this default
++            and allows any user with a blank password to access the
++            service.
++          </para>
++        </listitem>
++      </varlistentry>
++      <varlistentry>
++        <term>
++          <option>nullok_secure</option>
++        </term>
++        <listitem>
++          <para>
++            The default action of this module is to not permit the
++            user access to a service if their official password is blank.
++            The <option>nullok_secure</option> argument overrides this
++            default and allows any user with a blank password to access
++            the service as long as the value of PAM_TTY is set to one of
++            the values found in /etc/securetty.
+           </para>
+         </listitem>
+       </varlistentry>
+diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
+index abccd82..2361957 100644
+--- a/modules/pam_unix/support.c
++++ b/modules/pam_unix/support.c
+@@ -189,13 +189,22 @@ int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds,
+ 	/* now parse the arguments to this module */
+ 
+ 	for (; argc-- > 0; ++argv) {
++		int sl;
+ 
+ 		D(("pam_unix arg: %s", *argv));
+ 
+ 		for (j = 0; j < UNIX_CTRLS_; ++j) {
+-			if (unix_args[j].token
+-			    && !strncmp(*argv, unix_args[j].token, strlen(unix_args[j].token))) {
+-				break;
++			if (unix_args[j].token) {
++				sl = strlen(unix_args[j].token);
++				if (unix_args[j].token[sl-1] == '=') {
++					/* exclude argument from comparison */
++					if (!strncmp(*argv, unix_args[j].token, sl))
++						break;
++				} else {
++				/* compare full strings */
++					if (!strcmp(*argv, unix_args[j].token))
++						break;
++				}
+ 			}
+ 		}
+ 
+@@ -566,6 +575,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
+     if (child == 0) {
+ 	static char *envp[] = { NULL };
+ 	const char *args[] = { NULL, NULL, NULL, NULL };
++	int nullok = off(UNIX__NONULL, ctrl);
+ 
+ 	/* XXX - should really tidy up PAM here too */
+ 
+@@ -593,7 +603,16 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
+ 	/* exec binary helper */
+ 	args[0] = CHKPWD_HELPER;
+ 	args[1] = user;
+-	if (off(UNIX__NONULL, ctrl)) {	/* this means we've succeeded */
++	if (on(UNIX_NULLOK_SECURE, ctrl)) {
++		const void *uttyname;
++		retval = pam_get_item(pamh, PAM_TTY, &uttyname);
++		if (retval != PAM_SUCCESS || uttyname == NULL
++			|| _pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS) {
++			nullok = 0;
++		}
++	}
++
++	if (nullok) {
+ 	  args[2]="nullok";
+ 	} else {
+ 	  args[2]="nonull";
+@@ -678,6 +697,17 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name)
+ 	if (on(UNIX__NONULL, ctrl))
+ 		return 0;	/* will fail but don't let on yet */
+ 
++	if (on(UNIX_NULLOK_SECURE, ctrl)) {
++		int retval2;
++		const void *uttyname;
++		retval2 = pam_get_item(pamh, PAM_TTY, &uttyname);
++		if (retval2 != PAM_SUCCESS || uttyname == NULL)
++			return 0;
++
++		if (_pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS)
++			return 0;
++	}
++
+ 	/* UNIX passwords area */
+ 
+ 	retval = get_pwd_hash(pamh, name, &pwd, &salt);
+@@ -764,7 +794,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
+ 			}
+ 		}
+ 	} else {
+-		retval = verify_pwd_hash(p, salt, off(UNIX__NONULL, ctrl));
++		retval = verify_pwd_hash(p, salt, _unix_blankpasswd(pamh, ctrl, name));
+ 	}
+ 
+ 	if (retval == PAM_SUCCESS) {
+diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h
+index 3729ce0..43cdbea 100644
+--- a/modules/pam_unix/support.h
++++ b/modules/pam_unix/support.h
+@@ -99,8 +99,9 @@ typedef struct {
+ #define UNIX_MIN_PASS_LEN        27	/* min length for password */
+ #define UNIX_QUIET		 28	/* Don't print informational messages */
+ #define UNIX_DES                 29     /* DES, default */
++#define UNIX_NULLOK_SECURE       30     /* NULL passwords allowed only on secure ttys */
+ /* -------------- */
+-#define UNIX_CTRLS_              30	/* number of ctrl arguments defined */
++#define UNIX_CTRLS_              31	/* number of ctrl arguments defined */
+ 
+ #define UNIX_DES_CRYPT(ctrl)	(off(UNIX_MD5_PASS,ctrl)&&off(UNIX_BIGCRYPT,ctrl)&&off(UNIX_SHA256_PASS,ctrl)&&off(UNIX_SHA512_PASS,ctrl)&&off(UNIX_BLOWFISH_PASS,ctrl))
+ 
+@@ -118,7 +119,7 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
+ /* UNIX_NOT_SET_PASS */    {"not_set_pass",    _ALL_ON_,                0100, 0},
+ /* UNIX__PRELIM */         {NULL,              _ALL_ON_^(0600),         0200, 0},
+ /* UNIX__UPDATE */         {NULL,              _ALL_ON_^(0600),         0400, 0},
+-/* UNIX__NONULL */         {NULL,              _ALL_ON_,               01000, 0},
++/* UNIX__NONULL */         {NULL,              _ALL_ON_^(02000000000),   01000, 0},
+ /* UNIX__QUIET */          {NULL,              _ALL_ON_,               02000, 0},
+ /* UNIX_USE_AUTHTOK */     {"use_authtok",     _ALL_ON_,               04000, 0},
+ /* UNIX_SHADOW */          {"shadow",          _ALL_ON_,              010000, 0},
+@@ -139,6 +140,7 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
+ /* UNIX_MIN_PASS_LEN */    {"minlen=",		_ALL_ON_,         0400000000, 0},
+ /* UNIX_QUIET */           {"quiet",           _ALL_ON_,         01000000000, 0},
+ /* UNIX_DES */             {"des",             _ALL_ON_^(0260420000),      0, 1},
++/* UNIX_NULLOK_SECURE */   {"nullok_secure",   _ALL_ON_^(01000),  02000000000, 0},
+ };
+ 
+ #define UNIX_DEFAULTS  (unix_args[UNIX__NONULL].flag)
+@@ -171,6 +173,8 @@ extern int _unix_read_password(pam_handle_t * pamh
+ 			,const char *prompt2
+ 			,const char *data_name
+ 			,const void **pass);
++extern int _pammodutil_tty_secure(const pam_handle_t *pamh,
++         const char *uttyname);
+ 
+ extern int _unix_run_verify_binary(pam_handle_t *pamh,
+ 			unsigned int ctrl, const char *user, int *daysleft);
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-account b/meta/recipes-extended/pam/libpam/pam.d/common-account
new file mode 100644
index 0000000..316b173
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-account
@@ -0,0 +1,25 @@
+#
+# /etc/pam.d/common-account - authorization settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authorization modules that define
+# the central access policy for use on the system.  The default is to
+# only deny service to users whose accounts are expired in /etc/shadow.
+#
+# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
+# To take advantage of this, it is recommended that you configure any
+# local modules either before or after the default block, and use
+# pam-auth-update to manage selection of other modules.  See
+# pam-auth-update(8) for details.
+#
+
+# here are the per-package modules (the "Primary" block)
+account	[success=1 new_authtok_reqd=done default=ignore]	pam_unix.so 
+# here's the fallback if no module succeeds
+account	requisite			pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+account	required			pam_permit.so
+# and here are more per-package modules (the "Additional" block)
+# end of pam-auth-update config
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-auth b/meta/recipes-extended/pam/libpam/pam.d/common-auth
new file mode 100644
index 0000000..460b69f
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-auth
@@ -0,0 +1,18 @@
+#
+# /etc/pam.d/common-auth - authentication settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authentication modules that define
+# the central authentication scheme for use on the system
+# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
+# traditional Unix authentication mechanisms.
+
+# here are the per-package modules (the "Primary" block)
+auth	[success=1 default=ignore]	pam_unix.so nullok_secure
+# here's the fallback if no module succeeds
+auth	requisite			pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+auth	required			pam_permit.so
+# and here are more per-package modules (the "Additional" block)
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-password b/meta/recipes-extended/pam/libpam/pam.d/common-password
new file mode 100644
index 0000000..3896057
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-password
@@ -0,0 +1,26 @@
+#
+# /etc/pam.d/common-password - password-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define the services to be
+# used to change user passwords.  The default is pam_unix.
+
+# Explanation of pam_unix options:
+#
+# The "sha512" option enables salted SHA512 passwords.  Without this option,
+# the default is Unix crypt.  Prior releases used the option "md5".
+#
+# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
+# login.defs.
+#
+# See the pam_unix manpage for other options.
+
+# here are the per-package modules (the "Primary" block)
+password	[success=1 default=ignore]	pam_unix.so obscure sha512
+# here's the fallback if no module succeeds
+password	requisite			pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+password	required			pam_permit.so
+# and here are more per-package modules (the "Additional" block)
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session b/meta/recipes-extended/pam/libpam/pam.d/common-session
new file mode 100644
index 0000000..a4a551f
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-session
@@ -0,0 +1,19 @@
+#
+# /etc/pam.d/common-session - session-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define tasks to be performed
+# at the start and end of sessions of *any* kind (both interactive and
+# non-interactive).
+#
+
+# here are the per-package modules (the "Primary" block)
+session	[default=1]			pam_permit.so
+# here's the fallback if no module succeeds
+session	requisite			pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+session	required			pam_permit.so
+# and here are more per-package modules (the "Additional" block)
+session	required	pam_unix.so
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive
new file mode 100644
index 0000000..b110bb2
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-session-noninteractive
@@ -0,0 +1,19 @@
+#
+# /etc/pam.d/common-session-noninteractive - session-related modules
+# common to all non-interactive services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define tasks to be performed
+# at the start and end of all non-interactive sessions.
+#
+
+# here are the per-package modules (the "Primary" block)
+session	[default=1]			pam_permit.so
+# here's the fallback if no module succeeds
+session	requisite			pam_deny.so
+# prime the stack with a positive return value if there isn't one already;
+# this avoids us returning an error just because nothing sets a success code
+# since the modules above will each just jump around
+session	required			pam_permit.so
+# and here are more per-package modules (the "Additional" block)
+session	required	pam_unix.so 
diff --git a/meta/recipes-extended/pam/libpam/pam.d/other b/meta/recipes-extended/pam/libpam/pam.d/other
new file mode 100644
index 0000000..ec970ec
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/pam.d/other
@@ -0,0 +1,24 @@
+#
+# /etc/pam.d/other - specify the PAM fallback behaviour
+#
+# Note that this file is used for any unspecified service; for example
+#if /etc/pam.d/cron  specifies no session modules but cron calls
+#pam_open_session, the session module out of /etc/pam.d/other is
+#used.  
+
+# We use pam_warn.so to generate syslog notes that the 'other'
+#fallback rules are being used (as a hint to suggest you should setup
+#specific PAM rules for the service and aid to debugging). Then to be
+#secure, deny access to all services by default. 
+
+auth       required     pam_warn.so
+auth       required     pam_deny.so
+
+account    required     pam_warn.so
+account    required     pam_deny.so
+
+password   required     pam_warn.so
+password   required     pam_deny.so
+
+session    required     pam_warn.so
+session    required     pam_deny.so
diff --git a/meta/recipes-extended/pam/libpam_1.2.1.bb b/meta/recipes-extended/pam/libpam_1.2.1.bb
new file mode 100644
index 0000000..ac3097e
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam_1.2.1.bb
@@ -0,0 +1,169 @@
+SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
+DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
+HOMEPAGE = "https://fedorahosted.org/linux-pam/"
+BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
+SECTION = "base"
+# PAM is dual licensed under GPL and BSD.
+# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
+# libpam-runtime-1.0.1 is GPLv2+), by openembedded
+LICENSE = "GPLv2+ | BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
+
+SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
+           file://99_pam \
+           file://pam.d/common-account \
+           file://pam.d/common-auth \
+           file://pam.d/common-password \
+           file://pam.d/common-session \
+           file://pam.d/common-session-noninteractive \
+           file://pam.d/other \
+           file://libpam-xtests.patch \
+           file://fixsepbuild.patch \
+           file://pam-security-abstract-securetty-handling.patch \
+           file://pam-unix-nullok-secure.patch \
+           file://libpam-xtests-remove-bash-dependency.patch \
+           file://crypt_configure.patch \
+          "
+
+SRC_URI[md5sum] = "9dc53067556d2dd567808fd509519dd6"
+SRC_URI[sha256sum] = "342b1211c0d3b203a7df2540a5b03a428a087bd8a48c17e49ae268f992b334d9"
+
+SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch"
+SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch"
+
+DEPENDS = "bison flex flex-native cracklib"
+
+EXTRA_OECONF = "--with-db-uniquename=_pam \
+                --includedir=${includedir}/security \
+                --libdir=${base_libdir} \
+                --disable-nis \
+                --disable-regenerate-docu \
+		--disable-prelude"
+
+CFLAGS_append = " -fPIC "
+
+PR = "r5"
+
+S = "${WORKDIR}/Linux-PAM-${PV}"
+
+inherit autotools gettext pkgconfig
+
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
+
+PACKAGES += "${PN}-runtime ${PN}-xtests"
+FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
+FILES_${PN}-dbg += "${base_libdir}/security/.debug \
+                    ${base_libdir}/security/pam_filter/.debug \
+                    ${datadir}/Linux-PAM/xtests/.debug"
+
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
+FILES_${PN}-runtime = "${sysconfdir}"
+FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
+
+PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
+
+def get_multilib_bit(d):
+    baselib = d.getVar('baselib', True) or ''
+    return baselib.replace('lib', '')
+
+libpam_suffix = "suffix${@get_multilib_bit(d)}"
+
+RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
+RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
+
+RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
+    "
+RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-access-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
+    ${MLPREFIX}pam-plugin-time-${libpam_suffix} \
+    coreutils"
+
+# FIXME: Native suffix breaks here, disable it for now
+RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
+RRECOMMENDS_${PN}_class-native = ""
+
+python populate_packages_prepend () {
+    def pam_plugin_append_file(pn, dir, file):
+        nf = os.path.join(dir, file)
+        of = d.getVar('FILES_' + pn, True)
+        if of:
+            nf = of + " " + nf
+        d.setVar('FILES_' + pn, nf)
+
+    def pam_plugin_hook(file, pkg, pattern, format, basename):
+        pn = d.getVar('PN', True)
+        libpam_suffix = d.getVar('libpam_suffix', True)
+
+        rdeps = d.getVar('RDEPENDS_' + pkg, True)
+        if rdeps:
+            rdeps = rdeps + " " + pn + "-" + libpam_suffix
+        else:
+            rdeps = pn + "-" + libpam_suffix
+        d.setVar('RDEPENDS_' + pkg, rdeps)
+
+        provides = d.getVar('RPROVIDES_' + pkg, True)
+        if provides:
+            provides = provides + " " + pkg + "-" + libpam_suffix
+        else:
+            provides = pkg + "-" + libpam_suffix
+        d.setVar('RPROVIDES_' + pkg, provides)
+
+    mlprefix = d.getVar('MLPREFIX', True) or ''
+    dvar = bb.data.expand('${WORKDIR}/package', d, True)
+    pam_libdir = d.expand('${base_libdir}/security')
+    pam_sbindir = d.expand('${sbindir}')
+    pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
+    pam_pkgname = mlprefix + 'pam-plugin%s'
+
+    do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname,
+                      'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
+    pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
+    pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
+    pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
+    pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
+    pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
+    pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
+    pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
+    do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
+}
+
+do_install() {
+	autotools_do_install
+
+	# don't install /var/run when populating rootfs. Do it through volatile
+	rm -rf ${D}${localstatedir}
+	install -d ${D}${sysconfdir}/default/volatiles
+	install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
+
+	install -d ${D}${sysconfdir}/pam.d/
+	install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
+
+	# The lsb requires unix_chkpwd has setuid permission
+	chmod 4755 ${D}${sbindir}/unix_chkpwd
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
+	fi
+}
+
+python do_pam_sanity () {
+    if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d):
+        bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
+}
+addtask pam_sanity before do_configure
+
+BBCLASSEXTEND = "nativesdk native"
+
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
diff --git a/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch b/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch
new file mode 100644
index 0000000..b0376ce
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch
@@ -0,0 +1,29 @@
+From d78dd087c4ec4715aab5fe115668e726046ecd76 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 18:16:05 -0700
+Subject: [PATCH] Include fcntl.h in /platform_defs.h
+
+exposed when compiling using musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libparted/fs/xfs/platform_defs.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h
+index 2b55752..32bd3d3 100644
+--- a/libparted/fs/xfs/platform_defs.h
++++ b/libparted/fs/xfs/platform_defs.h
+@@ -42,6 +42,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ #include <sys/param.h>
+ #include <sys/types.h>
+ 
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..ba1a4ba
--- /dev/null
+++ b/meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/parted/files/Makefile b/meta/recipes-extended/parted/files/Makefile
new file mode 100644
index 0000000..ee90be0
--- /dev/null
+++ b/meta/recipes-extended/parted/files/Makefile
@@ -0,0 +1,285 @@
+am__tty_colors_dummy = \
+  mgn= red= grn= lgn= blu= brg= std=; \
+  am__color_tests=no
+
+am__tty_colors = \
+$(am__tty_colors_dummy); \
+test "X$(AM_COLOR_TESTS)" != Xno \
+&& test "X$$TERM" != Xdumb \
+&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
+&& { \
+  am__color_tests=yes; \
+  red=''; \
+  grn=''; \
+  lgn=''; \
+  blu=''; \
+  mgn=''; \
+  brg=''; \
+  std=''; \
+}
+
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+am__rst_section = { sed 'p;s/./=/g;' && echo; }
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+
+am__common_driver_flags = \
+  --color-tests "$$am__color_tests" \
+  --enable-hard-errors "$$am__enable_hard_errors" \
+  --expect-failure "$$am__expect_failure"
+am__check_pre = \
+$(am__sh_e_setup);					\
+$(am__vpath_adj_setup) $(am__vpath_adj)			\
+$(am__tty_colors);					\
+srcdir=$(srcdir); export srcdir;			\
+am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;		\
+test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?;	\
+if test -f "./$$f"; then dir=./;			\
+elif test -f "$$f"; then dir=;				\
+else dir="$(srcdir)/"; fi;				\
+tst=$$dir$$f; log='$@'; 				\
+if test -n '$(DISABLE_HARD_ERRORS)'; then		\
+  am__enable_hard_errors=no; 				\
+else							\
+  am__enable_hard_errors=yes; 				\
+fi; 							\
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+
+am__set_TESTS_bases = \
+  bases='$(TEST_LOGS)'; \
+  bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+  bases=`echo $$bases`
+
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:.log=.log)
+TEST_LOGS = $(am__test_logs2:.sh.log=.log)
+SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
+SH_LOG_COMPILE = $(SH_LOG_COMPILER)
+
+am__set_b = \
+  case '$@' in \
+    */*) \
+      case '$*' in \
+        */*) b='$*';; \
+          *) b=`echo '$@' | sed 's/\.log$$//'`; \
+       esac;; \
+    *) \
+      b='$*';; \
+  esac
+
+MKDIR_P = /bin/mkdir -p
+SHELL = /bin/bash
+VERSION = 3.1
+PACKAGE_STRING = GNU parted 3.1
+PACKAGE_BUGREPORT = bug-parted@gnu.org
+abs_srcdir = $(PWD)
+abs_top_builddir = $(PWD)/..
+abs_top_srcdir = $(PWD)/..
+srcdir = .
+top_srcdir = ..
+subdir = tests
+SH_LOG_COMPILER = $(SHELL)
+
+TESTS = \
+  help-version.sh \
+  t0000-basic.sh \
+  t0001-tiny.sh \
+  t0010-script-no-ctrl-chars.sh \
+  t0100-print.sh \
+  t0101-print-empty.sh \
+  t0200-gpt.sh \
+  t0201-gpt.sh \
+  t0202-gpt-pmbr.sh \
+  t0203-gpt-tiny-device-abort.sh \
+  t0203-gpt-shortened-device-primary-valid.sh \
+  t0205-gpt-list-clobbers-pmbr.sh \
+  t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh \
+  t0207-IEC-binary-notation.sh \
+  t0208-mkpart-end-in-IEC.sh \
+  t0209-gpt-pmbr_boot.sh \
+  t0210-gpt-resized-partition-entry-array.sh \
+  t0211-gpt-rewrite-header.sh \
+  t0212-gpt-many-partitions.sh \
+  t0220-gpt-msftres.sh \
+  t0250-gpt.sh \
+  t0280-gpt-corrupt.sh \
+  t0300-dos-on-gpt.sh \
+  t0400-loop-clobber-infloop.sh \
+  t0500-dup-clobber.sh \
+  t0501-duplicate.sh \
+  t1100-busy-label.sh \
+  t1101-busy-partition.sh \
+  t1700-probe-fs.sh \
+  t2200-dos-label-recog.sh \
+  t2201-pc98-label-recog.sh \
+  t2300-dos-label-extended-bootcode.sh \
+  t2310-dos-extended-2-sector-min-offset.sh \
+  t2400-dos-hfs-partition-type.sh \
+  t2500-probe-corrupt-hfs.sh \
+  t3000-resize-fs.sh \
+  t3200-type-change.sh \
+  t3300-palo-prep.sh \
+  t3310-flags.sh \
+  t3400-whole-disk-FAT-partition.sh \
+  t4000-sun-raid-type.sh \
+  t4001-sun-vtoc.sh \
+  t4100-msdos-partition-limits.sh \
+  t4100-dvh-partition-limits.sh \
+  t4100-msdos-starting-sector.sh \
+  t4200-partprobe.sh \
+  t4300-nilfs2-tiny.sh \
+  t5000-tags.sh \
+  t6000-dm.sh \
+  t6001-psep.sh \
+  t6100-mdraid-partitions.sh \
+  t7000-scripting.sh \
+  t8000-loop.sh \
+  t8001-loop-blkpg.sh \
+  t9010-big-sector.sh \
+  t9020-alignment.sh \
+  t9021-maxima.sh \
+  t9022-one-unit-snap.sh \
+  t9023-value-lt-one.sh \
+  t9030-align-check.sh \
+  t9040-many-partitions.sh \
+  t9041-undetected-in-use-16th-partition.sh \
+  t9042-dos-partition-limit.sh \
+  t9050-partition-table-types.sh
+
+TESTS_ENVIRONMENT = \
+  export					\
+  abs_top_builddir='$(abs_top_builddir)'	\
+  abs_top_srcdir='$(abs_top_srcdir)'		\
+  abs_srcdir='$(abs_srcdir)'			\
+  built_programs=parted				\
+  srcdir='$(srcdir)'				\
+  top_srcdir='$(top_srcdir)'			\
+  VERSION=$(VERSION)				\
+  ; 9>&2
+
+.SUFFIXES: .log
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+	@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+	ws='[ 	]'; \
+	results=`for b in $$bases; do echo $$b.trs; done`; \
+	test -n "$$results" || results=/dev/null; \
+	all=`  grep "^$$ws*:test-result:"           $$results | wc -l`; \
+	pass=` grep "^$$ws*:test-result:$$ws*PASS"  $$results | wc -l`; \
+	fail=` grep "^$$ws*:test-result:$$ws*FAIL"  $$results | wc -l`; \
+	skip=` grep "^$$ws*:test-result:$$ws*SKIP"  $$results | wc -l`; \
+	xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+	xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+	error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+	if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+	  success=true; \
+	else \
+	  success=false; \
+	fi; \
+	br='==================='; br=$$br$$br$$br$$br; \
+	result_count () \
+	{ \
+	    if test x"$$1" = x"--maybe-color"; then \
+	      maybe_colorize=yes; \
+	    elif test x"$$1" = x"--no-color"; then \
+	      maybe_colorize=no; \
+	    else \
+	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+	    fi; \
+	    shift; \
+	    desc=$$1 count=$$2; \
+	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
+	      color_start=$$3 color_end=$$std; \
+	    else \
+	      color_start= color_end=; \
+	    fi; \
+	    echo "$${color_start}# $$desc $$count$${color_end}"; \
+	}; \
+	create_testsuite_report () \
+	{ \
+	  result_count $$1 "TOTAL:" $$all   "$$brg"; \
+	  result_count $$1 "PASS: " $$pass  "$$grn"; \
+	  result_count $$1 "SKIP: " $$skip  "$$blu"; \
+	  result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+	  result_count $$1 "FAIL: " $$fail  "$$red"; \
+	  result_count $$1 "XPASS:" $$xpass "$$red"; \
+	  result_count $$1 "ERROR:" $$error "$$mgn"; \
+	}; \
+	{								\
+	  echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |	\
+	    $(am__rst_title);						\
+	  create_testsuite_report --no-color;				\
+	  echo;								\
+	  echo ".. contents:: :depth: 2";				\
+	  echo;								\
+	  for i in $$bases; do						\
+	    if grep "^$$ws*:copy-in-global-log:$$ws*no$$ws*$$" $$i.trs \
+	         >/dev/null; then continue; \
+	    fi; \
+	    glob_res=`sed -n -e "s/$$ws*$$//" \
+	                     -e "s/^$$ws*:global-test-result:$$ws*//p" \
+		        $$i.trs`; \
+	    test -n "$$glob_res" || glob_res=RUN; \
+	    echo "$$glob_res: $$i" | $(am__rst_section); \
+	    if test ! -r $$i.log; then \
+	      echo "fatal: making $@: $$i.log is unreadable" >&2; \
+	      exit 1; \
+	    fi; \
+	    cat $$i.log; echo; \
+	  done;	\
+	} >$(TEST_SUITE_LOG).tmp;					\
+	mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);			\
+	if $$success; then						\
+	  col="$$grn";							\
+	 else								\
+	  col="$$red";							\
+	  test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);		\
+	fi;								\
+	echo "$${col}$$br$${std}"; 					\
+	echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";	\
+	echo "$${col}$$br$${std}"; 					\
+	create_testsuite_report --maybe-color;				\
+	echo "$$col$$br$$std";						\
+	if $$success; then :; else					\
+	  echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}";		\
+	  if test -n "$(PACKAGE_BUGREPORT)"; then			\
+	    echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}";	\
+	  fi;								\
+	  echo "$$col$$br$$std";					\
+	fi;								\
+	$$success || exit 1
+
+check-TESTS:
+	@if test $@ != recheck; then \
+	   list='$(RECHECK_LOGS)'; \
+	   test -z "$$list" || rm -f $$list; \
+	 fi
+	@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+	@ws='[ 	]'; \
+	log_list='' trs_list=''; $(am__set_TESTS_bases); \
+	for i in $$bases; do \
+	  if test -z "$$log_list"; then \
+	    log_list="$$i.log"; \
+	  else \
+	    log_list="$$log_list $$i.log"; \
+	  fi; \
+	  if test -z "$$trs_list"; then \
+	    trs_list="$$i.trs"; \
+	  else \
+	    trs_list="$$trs_list $$i.trs"; \
+	  fi; \
+	done; \
+	$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
+
+.sh.log:
+	@p='$<'; \
+	$(am__set_b); \
+	$(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) -- $(SH_LOG_COMPILE) "$$tst"
diff --git a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch
new file mode 100644
index 0000000..68ab715
--- /dev/null
+++ b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch
@@ -0,0 +1,57 @@
+From 060e74354774d36d2c11ef08e3e7ea9b9b6e23fb Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 13 Nov 2014 11:29:33 +0800
+Subject: [PATCH] libparted/arch/linux.c: fix compile failure while
+ --disable-device-mapper
+
+While --disable-device-mapper, the MACRO ENABLE_DEVICE_MAPPER is
+undef, but it missed to scope some device mapper functions.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libparted/arch/linux.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
+index 6fd73c5..2afa479 100644
+--- a/libparted/arch/linux.c
++++ b/libparted/arch/linux.c
+@@ -2320,6 +2320,7 @@ zasprintf (const char *format, ...)
+ static char *
+ dm_canonical_path (PedDevice const *dev)
+ {
++#ifdef ENABLE_DEVICE_MAPPER
+         LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev);
+ 
+         /* Get map name from devicemapper */
+@@ -2337,6 +2338,7 @@ dm_canonical_path (PedDevice const *dev)
+         dm_task_destroy (task);
+         return dev_name;
+ err:
++#endif
+         return NULL;
+ }
+ 
+@@ -2957,13 +2959,15 @@ _disk_sync_part_table (PedDisk* disk)
+                                                unsigned long long *start,
+                                                unsigned long long *length);
+ 
+-
++#ifdef ENABLE_DEVICE_MAPPER
+         if (disk->dev->type == PED_DEVICE_DM) {
+                 add_partition = _dm_add_partition;
+                 remove_partition = _dm_remove_partition;
+                 resize_partition = _dm_resize_partition;
+                 get_partition_start_and_length = _dm_get_partition_start_and_length;
+-        } else {
++        } else
++#endif
++        {
+                 add_partition = _blkpg_add_partition;
+                 remove_partition = _blkpg_remove_partition;
+ #ifdef BLKPG_RESIZE_PARTITION
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/parted/files/fix-doc-mandir.patch b/meta/recipes-extended/parted/files/fix-doc-mandir.patch
new file mode 100644
index 0000000..0711d4e
--- /dev/null
+++ b/meta/recipes-extended/parted/files/fix-doc-mandir.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Submitted [bug-parted@gnu.org]
+
+| for po in `ls -1 ./*.pt_BR.po 2>/dev/null`; do \
+| 		make $(basename ${po%.pt_BR.po}); \
+| 	done
+| Makefile:904: *** Recursive variable `mandir' references itself (eventually).  Stop.
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+
+--- parted-3.1/doc/po4a.mk.orig	2012-03-15 14:09:11.555831872 +0100
++++ parted-3.1/doc/po4a.mk	2012-03-15 14:10:44.243830985 +0100
+@@ -23,7 +23,7 @@
+ # threshold is 80%), it won't be distributed, and the build won't fail.
+ #
+ 
+-mandir = $(mandir)/$(lang)
++mandir := $(mandir)/$(lang)
+ 
+ # Inform automake that we want to install some man pages in section 1, 5
+ # and 8.
diff --git a/meta/recipes-extended/parted/files/no_check.patch b/meta/recipes-extended/parted/files/no_check.patch
new file mode 100644
index 0000000..58d8db4
--- /dev/null
+++ b/meta/recipes-extended/parted/files/no_check.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate [configuration]
+
+If check is detected, it makes the builds non-determinstic so just force
+it to be disabled.
+
+RP - 4/11/08
+
+Index: parted-1.9.0/configure.ac
+===================================================================
+--- parted-1.9.0.orig/configure.ac	2009-07-23 18:52:08.000000000 +0100
++++ parted-1.9.0/configure.ac	2010-02-02 14:13:56.013905093 +0000
+@@ -477,7 +477,7 @@
+ AM_CONDITIONAL([BUILD_LINUX], [test "$OS" = linux])
+ 
+ dnl check for "check", unit testing library/header
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.3], have_check=yes, have_check=no)
++have_check=no
+ if test "$have_check" != "yes"; then
+     AC_MSG_RESULT([Unable to locate check version 0.9.3 or higher: not building])
+ fi
diff --git a/meta/recipes-extended/parted/files/run-ptest b/meta/recipes-extended/parted/files/run-ptest
new file mode 100644
index 0000000..695c5e8
--- /dev/null
+++ b/meta/recipes-extended/parted/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -C tests check-TESTS
diff --git a/meta/recipes-extended/parted/files/syscalls.patch b/meta/recipes-extended/parted/files/syscalls.patch
new file mode 100644
index 0000000..e9bbe9a
--- /dev/null
+++ b/meta/recipes-extended/parted/files/syscalls.patch
@@ -0,0 +1,55 @@
+Upstream-Status: Pending
+
+---
+ libparted/arch/linux.c |   13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+Index: parted-1.9.0/libparted/arch/linux.c
+===================================================================
+--- parted-1.9.0.orig/libparted/arch/linux.c	2009-07-23 18:52:08.000000000 +0100
++++ parted-1.9.0/libparted/arch/linux.c	2010-02-02 14:14:16.523904768 +0000
+@@ -17,6 +17,8 @@
+ 
+ #define PROC_DEVICES_BUFSIZ 16384
+ 
++#include <linux/version.h>
++
+ #include <config.h>
+ #include <arch/linux.h>
+ 
+@@ -1477,12 +1479,14 @@
+ 
+ #if SIZEOF_OFF_T < 8
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+ static _syscall5(int,_llseek,
+                  unsigned int, fd,
+                  unsigned long, offset_high,
+                  unsigned long, offset_low,
+                  loff_t*, result,
+                  unsigned int, origin)
++#endif
+ 
+ loff_t
+ llseek (unsigned int fd, loff_t offset, unsigned int whence)
+@@ -1490,11 +1494,20 @@
+         loff_t result;
+         int retval;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+         retval = _llseek(fd,
+                          ((unsigned long long)offset) >> 32,
+                          ((unsigned long long)offset) & 0xffffffff,
+                          &result,
+                          whence);
++#else
++ 	retval = syscall(__NR__llseek, fd,
++			 ((unsigned long long)offset) >> 32,
++                         ((unsigned long long)offset) & 0xffffffff,
++                          &result,
++			 whence);
++#endif
++
+         return (retval==-1 ? (loff_t) retval : result);
+ }
+ 
diff --git a/meta/recipes-extended/parted/parted_3.2.bb b/meta/recipes-extended/parted/parted_3.2.bb
new file mode 100644
index 0000000..ff8ae09
--- /dev/null
+++ b/meta/recipes-extended/parted/parted_3.2.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Disk partition editing/resizing utility"
+HOMEPAGE = "http://www.gnu.org/software/parted/parted.html"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
+SECTION = "console/tools"
+DEPENDS = "ncurses readline util-linux"
+PR = "r1"
+
+SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
+           file://no_check.patch \
+           file://syscalls.patch \
+           file://fix-doc-mandir.patch \
+           file://fix-compile-failure-while-dis.patch \
+           file://0001-Include-fcntl.h-in-platform_defs.h.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://run-ptest \
+           file://Makefile \
+"
+
+SRC_URI[md5sum] = "0247b6a7b314f8edeb618159fa95f9cb"
+SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
+
+EXTRA_OECONF = "--disable-device-mapper"
+
+inherit autotools pkgconfig gettext texinfo ptest
+
+BBCLASSEXTEND = "native"
+
+do_compile_ptest() {
+	oe_runmake -C tests print-align print-max dup-clobber duplicate fs-resize
+}
+
+do_install_ptest() {
+	t=${D}${PTEST_PATH}
+	mkdir $t/build-aux
+	cp ${S}/build-aux/test-driver $t/build-aux/
+	cp -r ${S}/tests $t
+	cp ${WORKDIR}/Makefile $t/tests/
+	sed -i "s|^VERSION.*|VERSION = ${PV}|g" $t/tests/Makefile
+	for i in print-align print-max dup-clobber duplicate fs-resize; \
+	  do cp ${B}/tests/.libs/$i $t/tests/; \
+	done
+	sed -e 's| ../parted||' -i $t/tests/*.sh
+}
+
+RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python"
diff --git a/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
new file mode 100644
index 0000000..88779c3
--- /dev/null
+++ b/meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+This patch fixes this compiler error with gcc 4.6.0
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/08
+
+| fts.c: In function 'pax_fts_set':
+| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter]
+| cc1: all warnings being treated as errors
+| 
+| make[2]: *** [fts.o] Error 1
+
+Index: pax-3.4/lib/fts.c
+===================================================================
+--- pax-3.4.orig/lib/fts.c
++++ pax-3.4/lib/fts.c
+@@ -466,7 +466,7 @@ name:		t = sp->fts_path + NAPPEND(p->fts
+ /* ARGSUSED */
+ int
+ fts_set(sp, p, instr)
+-	FTS *sp;
++	FTS __attribute__((__unused__)) *sp;
+ 	FTSENT *p;
+ 	int instr;
+ {
diff --git a/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
new file mode 100644
index 0000000..80878f3
--- /dev/null
+++ b/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
@@ -0,0 +1,185 @@
+Upstream-Status: Pending
+
+Author: H.J. Lu <hjl.tools@gmail.com>
+Date:   Tue Dec 6 10:34:53 2011 -0800
+
+    Fix pax-3.4 build for x32
+    
+    off_t is 8byte for x32.  We need to check both _FILE_OFFSET_BITS and
+    size of off_t to see if file offset is 64bit.  This patch adds
+    AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
+
+Index: pax-3.4/configure.in
+===================================================================
+--- pax-3.4.orig/configure.in
++++ pax-3.4/configure.in
+@@ -33,4 +33,7 @@ dnl Checks for header files.
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+ 
++AC_CHECK_SIZEOF(off_t)
++AC_CHECK_SIZEOF(long)
++
+ AC_OUTPUT([Makefile lib/Makefile src/Makefile])
+Index: pax-3.4/src/ar_io.c
+===================================================================
+--- pax-3.4.orig/src/ar_io.c
++++ pax-3.4/src/ar_io.c
+@@ -378,7 +378,8 @@ ar_close(void)
+ 	 * could have written anything yet.
+ 	 */
+ 	if (frmt == NULL) {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ 		(void)fprintf(listf, "%s: unknown format, %qu bytes skipped.\n",
+ #else
+ 		(void)fprintf(listf, "%s: unknown format, %lu bytes skipped.\n",
+@@ -391,7 +392,8 @@ ar_close(void)
+ 
+ 	if (strcmp(NM_CPIO, argv0) == 0)
+ 		(void)fprintf(listf,
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ 		    "%qu blocks\n",
+ #else
+ 		    "%lu blocks\n",
+@@ -399,7 +401,8 @@ ar_close(void)
+ 			(rdcnt ? rdcnt : wrcnt) / 5120);
+ 	else if (strcmp(NM_TAR, argv0) != 0)
+ 		(void)fprintf(listf,
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ 		    "%s: %s vol %d, %lu files, %qu bytes read, %qu bytes written.\n",
+ #else
+ 		    "%s: %s vol %d, %lu files, %lu bytes read, %lu bytes written.\n",
+Index: pax-3.4/src/cpio.c
+===================================================================
+--- pax-3.4.orig/src/cpio.c
++++ pax-3.4/src/cpio.c
+@@ -218,7 +218,8 @@ rd_ln_nm (ARCHD *arcn)
+ 	 */
+ 	if ((arcn->sb.st_size == 0) ||
+ 	    (arcn->sb.st_size >= (off_t) sizeof(arcn->ln_name))) {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ 		paxwarn (1, "Cpio link name length is invalid: %qu",
+ 			 arcn->sb.st_size);
+ #else
+Index: pax-3.4/src/gen_subs.c
+===================================================================
+--- pax-3.4.orig/src/gen_subs.c
++++ pax-3.4/src/gen_subs.c
+@@ -133,7 +133,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
+    * print device id's for devices, or sizes for other nodes
+    */
+   if ((arcn->type == PAX_CHR) || (arcn->type == PAX_BLK))
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+     (void) fprintf (fp, "%4lu,%4lu ", (unsigned long) MAJOR (sbp->st_rdev),
+ 		    (unsigned long) MINOR (sbp->st_rdev));
+ #else
+@@ -142,7 +143,8 @@ ls_list (ARCHD *arcn, time_t now, FILE *
+ #endif
+   else
+     {
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+       (void) fprintf (fp, "%9qu ", sbp->st_size);
+ #else
+       (void) fprintf (fp, "%9lu ", sbp->st_size);
+@@ -334,7 +336,8 @@ ul_asc (u_long val, char *str, int len, 
+   return (0);
+ }
+ 
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ /*
+  * asc_uqd()
+  *	convert hex/octal character string into a u_quad_t. We do not have to
+Index: pax-3.4/src/options.c
+===================================================================
+--- pax-3.4.orig/src/options.c
++++ pax-3.4/src/options.c
+@@ -1545,7 +1545,8 @@ str_offt (char *val)
+   char *expr;
+   off_t num, t;
+ 
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+   num = strtoq (val, &expr, 0);
+   if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
+ #else
+Index: pax-3.4/src/tar.c
+===================================================================
+--- pax-3.4.orig/src/tar.c
++++ pax-3.4/src/tar.c
+@@ -58,7 +58,8 @@
+ static unsigned long tar_chksm (char *, int);
+ static char *name_split (char *, int);
+ static int ul_oct (u_long, char *, int, int);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ static int uqd_oct (u_quad_t, char *, int, int);
+ #endif
+ 
+@@ -196,7 +197,8 @@ ul_oct (u_long val, register char *str, 
+   return (0);
+ }
+ 
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+ /*
+  * uqd_oct()
+  *	convert an u_quad_t to an octal string. one of many oddball field
+@@ -427,7 +429,8 @@ tar_rd (ARCHD *arcn, char *buf)
+ 			       0xfff);
+   arcn->sb.st_uid = (uid_t) asc_ul (hd->uid, sizeof (hd->uid), OCT);
+   arcn->sb.st_gid = (gid_t) asc_ul (hd->gid, sizeof (hd->gid), OCT);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+   arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
+ #else
+   arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
+@@ -659,7 +662,8 @@ tar_wr (register ARCHD * arcn)
+        * data follows this file, so set the pad
+        */
+       hd->linkflag = AREGTYPE;
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+       if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
+ 		   sizeof (hd->size), 1))
+ #else
+@@ -834,7 +838,8 @@ ustar_rd (ARCHD *arcn, char *buf)
+    */
+   arcn->sb.st_mode = (mode_t) (asc_ul (hd->mode, sizeof (hd->mode), OCT) &
+ 			       0xfff);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+   arcn->sb.st_size = (off_t) asc_uqd (hd->size, sizeof (hd->size), OCT);
+ #else
+   arcn->sb.st_size = (off_t) asc_ul (hd->size, sizeof (hd->size), OCT);
+@@ -1081,7 +1086,8 @@ ustar_wr (register ARCHD * arcn)
+       else
+ 	hd->typeflag = REGTYPE;
+       arcn->pad = TAR_PAD (arcn->sb.st_size);
+-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
++#if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
++    || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+       if (uqd_oct ((u_quad_t) arcn->sb.st_size, hd->size,
+ 		   sizeof (hd->size), 3))
+ 	{
diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb
new file mode 100644
index 0000000..ad04871
--- /dev/null
+++ b/meta/recipes-extended/pax/pax_3.4.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Portable Archive eXchange"
+DESCRIPTION = "pax (Portable Archive eXchange) is the POSIX standard archive tool"
+HOMEPAGE = "http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/pax/"
+BUGTRACKER = "http://www.openbsd.org/query-pr.html"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
+                    file://src/pax.h;endline=40;md5=309d3e241c1d82069228e5a51e9b8d60 \
+                    file://src/cpio.h;endline=40;md5=c3b4bbff6133a83387968617bbae8ac4 \
+                    file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053"
+
+SECTION = "base"
+PR = "r2"
+
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
+	file://fix_for_compile_with_gcc-4.6.0.patch \
+	file://pax-3.4_fix_for_x32.patch"
+
+SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
+SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
+
+inherit autotools
diff --git a/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb b/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb
new file mode 100644
index 0000000..0330981
--- /dev/null
+++ b/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb
@@ -0,0 +1,28 @@
+SUMMARY = "PBZIP2 is a parallel implementation of bzip2"
+DESCRIPTION = "PBZIP2 is a parallel implementation of the bzip2 block-sorting \
+file compressor that uses pthreads and achieves near-linear speedup on SMP \
+machines. The output of this version is fully compatible with bzip2 v1.0.2 or \
+newer (ie: anything compressed with pbzip2 can be decompressed with bzip2)."
+HOMEPAGE = "http://compression.ca/pbzip2/"
+SECTION = "console/utils"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4c4f2edec9679d5abef3514a816b54a4"
+
+DEPENDS = "bzip2"
+DEPENDS_append_class-native = " bzip2-replacement-native"
+
+SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "91a4911b13305850423840eb0fa6f4f9"
+SRC_URI[sha256sum] = "573bb358a5a7d3bf5f42f881af324cedf960c786e8d66dd03d448ddd8a0166ee"
+
+do_configure[noexec] = "1"
+
+EXTRA_OEMAKE = "CXX='${CXX} ${CXXFLAGS}' LDFLAGS='${LDFLAGS}'"
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 pbzip2 ${D}${bindir}/
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
new file mode 100644
index 0000000..170e7ec
--- /dev/null
+++ b/meta/recipes-extended/perl/libconvert-asn1-perl_0.27.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Convert::ASN1 - Perl ASN.1 Encode/Decode library"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README.md;beginline=91;endline=97;md5=ceff7fd286eb6d8e8e0d3d23e096a63f"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "68723e96be0b258a9e20480276e8a62c"
+SRC_URI[sha256sum] = "74a4a78ae0c5e973100ac0a8f203a110f76fb047b79dae4fc1fd7d6814d3d58a"
+
+S = "${WORKDIR}/Convert-ASN1-${PV}"
+
+inherit cpan
+
+EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/perl/libtimedate-perl_2.30.bb b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
new file mode 100644
index 0000000..c8fcde4
--- /dev/null
+++ b/meta/recipes-extended/perl/libtimedate-perl_2.30.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Perl modules useful for manipulating date and time information"
+SECTION = "libs"
+# You can redistribute it and/or modify it under the same terms as Perl itself.
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://README;beginline=21;md5=576b7cb41e5e821501a01ed66f0f9d9e"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-${PV}.tar.gz"
+
+S = "${WORKDIR}/TimeDate-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND = "native"
+
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN} += "perl-module-carp perl-module-exporter perl-module-strict perl-module-time-local"
+
+SRC_URI[md5sum] = "b1d91153ac971347aee84292ed886c1c"
+SRC_URI[sha256sum] = "75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86"
diff --git a/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb
new file mode 100644
index 0000000..9a9e710
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-namespacesupport-perl_1.11.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Perl module for supporting simple generic namespaces"
+DESCRIPTION = "XML::NamespaceSupport offers a simple way to process namespace-based XML names. \
+                It also helps maintain a prefix-to-namespace URI map, and provides a number of \
+                basic checks. "
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+PR = "r3"
+
+LIC_FILES_CHKSUM = "file://META.yml;beginline=22;endline=22;md5=3b2b564dae8b9af9e8896e85c07dcbe5"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-${PV}.tar.gz"
+SRC_URI[md5sum] = "222cca76161cd956d724286d36b607da"
+SRC_URI[sha256sum] = "6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea"
+
+
+S = "${WORKDIR}/XML-NamespaceSupport-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND="native"
+
diff --git a/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb b/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb
new file mode 100644
index 0000000..14a3370
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-sax-base-perl_1.08.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Base class SAX Drivers and Filters"
+DESCRIPTION = "This module has a very simple task - to be a base class for \
+PerlSAX drivers and filters. It's default behaviour is to pass \
+the input directly to the output unchanged. It can be useful to \
+use this module as a base class so you don't have to, for example, \
+implement the characters() callback."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+RDEPENDS_${PN} += "perl-module-extutils-makemaker"
+
+LIC_FILES_CHKSUM = "file://dist.ini;endline=5;md5=8f9c9a55340aefaee6e9704c88466446"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-Base-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "38c8c3247dfd080712596118d70dbe32"
+SRC_URI[sha256sum] = "666270318b15f88b8427e585198abbc19bc2e6ccb36dc4c0a4f2d9807330219e"
+
+S = "${WORKDIR}/XML-SAX-Base-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
new file mode 100644
index 0000000..45d3966
--- /dev/null
+++ b/meta/recipes-extended/perl/libxml-sax-perl_0.99.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Perl module for using and building Perl SAX2 XML processors"
+DESCRIPTION = "XML::SAX consists of several framework classes for using and \
+building Perl SAX2 XML parsers, filters, and drivers.  It is designed \ 
+around the need to be able to "plug in" different SAX parsers to an \
+application without requiring programmer intervention.  Those of you \
+familiar with the DBI will be right at home.  Some of the designs \
+come from the Java JAXP specification (SAX part), only without the \
+javaness."
+
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+DEPENDS += "libxml-namespacesupport-perl-native"
+RDEPENDS_${PN} += "libxml-namespacesupport-perl libxml-sax-base-perl perl-module-file-temp"
+PR = "r2"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=65c4cd8f39c24c7135ed70dacbcb09e3"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "290f5375ae87fdebfdb5bc3854019f24"
+SRC_URI[sha256sum] = "32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84"
+
+S = "${WORKDIR}/XML-SAX-${PV}"
+
+inherit cpan
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
new file mode 100644
index 0000000..cb8991d
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -0,0 +1,39 @@
+SUMMARY = "A parallel implementation of gzip"
+DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
+fully functional replacement for gzip that exploits multiple processors and \
+multiple cores to the hilt when compressing data. pigz was written by Mark \
+Adler, and uses the zlib and pthread libraries."
+HOMEPAGE = "http://zlib.net/pigz/"
+SECTION = "console/utils"
+LICENSE = "Zlib & Apache-2.0"
+
+SRC_URI = "http://zlib.net/${BPN}/${BP}.tar.gz"
+
+PROVIDES_class-native += "gzip-native"
+
+DEPENDS = "zlib"
+
+inherit update-alternatives
+
+do_install_class-target() {
+	# Install files into /bin (FHS), which is typical place for gzip
+	install -d ${D}${base_bindir}
+	install ${B}/pigz ${D}${base_bindir}/pigz
+	ln -nsf pigz ${D}${base_bindir}/unpigz
+	ln -nsf pigz ${D}${base_bindir}/pigzcat
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install ${B}/pigz ${D}${bindir}/gzip
+	ln -nsf gzip ${D}${bindir}/gunzip
+	ln -nsf gzip ${D}${bindir}/zcat
+}
+
+ALTERNATIVE_PRIORITY = "80"
+ALTERNATIVE_${PN} = "gunzip gzip zcat"
+ALTERNATIVE_${PN}_class-nativesdk = ""
+ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
+ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
+ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
+ALTERNATIVE_TARGET = "${base_bindir}/pigz"
diff --git a/meta/recipes-extended/pigz/pigz/link-order.patch b/meta/recipes-extended/pigz/pigz/link-order.patch
new file mode 100644
index 0000000..4becc0e
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz/link-order.patch
@@ -0,0 +1,38 @@
+This patch avoids underlinking issues since we pass -lz via LDFLAGS but it appears
+before pigz.o which needs symbols from libz however due to order linker happily discards libz
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: pigz-2.3.3/Makefile
+===================================================================
+--- pigz-2.3.3.orig/Makefile	2015-01-19 20:12:31.000000000 -0800
++++ pigz-2.3.3/Makefile	2015-01-28 09:11:50.266669184 -0800
+@@ -5,7 +5,7 @@
+ # use gcc and gmake on Solaris
+ 
+ pigz: pigz.o yarn.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+-	$(CC) $(LDFLAGS) -o pigz $^ -lpthread -lm
++	$(CC) -o pigz $^ $(LDFLAGS) -lz -lpthread -lm
+ 	ln -f pigz unpigz
+ 
+ pigz.o: pigz.c yarn.h try.h ${ZOPFLI}deflate.h ${ZOPFLI}util.h
+@@ -35,7 +35,7 @@
+ dev: pigz pigzt pigzn
+ 
+ pigzt: pigzt.o yarnt.o try.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+-	$(CC) $(LDFLAGS) -o pigzt $^ -lpthread -lm
++	$(CC) -o pigzt $^ $(LDFLAGS) -lz -lpthread -lm
+ 
+ pigzt.o: pigz.c yarn.h try.h
+ 	$(CC) $(CFLAGS) -DDEBUG -g -c -o pigzt.o pigz.c
+@@ -44,7 +44,7 @@
+ 	$(CC) $(CFLAGS) -DDEBUG -g -c -o yarnt.o yarn.c
+ 
+ pigzn: pigzn.o tryn.o ${ZOPFLI}deflate.o ${ZOPFLI}blocksplitter.o ${ZOPFLI}tree.o ${ZOPFLI}lz77.o ${ZOPFLI}cache.o ${ZOPFLI}hash.o ${ZOPFLI}util.o ${ZOPFLI}squeeze.o ${ZOPFLI}katajainen.o
+-	$(CC) $(LDFLAGS) -o pigzn $^ -lm
++	$(CC) -o pigzn $^ $(LDFLAGS) -lz -lm
+ 
+ pigzn.o: pigz.c try.h
+ 	$(CC) $(CFLAGS) -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
diff --git a/meta/recipes-extended/pigz/pigz_2.3.3.bb b/meta/recipes-extended/pigz/pigz_2.3.3.bb
new file mode 100644
index 0000000..080be2b
--- /dev/null
+++ b/meta/recipes-extended/pigz/pigz_2.3.3.bb
@@ -0,0 +1,12 @@
+require pigz.inc
+LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
+
+SRC_URI += "file://link-order.patch"
+
+SRC_URI[md5sum] = "01d7a16cce77929cc1a78aa1bdfb68cb"
+SRC_URI[sha256sum] = "4e8b67b432ce7907575a549f3e1cac4709781ba0f6b48afea9f59369846b509c"
+
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/meta/recipes-extended/procps/procps/fix-configure.patch b/meta/recipes-extended/procps/procps/fix-configure.patch
new file mode 100644
index 0000000..934ae80
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/fix-configure.patch
@@ -0,0 +1,19 @@
+
+exec_prefix is /usr default in OE-Core
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Index: procps-ng-3.3.10/configure.ac
+===================================================================
+--- procps-ng-3.3.10.orig/configure.ac
++++ procps-ng-3.3.10/configure.ac
+@@ -70,7 +70,7 @@ AC_FUNC_MMAP
+ AC_FUNC_REALLOC
+ AC_FUNC_STRTOD
+ 
+-usrbin_execdir='${exec_prefix}/usr/bin'
++usrbin_execdir='${exec_prefix}/bin'
+ AC_SUBST([usrbin_execdir])
+ 
+ AM_GNU_GETTEXT_VERSION([0.14.1])
diff --git a/meta/recipes-extended/procps/procps/sysctl.conf b/meta/recipes-extended/procps/procps/sysctl.conf
new file mode 100644
index 0000000..34e7488
--- /dev/null
+++ b/meta/recipes-extended/procps/procps/sysctl.conf
@@ -0,0 +1,64 @@
+# This configuration file is taken from Debian.
+#
+# /etc/sysctl.conf - Configuration file for setting system variables
+# See sysctl.conf (5) for information.
+#
+
+#kernel.domainname = example.com
+
+# Uncomment the following to stop low-level messages on console
+#kernel.printk = 4 4 1 7
+
+##############################################################3
+# Functions previously found in netbase
+#
+
+# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
+# Turn on Source Address Verification in all interfaces to
+# prevent some spoofing attacks
+net.ipv4.conf.default.rp_filter=1
+net.ipv4.conf.all.rp_filter=1
+
+# Uncomment the next line to enable TCP/IP SYN cookies
+#net.ipv4.tcp_syncookies=1
+
+# Uncomment the next line to enable packet forwarding for IPv4
+#net.ipv4.ip_forward=1
+
+# Uncomment the next line to enable packet forwarding for IPv6
+#net.ipv6.conf.all.forwarding=1
+
+
+###################################################################
+# Additional settings - these settings can improve the network
+# security of the host and prevent against some network attacks
+# including spoofing attacks and man in the middle attacks through
+# redirection. Some network environments, however, require that these
+# settings are disabled so review and enable them as needed.
+#
+# Ignore ICMP broadcasts
+#net.ipv4.icmp_echo_ignore_broadcasts = 1
+#
+# Ignore bogus ICMP errors
+#net.ipv4.icmp_ignore_bogus_error_responses = 1
+#
+# Do not accept ICMP redirects (prevent MITM attacks)
+#net.ipv4.conf.all.accept_redirects = 0
+#net.ipv6.conf.all.accept_redirects = 0
+# _or_
+# Accept ICMP redirects only for gateways listed in our default
+# gateway list (enabled by default)
+# net.ipv4.conf.all.secure_redirects = 1
+#
+# Do not send ICMP redirects (we are not a router)
+#net.ipv4.conf.all.send_redirects = 0
+#
+# Do not accept IP source route packets (we are not a router)
+#net.ipv4.conf.all.accept_source_route = 0
+#net.ipv6.conf.all.accept_source_route = 0
+#
+# Log Martian Packets
+#net.ipv4.conf.all.log_martians = 1
+#
+
+#kernel.shmmax = 141762560
diff --git a/meta/recipes-extended/procps/procps_3.3.10.bb b/meta/recipes-extended/procps/procps_3.3.10.bb
new file mode 100644
index 0000000..dcfaba7
--- /dev/null
+++ b/meta/recipes-extended/procps/procps_3.3.10.bb
@@ -0,0 +1,67 @@
+SUMMARY = "System and process monitoring utilities"
+DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
+the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
+HOMEPAGE = "https://gitorious.org/procps"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                  file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
+                 "
+
+DEPENDS = "ncurses"
+
+inherit autotools gettext pkgconfig update-alternatives
+
+SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
+           file://fix-configure.patch \
+           file://sysctl.conf \
+          "
+
+SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe"
+SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04"
+
+S = "${WORKDIR}/procps-ng-${PV}"
+
+EXTRA_OECONF = "--enable-skill --disable-modern-top"
+
+CPPFLAGS += "-I${S}"
+
+do_install_append () {
+	install -d ${D}${base_bindir}
+	[ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
+	install -d ${D}${base_sbindir}
+	[ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
+        if [ "${base_sbindir}" != "${sbindir}" ]; then
+                rmdir ${D}${sbindir}
+        fi
+
+        install -d ${D}${sysconfdir}
+        install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
+        if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+                install -d ${D}${sysconfdir}/sysctl.d
+                ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
+        fi
+}
+
+CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
+
+bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
+base_bindir_progs += "kill pidof ps watch"
+base_sbindir_progs += "sysctl"
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
+
+ALTERNATIVE_${PN}-doc = "kill.1 uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+
+python __anonymous() {
+    for prog in d.getVar('base_bindir_progs', True).split():
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
+
+    for prog in d.getVar('base_sbindir_progs', True).split():
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
+}
+
diff --git a/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
new file mode 100644
index 0000000..e57d60f
--- /dev/null
+++ b/meta/recipes-extended/psmisc/files/0001-Typo-in-fuser-makes-M-on-all-the-time.patch
@@ -0,0 +1,46 @@
+From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001
+From: Brad Jorsch <anomie@users.sourceforge.net>
+Date: Fri, 28 Feb 2014 21:55:02 +1100
+Subject: [PATCH] Typo in fuser makes -M on all the time
+
+Brad found that fuser had the -M option on all the time.
+A simple but significant typo caused this, thanks the the patch.
+
+Bug-Debian: http://bugs.debian.org/740275
+
+Upstream-Status: Backport
+
+Signed-off-by: Craig Small <csmall@enc.com.au>
+---
+ ChangeLog   | 4 ++++
+ src/fuser.c | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index fd1cccf..e5f784c 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,7 @@
++Changes in 22.22
++================
++	* Fixed typo in fuser which has -M on Debian #740275
++
+ Changes in 22.21
+ ================
+ 	* Missing comma in fuser(1) added Debian #702391
+diff --git a/src/fuser.c b/src/fuser.c
+index b485f65..389b302 100644
+--- a/src/fuser.c
++++ b/src/fuser.c
+@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[])
+ 		usage(_("No process specification given"));
+ 
+ 	/* Check if -M flag was used and if so check mounts */
+-	if (opts * OPT_ISMOUNTPOINT) {
++	if (opts & OPT_ISMOUNTPOINT) {
+ 	    check_mountpoints(&mounts, &names_head, &names_tail);
+ 	}
+ 
+-- 
+1.8.4.2
+
diff --git a/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
new file mode 100644
index 0000000..c8afcac
--- /dev/null
+++ b/meta/recipes-extended/psmisc/files/0002-Include-limits.h-for-PATH_MAX.patch
@@ -0,0 +1,29 @@
+From aa66afecd8ba9cc4139f25ab15ec315173413a7d Mon Sep 17 00:00:00 2001
+From: Paul Barker <paul@paulbarker.me.uk>
+Date: Wed, 20 Aug 2014 10:31:37 +0000
+Subject: [PATCH] Include <limits.h> for PATH_MAX
+
+When building against musl libc, PATH_MAX is defined in <limits.h>.
+
+Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
+
+Upstream-Status: Accepted (Should be in next release after 22.21)
+---
+ src/pstree.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pstree.c b/src/pstree.c
+index 071e6c4..0d28260 100644
+--- a/src/pstree.c
++++ b/src/pstree.c
+@@ -41,6 +41,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
++#include <limits.h>
+ 
+ #include "i18n.h"
+ #include "comm.h"
+-- 
+2.0.4
+
diff --git a/meta/recipes-extended/psmisc/psmisc.inc b/meta/recipes-extended/psmisc/psmisc.inc
new file mode 100644
index 0000000..68e0656
--- /dev/null
+++ b/meta/recipes-extended/psmisc/psmisc.inc
@@ -0,0 +1,44 @@
+SUMMARY = "Utilities for managing processes on your system"
+DESCRIPTION = "The psmisc package contains utilities for managing processes on your \
+system: pstree, killall and fuser.  The pstree command displays a tree \
+structure of all of the running processes on your system.  The killall \
+command sends a specified signal (SIGTERM if nothing is specified) to \
+processes identified by name.  The fuser command identifies the PIDs \
+of processes that are using specified files or filesystems."
+SECTION = "base"
+DEPENDS = "ncurses virtual/libintl"
+LICENSE = "GPLv2"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz"
+
+S = "${WORKDIR}/psmisc-${PV}"
+
+inherit autotools gettext
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc"
+PACKAGES += "psmisc-extras"
+
+FILES_${PN} = ""
+RDEPENDS_${PN} = "fuser killall pstree"
+
+FILES_fuser = "${bindir}/fuser.${BPN}"
+FILES_fuser-doc = "${mandir}/man1/fuser*"
+
+FILES_killall = "${bindir}/killall.${BPN}"
+FILES_killall-doc = "${mandir}/man1/killall*"
+
+FILES_pstree = "${bindir}/pstree"
+FILES_pstree-doc = "${mandir}/man1/pstree*"
+
+FILES_psmisc-extras = "${bindir}"
+FILES_psmisc-extras-doc = "${mandir}"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "90"
+
+ALTERNATIVE_killall = "killall"
+
+ALTERNATIVE_fuser = "fuser"
diff --git a/meta/recipes-extended/psmisc/psmisc_22.21.bb b/meta/recipes-extended/psmisc/psmisc_22.21.bb
new file mode 100644
index 0000000..66aba9e
--- /dev/null
+++ b/meta/recipes-extended/psmisc/psmisc_22.21.bb
@@ -0,0 +1,10 @@
+require psmisc.inc
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
+SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
+
+SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
+            file://0002-Include-limits.h-for-PATH_MAX.patch \
+            "
diff --git a/meta/recipes-extended/quota/quota/config-tcpwrappers.patch b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
new file mode 100644
index 0000000..5f47fbd
--- /dev/null
+++ b/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
@@ -0,0 +1,75 @@
+Upstream-Status: Pending
+
+--- quota-tools.orig/configure.in
++++ quota-tools/configure.in
+@@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG)
+ AC_SUBST(NETLINKLIBS)
+
+ AC_SEARCH_LIBS(gethostbyname, nsl)
+-AC_MSG_CHECKING(for host_access in -lwrap)
+-AC_CACHE_VAL(ac_cv_lib_wrap_main,
+-	saved_LIBS="$LIBS"
+-	LIBS="$LIBS -lwrap"
+-	[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+-	#include <stdio.h>
+-	#include <sys/types.h>
+-	#include <sys/socket.h>
+-	#include <netinet/in.h>
+-	#include <tcpd.h>
+-	struct request_info request;
+-	int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
+-	dnl We always restore LIBS as we add -lwrap in the next check
+-	[ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
+-	[ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
+-	])
+
+-if test ${ac_cv_lib_wrap_main} = yes; then
+-	AC_CHECK_HEADER(tcpd.h,, [
+-		echo 'ERROR: could not find tcpd.h - missing TCP wrappers package'
+-		exit 1
+-	])
+-	LIBS="$LIBS -lwrap"
+-	AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
+-	COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
++AC_ARG_WITH(tcpwrappers,
++	[  --with-tcpwrappers=[yes/no/try]   Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]],
++	,
++	with_tcpwrappers="try")
++
++if test "x$with_tcpwrappers" != xno; then
++	AC_MSG_CHECKING(for host_access in -lwrap)
++	AC_CACHE_VAL(ac_cv_lib_wrap_main,
++		saved_LIBS="$LIBS"
++		LIBS="$LIBS -lwrap"
++		[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++		#include <stdio.h>
++		#include <sys/types.h>
++		#include <sys/socket.h>
++		#include <netinet/in.h>
++		#include <tcpd.h>
++		struct request_info request;
++		int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
++		dnl We always restore LIBS as we add -lwrap in the next try
++		[ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
++		[ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
++		])
++
++	if test "x$ac_cv_lib_wrap_main" = xyes; then
++		AC_CHECK_HEADER(tcpd.h,, [
++			if test "x$with_tcpwrappers" != xtry; then
++				AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package])
++			fi
++		])
++
++		LIBS="$LIBS -lwrap"
++		AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
++		COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
++	elif test "x$with_tcpwrappers" != xtry; then
++		AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package])
++	fi
+ fi
+
++
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+ AC_C_INLINE
diff --git a/meta/recipes-extended/quota/quota/fcntl.patch b/meta/recipes-extended/quota/quota/fcntl.patch
new file mode 100644
index 0000000..27e60fd
--- /dev/null
+++ b/meta/recipes-extended/quota/quota/fcntl.patch
@@ -0,0 +1,113 @@
+Include fcntl.h to pacify compiler errors on musl
+like
+
+error: unknown type name 'loff_t'
+Cover rpc headers under proper conditional
+Dont use __P its undefined
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ndex: quota-tools/quota.h
+===================================================================
+Index: quota-tools/quota.h
+===================================================================
+--- quota-tools.orig/quota.h
++++ quota-tools/quota.h
+@@ -165,6 +165,6 @@ enum {
+ 	#endif
+ #endif
+ 
+-long quotactl __P((int, const char *, qid_t, caddr_t));
++long quotactl (int, const char *, qid_t, caddr_t);
+ 
+ #endif /* _QUOTA_ */
+Index: quota-tools/quotacheck.c
+===================================================================
+--- quota-tools.orig/quotacheck.c
++++ quota-tools/quotacheck.c
+@@ -19,6 +19,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <errno.h>
++#include <fcntl.h>
+ 
+ #include <sys/stat.h>
+ #include <sys/types.h>
+Index: quota-tools/quotaio.c
+===================================================================
+--- quota-tools.orig/quotaio.c
++++ quota-tools/quotaio.c
+@@ -12,6 +12,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <fcntl.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+Index: quota-tools/dqblk_v2.h
+===================================================================
+--- quota-tools.orig/dqblk_v2.h
++++ quota-tools/dqblk_v2.h
+@@ -7,6 +7,7 @@
+ #ifndef GUARD_DQBLK_V2_H
+ #define GUARD_DQBLK_V2_H
+ 
++#include <fcntl.h>
+ #include <sys/types.h>
+ #include "quota_tree.h"
+ 
+Index: quota-tools/quotaops.c
+===================================================================
+--- quota-tools.orig/quotaops.c
++++ quota-tools/quotaops.c
+@@ -34,7 +34,9 @@
+ 
+ #include "config.h"
+ 
++#if defined(RPC)
+ #include <rpc/rpc.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+Index: quota-tools/rquota_client.c
+===================================================================
+--- quota-tools.orig/rquota_client.c
++++ quota-tools/rquota_client.c
+@@ -19,7 +19,9 @@
+ 
+ #include "config.h"
+ 
++#if defined(RPC)
+ #include <rpc/rpc.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
+@@ -35,7 +37,9 @@
+ #include <stdint.h>
+ 
+ #include "mntopt.h"
++#if defined(RPC)
+ #include "rquota.h"
++#endif
+ #include "common.h"
+ #include "quotaio.h"
+ #include "quotasys.h"
+Index: quota-tools/setquota.c
+===================================================================
+--- quota-tools.orig/setquota.c
++++ quota-tools/setquota.c
+@@ -7,7 +7,9 @@
+ 
+ #include "config.h"
+ 
++#if defined(RPC)
+ #include <rpc/rpc.h>
++#endif
+ #include <sys/types.h>
+ #include <errno.h>
+ #include <stdio.h>
diff --git a/meta/recipes-extended/quota/quota/remove_non_posix_types.patch b/meta/recipes-extended/quota/quota/remove_non_posix_types.patch
new file mode 100644
index 0000000..5442d98
--- /dev/null
+++ b/meta/recipes-extended/quota/quota/remove_non_posix_types.patch
@@ -0,0 +1,185 @@
+Use proper C99 integer types
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: quota-tools/bylabel.c
+===================================================================
+--- quota-tools.orig/bylabel.c
++++ quota-tools/bylabel.c
+@@ -20,6 +20,7 @@
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <stdint.h>
+ 
+ #include "bylabel.h"
+ #include "common.h"
+@@ -37,32 +38,32 @@ static struct uuidCache_s {
+ 
+ #define EXT2_SUPER_MAGIC	0xEF53
+ struct ext2_super_block {
+-	u_char s_dummy1[56];
+-	u_char s_magic[2];
+-	u_char s_dummy2[46];
+-	u_char s_uuid[16];
+-	u_char s_volume_name[16];
++	uint8_t s_dummy1[56];
++	uint8_t s_magic[2];
++	uint8_t s_dummy2[46];
++	uint8_t s_uuid[16];
++	uint8_t s_volume_name[16];
+ };
+ 
+-#define ext2magic(s)	((uint) s.s_magic[0] + (((uint) s.s_magic[1]) << 8))
++#define ext2magic(s)	((uint32_t) s.s_magic[0] + (((uint32_t) s.s_magic[1]) << 8))
+ 
+ #define XFS_SUPER_MAGIC "XFSB"
+ #define XFS_SUPER_MAGIC2 "BSFX"
+ struct xfs_super_block {
+-	u_char s_magic[4];
+-	u_char s_dummy[28];
+-	u_char s_uuid[16];
+-	u_char s_dummy2[60];
+-	u_char s_fsname[12];
++	uint8_t s_magic[4];
++	uint8_t s_dummy[28];
++	uint8_t s_uuid[16];
++	uint8_t s_dummy2[60];
++	uint8_t s_fsname[12];
+ };
+ 
+ #define REISER_SUPER_MAGIC	"ReIsEr2Fs"
+ struct reiserfs_super_block {
+-	u_char s_dummy1[52];
+-	u_char s_magic[10];
+-	u_char s_dummy2[22];
+-	u_char s_uuid[16];
+-	u_char s_volume_name[16];
++	uint8_t s_dummy1[52];
++	uint8_t s_magic[10];
++	uint8_t s_dummy2[22];
++	uint8_t s_uuid[16];
++	uint8_t s_volume_name[16];
+ };
+ 
+ static inline unsigned short swapped(unsigned short a)
+@@ -222,7 +223,7 @@ static char *get_spec_by_x(int n, const
+ 	return NULL;
+ }
+ 
+-static u_char fromhex(char c)
++static uint8_t fromhex(char c)
+ {
+ 	if (isdigit(c))
+ 		return (c - '0');
+@@ -234,7 +235,7 @@ static u_char fromhex(char c)
+ 
+ static char *get_spec_by_uuid(const char *s)
+ {
+-	u_char uuid[16];
++	uint8_t uuid[16];
+ 	int i;
+ 
+ 	if (strlen(s) != 36 || s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-')
+Index: quota-tools/quot.c
+===================================================================
+--- quota-tools.orig/quot.c
++++ quota-tools/quot.c
+@@ -47,6 +47,7 @@
+ #include <utmp.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <stdint.h>
+ 
+ #include "pot.h"
+ #include "quot.h"
+@@ -56,8 +57,8 @@
+ #include "quotasys.h"
+ 
+ #define	TSIZE	500
+-static __uint64_t sizes[TSIZE];
+-static __uint64_t overflow;
++static uint64_t sizes[TSIZE];
++static uint64_t overflow;
+ 
+ static int aflag;
+ static int cflag;
+@@ -72,7 +73,7 @@ static time_t now;
+ char *progname;
+ 
+ static void mounttable(void);
+-static char *idname(__uint32_t, int);
++static char *idname(uint32_t, int);
+ static void report(const char *, const char *, int);
+ static void creport(const char *, const char *);
+ 
+@@ -173,7 +174,7 @@ static int qcmp(du_t * p1, du_t * p2)
+ static void creport(const char *file, const char *fsdir)
+ {
+ 	int i;
+-	__uint64_t t = 0;
++	uint64_t t = 0;
+ 
+ 	printf(_("%s (%s):\n"), file, fsdir);
+ 	for (i = 0; i < TSIZE - 1; i++)
+@@ -219,7 +220,7 @@ static void report(const char *file, con
+ 	}
+ }
+ 
+-static idcache_t *getnextent(int type, __uint32_t id, int byid)
++static idcache_t *getnextent(int type, uint32_t id, int byid)
+ {
+ 	struct passwd *pw;
+ 	struct group  *gr;
+@@ -240,7 +241,7 @@ static idcache_t *getnextent(int type, _
+ 	return &idc;
+ }
+ 
+-static char *idname(__uint32_t id, int type)
++static char *idname(uint32_t id, int type)
+ {
+ 	idcache_t *ncp, *idp;
+ 	static idcache_t nc[2][NID];
+@@ -286,8 +287,8 @@ static void acctXFS(xfs_bstat_t *p)
+ {
+ 	register du_t *dp;
+ 	du_t **hp;
+-	__uint64_t size;
+-	__uint32_t i, id;
++	uint64_t size;
++	uint32_t i, id;
+ 
+ 	if ((p->bs_mode & S_IFMT) == 0)
+ 		return;
+Index: quota-tools/quot.h
+===================================================================
+--- quota-tools.orig/quot.h
++++ quota-tools/quot.h
+@@ -35,18 +35,18 @@
+ #define	SEC24HR	(60*60*24)	/* seconds per day */
+ 
+ typedef struct {
+-	__uint32_t id;
++	uint32_t id;
+ 	char name[UT_NAMESIZE + 1];
+ } idcache_t;
+ 
+ typedef struct du {
+ 	struct du *next;
+-	__uint64_t blocks;
+-	__uint64_t blocks30;
+-	__uint64_t blocks60;
+-	__uint64_t blocks90;
+-	__uint64_t nfiles;
+-	__uint32_t id;
++	uint64_t blocks;
++	uint64_t blocks30;
++	uint64_t blocks60;
++	uint64_t blocks90;
++	uint64_t nfiles;
++	uint32_t id;
+ } du_t;
+ 
+ #define	NDU	60000
diff --git a/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch b/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
new file mode 100644
index 0000000..9ca2ffc
--- /dev/null
+++ b/meta/recipes-extended/quota/quota/replace_getrpcbynumber_r.patch
@@ -0,0 +1,20 @@
+Replace getrpcbynumber_r with getrpcbynumber
+musl and uclibc dont implement it
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: quota-tools/svc_socket.c
+===================================================================
+--- quota-tools.orig/svc_socket.c
++++ quota-tools/svc_socket.c
+@@ -55,7 +55,8 @@ static int svc_socket (u_long number, in
+ 	addr.sin_family = AF_INET;
+ 
+ 	if (!port) {
+-		ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp);
++		rpcp = getrpcbynumber(number);
++		ret = 0;
+ 		if (ret == 0 && rpcp != NULL) {
+ 			/* First try name */
+ 			ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
diff --git a/meta/recipes-extended/quota/quota_4.02.bb b/meta/recipes-extended/quota/quota_4.02.bb
new file mode 100644
index 0000000..124b0a3
--- /dev/null
+++ b/meta/recipes-extended/quota/quota_4.02.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
+SECTION = "base"
+HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
+                    file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
+                    file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
+           file://config-tcpwrappers.patch \
+           file://fcntl.patch \
+           file://remove_non_posix_types.patch \
+	   "
+SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
+
+SRC_URI[md5sum] = "a8a5df262261e659716ccad2a5d6df0d"
+SRC_URI[sha256sum] = "f4c2f48abf94bbdc396df33d276f2e9d19af58c232cb85eef9c174a747c33795"
+
+S = "${WORKDIR}/quota-tools"
+
+DEPENDS = "gettext-native e2fsprogs"
+
+inherit autotools-brokensep gettext pkgconfig
+
+CFLAGS += "-I=${includedir}/tirpc"
+LDFLAGS += "-ltirpc"
+ASNEEDED = ""
+EXTRA_OEMAKE += 'STRIP=""'
+
+PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
+PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
+
+PACKAGECONFIG[tcp-wrappers] = "--with-tcpwrappers,--without-tcpwrappers,tcp-wrappers"
+PACKAGECONFIG[rpc] = "--enable-rpc=yes,--enable-rpc=no,libtirpc"
+PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
+
+do_install() {
+	oe_runmake ROOTDIR=${D} install
+}
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch
new file mode 100644
index 0000000..eeef9f1
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch
@@ -0,0 +1,221 @@
+From 2a44d862233f2126581e290d568e1c8b8f2eb9f5 Mon Sep 17 00:00:00 2001
+From: Carlo Landmeter <clandmeter@gmail.com>
+Date: Thu, 19 Feb 2015 15:28:45 +0000
+Subject: [PATCH] Avoid use of glibc sys/cdefs.h header
+
+Upstream-Status: Pending
+---
+ src/check_bound.c  |    2 +-
+ src/pmap_svc.c     |   10 +++++-----
+ src/rpcb_svc.c     |   10 +++++-----
+ src/rpcb_svc_4.c   |   14 +++++++-------
+ src/rpcb_svc_com.c |   46 +++++++++++++++++++++++-----------------------
+ src/rpcbind.c      |   12 ++++++------
+ src/util.c         |    2 +-
+ src/warmstart.c    |    4 ++--
+ 8 files changed, 50 insertions(+), 50 deletions(-)
+
+diff --git a/src/check_bound.c b/src/check_bound.c
+index c70b845..5d21730 100644
+--- a/src/check_bound.c
++++ b/src/check_bound.c
+@@ -70,7 +70,7 @@ static struct fdlist *fdhead;	/* Link list of the check fd's */
+ static struct fdlist *fdtail;
+ static char *nullstring = "";
+ 
+-static bool_t check_bound __P((struct fdlist *, char *uaddr));
++static bool_t check_bound (struct fdlist *, char *uaddr);
+ 
+ /*
+  * Returns 1 if the given address is bound for the given addr & transport
+diff --git a/src/pmap_svc.c b/src/pmap_svc.c
+index ad28b93..9c7d409 100644
+--- a/src/pmap_svc.c
++++ b/src/pmap_svc.c
+@@ -60,11 +60,11 @@ static	char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro";
+ #include "rpcbind.h"
+ #include "xlog.h"
+ #include <rpc/svc_soc.h> /* svc_getcaller routine definition */
+-static struct pmaplist *find_service_pmap __P((rpcprog_t, rpcvers_t,
+-					       rpcprot_t));
+-static bool_t pmapproc_change __P((struct svc_req *, SVCXPRT *, u_long));
+-static bool_t pmapproc_getport __P((struct svc_req *, SVCXPRT *));
+-static bool_t pmapproc_dump __P((struct svc_req *, SVCXPRT *));
++static struct pmaplist *find_service_pmap (rpcprog_t, rpcvers_t,
++					       rpcprot_t);
++static bool_t pmapproc_change (struct svc_req *, SVCXPRT *, u_long);
++static bool_t pmapproc_getport (struct svc_req *, SVCXPRT *);
++static bool_t pmapproc_dump (struct svc_req *, SVCXPRT *);
+ 
+ /*
+  * Called for all the version 2 inquiries.
+diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c
+index bd92201..6c7f7fe 100644
+--- a/src/rpcb_svc.c
++++ b/src/rpcb_svc.c
+@@ -53,10 +53,10 @@
+ #include "rpcbind.h"
+ #include "xlog.h"
+ 
+-static void *rpcbproc_getaddr_3_local __P((void *, struct svc_req *, SVCXPRT *,
+-					   rpcvers_t));
+-static void *rpcbproc_dump_3_local __P((void *, struct svc_req *, SVCXPRT *,
+-					rpcvers_t));
++static void *rpcbproc_getaddr_3_local (void *, struct svc_req *, SVCXPRT *,
++					   rpcvers_t);
++static void *rpcbproc_dump_3_local (void *, struct svc_req *, SVCXPRT *,
++					rpcvers_t);
+ 
+ /*
+  * Called by svc_getreqset. There is a separate server handle for
+@@ -75,7 +75,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp)
+ 	} argument;
+ 	char *result;
+ 	xdrproc_t xdr_argument, xdr_result;
+-	void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
++	void *(*local) (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+ 	rpcprog_t setprog = 0;
+ 
+ 	rpcbs_procinfo(RPCBVERS_3_STAT, rqstp->rq_proc);
+diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c
+index b673452..6764c0a 100644
+--- a/src/rpcb_svc_4.c
++++ b/src/rpcb_svc_4.c
+@@ -54,13 +54,13 @@
+ #include "rpcbind.h"
+ #include "xlog.h"
+ 
+-static void *rpcbproc_getaddr_4_local __P((void *, struct svc_req *, SVCXPRT *,
+-				      rpcvers_t));
+-static void *rpcbproc_getversaddr_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
++static void *rpcbproc_getaddr_4_local (void *, struct svc_req *, SVCXPRT *,
++				      rpcvers_t);
++static void *rpcbproc_getversaddr_4_local (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+ static void *rpcbproc_getaddrlist_4_local
+-	__P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
+-static void free_rpcb_entry_list __P((rpcb_entry_list_ptr *));
+-static void *rpcbproc_dump_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
++	(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
++static void free_rpcb_entry_list (rpcb_entry_list_ptr *);
++static void *rpcbproc_dump_4_local (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+ 
+ /*
+  * Called by svc_getreqset. There is a separate server handle for
+@@ -78,7 +78,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp)
+ 	} argument;
+ 	char *result;
+ 	xdrproc_t xdr_argument, xdr_result;
+-	void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
++	void *(*local) (void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+ 	rpcprog_t setprog = 0;
+ 
+ 	rpcbs_procinfo(RPCBVERS_4_STAT, rqstp->rq_proc);
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index ff9ce6b..8aef9e5 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -100,29 +100,29 @@ struct finfo {
+ static struct finfo     FINFO[NFORWARD];
+ 
+ 
+-static bool_t xdr_encap_parms __P((XDR *, struct encap_parms *));
+-static bool_t xdr_rmtcall_args __P((XDR *, struct r_rmtcall_args *));
+-static bool_t xdr_rmtcall_result __P((XDR *, struct r_rmtcall_args *));
+-static bool_t xdr_opaque_parms __P((XDR *, struct r_rmtcall_args *));
+-static int find_rmtcallfd_by_netid __P((char *));
+-static SVCXPRT *find_rmtcallxprt_by_fd __P((int));
+-static int forward_register __P((u_int32_t, struct netbuf *, int, char *,
+-    rpcproc_t, rpcvers_t, u_int32_t *));
+-static struct finfo *forward_find __P((u_int32_t));
+-static int free_slot_by_xid __P((u_int32_t));
+-static int free_slot_by_index __P((int));
+-static int netbufcmp __P((struct netbuf *, struct netbuf *));
+-static struct netbuf *netbufdup __P((struct netbuf *));
+-static void netbuffree __P((struct netbuf *));
+-static int check_rmtcalls __P((struct pollfd *, int));
+-static void xprt_set_caller __P((SVCXPRT *, struct finfo *));
+-static void send_svcsyserr __P((SVCXPRT *, struct finfo *));
+-static void handle_reply __P((int, SVCXPRT *));
+-static void find_versions __P((rpcprog_t, char *, rpcvers_t *, rpcvers_t *));
+-static rpcblist_ptr find_service __P((rpcprog_t, rpcvers_t, char *));
+-static char *getowner __P((SVCXPRT *, char *, size_t));
+-static int add_pmaplist __P((RPCB *));
+-static int del_pmaplist __P((RPCB *));
++static bool_t xdr_encap_parms (XDR *, struct encap_parms *);
++static bool_t xdr_rmtcall_args (XDR *, struct r_rmtcall_args *);
++static bool_t xdr_rmtcall_result (XDR *, struct r_rmtcall_args *);
++static bool_t xdr_opaque_parms (XDR *, struct r_rmtcall_args *);
++static int find_rmtcallfd_by_netid (char *);
++static SVCXPRT *find_rmtcallxprt_by_fd (int);
++static int forward_register (u_int32_t, struct netbuf *, int, char *,
++    rpcproc_t, rpcvers_t, u_int32_t *);
++static struct finfo *forward_find (u_int32_t);
++static int free_slot_by_xid (u_int32_t);
++static int free_slot_by_index (int);
++static int netbufcmp (struct netbuf *, struct netbuf *);
++static struct netbuf *netbufdup (struct netbuf *);
++static void netbuffree (struct netbuf *);
++static int check_rmtcalls (struct pollfd *, int);
++static void xprt_set_caller (SVCXPRT *, struct finfo *);
++static void send_svcsyserr (SVCXPRT *, struct finfo *);
++static void handle_reply (int, SVCXPRT *);
++static void find_versions (rpcprog_t, char *, rpcvers_t *, rpcvers_t *);
++static rpcblist_ptr find_service (rpcprog_t, rpcvers_t, char *);
++static char *getowner (SVCXPRT *, char *, size_t);
++static int add_pmaplist (RPCB *);
++static int del_pmaplist (RPCB *);
+ 
+ /*
+  * Set a mapping of program, version, netid
+diff --git a/src/rpcbind.c b/src/rpcbind.c
+index 045daa1..137011b 100644
+--- a/src/rpcbind.c
++++ b/src/rpcbind.c
+@@ -135,13 +135,13 @@ char *tcp_uaddr;	/* Universal TCP address */
+ static char servname[] = "rpcbind";
+ static char superuser[] = "superuser";
+ 
+-int main __P((int, char *[]));
++int main (int, char *[]);
+ 
+-static int init_transport __P((struct netconfig *));
+-static void rbllist_add __P((rpcprog_t, rpcvers_t, struct netconfig *,
+-			     struct netbuf *));
+-static void terminate __P((int));
+-static void parseargs __P((int, char *[]));
++static int init_transport (struct netconfig *);
++static void rbllist_add (rpcprog_t, rpcvers_t, struct netconfig *,
++			     struct netbuf *);
++static void terminate (int);
++static void parseargs (int, char *[]);
+ 
+ int
+ main(int argc, char *argv[])
+diff --git a/src/util.c b/src/util.c
+index a6c835b..33b9e4f 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -70,7 +70,7 @@ static struct sockaddr_in *local_in4;
+ static struct sockaddr_in6 *local_in6;
+ #endif
+ 
+-static int bitmaskcmp __P((void *, void *, void *, int));
++static int bitmaskcmp (void *, void *, void *, int);
+ 
+ /*
+  * For all bits set in "mask", compare the corresponding bits in
+diff --git a/src/warmstart.c b/src/warmstart.c
+index b6eb73e..42dd3af 100644
+--- a/src/warmstart.c
++++ b/src/warmstart.c
+@@ -58,8 +58,8 @@
+ #define	PMAPFILE	RPCBIND_STATEDIR "/portmap.xdr"
+ #endif
+ 
+-static bool_t write_struct __P((char *, xdrproc_t, void *));
+-static bool_t read_struct __P((char *, xdrproc_t, void *));
++static bool_t write_struct (char *, xdrproc_t, void *);
++static bool_t read_struct (char *, xdrproc_t, void *);
+ 
+ static bool_t
+ write_struct(char *filename, xdrproc_t structproc, void *list)
diff --git a/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
new file mode 100644
index 0000000..afa55f3
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/0001-uclibc-nss.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Pending
+
+From b8f0d7b7318ba344c25785d6f5cf3f8de98012d4 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 2 Feb 2010 09:36:03 +0000
+Subject: [PATCH 1/2] uclibc-nss
+
+---
+ src/rpcbind.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/src/rpcbind.c b/src/rpcbind.c
+index 525ffba..1fe1a60 100644
+--- a/src/rpcbind.c
++++ b/src/rpcbind.c
+@@ -67,7 +67,11 @@
+ #include <pwd.h>
+ #include <string.h>
+ #include <errno.h>
++#if defined(__UCLIBC__)
++#define __nss_configure_lookup(x,y)
++#else
+ #include <nss.h>
++#endif
+ #include "config.h"
+ #include "rpcbind.h"
+ 
+-- 
+1.6.6.1
+
diff --git a/meta/recipes-extended/rpcbind/rpcbind/init.d b/meta/recipes-extended/rpcbind/rpcbind/init.d
new file mode 100644
index 0000000..67499aa
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/init.d
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# start/stop rpcbind daemon.
+
+### BEGIN INIT INFO
+# Provides:          rpcbind
+# Required-Start:    $network
+# Required-Stop:     $network
+# Default-Start:     S 2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: RPC portmapper replacement
+# Description:       rpcbind is a server that converts RPC (Remote
+#                    Procedure Call) program numbers into DARPA
+#                    protocol port numbers. It must be running in
+#                    order to make RPC calls. Services that use
+#                    RPC include NFS and NIS.
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+test -f /sbin/rpcbind || exit 0
+
+OPTIONS=""
+if [ -f /etc/default/rpcbind ]
+then
+    . /etc/default/rpcbind
+elif [ -f /etc/rpcbind.conf ]
+then
+    . /etc/rpcbind.conf
+fi
+
+start ()
+{
+    echo -n "Starting rpcbind daemon..."
+    if pidof /sbin/rpcbind >/dev/null; then
+        echo "already running."
+        exit 0
+    fi
+    start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@"
+    if [ $? -eq 0 ]; then
+        echo "done."
+    else
+        echo "failed."
+    fi
+}
+
+stop ()
+{
+    echo "Stopping rpcbind daemon..."
+    if ! pidof /sbin/rpcbind >/dev/null; then
+        echo "not running."
+        return 0
+    fi
+    start-stop-daemon --stop --quiet --exec /sbin/rpcbind
+    if [ $? -eq 0 ]; then
+        echo "done."
+    else
+        echo "failed."
+    fi
+}
+
+case "$1" in
+    start)
+        start $OPTIONS
+        ;;
+    stop)
+        stop
+        ;;
+    force-reload)
+        stop
+        start $OPTIONS
+        ;;
+    restart)
+        stop
+        start $OPTIONS
+        ;;
+    status)
+        status /sbin/rpcbind
+        ;;
+    *)
+        echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}"
+        exit 1
+        ;;
+esac
+
+exit $?
diff --git a/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch b/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
new file mode 100644
index 0000000..9c72a1b
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
@@ -0,0 +1,29 @@
+The musl implementation of getaddrinfo and getservbyname does not
+aliases. As a workaround we use "sunprc" instead of "portmapper"
+
+ported from alpine linux
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: rpcbind-0.2.2/src/rpcbind.c
+===================================================================
+--- rpcbind-0.2.2.orig/src/rpcbind.c
++++ rpcbind-0.2.2/src/rpcbind.c
+@@ -491,7 +491,7 @@ init_transport(struct netconfig *nconf)
+ 			if ((aicode = getaddrinfo(hosts[nhostsbak],
+ 			    servname, &hints, &res)) != 0) {
+ 			  if ((aicode = getaddrinfo(hosts[nhostsbak],
+-						    "portmapper", &hints, &res)) != 0) {
++						    "sunrpc", &hints, &res)) != 0) {
+ 				syslog(LOG_ERR,
+ 				    "cannot get local address for %s: %s",
+ 				    nconf->nc_netid, gai_strerror(aicode));
+@@ -564,7 +564,7 @@ init_transport(struct netconfig *nconf)
+ 		if ((strcmp(nconf->nc_netid, "local") != 0) &&
+ 		    (strcmp(nconf->nc_netid, "unix") != 0)) {
+ 			if ((aicode = getaddrinfo(NULL, servname, &hints, &res))!= 0) {
+-			  if ((aicode = getaddrinfo(NULL, "portmapper", &hints, &res))!= 0) {
++			  if ((aicode = getaddrinfo(NULL, "sunrpc", &hints, &res))!= 0) {
+ 			  printf("cannot get local address for %s: %s",  nconf->nc_netid, gai_strerror(aicode));
+ 			  syslog(LOG_ERR,
+ 				    "cannot get local address for %s: %s",
diff --git a/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch b/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch
new file mode 100644
index 0000000..84fc974
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/remove-sys-queue.patch
@@ -0,0 +1,22 @@
+musl does not provide this header and here is reasoning
+http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_sys.2Fqueue.h_not_included_.3F
+
+So include it only when __GLIBC__ is defined which is true for uclibc and glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: rpcbind-0.2.2/src/util.c
+===================================================================
+--- rpcbind-0.2.2.orig/src/util.c
++++ rpcbind-0.2.2/src/util.c
+@@ -41,7 +41,9 @@
+ 
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#ifdef __GLIBC__
+ #include <sys/queue.h>
++#endif
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <ifaddrs.h>
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
new file mode 100644
index 0000000..2a4dfbc
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
@@ -0,0 +1,3 @@
+# Optional arguments passed to rpcbind.
+#
+RPCBIND_OPTS=""
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
new file mode 100644
index 0000000..b3ae254
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=RPC Bind Service
+Requires=rpcbind.socket
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
+ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
+SuccessExitStatus=2
+
+[Install]
+Also=rpcbind.socket
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
new file mode 100644
index 0000000..d63c1d9
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=RPCbind Server Activation Socket
+
+[Socket]
+ListenStream=/var/run/rpcbind.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
new file mode 100644
index 0000000..3336021
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
@@ -0,0 +1,73 @@
+SUMMARY = "Universal Addresses to RPC Program Number Mapper"
+DESCRIPTION = "The rpcbind utility is a server that converts RPC \
+               program numbers into universal addresses."
+SECTION = "console/network"
+HOMEPAGE = "http://sourceforge.net/projects/rpcbind/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751"
+DEPENDS = "libtirpc quota"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
+                    file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
+           file://init.d \
+           file://0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch \
+           file://remove-sys-queue.patch \
+           ${UCLIBCPATCHES} \
+           ${MUSLPATCHES} \
+           file://rpcbind.conf \
+           file://rpcbind.socket \
+           file://rpcbind.service \
+          "
+MUSLPATCHES_libc-musl = "file://musl-sunrpc.patch"
+
+UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \
+                            "
+UCLIBCPATCHES ?= ""
+MUSLPATCHES ?= ""
+
+SRC_URI[md5sum] = "c8875246b2688a1adfbd6ad43480278d"
+SRC_URI[sha256sum] = "9897823a9d820ea011d9ea02054d5ab99469b9ca5346265fee380713c8fed27b"
+
+inherit autotools update-rc.d systemd pkgconfig
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+
+INITSCRIPT_NAME = "rpcbind"
+INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
+
+SYSTEMD_SERVICE_${PN} = "rpcbind.service"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \
+                       --shell /bin/false --user-group rpc"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \
+                          --without-systemdsystemunitdir, \
+                          systemd \
+"
+
+EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc"
+
+do_install_append () {
+	mv ${D}${bindir} ${D}${sbindir}
+
+	install -d ${D}${sysconfdir}/init.d
+	sed -e 's,/etc/,${sysconfdir}/,g' \
+		-e 's,/sbin/,${sbindir}/,g' \
+		${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
+	chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
+
+	install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' \
+		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+		${D}${systemd_unitdir}/system/rpcbind.service
+}
diff --git a/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch b/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch
new file mode 100644
index 0000000..40ecef0
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch
@@ -0,0 +1,58 @@
+Upstream-Status: Backport
+
+Backport patch to fix parallel build failure and update context to make patch
+coulde be applied.
+
+http://git.savannah.gnu.org/cgit/screen.git/commit?id=c0de6dd
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From c0de6dd7970b2c7b426a5c39dcbc31c2bef87232 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net>
+Date: Thu, 2 Jan 2014 18:18:06 +0100
+Subject: [PATCH] fix for multijob build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+make sure that comm.sh script generates comm.h header before doing
+anything else
+
+Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
+---
+ Makefile.in | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index ce86cbc..dea16d8 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -298,7 +298,7 @@ search.o: layout.h viewport.h canvas.h search.c config.h screen.h os.h osdef.h a
+  comm.h layer.h term.h image.h display.h window.h mark.h extern.h
+ tty.o: layout.h viewport.h canvas.h tty.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \
+  layer.h term.h image.h display.h window.h extern.h
+-term.o: layout.h viewport.h canvas.h term.c term.h
++term.o: layout.h viewport.h canvas.h term.c term.h comm.h
+ window.o: layout.h viewport.h canvas.h window.c config.h screen.h os.h osdef.h ansi.h acls.h \
+  comm.h layer.h term.h image.h display.h window.h extern.h logfile.h
+ utmp.o: layout.h viewport.h canvas.h utmp.c config.h screen.h os.h osdef.h ansi.h acls.h \
+@@ -324,7 +324,7 @@ canvas.o: layout.h viewport.h canvas.h canvas.c config.h screen.h os.h osdef.h a
+  comm.h layer.h term.h image.h display.h window.h extern.h \
+  braille.h
+ comm.o: layout.h viewport.h canvas.h comm.c config.h acls.h comm.h
+-kmapdef.o: layout.h viewport.h canvas.h kmapdef.c config.h
++kmapdef.o: layout.h viewport.h canvas.h kmapdef.c config.h comm.h
+ acls.o: layout.h viewport.h canvas.h acls.c config.h screen.h os.h osdef.h ansi.h acls.h comm.h \
+  layer.h term.h image.h display.h window.h extern.h
+ braille.o: layout.h viewport.h canvas.h braille.c config.h screen.h os.h osdef.h ansi.h acls.h \
+@@ -350,7 +350,7 @@ layout.o: layout.h viewport.h canvas.h layout.c config.h screen.h os.h osdef.h a
+ viewport.o: layout.h viewport.h canvas.h viewport.c config.h screen.h os.h osdef.h ansi.h acls.h \
+  comm.h layer.h term.h image.h display.h window.h extern.h \
+  braille.h
+-list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h
+-list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h
+-list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h
++list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h comm.h
++list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h comm.h
++list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h comm.h
+ 
diff --git a/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch b/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
new file mode 100644
index 0000000..b5d71cc
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/0002-comm.h-now-depends-on-term.h.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Backport
+
+Backport from:
+
+http://git.savannah.gnu.org/cgit/screen.git/commit/?id=39c5f1c
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From 39c5f1c76f1fcef4b5958bf828a63f53426b6984 Mon Sep 17 00:00:00 2001
+From: Mike Gerwitz <mike@mikegerwitz.com>
+Date: Tue, 24 Dec 2013 22:16:31 -0500
+Subject: [PATCH] comm.h now depends on term.h
+
+---
+ src/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index e791e79..d4f7c0b 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -113,7 +113,7 @@ term.h: term.c term.sh
+ 
+ kmapdef.c: term.h
+ 
+-comm.h: comm.c comm.sh config.h
++comm.h: comm.c comm.sh config.h term.h
+ 	AWK=$(AWK) CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/comm.sh
+ 
+ docs:
+-- 
+2.4.1
+
diff --git a/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch b/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch
new file mode 100644
index 0000000..e184aa1
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/Avoid-mis-identifying-systems-as-SVR4.patch
@@ -0,0 +1,57 @@
+From 79afb676904653403145fda9e1a6a9d3ea1cb22a Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 7 Aug 2015 11:10:32 +0300
+Subject: [PATCH 4/4] Avoid mis-identifying systems as SVR4
+
+Linux can be misdetected as SVR4 because it has
+libelf installed. This leads to linking with libelf, even though no
+symbols from that library were actually used, and to a workaround for
+a buggy getlogin() being enabled.
+
+It is not documented which exact SVR4 system had the bug that the
+workaround was added for, so all I could do is make an educated guess
+at the #defines its compiler would be likely to set.
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index dc928ae..65439ce 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -179,14 +179,24 @@ AC_EGREP_CPP(yes,
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
+ 
++AC_CHECKING(SVR4)
++AC_EGREP_CPP(yes,
++[main () {
++#if defined(SVR4) || defined(__SVR4)
++  yes;
++#endif
++], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
++if test -n "$svr4" ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lelf"
+ AC_CHECKING(SVR4)
+ AC_TRY_LINK([#include <utmpx.h>
+ ],,
+-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
++[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
++[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
+ ,LIBS="$oldlibs")
++fi
++
+ AC_CHECK_HEADERS([stropts.h string.h strings.h])
+ 
+ AC_CHECKING(for Solaris 2.x)
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch b/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch
new file mode 100644
index 0000000..248bf08
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch
@@ -0,0 +1,137 @@
+From cd0f7f10a3fffbc60fe55eb200474d13fe1da65b Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 7 Aug 2015 10:34:29 +0300
+Subject: [PATCH 2/4] Provide cross compile alternatives for AC_TRY_RUN
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 32 ++++++++++++++++++++------------
+ 1 file changed, 20 insertions(+), 12 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 27690a6..ce89f56 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -348,7 +348,8 @@ main()
+   exit(0);
+ }
+ ], AC_NOTE(- your fifos are usable) fifo=1,
+-AC_NOTE(- your fifos are not usable))
++AC_NOTE(- your fifos are not usable),
++AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
+ rm -f /tmp/conftest*
+ 
+ if test -n "$fifo"; then
+@@ -396,7 +397,8 @@ main()
+   exit(0);
+ }
+ ], AC_NOTE(- your implementation is ok), 
+-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
++AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
++AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
+ rm -f /tmp/conftest*
+ fi
+ 
+@@ -458,7 +460,8 @@ main()
+   exit(0);
+ }
+ ], AC_NOTE(- your sockets are usable) sock=1,
+-AC_NOTE(- your sockets are not usable))
++AC_NOTE(- your sockets are not usable),
++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
+ rm -f /tmp/conftest*
+ 
+ if test -n "$sock"; then
+@@ -497,7 +500,8 @@ main()
+ }
+ ],AC_NOTE(- you are normal),
+ AC_NOTE(- unix domain sockets are not kept in the filesystem)
+-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
++AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
+ rm -f /tmp/conftest*
+ fi
+ 
+@@ -624,7 +628,8 @@ main()
+   exit(0);
+ }
+ ],AC_NOTE(- select is ok),
+-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
++AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
++AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
+ 
+ dnl
+ dnl    ****  termcap or terminfo  ****
+@@ -666,7 +671,8 @@ main()
+ {
+  exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+ }], AC_NOTE(- you use the termcap database),
+-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
++AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
++AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
+ AC_CHECKING(ospeed)
+ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+ 
+@@ -801,7 +807,8 @@ main()
+     else
+       AC_NOTE(- can't determine - assume ptys are world accessable)
+     fi
+-  ]
++  ],
++  AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
+ )
+ rm -f conftest_grp
+ fi
+@@ -885,7 +892,7 @@ AC_EGREP_CPP(yes,
+ #endif
+ ], load=1)
+ fi
+-if test -z "$load" ; then
++if test -z "$load" && test "$cross_compiling" = no ; then
+ AC_CHECKING(for kernelfile)
+ for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
+   if test -f $core || test -c $core; then
+@@ -1078,7 +1085,7 @@ main()
+ #endif
+   exit(0);
+ }
+-],,AC_DEFINE(SYSVSIGS))
++],,AC_DEFINE(SYSVSIGS),:)
+ 
+ fi
+ 
+@@ -1158,7 +1165,7 @@ main() {
+   if (strncmp(buf, "cdedef", 6))
+     exit(1);
+   exit(0); /* libc version works properly.  */
+-}], AC_DEFINE(USEBCOPY))
++}], AC_DEFINE(USEBCOPY),,:)
+ 
+ AC_TRY_RUN([
+ #define bcopy(s,d,l) memmove(d,s,l)
+@@ -1173,7 +1180,8 @@ main() {
+   if (strncmp(buf, "cdedef", 6))
+     exit(1);
+   exit(0); /* libc version works properly.  */
+-}], AC_DEFINE(USEMEMMOVE))
++}], AC_DEFINE(USEMEMMOVE),,
++  AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
+ 
+ 
+ AC_TRY_RUN([
+@@ -1189,7 +1197,7 @@ main() {
+   if (strncmp(buf, "cdedef", 6))
+     exit(1);
+   exit(0); /* libc version works properly.  */
+-}], AC_DEFINE(USEMEMCPY))
++}], AC_DEFINE(USEMEMCPY),,:)
+ 
+ AC_SYS_LONG_FILE_NAMES
+ 
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch b/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch
new file mode 100644
index 0000000..cc62c12
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/Remove-redundant-compiler-sanity-checks.patch
@@ -0,0 +1,65 @@
+From 73b726c25f94c1b15514ed9249b927afdfbbfb94 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 7 Aug 2015 10:30:40 +0300
+Subject: [PATCH 1/4] Remove redundant compiler sanity checks
+
+AC_PROG_CC already performs sanity checks. And unlike the removed
+checks, it does so in a way that supports cross compilation.
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 27 ---------------------------
+ 1 file changed, 27 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ffe2e37..27690a6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL
+ AC_ISC_POSIX
+ AC_USE_SYSTEM_EXTENSIONS
+ 
+-AC_TRY_RUN(main(){exit(0);},,[
+-if test $CC != cc ; then
+-AC_NOTE(Your $CC failed - restarting with CC=cc)
+-AC_NOTE()
+-CC=cc
+-export CC
+-exec $0 $configure_args
+-fi
+-])
+-
+-AC_TRY_RUN(main(){exit(0);},,
+-exec 5>&2
+-eval $ac_link
+-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
+-AC_NOTE($ac_compile)
+-AC_MSG_ERROR(Can't run the compiler - sorry))
+-
+-AC_TRY_RUN([
+-main()
+-{
+-  int __something_strange_();
+-  __something_strange_(0);
+-}
+-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
+-
+ AC_PROG_AWK
+ 
+ AC_PROG_INSTALL
+@@ -1300,8 +1275,6 @@ fi
+ dnl Ptx bug workaround -- insert -lc after -ltermcap
+ test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
+ 
+-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
+-
+ ETCSCREENRC=
+ AC_MSG_CHECKING(for the global screenrc file)
+ AC_ARG_WITH(sys-screenrc, [  --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ])
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch b/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch
new file mode 100644
index 0000000..d7e55a4
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/Skip-host-file-system-checks-when-cross-compiling.patch
@@ -0,0 +1,135 @@
+From d0b20e4cacc60ad62a2150ce07388cb5a25c2040 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 7 Aug 2015 11:09:01 +0300
+Subject: [PATCH 3/4] Skip host file system checks when cross-compiling
+
+Modified from patch by Maarten ter Huurne.
+
+Upstream-Status: Submitted [http://savannah.gnu.org/bugs/?43223]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ce89f56..dc928ae 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
+ dnl
+ dnl    ****  special unix variants  ****
+ dnl
+-if test -n "$ISC"; then
++if test "$cross_compiling" = no && test -n "$ISC" ; then
+   AC_DEFINE(ISC) LIBS="$LIBS -linet"
+ fi
+ 
+@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1)	# this disables MIPS again....
+ dnl fi
+ dnl fi
+ 
+-if test -f /sysV68 ; then
++if test "$cross_compiling" = no && test -f /sysV68 ; then
+ AC_DEFINE(sysV68)
+ fi
+ 
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for MIPS)
+ if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
+ oldlibs="$LIBS"
+@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
+ ))
+ fi
+ fi
++fi
+ 
+ 
+ AC_CHECKING(for Ultrix)
+@@ -132,7 +134,7 @@ AC_EGREP_CPP(yes,
+ #endif
+ ], ULTRIX=1)
+ 
+-if test -f /usr/lib/libpyr.a ; then
++if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lpyr"
+ AC_CHECKING(Pyramid OSX)
+@@ -679,17 +681,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+ dnl
+ dnl    ****  PTY specific things  ****
+ dnl
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for /dev/ptc)
+ if test -r /dev/ptc; then
+ AC_DEFINE(HAVE_DEV_PTC)
+ fi
++fi
+ 
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for SVR4 ptys)
+ sysvr4ptys=
+ if test -c /dev/ptmx ; then
+ AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
+ sysvr4ptys=1])
+ fi
++fi
+ 
+ AC_CHECK_FUNCS(getpt)
+ 
+@@ -699,6 +705,7 @@ AC_CHECK_FUNCS(openpty,,
+ [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
+ fi
+ 
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for ptyranges)
+ if test -d /dev/ptym ; then
+ pdir='/dev/ptym'
+@@ -722,6 +729,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\
+ AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
+ AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
+ fi
++fi
+ 
+ dnl    ****  pty mode/group handling ****
+ dnl
+@@ -869,14 +877,16 @@ fi
+ dnl
+ dnl    ****  loadav  ****
+ dnl
++if test "$cross_compiling" = no ; then
+ AC_CHECKING(for libutil(s))
+ test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
+ test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
++fi
+ 
+ AC_CHECKING(getloadavg)
+ AC_TRY_LINK(,[getloadavg((double *)0, 0);],
+ AC_DEFINE(LOADAV_GETLOADAVG) load=1,
+-if test -f /usr/lib/libkvm.a ; then
++if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
+ olibs="$LIBS"
+ LIBS="$LIBS -lkvm"
+ AC_CHECKING(getloadavg with -lkvm)
+@@ -1094,13 +1104,18 @@ dnl    ****  libraries  ****
+ dnl
+ 
+ AC_CHECKING(for crypt and sec libraries)
++if test "$cross_compiling" = no ; then
+ test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
++fi
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lcrypt"
+ AC_CHECKING(crypt)
+ AC_TRY_LINK(,,,LIBS="$oldlibs")
++if test "$cross_compiling" = no ; then
+ test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
+ test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
++fi
++
+ oldlibs="$LIBS"
+ LIBS="$LIBS -lsun"
+ AC_CHECKING(IRIX sun library)
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/screen/screen/fix-parallel-make.patch b/meta/recipes-extended/screen/screen/fix-parallel-make.patch
new file mode 100644
index 0000000..e0caf5d
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/fix-parallel-make.patch
@@ -0,0 +1,19 @@
+This fixes the parallel make install failure
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: screen-4.0.3/Makefile.in
+===================================================================
+--- screen-4.0.3.orig/Makefile.in
++++ screen-4.0.3/Makefile.in
+@@ -70,7 +70,7 @@ screen: $(OFILES)
+ .c.o:
+ 	$(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
+ 
+-install_bin: .version screen
++install_bin: .version screen installdirs
+ 	-if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
+ 		then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
+ 	$(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
diff --git a/meta/recipes-extended/screen/screen/screen.pam b/meta/recipes-extended/screen/screen/screen.pam
new file mode 100644
index 0000000..ff657fa
--- /dev/null
+++ b/meta/recipes-extended/screen/screen/screen.pam
@@ -0,0 +1,2 @@
+#%PAM-1.0
+auth       include      common-auth
diff --git a/meta/recipes-extended/screen/screen_4.3.1.bb b/meta/recipes-extended/screen/screen_4.3.1.bb
new file mode 100644
index 0000000..92457af
--- /dev/null
+++ b/meta/recipes-extended/screen/screen_4.3.1.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Multiplexing terminal manager"
+DESCRIPTION = "Screen is a full-screen window manager \
+that multiplexes a physical terminal between several \
+processes, typically interactive shells."
+HOMEPAGE = "http://www.gnu.org/software/screen/"
+BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
+
+SECTION = "console/utils"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
+
+DEPENDS = "ncurses \
+          ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} = "base-files"
+
+SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \
+           file://fix-parallel-make.patch \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \
+           file://Remove-redundant-compiler-sanity-checks.patch \
+           file://Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch \
+           file://Skip-host-file-system-checks-when-cross-compiling.patch \
+           file://Avoid-mis-identifying-systems-as-SVR4.patch \
+           file://0001-fix-for-multijob-build.patch \
+           file://0002-comm.h-now-depends-on-term.h.patch \
+          "
+
+SRC_URI[md5sum] = "5bb3b0ff2674e29378c31ad3411170ad"
+SRC_URI[sha256sum] = "fa4049f8aee283de62e283d427f2cfd35d6c369b40f7f45f947dbfd915699d63"
+
+inherit autotools texinfo
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
+
+EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
+               ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+
+do_install_append () {
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+		install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
+	fi
+}
+
+pkg_postinst_${PN} () {
+	grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+	printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
diff --git a/meta/recipes-extended/sed/sed-4.1.2/Makevars b/meta/recipes-extended/sed/sed-4.1.2/Makevars
new file mode 100644
index 0000000..8b09f53
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.1.2/Makevars
@@ -0,0 +1,25 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch
new file mode 100644
index 0000000..836551e
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+Change the getline return type to match its declaration.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c
+--- sed-4.1.2-orig/lib/getline.c	2010-08-31 08:47:50.070094024 +0800
++++ sed-4.1.2/lib/getline.c	2010-08-31 08:48:50.982178172 +0800
+@@ -30,7 +30,7 @@
+    necessary.  Returns the number of characters read (not including the
+    null terminator), or -1 on error or EOF.  */
+ 
+-size_t
++ssize_t
+ getline (lineptr, n, stream)
+      char **lineptr;
+      size_t *n;
diff --git a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
new file mode 100644
index 0000000..8059406
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Pending
+
+automake-1.12.x has deprecated use of @mkdir_p@, fix the issue by using @MKDIR_P@ instead.
+
+Avoid this build issue:
+| make[1]: mkdir_p@: Command not found
+| make[1]: *** [install-data-yes] Error 127
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/07/13
+
+Index: sed-4.1.2/intl/Makefile.in
+===================================================================
+--- sed-4.1.2.orig/intl/Makefile.in
++++ sed-4.1.2/intl/Makefile.in
+@@ -40,7 +40,7 @@ subdir = intl
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ mkinstalldirs = $(mkdir_p)
+-mkdir_p = @mkdir_p@
++mkdir_p = @MKDIR_P@
+ 
+ l = @INTL_LIBTOOL_SUFFIX_PREFIX@
+ 
+Index: sed-4.1.2/po/Makefile.in.in
+===================================================================
+--- sed-4.1.2.orig/po/Makefile.in.in
++++ sed-4.1.2/po/Makefile.in.in
+@@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po
+ INSTALL = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/install -c
+ INSTALL_DATA = ${INSTALL} -m 644
+ mkinstalldirs = $(mkdir_p)
+-mkdir_p = @mkdir_p@
++mkdir_p = @MKDIR_P@
+ 
+ CC = i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/srv/home/nitin/builds2/build0/tmp/sysroots/qemux86
+ GMSGFMT = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/msgfmt
diff --git a/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..ba1a4ba
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,33 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/gnulib.mk b/lib/gnulib.mk
+index e1d74db..c0e92dd 100644
+--- a/lib/gnulib.mk
++++ b/lib/gnulib.mk
+@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/sed/sed-4.2.2/run-ptest b/meta/recipes-extended/sed/sed-4.2.2/run-ptest
new file mode 100644
index 0000000..7c0f627
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.2.2/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -C testsuite -k runtest-TESTS
diff --git a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
new file mode 100644
index 0000000..105e8b7
--- /dev/null
+++ b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
@@ -0,0 +1,66 @@
+sed: add ptest
+
+ptest needs buildtest-TESTS and runtest-TESTS targets.
+serial-tests is required to generate those targets.
+
+And fix following error after add serial-tests.
+
+[snip]
+help2man: can't get `--help' info from ../sed/sed
+make[2]: *** [sed.1] Error 2
+[snip]
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.ac          |    2 +-
+ doc/Makefile.am       |    2 +-
+ testsuite/Makefile.am |    6 ++++++
+ 3 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9d33ec9..4f0c532 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(build-aux)
+ AC_CONFIG_SRCDIR([sed/sed.c])
+ AM_CONFIG_HEADER(config.h:config_h.in)
+ AC_PREREQ(2.60)
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([serial-tests])
+ 
+ SED_FEATURE_VERSION=4.2.2
+ AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION",
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index af6975c..6fd8c9a 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -25,7 +25,7 @@ $(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
+ 	fi
+ 	echo stamp > $(srcdir)/s-texi
+ 
+-sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
++_sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
+ 	$(HELP2MAN) --name "stream editor for filtering and transforming text" \
+ 	  -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED) 
+ 
+diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
+index d80e72c..b05f01e 100644
+--- a/testsuite/Makefile.am
++++ b/testsuite/Makefile.am
+@@ -99,5 +99,11 @@ EXTRA_DIST = \
+ # automake makes `check' depend on $(TESTS).  Declare
+ # dummy targets for $(TESTS) so that make does not complain.
+ 
++install-ptest:
++	cd $(BUILDDIR); tar -cf - $(TESTDIR) --exclude *.o | ( cd $(DESTDIR) && tar -xf - )
++	for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done
++	sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile
++	for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done
++
+ .PHONY: $(SEDTESTS)
+ $(SEDTESTS):
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb
new file mode 100644
index 0000000..40e3a53
--- /dev/null
+++ b/meta/recipes-extended/sed/sed_4.1.2.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Stream EDitor (text filtering utility)"
+HOMEPAGE = "http://www.gnu.org/software/sed/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407"
+SECTION = "console/utils"
+PR = "r7"
+
+SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
+           file://fix_return_type.patch \
+           file://sed-4.1.2_fix_for_automake-1.12.patch \
+           file://Makevars"
+
+SRC_URI[md5sum] = "928f0e06422f414091917401f1a834d0"
+SRC_URI[sha256sum] = "638e837ba765d5da0a30c98b57c2953cecea96827882f594612acace93ceeeab"
+
+inherit autotools texinfo update-alternatives gettext
+
+do_configure_prepend () {
+	cp ${WORKDIR}/Makevars ${S}/po/
+}
+
+do_install () {
+	autotools_do_install
+	install -d ${D}${base_bindir}
+	if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
+	    mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+	    rmdir ${D}${bindir}/
+	fi
+}
+
+ALTERNATIVE_${PN} = "sed"
+ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
+ALTERNATIVE_PRIORITY = "100"
+
diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb
new file mode 100644
index 0000000..5aa7d8a
--- /dev/null
+++ b/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Stream EDitor (text filtering utility)"
+HOMEPAGE = "http://www.gnu.org/software/sed/"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+                    file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f"
+SECTION = "console/utils"
+
+SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
+           file://sed-add-ptest.patch \
+	   file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://run-ptest \
+"
+
+SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
+SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
+
+inherit autotools texinfo update-alternatives gettext ptest
+RDEPENDS_${PN}-ptest += "make ${PN}"
+RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru"
+
+EXTRA_OECONF = "--disable-acl \
+                ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}"
+
+do_install () {
+	autotools_do_install
+	install -d ${D}${base_bindir}
+	if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
+	    mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+	    rmdir ${D}${bindir}/
+	fi
+}
+
+ALTERNATIVE_${PN} = "sed"
+ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
+ALTERNATIVE_PRIORITY = "100"
+
+TESTDIR = "testsuite"
+
+do_compile_ptest() {
+	oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+}
+
diff --git a/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch
new file mode 100644
index 0000000..828b95a
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-Do-not-read-login.defs-before-doing-chroot.patch
@@ -0,0 +1,46 @@
+From 170c25c8e0b5c3dc2615d1db94c8d24a13ff99bf Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Thu, 11 Sep 2014 15:11:23 +0200
+Subject: [PATCH] Do not read login.defs before doing chroot()
+
+If "useradd --root <root> ..." was used, the login.defs file would still
+be read from /etc/login.defs instead of <root>/etc/login.defs. This was
+due to getdef_ulong() being called before process_root_flag().
+
+Upstream-Status: Submitted [http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2014-September/010446.html]
+
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ src/useradd.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/useradd.c b/src/useradd.c
+index a8a1f76..e1ebf50 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -1993,9 +1993,11 @@ int main (int argc, char **argv)
+ #endif				/* USE_PAM */
+ #endif				/* ACCT_TOOLS_SETUID */
+ 
++#ifdef ENABLE_SUBIDS
+ 	/* Needed for userns check */
+-	uid_t uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
+-	uid_t uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
++	uid_t uid_min;
++	uid_t uid_max;
++#endif
+ 
+ 	/*
+ 	 * Get my name so that I can use it to report errors.
+@@ -2026,6 +2028,8 @@ int main (int argc, char **argv)
+ 	is_shadow_grp = sgr_file_present ();
+ #endif
+ #ifdef ENABLE_SUBIDS
++	uid_min = (uid_t) getdef_ulong ("UID_MIN", 1000UL);
++	uid_max = (uid_t) getdef_ulong ("UID_MAX", 60000UL);
+ 	is_sub_uid = sub_uid_file_present () && !rflg &&
+ 	    (!user_id || (user_id <= uid_max && user_id >= uid_min));
+ 	is_sub_gid = sub_gid_file_present () && !rflg &&
+-- 
+1.9.0
+
diff --git a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
new file mode 100644
index 0000000..85dde8e
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch
@@ -0,0 +1,109 @@
+Upstream-Status: Inappropriate [OE specific]
+
+Subject: useradd.c: create parent directories when necessary
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/useradd.c |   72 +++++++++++++++++++++++++++++++++++++++------------------
+ 1 file changed, 49 insertions(+), 23 deletions(-)
+
+diff --git a/src/useradd.c b/src/useradd.c
+index 4bd969d..cb5dd6c 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -1893,6 +1893,35 @@ static void usr_update (void)
+ }
+ 
+ /*
++ * mkdir_p - create directories, including parent directories when needed
++ *
++ * similar to `mkdir -p'
++ */
++void mkdir_p(const char *path) {
++	int len = strlen(path);
++	char newdir[len + 1];
++	mode_t mode = 0755;
++	int i = 0;
++
++	if (path[i] == '\0') {
++		return;
++	}
++
++	/* skip the leading '/' */
++	i++;
++
++	while(path[i] != '\0') {
++		if (path[i] == '/') {
++			strncpy(newdir, path, i);
++			newdir[i] = '\0';
++			mkdir(newdir, mode);
++		}
++		i++;
++	}
++	mkdir(path, mode);
++}
++
++/*
+  * create_home - create the user's home directory
+  *
+  *	create_home() creates the user's home directory if it does not
+@@ -1907,36 +1936,33 @@ static void create_home (void)
+ 			fail_exit (E_HOMEDIR);
+ 		}
+ #endif
+-		/* XXX - create missing parent directories.  --marekm */
+-		if (mkdir (user_home, 0) != 0) {
+-			fprintf (stderr,
+-			         _("%s: cannot create directory %s\n"),
+-			         Prog, user_home);
+-#ifdef WITH_AUDIT
+-			audit_logger (AUDIT_ADD_USER, Prog,
+-			              "adding home directory",
+-			              user_name, (unsigned int) user_id,
+-			              SHADOW_AUDIT_FAILURE);
+-#endif
+-			fail_exit (E_HOMEDIR);
+-		}
+-		chown (user_home, user_id, user_gid);
+-		chmod (user_home,
+-		       0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
+-		home_added = true;
++		mkdir_p(user_home);
++	}
++	if (access (user_home, F_OK) != 0) {
+ #ifdef WITH_AUDIT
+ 		audit_logger (AUDIT_ADD_USER, Prog,
+ 		              "adding home directory",
+ 		              user_name, (unsigned int) user_id,
+-		              SHADOW_AUDIT_SUCCESS);
++		              SHADOW_AUDIT_FAILURE);
+ #endif
+-#ifdef WITH_SELINUX
+-		/* Reset SELinux to create files with default contexts */
+-		if (reset_selinux_file_context () != 0) {
+-			fail_exit (E_HOMEDIR);
+-		}
++		fail_exit (E_HOMEDIR);
++	}
++	chown (user_home, user_id, user_gid);
++	chmod (user_home,
++	       0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
++	home_added = true;
++#ifdef WITH_AUDIT
++	audit_logger (AUDIT_ADD_USER, Prog,
++		      "adding home directory",
++		      user_name, (unsigned int) user_id,
++		      SHADOW_AUDIT_SUCCESS);
+ #endif
++#ifdef WITH_SELINUX
++	/* Reset SELinux to create files with default contexts */
++	if (reset_selinux_file_context () != 0) {
++		fail_exit (E_HOMEDIR);
+ 	}
++#endif
+ }
+ 
+ /*
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
new file mode 100644
index 0000000..68da25f
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
@@ -0,0 +1,201 @@
+Upstream-Status: Inappropriate [OE specific]
+
+Allow for setting password in clear text.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/Makefile.am |    8 ++++----
+ src/groupadd.c  |    8 +++++++-
+ src/groupmod.c  |    8 +++++++-
+ src/useradd.c   |    9 +++++++--
+ src/usermod.c   |    8 +++++++-
+ 5 files changed, 32 insertions(+), 9 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 25e288d..856b087 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
+ chsh_LDADD     = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
+ chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
+ gpasswd_LDADD  = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
+-groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
++groupadd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
+ groupdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
+ groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX)
+-groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
++groupmod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
+ grpck_LDADD    = $(LDADD) $(LIBSELINUX)
+ grpconv_LDADD  = $(LDADD) $(LIBSELINUX)
+ grpunconv_LDADD = $(LDADD) $(LIBSELINUX)
+@@ -111,9 +111,9 @@ su_SOURCES     = \
+ 	suauth.c
+ su_LDADD       = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
+ sulogin_LDADD  = $(LDADD) $(LIBCRYPT)
+-useradd_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
++useradd_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
+ userdel_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE)
+-usermod_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
++usermod_LDADD  = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
+ vipw_LDADD     = $(LDADD) $(LIBSELINUX)
+ 
+ install-am: all-am
+diff --git a/src/groupadd.c b/src/groupadd.c
+index f716f57..4e28c26 100644
+--- a/src/groupadd.c
++++ b/src/groupadd.c
+@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status)
+ 	(void) fputs (_("  -o, --non-unique              allow to create groups with duplicate\n"
+ 	                "                                (non-unique) GID\n"), usageout);
+ 	(void) fputs (_("  -p, --password PASSWORD       use this encrypted password for the new group\n"), usageout);
++	(void) fputs (_("  -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout);
+ 	(void) fputs (_("  -r, --system                  create a system account\n"), usageout);
+ 	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
+ 	(void) fputs ("\n", usageout);
+@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv)
+ 		{"key",        required_argument, NULL, 'K'},
+ 		{"non-unique", no_argument,       NULL, 'o'},
+ 		{"password",   required_argument, NULL, 'p'},
++		{"clear-password", required_argument, NULL, 'P'},
+ 		{"system",     no_argument,       NULL, 'r'},
+ 		{"root",       required_argument, NULL, 'R'},
+ 		{NULL, 0, NULL, '\0'}
+ 	};
+ 
+-	while ((c = getopt_long (argc, argv, "fg:hK:op:rR:",
++	while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:",
+ 		                 long_options, NULL)) != -1) {
+ 		switch (c) {
+ 		case 'f':
+@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv)
+ 			pflg = true;
+ 			group_passwd = optarg;
+ 			break;
++		case 'P':
++			pflg = true;
++			group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
++			break;
+ 		case 'r':
+ 			rflg = true;
+ 			break;
+diff --git a/src/groupmod.c b/src/groupmod.c
+index d9d3807..68f49d1 100644
+--- a/src/groupmod.c
++++ b/src/groupmod.c
+@@ -127,6 +127,7 @@ static void usage (int status)
+ 	(void) fputs (_("  -o, --non-unique              allow to use a duplicate (non-unique) GID\n"), usageout);
+ 	(void) fputs (_("  -p, --password PASSWORD       change the password to this (encrypted)\n"
+ 	                "                                PASSWORD\n"), usageout);
++	(void) fputs (_("  -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout);
+ 	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
+ 	(void) fputs ("\n", usageout);
+ 	exit (status);
+@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv)
+ 		{"new-name",   required_argument, NULL, 'n'},
+ 		{"non-unique", no_argument,       NULL, 'o'},
+ 		{"password",   required_argument, NULL, 'p'},
++		{"clear-password", required_argument, NULL, 'P'},
+ 		{"root",       required_argument, NULL, 'R'},
+ 		{NULL, 0, NULL, '\0'}
+ 	};
+-	while ((c = getopt_long (argc, argv, "g:hn:op:R:",
++	while ((c = getopt_long (argc, argv, "g:hn:op:P:R:",
+ 		                 long_options, NULL)) != -1) {
+ 		switch (c) {
+ 		case 'g':
+@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv)
+ 			group_passwd = optarg;
+ 			pflg = true;
+ 			break;
++		case 'P':
++			group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
++			pflg = true;
++			break;
+ 		case 'R': /* no-op, handled in process_root_flag () */
+ 			break;
+ 		default:
+diff --git a/src/useradd.c b/src/useradd.c
+index b3bd451..4416f90 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -773,6 +773,7 @@ static void usage (int status)
+ 	(void) fputs (_("  -o, --non-unique              allow to create users with duplicate\n"
+ 	                "                                (non-unique) UID\n"), usageout);
+ 	(void) fputs (_("  -p, --password PASSWORD       encrypted password of the new account\n"), usageout);
++	(void) fputs (_("  -P, --clear-password PASSWORD clear password of the new account\n"), usageout);
+ 	(void) fputs (_("  -r, --system                  create a system account\n"), usageout);
+ 	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
+ 	(void) fputs (_("  -s, --shell SHELL             login shell of the new account\n"), usageout);
+@@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv)
+ 			{"no-user-group",  no_argument,       NULL, 'N'},
+ 			{"non-unique",     no_argument,       NULL, 'o'},
+ 			{"password",       required_argument, NULL, 'p'},
++			{"clear-password", required_argument, NULL, 'P'},
+ 			{"system",         no_argument,       NULL, 'r'},
+ 			{"root",           required_argument, NULL, 'R'},
+ 			{"shell",          required_argument, NULL, 's'},
+@@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv)
+ 		};
+ 		while ((c = getopt_long (argc, argv,
+ #ifdef WITH_SELINUX
+-		                         "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:",
++		                         "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:",
+ #else				/* !WITH_SELINUX */
+-		                         "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U",
++		                         "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U",
+ #endif				/* !WITH_SELINUX */
+ 		                         long_options, NULL)) != -1) {
+ 			switch (c) {
+@@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv)
+ 				}
+ 				user_pass = optarg;
+ 				break;
++			case 'P': /* set clear text password */
++				user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
++				break;
+ 			case 'r':
+ 				rflg = true;
+ 				break;
+diff --git a/src/usermod.c b/src/usermod.c
+index e7d4351..b79f7a3 100644
+--- a/src/usermod.c
++++ b/src/usermod.c
+@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status)
+ 	                "                                new location (use only with -d)\n"), usageout);
+ 	(void) fputs (_("  -o, --non-unique              allow using duplicate (non-unique) UID\n"), usageout);
+ 	(void) fputs (_("  -p, --password PASSWORD       use encrypted password for the new password\n"), usageout);
++	(void) fputs (_("  -P, --clear-password PASSWORD use clear password for the new password\n"), usageout);
+ 	(void) fputs (_("  -R, --root CHROOT_DIR         directory to chroot into\n"), usageout);
+ 	(void) fputs (_("  -s, --shell SHELL             new login shell for the user account\n"), usageout);
+ 	(void) fputs (_("  -u, --uid UID                 new UID for the user account\n"), usageout);
+@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv)
+ 			{"move-home",    no_argument,       NULL, 'm'},
+ 			{"non-unique",   no_argument,       NULL, 'o'},
+ 			{"password",     required_argument, NULL, 'p'},
++			{"clear-password", required_argument, NULL, 'P'},
+ 			{"root",         required_argument, NULL, 'R'},
+ 			{"shell",        required_argument, NULL, 's'},
+ 			{"uid",          required_argument, NULL, 'u'},
+@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv)
+ 			{NULL, 0, NULL, '\0'}
+ 		};
+ 		while ((c = getopt_long (argc, argv,
+-		                         "ac:d:e:f:g:G:hl:Lmop:R:s:u:U"
++		                         "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U"
+ #ifdef ENABLE_SUBIDS
+ 		                         "v:w:V:W:"
+ #endif				/* ENABLE_SUBIDS */
+@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv)
+ 				user_pass = optarg;
+ 				pflg = true;
+ 				break;
++			case 'P':
++				user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
++				pflg = true;
++				break;
+ 			case 'R': /* no-op, handled in process_root_flag () */
+ 				break;
+ 			case 's':
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
new file mode 100644
index 0000000..185590c
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
@@ -0,0 +1,41 @@
+From 2cb54158b80cdbd97ca3b36df83f9255e923ae3f Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@aura-online.co.uk>
+Date: Sat, 23 Aug 2014 09:46:39 +0100
+Subject: [PATCH] Check size of uid_t and gid_t using AC_CHECK_SIZEOF
+
+This built-in check is simpler than the previous method and, most
+importantly, works when cross-compiling.
+
+Upstream-Status: Accepted
+[https://github.com/shadow-maint/shadow/commit/2cb54158b80cdbd97ca3b36df83f9255e923ae3f]
+
+Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
+---
+ configure.in | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 1a3f841..4a4d6d0 100644
+--- a/configure.in
++++ b/configure.in
+@@ -335,16 +335,10 @@ if test "$enable_subids" != "no"; then
+ 	dnl
+ 	dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
+ 	dnl
+-	AC_RUN_IFELSE([AC_LANG_SOURCE([
+-#include <sys/types.h>
+-int main(void) {
+-	uid_t u;
+-	gid_t g;
+-	return (sizeof u < 4) || (sizeof g < 4);
+-}
+-	])], [id32bit="yes"], [id32bit="no"])
+-
+-	if test "x$id32bit" = "xyes"; then
++	AC_CHECK_SIZEOF([uid_t],, [#include "sys/types.h"])
++	AC_CHECK_SIZEOF([gid_t],, [#include "sys/types.h"])
++
++	if test "$ac_cv_sizeof_uid_t" -ge 4 && test "$ac_cv_sizeof_gid_t" -ge 4; then
+ 		AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
+ 		enable_subids="yes"
+ 	else
diff --git a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
new file mode 100644
index 0000000..4fa3d18
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Inappropriate [OE specific]
+
+commonio.c: fix unexpected open failure in chroot environment
+
+When using commands with '-R <newroot>' option in our pseudo environment,
+we would usually get the 'Pemission Denied' error. This patch serves as
+a workaround to this problem.
+
+Note that this patch doesn't change the logic in the code, it just expands
+the codes.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ lib/commonio.c |   16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/lib/commonio.c b/lib/commonio.c
+index cc536bf..51cafd9 100644
+--- a/lib/commonio.c
++++ b/lib/commonio.c
+@@ -613,10 +613,18 @@ int commonio_open (struct commonio_db *db, int mode)
+ 	db->cursor = NULL;
+ 	db->changed = false;
+ 
+-	fd = open (db->filename,
+-	             (db->readonly ? O_RDONLY : O_RDWR)
+-	           | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
+-	saved_errno = errno;
++	if (db->readonly) {
++		fd = open (db->filename,
++			   (true ? O_RDONLY : O_RDWR)
++			   | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
++		saved_errno = errno;
++	} else {
++		fd = open (db->filename,
++			   (false ? O_RDONLY : O_RDWR)
++			   | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW);
++		saved_errno = errno;
++	}
++
+ 	db->fp = NULL;
+ 	if (fd >= 0) {
+ #ifdef WITH_TCB
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/disable-syslog.patch b/meta/recipes-extended/shadow/files/disable-syslog.patch
new file mode 100644
index 0000000..1943fd6
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/disable-syslog.patch
@@ -0,0 +1,34 @@
+Disable use of syslog to prevent sysroot user and group additions from
+writing entries to the host's syslog. This patch should only be used
+with the shadow-native recipe.
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c
+--- shadow-4.1.4.3.orig//src/groupadd.c	2011-02-13 09:58:16.000000000 -0800
++++ shadow-4.1.4.3/src/groupadd.c	2012-04-05 10:05:59.440001758 -0700
+@@ -34,6 +34,9 @@
+ 
+ #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <getopt.h>
+diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c
+--- shadow-4.1.4.3.orig//src/useradd.c	2011-02-13 09:58:16.000000000 -0800
++++ shadow-4.1.4.3/src/useradd.c	2012-04-05 10:06:25.076001315 -0700
+@@ -34,6 +34,9 @@
+ 
+ #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
diff --git a/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
new file mode 100644
index 0000000..02cb91a
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/fix-installation-failure-with-subids-disabled.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+Subject: fix installation failure with subids disabled
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/Makefile.am |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 25e288d..076f8ef 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -52,7 +52,10 @@ usbin_PROGRAMS = \
+ noinst_PROGRAMS = id sulogin
+ 
+ suidbins       = su
+-suidubins      = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap
++suidubins      = chage chfn chsh expiry gpasswd newgrp passwd
++if ENABLE_SUBIDS
++suidubins += newgidmap newuidmap
++endif
+ if ACCT_TOOLS_SETUID
+ 	suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod
+ endif
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot b/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot
new file mode 100644
index 0000000..8a68dd3
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/login.defs_shadow-sysroot
@@ -0,0 +1,386 @@
+#
+# /etc/login.defs - Configuration control definitions for the shadow package.
+#
+#	$Id: login.defs 3038 2009-07-23 20:41:35Z nekral-guest $
+#
+
+#
+# Delay in seconds before being allowed another attempt after a login failure
+# Note: When PAM is used, some modules may enfore a minimal delay (e.g.
+#       pam_unix enforces a 2s delay)
+#
+FAIL_DELAY		3
+
+#
+# Enable logging and display of /var/log/faillog login failure info.
+#
+#FAILLOG_ENAB		yes
+
+#
+# Enable display of unknown usernames when login failures are recorded.
+#
+LOG_UNKFAIL_ENAB	no
+
+#
+# Enable logging of successful logins
+#
+LOG_OK_LOGINS		no
+
+#
+# Enable logging and display of /var/log/lastlog login time info.
+#
+#LASTLOG_ENAB		yes
+
+#
+# Enable checking and display of mailbox status upon login.
+#
+# Disable if the shell startup files already check for mail
+# ("mailx -e" or equivalent).
+#
+##MAIL_CHECK_ENAB		yes
+
+#
+# Enable additional checks upon password changes.
+#
+#OBSCURE_CHECKS_ENAB	yes
+
+#
+# Enable checking of time restrictions specified in /etc/porttime.
+#
+#PORTTIME_CHECKS_ENAB	yes
+
+#
+# Enable setting of ulimit, umask, and niceness from passwd gecos field.
+#
+#QUOTAS_ENAB		yes
+
+#
+# Enable "syslog" logging of su activity - in addition to sulog file logging.
+# SYSLOG_SG_ENAB does the same for newgrp and sg.
+#
+SYSLOG_SU_ENAB		yes
+SYSLOG_SG_ENAB		yes
+
+#
+# If defined, either full pathname of a file containing device names or
+# a ":" delimited list of device names.  Root logins will be allowed only
+# upon these devices.
+#
+CONSOLE		/etc/securetty
+#CONSOLE	console:tty01:tty02:tty03:tty04
+
+#
+# If defined, all su activity is logged to this file.
+#
+#SULOG_FILE	/var/log/sulog
+
+#
+# If defined, ":" delimited list of "message of the day" files to
+# be displayed upon login.
+#
+#MOTD_FILE	/etc/motd
+#MOTD_FILE	/etc/motd:/usr/lib/news/news-motd
+
+#
+# If defined, this file will be output before each login prompt.
+#
+#ISSUE_FILE	/etc/issue
+
+#
+# If defined, file which maps tty line to TERM environment parameter.
+# Each line of the file is in a format something like "vt100  tty01".
+#
+#TTYTYPE_FILE	/etc/ttytype
+
+#
+# If defined, login failures will be logged here in a utmp format.
+# last, when invoked as lastb, will read /var/log/btmp, so...
+#
+#FTMP_FILE	/var/log/btmp
+
+#
+# If defined, name of file whose presence which will inhibit non-root
+# logins.  The contents of this file should be a message indicating
+# why logins are inhibited.
+#
+#NOLOGINS_FILE	/etc/nologin
+
+#
+# If defined, the command name to display when running "su -".  For
+# example, if this is defined as "su" then a "ps" will display the
+# command is "-su".  If not defined, then "ps" would display the
+# name of the shell actually being run, e.g. something like "-sh".
+#
+SU_NAME		su
+
+#
+# *REQUIRED*
+#   Directory where mailboxes reside, _or_ name of file, relative to the
+#   home directory.  If you _do_ define both, #MAIL_DIR takes precedence.
+#
+#MAIL_DIR	/var/spool/mail
+MAIL_FILE	.mail
+
+#
+# If defined, file which inhibits all the usual chatter during the login
+# sequence.  If a full pathname, then hushed mode will be enabled if the
+# user's name or shell are found in the file.  If not a full pathname, then
+# hushed mode will be enabled if the file exists in the user's home directory.
+#
+HUSHLOGIN_FILE	.hushlogin
+#HUSHLOGIN_FILE	/etc/hushlogins
+
+#
+# If defined, either a TZ environment parameter spec or the
+# fully-rooted pathname of a file containing such a spec.
+#
+#ENV_TZ		TZ=CST6CDT
+#ENV_TZ		/etc/tzname
+
+#
+# If defined, an HZ environment parameter spec.
+#
+# for Linux/x86
+#ENV_HZ		HZ=100
+# For Linux/Alpha...
+#ENV_HZ		HZ=1024
+
+#
+# *REQUIRED*  The default PATH settings, for superuser and normal users.
+#
+# (they are minimal, add the rest in the shell startup files)
+ENV_SUPATH	PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ENV_PATH	PATH=/bin:/usr/bin
+
+#
+# Terminal permissions
+#
+#	TTYGROUP	Login tty will be assigned this group ownership.
+#	TTYPERM		Login tty will be set to this permission.
+#
+# If you have a "write" program which is "setgid" to a special group
+# which owns the terminals, define TTYGROUP to the group number and
+# TTYPERM to 0620.  Otherwise leave TTYGROUP commented out and assign
+# TTYPERM to either 622 or 600.
+#
+TTYGROUP	tty
+TTYPERM		0600
+
+#
+# Login configuration initializations:
+#
+#	ERASECHAR	Terminal ERASE character ('\010' = backspace).
+#	KILLCHAR	Terminal KILL character ('\025' = CTRL/U).
+#	ULIMIT		Default "ulimit" value.
+#
+# The ERASECHAR and KILLCHAR are used only on System V machines.
+# The ULIMIT is used only if the system supports it.
+# (now it works with setrlimit too; ulimit is in 512-byte units)
+#
+# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
+#
+ERASECHAR	0177
+KILLCHAR	025
+#ULIMIT		2097152
+
+# Default initial "umask" value for non-PAM enabled systems.
+# UMASK is also used by useradd and newusers to set the mode of new home
+# directories.
+# 022 is the default value, but 027, or even 077, could be considered
+# better for privacy. There is no One True Answer here: each sysadmin
+# must make up her mind.
+UMASK		022
+
+#
+# Password aging controls:
+#
+#	PASS_MAX_DAYS	Maximum number of days a password may be used.
+#	PASS_MIN_DAYS	Minimum number of days allowed between password changes.
+#	PASS_MIN_LEN	Minimum acceptable password length.
+#	PASS_WARN_AGE	Number of days warning given before a password expires.
+#
+PASS_MAX_DAYS	99999
+PASS_MIN_DAYS	0
+#PASS_MIN_LEN	5
+PASS_WARN_AGE	7
+
+#
+# If "yes", the user must be listed as a member of the first gid 0 group
+# in /etc/group (called "root" on most Linux systems) to be able to "su"
+# to uid 0 accounts.  If the group doesn't exist or is empty, no one
+# will be able to "su" to uid 0.
+#
+#SU_WHEEL_ONLY	no
+
+#
+# If compiled with cracklib support, where are the dictionaries
+#
+#CRACKLIB_DICTPATH	/var/cache/cracklib/cracklib_dict
+
+#
+# Min/max values for automatic uid selection in useradd
+#
+UID_MIN			 1000
+UID_MAX			60000
+# System accounts
+SYS_UID_MIN		  101
+SYS_UID_MAX		  999
+
+#
+# Min/max values for automatic gid selection in groupadd
+#
+GID_MIN			 1000
+GID_MAX			60000
+# System accounts
+SYS_GID_MIN		  101
+SYS_GID_MAX		  999
+
+#
+# Max number of login retries if password is bad
+#
+LOGIN_RETRIES		5
+
+#
+# Max time in seconds for login
+#
+LOGIN_TIMEOUT		60
+
+#
+# Maximum number of attempts to change password if rejected (too easy)
+#
+#PASS_CHANGE_TRIES	5
+
+#
+# Warn about weak passwords (but still allow them) if you are root.
+#
+#PASS_ALWAYS_WARN	yes
+
+#
+# Number of significant characters in the password for crypt().
+# Default is 8, don't change unless your crypt() is better.
+# Ignored if MD5_CRYPT_ENAB set to "yes".
+#
+#PASS_MAX_LEN		8
+
+#
+# Require password before chfn/chsh can make any changes.
+#
+#CHFN_AUTH		yes
+
+#
+# Which fields may be changed by regular users using chfn - use
+# any combination of letters "frwh" (full name, room number, work
+# phone, home phone).  If not defined, no changes are allowed.
+# For backward compatibility, "yes" = "rwh" and "no" = "frwh".
+# 
+CHFN_RESTRICT		rwh
+
+#
+# Password prompt (%s will be replaced by user name).
+#
+# XXX - it doesn't work correctly yet, for now leave it commented out
+# to use the default which is just "Password: ".
+#LOGIN_STRING		"%s's Password: "
+
+#
+# Only works if compiled with MD5_CRYPT defined:
+# If set to "yes", new passwords will be encrypted using the MD5-based
+# algorithm compatible with the one used by recent releases of FreeBSD.
+# It supports passwords of unlimited length and longer salt strings.
+# Set to "no" if you need to copy encrypted passwords to other systems
+# which don't understand the new algorithm.  Default is "no".
+#
+# Note: If you use PAM, it is recommended to use a value consistent with
+# the PAM modules configuration.
+#
+# This variable is deprecated. You should use ENCRYPT_METHOD.
+#
+#MD5_CRYPT_ENAB	no
+
+#
+# Only works if compiled with ENCRYPTMETHOD_SELECT defined:
+# If set to MD5 , MD5-based algorithm will be used for encrypting password
+# If set to SHA256, SHA256-based algorithm will be used for encrypting password
+# If set to SHA512, SHA512-based algorithm will be used for encrypting password
+# If set to DES, DES-based algorithm will be used for encrypting password (default)
+# Overrides the MD5_CRYPT_ENAB option
+#
+# Note: If you use PAM, it is recommended to use a value consistent with
+# the PAM modules configuration.
+#
+#ENCRYPT_METHOD DES
+
+#
+# Only works if ENCRYPT_METHOD is set to SHA256 or SHA512.
+#
+# Define the number of SHA rounds.
+# With a lot of rounds, it is more difficult to brute forcing the password.
+# But note also that it more CPU resources will be needed to authenticate
+# users.
+#
+# If not specified, the libc will choose the default number of rounds (5000).
+# The values must be inside the 1000-999999999 range.
+# If only one of the MIN or MAX values is set, then this value will be used.
+# If MIN > MAX, the highest value will be used.
+#
+# SHA_CRYPT_MIN_ROUNDS 5000
+# SHA_CRYPT_MAX_ROUNDS 5000
+
+#
+# List of groups to add to the user's supplementary group set
+# when logging in on the console (as determined by the CONSOLE
+# setting).  Default is none.
+#
+# Use with caution - it is possible for users to gain permanent
+# access to these groups, even when not logged in on the console.
+# How to do it is left as an exercise for the reader...
+#
+#CONSOLE_GROUPS		floppy:audio:cdrom
+
+#
+# Should login be allowed if we can't cd to the home directory?
+# Default in no.
+#
+DEFAULT_HOME	yes
+
+#
+# If this file exists and is readable, login environment will be
+# read from it.  Every line should be in the form name=value.
+#
+#ENVIRON_FILE	/etc/environment
+
+#
+# If defined, this command is run when removing a user.
+# It should remove any at/cron/print jobs etc. owned by
+# the user to be removed (passed as the first argument).
+#
+#USERDEL_CMD	/usr/sbin/userdel_local
+
+#
+# Enable setting of the umask group bits to be the same as owner bits
+# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
+# the same as gid, and username is the same as the primary group name.
+#
+# This also enables userdel to remove user groups if no members exist.
+#
+USERGROUPS_ENAB yes
+
+#
+# If set to a non-nul number, the shadow utilities will make sure that
+# groups never have more than this number of users on one line.
+# This permit to support split groups (groups split into multiple lines,
+# with the same group ID, to avoid limitation of the line length in the
+# group file).
+#
+# 0 is the default value and disables this feature.
+#
+#MAX_MEMBERS_PER_GROUP	0
+
+#
+# If useradd should create home directories for users by default (non
+# system users only)
+# This option is overridden with the -M or -m flags on the useradd command
+# line.
+#
+CREATE_HOME     yes
+
diff --git a/meta/recipes-extended/shadow/files/login_defs_pam.sed b/meta/recipes-extended/shadow/files/login_defs_pam.sed
new file mode 100644
index 0000000..0a1f3be
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/login_defs_pam.sed
@@ -0,0 +1,32 @@
+/^FAILLOG_ENAB/b comment
+/^LASTLOG_ENAB/b comment
+/^MAIL_CHECK_ENAB/b comment
+/^OBSCURE_CHECKS_ENAB/b comment
+/^PORTTIME_CHECKS_ENAB/b comment
+/^QUOTAS_ENAB/b comment
+/^MOTD_FILE/b comment
+/^FTMP_FILE/b comment
+/^NOLOGINS_FILE/b comment
+/^ENV_HZ/b comment
+/^ENV_TZ/b comment
+/^PASS_MIN_LEN/b comment
+/^SU_WHEEL_ONLY/b comment
+/^CRACKLIB_DICTPATH/b comment
+/^PASS_CHANGE_TRIES/b comment
+/^PASS_ALWAYS_WARN/b comment
+/^PASS_MAX_LEN/b comment
+/^PASS_MIN_LEN/b comment
+/^CHFN_AUTH/b comment
+/^CHSH_AUTH/b comment
+/^ISSUE_FILE/b comment
+/^LOGIN_STRING/b comment
+/^ULIMIT/b comment
+/^ENVIRON_FILE/b comment
+
+b exit
+
+: comment
+  s:^:#:
+
+: exit
+
diff --git a/meta/recipes-extended/shadow/files/pam.d/chfn b/meta/recipes-extended/shadow/files/pam.d/chfn
new file mode 100644
index 0000000..baf7698
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chfn
@@ -0,0 +1,14 @@
+#
+# The PAM configuration file for the Shadow `chfn' service
+#
+
+# This allows root to change user infomation without being
+# prompted for a password
+auth		sufficient	pam_rootok.so
+
+# The standard Unix authentication modules, used with
+# NIS (man nsswitch) as well as normal /etc/passwd and
+# /etc/shadow entries.
+auth       include      common-auth
+account    include      common-account
+session    include      common-session
diff --git a/meta/recipes-extended/shadow/files/pam.d/chpasswd b/meta/recipes-extended/shadow/files/pam.d/chpasswd
new file mode 100644
index 0000000..9e3efa6
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chpasswd
@@ -0,0 +1,4 @@
+# The PAM configuration file for the Shadow 'chpasswd' service
+#
+
+password   include      common-password
diff --git a/meta/recipes-extended/shadow/files/pam.d/chsh b/meta/recipes-extended/shadow/files/pam.d/chsh
new file mode 100644
index 0000000..8fb169f
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/chsh
@@ -0,0 +1,19 @@
+#
+# The PAM configuration file for the Shadow `chsh' service
+#
+
+# This will not allow a user to change their shell unless
+# their current one is listed in /etc/shells. This keeps
+# accounts with special shells from changing them.
+auth       required   pam_shells.so
+
+# This allows root to change user shell without being
+# prompted for a password
+auth		sufficient	pam_rootok.so
+
+# The standard Unix authentication modules, used with
+# NIS (man nsswitch) as well as normal /etc/passwd and
+# /etc/shadow entries.
+auth       include      common-auth
+account    include      common-account
+session    include      common-session
diff --git a/meta/recipes-extended/shadow/files/pam.d/login b/meta/recipes-extended/shadow/files/pam.d/login
new file mode 100644
index 0000000..b340058
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/login
@@ -0,0 +1,81 @@
+#
+# The PAM configuration file for the Shadow `login' service
+#
+
+# Enforce a minimal delay in case of failure (in microseconds).
+# (Replaces the `FAIL_DELAY' setting from login.defs)
+# Note that other modules may require another minimal delay. (for example,
+# to disable any delay, you should add the nodelay option to pam_unix)
+auth       optional   pam_faildelay.so  delay=3000000
+
+# Outputs an issue file prior to each login prompt (Replaces the
+# ISSUE_FILE option from login.defs). Uncomment for use
+# auth       required   pam_issue.so issue=/etc/issue
+
+# Disallows root logins except on tty's listed in /etc/securetty
+# (Replaces the `CONSOLE' setting from login.defs)
+# Note that it is included as a "requisite" module. No password prompts will
+# be displayed if this module fails to avoid having the root password
+# transmitted on unsecure ttys.
+# You can change it to a "required" module if you think it permits to
+# guess valid user names of your system (invalid user names are considered
+# as possibly being root).
+auth       [success=ok ignore=ignore user_unknown=ignore default=die]  pam_securetty.so
+
+# Disallows other than root logins when /etc/nologin exists
+# (Replaces the `NOLOGINS_FILE' option from login.defs)
+auth       requisite  pam_nologin.so
+
+# This module parses environment configuration file(s)
+# and also allows you to use an extended config
+# file /etc/security/pam_env.conf.
+# 
+# parsing /etc/environment needs "readenv=1"
+session       required   pam_env.so readenv=1
+
+# Standard Un*x authentication.
+auth       include      common-auth
+
+# This allows certain extra groups to be granted to a user
+# based on things like time of day, tty, service, and user.
+# Please edit /etc/security/group.conf to fit your needs
+# (Replaces the `CONSOLE_GROUPS' option in login.defs)
+auth       optional   pam_group.so
+
+# Uncomment and edit /etc/security/time.conf if you need to set
+# time restrainst on logins.
+# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
+# as well as /etc/porttime)
+# account    requisite  pam_time.so
+
+# Uncomment and edit /etc/security/access.conf if you need to
+# set access limits.
+# (Replaces /etc/login.access file)
+# account  required       pam_access.so
+
+# Sets up user limits according to /etc/security/limits.conf
+# (Replaces the use of /etc/limits in old login)
+session    required   pam_limits.so
+
+# Prints the last login info upon succesful login
+# (Replaces the `LASTLOG_ENAB' option from login.defs)
+session    optional   pam_lastlog.so
+
+# Prints the motd upon succesful login
+# (Replaces the `MOTD_FILE' option in login.defs)
+session    optional   pam_motd.so
+
+# Prints the status of the user's mailbox upon succesful login
+# (Replaces the `MAIL_CHECK_ENAB' option from login.defs). 
+#
+# This also defines the MAIL environment variable
+# However, userdel also needs MAIL_DIR and MAIL_FILE variables
+# in /etc/login.defs to make sure that removing a user 
+# also removes the user's mail spool file.
+# See comments in /etc/login.defs
+session    optional   pam_mail.so standard
+
+# Standard Un*x account and session
+account    include      common-account
+password   include      common-password
+session    include      common-session
diff --git a/meta/recipes-extended/shadow/files/pam.d/newusers b/meta/recipes-extended/shadow/files/pam.d/newusers
new file mode 100644
index 0000000..4aa3dde
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/newusers
@@ -0,0 +1,4 @@
+# The PAM configuration file for the Shadow 'newusers' service
+#
+
+password   include      common-password
diff --git a/meta/recipes-extended/shadow/files/pam.d/passwd b/meta/recipes-extended/shadow/files/pam.d/passwd
new file mode 100644
index 0000000..f534992
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/passwd
@@ -0,0 +1,5 @@
+#
+# The PAM configuration file for the Shadow `passwd' service
+#
+
+password   include      common-password
diff --git a/meta/recipes-extended/shadow/files/pam.d/su b/meta/recipes-extended/shadow/files/pam.d/su
new file mode 100644
index 0000000..8d590a3
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/pam.d/su
@@ -0,0 +1,57 @@
+#
+# The PAM configuration file for the Shadow `su' service
+#
+
+# This allows root to su without passwords (normal operation)
+auth       sufficient pam_rootok.so
+
+# Uncomment this to force users to be a member of group root
+# before they can use `su'. You can also add "group=foo"
+# to the end of this line if you want to use a group other
+# than the default "root" (but this may have side effect of
+# denying "root" user, unless she's a member of "foo" or explicitly
+# permitted earlier by e.g. "sufficient pam_rootok.so").
+# (Replaces the `SU_WHEEL_ONLY' option from login.defs)
+# auth       required   pam_wheel.so
+
+# Uncomment this if you want wheel members to be able to
+# su without a password.
+# auth       sufficient pam_wheel.so trust
+
+# Uncomment this if you want members of a specific group to not
+# be allowed to use su at all.
+# auth       required   pam_wheel.so deny group=nosu
+
+# Uncomment and edit /etc/security/time.conf if you need to set
+# time restrainst on su usage.
+# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
+# as well as /etc/porttime)
+# account    requisite  pam_time.so
+
+# This module parses environment configuration file(s)
+# and also allows you to use an extended config
+# file /etc/security/pam_env.conf.
+# 
+# parsing /etc/environment needs "readenv=1"
+session       required   pam_env.so readenv=1
+
+# Defines the MAIL environment variable
+# However, userdel also needs MAIL_DIR and MAIL_FILE variables
+# in /etc/login.defs to make sure that removing a user 
+# also removes the user's mail spool file.
+# See comments in /etc/login.defs
+#
+# "nopen" stands to avoid reporting new mail when su'ing to another user
+session    optional   pam_mail.so nopen
+
+# Sets up user limits, please uncomment and read /etc/security/limits.conf
+# to enable this functionality.
+# (Replaces the use of /etc/limits in old login)
+# session    required   pam_limits.so
+
+# The standard Unix authentication modules, used with
+# NIS (man nsswitch) as well as normal /etc/passwd and
+# /etc/shadow entries.
+auth       include      common-auth
+account    include      common-account
+session    include      common-session
diff --git a/meta/recipes-extended/shadow/files/securetty b/meta/recipes-extended/shadow/files/securetty
new file mode 100644
index 0000000..2be341a
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/securetty
@@ -0,0 +1,238 @@
+# /etc/securetty: list of terminals on which root is allowed to login.
+# See securetty(5) and login(1).
+console
+
+# Standard serial ports
+ttyS0
+ttyS1
+ttyS2
+ttyS3
+
+# ARM AMBA SoCs
+ttyAM0
+ttyAM1
+ttyAM2
+ttyAM3
+ttyAMA0
+ttyAMA1
+ttyAMA2
+ttyAMA3
+
+# QCOM Socs
+ttyHSL0
+ttyHSL1
+ttyHSL2
+ttyHSL3
+ttyMSM0
+ttyMSM1
+ttyMSM2
+
+# Samsung ARM SoCs
+ttySAC0
+ttySAC1
+ttySAC2
+ttySAC3
+
+# STM SoCs
+ttyAS0
+ttyAS1
+ttyAS2
+ttyAS3
+
+# TI OMAP SoCs
+ttyO0
+ttyO1
+ttyO2
+ttyO3
+
+# Xilinx Zynq SoC
+ttyPS0
+ttyPS1
+
+# USB dongles
+ttyUSB0
+ttyUSB1
+ttyUSB2
+
+# USB serial gadget
+ttyGS0
+
+# PowerMac
+ttyPZ0
+ttyPZ1
+ttyPZ2
+ttyPZ3
+
+# Embedded MPC platforms
+ttyPSC0
+ttyPSC1
+ttyPSC2
+ttyPSC3
+ttyPSC4
+ttyPSC5
+
+# PA-RISC mux ports
+ttyB0
+ttyB1
+
+# Standard hypervisor virtual console
+hvc0
+
+# Oldstyle Xen console
+xvc0
+
+# Standard consoles
+tty1
+tty2
+tty3
+tty4
+tty5
+tty6
+tty7
+tty8
+tty9
+tty10
+tty11
+tty12
+tty13
+tty14
+tty15
+tty16
+tty17
+tty18
+tty19
+tty20
+tty21
+tty22
+tty23
+tty24
+tty25
+tty26
+tty27
+tty28
+tty29
+tty30
+tty31
+tty32
+tty33
+tty34
+tty35
+tty36
+tty37
+tty38
+tty39
+tty40
+tty41
+tty42
+tty43
+tty44
+tty45
+tty46
+tty47
+tty48
+tty49
+tty50
+tty51
+tty52
+tty53
+tty54
+tty55
+tty56
+tty57
+tty58
+tty59
+tty60
+tty61
+tty62
+tty63
+
+# Local X displays (allows empty passwords with pam_unix's nullok_secure)
+pts/0
+pts/1
+pts/2
+pts/3
+
+# Embedded Freescale i.MX ports
+ttymxc0
+ttymxc1
+ttymxc2
+ttymxc3
+ttymxc4
+ttymxc5
+
+# Freescale lpuart ports
+ttyLP0
+ttyLP1
+ttyLP2
+ttyLP3
+ttyLP4
+ttyLP5
+
+# Standard serial ports, with devfs
+tts/0
+tts/1
+
+# Standard consoles, with devfs
+vc/1
+vc/2
+vc/3
+vc/4
+vc/5
+vc/6
+vc/7
+vc/8
+vc/9
+vc/10
+vc/11
+vc/12
+vc/13
+vc/14
+vc/15
+vc/16
+vc/17
+vc/18
+vc/19
+vc/20
+vc/21
+vc/22
+vc/23
+vc/24
+vc/25
+vc/26
+vc/27
+vc/28
+vc/29
+vc/30
+vc/31
+vc/32
+vc/33
+vc/34
+vc/35
+vc/36
+vc/37
+vc/38
+vc/39
+vc/40
+vc/41
+vc/42
+vc/43
+vc/44
+vc/45
+vc/46
+vc/47
+vc/48
+vc/49
+vc/50
+vc/51
+vc/52
+vc/53
+vc/54
+vc/55
+vc/56
+vc/57
+vc/58
+vc/59
+vc/60
+vc/61
+vc/62
+vc/63
diff --git a/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch
new file mode 100644
index 0000000..a7bb0a9
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-4.1.3-dots-in-usernames.patch
@@ -0,0 +1,27 @@
+# commit message copied from openembedded:
+#    commit 246c80637b135f3a113d319b163422f98174ee6c
+#    Author: Khem Raj <raj.khem@gmail.com>
+#    Date:   Wed Jun 9 13:37:03 2010 -0700
+#
+#    shadow-4.1.4.2: Add patches to support dots in login id.
+#    
+#    Signed-off-by: Khem Raj <raj.khem@gmail.com>
+#
+# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-08-11
+
+Upstream-Status: Pending
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Index: shadow-4.1.4.2/libmisc/chkname.c
+===================================================================
+--- shadow-4.1.4.2.orig/libmisc/chkname.c	2009-04-28 12:14:04.000000000 -0700
++++ shadow-4.1.4.2/libmisc/chkname.c	2010-06-03 17:43:20.638973857 -0700
+@@ -61,6 +61,7 @@ static bool is_valid_name (const char *n
+ 		      ( ('0' <= *name) && ('9' >= *name) ) ||
+ 		      ('_' == *name) ||
+ 		      ('-' == *name) ||
++		      ('.' == *name) ||
+ 		      ( ('$' == *name) && ('\0' == *(name + 1)) )
+ 		     )) {
+ 			return false;
diff --git a/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
new file mode 100644
index 0000000..15f8044
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
@@ -0,0 +1,91 @@
+The system-auth in the configure files is from Fedora which put all the 4 pam type rules
+in one file.
+In yocto it obey the way with Debian/Ubuntu, and the names are common-auth, common-account,
+common-password and common-session.
+So update them with oe way.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chage shadow-4.1.4.3/etc/pam.d/chage
+--- shadow-4.1.4.3/etc/pam.d.orig/chage	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/chage	2011-07-20 19:03:08.964844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/chgpasswd shadow-4.1.4.3/etc/pam.d/chgpasswd
+--- shadow-4.1.4.3/etc/pam.d.orig/chgpasswd	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/chgpasswd	2011-07-20 19:03:26.544844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupadd shadow-4.1.4.3/etc/pam.d/groupadd
+--- shadow-4.1.4.3/etc/pam.d.orig/groupadd	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/groupadd	2011-07-20 19:04:08.124844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupdel shadow-4.1.4.3/etc/pam.d/groupdel
+--- shadow-4.1.4.3/etc/pam.d.orig/groupdel	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/groupdel	2011-07-20 19:04:26.114844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmems shadow-4.1.4.3/etc/pam.d/groupmems
+--- shadow-4.1.4.3/etc/pam.d.orig/groupmems	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/groupmems	2011-07-20 19:04:35.074844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/groupmod shadow-4.1.4.3/etc/pam.d/groupmod
+--- shadow-4.1.4.3/etc/pam.d.orig/groupmod	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/groupmod	2011-07-20 19:04:44.864844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/useradd shadow-4.1.4.3/etc/pam.d/useradd
+--- shadow-4.1.4.3/etc/pam.d.orig/useradd	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/useradd	2011-07-20 19:07:26.244844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/userdel shadow-4.1.4.3/etc/pam.d/userdel
+--- shadow-4.1.4.3/etc/pam.d.orig/userdel	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/userdel	2011-07-20 19:07:35.734844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
+diff -Nur shadow-4.1.4.3/etc/pam.d.orig/usermod shadow-4.1.4.3/etc/pam.d/usermod
+--- shadow-4.1.4.3/etc/pam.d.orig/usermod	2011-07-20 19:02:27.384844958 +0800
++++ shadow-4.1.4.3/etc/pam.d/usermod	2011-07-20 19:07:42.024844958 +0800
+@@ -1,4 +1,4 @@
+ #%PAM-1.0
+ auth		sufficient	pam_rootok.so
+ account		required	pam_permit.so
+-password	include		system-auth
++password	include		common-password
diff --git a/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
new file mode 100644
index 0000000..37dc153
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/usermod-fix-compilation-failure-with-subids-disabled.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+usermod: fix compilation failure with subids disabled
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/usermod.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/usermod.c b/src/usermod.c
+index e7d4351..685b50a 100644
+--- a/src/usermod.c
++++ b/src/usermod.c
+@@ -1360,7 +1360,7 @@ static void process_flags (int argc, char **argv)
+ 		         Prog, (unsigned long) user_newid);
+ 		exit (E_UID_IN_USE);
+ 	}
+-
++#ifdef ENABLE_SUBIDS
+ 	if (   (vflg || Vflg)
+ 	    && !is_sub_uid) {
+ 		fprintf (stderr,
+@@ -1376,6 +1376,7 @@ static void process_flags (int argc, char **argv)
+ 		         Prog, sub_gid_dbname (), "-w", "-W");
+ 		exit (E_USAGE);
+ 	}
++#endif
+ }
+ 
+ /*
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
new file mode 100644
index 0000000..c78f888
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-securetty_4.2.1.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Provider of the machine specific securetty file"
+SECTION = "base utils"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+PR = "r3"
+
+SRC_URI = "file://securetty"
+
+S = "${WORKDIR}"
+
+# Since SERIAL_CONSOLES is likely to be set from the machine configuration
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_install () {
+	# Ensure we add a suitable securetty file to the package that has
+	# most common embedded TTYs defined.
+	install -d ${D}${sysconfdir}
+	install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
+	if [ ! -z "${SERIAL_CONSOLES}" ]; then
+		# Our SERIAL_CONSOLES contains a baud rate and sometimes extra
+		# options as well. The following pearl :) takes that and converts
+		# it into newline-separated tty's and appends them into
+		# securetty. So if a machine has a weird looking console device
+		# node (e.g. ttyAMA0) that securetty does not know, it will get
+		# appended to securetty and root logins will be allowed on that
+		# console.
+		tmp="${SERIAL_CONSOLES}"
+		for entry in $tmp ; do
+			ttydev=`echo "$entry" | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'`
+			if ! grep -q $ttydev ${D}${sysconfdir}/securetty; then
+				echo $ttydev >> ${D}${sysconfdir}/securetty
+			fi
+		done
+	fi
+}
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
new file mode 100644
index 0000000..697569c
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Shadow utils requirements for useradd.bbclass"
+HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
+BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
+SECTION = "base utils"
+LICENSE = "BSD | Artistic-1.0"
+LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5"
+
+DEPENDS = "base-passwd"
+
+PR = "r3"
+
+# The sole purpose of this recipe is to provide the /etc/login.defs
+# file for the target sysroot - needed so the shadow-native utilities
+# can add custom users/groups for recipes that use inherit useradd.
+SRC_URI = "file://login.defs_shadow-sysroot"
+
+SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
+SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -d ${D}${sysconfdir}
+	install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
+}
+
+sysroot_stage_all() {
+	sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
+}
+
+# don't create any packages
+# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot 
+# and this has another copy of /etc/login.defs already provided by shadow
+PACKAGES = ""
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
new file mode 100644
index 0000000..4313ffe
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -0,0 +1,196 @@
+SUMMARY = "Tools to change and administer password and group data"
+HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
+BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
+SECTION = "base/utils"
+LICENSE = "BSD | Artistic-1.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \
+                    file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
+
+DEPENDS = "shadow-native"
+DEPENDS_class-native = ""
+DEPENDS_class-nativesdk = ""
+
+SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
+           file://shadow-4.1.3-dots-in-usernames.patch \
+           file://usermod-fix-compilation-failure-with-subids-disabled.patch \
+           file://fix-installation-failure-with-subids-disabled.patch \
+           file://0001-Do-not-read-login.defs-before-doing-chroot.patch \
+           file://check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch \
+           ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
+           "
+
+SRC_URI_append_class-target = " \
+           file://login_defs_pam.sed \
+           file://shadow-update-pam-conf.patch \
+           "
+
+SRC_URI_append_class-native = " \
+           file://disable-syslog.patch \
+           file://allow-for-setting-password-in-clear-text.patch \
+           file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
+           file://0001-useradd.c-create-parent-directories-when-necessary.patch \
+           "
+SRC_URI_append_class-nativesdk = " \
+           file://disable-syslog.patch \
+           "
+
+SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8"
+SRC_URI[sha256sum] = "3b0893d1476766868cd88920f4f1231c4795652aa407569faff802bcda0f3d41"
+
+# Additional Policy files for PAM
+PAM_SRC_URI = "file://pam.d/chfn \
+               file://pam.d/chpasswd \
+               file://pam.d/chsh \
+               file://pam.d/login \
+               file://pam.d/newusers \
+               file://pam.d/passwd \
+               file://pam.d/su"
+
+inherit autotools gettext
+
+EXTRA_OECONF += "--without-audit \
+                 --without-libcrack \
+                 --without-selinux \
+                 --with-group-name-max-length=24 \
+                 --enable-subordinate-ids=yes \
+                 ${NSCDOPT}"
+
+NSCDOPT = ""
+NSCDOPT_class-native = "--without-nscd"
+NSCDOPT_class-nativesdk = "--without-nscd"
+NSCDOPT_libc-uclibc = " --without-nscd"
+NSCDOPT_libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', '--with-nscd', '--without-nscd', d)}"
+          
+PAM_PLUGINS = "libpam-runtime \
+               pam-plugin-faildelay \
+               pam-plugin-securetty \
+               pam-plugin-nologin \
+               pam-plugin-env \
+               pam-plugin-group \
+               pam-plugin-limits \
+               pam-plugin-lastlog \
+               pam-plugin-motd \
+               pam-plugin-mail \
+               pam-plugin-shells \
+               pam-plugin-rootok"
+
+PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}"
+PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
+PACKAGECONFIG[acl] = "--with-acl,--without-acl,acl"
+
+RDEPENDS_${PN} = "shadow-securetty \
+                  base-passwd \
+                  util-linux-sulogin"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
+
+do_install() {
+	oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install
+
+	# Info dir listing isn't interesting at this point so remove it if it exists.
+	if [ -e "${D}${infodir}/dir" ]; then
+		rm -f ${D}${infodir}/dir
+	fi
+
+	# Enable CREATE_HOME by default.
+	sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs
+
+	# As we are on an embedded system, ensure the users mailbox is in
+	# ~/ not /var/spool/mail by default, as who knows where or how big
+	# /var is. The system MDA will set this later anyway.
+	sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs
+	sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs
+
+	# Disable checking emails.
+	sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
+
+	# Comment out SU_NAME to work correctly with busybox
+	# See Bug#5359 and Bug#7173
+	sed -i 's:^SU_NAME:#SU_NAME:g' ${D}${sysconfdir}/login.defs
+
+	# Use proper encryption for passwords
+	sed -i 's/^#ENCRYPT_METHOD.*$/ENCRYPT_METHOD SHA512/' ${D}${sysconfdir}/login.defs
+
+	# Now we don't have a mail system. Disable mail creation for now.
+	sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
+	sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
+
+	# Use users group by default
+	sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd
+}
+
+do_install_append() {
+	# Ensure that the image has as a /var/spool/mail dir so shadow can
+	# put mailboxes there if the user reconfigures shadow to its
+	# defaults (see sed below).
+	install -d ${D}${localstatedir}/spool/mail
+
+	if [ -e ${WORKDIR}/pam.d ]; then
+		install -d ${D}${sysconfdir}/pam.d/
+		install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
+		# Remove defaults that are not used when supporting PAM.
+		sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs
+	fi
+
+	install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} 
+
+	# Move binaries to the locations we want
+	rm ${D}${sbindir}/vigr
+	ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr
+	if [ "${sbindir}" != "${base_sbindir}" ]; then
+		mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw
+	fi
+	if [ "${bindir}" != "${base_bindir}" ]; then
+		mv ${D}${bindir}/login ${D}${base_bindir}/login
+		mv ${D}${bindir}/su ${D}${base_bindir}/su
+	fi
+
+	# Handle link properly after rename, otherwise missing files would
+	# lead rpm failed dependencies.
+	ln -sf newgrp.${BPN} ${D}${bindir}/sg
+}
+
+PACKAGES =+ "${PN}-base"
+FILES_${PN}-base = "\
+    ${base_bindir}/login.shadow \
+    ${base_bindir}/su.shadow \
+    ${bindir}/sg \
+    ${bindir}/newgrp.shadow \
+    ${bindir}/groups.shadow \
+    ${sysconfdir}/pam.d/login \
+    ${sysconfdir}/pam.d/su \
+    ${sysconfdir}/login.defs \
+"
+RDEPENDS_${PN} += "${PN}-base"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "200"
+
+ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr"
+ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
+ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
+ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
+
+ALTERNATIVE_${PN}-base = "newgrp groups login su"
+ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
+ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
+
+ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
+ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
+
+pkg_postinst_${PN} () {
+	if [ "x$D" != "x" ]; then
+	  rootarg="--root $D"
+	else
+	  rootarg=""
+	fi
+
+	pwconv $rootarg || exit 1
+	grpconv $rootarg || exit 1
+}
diff --git a/meta/recipes-extended/shadow/shadow_4.2.1.bb b/meta/recipes-extended/shadow/shadow_4.2.1.bb
new file mode 100644
index 0000000..5675cb8
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow_4.2.1.bb
@@ -0,0 +1,10 @@
+require shadow.inc
+
+# Build falsely assumes that if --enable-libpam is set, we don't need to link against
+# libcrypt. This breaks chsh.
+BUILD_LDFLAGS_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', bb.utils.contains('DISTRO_FEATURES', 'libc-crypt',  '-lcrypt', '', d), '', d)}"
+
+BBCLASSEXTEND = "native nativesdk"
+
+
+
diff --git a/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch b/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch
new file mode 100644
index 0000000..57ebfe4
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch
@@ -0,0 +1,39 @@
+From 96eb7e29822151823a66a1eb59f1fa4aead5ae08 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Aug 2015 06:33:21 +0000
+Subject: [PATCH] Fix  error: conflicting types for 'posix_close'
+
+Exposed while compiling on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/slposio.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/slposio.c b/src/slposio.c
+index 9ce9697..9ff9bfe 100644
+--- a/src/slposio.c
++++ b/src/slposio.c
+@@ -363,7 +363,7 @@ static int posix_close_fd (int *fd)
+    return 0;
+ }
+ 
+-static int posix_close (SLFile_FD_Type *f)
++static int posix_closex (SLFile_FD_Type *f)
+ {
+    int status = do_close (f);
+ 
+@@ -1001,7 +1001,7 @@ static SLang_Intrin_Fun_Type Fd_Name_Table [] =
+    MAKE_INTRINSIC_2("write", posix_write, V, F, B),
+    MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F),
+    MAKE_INTRINSIC_2("dup2_fd", posix_dup2, I, F, I),
+-   MAKE_INTRINSIC_1("close", posix_close, I, F),
++   MAKE_INTRINSIC_1("close", posix_closex, I, F),
+    MAKE_INTRINSIC_1("_close", posix_close_fd, I, I),
+ #if defined(TTYNAME_R)
+    MAKE_INTRINSIC_0("ttyname", posix_ttyname, V),
+-- 
+2.5.1
+
diff --git a/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch b/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch
new file mode 100644
index 0000000..2ea1ffd
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch
@@ -0,0 +1,218 @@
+slang: change char type to signed char in macros
+
+C language has 3 distinct char types:
+         char
+         unsigned char
+         signed char
+A char has the same range of values as signed char on X86,
+but same as unsigned char on ARM which made Slang's typecast()
+and array_sort() unable to work for char value on ARM, since
+Slang is assuming "char" as "signed char".
+
+Now we change "char" as "signed char" explicitly in
+util/mkslarith2.sl, and use it to regenerate src/slarith2.inc
+
+Upstream-Status: Submitted
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ src/slarith2.inc       |   72 ++++++++++++++++++++++++-------------------------
+ src/util/mkslarith2.sl |    2 -
+ 2 files changed, 37 insertions(+), 37 deletions(-)
+
+--- a/src/util/mkslarith2.sl
++++ b/src/util/mkslarith2.sl
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env slsh
+ 
+ private variable CTypes =
+-  ["char", "unsigned char", "short", "unsigned short", "int", "unsigned int",
++  ["signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int",
+    "long", "unsigned long", "long long", "unsigned long long",
+    "float", "double", "long double"];
+ private variable Is_Int_Type =
+--- a/src/slarith2.inc
++++ b/src/slarith2.inc
+@@ -1,43 +1,43 @@
+ /* DO NOT EDIT -- this file was generated by src/util/mkslarith2.sl */
+-/* ------------ char ---------- */
+-DEFUN_1(copy_char_to_char,char,char)
++/* ------------ signed char ---------- */
++DEFUN_1(copy_char_to_char,signed char,signed char)
+ #define char_to_char	NULL
+ #define copy_char_to_uchar	copy_char_to_char
+ #define char_to_uchar	NULL
+-DEFUN_1(copy_char_to_short,char,short)
++DEFUN_1(copy_char_to_short,signed char,short)
+ #define char_to_short	NULL
+-DEFUN_1(copy_char_to_ushort,char,unsigned short)
++DEFUN_1(copy_char_to_ushort,signed char,unsigned short)
+ #define char_to_ushort	NULL
+-DEFUN_1(copy_char_to_int,char,int)
+-DEFUN_2(char_to_int,char,int,copy_char_to_int)
+-DEFUN_1(copy_char_to_uint,char,unsigned int)
+-DEFUN_2(char_to_uint,char,unsigned int,copy_char_to_uint)
+-DEFUN_1(copy_char_to_long,char,long)
+-DEFUN_2(char_to_long,char,long,copy_char_to_long)
+-DEFUN_1(copy_char_to_ulong,char,unsigned long)
+-DEFUN_2(char_to_ulong,char,unsigned long,copy_char_to_ulong)
++DEFUN_1(copy_char_to_int,signed char,int)
++DEFUN_2(char_to_int,signed char,int,copy_char_to_int)
++DEFUN_1(copy_char_to_uint,signed char,unsigned int)
++DEFUN_2(char_to_uint,signed char,unsigned int,copy_char_to_uint)
++DEFUN_1(copy_char_to_long,signed char,long)
++DEFUN_2(char_to_long,signed char,long,copy_char_to_long)
++DEFUN_1(copy_char_to_ulong,signed char,unsigned long)
++DEFUN_2(char_to_ulong,signed char,unsigned long,copy_char_to_ulong)
+ #if defined(HAVE_LONG_LONG)
+-DEFUN_1(copy_char_to_llong,char,long long)
+-DEFUN_2(char_to_llong,char,long long,copy_char_to_llong)
++DEFUN_1(copy_char_to_llong,signed char,long long)
++DEFUN_2(char_to_llong,signed char,long long,copy_char_to_llong)
+ #endif /* defined(HAVE_LONG_LONG) */
+ #if defined(HAVE_LONG_LONG)
+-DEFUN_1(copy_char_to_ullong,char,unsigned long long)
+-DEFUN_2(char_to_ullong,char,unsigned long long,copy_char_to_ullong)
++DEFUN_1(copy_char_to_ullong,signed char,unsigned long long)
++DEFUN_2(char_to_ullong,signed char,unsigned long long,copy_char_to_ullong)
+ #endif /* defined(HAVE_LONG_LONG) */
+ #if SLANG_HAS_FLOAT
+-DEFUN_1(copy_char_to_float,char,float)
+-DEFUN_2(char_to_float,char,float,copy_char_to_float)
++DEFUN_1(copy_char_to_float,signed char,float)
++DEFUN_2(char_to_float,signed char,float,copy_char_to_float)
+ #endif /* SLANG_HAS_FLOAT */
+ #if SLANG_HAS_FLOAT
+-DEFUN_1(copy_char_to_double,char,double)
+-DEFUN_2(char_to_double,char,double,copy_char_to_double)
++DEFUN_1(copy_char_to_double,signed char,double)
++DEFUN_2(char_to_double,signed char,double,copy_char_to_double)
+ #endif /* SLANG_HAS_FLOAT */
+ #if defined(HAVE_LONG_DOUBLE)
+-DEFUN_1(copy_char_to_ldouble,char,long double)
+-DEFUN_2(char_to_ldouble,char,long double,copy_char_to_ldouble)
++DEFUN_1(copy_char_to_ldouble,signed char,long double)
++DEFUN_2(char_to_ldouble,signed char,long double,copy_char_to_ldouble)
+ #endif /* defined(HAVE_LONG_DOUBLE) */
+ #if SLANG_HAS_FLOAT
+-TO_DOUBLE_FUN(char_to_one_double,char)
++TO_DOUBLE_FUN(char_to_one_double,signed char)
+ #endif
+ 
+ /* ------------ unsigned char ---------- */
+@@ -82,7 +82,7 @@ TO_DOUBLE_FUN(uchar_to_one_double,unsign
+ #endif
+ 
+ /* ------------ short ---------- */
+-DEFUN_1(copy_short_to_char,short,char)
++DEFUN_1(copy_short_to_char,short,signed char)
+ #define short_to_char	NULL
+ DEFUN_1(copy_short_to_uchar,short,unsigned char)
+ #define short_to_uchar	NULL
+@@ -123,7 +123,7 @@ TO_DOUBLE_FUN(short_to_one_double,short)
+ #endif
+ 
+ /* ------------ unsigned short ---------- */
+-DEFUN_1(copy_ushort_to_char,unsigned short,char)
++DEFUN_1(copy_ushort_to_char,unsigned short,signed char)
+ #define ushort_to_char	NULL
+ DEFUN_1(copy_ushort_to_uchar,unsigned short,unsigned char)
+ #define ushort_to_uchar	NULL
+@@ -164,7 +164,7 @@ TO_DOUBLE_FUN(ushort_to_one_double,unsig
+ #endif
+ 
+ /* ------------ int ---------- */
+-DEFUN_1(copy_int_to_char,int,char)
++DEFUN_1(copy_int_to_char,int,signed char)
+ #define int_to_char	NULL
+ DEFUN_1(copy_int_to_uchar,int,unsigned char)
+ #define int_to_uchar	NULL
+@@ -205,7 +205,7 @@ TO_DOUBLE_FUN(int_to_one_double,int)
+ #endif
+ 
+ /* ------------ unsigned int ---------- */
+-DEFUN_1(copy_uint_to_char,unsigned int,char)
++DEFUN_1(copy_uint_to_char,unsigned int,signed char)
+ #define uint_to_char	NULL
+ DEFUN_1(copy_uint_to_uchar,unsigned int,unsigned char)
+ #define uint_to_uchar	NULL
+@@ -246,7 +246,7 @@ TO_DOUBLE_FUN(uint_to_one_double,unsigne
+ #endif
+ 
+ /* ------------ long ---------- */
+-DEFUN_1(copy_long_to_char,long,char)
++DEFUN_1(copy_long_to_char,long,signed char)
+ #define long_to_char	NULL
+ DEFUN_1(copy_long_to_uchar,long,unsigned char)
+ #define long_to_uchar	NULL
+@@ -287,7 +287,7 @@ TO_DOUBLE_FUN(long_to_one_double,long)
+ #endif
+ 
+ /* ------------ unsigned long ---------- */
+-DEFUN_1(copy_ulong_to_char,unsigned long,char)
++DEFUN_1(copy_ulong_to_char,unsigned long,signed char)
+ #define ulong_to_char	NULL
+ DEFUN_1(copy_ulong_to_uchar,unsigned long,unsigned char)
+ #define ulong_to_uchar	NULL
+@@ -329,7 +329,7 @@ TO_DOUBLE_FUN(ulong_to_one_double,unsign
+ 
+ /* ------------ long long ---------- */
+ #if defined(HAVE_LONG_LONG)
+-DEFUN_1(copy_llong_to_char,long long,char)
++DEFUN_1(copy_llong_to_char,long long,signed char)
+ #define llong_to_char	NULL
+ DEFUN_1(copy_llong_to_uchar,long long,unsigned char)
+ #define llong_to_uchar	NULL
+@@ -372,7 +372,7 @@ TO_DOUBLE_FUN(llong_to_one_double,long l
+ 
+ /* ------------ unsigned long long ---------- */
+ #if defined(HAVE_LONG_LONG)
+-DEFUN_1(copy_ullong_to_char,unsigned long long,char)
++DEFUN_1(copy_ullong_to_char,unsigned long long,signed char)
+ #define ullong_to_char	NULL
+ DEFUN_1(copy_ullong_to_uchar,unsigned long long,unsigned char)
+ #define ullong_to_uchar	NULL
+@@ -415,7 +415,7 @@ TO_DOUBLE_FUN(ullong_to_one_double,unsig
+ 
+ /* ------------ float ---------- */
+ #if SLANG_HAS_FLOAT
+-DEFUN_1(copy_float_to_char,float,char)
++DEFUN_1(copy_float_to_char,float,signed char)
+ #define float_to_char	NULL
+ DEFUN_1(copy_float_to_uchar,float,unsigned char)
+ #define float_to_uchar	NULL
+@@ -458,7 +458,7 @@ TO_DOUBLE_FUN(float_to_one_double,float)
+ 
+ /* ------------ double ---------- */
+ #if SLANG_HAS_FLOAT
+-DEFUN_1(copy_double_to_char,double,char)
++DEFUN_1(copy_double_to_char,double,signed char)
+ #define double_to_char	NULL
+ DEFUN_1(copy_double_to_uchar,double,unsigned char)
+ #define double_to_uchar	NULL
+@@ -501,7 +501,7 @@ TO_DOUBLE_FUN(double_to_one_double,doubl
+ 
+ /* ------------ long double ---------- */
+ #if defined(HAVE_LONG_DOUBLE)
+-DEFUN_1(copy_ldouble_to_char,long double,char)
++DEFUN_1(copy_ldouble_to_char,long double,signed char)
+ #define ldouble_to_char	NULL
+ DEFUN_1(copy_ldouble_to_uchar,long double,unsigned char)
+ #define ldouble_to_uchar	NULL
+@@ -545,7 +545,7 @@ TO_DOUBLE_FUN(ldouble_to_one_double,long
+ #if SLANG_HAS_FLOAT
+ static To_Double_Fun_Table_Type To_Double_Fun_Table [MAX_ARITHMETIC_TYPES] =
+ {
+-   {sizeof(char), char_to_one_double},
++   {sizeof(signed char), char_to_one_double},
+    {sizeof(unsigned char), uchar_to_one_double},
+    {sizeof(short), short_to_one_double},
+    {sizeof(unsigned short), ushort_to_one_double},
+@@ -583,7 +583,7 @@ static To_Double_Fun_Table_Type To_Doubl
+ 
+ static Binary_Matrix_Type Binary_Matrix [MAX_ARITHMETIC_TYPES][MAX_ARITHMETIC_TYPES] =
+ {
+-   /* char */
++   /* signed char */
+    {
+      {(FVOID_STAR)copy_char_to_char, char_to_char},
+      {(FVOID_STAR)copy_char_to_uchar, char_to_uchar},
diff --git a/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
new file mode 100644
index 0000000..0c1553a
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/fix-check-pcre.patch
@@ -0,0 +1,108 @@
+fix the pcre existence checking
+
+when check if there is pcre, the configure file always check
+the host dir. now we make it work by adding correct prefix for
+cross-compile environment.
+
+When enable pcre-module, we see a QA warning because rpaths
+hardcoded into the build, rpaths are not needed, so lets turn
+this off.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ configure |   60 ++++++------------------------------------------------------
+ 1 files changed, 6 insertions(+), 54 deletions(-)
+
+diff --git a/configure b/configure
+index f1586c3..d22814f 100755
+--- a/configure
++++ b/configure
+@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
+ 	 /usr/include/pcre,/usr/lib \
+ 	 /usr/pcre/include,/usr/pcre/lib \
+ 	 /usr/include,/usr/lib \
++	 /usr/include,/usr/lib64 \
+ 	 /opt/include/pcre,/opt/lib \
+ 	 /opt/pcre/include,/opt/pcre/lib \
+ 	 /opt/include,/opt/lib"
+@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
+         xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
+ 	xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
+ 	found=0
+-	if test -r $xincdir/$xincfile
++	if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
+ 	then
+ 	  for E in $exts
+ 	  do
+-	    if test -r "$xlibdir/$xlibfile.$E"
++	    if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
+ 	    then
+-	      jd_pcre_include_dir="$xincdir"
+-	      jd_pcre_library_dir="$xlibdir"
++	      jd_pcre_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
++	      jd_pcre_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
+ 	      jd_with_pcre_library="yes"
+ 	      found=1
+ 	      break
+@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
+     then
+       PCRE_LIB=""
+     else
+-
+-if test "X$jd_pcre_library_dir" != "X"
+-then
+-  if test "X$RPATH" = "X"
+-  then
+-
+-case "$host_os" in
+-  *linux*|*solaris* )
+-    if test "X$GCC" = Xyes
+-    then
+-      if test "X$ac_R_nospace" = "Xno"
+-      then
+-        RPATH="-Wl,-R,"
+-      else
+-        RPATH="-Wl,-R"
+-      fi
+-    else
+-      if test "X$ac_R_nospace" = "Xno"
+-      then
+-        RPATH="-R "
+-      else
+-	RPATH="-R"
+-      fi
+-    fi
+-  ;;
+-  *osf*|*openbsd*)
+-    if test "X$GCC" = Xyes
+-    then
+-      RPATH="-Wl,-rpath,"
+-    else
+-      RPATH="-rpath "
+-    fi
+-  ;;
+-  *netbsd*)
+-    if test "X$GCC" = Xyes
+-    then
+-      RPATH="-Wl,-R"
+-    fi
+-  ;;
+-esac
+-
+-    if test "X$RPATH" != "X"
+-    then
+-      RPATH="$RPATH$jd_pcre_library_dir"
+-    fi
+-  else
+-    RPATH="$RPATH:$jd_pcre_library_dir"
+-  fi
+-fi
+-
++      RPATH=""
+     fi
+ 
+     PCRE_INC=-I$jd_pcre_include_dir
+-- 
+1.7.4.1
+
diff --git a/meta/recipes-extended/slang/slang/rpathfix.patch b/meta/recipes-extended/slang/slang/rpathfix.patch
new file mode 100644
index 0000000..50cac92
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/rpathfix.patch
@@ -0,0 +1,70 @@
+Without this patch we see rpaths hardcoded into the build which results in QA
+warnings. These rpaths are not needed so lets turn this off.
+
+Upstream-Status: Inappropriate
+(but could be turned into a proper configure option)
+
+RP 2012/03/14
+
+Index: slang-2.2.4/configure
+===================================================================
+--- slang-2.2.4.orig/configure	2012-03-14 23:40:01.283560679 +0000
++++ slang-2.2.4/configure	2012-03-14 23:41:18.023558900 +0000
+@@ -6081,56 +6081,7 @@
+ ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS"
+ CFLAGS="$CFLAGS $IEEE_CFLAGS"
+ 
+-
+-if test "X$libdir" != "X"
+-then
+-  if test "X$RPATH" = "X"
+-  then
+-
+-case "$host_os" in
+-  *linux*|*solaris* )
+-    if test "X$GCC" = Xyes
+-    then
+-      if test "X$ac_R_nospace" = "Xno"
+-      then
+-        RPATH="-Wl,-R,"
+-      else
+-        RPATH="-Wl,-R"
+-      fi
+-    else
+-      if test "X$ac_R_nospace" = "Xno"
+-      then
+-        RPATH="-R "
+-      else
+-	RPATH="-R"
+-      fi
+-    fi
+-  ;;
+-  *osf*|*openbsd*)
+-    if test "X$GCC" = Xyes
+-    then
+-      RPATH="-Wl,-rpath,"
+-    else
+-      RPATH="-rpath "
+-    fi
+-  ;;
+-  *netbsd*)
+-    if test "X$GCC" = Xyes
+-    then
+-      RPATH="-Wl,-R"
+-    fi
+-  ;;
+-esac
+-
+-    if test "X$RPATH" != "X"
+-    then
+-      RPATH="$RPATH$libdir"
+-    fi
+-  else
+-    RPATH="$RPATH:$libdir"
+-  fi
+-fi
+-
++RPATH=""
+ 
+ # The cast to long int works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
diff --git a/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
new file mode 100644
index 0000000..958fe98
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
@@ -0,0 +1,116 @@
+From 4588f4a0287787788eb86fb16f326cbaa7454e1d Mon Sep 17 00:00:00 2001
+From: Zheng Junling <zhengjunling@huawei.com>
+Date: Mon, 16 Jun 2014 12:51:25 +0000
+Subject: [PATCH] slang: fix the iconv existence checking
+
+When checking whether there is iconv, the configure file always check 
+the host env.
+
+Now we make it working properly by adding correct prefix for cross-
+compiling environment.
+
+When enabling iconv-module, we see a QA warning because rpaths hardcoded
+into the build. And rpaths are not needed, so let's turn this off.
+
+This patch is generated by referencing the existing "fix-check-pcre"
+patch.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Zheng Junling <zhengjunling@huawei.com>
+---
+ configure | 60 ++++++------------------------------------------------------
+ 1 file changed, 6 insertions(+), 54 deletions(-)
+
+diff --git a/configure b/configure
+index 7a96256..91632f3 100755
+--- a/configure
++++ b/configure
+@@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
+ 	 /usr/include/iconv,/usr/lib \
+ 	 /usr/iconv/include,/usr/iconv/lib \
+ 	 /usr/include,/usr/lib \
++	 /usr/include,/usr/lib64 \
+ 	 /opt/include/iconv,/opt/lib \
+ 	 /opt/iconv/include,/opt/iconv/lib \
+ 	 /opt/include,/opt/lib"
+@@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
+         xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
+ 	xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
+ 	found=0
+-	if test -r $xincdir/$xincfile
++	if test -r $PKG_CONFIG_SYSROOT_DIR/$xincdir/$xincfile
+ 	then
+ 	  for E in $exts
+ 	  do
+-	    if test -r "$xlibdir/$xlibfile.$E"
++	    if test -r "$PKG_CONFIG_SYSROOT_DIR/$xlibdir/$xlibfile.$E"
+ 	    then
+-	      jd_iconv_include_dir="$xincdir"
+-	      jd_iconv_library_dir="$xlibdir"
++	      jd_iconv_include_dir="$PKG_CONFIG_SYSROOT_DIR/$xincdir"
++	      jd_iconv_library_dir="$PKG_CONFIG_SYSROOT_DIR/$xlibdir"
+ 	      jd_with_iconv_library="yes"
+ 	      found=1
+ 	      break
+@@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; }
+     then
+       ICONV_LIB=""
+     else
+-
+-if test "X$jd_iconv_library_dir" != "X"
+-then
+-  if test "X$RPATH" = "X"
+-  then
+-
+-case "$host_os" in
+-  *linux*|*solaris* )
+-    if test "X$GCC" = Xyes
+-    then
+-      if test "X$ac_R_nospace" = "Xno"
+-      then
+-        RPATH="-Wl,-R,"
+-      else
+-        RPATH="-Wl,-R"
+-      fi
+-    else
+-      if test "X$ac_R_nospace" = "Xno"
+-      then
+-        RPATH="-R "
+-      else
+-	RPATH="-R"
+-      fi
+-    fi
+-  ;;
+-  *osf*|*openbsd*)
+-    if test "X$GCC" = Xyes
+-    then
+-      RPATH="-Wl,-rpath,"
+-    else
+-      RPATH="-rpath "
+-    fi
+-  ;;
+-  *netbsd*)
+-    if test "X$GCC" = Xyes
+-    then
+-      RPATH="-Wl,-R"
+-    fi
+-  ;;
+-esac
+-
+-    if test "X$RPATH" != "X"
+-    then
+-      RPATH="$RPATH$jd_iconv_library_dir"
+-    fi
+-  else
+-    RPATH="$RPATH:$jd_iconv_library_dir"
+-  fi
+-fi
+-
++      RPATH=""
+     fi
+ 
+     ICONV_INC=-I$jd_iconv_include_dir
+-- 
+1.8.3.4
+
diff --git a/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch b/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch
new file mode 100644
index 0000000..420001b
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch
@@ -0,0 +1,42 @@
+Upstream-Status: Backport
+
+From 3a05d1a920140e9f2c72791c12f664213feb46df Mon Sep 17 00:00:00 2001
+From: Manfred Hanke <Manfred.Hanke@tngtech.com>
+Date: Thu, 20 Jun 2013 10:24:12 +0200
+Subject: [PATCH] sprintf bug (concerning %c for 8-bit character in non-UTF8
+ mode) fixed
+
+char *str points to SLuchar_Type utf8_buf[], which had too small scope
+
+src/test/strops.sl failed in the following environment:
+ - compiler:  gcc (Debian 4.7.2-5) 4.7.2
+ - CFLAGS:    -g -O2
+ - libc:      GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13
+ - kernel:    3.2.0-4-686-pae #1 SMP Debian 3.2.39-2 i686 GNU/Linux
+---
+ src/slstrops.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/slstrops.c b/src/slstrops.c
+index ce6acb0..cbbbb01 100644
+--- a/src/slstrops.c
++++ b/src/slstrops.c
+@@ -1884,6 +1884,7 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/
+ #endif
+    unsigned char uch;
+    int use_long = 0, use_alt_format = 0;
++   SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1];
+ 
+    while (1)
+      {
+@@ -2071,7 +2072,6 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/
+ #endif
+ 	       {
+ 		  SLwchar_Type wc;
+-		  SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1];
+ 
+ 		  if (-1 == SLang_pop_wchar (&wc))
+ 		    return out;
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/slang/slang_2.2.4.bb b/meta/recipes-extended/slang/slang_2.2.4.bb
new file mode 100644
index 0000000..5122f53
--- /dev/null
+++ b/meta/recipes-extended/slang/slang_2.2.4.bb
@@ -0,0 +1,54 @@
+SUMMARY = "The shared library for the S-Lang extension language"
+
+DESCRIPTION = "S-Lang is an interpreted language and a programming library.  The \
+S-Lang language was designed so that it can be easily embedded into \
+a program to provide the program with a powerful extension language. \
+The S-Lang library, provided in this package, provides the S-Lang \
+extension language.  S-Lang's syntax resembles C, which makes it easy \
+to recode S-Lang procedures in C if you need to."
+
+HOMEPAGE = "http://www.jedsoft.org/slang/"
+SECTION = "libs"
+DEPENDS = "pcre"
+PR = "r12"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
+
+
+SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
+           file://rpathfix.patch \
+           file://fix-check-pcre.patch \
+           file://change-char-type-to-signed-char-in-macros.patch \
+           file://sprintf-bug-concerning-8-bit-characters.patch \
+           file://slang-fix-the-iconv-existence-checking.patch \
+           file://0001-Fix-error-conflicting-types-for-posix_close.patch \
+          "
+
+inherit autotools-brokensep
+
+CLEANBROKEN = "1"
+
+SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487"
+SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db"
+
+EXTRA_OECONF += " --without-z --without-png --without-onig --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib"
+
+do_configure_prepend() {
+    # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
+    # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
+    # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
+    cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* .
+    cd ${B}
+}
+
+do_install() {
+	oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib'
+}
+
+FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
+FILES_${PN}-dbg += "${libdir}/${BPN}/v2/modules/.debug"
+
+PARALLEL_MAKE = ""
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch b/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
new file mode 100644
index 0000000..032995d
--- /dev/null
+++ b/meta/recipes-extended/stat/stat-3.3/fix-error-return.patch
@@ -0,0 +1,16 @@
+This patch fixies the wrong return code of stat -h.
+
+Upstream-Status: Pending
+Signed-off-by: Zhangle Yang <zhangle.yang@windriver.com>
+
+--- stat-3.3/stat.c.orig	2013-08-22 10:49:45.000000000 +0800
++++ stat-3.3/stat.c	2013-08-22 10:50:31.000000000 +0800
+@@ -845,7 +845,7 @@
+     fprintf(stderr, "\t\t%%S - Security ID in SE-Linux\n");
+     fprintf(stderr, "\t\t%%C - Security context in SE-Linux\n");
+     fprintf(stderr, "\t\t%%d - Free file nodes in file system\n");
+-    exit(1);
++    exit(0);
+ }
+   
+ 
diff --git a/meta/recipes-extended/stat/stat_3.3.bb b/meta/recipes-extended/stat/stat_3.3.bb
new file mode 100644
index 0000000..651831e
--- /dev/null
+++ b/meta/recipes-extended/stat/stat_3.3.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Command line file status display utility"
+DESCRIPTION = "Displays all information about a file that the stat() call provides and all information about a filesystem that statfs() provides."
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
+                    file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/${BP}.tar.gz \
+           file://fix-error-return.patch"
+
+SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
+SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
+
+do_install() {
+	install -d ${D}${base_bindir} ${D}${mandir}/man1
+	install -m 755 stat ${D}${base_bindir}/stat.stat
+	install -m 644 stat.1 ${D}${mandir}/man1
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "stat"
+ALTERNATIVE_PRIORITY[stat] = "200"
+ALTERNATIVE_LINK_NAME[stat] = "${base_bindir}/stat"
+ALTERNATIVE_TARGET[stat] = "${base_bindir}/stat.stat"
+
+ALTERNATIVE_${PN}-doc = "stat.1"
+ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
+
+BBCLASSEXTEND = "native"
+
diff --git a/meta/recipes-extended/stress/files/texinfo.patch b/meta/recipes-extended/stress/files/texinfo.patch
new file mode 100644
index 0000000..5ac5951
--- /dev/null
+++ b/meta/recipes-extended/stress/files/texinfo.patch
@@ -0,0 +1,79 @@
+--- a/doc/stress.texi
++++ b/doc/stress.texi
+@@ -62,47 +62,47 @@
+ 
+ @table @samp
+ @item -?
+-@itemx --help
++@item --help
+ Show help information.
+ 
+-@itemx --version
++@item --version
+ Show version information.
+ 
+ @item -v
+-@itemx --verbose
++@item --verbose
+ Turn up verbosity.
+ 
+ @item -q
+-@itemx --quiet
++@item --quiet
+ Turn down verbosity.
+ 
+ @item -n
+-@itemx --dry-run
++@item --dry-run
+ Show what would have been done.
+ 
+ @item -t @var{secs}
+-@itemx --timeout @var{secs}
++@item --timeout @var{secs}
+ Time out after @var{secs} seconds.
+ 
+-@itemx --backoff @var{usecs}
++@item --backoff @var{usecs}
+ Wait for factor of @var{usecs} microseconds before starting work.
+ 
+ @item -c @var{forks}
+-@itemx --cpu @var{forks}
++@item --cpu @var{forks}
+ Spawn @var{forks} processes each spinning on @samp{sqrt()}.
+ 
+ @item -i @var{forks}
+-@itemx --io @var{forks}
++@item --io @var{forks}
+ Spawn @var{forks} processes each spinning on @samp{sync()}.
+ 
+ @item -m @var{forks}
+-@itemx --vm @var{forks}
++@item --vm @var{forks}
+ Spawn @var{forks} processes each spinning on @samp{malloc()}.
+ 
+-@itemx --vm-bytes @var{bytes}
++@item --vm-bytes @var{bytes}
+ Allocate @var{bytes} number of bytes.  The default is 1.
+ 
+-@itemx --vm-hang
++@item --vm-hang
+ Instruct each vm hog process to go to sleep after allocating memory.  This
+ contrasts with their normal behavior, which is to free the memory and
+ reallocate @emph{ad infinitum}.  This is useful for simulating low memory
+@@ -114,13 +114,13 @@
+ @end example
+ 
+ @item -d @var{forks}
+-@itemx --hdd @var{forks}
++@item --hdd @var{forks}
+ Spawn @var{forks} processes each spinning on @samp{write()}.
+ 
+-@itemx --hdd-bytes @var{bytes}
++@item --hdd-bytes @var{bytes}
+ Write @var{bytes} number of bytes.  The default is 1GB.
+ 
+-@itemx --hdd-noclean
++@item --hdd-noclean
+ Do not unlink file(s) to which random ASCII data is written.
+ 
+ @end table
diff --git a/meta/recipes-extended/stress/stress_1.0.4.bb b/meta/recipes-extended/stress/stress_1.0.4.bb
new file mode 100644
index 0000000..4b7e4ba
--- /dev/null
+++ b/meta/recipes-extended/stress/stress_1.0.4.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \
+imposes a configurable amount of CPU, memory, I/O, and disk stress on the system."
+HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://people.seas.harvard.edu/~apw/${BPN}/${BP}.tar.gz \
+           file://texinfo.patch \
+           "
+
+SRC_URI[md5sum] = "890a4236dd1656792f3ef9a190cf99ef"
+SRC_URI[sha256sum] = "057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b"
+
+inherit autotools
diff --git a/meta/recipes-extended/sudo/files/sudo.pam b/meta/recipes-extended/sudo/files/sudo.pam
new file mode 100644
index 0000000..5bc26e7
--- /dev/null
+++ b/meta/recipes-extended/sudo/files/sudo.pam
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth       include      common-auth
+account    include      common-account
+password   include      common-password
+session    required     pam_keyinit.so revoke
+session    required     pam_limits.so
diff --git a/meta/recipes-extended/sudo/sudo.inc b/meta/recipes-extended/sudo/sudo.inc
new file mode 100644
index 0000000..a25876b
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -0,0 +1,40 @@
+SUMMARY = "Provide limited super user privileges to specific users"
+DESCRIPTION = "Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments."
+HOMEPAGE = "http://www.sudo.ws"
+BUGTRACKER = "http://www.sudo.ws/bugs/"
+SECTION = "admin"
+LICENSE = "ISC & BSD & Zlib"
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=c16e542408abda013d672be8eb88d174 \
+                    file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=cfe41112f96c19a074934d128f45c693 \
+                    file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6 \
+                    file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd \
+                    file://lib/util/getcwd.c;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
+                    file://lib/util/glob.c;beginline=6;endline=31;md5=5872733146b9eb0deb79e1f664815b85 \
+                    file://lib/util/snprintf.c;beginline=6;endline=34;md5=c82c1b3a5c32e08545c9ec5d71e41e50 \
+                    file://include/sudo_queue.h;beginline=5;endline=27;md5=449af4cc57fc7d46f42090608ba3e681 \
+                    file://lib/util/inet_pton.c;beginline=3;endline=17;md5=3970ab0518ab79cbd0bafb697f10b33a"
+
+inherit autotools
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+
+CONFFILES_${PN} = "${sysconfdir}/sudoers"
+
+EXTRA_OECONF = "--with-editor=/bin/vi --with-env-editor"
+
+EXTRA_OECONF_append_libc-musl = " --disable-hardening "
+
+# mksigname/mksiglist are used on build host to generate source files
+do_compile_prepend () {
+	oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}"  -C lib/util mksigname mksiglist
+}
+
+# Explicitly create ${localstatedir}/lib before do_install to ensure
+# the directory is accessible by all users. Otherwise the mkinstalldirs
+# script (from sudo) will recursively create ${localstatedir}/lib/sudo
+# and then chmod each directory with 0700 permissions, which isn't what
+# we want (i.e, users would not be able to access /var/lib).
+do_install_prepend (){
+	mkdir -p ${D}/${localstatedir}/lib
+}
diff --git a/meta/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch b/meta/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch
new file mode 100644
index 0000000..eb36cd4
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo/0001-Include-sys-types.h-for-id_t-definition.patch
@@ -0,0 +1,34 @@
+From 386e2c2fa2ab2e02ef71c268a57205139be329ab Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Aug 2015 07:07:49 +0000
+Subject: [PATCH] Include sys/types.h for id_t definition
+
+/sudo_util.h:219:14: error: unknown type name 'id_t'
+ __dso_public id_t sudo_strtoid_v1(const char *str, const char *sep,
+ char **endp, const char **errstr);
+               ^
+	       make[1]: *** [preserve_fds.o] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ include/sudo_util.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/sudo_util.h b/include/sudo_util.h
+index 89c9f89..ac0855a 100644
+--- a/include/sudo_util.h
++++ b/include/sudo_util.h
+@@ -17,6 +17,8 @@
+ #ifndef SUDO_UTIL_H
+ #define SUDO_UTIL_H
+ 
++#include <sys/types.h>
++
+ #ifdef HAVE_STDBOOL_H
+ # include <stdbool.h>
+ #else
+-- 
+2.5.1
+
diff --git a/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch b/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch
new file mode 100644
index 0000000..2418689
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch
@@ -0,0 +1,31 @@
+The makefile uses top_srcdir to find files that were created by configure, when
+it should use top_builddir.
+
+Upstream-Status: Submitted (http://bugzilla.sudo.ws/show_bug.cgi?id=708)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ src/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index f009e10..7acfb2d 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -165,11 +165,11 @@ install-dirs:
+ 
+ install-rc: install-dirs
+ 	if [ -n "$(INIT_SCRIPT)" ]; then \
+-	    $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_srcdir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \
++	    $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_builddir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \
+ 	    rm -f $(DESTDIR)$(RC_LINK); \
+ 	    ln -s $(INIT_DIR)/sudo $(DESTDIR)$(RC_LINK); \
+ 	elif test -n "$(tmpfiles_d)"; then \
+-	    $(INSTALL) $(INSTALL_OWNER) -m 0644 $(top_srcdir)/init.d/sudo.conf $(DESTDIR)$(tmpfiles_d)/sudo.conf; \
++	    $(INSTALL) $(INSTALL_OWNER) -m 0644 $(top_builddir)/init.d/sudo.conf $(DESTDIR)$(tmpfiles_d)/sudo.conf; \
+ 	fi
+ 
+ install-binaries: install-dirs $(PROGS)
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/sudo/sudo_1.8.14p3.bb b/meta/recipes-extended/sudo/sudo_1.8.14p3.bb
new file mode 100644
index 0000000..6b3cd6d
--- /dev/null
+++ b/meta/recipes-extended/sudo/sudo_1.8.14p3.bb
@@ -0,0 +1,36 @@
+require sudo.inc
+
+SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+           file://0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch \
+           file://0001-Include-sys-types.h-for-id_t-definition.patch \
+           "
+
+PAM_SRC_URI = "file://sudo.pam"
+
+SRC_URI[md5sum] = "93dbd1e47c136179ff1b01494c1c0e75"
+SRC_URI[sha256sum] = "a8a697cbb113859058944850d098464618254804cf97961dee926429f00a1237"
+
+DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
+
+EXTRA_OECONF += " \
+             ac_cv_type_rsize_t=no \
+             ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+             ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
+             "
+
+do_install_append () {
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+		install -D -m 664 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+	fi
+
+	chmod 4111 ${D}${bindir}/sudo
+	chmod 0440 ${D}${sysconfdir}/sudoers
+
+	# Explicitly remove the ${localstatedir}/run directory to avoid QA error
+	rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
+}
+
+FILES_${PN} += "${libdir}/tmpfiles.d"
+FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la"
diff --git a/meta/recipes-extended/sysklogd/files/no-strip-install.patch b/meta/recipes-extended/sysklogd/files/no-strip-install.patch
new file mode 100644
index 0000000..00fba71
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/no-strip-install.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: sysklogd-1.5/Makefile
+===================================================================
+--- sysklogd-1.5.orig/Makefile	2009-06-09 13:02:41.000000000 +0200
++++ sysklogd-1.5/Makefile	2009-06-09 13:03:06.000000000 +0200
+@@ -127,8 +127,8 @@
+ 	rm -f syslogd klogd ksym syslog_tst oops_test TAGS tsyslogd tklogd
+ 
+ install_exec: syslogd klogd
+-	${INSTALL} -m 500 -s syslogd ${BINDIR}/syslogd
+-	${INSTALL} -m 500 -s klogd ${BINDIR}/klogd
++	${INSTALL} -m 500 syslogd ${BINDIR}/syslogd
++	${INSTALL} -m 500 klogd ${BINDIR}/klogd
+ 
+ install_man:
+ 	${INSTALL} -m ${MAN_PERMS} sysklogd.8 ${MANDIR}/man8/sysklogd.8
diff --git a/meta/recipes-extended/sysklogd/files/no-vectorization.patch b/meta/recipes-extended/sysklogd/files/no-vectorization.patch
new file mode 100644
index 0000000..c1cc042
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/no-vectorization.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate
+
+The compiler should not be generating vectorized instructions on this target.
+This is a work around until I can determine why this is occuring on this
+particular recipe
+
+Index: sysklogd-1.5/Makefile
+===================================================================
+--- sysklogd-1.5.orig/Makefile
++++ sysklogd-1.5/Makefile
+@@ -20,7 +20,8 @@
+ CC= gcc
+ #SKFLAGS= -g -DSYSV -Wall
+ #LDFLAGS= -g
+-SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce
++SKFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce \
++	-fno-tree-vectorize
+ # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+ # -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
+ # $(shell getconf LFS_SKFLAGS)
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd
new file mode 100755
index 0000000..258f882
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/sysklogd
@@ -0,0 +1,151 @@
+#! /bin/sh
+# /etc/init.d/sysklogd: start the system log daemon.
+
+### BEGIN INIT INFO
+# Provides:             sysklogd
+# Required-Start:       $remote_fs $time
+# Required-Stop:        $remote_fs $time
+# Should-Start:         $network
+# Should-Stop:          $network
+# Default-Start:        2 3 4 5
+# Default-Stop:         0 1 6
+# Short-Description:    System logger
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+pidfile_syslogd=/var/run/syslogd.pid
+pidfile_klogd=/var/run/klogd.pid
+binpath_syslogd=/sbin/syslogd
+binpath_klogd=/sbin/klogd
+
+test -x $binpath || exit 0
+
+test ! -r /etc/default/syslogd || . /etc/default/syslogd
+
+create_xconsole()
+{
+    # Only proceed if /dev/xconsole is used at all
+    if ! grep -q '^[^#].*/dev/xconsole' /etc/syslog.conf
+    then
+	return
+    fi
+
+    if [ ! -e /dev/xconsole ]; then
+	mknod -m 640 /dev/xconsole p
+    else
+	chmod 0640 /dev/xconsole
+    fi
+    chown root:adm /dev/xconsole
+    test ! -x /sbin/restorecon || /sbin/restorecon /dev/xconsole
+}
+
+log_begin_msg () {
+    echo -n $1
+}
+
+log_end_msg () {
+    echo $1
+}
+
+log_success_msg () {
+    echo $1
+}
+
+running()
+{
+    # No pidfile, probably no daemon present
+    #
+    if [ ! -f $pidfile ]
+    then
+	return 1
+    fi
+
+    pid=`cat $pidfile_syslogd`
+
+    # No pid, probably no daemon present
+    #
+    if [ -z "$pid" ]
+    then
+	return 1
+    fi
+
+    if [ ! -d /proc/$pid ]
+    then
+	return 1
+    fi
+
+    cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1`
+
+    # No syslogd?
+    #
+    if [ "$cmd" != "$binpath" ]
+    then
+	return 1
+    fi
+
+    return 0
+}
+
+case "$1" in
+  start)
+    log_begin_msg "Starting system log daemon..."
+    create_xconsole
+    start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
+    log_end_msg $?
+    log_begin_msg "Starting kernel log daemon..."
+    start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
+    log_end_msg $?
+    ;;
+  stop)
+    log_begin_msg "Stopping system log daemon..."
+    start-stop-daemon --stop --quiet --pidfile $pidfile_syslogd --name syslogd
+    log_end_msg $?
+    log_begin_msg "Stopping kernel log daemon..."
+    start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+    log_end_msg $?
+    ;;
+  reload|force-reload)
+    log_begin_msg "Reloading system log daemon..."
+    start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile_syslogd --name syslogd
+    log_end_msg $?
+    log_begin_msg "Reloading kernel log daemon..."
+    start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+    start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
+    log_end_msg $?
+    ;;
+  restart)
+    log_begin_msg "Restarting system log daemon..."
+    start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile_syslogd --name syslogd
+    start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
+    log_end_msg $?
+    log_begin_msg "Reloading kernel log daemon..."
+    start-stop-daemon --stop --quiet --retry 3 --exec $binpath_klogd --pidfile $pidfile_klogd
+    start-stop-daemon --start --quiet --pidfile $pidfile_klogd --name klogd --startas $binpath_klogd -- $KLOGD
+    log_end_msg $?
+    ;;
+  reload-or-restart)
+    if running
+    then
+	$0 reload
+    else
+	$0 start
+    fi
+    ;;
+  status)
+    status syslogd
+    RETVAL=$?
+    status klogd
+    rval=$?
+    [ $RETVAL -eq 0 ] && exit $rval
+    exit $RETVAL
+    ;;
+  *)
+    log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart|status}"
+    exit 1
+esac
+
+exit 0
diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf
new file mode 100644
index 0000000..0849de1
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/syslog.conf
@@ -0,0 +1,71 @@
+#  /etc/syslog.conf	Configuration file for syslogd.
+#
+#  Ported from debian by Yu Ke <ke.yu@intel.com>
+#
+
+#
+# First some standard logfiles.  Log by facility.
+#
+
+auth,authpriv.*			/var/log/auth.log
+*.*;auth,authpriv.none		-/var/log/syslog
+#cron.*				/var/log/cron.log
+daemon.*			-/var/log/daemon.log
+kern.*				-/var/log/kern.log
+lpr.*				-/var/log/lpr.log
+mail.*				-/var/log/mail.log
+user.*				-/var/log/user.log
+
+#
+# Logging for the mail system.  Split it up so that
+# it is easy to write scripts to parse these files.
+#
+mail.info			-/var/log/mail.info
+mail.warn			-/var/log/mail.warn
+mail.err			/var/log/mail.err
+
+# Logging for INN news system
+#
+news.crit			/var/log/news.crit
+news.err			/var/log/news.err
+news.notice			-/var/log/news.notice
+
+#
+# Some `catch-all' logfiles.
+#
+*.=debug;\
+auth,authpriv.none;\
+news.none;mail.none	-/var/log/debug
+
+*.=info;*.=notice;*.=warn;\
+auth,authpriv.none;\
+cron,daemon.none;\
+mail,news.none		-/var/log/messages
+
+#
+# Emergencies are sent to everybody logged in.
+#
+*.emerg				*
+
+#
+# I like to have messages displayed on the console, but only on a virtual
+# console I usually leave idle.
+#
+#daemon,mail.*;\
+#news.=crit;news.=err;news.=notice;\
+#*.=debug;*.=info;\
+#*.=notice;*.=warn	/dev/tty8
+
+# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
+# you must invoke `xconsole' with the `-file' option:
+#
+#    $ xconsole -file /dev/xconsole [...]
+#
+# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
+#      busy site..
+#
+daemon.*;mail.*;\
+news.err;\
+*.=debug;*.=info;\
+*.=notice;*.=warn	|/dev/xconsole
+
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
new file mode 100644
index 0000000..bcf8aa7
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -0,0 +1,58 @@
+SUMMARY = "System Log Daemons"
+DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd"
+HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/"
+SECTION = "base"
+
+LICENSE = "GPLv2+ & BSD"
+LICENSE_syslogd = "BSD"
+LICENSE_klogd = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+                    file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \
+                    file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
+                   "
+
+inherit update-rc.d update-alternatives
+
+SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
+           file://no-strip-install.patch \
+           file://sysklogd \
+           file://syslog.conf \
+           "
+
+SRC_URI_append_e500v2 = " file://no-vectorization.patch"
+
+INITSCRIPT_NAME = "syslog"
+CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
+
+CFLAGS_append = " -DSYSV"
+
+do_install () {
+	install -d ${D}${mandir}/man8 \
+			${D}${mandir}/man5 \
+			${D}${base_sbindir}
+	oe_runmake 'BINDIR=${D}${base_sbindir}' \
+			'MANDIR=${D}${mandir}' install
+	install -d ${D}${sysconfdir}
+	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
+	install -d ${D}${sysconfdir}/init.d
+	install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
+}
+
+# sysklogd package has no internal systemd support, so we weigh busybox's
+# sysklogd utility over it in case of systemd
+ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}"
+
+ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
+
+ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
+ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
+ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
+ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
+
+pkg_prerm_${PN} () {
+	if test "x$D" = "x"; then
+	if test "$1" = "upgrade" -o "$1" = "remove"; then
+		/etc/init.d/syslog stop
+	fi
+	fi
+}
diff --git a/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb b/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb
new file mode 100644
index 0000000..975ecc2
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd_1.5.1.bb
@@ -0,0 +1,4 @@
+require sysklogd.inc
+
+SRC_URI[md5sum] = "c70599ab0d037fde724f7210c2c8d7f8"
+SRC_URI[sha256sum] = "5166c185ae23c92e8b9feee66a6e3d0bc944bf673112f53e3ecf62e08ce7c201"
diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
new file mode 100644
index 0000000..5c761fa
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -0,0 +1,55 @@
+SUMMARY = "System performance tools"
+DESCRIPTION = "The sysstat utilities are a collection of performance monitoring tools for Linux."
+HOMEPAGE = "http://sebastien.godard.pagesperso-orange.fr/"
+LICENSE = "GPLv2+"
+SECTION = "console/utils"
+
+SRC_URI = "http://pagesperso-orange.fr/sebastien.godard/sysstat-${PV}.tar.xz \
+           file://99_sysstat \
+           file://sysstat.service \
+          "
+
+DEPENDS += "base-passwd"
+
+inherit autotools-brokensep gettext systemd
+
+EXTRA_OECONF += "--disable-sensors"
+EXTRA_OEMAKE += 'LFLAGS=""'
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "sysstat.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
+do_configure_prepend() {
+    export sa_lib_dir=${libdir}/sa
+}
+
+do_install() {
+	autotools_do_install
+
+	# don't install /var/log/sa when populating rootfs. Do it through volatile
+
+	rm -rf ${D}/var
+	install -d ${D}/etc/default/volatiles
+	install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
+	sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
+}
+
+pkg_postinst_${PN} () {
+        if [ -n "$D" ]; then
+                exit 0
+        fi
+        if [ -e /etc/init.d/populate-volatile.sh ]; then
+                /etc/init.d/populate-volatile.sh update
+        fi
+}
+
+
+FILES_${PN} += "${libdir}/sa"
+FILES_${PN}-dbg += "${libdir}/sa/.debug/"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+LDFLAGS_append_libc-uclibc = " -lintl"
diff --git a/meta/recipes-extended/sysstat/sysstat/99_sysstat b/meta/recipes-extended/sysstat/sysstat/99_sysstat
new file mode 100644
index 0000000..0b0ec30
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/99_sysstat
@@ -0,0 +1 @@
+d root root 0755 /var/log/sa none
diff --git a/meta/recipes-extended/sysstat/sysstat/sysstat.service b/meta/recipes-extended/sysstat/sysstat/sysstat.service
new file mode 100644
index 0000000..aff0710
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/sysstat.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Resets System Activity Logs
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+User=root
+ExecStart=@LIBDIR@/sa/sa1 --boot
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta/recipes-extended/sysstat/sysstat_11.1.5.bb b/meta/recipes-extended/sysstat/sysstat_11.1.5.bb
new file mode 100644
index 0000000..69d2ec2
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat_11.1.5.bb
@@ -0,0 +1,7 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI[md5sum] = "4d8e6e72d057189a1660462a678d9ada"
+SRC_URI[sha256sum] = "feb3a90d86ffd69cf5b88144a8876ae05bd42384f559676f08100671589fa2bb"
+
diff --git a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
new file mode 100644
index 0000000..da2ae3c
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+
+This patch avoids heap overflow reported by :
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
+
+This is a clean patch for the GPLv2 tar recipe.
+
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25
+
+Index: tar-1.17/lib/rtapelib.c
+===================================================================
+--- tar-1.17.orig/lib/rtapelib.c
++++ tar-1.17/lib/rtapelib.c
+@@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si
+ 
+   sprintf (command_buffer, "R%lu\n", (unsigned long) length);
+   if (do_command (handle, command_buffer) == -1
+-      || (status = get_status (handle)) == SAFE_READ_ERROR)
++      || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length))
+     return SAFE_READ_ERROR;
+ 
+   for (counter = 0; counter < status; counter += rlen, buffer += rlen)
diff --git a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch
new file mode 100644
index 0000000..f8059a0
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Fix errors when built with gcc 4.3
+# Patch taken from Debian bug #452096
+
+diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h
+--- tar-1.17.orig/lib/argp-fmtstream.h	2006-01-11 12:24:05.000000000 -0800
++++ tar-1.17/lib/argp-fmtstream.h	2010-07-22 22:36:12.000000000 -0700
+@@ -198,7 +198,11 @@
+ #endif
+ 
+ #ifndef ARGP_FS_EI
+-#define ARGP_FS_EI extern inline
++ #if defined __GNUC_STDC_INLINE__
++   #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__))
++ #else
++   #define ARGP_FS_EI extern inline
++ #endif
+ #endif
+ 
+ ARGP_FS_EI size_t
+diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h
+--- tar-1.17.orig/lib/argp.h	2007-03-30 00:09:11.000000000 -0700
++++ tar-1.17/lib/argp.h	2010-07-22 22:38:44.000000000 -0700
+@@ -580,7 +580,11 @@
+ # endif
+ 
+ # ifndef ARGP_EI
+-#  define ARGP_EI extern __inline__
++#  if defined __GNUC_STDC_INLINE__
++#    define ARGP_EI extern __inline__ __attribute__((__gnu_inline__))
++#  else
++#    define ARGP_EI extern __inline__
++#  endif
+ # endif
+ 
+ ARGP_EI void
diff --git a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch
new file mode 100644
index 0000000..30534c2
--- /dev/null
+++ b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Inappropriate [licensing]
+
+# Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined.
+# This is needed to configure correctly with newer versions of autoconf.
+
+--- tar-1.17/m4/extensions.m4.orig	2010-07-22 22:21:35.000000000 -0700
++++ tar-1.17/m4/extensions.m4	2010-07-22 22:23:41.000000000 -0700
+@@ -1,4 +1,4 @@
+-# serial 4  -*- Autoconf -*-
++# serial 5  -*- Autoconf -*-
+ # Enable extensions on systems that normally disable them.
+ 
+ # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+@@ -16,6 +16,7 @@
+ # ------------------------
+ # Enable extensions on systems that normally disable them,
+ # typically due to standards-conformance issues.
++m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [
+ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
+ [
+   AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+@@ -48,7 +49,7 @@
+     AC_DEFINE([__EXTENSIONS__])
+   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+   AC_DEFINE([_TANDEM_SOURCE])
+-])
++])])
+ 
+ # gl_USE_SYSTEM_EXTENSIONS
+ # ------------------------
diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc
new file mode 100644
index 0000000..b339c43
--- /dev/null
+++ b/meta/recipes-extended/tar/tar.inc
@@ -0,0 +1,50 @@
+SUMMARY = "GNU file archiving program"
+DESCRIPTION = "GNU tar saves many files together into a single tape \
+or disk archive, and can restore individual files from the archive."
+HOMEPAGE = "http://www.gnu.org/software/tar/"
+SECTION = "base"
+
+SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
+
+inherit autotools gettext texinfo
+
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
+
+# Let aclocal use the relative path for the m4 file rather than the
+# absolute since tar has a lot of m4 files, otherwise there might
+# be an "Argument list too long" error when it is built in a long/deep
+# directory.
+acpaths = "-I ./m4"
+
+do_install () {
+    autotools_do_install
+    ln -s tar ${D}${bindir}/gtar
+}
+
+do_install_append_class-target() {
+    install -d ${D}${base_bindir}
+    mv ${D}${bindir}/tar ${D}${base_bindir}/tar
+    mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar
+    rmdir ${D}${bindir}/
+}
+
+PACKAGES =+ "${PN}-rmt"
+
+FILES_${PN}-rmt = "${base_sbindir}/rmt*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "tar"
+ALTERNATIVE_${PN}-rmt = "rmt"
+ALTERNATIVE_${PN}_class-nativesdk = ""
+ALTERNATIVE_${PN}-rmt_class-nativesdk = ""
+
+ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
+ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
+
+PROVIDES_append_class-native = " tar-replacement-native"
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-extended/tar/tar/remove-gets.patch b/meta/recipes-extended/tar/tar/remove-gets.patch
new file mode 100644
index 0000000..0b8be39
--- /dev/null
+++ b/meta/recipes-extended/tar/tar/remove-gets.patch
@@ -0,0 +1,22 @@
+ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+Index: tar-1.27/gnu/stdio.in.h
+===================================================================
+--- tar-1.27.orig/gnu/stdio.in.h	2013-06-29 08:54:26.000000000 +0300
++++ tar-1.27/gnu/stdio.in.h	2013-10-16 15:22:46.977204737 +0300
+@@ -710,10 +710,12 @@
+ /* It is very rare that the developer ever has full control of stdin,
+    so any use of gets warrants an unconditional warning; besides, C11
+    removed it.  */
++#if defined gets
+ #undef gets
+ #if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
++#endif
+ 
+ 
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb
new file mode 100644
index 0000000..b9ca206
--- /dev/null
+++ b/meta/recipes-extended/tar/tar_1.17.bb
@@ -0,0 +1,14 @@
+require tar.inc
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+PR = "r3"
+
+SRC_URI += "file://m4extensions.patch \
+    file://gcc43build.patch \
+    file://avoid_heap_overflow.patch \
+    "
+
+SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290"
+SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492"
diff --git a/meta/recipes-extended/tar/tar_1.28.bb b/meta/recipes-extended/tar/tar_1.28.bb
new file mode 100644
index 0000000..8816000
--- /dev/null
+++ b/meta/recipes-extended/tar/tar_1.28.bb
@@ -0,0 +1,12 @@
+require tar.inc
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI += "file://remove-gets.patch \
+           "
+SRC_URI[md5sum] = "8f32b2bc1ed7ddf4cf4e4a39711341b0"
+SRC_URI[sha256sum] = "60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562"
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff
new file mode 100644
index 0000000..16d6719
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/00_man_quoting.diff
@@ -0,0 +1,77 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5	1995-01-30 19:51:47.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.5	2004-04-09 16:59:45.000000000 +0200
+@@ -173,7 +173,7 @@
+ Patterns like these can be used when the machine has different internet
+ addresses with different internet hostnames.  Service providers can use
+ this facility to offer FTP, GOPHER or WWW archives with internet names
+-that may even belong to different organizations. See also the `twist'
++that may even belong to different organizations. See also the `twist\'
+ option in the hosts_options(5) document. Some systems (Solaris,
+ FreeBSD) can have more than one internet address on one physical
+ interface; with other systems you may have to resort to SLIP or PPP
+@@ -236,10 +236,10 @@
+ Before accepting a client request, the wrappers can use the IDENT
+ service to find out that the client did not send the request at all.
+ When the client host provides IDENT service, a negative IDENT lookup
+-result (the client matches `UNKNOWN@host') is strong evidence of a host
++result (the client matches `UNKNOWN@host\') is strong evidence of a host
+ spoofing attack.
+ .PP
+-A positive IDENT lookup result (the client matches `KNOWN@host') is
++A positive IDENT lookup result (the client matches `KNOWN@host\') is
+ less trustworthy. It is possible for an intruder to spoof both the
+ client connection and the IDENT lookup, although doing so is much
+ harder than spoofing just a client connection. It may also be that
+diff -ruN tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5
+--- tcp_wrappers_7.6.orig/hosts_options.5	1994-12-28 17:42:29.000000000 +0100
++++ tcp_wrappers_7.6/hosts_options.5	2004-04-09 16:59:49.000000000 +0200
+@@ -124,7 +124,7 @@
+ value is taken.
+ .SH MISCELLANEOUS
+ .IP "banners /some/directory"
+-Look for a file in `/some/directory' with the same name as the daemon
++Look for a file in `/some/directory\' with the same name as the daemon
+ process (for example in.telnetd for the telnet service), and copy its
+ contents to the client. Newline characters are replaced by
+ carriage-return newline, and %<letter> sequences are expanded (see
+diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8
+--- tcp_wrappers_7.6.orig/tcpdmatch.8	1996-02-11 17:01:36.000000000 +0100
++++ tcp_wrappers_7.6/tcpdmatch.8	2004-04-09 17:00:49.000000000 +0200
+@@ -26,7 +26,7 @@
+ A daemon process name. Typically, the last component of a daemon
+ executable pathname.
+ .IP client
+-A host name or network address, or one of the `unknown' or `paranoid'
++A host name or network address, or one of the `unknown\' or `paranoid\'
+ wildcard patterns.
+ .sp
+ When a client host name is specified, \fItcpdmatch\fR gives a
+@@ -37,13 +37,13 @@
+ .PP
+ Optional information specified with the \fIdaemon@server\fR form:
+ .IP server
+-A host name or network address, or one of the `unknown' or `paranoid'
+-wildcard patterns. The default server name is `unknown'.
++A host name or network address, or one of the `unknown\' or `paranoid\'
++wildcard patterns. The default server name is `unknown\'.
+ .PP
+ Optional information specified with the \fIuser@client\fR form:
+ .IP user
+ A client user identifier. Typically, a login name or a numeric userid.
+-The default user name is `unknown'.
++The default user name is `unknown\'.
+ .SH OPTIONS
+ .IP -d
+ Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
+@@ -70,7 +70,7 @@
+ .ti +5
+ tcpdmatch in.telnetd paranoid
+ .PP
+-On some systems, daemon names have no `in.' prefix, or \fItcpdmatch\fR
++On some systems, daemon names have no `in.\' prefix, or \fItcpdmatch\fR
+ may need some help to locate the inetd configuration file.
+ .SH FILES
+ .PP
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch
new file mode 100644
index 0000000..9a735bf
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/01_man_portability.patch
@@ -0,0 +1,250 @@
+Upstream-Status: Backport
+
+diff -ruNp tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3
+--- tcp_wrappers_7.6.orig/hosts_access.3	2005-03-09 18:30:25.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.3	2005-03-09 18:27:03.000000000 +0100
+@@ -3,7 +3,7 @@
+ hosts_access, hosts_ctl, request_init, request_set \- access control library
+ .SH SYNOPSIS
+ .nf
+-#include "tcpd.h"
++#include <tcpd.h>
+ 
+ extern int allow_severity;
+ extern int deny_severity;
+diff -ruNp tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5	2005-03-09 18:30:25.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.5	2005-03-09 18:30:18.000000000 +0100
+@@ -8,9 +8,9 @@ name, host name/address) patterns.  Exam
+ impatient reader is encouraged to skip to the EXAMPLES section for a
+ quick introduction.
+ .PP
+-An extended version of the access control language is described in the
+-\fIhosts_options\fR(5) document. The extensions are turned on at
+-program build time by building with -DPROCESS_OPTIONS.
++The extended version of the access control language is described in the
++\fIhosts_options\fR(5) document. \fBNote that this language supersedes
++the meaning of \fIshell_command\fB as documented below.\fR
+ .PP
+ In the following text, \fIdaemon\fR is the the process name of a
+ network daemon process, and \fIclient\fR is the name and/or address of
+@@ -346,8 +346,8 @@ in.tftpd: LOCAL, .my.domain
+ /etc/hosts.deny:
+ .in +3
+ .nf
+-in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\
+-	/usr/ucb/mail -s %d-%h root) &
++in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\
++	/usr/bin/mail -s %d-%h root) &
+ .fi
+ .PP
+ The safe_finger command comes with the tcpd wrapper and should be
+@@ -383,6 +383,7 @@ that shouldn\'t.  All problems are repor
+ .fi
+ .SH SEE ALSO
+ .nf
++hosts_options(5) extended syntax.
+ tcpd(8) tcp/ip daemon wrapper program.
+ tcpdchk(8), tcpdmatch(8), test programs.
+ .SH BUGS
+diff -ruNp tcp_wrappers_7.6.orig/hosts_options.5 tcp_wrappers_7.6/hosts_options.5
+--- tcp_wrappers_7.6.orig/hosts_options.5	2005-03-09 18:30:24.000000000 +0100
++++ tcp_wrappers_7.6/hosts_options.5	2005-03-09 18:27:03.000000000 +0100
+@@ -2,10 +2,8 @@
+ .SH NAME
+ hosts_options \- host access control language extensions
+ .SH DESCRIPTION
+-This document describes optional extensions to the language described
+-in the hosts_access(5) document. The extensions are enabled at program
+-build time. For example, by editing the Makefile and turning on the 
+-PROCESS_OPTIONS compile-time option.
++This document describes extensions to the language described
++in the hosts_access(5) document.
+ .PP
+ The extensible language uses the following format:
+ .sp
+@@ -58,12 +56,12 @@ Notice the leading dot on the domain nam
+ Execute, in a child process, the specified shell command, after
+ performing the %<letter> expansions described in the hosts_access(5)
+ manual page.  The command is executed with stdin, stdout and stderr
+-connected to the null device, so that it won\'t mess up the
++connected to the null device, so that it won't mess up the
+ conversation with the client host. Example:
+ .sp
+ .nf
+ .ti +3
+-spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
++spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) &
+ .fi
+ .sp
+ executes, in a background child process, the shell command "safe_finger
+diff -ruNp tcp_wrappers_7.6.orig/inetcf.c tcp_wrappers_7.6/inetcf.c
+--- tcp_wrappers_7.6.orig/inetcf.c	1997-02-12 02:13:24.000000000 +0100
++++ tcp_wrappers_7.6/inetcf.c	2005-03-09 18:27:03.000000000 +0100
+@@ -26,13 +26,17 @@ extern void exit();
+   * guesses. Shorter names follow longer ones.
+   */
+ char   *inet_files[] = {
++#if 0
+     "/private/etc/inetd.conf",		/* NEXT */
+     "/etc/inet/inetd.conf",		/* SYSV4 */
+     "/usr/etc/inetd.conf",		/* IRIX?? */
++#endif
+     "/etc/inetd.conf",			/* BSD */
++#if 0
+     "/etc/net/tlid.conf",		/* SYSV4?? */
+     "/etc/saf/tlid.conf",		/* SYSV4?? */
+     "/etc/tlid.conf",			/* SYSV4?? */
++#endif
+     0,
+ };
+ 
+diff -ruNp tcp_wrappers_7.6.orig/tcpd.8 tcp_wrappers_7.6/tcpd.8
+--- tcp_wrappers_7.6.orig/tcpd.8	1996-02-21 16:39:16.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.8	2005-03-09 18:27:03.000000000 +0100
+@@ -12,7 +12,11 @@ The program supports both 4.3BSD-style s
+ TLI.  Functionality may be limited when the protocol underneath TLI is
+ not an internet protocol.
+ .PP
+-Operation is as follows: whenever a request for service arrives, the
++There are two possible modes of operation: execution of \fItcpd\fP
++before a service started by \fIinetd\fP, or linking a daemon with
++the \fIlibwrap\fP shared library as documented in the \fIhosts_access\fR(3)
++manual page. Operation when started by \fIinetd\fP
++is as follows: whenever a request for service arrives, the
+ \fIinetd\fP daemon is tricked into running the \fItcpd\fP program
+ instead of the desired server. \fItcpd\fP logs the request and does
+ some additional checks. When all is well, \fItcpd\fP runs the
+@@ -88,11 +92,11 @@ configuration files.
+ .sp
+ .in +5
+ # mkdir /other/place
+-# mv /usr/etc/in.fingerd /other/place
+-# cp tcpd /usr/etc/in.fingerd
++# mv /usr/sbin/in.fingerd /other/place
++# cp tcpd /usr/sbin/in.fingerd
+ .fi
+ .PP
+-The example assumes that the network daemons live in /usr/etc. On some
++The example assumes that the network daemons live in /usr/sbin. On some
+ systems, network daemons live in /usr/sbin or in /usr/libexec, or have
+ no `in.\' prefix to their name.
+ .SH EXAMPLE 2
+@@ -101,35 +105,34 @@ are left in their original place.
+ .PP
+ In order to monitor access to the \fIfinger\fR service, perform the
+ following edits on the \fIinetd\fR configuration file (usually 
+-\fI/etc/inetd.conf\fR or \fI/etc/inet/inetd.conf\fR):
++\fI/etc/inetd.conf\fR):
+ .nf
+ .sp
+ .ti +5
+-finger  stream  tcp  nowait  nobody  /usr/etc/in.fingerd  in.fingerd
++finger  stream  tcp  nowait  nobody  /usr/sbin/in.fingerd  in.fingerd
+ .sp
+ becomes:
+ .sp
+ .ti +5
+-finger  stream  tcp  nowait  nobody  /some/where/tcpd     in.fingerd
++finger  stream  tcp  nowait  nobody  /usr/sbin/tcpd     in.fingerd
+ .sp
+ .fi
+ .PP
+-The example assumes that the network daemons live in /usr/etc. On some
++The example assumes that the network daemons live in /usr/sbin. On some
+ systems, network daemons live in /usr/sbin or in /usr/libexec, the
+ daemons have no `in.\' prefix to their name, or there is no userid
+ field in the inetd configuration file.
+ .PP
+ Similar changes will be needed for the other services that are to be
+ covered by \fItcpd\fR.  Send a `kill -HUP\' to the \fIinetd\fR(8)
+-process to make the changes effective. AIX users may also have to
+-execute the `inetimp\' command.
++process to make the changes effective.
+ .SH EXAMPLE 3
+ In the case of daemons that do not live in a common directory ("secret"
+ or otherwise), edit the \fIinetd\fR configuration file so that it
+ specifies an absolute path name for the process name field. For example:
+ .nf
+ .sp
+-    ntalk  dgram  udp  wait  root  /some/where/tcpd  /usr/local/lib/ntalkd
++    ntalk  dgram  udp  wait  root  /usr/sbin/tcpd  /usr/local/lib/ntalkd
+ .sp
+ .fi
+ .PP
+@@ -164,6 +167,7 @@ The default locations of the host access
+ .SH SEE ALSO
+ .na
+ .nf
++hosts_access(3), functions provided by the libwrap library.
+ hosts_access(5), format of the tcpd access control tables.
+ syslog.conf(5), format of the syslogd control file.
+ inetd.conf(5), format of the inetd control file.
+diff -ruNp tcp_wrappers_7.6.orig/tcpdchk.8 tcp_wrappers_7.6/tcpdchk.8
+--- tcp_wrappers_7.6.orig/tcpdchk.8	1995-01-08 17:00:31.000000000 +0100
++++ tcp_wrappers_7.6/tcpdchk.8	2005-03-09 18:27:03.000000000 +0100
+@@ -9,8 +9,8 @@ tcpdchk [-a] [-d] [-i inet_conf] [-v]
+ potential and real problems it can find. The program examines the
+ \fItcpd\fR access control files (by default, these are
+ \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR), and compares the
+-entries in these files against entries in the \fIinetd\fR or \fItlid\fR
+-network configuration files.
++entries in these files against entries in the \fIinetd\fR
++network configuration file.
+ .PP
+ \fItcpdchk\fR reports problems such as non-existent pathnames; services
+ that appear in \fItcpd\fR access control rules, but are not controlled
+@@ -26,14 +26,13 @@ problem.
+ .SH OPTIONS
+ .IP -a
+ Report access control rules that permit access without an explicit
+-ALLOW keyword. This applies only when the extended access control
+-language is enabled (build with -DPROCESS_OPTIONS).
++ALLOW keyword.
+ .IP -d
+ Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
+ directory instead of the default ones.
+ .IP "-i inet_conf"
+ Specify this option when \fItcpdchk\fR is unable to find your
+-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
++\fIinetd.conf\fR network configuration file, or when
+ you suspect that the program uses the wrong one.
+ .IP -v
+ Display the contents of each access control rule.  Daemon lists, client
+@@ -54,7 +53,6 @@ tcpdmatch(8), explain what tcpd would do
+ hosts_access(5), format of the tcpd access control tables.
+ hosts_options(5), format of the language extensions.
+ inetd.conf(5), format of the inetd control file.
+-tlid.conf(5), format of the tlid control file.
+ .SH AUTHORS
+ .na
+ .nf
+diff -ruNp tcp_wrappers_7.6.orig/tcpdmatch.8 tcp_wrappers_7.6/tcpdmatch.8
+--- tcp_wrappers_7.6.orig/tcpdmatch.8	2005-03-09 18:30:24.000000000 +0100
++++ tcp_wrappers_7.6/tcpdmatch.8	2005-03-09 18:27:03.000000000 +0100
+@@ -13,7 +13,7 @@ request for service.  Examples are given
+ The program examines the \fItcpd\fR access control tables (default
+ \fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR) and prints its
+ conclusion.  For maximal accuracy, it extracts additional information
+-from your \fIinetd\fR or \fItlid\fR network configuration file.
++from your \fIinetd\fR network configuration file.
+ .PP
+ When \fItcpdmatch\fR finds a match in the access control tables, it
+ identifies the matched rule. In addition, it displays the optional
+@@ -50,7 +50,7 @@ Examine \fIhosts.allow\fR and \fIhosts.d
+ directory instead of the default ones.
+ .IP "-i inet_conf"
+ Specify this option when \fItcpdmatch\fR is unable to find your
+-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
++\fIinetd.conf\fR network configuration file, or when
+ you suspect that the program uses the wrong one.
+ .SH EXAMPLES
+ To predict how \fItcpd\fR would handle a telnet request from the local
+@@ -86,7 +86,6 @@ tcpdchk(8), tcpd configuration checker
+ hosts_access(5), format of the tcpd access control tables.
+ hosts_options(5), format of the language extensions.
+ inetd.conf(5), format of the inetd control file.
+-tlid.conf(5), format of the tlid control file.
+ .SH AUTHORS
+ .na
+ .nf
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch
new file mode 100644
index 0000000..9e18802
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/05_wildcard_matching.patch
@@ -0,0 +1,105 @@
+Upstream-Status: Backport
+
+See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=17847
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5	2004-04-10 18:54:33.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5	2004-04-10 18:54:27.000000000 +0200
+@@ -89,6 +89,10 @@
+ bitwise AND of the address and the `mask\'. For example, the net/mask
+ pattern `131.155.72.0/255.255.254.0\' matches every address in the
+ range `131.155.72.0\' through `131.155.73.255\'.
++.IP \(bu
++Wildcards `*\' and `?\' can be used to match hostnames or IP addresses.  This
++method of matching cannot be used in conjunction with `net/mask\' matching,
++hostname matching beginning with `.\' or IP address matching ending with `.\'.
+ .SH WILDCARDS
+ The access control language supports explicit wildcards:
+ .IP ALL
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c	1997-02-12 02:13:23.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.c	2004-04-10 18:52:21.000000000 +0200
+@@ -289,6 +289,11 @@
+ {
+     int     n;
+ 
++#ifndef DISABLE_WILDCARD_MATCHING
++    if (strchr(tok, '*') || strchr(tok,'?')) {  /* contains '*' or '?' */
++        return (match_pattern_ylo(string,tok)); 	       
++    } else 
++#endif    
+     if (tok[0] == '.') {			/* suffix */
+ 	n = strlen(string) - strlen(tok);
+ 	return (n > 0 && STR_EQ(tok, string + n));
+@@ -329,3 +334,71 @@
+     }
+     return ((addr & mask) == net);
+ }
++
++#ifndef DISABLE_WILDCARD_MATCHING
++/* Note: this feature has been adapted in a pretty straightforward way
++   from Tatu Ylonen's last SSH version under free license by 
++   Pekka Savola <pekkas@netcore.fi>.
++
++   Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
++*/
++
++/* Returns true if the given string matches the pattern (which may contain
++   ? and * as wildcards), and zero if it does not match. */
++	  
++int match_pattern_ylo(const char *s, const char *pattern)
++{
++  while (1)
++    {
++      /* If at end of pattern, accept if also at end of string. */
++      if (!*pattern)
++        return !*s;
++
++      /* Process '*'. */
++      if (*pattern == '*')
++        {
++	  /* Skip the asterisk. */
++	  pattern++;
++
++	  /* If at end of pattern, accept immediately. */
++          if (!*pattern)
++            return 1;
++
++	  /* If next character in pattern is known, optimize. */
++          if (*pattern != '?' && *pattern != '*')
++            {
++	      /* Look instances of the next character in pattern, and try
++		 to match starting from those. */
++              for (; *s; s++)
++                if (*s == *pattern &&
++                    match_pattern_ylo(s + 1, pattern + 1))
++                  return 1;
++	      /* Failed. */
++              return 0;
++            }
++
++	  /* Move ahead one character at a time and try to match at each
++	     position. */
++          for (; *s; s++)
++            if (match_pattern_ylo(s, pattern))
++              return 1;
++	  /* Failed. */
++          return 0;
++        }
++
++      /* There must be at least one more character in the string.  If we are
++	 at the end, fail. */
++      if (!*s)
++        return 0;
++
++      /* Check if the next character of the string is acceptable. */
++      if (*pattern != '?' && *pattern != *s)
++	return 0;
++      
++      /* Move to the next character, both in string and in pattern. */
++      s++;
++      pattern++;
++    }
++  /*NOTREACHED*/
++}
++#endif /* DISABLE_WILDCARD_MATCHING */
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch
new file mode 100644
index 0000000..725f4b5
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/06_fix_gethostbyname.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Backport
+
+* Mon Feb  5 2001 Preston Brown <pbrown@redhat.com>
+- fix gethostbyname to work better with dot "." notation (#16949)
+
+--- tcp_wrappers_7.6/socket.c.fixgethostbyname	Fri Mar 21 13:27:25 1997
++++ tcp_wrappers_7.6/socket.c	Mon Feb  5 14:09:40 2001
+@@ -52,7 +52,8 @@
+ char   *name;
+ {
+     char    dot_name[MAXHOSTNAMELEN + 1];
+-
++    struct hostent *hp;
++    
+     /*
+      * Don't append dots to unqualified names. Such names are likely to come
+      * from local hosts files or from NIS.
+@@ -61,8 +62,12 @@
+     if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) {
+ 	return (gethostbyname(name));
+     } else {
+-	sprintf(dot_name, "%s.", name);
+-	return (gethostbyname(dot_name));
++        sprintf(dot_name, "%s.", name);
++        hp = gethostbyname(dot_name);
++	if (hp)
++	    return hp;
++	else
++	    return (gethostbyname(name));
+     }
+ }
+ 
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch
new file mode 100644
index 0000000..96d47c3
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/10_usagi-ipv6.patch
@@ -0,0 +1,1255 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/fix_options.c tcp_wrappers_7.6/fix_options.c
+--- tcp_wrappers_7.6.orig/fix_options.c	1997-04-08 02:29:19.000000000 +0200
++++ tcp_wrappers_7.6/fix_options.c	2004-04-10 19:07:43.000000000 +0200
+@@ -11,6 +11,9 @@
+ 
+ #include <sys/types.h>
+ #include <sys/param.h>
++#ifdef INET6
++#include <sys/socket.h>
++#endif
+ #include <netinet/in.h>
+ #include <netinet/in_systm.h>
+ #include <netinet/ip.h>
+@@ -41,6 +44,22 @@
+     unsigned int opt;
+     int     optlen;
+     struct in_addr dummy;
++#ifdef INET6
++    struct sockaddr_storage ss;
++    int sslen;
++
++    /*
++     * check if this is AF_INET socket
++     * XXX IPv6 support?
++     */
++    sslen = sizeof(ss);
++    if (getsockname(fd, (struct sockaddr *)&ss, &sslen) < 0) {
++	syslog(LOG_ERR, "getpeername: %m");
++	clean_exit(request);
++    }
++    if (ss.ss_family != AF_INET)
++	return;
++#endif
+ 
+     if ((ip = getprotobyname("ip")) != 0)
+ 	ipproto = ip->p_proto;
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5	2004-04-10 19:22:58.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5	2004-04-10 19:07:43.000000000 +0200
+@@ -85,11 +85,18 @@
+ for daemon process names or for client user names.
+ .IP \(bu
+ An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a
+-`net/mask\' pair. A host address is matched if `net\' is equal to the
++`net/mask\' pair. An IPv4 host address is matched if `net\' is equal to the
+ bitwise AND of the address and the `mask\'. For example, the net/mask
+ pattern `131.155.72.0/255.255.254.0\' matches every address in the
+ range `131.155.72.0\' through `131.155.73.255\'.
+ .IP \(bu
++An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a
++`[net]/prefixlen\' pair. An IPv6 host address is matched if
++`prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the
++address. For example, the [net]/prefixlen pattern
++`[3ffe:505:2:1::]/64\' matches every address in the range
++`3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'.
++.IP \(bu
+ Wildcards `*\' and `?\' can be used to match hostnames or IP addresses.  This
+ method of matching cannot be used in conjunction with `net/mask\' matching,
+ hostname matching beginning with `.\' or IP address matching ending with `.\'.
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c	2004-04-10 19:22:58.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.c	2004-04-10 19:07:43.000000000 +0200
+@@ -24,7 +24,13 @@
+ /* System libraries. */
+ 
+ #include <sys/types.h>
++#ifdef INT32_T
++    typedef uint32_t u_int32_t;
++#endif
+ #include <sys/param.h>
++#ifdef INET6
++#include <sys/socket.h>
++#endif
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
+@@ -33,6 +39,9 @@
+ #include <errno.h>
+ #include <setjmp.h>
+ #include <string.h>
++#ifdef INET6
++#include <netdb.h>
++#endif
+ 
+ extern char *fgets();
+ extern int errno;
+@@ -82,6 +91,10 @@
+ static int host_match();
+ static int string_match();
+ static int masked_match();
++#ifdef INET6
++static int masked_match4();
++static int masked_match6();
++#endif
+ 
+ /* Size of logical line buffer. */
+ 
+@@ -289,6 +302,13 @@
+ {
+     int     n;
+ 
++#ifdef INET6
++    /* convert IPv4 mapped IPv6 address to IPv4 address */
++    if (STRN_EQ(string, "::ffff:", 7)
++      && dot_quad_addr(string + 7) != INADDR_NONE) {
++      string += 7;
++    }
++#endif    
+ #ifndef DISABLE_WILDCARD_MATCHING
+     if (strchr(tok, '*') || strchr(tok,'?')) {  /* contains '*' or '?' */
+         return (match_pattern_ylo(string,tok)); 	       
+@@ -304,20 +324,72 @@
+     } else if (tok[(n = strlen(tok)) - 1] == '.') {	/* prefix */
+ 	return (STRN_EQ(tok, string, n));
+     } else {					/* exact match */
++#ifdef INET6
++	struct addrinfo hints, *res;
++	struct sockaddr_in6 pat, addr;
++	int len, ret;
++	char ch;
++
++	len = strlen(tok);
++	if (*tok == '[' && tok[len - 1] == ']') {
++	    ch = tok[len - 1];
++	    tok[len - 1] = '\0';
++	    memset(&hints, 0, sizeof(hints));
++	    hints.ai_family = AF_INET6;
++	    hints.ai_socktype = SOCK_STREAM;
++	    hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++	    if ((ret = getaddrinfo(tok + 1, NULL, &hints, &res)) == 0) {
++		memcpy(&pat, res->ai_addr, sizeof(pat));
++		freeaddrinfo(res);
++	    }
++	    tok[len - 1] = ch;
++	    if (ret != 0 || getaddrinfo(string, NULL, &hints, &res) != 0)
++		return NO;
++	    memcpy(&addr, res->ai_addr, sizeof(addr));
++	    freeaddrinfo(res);
++#ifdef NI_WITHSCOPEID
++	    if (pat.sin6_scope_id != 0 &&
++		addr.sin6_scope_id != pat.sin6_scope_id)
++		return NO;
++#endif
++	    return (!memcmp(&pat.sin6_addr, &addr.sin6_addr,
++			    sizeof(struct in6_addr)));
++	    return (ret);
++	}
++#endif
+ 	return (STR_EQ(tok, string));
+     }
+ }
+ 
+ /* masked_match - match address against netnumber/netmask */
+ 
++#ifdef INET6
+ static int masked_match(net_tok, mask_tok, string)
+ char   *net_tok;
+ char   *mask_tok;
+ char   *string;
+ {
++    return (masked_match4(net_tok, mask_tok, string) ||
++	    masked_match6(net_tok, mask_tok, string));
++}
++
++static int masked_match4(net_tok, mask_tok, string)
++#else
++static int masked_match(net_tok, mask_tok, string)
++#endif
++char   *net_tok;
++char   *mask_tok;
++char   *string;
++{
++#ifdef INET6
++    u_int32_t net;
++    u_int32_t mask;
++    u_int32_t addr;
++#else
+     unsigned long net;
+     unsigned long mask;
+     unsigned long addr;
++#endif
+ 
+     /*
+      * Disallow forms other than dotted quad: the treatment that inet_addr()
+@@ -329,12 +401,78 @@
+ 	return (NO);
+     if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
+ 	|| (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
++#ifndef INET6
+ 	tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
++#endif
+ 	return (NO);				/* not tcpd_jump() */
+     }
+     return ((addr & mask) == net);
+ }
+ 
++#ifdef INET6
++static int masked_match6(net_tok, mask_tok, string)
++char   *net_tok;
++char   *mask_tok;
++char   *string;
++{
++    struct addrinfo hints, *res;
++    struct sockaddr_in6 net, addr;
++    u_int32_t mask;
++    int len, mask_len, i = 0;
++    char ch;
++
++    memset(&hints, 0, sizeof(hints));
++    hints.ai_family = AF_INET6;
++    hints.ai_socktype = SOCK_STREAM;
++    hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++    if (getaddrinfo(string, NULL, &hints, &res) != 0)
++	return NO;
++    memcpy(&addr, res->ai_addr, sizeof(addr));
++    freeaddrinfo(res);
++
++    if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
++	if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
++	 || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
++	    return (NO);
++	return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
++    }
++
++    /* match IPv6 address against netnumber/prefixlen */
++    len = strlen(net_tok);
++    if (*net_tok != '[' || net_tok[len - 1] != ']')
++	return NO;
++    ch = net_tok[len - 1];
++    net_tok[len - 1] = '\0';
++    if (getaddrinfo(net_tok + 1, NULL, &hints, &res) != 0) {
++	net_tok[len - 1] = ch;
++	return NO;
++    }
++    memcpy(&net, res->ai_addr, sizeof(net));
++    freeaddrinfo(res);
++    net_tok[len - 1] = ch;
++    if ((mask_len = atoi(mask_tok)) < 0 || mask_len > 128)
++	return NO;
++
++#ifdef NI_WITHSCOPEID
++    if (net.sin6_scope_id != 0 && addr.sin6_scope_id != net.sin6_scope_id)
++	return NO;
++#endif
++    while (mask_len > 0) {
++	if (mask_len < 32) {
++	    mask = htonl(~(0xffffffff >> mask_len));
++	    if ((*(u_int32_t *)&addr.sin6_addr.s6_addr[i] & mask) != (*(u_int32_t *)&net.sin6_addr.s6_addr[i] & mask))
++		return NO;
++	    break;
++	}
++	if (*(u_int32_t *)&addr.sin6_addr.s6_addr[i] != *(u_int32_t *)&net.sin6_addr.s6_addr[i])
++	    return NO;
++	i += 4;
++	mask_len -= 32;
++    }
++    return YES;
++}
++#endif /* INET6 */
++
+ #ifndef DISABLE_WILDCARD_MATCHING
+ /* Note: this feature has been adapted in a pretty straightforward way
+    from Tatu Ylonen's last SSH version under free license by 
+diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
+--- tcp_wrappers_7.6.orig/Makefile	1997-03-21 19:27:21.000000000 +0100
++++ tcp_wrappers_7.6/Makefile	2004-04-10 19:22:44.000000000 +0200
+@@ -21,7 +21,7 @@
+ 	@echo "	dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix"
+ 	@echo "	linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
+ 	@echo "	ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4"
+-	@echo "	sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
++	@echo "	sunos40 sunos5 solaris8 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
+ 	@echo "	uts215 uxp"
+ 	@echo
+ 	@echo "If none of these match your environment, edit the system"
+@@ -131,20 +131,34 @@
+ 	NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all
+ 
+ # Freebsd and linux by default have no NIS.
+-386bsd netbsd bsdos:
++386bsd bsdos:
+ 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+ 	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
+ 	EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
+ 
+ freebsd:
+ 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
++	LIBS="-L/usr/local/v6/lib -linet6" \
+ 	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
+-	EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
++	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" \
++	VSYSLOG= all
++
++netbsd:
++	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
++	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
++	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len" VSYSLOG= all
+ 
+ linux:
+ 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+-	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
+-	NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
++	LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
++	NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
++	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
++
++gnu:
++	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
++	LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
++	NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \
++	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all
+ 
+ # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
+ hpux hpux8 hpux9 hpux10:
+@@ -196,6 +210,13 @@
+ 	NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
+ 	BUGS="$(BUGS) -DSOLARIS_24_GETHOSTBYNAME_BUG" all
+ 
++# SunOS 5.8 is another SYSV4 variant, but has IPv6 support
++solaris8:
++	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
++	LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv VSYSLOG= \
++	NETGROUP=-DNETGROUP AUX_OBJ=setenv.o TLI=-DTLI \
++	EXTRA_CFLAGS="-DINET6 -DNO_CLONE_DEVICE -DINT32_T" all
++
+ # Generic SYSV40
+ esix sysv4:
+ 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
+--- tcp_wrappers_7.6.orig/misc.c	1996-02-11 17:01:30.000000000 +0100
++++ tcp_wrappers_7.6/misc.c	2004-04-10 19:07:43.000000000 +0200
+@@ -58,9 +58,31 @@
+ {
+     char   *cp;
+ 
++#ifdef INET6
++    int bracket = 0;
++
++    for (cp = string; cp && *cp; cp++) {
++	switch (*cp) {
++	case '[':
++	    bracket++;
++	    break;
++	case ']':
++	    bracket--;
++	    break;
++	default:
++	    if (bracket == 0 && *cp == delimiter) {
++		*cp++ = 0;
++		return cp;
++	    }
++	    break;
++	}
++    }
++    return (NULL);
++#else
+     if ((cp = strchr(string, delimiter)) != 0)
+ 	*cp++ = 0;
+     return (cp);
++#endif
+ }
+ 
+ /* dot_quad_addr - convert dotted quad to internal form */
+diff -ruN tcp_wrappers_7.6.orig/refuse.c tcp_wrappers_7.6/refuse.c
+--- tcp_wrappers_7.6.orig/refuse.c	1994-12-28 17:42:40.000000000 +0100
++++ tcp_wrappers_7.6/refuse.c	2004-04-10 19:07:43.000000000 +0200
+@@ -25,7 +25,12 @@
+ void    refuse(request)
+ struct request_info *request;
+ {
++#ifdef INET6
++    syslog(deny_severity, "refused connect from %s (%s)",
++	   eval_client(request), eval_hostaddr(request->client));
++#else
+     syslog(deny_severity, "refused connect from %s", eval_client(request));
++#endif
+     clean_exit(request);
+     /* NOTREACHED */
+ }
+diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
+--- tcp_wrappers_7.6.orig/rfc931.c	1995-01-02 16:11:34.000000000 +0100
++++ tcp_wrappers_7.6/rfc931.c	2004-04-10 19:07:43.000000000 +0200
+@@ -68,20 +68,50 @@
+ /* rfc931 - return remote user name, given socket structures */
+ 
+ void    rfc931(rmt_sin, our_sin, dest)
++#ifdef INET6
++struct sockaddr *rmt_sin;
++struct sockaddr *our_sin;
++#else
+ struct sockaddr_in *rmt_sin;
+ struct sockaddr_in *our_sin;
++#endif
+ char   *dest;
+ {
+     unsigned rmt_port;
+     unsigned our_port;
++#ifdef INET6
++    struct sockaddr_storage rmt_query_sin;
++    struct sockaddr_storage our_query_sin;
++    int alen;
++#else
+     struct sockaddr_in rmt_query_sin;
+     struct sockaddr_in our_query_sin;
++#endif
+     char    user[256];			/* XXX */
+     char    buffer[512];		/* XXX */
+     char   *cp;
+     char   *result = unknown;
+     FILE   *fp;
+ 
++#ifdef INET6
++    /* address family must be the same */
++    if (rmt_sin->sa_family != our_sin->sa_family) {
++	STRN_CPY(dest, result, STRING_LENGTH);
++	return;
++    }
++    switch (our_sin->sa_family) {
++    case AF_INET:
++	alen = sizeof(struct sockaddr_in);
++	break;
++    case AF_INET6:
++	alen = sizeof(struct sockaddr_in6);
++	break;
++    default:
++	STRN_CPY(dest, result, STRING_LENGTH);
++	return;
++    }
++#endif
++
+     /*
+      * Use one unbuffered stdio stream for writing to and for reading from
+      * the RFC931 etc. server. This is done because of a bug in the SunOS
+@@ -92,7 +122,11 @@
+      * sockets.
+      */
+ 
++#ifdef INET6
++    if ((fp = fsocket(our_sin->sa_family, SOCK_STREAM, 0)) != 0) {
++#else
+     if ((fp = fsocket(AF_INET, SOCK_STREAM, 0)) != 0) {
++#endif
+ 	setbuf(fp, (char *) 0);
+ 
+ 	/*
+@@ -112,6 +146,25 @@
+ 	     * addresses from the query socket.
+ 	     */
+ 
++#ifdef INET6
++	    memcpy(&our_query_sin, our_sin, alen);
++	    memcpy(&rmt_query_sin, rmt_sin, alen);
++	    switch (our_sin->sa_family) {
++	    case AF_INET:
++		((struct sockaddr_in *)&our_query_sin)->sin_port = htons(ANY_PORT);
++		((struct sockaddr_in *)&rmt_query_sin)->sin_port = htons(RFC931_PORT);
++		break;
++	    case AF_INET6:
++		((struct sockaddr_in6 *)&our_query_sin)->sin6_port = htons(ANY_PORT);
++		((struct sockaddr_in6 *)&rmt_query_sin)->sin6_port = htons(RFC931_PORT);
++		break;
++	    }
++
++	    if (bind(fileno(fp), (struct sockaddr *) & our_query_sin,
++		     alen) >= 0 &&
++		connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
++			alen) >= 0) {
++#else
+ 	    our_query_sin = *our_sin;
+ 	    our_query_sin.sin_port = htons(ANY_PORT);
+ 	    rmt_query_sin = *rmt_sin;
+@@ -121,6 +174,7 @@
+ 		     sizeof(our_query_sin)) >= 0 &&
+ 		connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
+ 			sizeof(rmt_query_sin)) >= 0) {
++#endif
+ 
+ 		/*
+ 		 * Send query to server. Neglect the risk that a 13-byte
+@@ -129,8 +183,13 @@
+ 		 */
+ 
+ 		fprintf(fp, "%u,%u\r\n",
++#ifdef INET6
++			ntohs(((struct sockaddr_in *)rmt_sin)->sin_port),
++			ntohs(((struct sockaddr_in *)our_sin)->sin_port));
++#else
+ 			ntohs(rmt_sin->sin_port),
+ 			ntohs(our_sin->sin_port));
++#endif
+ 		fflush(fp);
+ 
+ 		/*
+@@ -144,8 +203,13 @@
+ 		    && ferror(fp) == 0 && feof(fp) == 0
+ 		    && sscanf(buffer, "%u , %u : USERID :%*[^:]:%255s",
+ 			      &rmt_port, &our_port, user) == 3
++#ifdef INET6
++		    && ntohs(((struct sockaddr_in *)rmt_sin)->sin_port) == rmt_port
++		    && ntohs(((struct sockaddr_in *)our_sin)->sin_port) == our_port) {
++#else
+ 		    && ntohs(rmt_sin->sin_port) == rmt_port
+ 		    && ntohs(our_sin->sin_port) == our_port) {
++#endif
+ 
+ 		    /*
+ 		     * Strip trailing carriage return. It is part of the
+diff -ruN tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
+--- tcp_wrappers_7.6.orig/scaffold.c	1997-03-21 19:27:24.000000000 +0100
++++ tcp_wrappers_7.6/scaffold.c	2004-04-10 19:07:43.000000000 +0200
+@@ -25,7 +25,9 @@
+ #define	INADDR_NONE	(-1)		/* XXX should be 0xffffffff */
+ #endif
+ 
++#ifndef INET6
+ extern char *malloc();
++#endif
+ 
+ /* Application-specific. */
+ 
+@@ -39,6 +41,7 @@
+ int     deny_severity = LOG_WARNING;
+ int     rfc931_timeout = RFC931_TIMEOUT;
+ 
++#ifndef INET6
+ /* dup_hostent - create hostent in one memory block */
+ 
+ static struct hostent *dup_hostent(hp)
+@@ -73,9 +76,46 @@
+     }
+     return (&hb->host);
+ }
++#endif
+ 
+ /* find_inet_addr - find all addresses for this host, result to free() */
+ 
++#ifdef INET6
++struct addrinfo *find_inet_addr(host)
++char   *host;
++{
++    struct addrinfo hints, *res;
++
++    memset(&hints, 0, sizeof(hints));
++    hints.ai_family = PF_UNSPEC;
++    hints.ai_socktype = SOCK_STREAM;
++    hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++    if (getaddrinfo(host, NULL, &hints, &res) == 0)
++	return (res);
++
++    memset(&hints, 0, sizeof(hints));
++    hints.ai_family = PF_UNSPEC;
++    hints.ai_socktype = SOCK_STREAM;
++    hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
++    if (getaddrinfo(host, NULL, &hints, &res) != 0) {
++	tcpd_warn("%s: host not found", host);
++	return (0);
++    }
++    if (res->ai_family != AF_INET6 && res->ai_family != AF_INET) {
++	tcpd_warn("%d: not an internet host", res->ai_family);
++	freeaddrinfo(res);
++	return (0);
++    }
++    if (!res->ai_canonname) {
++	tcpd_warn("%s: hostname alias", host);
++	tcpd_warn("(cannot obtain official name)", res->ai_canonname);
++    } else if (STR_NE(host, res->ai_canonname)) {
++	tcpd_warn("%s: hostname alias", host);
++	tcpd_warn("(official name: %.*s)", STRING_LENGTH, res->ai_canonname);
++    }
++    return (res);
++}
++#else
+ struct hostent *find_inet_addr(host)
+ char   *host;
+ {
+@@ -118,6 +158,7 @@
+     }
+     return (dup_hostent(hp));
+ }
++#endif
+ 
+ /* check_dns - give each address thorough workout, return address count */
+ 
+@@ -125,8 +166,13 @@
+ char   *host;
+ {
+     struct request_info request;
++#ifdef INET6
++    struct sockaddr_storage sin;
++    struct addrinfo *hp, *res;
++#else
+     struct sockaddr_in sin;
+     struct hostent *hp;
++#endif
+     int     count;
+     char   *addr;
+ 
+@@ -134,11 +180,18 @@
+ 	return (0);
+     request_init(&request, RQ_CLIENT_SIN, &sin, 0);
+     sock_methods(&request);
++#ifndef INET6
+     memset((char *) &sin, 0, sizeof(sin));
+     sin.sin_family = AF_INET;
++#endif
+ 
++#ifdef INET6
++    for (res = hp, count = 0; res; res = res->ai_next, count++) {
++	memcpy(&sin, res->ai_addr, res->ai_addrlen);
++#else
+     for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
+ 	memcpy((char *) &sin.sin_addr, addr, sizeof(sin.sin_addr));
++#endif
+ 
+ 	/*
+ 	 * Force host name and address conversions. Use the request structure
+@@ -151,7 +204,11 @@
+ 	    tcpd_warn("host address %s->name lookup failed",
+ 		      eval_hostaddr(request.client));
+     }
++#ifdef INET6
++    freeaddrinfo(hp);
++#else
+     free((char *) hp);
++#endif
+     return (count);
+ }
+ 
+diff -ruN tcp_wrappers_7.6.orig/scaffold.h tcp_wrappers_7.6/scaffold.h
+--- tcp_wrappers_7.6.orig/scaffold.h	1994-12-31 18:19:20.000000000 +0100
++++ tcp_wrappers_7.6/scaffold.h	2004-04-10 19:07:43.000000000 +0200
+@@ -4,6 +4,10 @@
+   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
+   */
+ 
++#ifdef INET6
++extern struct addrinfo *find_inet_addr();
++#else
+ extern struct hostent *find_inet_addr();
++#endif
+ extern int check_dns();
+ extern int check_path();
+diff -ruN tcp_wrappers_7.6.orig/socket.c tcp_wrappers_7.6/socket.c
+--- tcp_wrappers_7.6.orig/socket.c	2004-04-10 19:22:58.000000000 +0200
++++ tcp_wrappers_7.6/socket.c	2004-04-10 19:07:43.000000000 +0200
+@@ -24,13 +24,22 @@
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/socket.h>
++#ifdef INT32_T
++typedef uint32_t u_int32_t;
++#endif
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <stdio.h>
+ #include <syslog.h>
+ #include <string.h>
+ 
++#ifdef INET6
++#ifndef NI_WITHSCOPEID
++#define NI_WITHSCOPEID	0
++#endif
++#else
+ extern char *inet_ntoa();
++#endif
+ 
+ /* Local stuff. */
+ 
+@@ -79,8 +88,13 @@
+ void    sock_host(request)
+ struct request_info *request;
+ {
++#ifdef INET6
++    static struct sockaddr_storage client;
++    static struct sockaddr_storage server;
++#else
+     static struct sockaddr_in client;
+     static struct sockaddr_in server;
++#endif
+     int     len;
+     char    buf[BUFSIZ];
+     int     fd = request->fd;
+@@ -109,7 +123,11 @@
+ 	memset(buf, 0 sizeof(buf));
+ #endif
+     }
++#ifdef INET6
++    request->client->sin = (struct sockaddr *)&client;
++#else
+     request->client->sin = &client;
++#endif
+ 
+     /*
+      * Determine the server binding. This is used for client username
+@@ -122,7 +140,11 @@
+ 	tcpd_warn("getsockname: %m");
+ 	return;
+     }
++#ifdef INET6
++    request->server->sin = (struct sockaddr *)&server;
++#else
+     request->server->sin = &server;
++#endif
+ }
+ 
+ /* sock_hostaddr - map endpoint address to printable form */
+@@ -130,10 +152,26 @@
+ void    sock_hostaddr(host)
+ struct host_info *host;
+ {
++#ifdef INET6
++    struct sockaddr *sin = host->sin;
++    int salen;
++
++    if (!sin)
++	return;
++#ifdef SIN6_LEN
++    salen = sin->sa_len;
++#else
++    salen = (sin->sa_family == AF_INET) ? sizeof(struct sockaddr_in)
++					: sizeof(struct sockaddr_in6);
++#endif
++    getnameinfo(sin, salen, host->addr, sizeof(host->addr),
++		NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
+     struct sockaddr_in *sin = host->sin;
+ 
+     if (sin != 0)
+ 	STRN_CPY(host->addr, inet_ntoa(sin->sin_addr), sizeof(host->addr));
++#endif
+ }
+ 
+ /* sock_hostname - map endpoint address to host name */
+@@ -141,6 +179,160 @@
+ void    sock_hostname(host)
+ struct host_info *host;
+ {
++#ifdef INET6
++    struct sockaddr *sin = host->sin;
++    struct sockaddr_in sin4;
++    struct addrinfo hints, *res, *res0 = NULL;
++    int salen, alen, err = 1;
++    char *ap = NULL, *rap, hname[NI_MAXHOST];
++
++    if (sin != NULL) {
++	if (sin->sa_family == AF_INET6) {
++	    struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sin;
++
++	    if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
++		memset(&sin4, 0, sizeof(sin4));
++#ifdef SIN6_LEN
++		sin4.sin_len = sizeof(sin4);
++#endif
++		sin4.sin_family = AF_INET;
++		sin4.sin_port = sin6->sin6_port;
++		sin4.sin_addr.s_addr = *(u_int32_t *)&sin6->sin6_addr.s6_addr[12];
++		sin = (struct sockaddr *)&sin4;
++	    }
++	}
++	switch (sin->sa_family) {
++	case AF_INET:
++	    ap = (char *)&((struct sockaddr_in *)sin)->sin_addr;
++	    alen = sizeof(struct in_addr);
++	    salen = sizeof(struct sockaddr_in);
++	    break;
++	case AF_INET6:
++	    ap = (char *)&((struct sockaddr_in6 *)sin)->sin6_addr;
++	    alen = sizeof(struct in6_addr);
++	    salen = sizeof(struct sockaddr_in6);
++	    break;
++	default:
++	    break;
++	}
++	if (ap)
++	    err = getnameinfo(sin, salen, hname, sizeof(hname),
++			      NULL, 0, NI_WITHSCOPEID | NI_NAMEREQD);
++    }
++    if (!err) {
++
++	STRN_CPY(host->name, hname, sizeof(host->name));
++
++	/* reject numeric addresses */
++	memset(&hints, 0, sizeof(hints));
++	hints.ai_family = sin->sa_family;
++	hints.ai_socktype = SOCK_STREAM;
++	hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
++	if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
++	    freeaddrinfo(res0);
++	    res0 = NULL;
++	    tcpd_warn("host name/name mismatch: "
++		      "reverse lookup results in non-FQDN %s",
++		      host->name);
++	    strcpy(host->name, paranoid);	/* name is bad, clobber it */
++	}
++	err = !err;
++    }
++    if (!err) {
++	/* we are now sure that this is non-numeric */
++
++	/*
++	 * Verify that the address is a member of the address list returned
++	 * by gethostbyname(hostname).
++	 * 
++	 * Verify also that gethostbyaddr() and gethostbyname() return the same
++	 * hostname, or rshd and rlogind may still end up being spoofed.
++	 * 
++	 * On some sites, gethostbyname("localhost") returns "localhost.domain".
++	 * This is a DNS artefact. We treat it as a special case. When we
++	 * can't believe the address list from gethostbyname("localhost")
++	 * we're in big trouble anyway.
++	 */
++
++	memset(&hints, 0, sizeof(hints));
++	hints.ai_family = sin->sa_family;
++	hints.ai_socktype = SOCK_STREAM;
++	hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
++	if (getaddrinfo(host->name, NULL, &hints, &res0) != 0) {
++
++	    /*
++	     * Unable to verify that the host name matches the address. This
++	     * may be a transient problem or a botched name server setup.
++	     */
++
++	    tcpd_warn("can't verify hostname: getaddrinfo(%s, %s) failed",
++		      host->name,
++		      (sin->sa_family == AF_INET) ? "AF_INET" : "AF_INET6");
++
++	} else if ((res0->ai_canonname == NULL
++		    || STR_NE(host->name, res0->ai_canonname))
++		   && STR_NE(host->name, "localhost")) {
++
++	    /*
++	     * The gethostbyaddr() and gethostbyname() calls did not return
++	     * the same hostname. This could be a nameserver configuration
++	     * problem. It could also be that someone is trying to spoof us.
++	     */
++
++	    tcpd_warn("host name/name mismatch: %s != %.*s",
++		      host->name, STRING_LENGTH,
++		      (res0->ai_canonname == NULL) ? "" : res0->ai_canonname);
++
++	} else {
++
++	    /*
++	     * The address should be a member of the address list returned by
++	     * gethostbyname(). We should first verify that the h_addrtype
++	     * field is AF_INET, but this program has already caused too much
++	     * grief on systems with broken library code.
++	     */
++
++	    for (res = res0; res; res = res->ai_next) {
++		if (res->ai_family != sin->sa_family)
++		    continue;
++		switch (res->ai_family) {
++		case AF_INET:
++		    rap = (char *)&((struct sockaddr_in *)res->ai_addr)->sin_addr;
++		    break;
++		case AF_INET6:
++		    /* need to check scope_id */
++		    if (((struct sockaddr_in6 *)sin)->sin6_scope_id !=
++		        ((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id) {
++			continue;
++		    }
++		    rap = (char *)&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr;
++		    break;
++		default:
++		    continue;
++		}
++		if (memcmp(rap, ap, alen) == 0) {
++		    freeaddrinfo(res0);
++		    return;			/* name is good, keep it */
++		}
++	    }
++
++	    /*
++	     * The host name does not map to the initial address. Perhaps
++	     * someone has messed up. Perhaps someone compromised a name
++	     * server.
++	     */
++
++	    getnameinfo(sin, salen, hname, sizeof(hname),
++			NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++	    tcpd_warn("host name/address mismatch: %s != %.*s",
++		      hname, STRING_LENGTH,
++		      (res0->ai_canonname == NULL) ? "" : res0->ai_canonname);
++	}
++	strcpy(host->name, paranoid);		/* name is bad, clobber it */
++	if (res0)
++	    freeaddrinfo(res0);
++    }
++#else /* INET6 */
+     struct sockaddr_in *sin = host->sin;
+     struct hostent *hp;
+     int     i;
+@@ -220,6 +412,7 @@
+ 	}
+ 	strcpy(host->name, paranoid);		/* name is bad, clobber it */
+     }
++#endif /* INET6 */
+ }
+ 
+ /* sock_sink - absorb unreceived IP datagram */
+@@ -228,7 +421,11 @@
+ int     fd;
+ {
+     char    buf[BUFSIZ];
++#ifdef INET6
++    struct sockaddr_storage sin;
++#else
+     struct sockaddr_in sin;
++#endif
+     int     size = sizeof(sin);
+ 
+     /*
+diff -ruN tcp_wrappers_7.6.orig/tcpd.c tcp_wrappers_7.6/tcpd.c
+--- tcp_wrappers_7.6.orig/tcpd.c	1996-02-11 17:01:33.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.c	2004-04-10 19:07:43.000000000 +0200
+@@ -120,7 +120,12 @@
+ 
+     /* Report request and invoke the real daemon program. */
+ 
++#ifdef INET6
++    syslog(allow_severity, "connect from %s (%s)",
++	   eval_client(&request), eval_hostaddr(request.client));
++#else
+     syslog(allow_severity, "connect from %s", eval_client(&request));
++#endif
+     closelog();
+     (void) execv(path, argv);
+     syslog(LOG_ERR, "error: cannot execute %s: %m", path);
+diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c	1997-02-12 02:13:25.000000000 +0100
++++ tcp_wrappers_7.6/tcpdchk.c	2004-04-10 19:07:43.000000000 +0200
+@@ -22,6 +22,9 @@
+ 
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#ifdef INET6
++#include <sys/socket.h>
++#endif
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
+@@ -397,6 +400,31 @@
+     }
+ }
+ 
++#ifdef INET6
++static int is_inet6_addr(pat)
++    char *pat;
++{
++    struct addrinfo hints, *res;
++    int len, ret;
++    char ch;
++
++    if (*pat != '[')
++	return (0);
++    len = strlen(pat);
++    if ((ch = pat[len - 1]) != ']')
++	return (0);
++    pat[len - 1] = '\0';
++    memset(&hints, 0, sizeof(hints));
++    hints.ai_family = AF_INET6;
++    hints.ai_socktype = SOCK_STREAM;
++    hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++    if ((ret = getaddrinfo(pat + 1, NULL, &hints, &res)) == 0)
++	freeaddrinfo(res);
++    pat[len - 1] = ch;
++    return (ret == 0);
++}
++#endif
++
+ /* check_host - criticize host pattern */
+ 
+ static int check_host(pat)
+@@ -423,14 +451,27 @@
+ #endif
+ #endif
+     } else if (mask = split_at(pat, '/')) {	/* network/netmask */
++#ifdef INET6
++	int mask_len;
++
++	if ((dot_quad_addr(pat) == INADDR_NONE
++	    || dot_quad_addr(mask) == INADDR_NONE)
++	    && (!is_inet6_addr(pat)
++		|| ((mask_len = atoi(mask)) < 0 || mask_len > 128)))
++#else
+ 	if (dot_quad_addr(pat) == INADDR_NONE
+ 	    || dot_quad_addr(mask) == INADDR_NONE)
++#endif
+ 	    tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
+     } else if (STR_EQ(pat, "FAIL")) {		/* obsolete */
+ 	tcpd_warn("FAIL is no longer recognized");
+ 	tcpd_warn("(use EXCEPT or DENY instead)");
+     } else if (reserved_name(pat)) {		/* other reserved */
+ 	 /* void */ ;
++#ifdef INET6
++    } else if (is_inet6_addr(pat)) { /* IPv6 address */
++	addr_count = 1;
++#endif
+     } else if (NOT_INADDR(pat)) {		/* internet name */
+ 	if (pat[strlen(pat) - 1] == '.') {
+ 	    tcpd_warn("%s: domain or host name ends in dot", pat);
+diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h	1996-03-19 16:22:25.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.h	2004-04-10 19:07:43.000000000 +0200
+@@ -11,7 +11,11 @@
+ struct host_info {
+     char    name[STRING_LENGTH];	/* access via eval_hostname(host) */
+     char    addr[STRING_LENGTH];	/* access via eval_hostaddr(host) */
++#ifdef INET6
++    struct sockaddr *sin;		/* socket address or 0 */
++#else
+     struct sockaddr_in *sin;		/* socket address or 0 */
++#endif
+     struct t_unitdata *unit;		/* TLI transport address or 0 */
+     struct request_info *request;	/* for shared information */
+ };
+diff -ruN tcp_wrappers_7.6.orig/tcpdmatch.c tcp_wrappers_7.6/tcpdmatch.c
+--- tcp_wrappers_7.6.orig/tcpdmatch.c	1996-02-11 17:01:36.000000000 +0100
++++ tcp_wrappers_7.6/tcpdmatch.c	2004-04-10 19:07:43.000000000 +0200
+@@ -57,7 +57,11 @@
+ int     argc;
+ char  **argv;
+ {
++#ifdef INET6
++    struct addrinfo hints, *hp, *res;
++#else
+     struct hostent *hp;
++#endif
+     char   *myname = argv[0];
+     char   *client;
+     char   *server;
+@@ -68,8 +72,13 @@
+     int     ch;
+     char   *inetcf = 0;
+     int     count;
++#ifdef INET6
++    struct sockaddr_storage server_sin;
++    struct sockaddr_storage client_sin;
++#else
+     struct sockaddr_in server_sin;
+     struct sockaddr_in client_sin;
++#endif
+     struct stat st;
+ 
+     /*
+@@ -172,13 +181,20 @@
+     if (NOT_INADDR(server) == 0 || HOSTNAME_KNOWN(server)) {
+ 	if ((hp = find_inet_addr(server)) == 0)
+ 	    exit(1);
++#ifndef INET6
+ 	memset((char *) &server_sin, 0, sizeof(server_sin));
+ 	server_sin.sin_family = AF_INET;
++#endif
+ 	request_set(&request, RQ_SERVER_SIN, &server_sin, 0);
+ 
++#ifdef INET6
++	for (res = hp, count = 0; res; res = res->ai_next, count++) {
++	    memcpy(&server_sin, res->ai_addr, res->ai_addrlen);
++#else
+ 	for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
+ 	    memcpy((char *) &server_sin.sin_addr, addr,
+ 		   sizeof(server_sin.sin_addr));
++#endif
+ 
+ 	    /*
+ 	     * Force evaluation of server host name and address. Host name
+@@ -194,7 +210,11 @@
+ 	    fprintf(stderr, "Please specify an address instead\n");
+ 	    exit(1);
+ 	}
++#ifdef INET6
++	freeaddrinfo(hp);
++#else
+ 	free((char *) hp);
++#endif
+     } else {
+ 	request_set(&request, RQ_SERVER_NAME, server, 0);
+     }
+@@ -208,6 +228,18 @@
+ 	tcpdmatch(&request);
+ 	exit(0);
+     }
++#ifdef INET6
++    memset(&hints, 0, sizeof(hints));
++    hints.ai_family = AF_INET6;
++    hints.ai_socktype = SOCK_STREAM;
++    hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
++    if (getaddrinfo(client, NULL, &hints, &res) == 0) {
++	freeaddrinfo(res);
++	request_set(&request, RQ_CLIENT_ADDR, client, 0);
++	tcpdmatch(&request);
++	exit(0);
++    }
++#endif
+ 
+     /*
+      * Perhaps they are testing special client hostname patterns that aren't
+@@ -229,6 +261,34 @@
+      */
+     if ((hp = find_inet_addr(client)) == 0)
+ 	exit(1);
++#ifdef INET6
++    request_set(&request, RQ_CLIENT_SIN, &client_sin, 0);
++
++    for (res = hp, count = 0; res; res = res->ai_next, count++) {
++	memcpy(&client_sin, res->ai_addr, res->ai_addrlen);
++
++	/*
++	 * getnameinfo() doesn't do reverse lookup against link-local
++	 * address.  So, we pass through host name evaluation against
++	 * such addresses.
++	 */
++	if (res->ai_family != AF_INET6 ||
++	    !IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)res->ai_addr)->sin6_addr)) {
++	    /*
++	     * Force evaluation of client host name and address. Host name
++	     * conflicts will be reported while eval_hostname() does its job.
++	     */
++	    request_set(&request, RQ_CLIENT_NAME, "", RQ_CLIENT_ADDR, "", 0);
++	    if (STR_EQ(eval_hostname(request.client), unknown))
++		tcpd_warn("host address %s->name lookup failed",
++			  eval_hostaddr(request.client));
++	}
++	tcpdmatch(&request);
++	if (res->ai_next)
++	    printf("\n");
++    }
++    freeaddrinfo(hp);
++#else
+     memset((char *) &client_sin, 0, sizeof(client_sin));
+     client_sin.sin_family = AF_INET;
+     request_set(&request, RQ_CLIENT_SIN, &client_sin, 0);
+@@ -250,6 +310,7 @@
+ 	    printf("\n");
+     }
+     free((char *) hp);
++#endif
+     exit(0);
+ }
+ 
+diff -ruN tcp_wrappers_7.6.orig/tli.c tcp_wrappers_7.6/tli.c
+--- tcp_wrappers_7.6.orig/tli.c	1997-03-21 19:27:26.000000000 +0100
++++ tcp_wrappers_7.6/tli.c	2004-04-10 19:07:43.000000000 +0200
+@@ -65,8 +65,13 @@
+ void    tli_host(request)
+ struct request_info *request;
+ {
++#ifdef INET6
++    static struct sockaddr_storage client;
++    static struct sockaddr_storage server;
++#else
+     static struct sockaddr_in client;
+     static struct sockaddr_in server;
++#endif
+ 
+     /*
+      * If we discover that we are using an IP transport, pretend we never
+@@ -76,14 +81,29 @@
+ 
+     tli_endpoints(request);
+     if ((request->config = tli_transport(request->fd)) != 0
++#ifdef INET6
++	&& (STR_EQ(request->config->nc_protofmly, "inet") ||
++	    STR_EQ(request->config->nc_protofmly, "inet6"))) {
++#else
+ 	&& STR_EQ(request->config->nc_protofmly, "inet")) {
++#endif
+ 	if (request->client->unit != 0) {
++#ifdef INET6
++	    client = *(struct sockaddr_storage *) request->client->unit->addr.buf;
++	    request->client->sin = (struct sockaddr *) &client;
++#else
+ 	    client = *(struct sockaddr_in *) request->client->unit->addr.buf;
+ 	    request->client->sin = &client;
++#endif
+ 	}
+ 	if (request->server->unit != 0) {
++#ifdef INET6
++	    server = *(struct sockaddr_storage *) request->server->unit->addr.buf;
++	    request->server->sin = (struct sockaddr *) &server;
++#else
+ 	    server = *(struct sockaddr_in *) request->server->unit->addr.buf;
+ 	    request->server->sin = &server;
++#endif
+ 	}
+ 	tli_cleanup(request);
+ 	sock_methods(request);
+@@ -187,7 +207,15 @@
+     }
+     while (config = getnetconfig(handlep)) {
+ 	if (stat(config->nc_device, &from_config) == 0) {
++#ifdef NO_CLONE_DEVICE
++	/*
++	 * If the network devices are not cloned (as is the case for
++	 * Solaris 8 Beta), we must compare the major device numbers.
++	 */
++	    if (major(from_config.st_rdev) == major(from_client.st_rdev))
++#else
+ 	    if (minor(from_config.st_rdev) == major(from_client.st_rdev))
++#endif
+ 		break;
+ 	}
+     }
+diff -ruN tcp_wrappers_7.6.orig/update.c tcp_wrappers_7.6/update.c
+--- tcp_wrappers_7.6.orig/update.c	1994-12-28 17:42:56.000000000 +0100
++++ tcp_wrappers_7.6/update.c	2004-04-10 19:07:43.000000000 +0200
+@@ -46,10 +46,18 @@
+ 	    request->fd = va_arg(ap, int);
+ 	    continue;
+ 	case RQ_CLIENT_SIN:
++#ifdef INET6
++	    request->client->sin = va_arg(ap, struct sockaddr *);
++#else
+ 	    request->client->sin = va_arg(ap, struct sockaddr_in *);
++#endif
+ 	    continue;
+ 	case RQ_SERVER_SIN:
++#ifdef INET6
++	    request->server->sin = va_arg(ap, struct sockaddr *);
++#else
+ 	    request->server->sin = va_arg(ap, struct sockaddr_in *);
++#endif
+ 	    continue;
+ 
+ 	    /*
+diff -ruN tcp_wrappers_7.6.orig/workarounds.c tcp_wrappers_7.6/workarounds.c
+--- tcp_wrappers_7.6.orig/workarounds.c	1996-03-19 16:22:26.000000000 +0100
++++ tcp_wrappers_7.6/workarounds.c	2004-04-10 19:07:43.000000000 +0200
+@@ -166,11 +166,22 @@
+ int    *len;
+ {
+     int     ret;
++#ifdef INET6
++    struct sockaddr *sin = sa;
++#else
+     struct sockaddr_in *sin = (struct sockaddr_in *) sa;
++#endif
+ 
+     if ((ret = getpeername(sock, sa, len)) >= 0
++#ifdef INET6
++	&& ((sin->su_si.si_family == AF_INET6
++	     && IN6_IS_ADDR_UNSPECIFIED(&sin->su_sin6.sin6_addr))
++	    || (sin->su_si.si_family == AF_INET
++		&& sin->su_sin.sin_addr.s_addr == 0))) {
++#else
+ 	&& sa->sa_family == AF_INET
+ 	&& sin->sin_addr.s_addr == 0) {
++#endif
+ 	errno = ENOTCONN;
+ 	return (-1);
+     } else {
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch
new file mode 100644
index 0000000..226106f
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_tcpd_blacklist.patch
@@ -0,0 +1,153 @@
+Upstream-Status: Backport
+
+Path: news.porcupine.org!news.porcupine.org!not-for-mail
+From: Wietse Venema <wietse@((no)(spam)(please))wzv.win.tue.nl>
+Newsgroups: comp.mail.sendmail,comp.security.unix
+Subject: TCP Wrapper Blacklist Extension
+Followup-To: poster
+Date: 8 Sep 1997 18:53:13 -0400
+Organization: Wietse's hangout while on sabattical in the USA
+Lines: 147
+Sender: wietse@spike.porcupine.org
+Message-ID: <5v1vkp$h4f$1@spike.porcupine.org>
+NNTP-Posting-Host: spike.porcupine.org
+Xref: news.porcupine.org comp.mail.sendmail:3541 comp.security.unix:7158
+
+The patch below adds a new host pattern to the TCP Wrapper access
+control language. Instead of a host name or address pattern, you
+can specify an external /file/name with host name or address
+patterns.   The feature can be used recursively.
+
+The /file/name extension makes it easy to blacklist bad sites, for
+example, to block unwanted electronic mail when libwrap is linked
+into sendmail.  Adding hosts to a simple text file is much easier
+than having to edit a more complex hosts.allow/deny file.
+
+I developed this a year or so ago as a substitute for NIS netgroups.
+At that time, I did not consider it of sufficient interest for
+inclusion in the TCP Wrapper distribution. How times have changed.
+
+The patch is relative to TCP Wrappers version 7.6. The main archive
+site is ftp://ftp.win.tue.nl/pub/security/tcp_wrappers_7.6.tar.gz
+
+Thanks to the Debian LINUX folks for expressing their interest in
+this patch.
+
+	Wietse
+
+
+[diff updated by Md]
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5	2004-04-10 19:28:09.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5	2004-04-10 19:28:01.000000000 +0200
+@@ -97,6 +97,13 @@
+ `[3ffe:505:2:1::]/64\' matches every address in the range
+ `3ffe:505:2:1::\' through `3ffe:505:2:1:ffff:ffff:ffff:ffff\'.
+ .IP \(bu
++A string that begins with a `/\' character is treated as a file
++name. A host name or address is matched if it matches any host name
++or address pattern listed in the named file. The file format is
++zero or more lines with zero or more host name or address patterns
++separated by whitespace.  A file name pattern can be used anywhere
++a host name or address pattern can be used.
++.IP \(bu
+ Wildcards `*\' and `?\' can be used to match hostnames or IP addresses.  This
+ method of matching cannot be used in conjunction with `net/mask\' matching,
+ hostname matching beginning with `.\' or IP address matching ending with `.\'.
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c	2004-04-10 19:28:09.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.c	2004-04-10 19:27:05.000000000 +0200
+@@ -253,6 +253,26 @@
+     }
+ }
+ 
++/* hostfile_match - look up host patterns from file */
++
++static int hostfile_match(path, host)
++char   *path;
++struct hosts_info *host;
++{
++    char    tok[BUFSIZ];
++    int     match = NO;
++    FILE   *fp;
++
++    if ((fp = fopen(path, "r")) != 0) {
++	while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host)))
++	     /* void */ ;
++	fclose(fp);
++    } else if (errno != ENOENT) {
++	tcpd_warn("open %s: %m", path);
++    }
++    return (match);
++}
++
+ /* host_match - match host name and/or address against pattern */
+ 
+ static int host_match(tok, host)
+@@ -280,6 +300,8 @@
+ 	tcpd_warn("netgroup support is disabled");	/* not tcpd_jump() */
+ 	return (NO);
+ #endif
++    } else if (tok[0] == '/') {			/* /file hack */
++	return (hostfile_match(tok, host));
+     } else if (STR_EQ(tok, "KNOWN")) {		/* check address and name */
+ 	char   *name = eval_hostname(host);
+ 	return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name));
+diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c	2004-04-10 19:28:09.000000000 +0200
++++ tcp_wrappers_7.6/tcpdchk.c	2004-04-10 19:27:05.000000000 +0200
+@@ -353,6 +353,8 @@
+ {
+     if (pat[0] == '@') {
+ 	tcpd_warn("%s: daemon name begins with \"@\"", pat);
++    } else if (pat[0] == '/') {
++	tcpd_warn("%s: daemon name begins with \"/\"", pat);
+     } else if (pat[0] == '.') {
+ 	tcpd_warn("%s: daemon name begins with dot", pat);
+     } else if (pat[strlen(pat) - 1] == '.') {
+@@ -385,6 +387,8 @@
+ {
+     if (pat[0] == '@') {			/* @netgroup */
+ 	tcpd_warn("%s: user name begins with \"@\"", pat);
++    } else if (pat[0] == '/') {
++	tcpd_warn("%s: user name begins with \"/\"", pat);
+     } else if (pat[0] == '.') {
+ 	tcpd_warn("%s: user name begins with dot", pat);
+     } else if (pat[strlen(pat) - 1] == '.') {
+@@ -430,8 +434,13 @@
+ static int check_host(pat)
+ char   *pat;
+ {
++    char    buf[BUFSIZ];
+     char   *mask;
+     int     addr_count = 1;
++    FILE   *fp;
++    struct tcpd_context saved_context;
++    char   *cp;
++    char   *wsp = " \t\r\n";
+ 
+     if (pat[0] == '@') {			/* @netgroup */
+ #ifdef NO_NETGRENT
+@@ -450,6 +459,21 @@
+ 	tcpd_warn("netgroup support disabled");
+ #endif
+ #endif
++    } else if (pat[0] == '/') {			/* /path/name */
++	if ((fp = fopen(pat, "r")) != 0) {
++	    saved_context = tcpd_context;
++	    tcpd_context.file = pat;
++	    tcpd_context.line = 0;
++	    while (fgets(buf, sizeof(buf), fp)) {
++		tcpd_context.line++;
++		for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp))
++		    check_host(cp);
++	    }
++	    tcpd_context = saved_context;
++	    fclose(fp);
++	} else if (errno != ENOENT) {
++	    tcpd_warn("open %s: %m", pat);
++	}
+     } else if (mask = split_at(pat, '/')) {	/* network/netmask */
+ #ifdef INET6
+ 	int mask_len;
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch
new file mode 100644
index 0000000..260e8d3
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/11_usagi_fix.patch
@@ -0,0 +1,47 @@
+Upstream-Status: Backport
+
+diff -uN tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.new/hosts_access.c
+--- tcp_wrappers_7.6/hosts_access.c	Mon May 20 14:00:56 2002
++++ tcp_wrappers_7.6.new/hosts_access.c	Mon May 20 14:25:05 2002
+@@ -448,6 +448,15 @@
+     int len, mask_len, i = 0;
+     char ch;
+ 
++    /*
++     * Behavior of getaddrinfo() against IPv4-mapped IPv6 address is
++     * different between KAME and Solaris8.  While KAME returns
++     * AF_INET6, Solaris8 returns AF_INET.  So, we avoid this here.
++     */
++    if (STRN_EQ(string, "::ffff:", 7)
++	&& dot_quad_addr(string + 7) != INADDR_NONE)
++	return (masked_match4(net_tok, mask_tok, string + 7));
++
+     memset(&hints, 0, sizeof(hints));
+     hints.ai_family = AF_INET6;
+     hints.ai_socktype = SOCK_STREAM;
+@@ -457,13 +466,6 @@
+     memcpy(&addr, res->ai_addr, sizeof(addr));
+     freeaddrinfo(res);
+ 
+-    if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
+-	if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
+-	 || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
+-	    return (NO);
+-	return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
+-    }
+-
+     /* match IPv6 address against netnumber/prefixlen */
+     len = strlen(net_tok);
+     if (*net_tok != '[' || net_tok[len - 1] != ']')
+diff -uN tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.new/socket.c
+--- tcp_wrappers_7.6/socket.c	Mon May 20 13:48:35 2002
++++ tcp_wrappers_7.6.new/socket.c	Mon May 20 14:22:27 2002
+@@ -228,7 +228,7 @@
+ 	hints.ai_family = sin->sa_family;
+ 	hints.ai_socktype = SOCK_STREAM;
+ 	hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
+-	if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
++	if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) {
+ 	    freeaddrinfo(res0);
+ 	    res0 = NULL;
+ 	    tcpd_warn("host name/name mismatch: "
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
new file mode 100644
index 0000000..e8289e4
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/12_makefile_config.patch
@@ -0,0 +1,83 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
+--- tcp_wrappers_7.6.orig/Makefile	2003-08-21 01:43:39.000000000 +0200
++++ tcp_wrappers_7.6/Makefile	2003-08-21 01:43:35.000000000 +0200
+@@ -45,7 +45,7 @@
+ #
+ # SysV.4 Solaris 2.x OSF AIX
+ #REAL_DAEMON_DIR=/usr/sbin
+-#
++REAL_DAEMON_DIR=/usr/sbin
+ # BSD 4.4
+ #REAL_DAEMON_DIR=/usr/libexec
+ #
+@@ -512,6 +519,7 @@
+ # (examples: allow, deny, banners, twist and spawn).
+ # 
+ #STYLE	= -DPROCESS_OPTIONS	# Enable language extensions.
++STYLE = -DPROCESS_OPTIONS
+ 
+ ################################################################
+ # Optional: Changing the default disposition of logfile records
+@@ -535,6 +543,7 @@
+ # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
+ 
+ FACILITY= LOG_MAIL	# LOG_MAIL is what most sendmail daemons use
++FACILITY= LOG_DAEMON
+ 
+ # The syslog priority at which successful connections are logged.
+ 
+@@ -631,6 +640,7 @@
+ # lookups altogether, see the next section.
+ 
+ PARANOID= -DPARANOID
++PARANOID=
+ 
+ ########################################
+ # Optional: turning off hostname lookups
+@@ -644,6 +654,7 @@
+ # mode (see previous section) and comment out the following definition.
+ 
+ HOSTNAME= -DALWAYS_HOSTNAME
++HOSTNAME=
+ 
+ #############################################
+ # Optional: Turning on host ADDRESS checking
+@@ -670,6 +681,7 @@
+ # Solaris 2.x, and Linux. See your system documentation for details.
+ #
+ # KILL_OPT= -DKILL_IP_OPTIONS
++KILL_OPT= -DKILL_IP_OPTIONS
+ 
+ ## End configuration options
+ ############################
+@@ -677,9 +689,10 @@
+ # Protection against weird shells or weird make programs.
+ 
+ SHELL	= /bin/sh
+-.c.o:;	$(CC) $(CFLAGS) -c $*.c
++.c.o:;	$(CC) $(CFLAGS) -o $*.o -c $*.c
+ 
+-CFLAGS	= -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
++COPTS	= -O2 -g
++CFLAGS	= $(COPTS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
+ 	$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
+ 	-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
+ 	-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
+@@ -712,10 +725,11 @@
+ 
+ config-check:
+ 	@set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
+-	@set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \
+-	if cmp cflags /tmp/cflags.$$$$ ; \
+-	then rm /tmp/cflags.$$$$ ; \
+-	else mv /tmp/cflags.$$$$ cflags ; \
++	@set +e; echo $(CFLAGS) >cflags.new ; \
++	if cmp cflags cflags.new ; \
++	then rm cflags.new ; \
++	else mv cflags.new cflags ; \
+ 	fi >/dev/null 2>/dev/null
++	@if [ ! -d shared ]; then mkdir shared; fi
+ 
+ $(LIB):	$(LIB_OBJ)
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch
new file mode 100644
index 0000000..bd1396b
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/13_shlib_weaksym.patch
@@ -0,0 +1,255 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/Makefile tcp_wrappers_7.6/Makefile
+--- tcp_wrappers_7.6.orig/Makefile	2004-05-02 15:37:59.000000000 +0200
++++ tcp_wrappers_7.6/Makefile	2004-05-02 15:31:09.000000000 +0200
+@@ -150,15 +150,15 @@
+ 
+ linux:
+ 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+-	LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
++	LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
+ 	NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
+-	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
++	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
+ 
+ gnu:
+ 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+-	LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ= \
++	LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
+ 	NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= \
+-	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR" all
++	EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT" all
+ 
+ # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
+ hpux hpux8 hpux9 hpux10:
+@@ -713,7 +713,22 @@
+ 
+ LIB	= libwrap.a
+ 
+-all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
++shared/%.o: %.c
++	$(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
++
++SOMAJOR = 0
++SOMINOR = 7.6
++
++SHLIB		= shared/libwrap.so.$(SOMAJOR).$(SOMINOR)
++SHLIBSOMAJ	= shared/libwrap.so.$(SOMAJOR)
++SHLIBSO		= shared/libwrap.so
++SHLIBFLAGS	= -Lshared -lwrap
++
++SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS)
++SHCFLAGS = -fPIC -shared -D_REENTRANT
++SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ));
++
++all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB)
+ 
+ # Invalidate all object files when the compiler options (CFLAGS) have changed.
+ 
+@@ -731,27 +746,33 @@
+ 	$(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ)
+ 	-$(RANLIB) $(LIB)
+ 
+-tcpd:	tcpd.o $(LIB)
+-	$(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS)
++$(SHLIB): $(SHLIB_OBJ)
++	rm -f $(SHLIB)
++	$(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
++	ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
++	ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
++
++tcpd:	tcpd.o $(SHLIB)
++	$(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
+ 
+ miscd:	miscd.o $(LIB)
+ 	$(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
+ 
+-safe_finger: safe_finger.o $(LIB)
+-	$(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS)
++safe_finger: safe_finger.o $(SHLIB)
++	$(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
+ 
+ TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
+ 
+-tcpdmatch: $(TCPDMATCH_OBJ) $(LIB)
+-	$(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS)
++tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
++	$(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
+ 
+-try-from: try-from.o fakelog.o $(LIB)
+-	$(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS)
++try-from: try-from.o fakelog.o $(SHLIB)
++	$(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
+ 
+ TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
+ 
+-tcpdchk: $(TCPDCHK_OBJ) $(LIB)
+-	$(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS)
++tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
++	$(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
+ 
+ shar:	$(KIT)
+ 	@shar $(KIT)
+@@ -767,7 +788,9 @@
+ 
+ clean:
+ 	rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \
++	libwrap*.so* \
+ 	cflags
++	rm -rf shared/
+ 
+ tidy:	clean
+ 	chmod -R a+r .
+@@ -913,5 +936,6 @@
+ update.o: mystdarg.h
+ update.o: tcpd.h
+ vfprintf.o: cflags
++weak_symbols.o: tcpd.h
+ workarounds.o: cflags
+ workarounds.o: tcpd.h
+diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h	2004-05-02 15:37:59.000000000 +0200
++++ tcp_wrappers_7.6/tcpd.h	2004-05-02 15:37:49.000000000 +0200
+@@ -4,6 +4,15 @@
+   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
+   */
+ 
++#ifndef _TCPWRAPPERS_TCPD_H
++#define _TCPWRAPPERS_TCPD_H
++
++/* Need definitions of struct sockaddr_in and FILE. */
++#include <netinet/in.h>
++#include <stdio.h>
++
++__BEGIN_DECLS
++
+ /* Structure to describe one communications endpoint. */
+ 
+ #define STRING_LENGTH	128		/* hosts, users, processes */
+@@ -29,10 +38,10 @@
+     char    pid[10];			/* access via eval_pid(request) */
+     struct host_info client[1];		/* client endpoint info */
+     struct host_info server[1];		/* server endpoint info */
+-    void  (*sink) ();			/* datagram sink function or 0 */
+-    void  (*hostname) ();		/* address to printable hostname */
+-    void  (*hostaddr) ();		/* address to printable address */
+-    void  (*cleanup) ();		/* cleanup function or 0 */
++    void  (*sink) (int);		/* datagram sink function or 0 */
++    void  (*hostname) (struct host_info *); /* address to printable hostname */
++    void  (*hostaddr) (struct host_info *); /* address to printable address */
++    void  (*cleanup) (struct request_info *); /* cleanup function or 0 */
+     struct netconfig *config;		/* netdir handle */
+ };
+ 
+@@ -70,20 +79,27 @@
+ #define fromhost sock_host		/* no TLI support needed */
+ #endif
+ 
+-extern int hosts_access();		/* access control */
+-extern void shell_cmd();		/* execute shell command */
+-extern char *percent_x();		/* do %<char> expansion */
+-extern void rfc931();			/* client name from RFC 931 daemon */
+-extern void clean_exit();		/* clean up and exit */
+-extern void refuse();			/* clean up and exit */
+-extern char *xgets();			/* fgets() on steroids */
+-extern char *split_at();		/* strchr() and split */
+-extern unsigned long dot_quad_addr();	/* restricted inet_addr() */
++extern int hosts_access(struct request_info *request);	/* access control */
++extern void shell_cmd(char *);		/* execute shell command */
++extern char *percent_x(char *, int, char *, struct request_info *);
++					/* do %<char> expansion */
++extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
++					/* client name from RFC 931 daemon */
++extern void clean_exit(struct request_info *);	/* clean up and exit */
++extern void refuse(struct request_info *);	/* clean up and exit */
++extern char *xgets(char *, int, FILE *);	/* fgets() on steroids */
++extern char *split_at(char *, int);		/* strchr() and split */
++extern unsigned long dot_quad_addr(char *);	/* restricted inet_addr() */
+ 
+ /* Global variables. */
+ 
++#ifdef HAVE_WEAKSYMS
++extern int allow_severity __attribute__ ((weak)); /* for connection logging */
++extern int deny_severity __attribute__ ((weak)); /* for connection logging */
++#else
+ extern int allow_severity;		/* for connection logging */
+ extern int deny_severity;		/* for connection logging */
++#endif
+ extern char *hosts_allow_table;		/* for verification mode redirection */
+ extern char *hosts_deny_table;		/* for verification mode redirection */
+ extern int hosts_access_verbose;	/* for verbose matching mode */
+@@ -98,6 +114,8 @@
+ #ifdef __STDC__
+ extern struct request_info *request_init(struct request_info *,...);
+ extern struct request_info *request_set(struct request_info *,...);
++extern int hosts_ctl(char *daemon, char *client_name, char *client_addr,
++		char *client_user);
+ #else
+ extern struct request_info *request_init();	/* initialize request */
+ extern struct request_info *request_set();	/* update request structure */
+@@ -121,20 +139,23 @@
+   * host_info structures serve as caches for the lookup results.
+   */
+ 
+-extern char *eval_user();		/* client user */
+-extern char *eval_hostname();		/* printable hostname */
+-extern char *eval_hostaddr();		/* printable host address */
+-extern char *eval_hostinfo();		/* host name or address */
+-extern char *eval_client();		/* whatever is available */
+-extern char *eval_server();		/* whatever is available */
++extern char *eval_user(struct request_info *);	/* client user */
++extern char *eval_hostname(struct host_info *);	/* printable hostname */
++extern char *eval_hostaddr(struct host_info *);	/* printable host address */
++extern char *eval_hostinfo(struct host_info *);	/* host name or address */
++extern char *eval_client(struct request_info *);/* whatever is available */
++extern char *eval_server(struct request_info *);/* whatever is available */
+ #define eval_daemon(r)	((r)->daemon)	/* daemon process name */
+ #define eval_pid(r)	((r)->pid)	/* process id */
+ 
+ /* Socket-specific methods, including DNS hostname lookups. */
+ 
+-extern void sock_host();		/* look up endpoint addresses */
+-extern void sock_hostname();		/* translate address to hostname */
+-extern void sock_hostaddr();		/* address to printable address */
++/* look up endpoint addresses */
++extern void sock_host(struct request_info *);
++/* translate address to hostname */
++extern void sock_hostname(struct host_info *);
++/* address to printable address */
++extern void sock_hostaddr(struct host_info *);
+ #define sock_methods(r) \
+ 	{ (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
+ 
+@@ -182,7 +203,7 @@
+   * behavior.
+   */
+ 
+-extern void process_options();		/* execute options */
++extern void process_options(char *, struct request_info *);/* execute options */
+ extern int dry_run;			/* verification flag */
+ 
+ /* Bug workarounds. */
+@@ -221,3 +242,7 @@
+ #define strtok	my_strtok
+ extern char *my_strtok();
+ #endif
++
++__END_DECLS
++
++#endif
+diff -ruN tcp_wrappers_7.6.orig/weak_symbols.c tcp_wrappers_7.6/weak_symbols.c
+--- tcp_wrappers_7.6.orig/weak_symbols.c	1970-01-01 01:00:00.000000000 +0100
++++ tcp_wrappers_7.6/weak_symbols.c	2004-05-02 15:31:09.000000000 +0200
+@@ -0,0 +1,11 @@
++ /*
++  * @(#) weak_symbols.h 1.5 99/12/29 23:50
++  * 
++  * Author: Anthony Towns <ajt@debian.org>
++  */
++
++#ifdef HAVE_WEAKSYMS
++#include <syslog.h>
++int deny_severity = LOG_WARNING;
++int allow_severity = SEVERITY; 
++#endif
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch
new file mode 100644
index 0000000..eb5685c
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/14_cidr_support.patch
@@ -0,0 +1,68 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5	2003-08-21 03:15:36.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5	2003-08-21 03:15:31.000000000 +0200
+@@ -90,6 +90,10 @@
+ pattern `131.155.72.0/255.255.254.0\' matches every address in the
+ range `131.155.72.0\' through `131.155.73.255\'.
+ .IP \(bu
++An expression of the form `n.n.n.n/mm' is interpreted as a
++`net/masklength' pair, where `mm' is the number of consecutive `1'
++bits in the netmask applied to the `n.n.n.n' address.
++.IP \(bu
+ An expression of the form `[n:n:n:n:n:n:n:n]/m\' is interpreted as a
+ `[net]/prefixlen\' pair. An IPv6 host address is matched if
+ `prefixlen\' bits of `net\' is equal to the `prefixlen\' bits of the
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.c tcp_wrappers_7.6/hosts_access.c
+--- tcp_wrappers_7.6.orig/hosts_access.c	2003-08-21 03:15:36.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.c	2003-08-21 03:09:30.000000000 +0200
+@@ -417,7 +417,8 @@
+     if ((addr = dot_quad_addr(string)) == INADDR_NONE)
+ 	return (NO);
+     if ((net = dot_quad_addr(net_tok)) == INADDR_NONE
+-	|| (mask = dot_quad_addr(mask_tok)) == INADDR_NONE) {
++	|| ((mask = dot_quad_addr(mask_tok)) == INADDR_NONE
++	    && (mask = cidr_mask_addr(mask_tok)) == 0)) {
+ #ifndef INET6
+ 	tcpd_warn("bad net/mask expression: %s/%s", net_tok, mask_tok);
+ #endif
+diff -ruN tcp_wrappers_7.6.orig/misc.c tcp_wrappers_7.6/misc.c
+--- tcp_wrappers_7.6.orig/misc.c	2003-08-21 03:15:36.000000000 +0200
++++ tcp_wrappers_7.6/misc.c	2003-08-21 03:09:30.000000000 +0200
+@@ -107,3 +107,17 @@
+     }
+     return (runs == 4 ? inet_addr(str) : INADDR_NONE);
+ }
++
++/* cidr_mask_addr - convert cidr netmask length to internal form */
++
++unsigned long cidr_mask_addr(str)
++char   *str;
++{
++    int     maskbits;
++
++    maskbits = atoi(str);
++    if (maskbits < 1 || maskbits > 32)
++	return (0);
++    return htonl(0xFFFFFFFF << (32 - maskbits));
++}
++
+diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c	2003-08-21 03:15:36.000000000 +0200
++++ tcp_wrappers_7.6/tcpdchk.c	2003-08-21 03:09:30.000000000 +0200
+@@ -497,12 +497,12 @@
+ 	int mask_len;
+ 
+ 	if ((dot_quad_addr(pat) == INADDR_NONE
+-	    || dot_quad_addr(mask) == INADDR_NONE)
++	    || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0)
+ 	    && (!is_inet6_addr(pat)
+ 		|| ((mask_len = atoi(mask)) < 0 || mask_len > 128)))
+ #else
+ 	if (dot_quad_addr(pat) == INADDR_NONE
+-	    || dot_quad_addr(mask) == INADDR_NONE)
++	    || dot_quad_addr(mask) == INADDR_NONE && cidr_mask_addr(mask) == 0)
+ #endif
+ 	    tcpd_warn("%s/%s: bad net/mask pattern", pat, mask);
+     } else if (STR_EQ(pat, "FAIL")) {		/* obsolete */
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch
new file mode 100644
index 0000000..3ca6874
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/15_match_clarify.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5	2004-04-25 12:17:59.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.5	2004-04-25 12:17:53.000000000 +0200
+@@ -89,6 +89,8 @@
+ bitwise AND of the address and the `mask\'. For example, the net/mask
+ pattern `131.155.72.0/255.255.254.0\' matches every address in the
+ range `131.155.72.0\' through `131.155.73.255\'.
++`255.255.255.255\' is not a valid mask value, so a single host can be
++matched just by its IP.
+ .IP \(bu
+ An expression of the form `n.n.n.n/mm' is interpreted as a
+ `net/masklength' pair, where `mm' is the number of consecutive `1'
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch
new file mode 100644
index 0000000..3087377
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/expand_remote_port.patch
@@ -0,0 +1,73 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/eval.c tcp_wrappers_7.6/eval.c
+--- tcp_wrappers_7.6.orig/eval.c	1995-01-30 19:51:46.000000000 +0100
++++ tcp_wrappers_7.6/eval.c	2004-11-04 13:59:01.000000000 +0100
+@@ -98,6 +98,28 @@
+     }
+ }
+ 
++/* eval_port - return string with the port */
++char   *eval_port(saddr)
++#ifdef INET6
++struct sockaddr *saddr;
++#else
++struct sockaddr_in *saddr;
++#endif
++{
++    static char port[16];
++    if (saddr != 0) {
++        sprintf(port, "%u",
++#ifdef INET6
++            ntohs(((struct sockaddr_in *)saddr)->sin_port));
++#else
++            ntohs(saddr->sin_port));
++#endif
++    } else {
++	strcpy(port, "0");
++    }
++    return (port);
++}
++
+ /* eval_client - return string with as much about the client as we know */
+ 
+ char   *eval_client(request)
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.5 tcp_wrappers_7.6/hosts_access.5
+--- tcp_wrappers_7.6.orig/hosts_access.5	2004-11-04 13:17:45.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.5	2004-11-04 13:55:32.000000000 +0100
+@@ -175,6 +175,8 @@
+ unavailable.
+ .IP "%n (%N)"
+ The client (server) host name (or "unknown" or "paranoid").
++.IP "%r (%R)"
++The clients (servers) port number (or "0").
+ .IP %p
+ The daemon process id.
+ .IP %s
+diff -ruN tcp_wrappers_7.6.orig/percent_x.c tcp_wrappers_7.6/percent_x.c
+--- tcp_wrappers_7.6.orig/percent_x.c	1994-12-28 17:42:38.000000000 +0100
++++ tcp_wrappers_7.6/percent_x.c	2004-11-04 13:19:29.000000000 +0100
+@@ -63,6 +63,8 @@
+ 		ch == 'n' ? eval_hostname(request->client) :
+ 		ch == 'N' ? eval_hostname(request->server) :
+ 		ch == 'p' ? eval_pid(request) :
++		ch == 'r' ? eval_port(request->client->sin) :
++		ch == 'R' ? eval_port(request->server->sin) :
+ 		ch == 's' ? eval_server(request) :
+ 		ch == 'u' ? eval_user(request) :
+ 		ch == '%' ? "%" : (tcpd_warn("unrecognized %%%c", ch), "");
+diff -ruN tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h	2004-11-04 13:17:45.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.h	2004-11-04 13:19:13.000000000 +0100
+@@ -145,6 +145,11 @@
+ extern char *eval_hostinfo(struct host_info *);	/* host name or address */
+ extern char *eval_client(struct request_info *);/* whatever is available */
+ extern char *eval_server(struct request_info *);/* whatever is available */
++#ifdef INET6
++extern char *eval_port(struct sockaddr *);
++#else
++extern char *eval_port(struct sockaddr_in *);
++#endif
+ #define eval_daemon(r)	((r)->daemon)	/* daemon process name */
+ #define eval_pid(r)	((r)->pid)	/* process id */
+ 
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
new file mode 100644
index 0000000..4cc554f
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/have_strerror.patch
@@ -0,0 +1,21 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
+--- tcp_wrappers_7.6.orig/percent_m.c	1994-12-28 17:42:37.000000000 +0100
++++ tcp_wrappers_7.6/percent_m.c	2003-08-21 02:45:31.000000000 +0200
+@@ -29,11 +29,15 @@
+ 
+     while (*bp = *cp)
+ 	if (*cp == '%' && cp[1] == 'm') {
++#ifdef HAVE_STRERROR
++	    strcpy(bp, strerror(errno));
++#else
+ 	    if (errno < sys_nerr && errno > 0) {
+ 		strcpy(bp, sys_errlist[errno]);
+ 	    } else {
+ 		sprintf(bp, "Unknown error %d", errno);
+ 	    }
++#endif
+ 	    bp += strlen(bp);
+ 	    cp += 2;
+ 	} else {
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch
new file mode 100644
index 0000000..3ba214d
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/ldflags.patch
@@ -0,0 +1,45 @@
+Upstream-Status: Backport
+
+Index: tcp_wrappers_7.6.orig/Makefile
+===================================================================
+--- tcp_wrappers_7.6.orig.orig/Makefile	2009-04-06 10:55:47.000000000 +0000
++++ tcp_wrappers_7.6.orig/Makefile	2009-04-06 10:57:04.000000000 +0000
+@@ -748,31 +748,31 @@
+ 
+ $(SHLIB): $(SHLIB_OBJ)
+ 	rm -f $(SHLIB)
+-	$(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
++	$(CC) $(LDFLAGS) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
+ 	ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
+ 	ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
+ 
+ tcpd:	tcpd.o $(SHLIB)
+-	$(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
+ 
+ miscd:	miscd.o $(LIB)
+-	$(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
+ 
+ safe_finger: safe_finger.o $(SHLIB)
+-	$(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
+ 
+ TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
+ 
+ tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
+-	$(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
+ 
+ try-from: try-from.o fakelog.o $(SHLIB)
+-	$(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
+ 
+ TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
+ 
+ tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
+-	$(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
+ 
+ shar:	$(KIT)
+ 	@shar $(KIT)
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/makefile-fix-parallel.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/makefile-fix-parallel.patch
new file mode 100644
index 0000000..7973525
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/makefile-fix-parallel.patch
@@ -0,0 +1,54 @@
+From daf89d272e51b2153015ce7f54ab0b86182e64c1 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 28 Jan 2015 18:50:23 -0800
+Subject: [PATCH] Makefile: fix for parallel build
+
+Fixed:
+make: *** No rule to make target `cflags', needed by `tcpd.o'.  Stop.
+
+Let "cflags" depend on config-check which generates cflgas will fix the
+problem.
+
+Also fixed:
+Fatal error: can't create shared/hosts_access.o: No such file or directory
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index fe5e732..f468751 100644
+--- a/Makefile
++++ b/Makefile
+@@ -714,6 +714,7 @@ KIT	= README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \
+ LIB	= libwrap.a
+ 
+ shared/%.o: %.c
++	[ -d shared ] || mkdir -p shared
+ 	$(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
+ 
+ SOMAJOR = 0
+@@ -730,6 +731,8 @@ SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ));
+ 
+ all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB)
+ 
++cflags: config-check
++
+ # Invalidate all object files when the compiler options (CFLAGS) have changed.
+ 
+ config-check:
+@@ -739,7 +742,7 @@ config-check:
+ 	then rm cflags.new ; \
+ 	else mv cflags.new cflags ; \
+ 	fi >/dev/null 2>/dev/null
+-	@if [ ! -d shared ]; then mkdir shared; fi
++	@[ -d shared ] || mkdir -p shared
+ 
+ $(LIB):	$(LIB_OBJ)
+ 	rm -f $(LIB)
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch
new file mode 100644
index 0000000..19bd7d3
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/man_fromhost.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/hosts_access.3 tcp_wrappers_7.6/hosts_access.3
+--- tcp_wrappers_7.6.orig/hosts_access.3	2004-04-25 00:10:48.000000000 +0200
++++ tcp_wrappers_7.6/hosts_access.3	2004-04-25 00:09:36.000000000 +0200
+@@ -14,6 +14,9 @@
+ struct request_info *request_set(request, key, value, ..., 0)
+ struct request_info *request;
+ 
++void fromhost(request)
++struct request_info *request;
++
+ int hosts_access(request)
+ struct request_info *request;
+ 
+@@ -60,6 +63,7 @@
+ is available, host names and client user names are looked up on demand,
+ using the request structure as a cache.  hosts_access() returns zero if
+ access should be denied.
++fromhost() must be called before hosts_access().
+ .PP
+ hosts_ctl() is a wrapper around the request_init() and hosts_access()
+ routines with a perhaps more convenient interface (though it does not
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch
new file mode 100644
index 0000000..7650600
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rename_strings_variable.patch
@@ -0,0 +1,35 @@
+STRINGS name conflicts with variable for strings tools (e.g. i586-oe-linux-strings)
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- tcp_wrappers_7.6/Makefile.orig	2013-04-18 23:41:58.277981740 +0200
++++ tcp_wrappers_7.6/Makefile	2013-04-18 23:42:42.513978966 +0200
+@@ -309,7 +309,7 @@
+ pyramid:
+ 	@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+ 	LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o vfprintf.o" \
+-	STRINGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \
++	STRINGS_FLAGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \
+ 	NETGROUP="-DNETGROUP -DUSE_GETDOMAIN" TLI= all
+ 
+ # Untested.
+@@ -419,7 +419,7 @@
+ # Uncomment the following if your C library does not provide the
+ # strchr/strrchr/memcmp routines, but comes with index/rindex/bcmp.
+ #
+-#STRINGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy
++#STRINGS_FLAGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy
+ 
+ #################################################################
+ # System dependencies: selection of non-default object libraries.
+@@ -690,7 +690,7 @@
+ 	$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
+ 	-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
+ 	-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
+-	$(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \
++	$(UCHAR) $(TABLES) $(STRINGS_FLAGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \
+ 	$(VSYSLOG) $(HOSTNAME)
+ 
+ LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch
new file mode 100644
index 0000000..5875b81
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch
@@ -0,0 +1,39 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
+--- tcp_wrappers_7.6.orig/rfc931.c	2004-08-29 18:40:08.000000000 +0200
++++ tcp_wrappers_7.6/rfc931.c	2004-08-29 18:40:02.000000000 +0200
+@@ -92,6 +92,8 @@
+     char   *cp;
+     char   *result = unknown;
+     FILE   *fp;
++    unsigned saved_timeout;
++    struct sigaction nact, oact;
+ 
+ #ifdef INET6
+     /* address family must be the same */
+@@ -134,7 +136,12 @@
+ 	 */
+ 
+ 	if (setjmp(timebuf) == 0) {
+-	    signal(SIGALRM, timeout);
++	    /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
++	    saved_timeout = alarm(0);
++	    nact.sa_handler = timeout;
++	    nact.sa_flags = 0;
++	    (void) sigemptyset(&nact.sa_mask);
++	    (void) sigaction(SIGALRM, &nact, &oact);
+ 	    alarm(rfc931_timeout);
+ 
+ 	    /*
+@@ -223,6 +230,10 @@
+ 	    }
+ 	    alarm(0);
+ 	}
++	/* Restore SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
++	(void) sigaction(SIGALRM, &oact, NULL);
++	if (saved_timeout > 0)
++	    alarm(saved_timeout);
+ 	fclose(fp);
+     }
+     STRN_CPY(dest, result, STRING_LENGTH);
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff
new file mode 100644
index 0000000..723f4f1
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/rfc931.diff
@@ -0,0 +1,41 @@
+Upstream-Status: Backport
+
+diff -ruNp tcp_wrappers_7.6.orig/scaffold.c tcp_wrappers_7.6/scaffold.c
+--- tcp_wrappers_7.6.orig/scaffold.c	2005-03-09 18:22:04.000000000 +0100
++++ tcp_wrappers_7.6/scaffold.c	2005-03-09 18:20:47.000000000 +0100
+@@ -237,10 +237,17 @@ struct request_info *request;
+ 
+ /* ARGSUSED */
+ 
+-void    rfc931(request)
+-struct request_info *request;
++void    rfc931(rmt_sin, our_sin, dest)
++#ifdef INET6
++struct sockaddr *rmt_sin;
++struct sockaddr *our_sin;
++#else
++struct sockaddr_in *rmt_sin;
++struct sockaddr_in *our_sin;
++#endif
++char   *dest;
+ {
+-    strcpy(request->user, unknown);
++    strcpy(dest, unknown);
+ }
+ 
+ /* check_path - examine accessibility */
+diff -ruNp tcp_wrappers_7.6.orig/tcpd.h tcp_wrappers_7.6/tcpd.h
+--- tcp_wrappers_7.6.orig/tcpd.h	2005-03-09 18:22:04.000000000 +0100
++++ tcp_wrappers_7.6/tcpd.h	2005-03-09 18:21:23.000000000 +0100
+@@ -83,7 +83,11 @@ extern int hosts_access(struct request_i
+ extern void shell_cmd(char *);		/* execute shell command */
+ extern char *percent_x(char *, int, char *, struct request_info *);
+ 					/* do %<char> expansion */
++#ifdef INET6
+ extern void rfc931(struct sockaddr *, struct sockaddr *, char *);
++#else
++extern void rfc931(struct sockaddr_in *, struct sockaddr_in *, char *);
++#endif
+ 					/* client name from RFC 931 daemon */
+ extern void clean_exit(struct request_info *);	/* clean up and exit */
+ extern void refuse(struct request_info *);	/* clean up and exit */
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8 b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8
new file mode 100644
index 0000000..875616b
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.8
@@ -0,0 +1,34 @@
+.TH SAFE_FINGER 8 "21th June 1997" Linux "Linux Programmer's Manual"
+.SH NAME
+safe_finger \- finger client wrapper that protects against nasty stuff
+from finger servers
+.SH SYNOPSIS
+.B safe_finger [finger_options]
+.SH DESCRIPTION
+The
+.B safe_finger
+command protects against nasty stuff from finger servers. Use this
+program for automatic reverse finger probes from the
+.B tcp_wrapper
+.B (tcpd)
+, not the raw finger command. The
+.B safe_finger
+command makes sure that the finger client is not run with root
+privileges. It also runs the finger client with a defined PATH
+environment.
+.B safe_finger
+will also protect you from problems caused by the output of some
+finger servers. The problem: some programs may react to stuff in
+the first column. Other programs may get upset by thrash anywhere
+on a line. File systems may fill up as the finger server keeps
+sending data. Text editors may bomb out on extremely long lines.
+The finger server may take forever because it is somehow wedged.
+.B safe_finger
+takes care of all this badness.
+.SH SEE ALSO
+.BR hosts_access (5),
+.BR hosts_options (5),
+.BR tcpd (8)
+.SH AUTHOR
+Wietse Venema, Eindhoven University of Technology, The Netherlands.
+
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch
new file mode 100644
index 0000000..fc2afee
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/safe_finger.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Backport
+
+--- tcp-wrappers-7.6-ipv6.1.orig/safe_finger.c
++++ tcp-wrappers-7.6-ipv6.1/safe_finger.c
+@@ -26,21 +26,24 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <pwd.h>
++#include <syslog.h>
+ 
+ extern void exit();
+ 
+ /* Local stuff */
+ 
+-char    path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin";
++char    path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin";
+ 
+ #define	TIME_LIMIT	60		/* Do not keep listinging forever */
+ #define	INPUT_LENGTH	100000		/* Do not keep listinging forever */
+ #define	LINE_LENGTH	128		/* Editors can choke on long lines */
+ #define	FINGER_PROGRAM	"finger"	/* Most, if not all, UNIX systems */
+ #define	UNPRIV_NAME	"nobody"	/* Preferred privilege level */
+-#define	UNPRIV_UGID	32767		/* Default uid and gid */
++#define	UNPRIV_UGID	65534		/* Default uid and gid */
+ 
+ int     finger_pid;
++int	allow_severity = SEVERITY;
++int	deny_severity = LOG_WARNING;
+ 
+ void    cleanup(sig)
+ int     sig;
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch
new file mode 100644
index 0000000..9d7ea04
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/sig_fix.patch
@@ -0,0 +1,36 @@
+Upstream-Status: Backport
+
+* Mon Feb 10 2003 Harald Hoyer <harald@redhat.de> 7.6-29
+- added security patch tcp_wrappers-7.6-sig.patch
+
+--- tcp_wrappers_7.6/hosts_access.c.sig	2003-02-10 16:18:31.000000000 +0100
++++ tcp_wrappers_7.6/hosts_access.c	2003-02-10 16:50:38.000000000 +0100
+@@ -66,6 +66,7 @@
+ 
+ #define	YES		1
+ #define	NO		0
++#define ERR             -1
+ 
+  /*
+   * These variables are globally visible so that they can be redirected in
+@@ -129,9 +129,9 @@
+ 	return (verdict == AC_PERMIT);
+     if (table_match(hosts_allow_table, request))
+ 	return (YES);
+-    if (table_match(hosts_deny_table, request))
+-	return (NO);
+-    return (YES);
++    if (table_match(hosts_deny_table, request) == NO)
++	return (YES);
++    return (NO);
+ }
+ 
+ /* table_match - match table entries with (daemon, client) pair */
+@@ -175,6 +175,7 @@
+ 	(void) fclose(fp);
+     } else if (errno != ENOENT) {
+ 	tcpd_warn("cannot open %s: %m", table);
++	match = ERR;
+     }
+     if (match) {
+ 	if (hosts_access_verbose > 1)
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch
new file mode 100644
index 0000000..76dd634
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/siglongjmp.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Backport
+
+diff -ruNp tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
+--- tcp_wrappers_7.6.orig/rfc931.c	2004-08-29 18:42:25.000000000 +0200
++++ tcp_wrappers_7.6/rfc931.c	2004-08-29 18:41:04.000000000 +0200
+@@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
+ 
+ int     rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */
+ 
+-static jmp_buf timebuf;
++static sigjmp_buf timebuf;
+ 
+ /* fsocket - open stdio stream on top of socket */
+ 
+@@ -62,7 +62,7 @@ int     protocol;
+ static void timeout(sig)
+ int     sig;
+ {
+-    longjmp(timebuf, sig);
++    siglongjmp(timebuf, sig);
+ }
+ 
+ /* rfc931 - return remote user name, given socket structures */
+@@ -135,7 +135,7 @@ char   *dest;
+ 	 * Set up a timer so we won't get stuck while waiting for the server.
+ 	 */
+ 
+-	if (setjmp(timebuf) == 0) {
++	if (sigsetjmp(timebuf, 0) == 0) {
+ 	    /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
+ 	    saved_timeout = alarm(0);
+ 	    nact.sa_handler = timeout;
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
new file mode 100644
index 0000000..8e46df8
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/socklen_t.patch
@@ -0,0 +1,59 @@
+commit 88b6984ef0bf3b703c1c851092662b95e91db1ff
+Author: farrah rashid <farrah.rashid@windriver.com>
+Date:   Tue Feb 12 09:53:50 2013 -0500
+
+    tcp-wrappers Support for building with glibc
+    
+    Added support for socklen_t type to len argument passed to socket related
+    calls. This fixes a bug that causes tcp wrappers to fail when using sshd.
+    
+    Upstream-Status: Pending
+    
+    Signed-off-by: farrah rashid <farrah.rashid@windriver.com>
+
+diff --git a/fix_options.c b/fix_options.c
+index 7473adf..fe2b442 100644
+--- a/fix_options.c
++++ b/fix_options.c
+@@ -38,7 +38,12 @@ struct request_info *request;
+ #ifdef IP_OPTIONS
+     unsigned char optbuf[BUFFER_SIZE / 3], *cp;
+     char    lbuf[BUFFER_SIZE], *lp;
+-    int     optsize = sizeof(optbuf), ipproto;
++#ifdef __GLIBC__
++    socklen_t  optsize = sizeof(optbuf);
++#else
++    int     optsize = sizeof(optbuf);
++#endif
++    int ipproto;
+     struct protoent *ip;
+     int     fd = request->fd;
+     unsigned int opt;
+diff --git a/socket.c b/socket.c
+index 4b2c575..a0d2987 100644
+--- a/socket.c
++++ b/socket.c
+@@ -95,7 +95,11 @@ struct request_info *request;
+     static struct sockaddr_in client;
+     static struct sockaddr_in server;
+ #endif
++#ifdef __GLIBC__
++    socklen_t  len;
++#else
+     int     len;
++#endif
+     char    buf[BUFSIZ];
+     int     fd = request->fd;
+ 
+@@ -426,7 +430,11 @@ int     fd;
+ #else
+     struct sockaddr_in sin;
+ #endif
++#ifdef __GLIBC__
++    socklen_t  size = sizeof(sin);
++#else
+     int     size = sizeof(sin);
++#endif
+ 
+     /*
+      * Eat up the not-yet received datagram. Some systems insist on a
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch
new file mode 100644
index 0000000..be29bdc
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/tcpdchk_libwrapped.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Backport
+
+diff -ruN tcp_wrappers_7.6.orig/tcpdchk.c tcp_wrappers_7.6/tcpdchk.c
+--- tcp_wrappers_7.6.orig/tcpdchk.c	2003-08-21 02:50:37.000000000 +0200
++++ tcp_wrappers_7.6/tcpdchk.c	2003-08-21 02:50:33.000000000 +0200
+@@ -53,6 +53,24 @@
+ #include "inetcf.h"
+ #include "scaffold.h"
+ 
++/* list of programs which are known to be linked with libwrap in debian */
++static const char *const libwrap_programs[] = {
++    "portmap", "mountd", "statd", "ugidd",
++    "redir", "rlinetd",
++    "sshd",
++    "atftpd",
++    "diald",
++    "esound",
++    "gdm", "gnome-session",
++    "icecast", "icecast_admin", "icecast_client", "icecast_source",
++    "mysqld",
++    "ntop",
++    "pptpd",
++    "rquotad",
++    "sendmail", "smail",
++    NULL
++};
++
+  /*
+   * Stolen from hosts_access.c...
+   */
+@@ -147,8 +165,8 @@
+     /*
+      * These are not run from inetd but may have built-in access control.
+      */
+-    inet_set("portmap", WR_NOT);
+-    inet_set("rpcbind", WR_NOT);
++    for (c = 0; libwrap_programs[c]; c++)
++	inet_set(libwrap_programs[c], WR_YES);
+ 
+     /*
+      * Check accessibility of access control files.
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8 b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8
new file mode 100644
index 0000000..9c8f305
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/try-from.8
@@ -0,0 +1,28 @@
+.TH TRY-FROM 8 "21th June 1997" Linux "Linux Programmer's Manual"
+.SH NAME
+try-from \- test program for the tcp_wrapper
+.SH SYNOPSIS
+.B try-from
+.SH DESCRIPTION
+The
+.B try-from
+command can be called via a remote shell command to find out
+if the hostname and address are properly recognized
+by the
+.B tcp_wrapper
+library, if username lookup works, and (SysV only) if the TLI
+on top of IP heuristics work. Diagnostics are reported through
+.BR syslog (3)
+and redirected to stderr.
+
+Example:
+
+rsh host /some/where/try-from
+
+.SH SEE ALSO
+.BR hosts_access (5),
+.BR hosts_options (5),
+.BR tcpd (8)
+.SH AUTHOR
+Wietse Venema, Eindhoven University of Technology, The Netherlands.
+
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
new file mode 100644
index 0000000..2630478
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -0,0 +1,128 @@
+SUMMARY = "Security tool that is a wrapper for TCP daemons"
+DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \
+               services."
+SECTION = "console/network"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa"
+PR ="r10"
+
+
+PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc"
+FILES_libwrap = "${base_libdir}/lib*${SOLIBS}"
+FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5"
+FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}"
+FILES_libwrap-staticdev = "${libdir}/lib*.a"
+FILES_${PN} = "${sbindir}"
+FILES_${PN}-doc = "${mandir}/man8"
+
+SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
+           file://00_man_quoting.diff \
+           file://01_man_portability.patch \
+           file://05_wildcard_matching.patch \
+           file://06_fix_gethostbyname.patch \
+           file://10_usagi-ipv6.patch \
+           file://11_tcpd_blacklist.patch \
+           file://11_usagi_fix.patch \
+           file://12_makefile_config.patch \
+           file://13_shlib_weaksym.patch \
+           file://14_cidr_support.patch \
+           file://15_match_clarify.patch \
+           file://expand_remote_port.patch \
+           file://have_strerror.patch \
+           file://man_fromhost.patch \
+           file://restore_sigalarm.patch \
+           file://rfc931.diff \
+           file://safe_finger.patch \
+           file://sig_fix.patch \
+           file://siglongjmp.patch \
+           file://socklen_t.patch \
+           file://tcpdchk_libwrapped.patch \
+           file://ldflags.patch \
+           file://rename_strings_variable.patch \
+           file://try-from.8 \
+           file://safe_finger.8 \
+           file://makefile-fix-parallel.patch \
+           "
+
+SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
+SRC_URI[sha256sum] = "9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d"
+
+S = "${WORKDIR}/tcp_wrappers_${PV}"
+
+EXTRA_OEMAKE = "'CC=${CC}' \
+                'AR=${AR}' \
+                'RANLIB=${RANLIB}' \
+                'REAL_DAEMON_DIR=${sbindir}' \
+                'STYLE=-DPROCESS_OPTIONS' \
+                'FACILITY=LOG_DAEMON' \
+                'SEVERITY=LOG_INFO' \
+                'BUGS=' \
+                'VSYSLOG=' \
+                'RFC931_TIMEOUT=10' \
+                'ACCESS=-DHOSTS_ACCESS' \
+                'KILL_OPT=-DKILL_IP_OPTIONS' \
+                'UMASK=-DDAEMON_UMASK=022' \
+                'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \
+                'LIBS=-lnsl' \
+                'ARFLAGS=rv' \
+                'AUX_OBJ=weak_symbols.o' \
+                'TLI=' \
+                'COPTS=' \
+                'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'"
+
+EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
+EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN"
+
+do_compile () {
+	oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
+		   all
+}
+
+BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch"
+MANS3 = "hosts_access"
+MANS5 = "hosts_options"
+MANS8 = "tcpd tcpdchk tcpdmatch"
+do_install () {
+	oe_libinstall -a libwrap ${D}${libdir}
+	oe_libinstall -C shared -so libwrap ${D}${base_libdir}
+
+	if [ "${libdir}" != "${base_libdir}" ] ; then
+		rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+		libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename`
+		ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so
+		rm -f ${D}${base_libdir}/libwrap.so
+	fi
+
+	install -d ${D}${sbindir}
+	for b in ${BINS}; do
+		install -m 0755 $b ${D}${sbindir}/ || exit 1
+	done
+
+	install -d ${D}${mandir}/man3
+	for m in ${MANS3}; do
+		install -m 0644 $m.3 ${D}${mandir}/man3/ || exit 1
+	done
+
+	install -d ${D}${mandir}/man5
+	for m in ${MANS5}; do
+		install -m 0644 $m.5 ${D}${mandir}/man5/ || exit 1
+	done
+
+	install -d ${D}${mandir}/man8
+	for m in ${MANS8}; do
+		install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1
+	done
+
+	install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/
+	install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/
+
+	install -d ${D}${includedir}
+	install -m 0644 tcpd.h ${D}${includedir}/
+
+	install -d ${D}${sysconfdir}
+	touch ${D}${sysconfdir}/hosts.allow
+	touch ${D}${sysconfdir}/hosts.deny
+}
+
+FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny"
diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb
new file mode 100644
index 0000000..eac289e
--- /dev/null
+++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Perl script that converts Texinfo to HTML"
+HOMEPAGE    = "http://www.nongnu.org/texi2html/"
+SECTION     = "console/utils"
+LICENSE     = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+PR = "r2"
+
+SRC_URI     = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \
+               "
+
+SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54"
+SRC_URI[sha256sum] = "e8a98b0ee20c495a6ab894398a065ef580272dbd5a15b1b19e8bd1bc89d9f9fa"
+
+inherit autotools gettext texinfo
+
+do_configure_prepend() {
+	# autotools_do_configure updates po/Makefile.in.in, we also need
+	# update po_document.
+	cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
+	cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_messages/
+}
+
+do_install_append () {
+	sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2html
+}
+
+FILES_${PN}-doc += "${datadir}/texinfo"
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb
new file mode 100644
index 0000000..b5420a3
--- /dev/null
+++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Fake version of the texinfo utility suite"
+SECTION = "console/utils"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d6bb62e73ca8b901d3f2e9d71542f4bb"
+DEPENDS = ""
+PV = "1.0"
+
+SRC_URI = "file://template.py file://COPYING"
+
+S = "${WORKDIR}"
+
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+inherit native
+
+do_install_name() {
+    FILENAME="${D}${bindir}/$1"
+    # Using ln causes problems with rm_work
+    cp -T "${S}/template.py" "$FILENAME"
+    chmod +x $FILENAME
+}
+
+do_install() {
+    mkdir -p "${D}${bindir}"
+    for i in makeinfo pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \
+             txixml2texi texi2any install-info ginstall-info \
+             update-info-dir; do
+        do_install_name $i
+    done
+}
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING
new file mode 100644
index 0000000..531cbe7
--- /dev/null
+++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/COPYING
@@ -0,0 +1,19 @@
+Copyright (c) 2014 Intel Corp.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
new file mode 100644
index 0000000..8b7033e
--- /dev/null
+++ b/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy/template.py
@@ -0,0 +1,122 @@
+#! /usr/bin/env python2.7
+
+# template.py (and other filenames)
+# By Max Eliaser (max.eliaser@intel.com)
+
+# Copyright (c) 2014 Intel Corp.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+# This program acts like a dummy version of the texinfo utilities, creating
+# the right output files but leaving them blank. It will parse out the name
+# of the executable from argv[0] and emulate the corresponding program, so
+# multiple copies of this script will exist under different names.
+
+import sys, os
+
+olong = "--output="
+Elong = "--macro-expand="
+
+
+this_binary = sys.argv[0].split ("/")[-1]
+
+# To be outputted if functionality that hasn't been stubbed yet is invoked.
+stub_msg = """
+This stand-in version of %s is not yet fully capable of emulating the real
+version from the GNU texinfo suite. If you see this message, file a bug report
+with details on the recipe that failed.
+""" % this_binary
+
+# Autotools setups query the version, so this is actually necessary. Some of
+# them (lookin' at you, glibc) actually look for the substring "GNU texinfo,"
+# so we put that substring in there without actually telling a lie.
+version_str = """ %s (fake texinfo, emulating GNU texinfo) 5.2
+ 
+Super amazing version which is totally not fake in any way whatsoever.
+Copyright (C) 2014 Intel Corp. Distributed under the terms of the MIT
+license.
+""" % this_binary
+
+simple_binaries = "pod2texi texi2dvi pdftexi2dvi texindex texi2pdf \
+                   txixml2texi install-info ginstall-info \
+                   update-info-dir".split ()
+
+# These utilities use a slightly different set of options and flags.
+complex_binaries = "makeinfo texi2any".split ()
+
+valid_binaries = simple_binaries + complex_binaries
+
+# For generating blank output files.
+def touch_file (path):
+    f = open (path, "w")
+    f.close ()
+
+assert this_binary in valid_binaries, \
+       this_binary + " is not one of " + ', '.join (valid_binaries)
+
+if "--version" in sys.argv:
+    print version_str
+    sys.exit (0)
+
+# For debugging
+log_interceptions = False
+if log_interceptions:
+    f = open ("/tmp/intercepted_" + this_binary, "a")
+    f.write (' '.join ([this_binary] + sys.argv[1:]) + '\n')
+    f.close ()
+
+# Look through the options and flags, and if necessary, touch any output
+# files.
+arg_idx = 1
+while arg_idx < len (sys.argv):
+    arg = sys.argv [arg_idx]
+    
+    if arg == "--":
+        break
+    
+    # Something like -I . can result in a need for this (specifically the .)
+    elif len (arg) < 2:
+        pass
+    
+    # Check if -o or --output is specified. These can be used at most once.
+    elif arg[0] == '-' and arg[1] != '-' and arg[len (arg) - 1] == 'o':
+        touch_file (sys.argv[arg_idx + 1])
+        sys.exit (0)
+    elif arg.startswith (olong):
+        touch_file (arg.split ("=")[1])
+        sys.exit (0)
+    
+    # Check for functionality that isn't implemented yet.
+    else:
+        assert arg[0] != '-' or arg[1] == '-' or 'E' not in arg or \
+               this_binary in simple_binaries, \
+               "-E option not yet supported" + stub_msg
+        
+        assert not arg.startswith (Elong), \
+               Elong[:-1] + " option not yet supported" + stub_msg
+    
+    arg_idx += 1
+
+# The -o/--output option overrides the default. For makeinfo and texi2any,
+# that default is to look for a @setfilename command in the input file.
+# Otherwise, printing nothing to stdout and then exiting should suffice.
+assert this_binary in simple_binaries, \
+       "Don't know how to get default output file name from input file!" + \
+       stub_msg
+
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch b/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch
new file mode 100644
index 0000000..f4d6660
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch
@@ -0,0 +1,28 @@
+fix the macro check
+
+Upstream-Status: Pending
+
+configure does not check if locale.h exists, but check setlocale,
+if setlocale exist, the locale.h should exist.
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ lib/system.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/system.h b/lib/system.h
+index 946eb3c..c70037b 100644
+--- a/lib/system.h
++++ b/lib/system.h
+@@ -42,7 +42,7 @@ extern char *substring (const char *, const char *);
+ #include <ctype.h>
+ 
+ /* All systems nowadays probably have these functions, but ... */
+-#ifdef HAVE_LOCALE_H
++#ifdef HAVE_SETLOCALE
+ #include <locale.h>
+ #endif
+ #ifndef HAVE_SETLOCALE
+-- 
+1.7.10.4
+
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch b/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch
new file mode 100644
index 0000000..81ebe26
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch
@@ -0,0 +1,49 @@
+From 458e9450cecf703f55536e609365162719585900 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Wed, 10 Sep 2014 17:03:29 +0800
+Subject: [PATCH] do not compile host tools, since we have native
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ configure.ac | 23 +----------------------
+ 1 file changed, 1 insertion(+), 22 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b46130d..cf58654 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -90,28 +90,7 @@ AC_CANONICAL_BUILD
+ # $native_tools is also added to SUBDIRS in the main Makefile.am,
+ # so that make compiles the native tools first.
+ #
+-if test "$cross_compiling" = no; then
+-  native_tools=
+-else
+-  native_tools=tools
+-  test -d "$native_tools" || mkdir "$native_tools"
+-  confdir=`(cd "$srcdir";pwd)`
+-  # Make sure the secondary configure won't fail with
+-  # "error: source directory already configured".
+-  rm -f config.status
+-  AC_MSG_NOTICE([[Doing configure of native tools (${build}).]])
+-  cd "$native_tools" || exit 1
+-  # Run secondary configure in alternate environment or
+-  # it gets the wrong CC etc.  env -i gives this build host configure
+-  # a clean environment.
+-  env -i CC="${BUILD_CC}" AR="${BUILD_AR}" RANLIB="${BUILD_RANLIB}" \
+-      PATH="${PATH}" \
+-      tools_only=1 \
+-    ${confdir}/configure --build=${build} --host=${build} \
+-                         --disable-rpath --disable-nls
+-  cd .. || exit 1
+-  AC_MSG_NOTICE([[Continuing with main configure (${host}).]])
+-fi
++native_tools=
+ AC_SUBST(native_tools)
+ AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]])
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch b/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch
new file mode 100644
index 0000000..2297051
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch
@@ -0,0 +1,24 @@
+From 9b0df7d6d3c18cfac82c291d60a5357d1bc8d9d0 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Wed, 10 Sep 2014 17:10:03 +0800
+Subject: [PATCH] using native makeinfo
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ doc/Makefile.am                                |   2 +-
+
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index 63df818..b6ceb34 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -19,7 +19,7 @@ man_MANS = info.1 infokey.1 install-info.1 makeinfo.1 texindex.1 texi2dvi.1 \
+ 
+ # Use the programs built in our distribution, taking account of possible
+ # cross-compiling.
+-MAKEINFO = $(top_builddir)/$(native_tools)/makeinfo/makeinfo
++MAKEINFO = makeinfo
+ INSTALL_INFO = $(top_builddir)/$(native_tools)/util/install-info
+ 
+ TXI_XLATE = txi-cs.tex txi-de.tex txi-en.tex txi-es.tex txi-fr.tex \
diff --git a/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..c7338aa
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: texinfo-5.2/gnulib/lib/Makefile.am
+===================================================================
+--- texinfo-5.2.orig/gnulib/lib/Makefile.am
++++ texinfo-5.2/gnulib/lib/Makefile.am
+@@ -378,7 +378,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch b/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch
new file mode 100644
index 0000000..ab6f165
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/disable-native-tools.patch
@@ -0,0 +1,43 @@
+We already DEPEND on the native texinfo being present before building so
+there isn't any need to try and build the required native texinfo binaries
+before cross-compiling. This simplifies the recipe somewhat!
+
+Upstream-Status: Inappropriate oe specific
+
+Signed-off-by: Joshua Lock <josh@linux.intel.com>
+
+Index: texinfo-4.13/configure.ac
+===================================================================
+--- texinfo-4.13.orig/configure.ac
++++ texinfo-4.13/configure.ac
+@@ -100,29 +100,7 @@ AC_CANONICAL_BUILD
+ # $native_tools is also added to SUBDIRS in the main Makefile.am,
+ # so that make compiles the native tools first.
+ #
+-if test "$cross_compiling" = no; then
+-  native_tools=
+-else
+-  native_tools=tools
+-  test -d "$native_tools" || mkdir "$native_tools"
+-  confdir=`(cd "$srcdir";pwd)`
+-  # Make sure the secondary configure won't fail with
+-  # "error: source directory already configured".
+-  rm -f config.status
+-  AC_MSG_NOTICE([[Doing configure of native tools (${build}).]])
+-  cd "$native_tools" || exit 1
+-  # Run secondary configure in alternate environment or
+-  # it gets the wrong CC etc.
+-  # env -i gives this build host configure a clean environment;
+-  # consequently, we have to re-initialize $PATH.
+-  env -i CC="$BUILD_CC" AR="$BUILD_AR" RANLIB="$BUILD_RANLIB" \
+-      PATH="$PATH" \
+-      tools_only=1 \
+-    ${confdir}/configure --build=${build} --host=${build} \
+-                         --disable-rpath --disable-nls
+-  cd .. || exit 1
+-  AC_MSG_NOTICE([[Continuing with main configure (${host}).]])
+-fi
++native_tools=
+ AC_SUBST(native_tools)
+ AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]])
+ 
diff --git a/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch
new file mode 100644
index 0000000..0ce47ec
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/dont-depend-on-help2man.patch
@@ -0,0 +1,64 @@
+From 6f1f3912fcb900b3a3e6cbe3360306fade333497 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 6 Aug 2015 14:55:08 +0300
+Subject: [PATCH] dont-depend-on-help2man
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+---
+ doc/Makefile.am |  2 +-
+ man/Makefile.am | 12 ++++++------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index 7198a6b..4bba550 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -40,7 +40,7 @@ refcard_files = refcard/Makefile refcard/txicmdcheck \
+ # Include our texinfo.tex, not Automake's.
+ EXTRA_DIST = epsf.tex texinfo.tex \
+              fdl.texi \
+-	     $(man_MANS) $(TXI_XLATE) \
++	     $(TXI_XLATE) \
+ 	     $(refcard_files)
+ 
+ if INSTALL_WARNINGS
+diff --git a/man/Makefile.am b/man/Makefile.am
+index a08d603..bdfc9a4 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -13,24 +13,24 @@
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ 
+ # These are generated using help2man.
+-man_MANS = install-info.1 makeinfo.1 texindex.1 texi2dvi.1
++#man_MANS = install-info.1 makeinfo.1 texindex.1 texi2dvi.1
+ 
+ # These require the build in info/, thus can't do if we failed to find a
+ # terminal library.
+ if HAVE_TERMLIBS
+-man_MANS += info.1
++#man_MANS += info.1
+ endif
+ 
+ # These are hand-written.
+-man_MANS += info.5 texinfo.5
++#man_MANS += info.5 texinfo.5
+ 
+ # This is generated by pod2man, but let's just run it by hand.
+-man_MANS += pod2texi.1
++#man_MANS += pod2texi.1
+ 
+ # These are just .so's to the common program.
+-man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1
++#man_MANS += texi2any.1 texi2pdf.1 pdftexi2dvi.1
+ 
+-EXTRA_DIST = $(man_MANS) ginfo.h2m
++EXTRA_DIST = ginfo.h2m
+ 
+ # Maintainers should be able to regenerate.
+ MAINTAINERCLEANFILES = $(man_MANS)
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/texinfo/texinfo/link-zip.patch b/meta/recipes-extended/texinfo/texinfo/link-zip.patch
new file mode 100644
index 0000000..0b6e9fd
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/link-zip.patch
@@ -0,0 +1,16 @@
+install-info uses symbols from zlib so must link against it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joshua Lock <josh@linux.intel.com>
+
+Index: texinfo-5.1/install-info/Makefile.am
+===================================================================
+--- texinfo-5.1.orig/install-info/Makefile.am
++++ texinfo-5.1/install-info/Makefile.am
+@@ -34,4 +34,4 @@ AM_CPPFLAGS = 					\
+   -I$(top_srcdir)/gnulib/lib			\
+   -I$(top_builddir)/gnulib/lib			\
+   -DLOCALEDIR=\"$(localedir)\"
+-LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
++LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL) -lz
diff --git a/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch
new file mode 100644
index 0000000..41bd220
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/texinfo-4.12-zlib.patch
@@ -0,0 +1,233 @@
+From 20e1d8a9481dc13dd1d4d168b90e0ed2ff097b98 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 6 Aug 2015 14:29:57 +0300
+Subject: [PATCH] texinfo-4.12-zlib
+
+Upstream-Status: Pending
+---
+ install-info/Makefile.in    |  2 +-
+ install-info/install-info.c | 67 +++++++++++++++++++++++++++------------------
+ 2 files changed, 42 insertions(+), 27 deletions(-)
+
+diff --git a/install-info/Makefile.in b/install-info/Makefile.in
+index ad73abb..eaa2153 100644
+--- a/install-info/Makefile.in
++++ b/install-info/Makefile.in
+@@ -241,7 +241,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
+ PROGRAMS = $(bin_PROGRAMS)
+ am_ginstall_info_OBJECTS = install-info.$(OBJEXT)
+ ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS)
+-ginstall_info_LDADD = $(LDADD)
++ginstall_info_LDADD = $(LDADD) -lz
+ am__DEPENDENCIES_1 =
+ ginstall_info_DEPENDENCIES = $(top_builddir)/gnulib/lib/libgnu.a \
+ 	$(am__DEPENDENCIES_1)
+diff --git a/install-info/install-info.c b/install-info/install-info.c
+index b454c15..4e39122 100644
+--- a/install-info/install-info.c
++++ b/install-info/install-info.c
+@@ -22,6 +22,7 @@
+ #include <getopt.h>
+ #include <regex.h>
+ #include <argz.h>
++#include <zlib.h>
+ 
+ #define TAB_WIDTH 8
+ 
+@@ -684,15 +685,15 @@ The first time you invoke Info you start off looking at this node.\n\
+    
+    Return either stdin reading the file, or a non-stdin pipe reading
+    the output of the compression program.  */
+-FILE *
++void *
+ open_possibly_compressed_file (char *filename,
+     void (*create_callback) (char *),
+-    char **opened_filename, char **compression_program) 
++    char **opened_filename, char **compression_program, int *is_pipe) 
+ {
+   char *local_opened_filename, *local_compression_program;
+   int nread;
+   char data[13];
+-  FILE *f;
++  gzFile *f;
+ 
+   /* We let them pass NULL if they don't want this info, but it's easier
+      to always determine it.  */
+@@ -700,48 +701,48 @@ open_possibly_compressed_file (char *filename,
+     opened_filename = &local_opened_filename;
+ 
+   *opened_filename = filename;
+-  f = fopen (*opened_filename, FOPEN_RBIN);
++  f = gzopen (*opened_filename, FOPEN_RBIN);
+   if (!f)
+     {
+       *opened_filename = concat (filename, ".gz", "");
+-      f = fopen (*opened_filename, FOPEN_RBIN);
++      f = gzopen (*opened_filename, FOPEN_RBIN);
+     }
+   if (!f)
+     {
+       free (*opened_filename);
+       *opened_filename = concat (filename, ".xz", "");
+-      f = fopen (*opened_filename, FOPEN_RBIN);
++      f = gzopen (*opened_filename, FOPEN_RBIN);
+     }
+   if (!f)
+     {
+       free (*opened_filename);
+       *opened_filename = concat (filename, ".bz2", "");
+-      f = fopen (*opened_filename, FOPEN_RBIN);
++      f = gzopen (*opened_filename, FOPEN_RBIN);
+     }
+   if (!f)
+     {
+       free (*opened_filename);
+       *opened_filename = concat (filename, ".lz", "");
+-      f = fopen (*opened_filename, FOPEN_RBIN);
++      f = gzopen (*opened_filename, FOPEN_RBIN);
+     }
+   if (!f)
+     {
+      free (*opened_filename);
+      *opened_filename = concat (filename, ".lzma", "");
+-     f = fopen (*opened_filename, FOPEN_RBIN);
++     f = gzopen (*opened_filename, FOPEN_RBIN);
+     }
+ #ifdef __MSDOS__
+   if (!f)
+     {
+       free (*opened_filename);
+       *opened_filename = concat (filename, ".igz", "");
+-      f = fopen (*opened_filename, FOPEN_RBIN);
++      f = gzopen (*opened_filename, FOPEN_RBIN);
+     }
+   if (!f)
+     {
+       free (*opened_filename);
+       *opened_filename = concat (filename, ".inz", "");
+-      f = fopen (*opened_filename, FOPEN_RBIN);
++      f = gzopen (*opened_filename, FOPEN_RBIN);
+     }
+ #endif /* __MSDOS__ */
+   if (!f)
+@@ -757,7 +758,7 @@ open_possibly_compressed_file (char *filename,
+           (*create_callback) (filename);
+ 
+           /* And try opening it again.  */
+-          f = fopen (*opened_filename, FOPEN_RBIN);
++          f = gzopen (*opened_filename, FOPEN_RBIN);
+           if (!f)
+             return 0;
+         }
+@@ -767,12 +768,12 @@ open_possibly_compressed_file (char *filename,
+ 
+   /* Read first few bytes of file rather than relying on the filename.
+      If the file is shorter than this it can't be usable anyway.  */
+-  nread = fread (data, sizeof (data), 1, f);
+-  if (nread != 1)
++  nread = gzread (f, data, sizeof (data));
++  if (nread != sizeof (data))
+     {
+       /* Empty files don't set errno.  Calling code can check for
+          this, so make sure errno == 0 just in case it isn't already. */
+-      if (nread == 0)
++      if (nread >= 0)
+         errno = 0;
+       return 0;
+     }
+@@ -838,35 +839,40 @@ open_possibly_compressed_file (char *filename,
+     *compression_program = NULL;
+ 
+   /* Seek back over the magic bytes.  */
+-  if (fseek (f, 0, 0) < 0)
++  if (gzseek (f, 0, SEEK_SET) == -1)
+     return 0;
+ 
+   if (*compression_program)
+     { /* It's compressed, so open a pipe.  */
++      FILE *p;
+       char *command = concat (*compression_program, " -d", "");
+ 
+-      if (fclose (f) < 0)
++      if (gzclose (f) < 0)
+         return 0;
+-      f = freopen (*opened_filename, FOPEN_RBIN, stdin);
+-      if (!f)
++      p = freopen (*opened_filename, FOPEN_RBIN, stdin);
++      if (!p)
+         return 0;
+-      f = popen (command, "r");
+-      if (!f)
++      p = popen (command, "r");
++      if (!p)
+         {
+           /* Used for error message in calling code. */
+           *opened_filename = command;
+           return 0;
+         }
++      else
++        *is_pipe = 1;
++      return p;
+     }
+   else
+     {
+-#if O_BINARY
++#if 0 && O_BINARY
+       /* Since this is a text file, and we opened it in binary mode,
+          switch back to text mode.  */
+       f = freopen (*opened_filename, "r", f);
+       if (! f)
+ 	return 0;
+ #endif
++      *is_pipe = 0;
+     }
+ 
+   return f;
+@@ -885,7 +891,8 @@ readfile (char *filename, int *sizep,
+     void (*create_callback) (char *), char **opened_filename,
+     char **compression_program)
+ {
+-  FILE *f;
++  void *f;
++  int pipe_p;
+   int filled = 0;
+   int data_size = 8192;
+   char *data = xmalloc (data_size);
+@@ -893,14 +900,20 @@ readfile (char *filename, int *sizep,
+   /* If they passed the space for the file name to return, use it.  */
+   f = open_possibly_compressed_file (filename, create_callback,
+                                      opened_filename,
+-                                     compression_program);
++                                     compression_program,
++                                     &pipe_p);
+ 
+   if (!f)
+     return 0;
+ 
+   for (;;)
+     {
+-      int nread = fread (data + filled, 1, data_size - filled, f);
++      int nread;
++
++      if (pipe_p)
++        nread = fread (data + filled, 1, data_size - filled, f);
++      else
++        nread = gzread (f, data + filled, data_size - filled);
+       if (nread < 0)
+         return 0;
+       if (nread == 0)
+@@ -919,8 +932,10 @@ readfile (char *filename, int *sizep,
+   /* We need to close the stream, since on some systems the pipe created
+      by popen is simulated by a temporary file which only gets removed
+      inside pclose.  */
+-  if (f != stdin)
++  if (pipe_p)
+     pclose (f);
++  else
++    gzclose (f);
+ 
+   *sizep = filled;
+   return data;
+-- 
+2.1.4
+
diff --git a/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch b/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch
new file mode 100644
index 0000000..5b7f32d
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo/use_host_makedoc.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Inappropriate [cross build specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: texinfo-5.1/info/Makefile.am
+===================================================================
+--- texinfo-5.1.orig/info/Makefile.am
++++ texinfo-5.1/info/Makefile.am
+@@ -76,7 +76,7 @@ cmd_sources = $(srcdir)/session.c $(srcd
+ # more than once.
+ funs.h: makedoc$(EXEEXT) $(cmd_sources)
+ 	rm -f $(generated_sources)
+-	$(top_builddir)/$(native_tools)/info/makedoc $(cmd_sources)
++	makedoc $(cmd_sources)
+ 
+ # The following hack is necessary to hint make before the automatic
+ # dependencies are built.
diff --git a/meta/recipes-extended/texinfo/texinfo_4.8.bb b/meta/recipes-extended/texinfo/texinfo_4.8.bb
new file mode 100644
index 0000000..13678e0
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo_4.8.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Documentation system for on-line information and printed output"
+DESCRIPTION = "Texinfo is a documentation system that can produce both \
+online information and printed output from a single source file. The \
+GNU Project uses the Texinfo file format for most of its documentation."
+HOMEPAGE = "http://www.gnu.org/software/texinfo/"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+PROVIDES_append_class-native = " texinfo-4.8-replacement-native"
+
+DEPENDS = "zlib ncurses texinfo-4.8-replacement-native"
+DEPENDS_class-native = "zlib-native ncurses-native"
+
+TARGET_PATCH = "file://use_host_makedoc.patch \
+           file://using-native-makeinfo.patch \
+"
+TARGET_PATCH_class-native = ""
+
+SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
+           file://check-locale-h.patch \
+           file://do-compile-native-tools.patch \
+           ${TARGET_PATCH} \
+          "
+
+SRC_URI[md5sum] = "4e9a1a591ed236003d0d4b008bf07eef"
+SRC_URI[sha256sum] = "1f3cdeebe65fdf510f55d765ab1031b54416aa5bc2635b6a54ef9bcb2367c917"
+
+tex_texinfo = "texmf/tex/texinfo"
+
+inherit gettext autotools
+
+do_install_append() {
+	mkdir -p ${D}${datadir}/${tex_texinfo}
+	install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
+}
+
+do_install_append_class-native() {
+	install -m 755 info/makedoc ${D}${bindir}
+	install -m 755 makeinfo/makeinfo ${D}${bindir}
+}
+
+PACKAGES += "info info-doc"
+
+FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
+FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \
+                  ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
+                  ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
+
+FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
+FILES_${PN}-doc = "${infodir}/texinfo* \
+                   ${datadir}/${tex_texinfo} \
+                   ${mandir}/man1 ${mandir}/man5"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/texinfo/texinfo_6.0.bb b/meta/recipes-extended/texinfo/texinfo_6.0.bb
new file mode 100644
index 0000000..8fb715a
--- /dev/null
+++ b/meta/recipes-extended/texinfo/texinfo_6.0.bb
@@ -0,0 +1,82 @@
+SUMMARY = "Documentation system for on-line information and printed output"
+DESCRIPTION = "Texinfo is a documentation system that can produce both \
+online information and printed output from a single source file. The \
+GNU Project uses the Texinfo file format for most of its documentation."
+HOMEPAGE = "http://www.gnu.org/software/texinfo/"
+SECTION = "console/utils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PROVIDES_append_class-native = " texinfo-replacement-native"
+
+def compress_pkg(d):
+    if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
+         compress = d.getVar("DOC_COMPRESS", True)
+         if compress == "gz":
+             return "gzip"
+         elif compress == "bz2":
+             return "bzip2"
+         elif compress == "xz":
+             return "xz"
+    return ""
+
+RDEPENDS_info += "${@compress_pkg(d)}"
+
+DEPENDS = "zlib ncurses texinfo-replacement-native"
+DEPENDS_class-native = "zlib-native ncurses-native"
+
+TARGET_PATCH = "file://use_host_makedoc.patch"
+TARGET_PATCH_class-native = ""
+
+SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \
+           file://texinfo-4.12-zlib.patch \
+           file://disable-native-tools.patch \
+           file://link-zip.patch \
+           file://dont-depend-on-help2man.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           ${TARGET_PATCH} \
+          "
+
+SRC_URI[md5sum] = "e1a2ef5dce5018b53f0f6eed45b247a7"
+SRC_URI[sha256sum] = "83d3183290f34e7f958d209d0b20022c6fe9e921eb6fe94c27d988827d4878d2"
+
+tex_texinfo = "texmf/tex/texinfo"
+
+inherit gettext autotools
+
+do_configure_prepend () {
+	# autotools_do_configure updates po/Makefile.in.in, we also need
+	# update po_document.
+	cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po_document/
+}
+
+do_compile_prepend() {
+	if [ -d tools ];then
+		oe_runmake -C tools/gnulib/lib
+	fi
+}
+
+do_install_append() {
+	mkdir -p ${D}${datadir}/${tex_texinfo}
+	install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo}
+	sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi
+}
+
+do_install_append_class-native() {
+	install -m 755 info/makedoc ${D}${bindir}
+}
+
+PACKAGES += "info info-doc"
+
+FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info"
+FILES_info-doc = "${infodir}/info.info* ${infodir}/dir ${infodir}/info-*.info* \
+                  ${mandir}/man1/info.1* ${mandir}/man5/info.5* \
+                  ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*"
+
+FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo"
+RDEPENDS_${PN} = "perl"
+FILES_${PN}-doc = "${infodir}/texinfo* \
+                   ${datadir}/${tex_texinfo} \
+                   ${mandir}/man1 ${mandir}/man5"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/time/time-1.7/debian.patch b/meta/recipes-extended/time/time-1.7/debian.patch
new file mode 100644
index 0000000..23ea0e3
--- /dev/null
+++ b/meta/recipes-extended/time/time-1.7/debian.patch
@@ -0,0 +1,1301 @@
+Upstream-Status: Backport
+
+--- time-1.7.orig/configure.in
++++ time-1.7/configure.in
+@@ -1,11 +1,8 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(time.c)
+-VERSION=1.7
+-AC_SUBST(VERSION)
+-PACKAGE=time
+-AC_SUBST(PACKAGE)
++AM_INIT_AUTOMAKE(time, 1.7)
+ 
+-AC_ARG_PROGRAM
++AM_MAINTAINER_MODE
+ 
+ dnl Checks for programs.
+ AC_PROG_CC
+@@ -15,7 +12,7 @@
+ dnl Checks for header files.
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h)
++AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h sys/resource.h)
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+--- time-1.7.orig/version.texi
++++ time-1.7/version.texi
+@@ -1,3 +1,3 @@
+-@set UPDATED 12 June 1996
++@set UPDATED 9 May 2002
+ @set EDITION 1.7
+ @set VERSION 1.7
+--- time-1.7.orig/time.c
++++ time-1.7/time.c
+@@ -147,6 +147,10 @@
+   NULL
+ };
+ 
++
++/* If true, do not show the exit message */
++static boolean quiet;
++
+ /* If true, show an English description next to each statistic.  */
+ static boolean verbose;
+ 
+@@ -172,6 +176,7 @@
+   {"help", no_argument, NULL, 'h'},
+   {"output-file", required_argument, NULL, 'o'},
+   {"portability", no_argument, NULL, 'p'},
++  {"quiet", no_argument,NULL, 'q'},
+   {"verbose", no_argument, NULL, 'v'},
+   {"version", no_argument, NULL, 'V'},
+   {NULL, no_argument, NULL, 0}
+@@ -333,7 +338,8 @@
+   else if (WIFSIGNALED (resp->waitstatus))
+     fprintf (fp, "Command terminated by signal %d\n",
+ 	     WTERMSIG (resp->waitstatus));
+-  else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus))
++  else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)
++	   && !quiet)
+     fprintf (fp, "Command exited with non-zero status %d\n",
+ 	     WEXITSTATUS (resp->waitstatus));
+ 
+@@ -523,6 +529,7 @@
+   char *format;			/* Format found in environment.  */
+ 
+   /* Initialize the option flags.  */
++  quiet = false;
+   verbose = false;
+   outfile = NULL;
+   outfp = stderr;
+@@ -536,7 +543,7 @@
+   if (format)
+     output_format = format;
+ 
+-  while ((optc = getopt_long (argc, argv, "+af:o:pvV", longopts, (int *) 0))
++  while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0))
+ 	 != EOF)
+     {
+       switch (optc)
+@@ -555,6 +562,9 @@
+ 	case 'p':
+ 	  output_format = posix_format;
+ 	  break;
++	case 'q':
++	  quiet = true;
++	  break;
+ 	case 'v':
+ 	  verbose = true;
+ 	  break;
+@@ -642,9 +652,9 @@
+   fflush (outfp);
+ 
+   if (WIFSTOPPED (res.waitstatus))
+-    exit (WSTOPSIG (res.waitstatus));
++    exit (WSTOPSIG (res.waitstatus) + 128);
+   else if (WIFSIGNALED (res.waitstatus))
+-    exit (WTERMSIG (res.waitstatus));
++    exit (WTERMSIG (res.waitstatus) + 128);
+   else if (WIFEXITED (res.waitstatus))
+     exit (WEXITSTATUS (res.waitstatus));
+ }
+@@ -657,7 +667,7 @@
+   fprintf (stream, "\
+ Usage: %s [-apvV] [-f format] [-o file] [--append] [--verbose]\n\
+        [--portability] [--format=format] [--output=file] [--version]\n\
+-       [--help] command [arg...]\n",
++       [--quiet] [--help] command [arg...]\n",
+ 	   program_name);
+   exit (status);
+ }
+--- time-1.7.orig/resuse.h
++++ time-1.7/resuse.h
+@@ -36,19 +36,8 @@
+ # include <sys/rusage.h>
+ #else
+ # define TV_MSEC tv_usec / 1000
+-# if HAVE_WAIT3
++# if HAVE_SYS_RESOURCE_H
+ #  include <sys/resource.h>
+-# else
+-/* Process resource usage structure.  */
+-struct rusage
+-{
+-  struct timeval ru_utime;	/* User time used.  */
+-  struct timeval ru_stime;	/* System time used.  */
+-  int ru_maxrss, ru_ixrss, ru_idrss, ru_isrss,
+-  ru_minflt, ru_majflt, ru_nswap, ru_inblock, 
+-  ru_oublock, ru_msgsnd, ru_msgrcv, ru_nsignals,
+-  ru_nvcsw, ru_nivcsw;
+-};
+ # endif
+ #endif
+ 
+--- time-1.7.orig/time.texi
++++ time-1.7/time.texi
+@@ -11,6 +11,12 @@
+ @finalout
+ @end iftex
+ 
++@dircategory Individual utilities
++@direntry
++* time: (time).                     Run programs and summarize
++                                    system resource usage.
++@end direntry
++
+ @ifinfo
+ This file documents the the GNU @code{time} command for running programs
+ and summarizing the system resources they use.
+@@ -185,6 +191,10 @@
+ sys %S
+ @end example
+ 
++@item -q
++@itemx --quiet
++Suppress non-zero error code from the executed program.
++
+ @item -v
+ @itemx --verbose
+ @cindex format
+--- time-1.7.orig/time.info
++++ time-1.7/time.info
+@@ -1,5 +1,10 @@
+-This is Info file ./time.info, produced by Makeinfo-1.55 from the input
+-file time.texi.
++This is time.info, produced by makeinfo version 4.1 from time.texi.
++
++INFO-DIR-SECTION Individual utilities
++START-INFO-DIR-ENTRY
++* time: (time).                     Run programs and summarize
++                                    system resource usage.
++END-INFO-DIR-ENTRY
+ 
+    This file documents the the GNU `time' command for running programs
+ and summarizing the system resources they use.
+@@ -31,7 +36,7 @@
+ 
+ * Resource Measurement::  Measuring program resource use.
+ 
+- -- The Detailed Node Listing --
++ --- The Detailed Node Listing ---
+ 
+ Measuring Program Resource Use
+ 
+@@ -58,14 +63,14 @@
+    The `time' command runs another program, then displays information
+ about the resources used by that program, collected by the system while
+ the program was running.  You can select which information is reported
+-and the format in which it is shown (*note Setting Format::.), or have
++and the format in which it is shown (*note Setting Format::), or have
+ `time' save the information in a file instead of displaying it on the
+-screen (*note Redirecting::.).
++screen (*note Redirecting::).
+ 
+    The resources that `time' can report on fall into the general
+ categories of time, memory, and I/O and IPC calls.  Some systems do not
+ provide much information about program resource use; `time' reports
+-unavailable information as zero values (*note Accuracy::.).
++unavailable information as zero values (*note Accuracy::).
+ 
+    The format of the `time' command is:
+ 
+@@ -132,6 +137,10 @@
+           user %U
+           sys %S
+ 
++`-q'
++`--quiet'
++     Suppress non-zero error code from the executed program.
++
+ `-v'
+ `--verbose'
+      Use the built-in verbose format, which displays each available
+@@ -174,7 +183,7 @@
+    The resource specifiers, which are a superset of those recognized by
+ the `tcsh' builtin `time' command, are listed below.  Not all resources
+ are measured by all versions of Unix, so some of the values might be
+-reported as zero (*note Accuracy::.).
++reported as zero (*note Accuracy::).
+ 
+ * Menu:
+ 
+@@ -308,11 +317,11 @@
+ `-o FILE'
+ `--output=FILE'
+      Write the resource use statistics to FILE.  By default, this
+-     *overwrites* the file, destroying the file's previous contents.
++     _overwrites_ the file, destroying the file's previous contents.
+ 
+ `-a'
+ `--append'
+-     *Append* the resource use information to the output file instead
++     _Append_ the resource use information to the output file instead
+      of overwriting it.  This option is only useful with the `-o' or
+      `--output' option.
+ 
+@@ -437,7 +446,7 @@
+ 
+ `-a'
+ `--append'
+-     *Append* the resource use information to the output file instead
++     _Append_ the resource use information to the output file instead
+      of overwriting it.
+ 
+ `-f FORMAT'
+@@ -462,17 +471,17 @@
+ 
+ 
+ Tag Table:
+-Node: Top934
+-Node: Resource Measurement1725
+-Node: Setting Format3678
+-Node: Format String4907
+-Node: Time Resources6214
+-Node: Memory Resources6844
+-Node: I/O Resources7549
+-Node: Command Info8747
+-Node: Redirecting8964
+-Node: Examples9754
+-Node: Accuracy12064
+-Node: Invoking time13586
++Node: Top1115
++Node: Resource Measurement1908
++Node: Setting Format3858
++Node: Format String5164
++Node: Time Resources6470
++Node: Memory Resources7100
++Node: I/O Resources7805
++Node: Command Info9003
++Node: Redirecting9220
++Node: Examples10010
++Node: Accuracy12320
++Node: Invoking time13842
+ 
+ End Tag Table
+--- time-1.7.orig/time.html
++++ time-1.7/time.html
+@@ -0,0 +1,1021 @@
++<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
++                      "http://www.w3.org/TR/html40/loose.dtd">
++<HTML>
++<!-- Created on September, 1 2003 by texi2html 1.66 -->
++<!--
++Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
++            Karl Berry  <karl@freefriends.org>
++            Olaf Bachmann <obachman@mathematik.uni-kl.de>
++            and many others.
++Maintained by: Many creative people <dev@texi2html.cvshome.org>
++Send bugs and suggestions to <users@texi2html.cvshome.org>
++
++-->
++<HEAD>
++<TITLE>Measuring Program Resource Use</TITLE>
++
++<META NAME="description" CONTENT="Measuring Program Resource Use">
++<META NAME="keywords" CONTENT="Measuring Program Resource Use">
++<META NAME="resource-type" CONTENT="document">
++<META NAME="distribution" CONTENT="global">
++<META NAME="Generator" CONTENT="texi2html 1.66">
++
++</HEAD>
++
++<BODY LANG="en" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
++
++<A NAME="SEC_Top"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H1>Measuring Program Resource Use</H1>
++
++<P>
++
++This file documents the the GNU <CODE>time</CODE> command for running programs
++and summarizing the system resources they use.
++This is edition 1.7, for version 1.7.
++</P>
++<P>
++
++</P>
++<TABLE BORDER="0" CELLSPACING="0">
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC1">1. Measuring Program Resource Use</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Measuring program resource use.</TD></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP"> -- The Detailed Node Listing ---
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">Measuring Program Resource Use
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">The Format String
++</TH></TR>
++<TR><TH COLSPAN="3" ALIGN="left" VALIGN="TOP">
++</TH></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++</TABLE>
++<P>
++
++<HR SIZE=1>
++<A NAME="SEC1"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<A NAME="Resource Measurement"></A>
++<H1> 1. Measuring Program Resource Use </H1>
++<!--docid::SEC1::-->
++<P>
++
++The <CODE>time</CODE> command runs another program, then displays information
++about the resources used by that program, collected by the system while
++the program was running.  You can select which information is reported
++and the format in which it is shown (see section <A HREF="time.html#SEC2">1.1 Setting the Output Format</A>), or have
++<CODE>time</CODE> save the information in a file instead of displaying it on the
++screen (see section <A HREF="time.html#SEC8">1.3 Redirecting Output</A>).
++</P>
++<P>
++
++The resources that <CODE>time</CODE> can report on fall into the general
++categories of time, memory, and I/O and IPC calls.  Some systems do not
++provide much information about program resource use; <CODE>time</CODE>
++reports unavailable information as zero values (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
++</P>
++<P>
++
++The format of the <CODE>time</CODE> command is:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
++</pre></td></tr></table><P>
++
++<A NAME="IDX1"></A>
++<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
++<VAR>arg</VAR><small>...</small>.  When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
++information about resources used by <VAR>command</VAR>.
++</P>
++<P>
++
++Here is an example of using <CODE>time</CODE> to measure the time and other
++resources used by running the program <CODE>grep</CODE>:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time grep nobody /etc/aliases
++nobody:/dev/null
++etc-files:nobody
++misc-group:nobody
++0.07user 0.50system 0:06.69elapsed 8%CPU (0avgtext+489avgdata 324maxresident)k
++46inputs+7outputs (43major+251minor)pagefaults 0swaps
++</pre></td></tr></table><P>
++
++Mail suggestions and bug reports for GNU <CODE>time</CODE> to
++<CODE>bug-gnu-utils@prep.ai.mit.edu</CODE>.  Please include the version of
++<CODE>time</CODE>, which you can get by running `<SAMP>time --version</SAMP>', and the
++operating system and C compiler you used.
++</P>
++<P>
++
++<TABLE BORDER="0" CELLSPACING="0">
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC2">1.1 Setting the Output Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Selecting the information reported by <CODE>time</CODE>.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC3">1.2 The Format String</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The information <CODE>time</CODE> can report.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC8">1.3 Redirecting Output</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Writing the information to a file.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC9">1.4 Examples</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Examples of using <CODE>time</CODE>.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC10">1.5 Accuracy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Limitations on the accuracy of <CODE>time</CODE> output.</TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Summary of the options to the <CODE>time</CODE> command.</TD></TR>
++</TABLE>
++<P>
++
++<A NAME="Setting Format"></A>
++<HR SIZE="6">
++<A NAME="SEC2"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.1 Setting the Output Format </H2>
++<!--docid::SEC2::-->
++<P>
++
++<CODE>time</CODE> uses a <EM>format string</EM> to determine which information to
++display about the resources used by the command it runs.  See section <A HREF="time.html#SEC3">1.2 The Format String</A>, for the interpretation of the format string contents.
++</P>
++<P>
++
++You can specify a format string with the command line options listed
++below.  If no format is specified on the command line, but the
++<CODE>TIME</CODE> environment variable is set, its value is used as the format
++string.  Otherwise, the default format built into <CODE>time</CODE> is used:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
++%Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps
++</pre></td></tr></table><P>
++
++The command line options to set the format are:
++</P>
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>-f <VAR>format</VAR></CODE>
++<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
++<DD>Use <VAR>format</VAR> as the format string.
++<P>
++
++</P>
++<DT><CODE>-p</CODE>
++<DD><DT><CODE>--portability</CODE>
++<DD>Use the following format string, for conformance with POSIX standard
++1003.2:
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>real %e
++user %U
++sys %S
++</pre></td></tr></table><P>
++
++</P>
++<DT><CODE>-q</CODE>
++<DD><DT><CODE>--quiet</CODE>
++<DD>Suppress non-zero error code from the executed program.
++<P>
++
++</P>
++<DT><CODE>-v</CODE>
++<DD><DT><CODE>--verbose</CODE>
++<DD><A NAME="IDX2"></A>
++Use the built-in verbose format, which displays each available piece of
++information on the program's resource use on its own line, with an
++English description of its meaning.
++</DL>
++<P>
++
++<A NAME="Format String"></A>
++<HR SIZE="6">
++<A NAME="SEC3"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC2"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.2 The Format String </H2>
++<!--docid::SEC3::-->
++<P>
++
++<A NAME="IDX3"></A>
++<A NAME="IDX4"></A>
++The <EM>format string</EM> controls the contents of the <CODE>time</CODE> output.
++It consists of <EM>resource specifiers</EM> and <EM>escapes</EM>, interspersed
++with plain text.
++</P>
++<P>
++
++A backslash introduces an <EM>escape</EM>, which is translated
++into a single printing character upon output.  The valid escapes are
++listed below.  An invalid escape is output as a question mark followed
++by a backslash.
++</P>
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>\t</CODE>
++<DD>a tab character
++<P>
++
++</P>
++<DT><CODE>\n</CODE>
++<DD>a newline
++<P>
++
++</P>
++<DT><CODE>\\</CODE>
++<DD>a literal backslash
++</DL>
++<P>
++
++<CODE>time</CODE> always prints a newline after printing the resource use
++information, so normally format strings do not end with a newline
++character (or `<SAMP>\n</SAMP>').
++</P>
++<P>
++
++A resource specifier consists of a percent sign followed by another
++character.  An invalid resource specifier is output as a question mark
++followed by the invalid character.  Use `<SAMP>%%</SAMP>' to output a literal
++percent sign.
++</P>
++<P>
++
++The resource specifiers, which are a superset of those recognized by the
++<CODE>tcsh</CODE> builtin <CODE>time</CODE> command, are listed below.  Not all
++resources are measured by all versions of Unix, so some of the values
++might be reported as zero (see section <A HREF="time.html#SEC10">1.5 Accuracy</A>).
++</P>
++<P>
++
++<TABLE BORDER="0" CELLSPACING="0">
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC4">1.2.1 Time Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC5">1.2.2 Memory Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC6">1.2.3 I/O Resources</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="time.html#SEC7">1.2.4 Command Info</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
++</TABLE>
++<P>
++
++<A NAME="Time Resources"></A>
++<HR SIZE="6">
++<A NAME="SEC4"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC3"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H3> 1.2.1 Time Resources </H3>
++<!--docid::SEC4::-->
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>E</CODE>
++<DD>Elapsed real (wall clock) time used by the process, in
++[hours:]minutes:seconds.
++<P>
++
++</P>
++<DT><CODE>e</CODE>
++<DD>Elapsed real (wall clock) time used by the process, in
++seconds.
++<P>
++
++</P>
++<DT><CODE>S</CODE>
++<DD>Total number of CPU-seconds used by the system on behalf of the process
++(in kernel mode), in seconds.
++<P>
++
++</P>
++<DT><CODE>U</CODE>
++<DD>Total number of CPU-seconds that the process used directly (in user
++mode), in seconds.
++<P>
++
++</P>
++<DT><CODE>P</CODE>
++<DD>Percentage of the CPU that this job got.  This is just user + system
++times divied by the total running time.
++</DL>
++<P>
++
++<A NAME="Memory Resources"></A>
++<HR SIZE="6">
++<A NAME="SEC5"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC4"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H3> 1.2.2 Memory Resources </H3>
++<!--docid::SEC5::-->
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>M</CODE>
++<DD>Maximum resident set size of the process during its lifetime, in
++Kilobytes.
++<P>
++
++</P>
++<DT><CODE>t</CODE>
++<DD>Average resident set size of the process, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>K</CODE>
++<DD>Average total (data+stack+text) memory use of the process, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>D</CODE>
++<DD>Average size of the process's unshared data area, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>p</CODE>
++<DD>Average size of the process's unshared stack, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>X</CODE>
++<DD>Average size of the process's shared text, in Kilobytes.
++<P>
++
++</P>
++<DT><CODE>Z</CODE>
++<DD>System's page size, in bytes.  This is a per-system constant, but
++varies between systems.
++</DL>
++<P>
++
++<A NAME="I/O Resources"></A>
++<HR SIZE="6">
++<A NAME="SEC6"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC5"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H3> 1.2.3 I/O Resources </H3>
++<!--docid::SEC6::-->
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>F</CODE>
++<DD>Number of major, or I/O-requiring, page faults that occurred while the
++process was running.  These are faults where the page has actually
++migrated out of primary memory.
++<P>
++
++</P>
++<DT><CODE>R</CODE>
++<DD>Number of minor, or recoverable, page faults.  These are pages that are
++not valid (so they fault) but which have not yet been claimed by other
++virtual pages.  Thus the data in the page is still valid but the system
++tables must be updated.
++<P>
++
++</P>
++<DT><CODE>W</CODE>
++<DD>Number of times the process was swapped out of main memory.
++<P>
++
++</P>
++<DT><CODE>c</CODE>
++<DD>Number of times the process was context-switched involuntarily (because
++the time slice expired).
++<P>
++
++</P>
++<DT><CODE>w</CODE>
++<DD>Number of times that the program was context-switched voluntarily, for
++instance while waiting for an I/O operation to complete.
++<P>
++
++</P>
++<DT><CODE>I</CODE>
++<DD>Number of file system inputs by the process.
++<P>
++
++</P>
++<DT><CODE>O</CODE>
++<DD>Number of file system outputs by the process.
++<P>
++
++</P>
++<DT><CODE>r</CODE>
++<DD>Number of socket messages received by the process.
++<P>
++
++</P>
++<DT><CODE>s</CODE>
++<DD>Number of socket messages sent by the process.
++<P>
++
++</P>
++<DT><CODE>k</CODE>
++<DD>Number of signals delivered to the process.
++</DL>
++<P>
++
++<A NAME="Command Info"></A>
++<HR SIZE="6">
++<A NAME="SEC7"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC6"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H3> 1.2.4 Command Info </H3>
++<!--docid::SEC7::-->
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>C</CODE>
++<DD>Name and command line arguments of the command being timed.
++<P>
++
++</P>
++<DT><CODE>x</CODE>
++<DD>Exit status of the command.
++</DL>
++<P>
++
++<A NAME="Redirecting"></A>
++<HR SIZE="6">
++<A NAME="SEC8"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC7"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.3 Redirecting Output </H2>
++<!--docid::SEC8::-->
++<P>
++
++By default, <CODE>time</CODE> writes the resource use statistics to the
++standard error stream.  The options below make it write the statistics
++to a file instead.  Doing this can be useful if the program you're
++running writes to the standard error or you're running <CODE>time</CODE>
++noninteractively or in the background.
++</P>
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>-o <VAR>file</VAR></CODE>
++<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
++<DD>Write the resource use statistics to <VAR>file</VAR>.  By default, this
++<EM>overwrites</EM> the file, destroying the file's previous contents.
++<P>
++
++</P>
++<DT><CODE>-a</CODE>
++<DD><DT><CODE>--append</CODE>
++<DD><EM>Append</EM> the resource use information to the output file instead
++of overwriting it.  This option is only useful with the `<SAMP>-o</SAMP>' or
++`<SAMP>--output</SAMP>' option.
++</DL>
++<P>
++
++<A NAME="Examples"></A>
++<HR SIZE="6">
++<A NAME="SEC9"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC8"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.4 Examples </H2>
++<!--docid::SEC9::-->
++<P>
++
++Run the command `<SAMP>wc /etc/hosts</SAMP>' and show the default information:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time wc /etc/hosts
++      35     111    1134 /etc/hosts
++0.00user 0.01system 0:00.04elapsed 25%CPU (0avgtext+0avgdata 0maxresident)k
++1inputs+1outputs (0major+0minor)pagefaults 0swaps
++</pre></td></tr></table><P>
++
++Run the command `<SAMP>ls -Fs</SAMP>' and show just the user, system, and
++wall-clock time:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -f &quot;\t%E real,\t%U user,\t%S sys&quot; ls -Fs
++total 16
++1 account/      1 db/           1 mail/         1 run/
++1 backups/      1 emacs/        1 msgs/         1 rwho/
++1 crash/        1 games/        1 preserve/     1 spool/
++1 cron/         1 log/          1 quotas/       1 tmp/
++        0:00.03 real,   0.00 user,      0.01 sys
++</pre></td></tr></table><P>
++
++Edit the file `<TT>.bashrc</TT>' and have <CODE>time</CODE> append the elapsed time
++and number of signals to the file `<TT>log</TT>', reading the format string
++from the environment variable <CODE>TIME</CODE>:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ export TIME=&quot;\t%E,\t%k&quot; # If using bash or ksh
++eg$ setenv TIME &quot;\t%E,\t%k&quot; # If using csh or tcsh
++eg$ time -a -o log emacs .bashrc
++eg$ cat log
++        0:16.55,        726
++</pre></td></tr></table><P>
++
++Run the command `<SAMP>sleep 4</SAMP>' and show all of the information about it
++verbosely:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>eg$ time -v sleep 4
++        Command being timed: &quot;sleep 4&quot;
++        User time (seconds): 0.00
++        System time (seconds): 0.05
++        Percent of CPU this job got: 1%
++        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.26
++        Average shared text size (kbytes): 36
++        Average unshared data size (kbytes): 24
++        Average stack size (kbytes): 0
++        Average total size (kbytes): 60
++        Maximum resident set size (kbytes): 32
++        Average resident set size (kbytes): 24
++        Major (requiring I/O) page faults: 3
++        Minor (reclaiming a frame) page faults: 0
++        Voluntary context switches: 11
++        Involuntary context switches: 0
++        Swaps: 0
++        File system inputs: 3
++        File system outputs: 1
++        Socket messages sent: 0
++        Socket messages received: 0
++        Signals delivered: 1
++        Page size (bytes): 4096
++        Exit status: 0
++</pre></td></tr></table><P>
++
++<A NAME="Accuracy"></A>
++<HR SIZE="6">
++<A NAME="SEC10"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC9"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC11"> &gt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.5 Accuracy </H2>
++<!--docid::SEC10::-->
++<P>
++
++The elapsed time is not collected atomically with the execution of the
++program; as a result, in bizarre circumstances (if the <CODE>time</CODE>
++command gets stopped or swapped out in between when the program being
++timed exits and when <CODE>time</CODE> calculates how long it took to run), it
++could be much larger than the actual execution time.
++</P>
++<P>
++
++When the running time of a command is very nearly zero, some values
++(e.g., the percentage of CPU used) may be reported as either zero (which
++is wrong) or a question mark.
++</P>
++<P>
++
++Most information shown by <CODE>time</CODE> is derived from the <CODE>wait3</CODE>
++system call.  The numbers are only as good as those returned by
++<CODE>wait3</CODE>.  Many systems do not measure all of the resources that
++<CODE>time</CODE> can report on; those resources are reported as zero.  The
++systems that measure most or all of the resources are based on 4.2 or
++4.3BSD.  Later BSD releases use different memory management code that
++measures fewer resources.
++</P>
++<P>
++
++On systems that do not have a <CODE>wait3</CODE> call that returns status
++information, the <CODE>times</CODE> system call is used instead.  It provides
++much less information than <CODE>wait3</CODE>, so on those systems <CODE>time</CODE>
++reports most of the resources as zero.
++</P>
++<P>
++
++The `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' values are allegedly only &quot;real&quot; input
++and output and do not include those supplied by caching devices.  The
++meaning of &quot;real&quot; I/O reported by `<SAMP>%I</SAMP>' and `<SAMP>%O</SAMP>' may be
++muddled for workstations, especially diskless ones.
++</P>
++<P>
++
++<A NAME="Invoking time"></A>
++<HR SIZE="6">
++<A NAME="SEC11"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC10"> &lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC1"> &lt;&lt; </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top"> Up </A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H2> 1.6 Running the <CODE>time</CODE> Command </H2>
++<!--docid::SEC11::-->
++<P>
++
++The format of the <CODE>time</CODE> command is:
++</P>
++<P>
++
++<TABLE><tr><td>&nbsp;</td><td class=example><pre>time [option<small>...</small>] <VAR>command</VAR> [<VAR>arg</VAR><small>...</small>]
++</pre></td></tr></table><P>
++
++<A NAME="IDX5"></A>
++<CODE>time</CODE> runs the program <VAR>command</VAR>, with any given arguments
++<VAR>arg</VAR><small>...</small>.  When <VAR>command</VAR> finishes, <CODE>time</CODE> displays
++information about resources used by <VAR>command</VAR> (on the standard error
++output, by default).  If <VAR>command</VAR> exits with non-zero status or is
++terminated by a signal, <CODE>time</CODE> displays a warning message and the
++exit status or signal number.
++</P>
++<P>
++
++Options to <CODE>time</CODE> must appear on the command line before
++<VAR>command</VAR>.  Anything on the command line after <VAR>command</VAR> is
++passed as arguments to <VAR>command</VAR>.
++</P>
++<P>
++
++</P>
++<DL COMPACT>
++<DT><CODE>-o <VAR>file</VAR></CODE>
++<DD><DT><CODE>--output=<VAR>file</VAR></CODE>
++<DD>Write the resource use statistics to <VAR>file</VAR>.
++<P>
++
++</P>
++<DT><CODE>-a</CODE>
++<DD><DT><CODE>--append</CODE>
++<DD><EM>Append</EM> the resource use information to the output file instead
++of overwriting it.
++<P>
++
++</P>
++<DT><CODE>-f <VAR>format</VAR></CODE>
++<DD><DT><CODE>--format=<VAR>format</VAR></CODE>
++<DD>Use <VAR>format</VAR> as the format string.
++<P>
++
++</P>
++<DT><CODE>--help</CODE>
++<DD>Print a summary of the command line options to <CODE>time</CODE> and exit.
++<P>
++
++</P>
++<DT><CODE>-p</CODE>
++<DD><DT><CODE>--portability</CODE>
++<DD>Use the POSIX format.
++<P>
++
++</P>
++<DT><CODE>-v</CODE>
++<DD><DT><CODE>--verbose</CODE>
++<DD><A NAME="IDX6"></A>
++Use the built-in verbose format.
++<P>
++
++</P>
++<DT><CODE>-V</CODE>
++<DD><DT><CODE>--version</CODE>
++<DD><A NAME="IDX7"></A>
++Print the version number of <CODE>time</CODE> and exit.
++</DL>
++<P>
++
++<HR SIZE="6">
++<A NAME="SEC_Contents"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H1>Table of Contents</H1>
++<BLOCKQUOTE>
++<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
++<BR>
++<BLOCKQUOTE>
++<A NAME="TOC2" HREF="time.html#SEC2">1.1 Setting the Output Format</A>
++<BR>
++<A NAME="TOC3" HREF="time.html#SEC3">1.2 The Format String</A>
++<BR>
++<BLOCKQUOTE>
++<A NAME="TOC4" HREF="time.html#SEC4">1.2.1 Time Resources</A>
++<BR>
++<A NAME="TOC5" HREF="time.html#SEC5">1.2.2 Memory Resources</A>
++<BR>
++<A NAME="TOC6" HREF="time.html#SEC6">1.2.3 I/O Resources</A>
++<BR>
++<A NAME="TOC7" HREF="time.html#SEC7">1.2.4 Command Info</A>
++<BR>
++</BLOCKQUOTE>
++<A NAME="TOC8" HREF="time.html#SEC8">1.3 Redirecting Output</A>
++<BR>
++<A NAME="TOC9" HREF="time.html#SEC9">1.4 Examples</A>
++<BR>
++<A NAME="TOC10" HREF="time.html#SEC10">1.5 Accuracy</A>
++<BR>
++<A NAME="TOC11" HREF="time.html#SEC11">1.6 Running the <CODE>time</CODE> Command</A>
++<BR>
++</BLOCKQUOTE>
++</BLOCKQUOTE>
++<HR SIZE=1>
++<A NAME="SEC_OVERVIEW"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H1>Short Table of Contents</H1>
++<BLOCKQUOTE>
++<A NAME="TOC1" HREF="time.html#SEC1">1. Measuring Program Resource Use</A>
++<BR>
++
++</BLOCKQUOTE>
++<HR SIZE=1>
++<A NAME="SEC_About"></A>
++<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
++<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Top">Top</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_Contents">Contents</A>]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
++<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="time.html#SEC_About"> ? </A>]</TD>
++</TR></TABLE>
++<H1>About this document</H1>
++This document was generated
++by 
++using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
++<P></P>
++The buttons in the navigation panels have the following meaning:
++<P></P>
++<table border = "1">
++<TR>
++<TH> Button </TH>
++<TH> Name </TH>
++<TH> Go to </TH>
++<TH> From 1.2.3 go to</TH>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ &lt; ] </TD>
++<TD ALIGN="CENTER">
++Back
++</TD>
++<TD>
++previous section in reading order
++</TD>
++<TD>
++1.2.2
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ &gt; ] </TD>
++<TD ALIGN="CENTER">
++Forward
++</TD>
++<TD>
++next section in reading order
++</TD>
++<TD>
++1.2.4
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ &lt;&lt; ] </TD>
++<TD ALIGN="CENTER">
++FastBack
++</TD>
++<TD>
++beginning of this chapter or previous chapter
++</TD>
++<TD>
++1
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ Up ] </TD>
++<TD ALIGN="CENTER">
++Up
++</TD>
++<TD>
++up section
++</TD>
++<TD>
++1.2
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ &gt;&gt; ] </TD>
++<TD ALIGN="CENTER">
++FastForward
++</TD>
++<TD>
++next chapter
++</TD>
++<TD>
++2
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [Top] </TD>
++<TD ALIGN="CENTER">
++Top
++</TD>
++<TD>
++cover (top) of document
++</TD>
++<TD>
++ &nbsp; 
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [Contents] </TD>
++<TD ALIGN="CENTER">
++Contents
++</TD>
++<TD>
++table of contents
++</TD>
++<TD>
++ &nbsp; 
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [Index] </TD>
++<TD ALIGN="CENTER">
++Index
++</TD>
++<TD>
++concept index
++</TD>
++<TD>
++ &nbsp; 
++</TD>
++</TR>
++<TR>
++<TD ALIGN="CENTER">
++ [ ? ] </TD>
++<TD ALIGN="CENTER">
++About
++</TD>
++<TD>
++this page
++</TD>
++<TD>
++ &nbsp; 
++</TD>
++</TR>
++</TABLE>
++    <P>
++      where the <STRONG> Example </STRONG> assumes that the current position
++      is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
++      the following structure:</P>
++    <UL>
++      <LI> 1. Section One
++        <UL>
++          <LI>1.1 Subsection One-One
++            <UL>
++              <LI>...</LI>
++            </UL>
++          <LI>1.2 Subsection One-Two
++            <UL>
++              <LI>1.2.1 Subsubsection One-Two-One</LI>
++              <LI>1.2.2 Subsubsection One-Two-Two</LI>
++              <LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
++                <STRONG>&lt;== Current Position </STRONG></LI>
++              <LI>1.2.4 Subsubsection One-Two-Four</LI>
++            </UL>
++          </LI>
++          <LI>1.3 Subsection One-Three
++            <UL>
++              <LI>...</LI>
++            </UL>
++          </LI>
++          <LI>1.4 Subsection One-Four</LI>
++        </UL>
++      </LI>
++    </UL>
++
++<HR SIZE=1>
++<BR>
++<FONT SIZE="-1">
++This document was generated
++by <I>root</I> on <I>September, 1 2003</I>
++using <A HREF="http://texi2html.cvshome.org"><I>texi2html</I></A>
++</FONT>
++
++</BODY>
++</HTML>
diff --git a/meta/recipes-extended/time/time.inc b/meta/recipes-extended/time/time.inc
new file mode 100644
index 0000000..8586217
--- /dev/null
+++ b/meta/recipes-extended/time/time.inc
@@ -0,0 +1,12 @@
+SUMMARY = "Tool that measures CPU resources"
+DESCRIPTION = "time measures many of the CPU resources, such as time and \
+memory, that other programs use."
+HOMEPAGE = "http://www.gnu.org/software/time/"
+SECTION = "utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+inherit texinfo update-alternatives
+
+ALTERNATIVE_${PN} = "time"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/time/time_1.7.bb b/meta/recipes-extended/time/time_1.7.bb
new file mode 100644
index 0000000..92c5353
--- /dev/null
+++ b/meta/recipes-extended/time/time_1.7.bb
@@ -0,0 +1,11 @@
+require time.inc
+
+PR = "r2"
+
+SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \
+	   file://debian.patch"
+
+SRC_URI[md5sum] = "e38d2b8b34b1ca259cf7b053caac32b3"
+SRC_URI[sha256sum] = "e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d"
+
+inherit autotools
diff --git a/meta/recipes-extended/tzcode/tzcode-native_2015f.bb b/meta/recipes-extended/tzcode/tzcode-native_2015f.bb
new file mode 100644
index 0000000..a8865a3
--- /dev/null
+++ b/meta/recipes-extended/tzcode/tzcode-native_2015f.bb
@@ -0,0 +1,25 @@
+# note that we allow for us to use data later than our code version
+#
+DESCRIPTION = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
+LICENSE = "PD & BSD"
+
+LIC_FILES_CHKSUM = "file://${WORKDIR}/README;md5=d0ff93a73dd5bc3c6e724bb4343760f6"
+
+SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
+           ftp://ftp.iana.org/tz/releases/tzdata2015f.tar.gz;name=tzdata"
+
+SRC_URI[tzcode.md5sum] = "19578d432ba8b92f73406a17a9bc268d"
+SRC_URI[tzcode.sha256sum] = "0c95e0a42bb61141f790f4f5f204b954d7654c894aa54a594a215d6f38de84ae"
+SRC_URI[tzdata.md5sum] = "e3b82732d20e973e48af1c6f13df9a1d"
+SRC_URI[tzdata.sha256sum] = "959f81b541e042ecb13c50097d264ae92ff03a57979c478dbcf24d5da242531d"
+
+S = "${WORKDIR}"
+
+inherit native
+
+do_install () {
+        install -d ${D}${bindir}/
+        install -m 755 zic ${D}${bindir}/
+        install -m 755 zdump ${D}${bindir}/
+        install -m 755 tzselect ${D}${bindir}/
+}
diff --git a/meta/recipes-extended/tzdata/tzdata_2015f.bb b/meta/recipes-extended/tzdata/tzdata_2015f.bb
new file mode 100644
index 0000000..7cda40d
--- /dev/null
+++ b/meta/recipes-extended/tzdata/tzdata_2015f.bb
@@ -0,0 +1,207 @@
+DESCRIPTION = "Timezone data"
+HOMEPAGE = "http://www.iana.org/time-zones"
+SECTION = "base"
+LICENSE = "PD & BSD"
+LIC_FILES_CHKSUM = "file://asia;beginline=2;endline=3;md5=996a9811747aa48db91ed239e5b355a1"
+DEPENDS = "tzcode-native"
+
+SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
+
+SRC_URI[tzdata.md5sum] = "e3b82732d20e973e48af1c6f13df9a1d"
+SRC_URI[tzdata.sha256sum] = "959f81b541e042ecb13c50097d264ae92ff03a57979c478dbcf24d5da242531d"
+
+inherit allarch
+
+RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
+             timezone-arctic timezone-asia timezone-atlantic \
+             timezone-australia timezone-europe timezone-indian \
+             timezone-iso3166.tab timezone-pacific timezone-zone.tab"
+
+S = "${WORKDIR}"
+
+DEFAULT_TIMEZONE ?= "Universal"
+
+TZONES= "africa antarctica asia australasia europe northamerica southamerica  \
+         factory etcetera backward systemv \
+        "
+# pacificnew 
+
+do_compile () {
+        for zone in ${TZONES}; do \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+        done
+}
+
+do_install () {
+        install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
+        cp -pPR ${S}/$exec_prefix ${D}/
+        # libc is removing zoneinfo files from package
+        cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
+        cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
+
+        # Install default timezone
+        if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
+            install -d ${D}${sysconfdir}
+            echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+            ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
+        else
+            bberror "DEFAULT_TIMEZONE is set to an invalid value."
+            exit 1
+        fi
+
+        chown -R root:root ${D}
+}
+
+pkg_postinst_${PN} () {
+	etc_lt="$D${sysconfdir}/localtime"
+	src="$D${sysconfdir}/timezone"
+
+	if [ -e ${src} ] ; then
+		tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
+	fi
+	
+	if [ -z "${tz}" ] ; then
+		exit 0
+	fi
+	
+	if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
+		echo "You have an invalid TIMEZONE setting in ${src}"
+		echo "Your ${etc_lt} has been reset to Universal; enjoy!"
+		tz="Universal"
+		echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
+		if [ -L ${etc_lt} ] ; then
+			rm -f "${etc_lt}"
+		fi
+		ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
+	fi
+}
+
+# Packages primarily organized by directory with a major city
+# in most time zones in the base package
+
+PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
+    tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
+    tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
+
+FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
+RPROVIDES_tzdata-africa = "tzdata-africa"
+
+FILES_tzdata-americas += "${datadir}/zoneinfo/America/*  \
+                ${datadir}/zoneinfo/US/*                \
+                ${datadir}/zoneinfo/Brazil/*            \
+                ${datadir}/zoneinfo/Canada/*            \
+                ${datadir}/zoneinfo/Mexico/*            \
+                ${datadir}/zoneinfo/Chile/*"
+RPROVIDES_tzdata-americas = "tzdata-americas"
+
+FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
+RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
+
+FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
+RPROVIDES_tzdata-arctic = "tzdata-arctic"
+
+FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/*        \
+                ${datadir}/zoneinfo/Indian/*            \
+                ${datadir}/zoneinfo/Mideast/*"
+RPROVIDES_tzdata-asia = "tzdata-asia"
+
+FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
+RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
+
+FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
+RPROVIDES_tzdata-australia = "tzdata-australia"
+
+FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
+RPROVIDES_tzdata-europe = "tzdata-europe"
+
+FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
+RPROVIDES_tzdata-pacific = "tzdata-pacific"
+
+FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
+RPROVIDES_tzdata-posix = "tzdata-posix"
+
+FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
+RPROVIDES_tzdata-right = "tzdata-right"
+
+
+FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba           \
+                ${datadir}/zoneinfo/Egypt                \
+                ${datadir}/zoneinfo/Eire                 \
+                ${datadir}/zoneinfo/Factory              \
+                ${datadir}/zoneinfo/GB-Eire              \
+                ${datadir}/zoneinfo/Hongkong             \
+                ${datadir}/zoneinfo/Iceland              \
+                ${datadir}/zoneinfo/Iran                 \
+                ${datadir}/zoneinfo/Israel               \
+                ${datadir}/zoneinfo/Jamaica              \
+                ${datadir}/zoneinfo/Japan                \
+                ${datadir}/zoneinfo/Kwajalein            \
+                ${datadir}/zoneinfo/Libya                \
+                ${datadir}/zoneinfo/Navajo               \
+                ${datadir}/zoneinfo/Poland               \
+                ${datadir}/zoneinfo/Portugal             \
+                ${datadir}/zoneinfo/Singapore            \
+                ${datadir}/zoneinfo/Turkey"
+RPROVIDES_tzdata-misc = "tzdata-misc"
+
+
+FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu     \
+                ${datadir}/zoneinfo/America/Anchorage    \
+                ${datadir}/zoneinfo/America/Los_Angeles  \
+                ${datadir}/zoneinfo/America/Denver       \
+                ${datadir}/zoneinfo/America/Chicago      \
+                ${datadir}/zoneinfo/America/New_York     \
+                ${datadir}/zoneinfo/America/Caracas      \
+                ${datadir}/zoneinfo/America/Sao_Paulo    \
+                ${datadir}/zoneinfo/Europe/London        \
+                ${datadir}/zoneinfo/Europe/Paris         \
+                ${datadir}/zoneinfo/Africa/Cairo         \
+                ${datadir}/zoneinfo/Europe/Moscow        \
+                ${datadir}/zoneinfo/Asia/Dubai           \
+                ${datadir}/zoneinfo/Asia/Karachi         \
+                ${datadir}/zoneinfo/Asia/Dhaka           \
+                ${datadir}/zoneinfo/Asia/Bankok          \
+                ${datadir}/zoneinfo/Asia/Hong_Kong       \
+                ${datadir}/zoneinfo/Asia/Tokyo           \
+                ${datadir}/zoneinfo/Australia/Darwin     \
+                ${datadir}/zoneinfo/Australia/Adelaide   \
+                ${datadir}/zoneinfo/Australia/Brisbane   \
+                ${datadir}/zoneinfo/Australia/Sydney     \
+                ${datadir}/zoneinfo/Pacific/Noumea       \
+                ${datadir}/zoneinfo/CET                  \
+                ${datadir}/zoneinfo/CST6CDT              \
+                ${datadir}/zoneinfo/EET                  \
+                ${datadir}/zoneinfo/EST                  \
+                ${datadir}/zoneinfo/EST5EDT              \
+                ${datadir}/zoneinfo/GB                   \
+                ${datadir}/zoneinfo/GMT                  \
+                ${datadir}/zoneinfo/GMT+0                \
+                ${datadir}/zoneinfo/GMT-0                \
+                ${datadir}/zoneinfo/GMT0                 \
+                ${datadir}/zoneinfo/Greenwich            \
+                ${datadir}/zoneinfo/HST                  \
+                ${datadir}/zoneinfo/MET                  \
+                ${datadir}/zoneinfo/MST                  \
+                ${datadir}/zoneinfo/MST7MDT              \
+                ${datadir}/zoneinfo/NZ                   \
+                ${datadir}/zoneinfo/NZ-CHAT              \
+                ${datadir}/zoneinfo/PRC                  \
+                ${datadir}/zoneinfo/PST8PDT              \
+                ${datadir}/zoneinfo/ROC                  \
+                ${datadir}/zoneinfo/ROK                  \
+                ${datadir}/zoneinfo/UCT                  \
+                ${datadir}/zoneinfo/UTC                  \
+                ${datadir}/zoneinfo/Universal            \
+                ${datadir}/zoneinfo/W-SU                 \
+                ${datadir}/zoneinfo/WET                  \
+                ${datadir}/zoneinfo/Zulu                 \
+                ${datadir}/zoneinfo/zone.tab             \
+                ${datadir}/zoneinfo/iso3166.tab          \
+                ${datadir}/zoneinfo/Etc/*"
+
+CONFFILES_${PN} += "${sysconfdir}/timezone ${sysconfdir}/localtime"
diff --git a/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch b/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch
new file mode 100644
index 0000000..9ba3c1d
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch
@@ -0,0 +1,402 @@
+From: Giovanni Scafora <giovanni.archlinux.org>
+Subject: unzip files encoded with non-latin, non-unicode file names
+Last-Update: 2015-02-11
+
+Upstream-Status: Backport
+
+Updated 2015-02-11 by Marc Deslauriers <marc.deslauriers@canonical.com>
+to fix buffer overflow in charset_to_intern()
+
+Signed-off-by: Marc Deslauriers <marc.deslauriers@canonical.com>
+
+Index: unzip-6.0/unix/unix.c
+===================================================================
+--- unzip-6.0.orig/unix/unix.c	2015-02-11 08:46:43.675324290 -0500
++++ unzip-6.0/unix/unix.c	2015-02-11 09:18:04.902081319 -0500
+@@ -30,6 +30,9 @@
+ #define UNZIP_INTERNAL
+ #include "unzip.h"
+ 
++#include <iconv.h>
++#include <langinfo.h>
++
+ #ifdef SCO_XENIX
+ #  define SYSNDIR
+ #else  /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */
+@@ -1874,3 +1877,102 @@
+     }
+ }
+ #endif /* QLZIP */
++
++
++typedef struct {
++    char *local_charset;
++    char *archive_charset;
++} CHARSET_MAP;
++
++/* A mapping of local <-> archive charsets used by default to convert filenames
++ * of DOS/Windows Zip archives. Currently very basic. */
++static CHARSET_MAP dos_charset_map[] = {
++    { "ANSI_X3.4-1968", "CP850" },
++    { "ISO-8859-1", "CP850" },
++    { "CP1252", "CP850" },
++    { "UTF-8", "CP866" },
++    { "KOI8-R", "CP866" },
++    { "KOI8-U", "CP866" },
++    { "ISO-8859-5", "CP866" }
++};
++
++char OEM_CP[MAX_CP_NAME] = "";
++char ISO_CP[MAX_CP_NAME] = "";
++
++/* Try to guess the default value of OEM_CP based on the current locale.
++ * ISO_CP is left alone for now. */
++void init_conversion_charsets()
++{
++    const char *local_charset;
++    int i;
++
++    /* Make a guess only if OEM_CP not already set. */ 
++    if(*OEM_CP == '\0') {
++    	local_charset = nl_langinfo(CODESET);
++    	for(i = 0; i < sizeof(dos_charset_map)/sizeof(CHARSET_MAP); i++)
++    		if(!strcasecmp(local_charset, dos_charset_map[i].local_charset)) {
++    			strncpy(OEM_CP, dos_charset_map[i].archive_charset,
++    					sizeof(OEM_CP));
++    			break;
++    		}
++    }
++}
++
++/* Convert a string from one encoding to the current locale using iconv().
++ * Be as non-intrusive as possible. If error is encountered during covertion
++ * just leave the string intact. */
++static void charset_to_intern(char *string, char *from_charset)
++{
++    iconv_t cd;
++    char *s,*d, *buf;
++    size_t slen, dlen, buflen;
++    const char *local_charset;
++
++    if(*from_charset == '\0')
++    	return;
++
++    buf = NULL;
++    local_charset = nl_langinfo(CODESET);
++
++    if((cd = iconv_open(local_charset, from_charset)) == (iconv_t)-1)
++        return;
++
++    slen = strlen(string);
++    s = string;
++
++    /*  Make sure OUTBUFSIZ + 1 never ends up smaller than FILNAMSIZ
++     *  as this function also gets called with G.outbuf in fileio.c
++     */
++    buflen = FILNAMSIZ;
++    if (OUTBUFSIZ + 1 < FILNAMSIZ)
++    {
++        buflen = OUTBUFSIZ + 1;
++    }
++
++    d = buf = malloc(buflen);
++    if(!d)
++    	goto cleanup;
++
++    bzero(buf,buflen);
++    dlen = buflen - 1;
++
++    if(iconv(cd, &s, &slen, &d, &dlen) == (size_t)-1)
++    	goto cleanup;
++    strncpy(string, buf, buflen);
++
++    cleanup:
++    free(buf);
++    iconv_close(cd);
++}
++
++/* Convert a string from OEM_CP to the current locale charset. */
++inline void oem_intern(char *string)
++{
++    charset_to_intern(string, OEM_CP);
++}
++
++/* Convert a string from ISO_CP to the current locale charset. */
++inline void iso_intern(char *string)
++{
++    charset_to_intern(string, ISO_CP);
++}
+Index: unzip-6.0/unix/unxcfg.h
+===================================================================
+--- unzip-6.0.orig/unix/unxcfg.h	2015-02-11 08:46:43.675324290 -0500
++++ unzip-6.0/unix/unxcfg.h	2015-02-11 08:46:43.671324260 -0500
+@@ -228,4 +228,30 @@
+ /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
+ /*    and notfirstcall are used by do_wild().                          */
+ 
++
++#define MAX_CP_NAME 25 
++   
++#ifdef SETLOCALE
++#  undef SETLOCALE
++#endif
++#define SETLOCALE(category, locale) setlocale(category, locale)
++#include <locale.h>
++   
++#ifdef _ISO_INTERN
++#  undef _ISO_INTERN
++#endif
++#define _ISO_INTERN(str1) iso_intern(str1)
++
++#ifdef _OEM_INTERN
++#  undef _OEM_INTERN
++#endif
++#ifndef IZ_OEM2ISO_ARRAY
++#  define IZ_OEM2ISO_ARRAY
++#endif
++#define _OEM_INTERN(str1) oem_intern(str1)
++
++void iso_intern(char *);
++void oem_intern(char *);
++void init_conversion_charsets(void);
++   
+ #endif /* !__unxcfg_h */
+Index: unzip-6.0/unzip.c
+===================================================================
+--- unzip-6.0.orig/unzip.c	2015-02-11 08:46:43.675324290 -0500
++++ unzip-6.0/unzip.c	2015-02-11 08:46:43.675324290 -0500
+@@ -327,11 +327,21 @@
+   -2  just filenames but allow -h/-t/-z  -l  long Unix \"ls -l\" format\n\
+                                          -v  verbose, multi-page format\n";
+ 
++#ifndef UNIX
+ static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\
+   -h  print header line       -t  print totals for listed files or for all\n\
+   -z  print zipfile comment   -T  print file times in sortable decimal format\
+ \n  -C  be case-insensitive   %s\
+   -x  exclude filenames that follow from listing\n";
++#else /* UNIX */
++static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\
++  -h  print header line       -t  print totals for listed files or for all\n\
++  -z  print zipfile comment  %c-T%c print file times in sortable decimal format\
++\n %c-C%c be case-insensitive   %s\
++  -x  exclude filenames that follow from listing\n\
++  -O CHARSET  specify a character encoding for DOS, Windows and OS/2 archives\n\
++  -I CHARSET  specify a character encoding for UNIX and other archives\n";
++#endif /* !UNIX */
+ #ifdef MORE
+    static ZCONST char Far ZipInfoUsageLine4[] =
+      "  -M  page output through built-in \"more\"\n";
+@@ -664,6 +674,17 @@
+   -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields\n\
+   -C  match filenames case-insensitively     -L  make (some) names \
+ lowercase\n %-42s  -V  retain VMS version numbers\n%s";
++#elif (defined UNIX)
++static ZCONST char Far UnzipUsageLine4[] = "\
++modifiers:\n\
++  -n  never overwrite existing files         -q  quiet mode (-qq => quieter)\n\
++  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files\n\
++  -j  junk paths (do not make directories)   -aa treat ALL files as text\n\
++  -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields\n\
++  -C  match filenames case-insensitively     -L  make (some) names \
++lowercase\n %-42s  -V  retain VMS version numbers\n%s\
++  -O CHARSET  specify a character encoding for DOS, Windows and OS/2 archives\n\
++  -I CHARSET  specify a character encoding for UNIX and other archives\n\n";
+ #else /* !VMS */
+ static ZCONST char Far UnzipUsageLine4[] = "\
+ modifiers:\n\
+@@ -802,6 +823,10 @@
+ #endif /* UNICODE_SUPPORT */
+ 
+ 
++#ifdef UNIX
++    init_conversion_charsets();
++#endif
++
+ #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__))
+     extern void DebugMalloc(void);
+ 
+@@ -1335,6 +1360,11 @@
+     argc = *pargc;
+     argv = *pargv;
+ 
++#ifdef UNIX
++    extern char OEM_CP[MAX_CP_NAME];
++    extern char ISO_CP[MAX_CP_NAME];
++#endif
++    
+     while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) {
+         s = *argv + 1;
+         while ((c = *s++) != 0) {    /* "!= 0":  prevent Turbo C warning */
+@@ -1516,6 +1546,35 @@
+                     }
+                     break;
+ #endif  /* MACOS */
++#ifdef UNIX
++    			case ('I'):
++                    if (negative) {
++                        Info(slide, 0x401, ((char *)slide,
++                          "error:  encodings can't be negated"));
++                        return(PK_PARAM);
++    				} else {
++    					if(*s) { /* Handle the -Icharset case */
++    						/* Assume that charsets can't start with a dash to spot arguments misuse */
++    						if(*s == '-') { 
++    	                        Info(slide, 0x401, ((char *)slide,
++        		                  "error:  a valid character encoding should follow the -I argument"));
++    	                        return(PK_PARAM); 
++    						}
++    						strncpy(ISO_CP, s, sizeof(ISO_CP));
++    					} else { /* -I charset */
++    						++argv;
++    						if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
++    	                        Info(slide, 0x401, ((char *)slide,
++        		                  "error:  a valid character encoding should follow the -I argument"));
++    	                        return(PK_PARAM); 
++    						}
++    						s = *argv;
++    						strncpy(ISO_CP, s, sizeof(ISO_CP));
++    					}
++    					while(*(++s)); /* No params straight after charset name */
++    				}
++    				break;
++#endif /* ?UNIX */
+                 case ('j'):    /* junk pathnames/directory structure */
+                     if (negative)
+                         uO.jflag = FALSE, negative = 0;
+@@ -1591,6 +1650,35 @@
+                     } else
+                         ++uO.overwrite_all;
+                     break;
++#ifdef UNIX
++    			case ('O'):
++                    if (negative) {
++                        Info(slide, 0x401, ((char *)slide,
++                          "error:  encodings can't be negated"));
++                        return(PK_PARAM);
++    				} else {
++    					if(*s) { /* Handle the -Ocharset case */
++    						/* Assume that charsets can't start with a dash to spot arguments misuse */
++    						if(*s == '-') { 
++    	                        Info(slide, 0x401, ((char *)slide,
++        		                  "error:  a valid character encoding should follow the -I argument"));
++    	                        return(PK_PARAM); 
++    						}
++    						strncpy(OEM_CP, s, sizeof(OEM_CP));
++    					} else { /* -O charset */
++    						++argv;
++    						if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
++    	                        Info(slide, 0x401, ((char *)slide,
++        		                  "error:  a valid character encoding should follow the -O argument"));
++    	                        return(PK_PARAM); 
++    						}
++    						s = *argv;
++    						strncpy(OEM_CP, s, sizeof(OEM_CP));
++    					}
++    					while(*(++s)); /* No params straight after charset name */
++    				}
++    				break;
++#endif /* ?UNIX */
+                 case ('p'):    /* pipes:  extract to stdout, no messages */
+                     if (negative) {
+                         uO.cflag = FALSE;
+Index: unzip-6.0/unzpriv.h
+===================================================================
+--- unzip-6.0.orig/unzpriv.h	2015-02-11 08:46:43.675324290 -0500
++++ unzip-6.0/unzpriv.h	2015-02-11 08:46:43.675324290 -0500
+@@ -3008,7 +3008,7 @@
+          !(((islochdr) || (isuxatt)) && \
+            ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \
+         (hostnum) == FS_HPFS_ || \
+-        ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \
++        ((hostnum) == FS_NTFS_ /* && (hostver) == 50 */ )) { \
+         _OEM_INTERN((string)); \
+     } else { \
+         _ISO_INTERN((string)); \
+Index: unzip-6.0/zipinfo.c
+===================================================================
+--- unzip-6.0.orig/zipinfo.c	2015-02-11 08:46:43.675324290 -0500
++++ unzip-6.0/zipinfo.c	2015-02-11 08:46:43.675324290 -0500
+@@ -457,6 +457,10 @@
+     int    tflag_slm=TRUE, tflag_2v=FALSE;
+     int    explicit_h=FALSE, explicit_t=FALSE;
+ 
++#ifdef UNIX
++    extern char OEM_CP[MAX_CP_NAME];
++    extern char ISO_CP[MAX_CP_NAME];
++#endif
+ 
+ #ifdef MACOS
+     uO.lflag = LFLAG;         /* reset default on each call */
+@@ -501,6 +505,35 @@
+                             uO.lflag = 0;
+                     }
+                     break;
++#ifdef UNIX
++    			case ('I'):
++                    if (negative) {
++                        Info(slide, 0x401, ((char *)slide,
++                          "error:  encodings can't be negated"));
++                        return(PK_PARAM);
++    				} else {
++    					if(*s) { /* Handle the -Icharset case */
++    						/* Assume that charsets can't start with a dash to spot arguments misuse */
++    						if(*s == '-') { 
++    	                        Info(slide, 0x401, ((char *)slide,
++        		                  "error:  a valid character encoding should follow the -I argument"));
++    	                        return(PK_PARAM); 
++    						}
++    						strncpy(ISO_CP, s, sizeof(ISO_CP));
++    					} else { /* -I charset */
++    						++argv;
++    						if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
++    	                        Info(slide, 0x401, ((char *)slide,
++        		                  "error:  a valid character encoding should follow the -I argument"));
++    	                        return(PK_PARAM); 
++    						}
++    						s = *argv;
++    						strncpy(ISO_CP, s, sizeof(ISO_CP));
++    					}
++    					while(*(++s)); /* No params straight after charset name */
++    				}
++    				break;
++#endif /* ?UNIX */
+                 case 'l':      /* longer form of "ls -l" type listing */
+                     if (negative)
+                         uO.lflag = -2, negative = 0;
+@@ -521,6 +554,35 @@
+                         G.M_flag = TRUE;
+                     break;
+ #endif
++#ifdef UNIX
++    			case ('O'):
++                    if (negative) {
++                        Info(slide, 0x401, ((char *)slide,
++                          "error:  encodings can't be negated"));
++                        return(PK_PARAM);
++    				} else {
++    					if(*s) { /* Handle the -Ocharset case */
++    						/* Assume that charsets can't start with a dash to spot arguments misuse */
++    						if(*s == '-') { 
++    	                        Info(slide, 0x401, ((char *)slide,
++        		                  "error:  a valid character encoding should follow the -I argument"));
++    	                        return(PK_PARAM); 
++    						}
++    						strncpy(OEM_CP, s, sizeof(OEM_CP));
++    					} else { /* -O charset */
++    						++argv;
++    						if(!(--argc > 0 && *argv != NULL && **argv != '-')) {
++    	                        Info(slide, 0x401, ((char *)slide,
++        		                  "error:  a valid character encoding should follow the -O argument"));
++    	                        return(PK_PARAM); 
++    						}
++    						s = *argv;
++    						strncpy(OEM_CP, s, sizeof(OEM_CP));
++    					}
++    					while(*(++s)); /* No params straight after charset name */
++    				}
++    				break;
++#endif /* ?UNIX */
+                 case 's':      /* default:  shorter "ls -l" type listing */
+                     if (negative)
+                         uO.lflag = -2, negative = 0;
diff --git a/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch b/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch
new file mode 100644
index 0000000..e137f0d
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch
@@ -0,0 +1,52 @@
+From: sms
+Subject: Fix CVE-2014-8139: CRC32 verification heap-based overflow
+Bug-Debian: http://bugs.debian.org/773722
+
+The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
+
+Upstream-Status: Backport
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+--- a/extract.c
++++ b/extract.c
+@@ -298,6 +298,8 @@
+ #ifndef SFX
+    static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \
+      EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n";
++   static ZCONST char Far TooSmallEBlength[] = "bad extra-field entry:\n \
++     EF block length (%u bytes) invalid (< %d)\n";
+    static ZCONST char Far InvalidComprDataEAs[] =
+      " invalid compressed data for EAs\n";
+ #  if (defined(WIN32) && defined(NTSD_EAS))
+@@ -2023,7 +2025,8 @@
+         ebID = makeword(ef);
+         ebLen = (unsigned)makeword(ef+EB_LEN);
+ 
+-        if (ebLen > (ef_len - EB_HEADSIZE)) {
++        if (ebLen > (ef_len - EB_HEADSIZE))
++        {
+            /* Discovered some extra field inconsistency! */
+             if (uO.qflag)
+                 Info(slide, 1, ((char *)slide, "%-22s ",
+@@ -2158,11 +2161,19 @@
+                 }
+                 break;
+             case EF_PKVMS:
+-                if (makelong(ef+EB_HEADSIZE) !=
++                if (ebLen < 4)
++                {
++                    Info(slide, 1,
++                     ((char *)slide, LoadFarString(TooSmallEBlength),
++                     ebLen, 4));
++                }
++                else if (makelong(ef+EB_HEADSIZE) !=
+                     crc32(CRCVAL_INITIAL, ef+(EB_HEADSIZE+4),
+                           (extent)(ebLen-4)))
++                {
+                     Info(slide, 1, ((char *)slide,
+                       LoadFarString(BadCRC_EAs)));
++                }
+                 break;
+             case EF_PKW32:
+             case EF_PKUNIX:
diff --git a/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
new file mode 100644
index 0000000..edc7d51
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
@@ -0,0 +1,33 @@
+From: sms
+Subject: Fix CVE-2014-8140: out-of-bounds write issue in test_compr_eb()
+Bug-Debian: http://bugs.debian.org/773722
+
+The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
+
+Upstream-Status: Backport
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+--- a/extract.c
++++ b/extract.c
+@@ -2232,10 +2232,17 @@
+     if (compr_offset < 4)                /* field is not compressed: */
+         return PK_OK;                    /* do nothing and signal OK */
+ 
++    /* Return no/bad-data error status if any problem is found:
++     *    1. eb_size is too small to hold the uncompressed size
++     *       (eb_ucsize).  (Else extract eb_ucsize.)
++     *    2. eb_ucsize is zero (invalid).  2014-12-04 SMS.
++     *    3. eb_ucsize is positive, but eb_size is too small to hold
++     *       the compressed data header.
++     */
+     if ((eb_size < (EB_UCSIZE_P + 4)) ||
+-        ((eb_ucsize = makelong(eb+(EB_HEADSIZE+EB_UCSIZE_P))) > 0L &&
+-         eb_size <= (compr_offset + EB_CMPRHEADLEN)))
+-        return IZ_EF_TRUNC;               /* no compressed data! */
++     ((eb_ucsize = makelong( eb+ (EB_HEADSIZE+ EB_UCSIZE_P))) == 0L) ||
++     ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN))))
++        return IZ_EF_TRUNC;             /* no/bad compressed data! */
+ 
+     if (
+ #ifdef INT_16BIT
diff --git a/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch b/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch
new file mode 100644
index 0000000..d0c1db3
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch
@@ -0,0 +1,144 @@
+From: sms
+Subject: Fix CVE-2014-8141: out-of-bounds read issues in getZip64Data()
+Bug-Debian: http://bugs.debian.org/773722
+
+The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
+
+Upstream-Status: Backport
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+
+--- a/fileio.c
++++ b/fileio.c
+@@ -176,6 +176,8 @@
+ #endif
+ static ZCONST char Far ExtraFieldTooLong[] =
+   "warning:  extra field too long (%d).  Ignoring...\n";
++static ZCONST char Far ExtraFieldCorrupt[] =
++  "warning:  extra field (type: 0x%04x) corrupt.  Continuing...\n";
+ 
+ #ifdef WINDLL
+    static ZCONST char Far DiskFullQuery[] =
+@@ -2295,7 +2297,12 @@
+             if (readbuf(__G__ (char *)G.extra_field, length) == 0)
+                 return PK_EOF;
+             /* Looks like here is where extra fields are read */
+-            getZip64Data(__G__ G.extra_field, length);
++            if (getZip64Data(__G__ G.extra_field, length) != PK_COOL)
++            {
++                Info(slide, 0x401, ((char *)slide,
++                 LoadFarString( ExtraFieldCorrupt), EF_PKSZ64));
++                error = PK_WARN;
++            }
+ #ifdef UNICODE_SUPPORT
+             G.unipath_filename = NULL;
+             if (G.UzO.U_flag < 2) {
+--- a/process.c
++++ b/process.c
+@@ -1,5 +1,5 @@
+ /*
+-  Copyright (c) 1990-2009 Info-ZIP.  All rights reserved.
++  Copyright (c) 1990-2014 Info-ZIP.  All rights reserved.
+ 
+   See the accompanying file LICENSE, version 2009-Jan-02 or later
+   (the contents of which are also included in unzip.h) for terms of use.
+@@ -1901,48 +1901,82 @@
+     and a 4-byte version of disk start number.
+     Sets both local header and central header fields.  Not terribly clever,
+     but it means that this procedure is only called in one place.
++
++    2014-12-05 SMS.
++    Added checks to ensure that enough data are available before calling
++    makeint64() or makelong().  Replaced various sizeof() values with
++    simple ("4" or "8") constants.  (The Zip64 structures do not depend
++    on our variable sizes.)  Error handling is crude, but we should now
++    stay within the buffer.
+   ---------------------------------------------------------------------------*/
+ 
++#define Z64FLGS 0xffff
++#define Z64FLGL 0xffffffff
++
+     if (ef_len == 0 || ef_buf == NULL)
+         return PK_COOL;
+ 
+     Trace((stderr,"\ngetZip64Data: scanning extra field of length %u\n",
+       ef_len));
+ 
+-    while (ef_len >= EB_HEADSIZE) {
++    while (ef_len >= EB_HEADSIZE)
++    {
+         eb_id = makeword(EB_ID + ef_buf);
+         eb_len = makeword(EB_LEN + ef_buf);
+ 
+-        if (eb_len > (ef_len - EB_HEADSIZE)) {
+-            /* discovered some extra field inconsistency! */
++        if (eb_len > (ef_len - EB_HEADSIZE))
++        {
++            /* Extra block length exceeds remaining extra field length. */
+             Trace((stderr,
+               "getZip64Data: block length %u > rest ef_size %u\n", eb_len,
+               ef_len - EB_HEADSIZE));
+             break;
+         }
+-        if (eb_id == EF_PKSZ64) {
+-
++        if (eb_id == EF_PKSZ64)
++        {
+           int offset = EB_HEADSIZE;
+ 
+-          if (G.crec.ucsize == 0xffffffff || G.lrec.ucsize == 0xffffffff){
+-            G.lrec.ucsize = G.crec.ucsize = makeint64(offset + ef_buf);
+-            offset += sizeof(G.crec.ucsize);
++          if ((G.crec.ucsize == Z64FLGL) || (G.lrec.ucsize == Z64FLGL))
++          {
++            if (offset+ 8 > ef_len)
++              return PK_ERR;
++
++            G.crec.ucsize = G.lrec.ucsize = makeint64(offset + ef_buf);
++            offset += 8;
+           }
+-          if (G.crec.csize == 0xffffffff || G.lrec.csize == 0xffffffff){
+-            G.csize = G.lrec.csize = G.crec.csize = makeint64(offset + ef_buf);
+-            offset += sizeof(G.crec.csize);
++
++          if ((G.crec.csize == Z64FLGL) || (G.lrec.csize == Z64FLGL))
++          {
++            if (offset+ 8 > ef_len)
++              return PK_ERR;
++
++            G.csize = G.crec.csize = G.lrec.csize = makeint64(offset + ef_buf);
++            offset += 8;
+           }
+-          if (G.crec.relative_offset_local_header == 0xffffffff){
++
++          if (G.crec.relative_offset_local_header == Z64FLGL)
++          {
++            if (offset+ 8 > ef_len)
++              return PK_ERR;
++
+             G.crec.relative_offset_local_header = makeint64(offset + ef_buf);
+-            offset += sizeof(G.crec.relative_offset_local_header);
++            offset += 8;
+           }
+-          if (G.crec.disk_number_start == 0xffff){
++
++          if (G.crec.disk_number_start == Z64FLGS)
++          {
++            if (offset+ 4 > ef_len)
++              return PK_ERR;
++
+             G.crec.disk_number_start = (zuvl_t)makelong(offset + ef_buf);
+-            offset += sizeof(G.crec.disk_number_start);
++            offset += 4;
+           }
++#if 0
++          break;                /* Expect only one EF_PKSZ64 block. */
++#endif /* 0 */
+         }
+ 
+-        /* Skip this extra field block */
++        /* Skip this extra field block. */
+         ef_buf += (eb_len + EB_HEADSIZE);
+         ef_len -= (eb_len + EB_HEADSIZE);
+     }
diff --git a/meta/recipes-extended/unzip/unzip/avoid-strip.patch b/meta/recipes-extended/unzip/unzip/avoid-strip.patch
new file mode 100644
index 0000000..8f30e42
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/avoid-strip.patch
@@ -0,0 +1,50 @@
+Upstream-Status: Pending
+
+unix/Makefile: remove hard coded strip commands
+
+Remove the hard coded strip commands, both LF2 (used in linking) and
+STRIP used alone.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -ur unzip60.orig/unix/configure unzip60/unix/configure
+--- unzip60.orig/unix/configure	2009-04-16 14:25:12.000000000 -0500
++++ unzip60/unix/configure	2011-06-21 11:23:36.822849960 -0500
+@@ -17,7 +17,7 @@
+ IZ_BZIP2=${3}
+ CFLAGS="${CFLAGS} -I. -DUNIX"
+ LFLAGS1=""
+-LFLAGS2="-s"
++LFLAGS2=""
+ LN="ln -s"
+ 
+ CFLAGS_OPT=''
+diff -ur unzip60.orig/unix/Makefile unzip60/unix/Makefile
+--- unzip60.orig/unix/Makefile	2009-01-18 16:41:18.000000000 -0600
++++ unzip60/unix/Makefile	2011-06-21 11:12:22.900003388 -0500
+@@ -52,7 +52,7 @@
+ CF = $(CFLAGS) $(CF_NOOPT)
+ LFLAGS1 =
+ LF = -o unzip$E $(LFLAGS1)
+-LF2 = -s
++LF2 = 
+ 
+ # UnZipSFX flags
+ SL = -o unzipsfx$E $(LFLAGS1)
+@@ -70,7 +70,7 @@
+ CHMOD = chmod
+ BINPERMS = 755
+ MANPERMS = 644
+-STRIP = strip
++STRIP =
+ E =
+ O = .o
+ M = unix
+@@ -776,7 +776,6 @@
+ #
+ gcc:		unix_make
+ 	$(MAKE) unzips CC=gcc LD=gcc CFLAGS="-O3" LF2=""
+-	$(STRIP) $(UNZIPS)
+ 
+ # Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000
+ hk68:		unix_make
diff --git a/meta/recipes-extended/unzip/unzip/define-ldflags.patch b/meta/recipes-extended/unzip/unzip/define-ldflags.patch
new file mode 100644
index 0000000..659c6e3
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/define-ldflags.patch
@@ -0,0 +1,18 @@
+Pass LDFLAGS to the linker 
+
+Upstream-Status: Pending
+
+Signed-off-by: Mikhail Durnev <Mikhail_Durnev@mentor.com>
+
+diff -Naur old/unix/configure new/unix/configure
+--- old/unix/configure	2014-01-13 21:59:27.000000000 +1100
++++ new/unix/configure	2014-01-14 16:36:02.000000000 +1100
+@@ -16,7 +16,7 @@
+ CFLAGSR=${CFLAGS}
+ IZ_BZIP2=${3}
+ CFLAGS="${CFLAGS} -I. -DUNIX"
+-LFLAGS1=""
++LFLAGS1=${LDFLAGS}
+ LFLAGS2=""
+ LN="ln -s"
+ 
diff --git a/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff b/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff
new file mode 100644
index 0000000..0a0bfbb
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip/unzip-6.0_overflow3.diff
@@ -0,0 +1,45 @@
+From 190040ebfcf5395a6ccedede2cc9343d34f0a108 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1 AT zoho DOT com>
+Date: Wed, 11 Feb 2015
+Subject: Info-ZIP UnZip buffer overflow
+
+Upstream-Status: Backport
+
+By carefully crafting a corrupt ZIP archive with "extra fields" that
+purport to have compressed blocks larger than the corresponding
+uncompressed blocks in STORED no-compression mode, an attacker can
+trigger a heap overflow that can result in application crash or
+possibly have other unspecified impact.
+
+This patch ensures that when extra fields use STORED mode, the
+"compressed" and uncompressed block sizes match.
+
+Signed-off-by: mancha <mancha1 AT zoho DOT com>
+---
+ extract.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/extract.c
++++ b/extract.c
+@@ -2217,6 +2217,7 @@ static int test_compr_eb(__G__ eb, eb_si
+     ulg eb_ucsize;
+     uch *eb_ucptr;
+     int r;
++    ush method;
+ 
+     if (compr_offset < 4)                /* field is not compressed: */
+         return PK_OK;                    /* do nothing and signal OK */
+@@ -2226,6 +2227,13 @@ static int test_compr_eb(__G__ eb, eb_si
+          eb_size <= (compr_offset + EB_CMPRHEADLEN)))
+         return IZ_EF_TRUNC;               /* no compressed data! */
+ 
++    method = makeword(eb + (EB_HEADSIZE + compr_offset));
++    if ((method == STORED) &&
++        (eb_size - compr_offset - EB_CMPRHEADLEN != eb_ucsize))
++	return PK_ERR;			  /* compressed & uncompressed
++					   * should match in STORED
++					   * method */
++
+     if (
+ #ifdef INT_16BIT
+         (((ulg)(extent)eb_ucsize) != eb_ucsize) ||
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb
new file mode 100644
index 0000000..4a0a713
--- /dev/null
+++ b/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Utilities for extracting and viewing files in .zip archives"
+HOMEPAGE = "http://www.info-zip.org"
+SECTION = "console/utils"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29"
+PE = "1"
+PR = "r5"
+
+SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \
+	file://avoid-strip.patch \
+	file://define-ldflags.patch \
+	file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \
+	file://unzip-6.0_overflow3.diff \
+	file://09-cve-2014-8139-crc-overflow.patch \
+	file://10-cve-2014-8140-test-compr-eb.patch \
+	file://11-cve-2014-8141-getzip64data.patch \
+"
+
+SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
+SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
+S = "${WORKDIR}/unzip60"
+
+# Makefile uses CF_NOOPT instead of CFLAGS.  We lifted the values from
+# Makefile and add CFLAGS.  Optimization will be overriden by unzip
+# configure to be -O3.
+#
+EXTRA_OEMAKE += "STRIP=true LF2='' \
+                'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'"
+
+export LD = "${CC}"
+LD_class-native = "${CC}"
+
+do_compile() {
+        oe_runmake -f unix/Makefile generic
+}
+
+do_install() {
+        oe_runmake -f unix/Makefile install prefix=${D}${prefix}
+	install -d ${D}${mandir}
+	mv ${D}${prefix}/man/* ${D}${mandir}
+	rmdir ${D}${prefix}/man/
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "unzip"
+ALTERNATIVE_LINK_NAME[unzip] = "${bindir}/unzip"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
new file mode 100644
index 0000000..14ab9c5
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
@@ -0,0 +1,79 @@
+Fix ping mode failure
+
+Upstream-Status: Pending  
+
+When watchdog works on ping mode, the system will be rebooted since
+watchdog can not receive the expected ECOREPLY on a setting interval.
+
+Ping mode uses a raw socket to send a ECO packet, then uses select()
+to wait and recvfrom() to receive the ECOREPLY packet, if select()
+shows the data is ready, and the data is not the expected ECOREPLY,
+and waiting time is not overdue, it will continue use select() and
+recvfrom().
+
+Problem is that the raw socket can receive any icmp packets, if we do
+not set filters, and there are many icmp packets on socket, this
+program will not find its interested ECOREPLY packet in a special
+interval, which makes the ping mode fail.
+
+
+Other program is that watchdog sometime can not reach the call of
+recvfrom to try to receive packets since tv_sec of struct timeval
+of select parameter is 0.
+
+The timeout of select() is the result of ping interval minusing the
+time of calling gettimeofday spending, when ping interval is 1 second,
+and the call of gettimeofday() spends several useconds, the tv_sec of
+struct timeval of select parameter must be 0, at that condition, we
+should it is valid of tv_sec of struct timeval of select parameter be 0 
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ src/net.c      |    2 +-
+ src/watchdog.c |    5 ++++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+Index: watchdog-5.14/src/watchdog.c
+===================================================================
+--- watchdog-5.14.orig/src/watchdog.c
++++ watchdog-5.14/src/watchdog.c
+@@ -24,6 +24,7 @@
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <linux/oom.h>
++#include <linux/icmp.h>
+ #include <linux/watchdog.h>
+ #include <string.h>
+ 
+Index: watchdog-5.14/src/net.c
+===================================================================
+--- watchdog-5.14.orig/src/net.c
++++ watchdog-5.14/src/net.c
+@@ -11,7 +11,8 @@
+ #include <errno.h>
+ #include <sys/time.h>
+ #include <netinet/ip.h>
+-#include <netinet/ip_icmp.h>
++#include <linux/icmp.h>
++//#include <netinet/ip_icmp.h>
+ #include <fcntl.h>
+ #include <string.h>
+ #include <unistd.h>		/* for gethostname() etc */
+@@ -179,6 +180,9 @@ int open_netcheck(struct list *tlist)
+ {
+ 	struct list *act;
+ 	int hold = 0;
++	struct icmp_filter filt;
++	filt.data = ~(1<<ICMP_ECHOREPLY);
++
+ 
+ 	if (tlist != NULL) {
+ 		for (act = tlist; act != NULL; act = act->next) {
+@@ -202,6 +206,7 @@ int open_netcheck(struct list *tlist)
+ 			    fatal_error(EX_SYSERR, "error opening socket (%s)", strerror(errno));
+ 			}
+ 
++			setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt));
+ 			/* this is necessary for broadcast pings to work */
+ 			(void)setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold));
+ 
diff --git a/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
new file mode 100644
index 0000000..2fad3a1
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
@@ -0,0 +1,27 @@
+Fix out of tree build support:
+
+| installing /etc/watchdog.conf
+|  /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5'
+|  /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8'
+|  /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.conf.5 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5'
+|  /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_keepalive.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_identify.8 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8'
+| /usr/bin/install: cannot stat `watchdog.conf': No such file or directory
+| make[2]: *** [install-etc-local] Error 1
+
+Upstream-Status: Pending
+
+RP 2013/03/21
+
+Index: watchdog-5.13/Makefile.am
+===================================================================
+--- watchdog-5.13.orig/Makefile.am	2013-02-01 11:15:44.000000000 +0000
++++ watchdog-5.13/Makefile.am	2013-03-21 11:59:35.637139031 +0000
+@@ -16,7 +16,7 @@
+ 	else \
+ 	        echo "installing $(CONFIG_FILENAME)"; \
+ 		$(mkinstalldirs) `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \
+-	        $(INSTALL_DATA) watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
++	        $(INSTALL_DATA) $(srcdir)/watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
+ 	fi
+ 
+ install-data-local: install-etc-local
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
new file mode 100644
index 0000000..36f2968
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
@@ -0,0 +1,11 @@
+--- watchdog-5.13.orig/watchdog.conf	2013-02-01 12:15:44.000000000 +0100
++++ watchdog-5.13/watchdog.conf	2014-11-13 10:59:43.233943000 +0100
+@@ -20,7 +20,7 @@
+ #test-binary		= 
+ #test-timeout		= 
+ 
+-#watchdog-device	= /dev/watchdog
++watchdog-device	= /dev/watchdog
+ 
+ # Defaults compiled into the binary
+ #temperature-device	=
diff --git a/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch b/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
new file mode 100644
index 0000000..0fa8ee9
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
@@ -0,0 +1,53 @@
+--- watchdog-5.13.orig/redhat/watchdog.init	2014-11-12 17:18:39.125943000 +0100
++++ watchdog-5.13/redhat/watchdog.init	2014-11-12 18:27:36.189943000 +0100
+@@ -7,7 +7,7 @@
+ #                 Henning P. Schmiedehausen <hps@tanstaafl.de>
+ 
+ # Source function library.
+-. /etc/rc.d/init.d/functions
++. /etc/init.d/functions
+ 
+ [ -x /usr/sbin/watchdog -a -e /etc/watchdog.conf ] || exit 0
+ 
+@@ -23,22 +23,22 @@
+ 
+ start() {
+ 
+-	echo -n $"Starting $prog: "
++	echo -n "Starting $prog: "
+ 	if [ -n "$(pidofproc $prog)" ]; then
+-		echo -n $"$prog: already running"
+-		echo_failure
++		echo -n "$prog: already running "
++		failure
+ 		echo
+ 		return 1
+ 	fi
+ 	if [ "$VERBOSE" = "yes" ]; then
+-	    daemon /usr/sbin/${prog} -v
++	    /usr/sbin/${prog} -v
+ 	else
+-	    daemon /usr/sbin/${prog}
++	    /usr/sbin/${prog}
+         fi
+ 	RETVAL=$?
+ 	[ $RETVAL -eq 0 ] && touch $lockfile
+-	[ $RETVAL -eq 0 ] && echo_success
+-	[ $RETVAL -ne 0 ] && echo_failure
++	[ $RETVAL -eq 0 ] && success
++	[ $RETVAL -ne 0 ] && failure
+ 	echo
+ 	return $RETVAL
+ }
+@@ -50,8 +50,10 @@
+ 	# and reboot the box.
+ 	killproc $prog -TERM
+ 	RETVAL=$?
+-	echo
+ 	[ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
++	[ $RETVAL -eq 0 ] && success
++	[ $RETVAL -ne 0 ] && failure
++	echo
+ 	return $RETVAL
+ }
+ 
diff --git a/meta/recipes-extended/watchdog/watchdog_5.14.bb b/meta/recipes-extended/watchdog/watchdog_5.14.bb
new file mode 100644
index 0000000..9ec0a8e
--- /dev/null
+++ b/meta/recipes-extended/watchdog/watchdog_5.14.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Software watchdog"
+DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
+working. If programs in user space are not longer executed \
+it will reboot the system."
+HOMEPAGE = "http://watchdog.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
+
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
+           file://fixsepbuild.patch \
+	   file://fix-ping-failure.patch \
+	   file://watchdog-init.patch \
+	   file://watchdog-conf.patch"
+
+SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
+SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
+
+inherit autotools
+inherit update-rc.d
+
+INITSCRIPT_NAME = "watchdog.sh"
+INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
+
+RRECOMMENDS_${PN} = "kernel-module-softdog"
+
+do_install_append() {
+	install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
+}
diff --git a/meta/recipes-extended/wget/wget.inc b/meta/recipes-extended/wget/wget.inc
new file mode 100644
index 0000000..049b898
--- /dev/null
+++ b/meta/recipes-extended/wget/wget.inc
@@ -0,0 +1,24 @@
+SUMMARY = "Console URL download utility supporting HTTP, FTP, etc"
+HOMEPAGE = "https://www.gnu.org/software/wget/"
+SECTION = "console/network"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "gnutls zlib libpcre"
+
+INC_PR = "r16"
+
+inherit autotools gettext texinfo update-alternatives pkgconfig
+
+EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
+                --without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no"
+
+ALTERNATIVE_${PN} = "wget"
+ALTERNATIVE_${PN}_class-nativesdk = ""
+ALTERNATIVE_PRIORITY = "100"
+
+RRECOMMENDS_${PN} += "ca-certificates"
+
+BBCLASSEXTEND += "nativesdk"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux"
diff --git a/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000..0b3c6f5
--- /dev/null
+++ b/meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: wget-1.16.3/lib/Makefile.am
+===================================================================
+--- wget-1.16.3.orig/lib/Makefile.am
++++ wget-1.16.3/lib/Makefile.am
+@@ -846,7 +846,7 @@ install-exec-localcharset: all-local
+ 	  case '$(host_os)' in \
+ 	    darwin[56]*) \
+ 	      need_charset_alias=true ;; \
+-	    darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++	    darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ 	      need_charset_alias=false ;; \
+ 	    *) \
+ 	      need_charset_alias=true ;; \
diff --git a/meta/recipes-extended/wget/wget/fix_makefile.patch b/meta/recipes-extended/wget/wget/fix_makefile.patch
new file mode 100644
index 0000000..eaa2e7e
--- /dev/null
+++ b/meta/recipes-extended/wget/wget/fix_makefile.patch
@@ -0,0 +1,18 @@
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: wget-1.12/configure.ac
+===================================================================
+--- wget-1.12.orig/configure.ac	2009-09-22 09:39:49.000000000 -0700
++++ wget-1.12/configure.ac	2011-10-19 20:32:53.714812160 -0700
+@@ -177,7 +177,7 @@
+ dnl Gettext
+ dnl
+ AM_GNU_GETTEXT([external],[need-ngettext])
+-AM_GNU_GETTEXT_VERSION([0.17])
++AM_GNU_GETTEXT_VERSION([0.18])
+ 
+ AC_PROG_RANLIB
+ 
diff --git a/meta/recipes-extended/wget/wget_1.16.3.bb b/meta/recipes-extended/wget/wget_1.16.3.bb
new file mode 100644
index 0000000..5c34a42
--- /dev/null
+++ b/meta/recipes-extended/wget/wget_1.16.3.bb
@@ -0,0 +1,9 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+           file://fix_makefile.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+          "
+
+SRC_URI[md5sum] = "f61d9011b99f824106a5d5a05dd0f63d"
+SRC_URI[sha256sum] = "9f1c6d09d7148c1c2d9fd0ea655dcf4dcc407deb2db32d4126251ca0245cb670"
+
+require wget.inc
diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
new file mode 100644
index 0000000..495cdc6
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.18/automake-foreign.patch
@@ -0,0 +1,28 @@
+Subject: [PATCH] automake foreign strictness
+
+Use foreign strictness to avoid automake errors.
+
+Upstream-Status: Inappropriate [upstream no longer active]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b30b6f5..bd3222c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,6 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(which.c)
+-AM_INIT_AUTOMAKE(which, 2.18)
++AC_INIT([which],[2.18])
++AC_CONFIG_SRCDIR(which.c)
++AM_INIT_AUTOMAKE([foreign])
+ AM_CONFIG_HEADER(config.h)
+ AM_MAINTAINER_MODE
+ 
+-- 
+1.7.1
+
diff --git a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
new file mode 100644
index 0000000..fb9b1a4
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
@@ -0,0 +1,53 @@
+Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific]
+
+# glibc also implements the function group_member. To avoid name conflict,
+# here let us append a "_" to which's version.
+#
+# Signed-off-by Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20
+# (this patch is licensed under GPLv2)
+
+--- which-2.18/bash.c
++++ which-2.18/bash.c
+@@ -45,7 +45,12 @@
+  * - changed all occurences of 'gid_t' into 'GID_T'.
+  * - exported functions needed in which.c
+  */
+-static int group_member (GID_T gid);
++
++/*
++ * glibc also implements the function group_member. To avoid name conflict,
++ * here let us append a "_" to which's version.
++ */
++static int _group_member (GID_T gid);
+ static char* extract_colon_unit (char const* string, int *p_index);
+ 
+ /*===========================================================================
+@@ -200,8 +205,8 @@
+ 
+ /* From bash-2.05b / general.c / line 805 */
+ /* Return non-zero if GID is one that we have in our groups list. */
+-int
+-group_member (GID_T gid)
++static int
++_group_member (GID_T gid)
+ {
+ #if defined (HAVE_GETGROUPS)
+   register int i;
+@@ -290,7 +295,7 @@
+     return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
+ 
+   /* Otherwise, if we are in the owning group, the group permissions apply. */
+-  if (group_member (finfo.st_gid))
++  if (_group_member (finfo.st_gid))
+     return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS;
+ 
+   /* Otherwise, if we are in the other group, the other permissions apply. */
+@@ -331,7 +336,7 @@
+ /* Given a string containing units of information separated by colons,
+    return the next one pointed to by (P_INDEX), or NULL if there are no more.
+    Advance (P_INDEX) to the character after the colon. */
+-char*
++static char*
+ extract_colon_unit (char const* string, int* p_index)
+ {
+   int i, start, len;
diff --git a/meta/recipes-extended/which/which-2.21/automake.patch b/meta/recipes-extended/which/which-2.21/automake.patch
new file mode 100644
index 0000000..4d0f2e4
--- /dev/null
+++ b/meta/recipes-extended/which/which-2.21/automake.patch
@@ -0,0 +1,19 @@
+Update autoconf prologue to use "foreign" strictness.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index d974461..a20dfa8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,7 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT([which], [2.21])
+ AC_CONFIG_SRCDIR(which.c)
+-AM_INIT_AUTOMAKE
++AM_INIT_AUTOMAKE([foreign])
+ AM_CONFIG_HEADER(config.h)
+ AM_MAINTAINER_MODE
+ 
+
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
new file mode 100644
index 0000000..eb6cc99
--- /dev/null
+++ b/meta/recipes-extended/which/which_2.18.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Displays the full path of shell commands"
+DESCRIPTION = "Which is a utility that prints out the full path of the \
+executables that bash(1) would execute when the passed \
+program names would have been entered on the shell prompt. \
+It does this by using the exact same algorithm as bash."
+SECTION = "libs"
+HOMEPAGE = "http://carlo17.home.xs4all.nl/which/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+PR = "r2"
+
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/which/which-2.18.tar.gz/42d51938e48b91f6e19fabf216f5c3e9/which-${PV}.tar.gz \
+           file://fix_name_conflict_group_member.patch \
+           file://automake-foreign.patch \
+"
+
+SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9"
+SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544"
+
+DEPENDS = "cwautomacros-native"
+
+inherit autotools texinfo update-alternatives
+
+do_configure_prepend() {
+	OLD="@ACLOCAL_CWFLAGS@"
+	NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4"
+	sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}`
+}
+
+ALTERNATIVE_${PN} = "which"
+ALTERNATIVE_PRIORITY = "100"
+
diff --git a/meta/recipes-extended/which/which_2.21.bb b/meta/recipes-extended/which/which_2.21.bb
new file mode 100644
index 0000000..a7687f6
--- /dev/null
+++ b/meta/recipes-extended/which/which_2.21.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Displays the full path of shell commands"
+DESCRIPTION = "Which is a utility that prints out the full path of the \
+executables that bash(1) would execute when the passed \
+program names would have been entered on the shell prompt. \
+It does this by using the exact same algorithm as bash."
+SECTION = "libs"
+HOMEPAGE = "http://carlo17.home.xs4all.nl/which/"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+                    file://which.c;beginline=1;endline=17;md5=a9963693af2272e7a8df6f231164e7a2"
+DEPENDS     = "cwautomacros-native"
+
+inherit autotools texinfo update-alternatives
+
+PR = "r3"
+
+EXTRA_OECONF = "--disable-iberty"
+
+SRC_URI = "${GNU_MIRROR}/which/which-${PV}.tar.gz \
+           file://automake.patch \
+           "
+
+SRC_URI[md5sum] = "097ff1a324ae02e0a3b0369f07a7544a"
+SRC_URI[sha256sum] = "f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad"
+
+do_configure_prepend() {
+	sed -i -e 's%@ACLOCAL_CWFLAGS@%-I ${STAGING_DIR_NATIVE}/usr/share/cwautomacros/m4%g' ${S}/Makefile.am ${S}/tilde/Makefile.am
+}
+
+ALTERNATIVE_${PN} = "which"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch
new file mode 100644
index 0000000..4cd1baf
--- /dev/null
+++ b/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch
@@ -0,0 +1,672 @@
+From 174aa7206f4b308d4d2292bb8067a07d8cc715c0 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Tue, 29 Apr 2014 07:29:32 +0200
+Subject: [PATCH] Reinstate xdg-terminal
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+Upstream-Status: Inappropriate [Revert]
+---
+ scripts/Makefile.in  |   6 +-
+ scripts/xdg-terminal | 622 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 625 insertions(+), 3 deletions(-)
+ create mode 100755 scripts/xdg-terminal
+
+diff --git a/scripts/Makefile.in b/scripts/Makefile.in
+index 2c7d2ac..bef10d1 100644
+--- a/scripts/Makefile.in
++++ b/scripts/Makefile.in
+@@ -20,11 +20,11 @@ SCRIPTS		= \
+     xdg-open \
+     xdg-email \
+     xdg-screensaver \
+-    xdg-settings
++    xdg-settings \
++    xdg-terminal
+ #    xdg-su
+ #    xdg-copy \
+ #    xdg-file-dialog
+-#    xdg-terminal
+ 
+ MANPAGES=	$(SCRIPTS:%=man/%.1)
+ WEBPAGES=	$(SCRIPTS:%=%.html)
+@@ -42,7 +42,7 @@ release:	scripts html man
+ 	rm -f xdg-*.in *~ HACKING generate-help-script.awk
+ 	rm -rf desc/
+ 	rm -rf xsl/
+-	rm -f xdg-file-dialog xdg-su xdg-copy xdg-terminal
++	rm -f xdg-file-dialog xdg-su xdg-copy
+ 
+ distclean: clean
+ 	rm -f Makefile
+diff --git a/scripts/xdg-terminal b/scripts/xdg-terminal
+new file mode 100755
+index 0000000..4bd9205
+--- /dev/null
++++ b/scripts/xdg-terminal
+@@ -0,0 +1,622 @@
++#!/bin/sh
++#---------------------------------------------
++#   xdg-terminal
++#
++#   Utility script to open the registered terminal emulator
++#
++#   Refer to the usage() function below for usage.
++#
++#   Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
++#   Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
++#   Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
++#
++#   LICENSE:
++#
++#   Permission is hereby granted, free of charge, to any person obtaining a
++#   copy of this software and associated documentation files (the "Software"),
++#   to deal in the Software without restriction, including without limitation
++#   the rights to use, copy, modify, merge, publish, distribute, sublicense,
++#   and/or sell copies of the Software, and to permit persons to whom the
++#   Software is furnished to do so, subject to the following conditions:
++#
++#   The above copyright notice and this permission notice shall be included
++#   in all copies or substantial portions of the Software.
++#
++#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++#   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++#   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
++#   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
++#   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++#   OTHER DEALINGS IN THE SOFTWARE.
++#
++#---------------------------------------------
++
++manualpage()
++{
++cat << _MANUALPAGE
++Name
++
++   xdg-terminal - opens the user's preferred terminal emulator application
++
++Synopsis
++
++   xdg-terminal [command]
++
++   xdg-terminal { --help | --manual | --version }
++
++Description
++
++   xdg-terminal opens the user's preferred terminal emulator application. If
++   a command is provided the command will be executed by the shell within the
++   newly opened terminal window.
++
++   xdg-terminal is for use inside a desktop session only. It is not
++   recommended to use xdg-terminal as root.
++
++Options
++
++   --help
++           Show command synopsis.
++
++   --manual
++           Show this manual page.
++
++   --version
++           Show the xdg-utils version information.
++
++Exit Codes
++
++   An exit code of 0 indicates success while a non-zero exit code indicates
++   failure. The following failure codes can be returned:
++
++   1
++           Error in command line syntax.
++
++   3
++           A required tool could not be found.
++
++   4
++           The action failed.
++
++Examples
++
++ xdg-terminal
++
++   Opens the user's default terminal emulator, just starting an interactive
++   shell.
++
++ xdg-terminal top
++
++   Opens the user's default terminal emulator and lets it run the top
++   executable.
++_MANUALPAGE
++}
++
++usage()
++{
++cat << _USAGE
++   xdg-terminal - opens the user's preferred terminal emulator application
++
++Synopsis
++
++   xdg-terminal [command]
++
++   xdg-terminal { --help | --manual | --version }
++
++_USAGE
++}
++
++#@xdg-utils-common@
++
++#----------------------------------------------------------------------------
++#   Common utility functions included in all XDG wrapper scripts
++#----------------------------------------------------------------------------
++
++DEBUG()
++{
++  [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
++  [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
++  shift
++  echo "$@" >&2
++}
++
++# This handles backslashes but not quote marks.
++first_word()
++{
++    read first rest
++    echo "$first"
++}
++
++#-------------------------------------------------------------
++# map a binary to a .desktop file
++binary_to_desktop_file()
++{
++    search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
++    binary="`which "$1"`"
++    binary="`readlink -f "$binary"`"
++    base="`basename "$binary"`"
++    IFS=:
++    for dir in $search; do
++        unset IFS
++        [ "$dir" ] || continue
++        [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue
++        for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
++            [ -r "$file" ] || continue
++            # Check to make sure it's worth the processing.
++            grep -q "^Exec.*$base" "$file" || continue
++            # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
++            grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
++            command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
++            command="`which "$command"`"
++            if [ x"`readlink -f "$command"`" = x"$binary" ]; then
++                # Fix any double slashes that got added path composition
++                echo "$file" | sed -e 's,//*,/,g'
++                return
++            fi
++        done
++    done
++}
++
++#-------------------------------------------------------------
++# map a .desktop file to a binary
++## FIXME: handle vendor dir case
++desktop_file_to_binary()
++{
++    search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
++    desktop="`basename "$1"`"
++    IFS=:
++    for dir in $search; do
++        unset IFS
++        [ "$dir" ] && [ -d "$dir/applications" ] || continue
++        file="$dir/applications/$desktop"
++        [ -r "$file" ] || continue
++        # Remove any arguments (%F, %f, %U, %u, etc.).
++        command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
++        command="`which "$command"`"
++        readlink -f "$command"
++        return
++    done
++}
++
++#-------------------------------------------------------------
++# Exit script on successfully completing the desired operation
++
++exit_success()
++{
++    if [ $# -gt 0 ]; then
++        echo "$@"
++        echo
++    fi
++
++    exit 0
++}
++
++
++#-----------------------------------------
++# Exit script on malformed arguments, not enough arguments
++# or missing required option.
++# prints usage information
++
++exit_failure_syntax()
++{
++    if [ $# -gt 0 ]; then
++        echo "xdg-terminal: $@" >&2
++        echo "Try 'xdg-terminal --help' for more information." >&2
++    else
++        usage
++        echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info."
++    fi
++
++    exit 1
++}
++
++#-------------------------------------------------------------
++# Exit script on missing file specified on command line
++
++exit_failure_file_missing()
++{
++    if [ $# -gt 0 ]; then
++        echo "xdg-terminal: $@" >&2
++    fi
++
++    exit 2
++}
++
++#-------------------------------------------------------------
++# Exit script on failure to locate necessary tool applications
++
++exit_failure_operation_impossible()
++{
++    if [ $# -gt 0 ]; then
++        echo "xdg-terminal: $@" >&2
++    fi
++
++    exit 3
++}
++
++#-------------------------------------------------------------
++# Exit script on failure returned by a tool application
++
++exit_failure_operation_failed()
++{
++    if [ $# -gt 0 ]; then
++        echo "xdg-terminal: $@" >&2
++    fi
++
++    exit 4
++}
++
++#------------------------------------------------------------
++# Exit script on insufficient permission to read a specified file
++
++exit_failure_file_permission_read()
++{
++    if [ $# -gt 0 ]; then
++        echo "xdg-terminal: $@" >&2
++    fi
++
++    exit 5
++}
++
++#------------------------------------------------------------
++# Exit script on insufficient permission to write a specified file
++
++exit_failure_file_permission_write()
++{
++    if [ $# -gt 0 ]; then
++        echo "xdg-terminal: $@" >&2
++    fi
++
++    exit 6
++}
++
++check_input_file()
++{
++    if [ ! -e "$1" ]; then
++        exit_failure_file_missing "file '$1' does not exist"
++    fi
++    if [ ! -r "$1" ]; then
++        exit_failure_file_permission_read "no permission to read file '$1'"
++    fi
++}
++
++check_vendor_prefix()
++{
++    file_label="$2"
++    [ -n "$file_label" ] || file_label="filename"
++    file=`basename "$1"`
++    case "$file" in
++       [[:alpha:]]*-*)
++         return
++         ;;
++    esac
++
++    echo "xdg-terminal: $file_label '$file' does not have a proper vendor prefix" >&2
++    echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
++    echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2
++    echo "Use --novendor to override or 'xdg-terminal --manual' for additional info." >&2
++    exit 1
++}
++
++check_output_file()
++{
++    # if the file exists, check if it is writeable
++    # if it does not exists, check if we are allowed to write on the directory
++    if [ -e "$1" ]; then
++        if [ ! -w "$1" ]; then
++            exit_failure_file_permission_write "no permission to write to file '$1'"
++        fi
++    else
++        DIR=`dirname "$1"`
++        if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then
++            exit_failure_file_permission_write "no permission to create file '$1'"
++        fi
++    fi
++}
++
++#----------------------------------------
++# Checks for shared commands, e.g. --help
++
++check_common_commands()
++{
++    while [ $# -gt 0 ] ; do
++        parm="$1"
++        shift
++
++        case "$parm" in
++            --help)
++            usage
++            echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info."
++            exit_success
++            ;;
++
++            --manual)
++            manualpage
++            exit_success
++            ;;
++
++            --version)
++            echo "xdg-terminal 1.1.0 rc1"
++            exit_success
++            ;;
++        esac
++    done
++}
++
++check_common_commands "$@"
++
++[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
++if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
++    # Be silent
++    xdg_redirect_output=" > /dev/null 2> /dev/null"
++else
++    # All output to stderr
++    xdg_redirect_output=" >&2"
++fi
++
++#--------------------------------------
++# Checks for known desktop environments
++# set variable DE to the desktop environments name, lowercase
++
++detectDE()
++{
++    # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
++    unset GREP_OPTIONS
++
++    if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
++      case "${XDG_CURRENT_DESKTOP}" in
++         ENLIGHTENMENT)
++           DE=enlightenment;
++           ;;
++         GNOME)
++           DE=gnome;
++           ;;
++         KDE)
++           DE=kde;
++           ;;
++         LXDE)
++           DE=lxde;
++           ;;
++         MATE)
++           DE=mate;
++           ;;
++         XFCE)
++           DE=xfce
++           ;;
++      esac
++    fi
++
++    if [ x"$DE" = x"" ]; then
++      # classic fallbacks
++      if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde;
++      elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
++      elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate;
++      elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
++      elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
++      elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
++      elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment;
++      fi
++    fi
++
++    if [ x"$DE" = x"" ]; then
++      # fallback to checking $DESKTOP_SESSION
++      case "$DESKTOP_SESSION" in
++         gnome)
++           DE=gnome;
++           ;;
++         LXDE|Lubuntu)
++           DE=lxde; 
++           ;;
++         MATE)
++           DE=mate;
++           ;;
++         xfce|xfce4|'Xfce Session')
++           DE=xfce;
++           ;;
++      esac
++    fi
++
++    if [ x"$DE" = x"" ]; then
++      # fallback to uname output for other platforms
++      case "$(uname 2>/dev/null)" in 
++        Darwin)
++          DE=darwin;
++          ;;
++      esac
++    fi
++
++    if [ x"$DE" = x"gnome" ]; then
++      # gnome-default-applications-properties is only available in GNOME 2.x
++      # but not in GNOME 3.x
++      which gnome-default-applications-properties > /dev/null 2>&1  || DE="gnome3"
++    fi
++}
++
++#----------------------------------------------------------------------------
++# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
++# It also always returns 1 in KDE 3.4 and earlier
++# Simply return 0 in such case
++
++kfmclient_fix_exit_code()
++{
++    version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
++    major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
++    minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
++    release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
++    test "$major" -gt 3 && return $1
++    test "$minor" -gt 5 && return $1
++    test "$release" -gt 4 && return $1
++    return 0
++}
++
++terminal_kde()
++{
++    terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole`
++
++    terminal_exec=`which $terminal 2>/dev/null`
++
++    if [ -x "$terminal_exec" ]; then
++        if [ x"$1" = x"" ]; then
++            $terminal_exec
++        else
++            $terminal_exec -e "$1"
++        fi
++
++        if [ $? -eq 0 ]; then
++            exit_success
++        else
++            exit_failure_operation_failed
++        fi
++    else
++        exit_failure_operation_impossible "configured terminal program '$terminal' not found or not executable"
++    fi
++}
++
++terminal_gnome()
++{
++    term_exec_key="/desktop/gnome/applications/terminal/exec"
++    term_exec_arg_key="/desktop/gnome/applications/terminal/exec_arg"
++
++    term_exec=`gconftool-2 --get ${term_exec_key}`
++    term_exec_arg=`gconftool-2 --get ${term_exec_arg_key}`
++
++    terminal_exec=`which $term_exec 2>/dev/null`
++
++    if [ -x "$terminal_exec" ]; then
++        if [ x"$1" = x"" ]; then
++            $terminal_exec
++        else
++            if [ x"$term_exec_arg" = x"" ]; then
++                $terminal_exec "$1"
++            else
++                $terminal_exec "$term_exec_arg" "$1"
++            fi
++        fi
++
++        if [ $? -eq 0 ]; then
++            exit_success
++        else
++            exit_failure_operation_failed
++        fi
++    else
++        exit_failure_operation_impossible "configured terminal program '$term_exec' not found or not executable"
++    fi
++}
++
++terminal_xfce()
++{
++    if [ x"$1" = x"" ]; then
++        exo-open --launch TerminalEmulator
++    else
++        exo-open --launch TerminalEmulator "$1"
++    fi
++
++    if [ $? -eq 0 ]; then
++        exit_success
++    else
++        exit_failure_operation_failed
++    fi
++}
++
++terminal_generic()
++{
++    # if $TERM is a known non-command, use hard-coded fallbacks
++    if [ x"$TERM" = x"" ] || [ x"$TERM" = x"linux" ] || [ x"$TERM" = x"vt100" ]; then
++        TERM=xterm
++    fi
++
++    terminal_exec=`which $TERM 2>/dev/null`
++
++    if [ -x "$terminal_exec" ]; then
++        if [ x"$1" = x"" ]; then
++            $terminal_exec
++        else
++            # screen and urxvt won't do their own parsing of quoted arguments
++            if [ x"$TERM" = x"screen" ]; then
++                # screen has an incompatible meaning for -e
++                sh -c "exec $terminal_exec $1"
++            elif [ x"$TERM" = x"urxvt" ] || [ x"$TERM" = x"rxvt-unicode" ] || [ x"$TERM" = x"rxvt" ]; then
++                #TODO: Use whatever mechanism dash supports to test for
++                #      rxvt-* to match things like rxvt-unicode-256color
++                sh -c "exec $terminal_exec -e $1"
++            else
++                $terminal_exec -e "$1"
++            fi
++        fi
++
++        if [ $? -eq 0 ]; then
++            exit_success
++        else
++            exit_failure_operation_failed
++        fi
++    else
++        exit_failure_operation_impossible "configured terminal program '$TERM' not found or not executable"
++    fi
++}
++
++terminal_lxde()
++{
++    if which lxterminal &>/dev/null; then
++        if [ x"$1" = x"" ]; then
++            lxterminal
++        else
++            lxterminal -e "$1"
++        fi
++    else
++        terminal_generic "$1"
++    fi
++}
++
++#[ x"$1" != x"" ] || exit_failure_syntax
++
++command=
++while [ $# -gt 0 ] ; do
++    parm="$1"
++    shift
++
++    case "$parm" in
++      -*)
++        exit_failure_syntax "unexpected option '$parm'"
++        ;;
++
++      *)
++        if [ -n "$command" ] ; then
++            exit_failure_syntax "unexpected argument '$parm'"
++        fi
++        command="$parm"
++        ;;
++    esac
++done
++
++detectDE
++
++if [ x"$DE" = x"" ]; then
++    DE=generic
++fi
++
++case "$DE" in
++    kde)
++    terminal_kde "$command"
++    ;;
++
++    gnome*)
++    terminal_gnome "$command"
++    ;;
++
++    xfce)
++    terminal_xfce "$command"
++    ;;
++
++    lxde)
++    terminal_lxde "$command"
++    ;;
++
++    generic)
++    terminal_generic "$command"
++    ;;
++
++    *)
++    exit_failure_operation_impossible "no terminal emulator available"
++    ;;
++esac
+-- 
+1.9.0
+
diff --git a/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb
new file mode 100644
index 0000000..46f1e3c
--- /dev/null
+++ b/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Basic desktop integration functions"
+
+DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
+desktop integration functions for any Free Desktop, such as Linux. \
+They are intended to provide a set of defacto standards. \
+The following scripts are provided at this time: \
+xdg-desktop-icon \     
+xdg-desktop-menu \  
+xdg-email \ 
+xdg-icon-resource \
+xdg-mime \       
+xdg-open \     
+xdg-screensaver \ 
+xdg-terminal \
+"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
+
+SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
+           file://0001-Reinstate-xdg-terminal.patch \
+          "
+
+SRC_URI[md5sum] = "fadf5e7a08e0526fc60dbe3e5b7ef8d6"
+SRC_URI[sha256sum] = "7b05558ae4bb8ede356863cae8c42e3e012aa421bf9d45130a570fd209d79102"
+
+inherit autotools-brokensep distro_features_check
+
+# The xprop requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+RDEPENDS_${PN} += "xprop"
diff --git a/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch
new file mode 100644
index 0000000..cd6e6c1
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/Disable-services-from-inetd.conf-if-a-service-with-t.patch
@@ -0,0 +1,86 @@
+Upstream-Status: Pending [from other distro Debian]
+
+From d588b6530e1382a624898b3f4307f636c72c80a9 Mon Sep 17 00:00:00 2001
+From: Pierre Habouzit <madcoder@debian.org>
+Date: Wed, 28 Nov 2007 10:13:08 +0100
+Subject: [PATCH] Disable services from inetd.conf if a service with the same id exists.
+
+  This way, if a service is enabled in /etc/xinetd* _and_ in
+/etc/inetd.conf, the one (even if disabled) from /etc/xinetd* takes
+precedence.
+
+Signed-off-by: Pierre Habouzit <madcoder@debian.org>
+---
+ xinetd/inet.c |   22 +++++++++++++++++++---
+ 1 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/xinetd/inet.c b/xinetd/inet.c
+index 1cb2ba2..8caab45 100644
+--- a/xinetd/inet.c
++++ b/xinetd/inet.c
+@@ -23,6 +23,8 @@
+ #include "parsesup.h"
+ #include "nvlists.h"
+ 
++static psi_h iter ;
++
+ static int get_next_inet_entry( int fd, pset_h sconfs, 
+                           struct service_config *defaults);
+ 
+@@ -32,12 +34,15 @@ void parse_inet_conf_file( int fd, struct configuration *confp )
+    struct service_config *default_config = CNF_DEFAULTS( confp );
+    
+    line_count = 0;
++   iter = psi_create (sconfs);
+ 
+    for( ;; )
+    {   
+       if (get_next_inet_entry(fd, sconfs, default_config) == -2)
+          break;
+    }
++
++   psi_destroy(iter);
+ }
+ 
+ static int get_next_inet_entry( int fd, pset_h sconfs, 
+@@ -46,7 +51,7 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
+    char *p;
+    str_h strp;
+    char *line = next_line(fd);
+-   struct service_config *scp;
++   struct service_config *scp, *tmp;
+    unsigned u, i;
+    const char *func = "get_next_inet_entry";
+    char *name = NULL, *rpcvers = NULL, *rpcproto = NULL;
+@@ -405,7 +410,16 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
+    SC_SPECIFY( scp, A_SOCKET_TYPE );
+    SC_SPECIFY( scp, A_WAIT );
+ 
+-   if( ! pset_add(sconfs, scp) )
++   for ( tmp = SCP( psi_start( iter ) ) ; tmp ; tmp = SCP( psi_next(iter)) ){
++      if (EQ(SC_ID(scp), SC_ID(tmp))) {
++         parsemsg(LOG_DEBUG, func, "removing duplicate service %s", SC_NAME(scp));
++         sc_free(scp);
++         scp = NULL;
++         break;
++      }
++   }
++
++   if( scp && ! pset_add(sconfs, scp) )
+    {
+       out_of_memory( func );
+       pset_destroy(args);
+@@ -414,7 +428,9 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
+    }
+ 
+    pset_destroy(args);
+-   parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp));
++   if (scp) {
++      parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp));
++   }
+    return 0;
+ }
+ 
+-- 
+1.5.3.6.2040.g15e6
+
diff --git a/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch
new file mode 100644
index 0000000..8e59cdc
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/Various-fixes-from-the-previous-maintainer.patch
@@ -0,0 +1,79 @@
+Upstream-Status: Pending [from other distro Debian]
+
+From a3410b0bc81ab03a889d9ffc14e351badf8372f1 Mon Sep 17 00:00:00 2001
+From: Pierre Habouzit <madcoder@debian.org>
+Date: Mon, 26 Nov 2007 16:02:04 +0100
+Subject: [PATCH] Various fixes from the previous maintainer.
+
+---
+ xinetd/child.c   |   20 +++++++++++++++++---
+ xinetd/service.c |    8 ++++----
+ 2 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/xinetd/child.c b/xinetd/child.c
+index 89ee54c..48e9615 100644
+--- a/xinetd/child.c
++++ b/xinetd/child.c
+@@ -284,6 +284,7 @@ void child_process( struct server *serp )
+    connection_s            *cp  = SERVER_CONNECTION( serp ) ;
+    struct service_config   *scp = SVC_CONF( sp ) ;
+    const char              *func = "child_process" ;
++   int                     fd, null_fd;
+ 
+    signal_default_state();
+ 
+@@ -296,9 +297,22 @@ void child_process( struct server *serp )
+    signals_pending[0] = -1;
+    signals_pending[1] = -1;
+ 
+-   Sclose(0);
+-   Sclose(1);
+-   Sclose(2);
++   if ( ( null_fd = open( "/dev/null", O_RDONLY ) ) == -1 )
++   {
++      msg( LOG_ERR, func, "open('/dev/null') failed: %m") ;
++      _exit( 1 ) ;
++   }
++
++   for ( fd = 0 ; fd <= MAX_PASS_FD ; fd++ )
++   {
++      if ( fd != null_fd && dup2( null_fd, fd ) == -1 )
++      {
++         msg( LOG_ERR, func, "dup2(%d, %d) failed: %m") ;
++         _exit( 1 ) ;
++      }
++   }
++   if ( null_fd > MAX_PASS_FD )
++      (void) Sclose( null_fd ) ;
+ 
+ 
+ #ifdef DEBUG_SERVER
+diff --git a/xinetd/service.c b/xinetd/service.c
+index 3d68d78..0132d6c 100644
+--- a/xinetd/service.c
++++ b/xinetd/service.c
+@@ -745,8 +745,8 @@ static status_e failed_service(struct service *sp,
+                return FAILED;
+ 
+             if ( last == NULL ) {
+-               last = SAIN( calloc( 1, sizeof(union xsockaddr) ) );
+-	       SVC_LAST_DGRAM_ADDR(sp) = (union xsockaddr *)last;
++	    SVC_LAST_DGRAM_ADDR(sp) =  SAIN( calloc( 1, sizeof(union xsockaddr) ) );
++	    last = SAIN( SVC_LAST_DGRAM_ADDR(sp) );
+             }
+ 
+             (void) time( &current_time ) ;
+@@ -772,8 +772,8 @@ static status_e failed_service(struct service *sp,
+                return FAILED;
+ 
+ 	    if( last == NULL ) {
+-               last = SAIN6(calloc( 1, sizeof(union xsockaddr) ) );
+-	       SVC_LAST_DGRAM_ADDR( sp ) = (union xsockaddr *)last;
++	    SVC_LAST_DGRAM_ADDR(sp) = SAIN6(calloc( 1, sizeof(union xsockaddr) ) );
++            last = SAIN6(SVC_LAST_DGRAM_ADDR(sp));
+             }
+ 
+             (void) time( &current_time ) ;
+-- 
+1.5.3.6.2040.g15e6
+
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
new file mode 100644
index 0000000..0542dbe
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
@@ -0,0 +1,32 @@
+xinetd: CVE-2013-4342
+
+xinetd does not enforce the user and group configuration directives
+for TCPMUX services, which causes these services to be run as root
+and makes it easier for remote attackers to gain privileges by
+leveraging another vulnerability in a service.
+http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4342
+
+the patch come from:
+https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff
+
+Signed-off-by: Li Wang <li.wang@windriver.com>
+---
+ xinetd/builtins.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xinetd/builtins.c b/xinetd/builtins.c
+index 3b85579..34a5bac 100644
+--- a/xinetd/builtins.c
++++ b/xinetd/builtins.c
+@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp )
+    if( SC_IS_INTERNAL( scp ) ) {
+       SC_INTERNAL(scp, nserp);
+    } else {
+-      exec_server(nserp);
++      child_process(nserp);
+    }
+ }
+ 
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
new file mode 100644
index 0000000..2365ca1
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
@@ -0,0 +1,112 @@
+Upstream-Status: Pending [from other distro Debian]
+
+From f44b218ccc779ab3f4aed072390ccf129d94b58d Mon Sep 17 00:00:00 2001
+From: David Madore <david@pleiades.stars>
+Date: Mon, 24 Mar 2008 12:45:36 +0100
+Subject: [PATCH] xinetd should be able to listen on IPv6 even in -inetd_compat mode
+
+xinetd does not bind to IPv6 addresses (and does not seem to have an
+option to do so) when used in -inetd_compat mode.  As current inetd's
+are IPv6-aware, this is a problem: this means xinetd cannot be used as
+a drop-in inetd replacement.
+
+The attached patch is a suggestion: it adds a -inetd_ipv6 global
+option that, if used, causes inetd-compatibility lines to have an
+implicit "IPv6" option.  Perhaps this is not the best solution, but
+there should definitely be a way to get inetd.conf to be read in
+IPv6-aware mode.
+---
+ xinetd/confparse.c |    1 +
+ xinetd/inet.c      |   17 +++++++++++++++++
+ xinetd/options.c   |    3 +++
+ xinetd/xinetd.man  |    6 ++++++
+ 4 files changed, 27 insertions(+), 0 deletions(-)
+
+diff --git a/xinetd/confparse.c b/xinetd/confparse.c
+index db9f431..d7b0bcc 100644
+--- a/xinetd/confparse.c
++++ b/xinetd/confparse.c
+@@ -40,6 +40,7 @@
+ #include "inet.h"
+ #include "main.h"
+ 
++extern int inetd_ipv6;
+ extern int inetd_compat;
+ 
+ /*
+diff --git a/xinetd/inet.c b/xinetd/inet.c
+index 8caab45..2e617ae 100644
+--- a/xinetd/inet.c
++++ b/xinetd/inet.c
+@@ -25,6 +25,8 @@
+ 
+ static psi_h iter ;
+ 
++extern int inetd_ipv6;
++
+ static int get_next_inet_entry( int fd, pset_h sconfs, 
+                           struct service_config *defaults);
+ 
+@@ -360,6 +362,21 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
+          }
+          SC_SERVER_ARGV(scp)[u] = p;
+       }
++
++      /* Set the IPv6 flag if we were passed the -inetd_ipv6 option */
++      if ( inetd_ipv6 )
++      {
++         nvp = nv_find_value( service_flags, "IPv6" );
++         if ( nvp == NULL )
++         {
++            parsemsg( LOG_WARNING, func, "inetd.conf - Bad foo %s", name ) ;
++            pset_destroy(args);
++            sc_free(scp);
++            return -1;
++         }
++         M_SET(SC_XFLAGS(scp), nvp->value);
++      }
++
+       /* Set the reuse flag, as this is the default for inetd */
+       nvp = nv_find_value( service_flags, "REUSE" );
+       if ( nvp == NULL )
+diff --git a/xinetd/options.c b/xinetd/options.c
+index b058b6a..dc2f3a0 100644
+--- a/xinetd/options.c
++++ b/xinetd/options.c
+@@ -30,6 +30,7 @@ int logprocs_option ;
+ unsigned logprocs_option_arg ;
+ int stayalive_option=0;
+ char *program_name ;
++int inetd_ipv6 = 0 ;
+ int inetd_compat = 0 ;
+ int dont_fork = 0;
+ 
+@@ -128,6 +129,8 @@ int opt_recognize( int argc, char *argv[] )
+             fprintf(stderr, "\n");
+             exit(0);
+          }
++         else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_ipv6" ) == 0 )
++            inetd_ipv6 = 1;
+          else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_compat" ) == 0 )
+             inetd_compat = 1;
+       }
+diff --git a/xinetd/xinetd.man b/xinetd/xinetd.man
+index c76c3c6..c9dd803 100644
+--- a/xinetd/xinetd.man
++++ b/xinetd/xinetd.man
+@@ -106,6 +106,12 @@ This option causes xinetd to read /etc/inetd.conf in addition to the
+ standard xinetd config files.  /etc/inetd.conf is read after the
+ standard xinetd config files.
+ .TP
++.BI \-inetd_ipv6
++This option causes xinetd to bind to IPv6 (AF_INET6) addresses for
++inetd compatibility lines (see previous option).  This only affects
++how /etc/inetd.conf is interpreted and thus only has any effect if
++the \-inetd_compat option is also used.
++.TP
+ .BI \-cc " interval"
+ This option instructs
+ .B xinetd
+-- 
+1.5.5.rc0.127.gb4337
+
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.conf b/meta/recipes-extended/xinetd/xinetd/xinetd.conf
new file mode 100644
index 0000000..9e6ea25
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.conf
@@ -0,0 +1,11 @@
+# Simple configuration file for xinetd
+#
+# Some defaults, and include /etc/xinetd.d/
+
+defaults
+{
+
+
+}
+
+includedir /etc/xinetd.d
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.default b/meta/recipes-extended/xinetd/xinetd/xinetd.default
new file mode 100644
index 0000000..20a38e3
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.default
@@ -0,0 +1,12 @@
+# Default settings for xinetd. This file is sourced by /bin/sh from
+# /etc/init.d/xinetd
+
+# enable xinetd Inetd compat mode
+INETD_COMPAT=Yes
+
+# Options to pass to xinetd
+#
+# -stayalive comes by default : it can be removed if xinetd is expected
+# not to start when no service is configured
+#
+XINETD_OPTS="-stayalive"
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.init b/meta/recipes-extended/xinetd/xinetd/xinetd.init
new file mode 100644
index 0000000..777c2c8
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.init
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# /etc/init.d/xinetd  --  script to start and stop xinetd.
+
+# Source function library.
+. /etc/init.d/functions
+
+if test -f /etc/default/xinetd; then
+	. /etc/default/xinetd
+fi
+
+
+test -x /usr/sbin/xinetd || exit 0
+
+checkportmap () {
+  if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then
+    if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then
+      echo
+      echo "WARNING: portmapper inactive - RPC services unavailable!"
+      echo "    Commenting out or removing the RPC services from"
+      echo "    the /etc/xinetd.conf file will remove this message."
+      echo
+    fi
+  fi
+} 
+
+case "$1" in
+    start)
+        checkportmap
+	echo -n "Starting internet superserver: xinetd"
+	start-stop-daemon --start --quiet --background --exec /usr/sbin/xinetd -- -pidfile /var/run/xinetd.pid $XINETD_OPTS
+	echo "."
+	;;
+    stop)
+	echo -n "Stopping internet superserver: xinetd"
+	start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd
+	echo "."
+	;;
+    status)
+	status /usr/sbin/xinetd;
+	exit $?
+	;;
+    reload)
+	echo -n "Reloading internet superserver configuration: xinetd"
+	start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
+	echo "."
+	;;
+    force-reload)
+	echo "$0 force-reload: Force Reload is deprecated"
+	echo -n "Forcefully reloading internet superserver configuration: xinetd"
+	start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
+	echo "."
+	;;
+    restart)
+	$0 stop
+	$0 start
+	;;
+    *)
+	echo "Usage: /etc/init.d/xinetd {start|stop|status|reload|force-reload|restart}"
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.service b/meta/recipes-extended/xinetd/xinetd/xinetd.service
new file mode 100644
index 0000000..d5fdc5b
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Xinetd A Powerful Replacement For Inetd
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/xinetd.pid
+EnvironmentFile=-/etc/sysconfig/xinetd
+ExecStart=@SBINDIR@/xinetd -stayalive -pidfile /var/run/xinetd.pid "$EXTRAOPTIONS"
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
new file mode 100644
index 0000000..ffc03e5
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -0,0 +1,68 @@
+SUMMARY = "Socket-based service activation daemon"
+HOMEPAGE = "https://github.com/xinetd-org/xinetd"
+
+# xinetd is a BSD-like license
+# Apple and Gentoo say BSD here.
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
+
+DEPENDS = ""
+PR = "r2"
+
+SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \
+      file://xinetd.init \
+      file://xinetd.conf \
+      file://xinetd.default \
+      file://Various-fixes-from-the-previous-maintainer.patch \
+      file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
+      file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
+      file://xinetd-CVE-2013-4342.patch \
+      file://xinetd.service \
+      "
+
+SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24"
+
+S = "${WORKDIR}/git"
+
+inherit autotools update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "xinetd.service"
+
+INITSCRIPT_NAME = "xinetd"
+INITSCRIPT_PARAMS = "defaults"
+
+EXTRA_OECONF="--disable-nls"
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
+
+do_configure() {
+	# Looks like configure.in is broken, so we are skipping
+	# rebuilding configure and are just using the shipped one
+	( cd ${S}; gnu-configize --force )
+	oe_runconf
+}
+
+do_install() {
+	# Same here, the Makefile does some really stupid things,
+	# but since we only want two files why not override
+	# do_install from autotools and doing it ourselfs?
+	install -d "${D}${sbindir}"
+	install -d "${D}${sysconfdir}/init.d"
+	install -d "${D}${sysconfdir}/xinetd.d"
+	install -d "${D}${sysconfdir}/default"
+	install -m 644 "${WORKDIR}/xinetd.conf" "${D}${sysconfdir}"
+	install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd"
+	install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
+	install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}"
+	install -m 755 "${B}/xinetd/itox" "${D}${sbindir}"
+
+	# Install systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+	       -e 's,@SBINDIR@,${sbindir},g' \
+	       ${D}${systemd_unitdir}/system/xinetd.service
+}
+
+CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"
diff --git a/meta/recipes-extended/xz/xz_5.2.1.bb b/meta/recipes-extended/xz/xz_5.2.1.bb
new file mode 100644
index 0000000..e0ae48f
--- /dev/null
+++ b/meta/recipes-extended/xz/xz_5.2.1.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Utilities for managing LZMA compressed files"
+HOMEPAGE = "http://tukaani.org/xz/"
+SECTION = "base"
+
+# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file
+# which is GPLv3 is an m4 macro which isn't shipped in any of our packages,
+# and the LGPL bits are under lib/, which appears to be used for libgnu, which
+# appears to be used for DOS builds. So we're left with GPLv2+ and PD.
+LICENSE = "GPLv2+ & GPLv3+ & LGPLv2.1+ & PD"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_${PN}-dev = "GPLv2+"
+LICENSE_${PN}-staticdev = "GPLv2+"
+LICENSE_${PN}-doc = "GPLv2+"
+LICENSE_${PN}-dbg = "GPLv2+"
+LICENSE_${PN}-locale = "GPLv2+"
+LICENSE_liblzma = "PD"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
+                    file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
+                    file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
+
+SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
+SRC_URI[md5sum] = "3e44c766c3fb4f19e348e646fcd5778a"
+SRC_URI[sha256sum] = "b918b6648076e74f8d7ae19db5ee663df800049e187259faf5eb997a7b974681"
+
+inherit autotools gettext
+
+PACKAGES =+ "liblzma"
+
+FILES_liblzma = "${libdir}/liblzma*${SOLIBS}"
+
+BBCLASSEXTEND = "native nativesdk"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/meta/recipes-extended/zip/zip.inc b/meta/recipes-extended/zip/zip.inc
new file mode 100644
index 0000000..6221c5e
--- /dev/null
+++ b/meta/recipes-extended/zip/zip.inc
@@ -0,0 +1,26 @@
+SUMMARY = "Compressor/archiver for creating and modifying .zip files"
+HOMEPAGE = "http://www.info-zip.org"
+SECTION = "console/utils"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d"
+
+SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz"
+
+EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \
+		'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \
+		'BINFLAGS=0755' 'INSTALL_D=install -d'"
+
+do_compile() {
+	oe_runmake -f unix/Makefile flags IZ_BZIP2=no_such_directory
+	sed -i 's#LFLAGS1=""#LFLAGS1="${LDFLAGS}"#' flags
+	oe_runmake -f unix/Makefile generic IZ_BZIP2=no_such_directory
+}
+
+do_install() {
+	oe_runmake -f unix/Makefile prefix=${D}${prefix} \
+		   BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \
+		   install
+}
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
new file mode 100644
index 0000000..1e96110
--- /dev/null
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -0,0 +1,15 @@
+require zip.inc
+
+PR="r2"
+
+# zip-2.32 still uses directory name of zip-2.30
+S = "${WORKDIR}/zip30"
+
+SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37"
+SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369"
+
+# zip.inc sets CFLAGS, but what Makefile actually uses is
+# CFLAGS_NOOPT.  It will also force -O3 optimization, overriding
+# whatever we set.
+#
+EXTRA_OEMAKE_append = " 'CFLAGS_NOOPT=-I. -DUNIX ${CFLAGS}'"