From f59039820389cef334fa50d879e9a14d88ac8fb6 Mon Sep 17 00:00:00 2001
From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Date: Tue, 11 Apr 2017 16:52:29 +0800
Subject: coreutils: 8.26 -> 8.27

Upgrade coreutils from 8.26 to 8.27.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 ...need_charset_alias-when-building-for-musl.patch |  33 -----
 ...0001-local.mk-fix-cross-compiling-problem.patch |  26 ----
 ...e-report-processor-and-hardware-correctly.patch |  64 ----------
 .../coreutils-8.26/disable-ls-output-quoting.patch |  49 -------
 .../coreutils-8.26/fix-selinux-flask.patch         |  39 ------
 .../man-decouple-manpages-from-build.patch         |  27 ----
 .../remove-usr-local-lib-from-m4.patch             |  31 -----
 ...need_charset_alias-when-building-for-musl.patch |  33 +++++
 ...0001-local.mk-fix-cross-compiling-problem.patch |  26 ++++
 ...e-report-processor-and-hardware-correctly.patch |  64 ++++++++++
 .../coreutils-8.27/disable-ls-output-quoting.patch |  49 +++++++
 .../coreutils-8.27/fix-selinux-flask.patch         |  39 ++++++
 .../man-decouple-manpages-from-build.patch         |  27 ++++
 .../remove-usr-local-lib-from-m4.patch             |  31 +++++
 meta/recipes-core/coreutils/coreutils_8.26.bb      | 142 ---------------------
 meta/recipes-core/coreutils/coreutils_8.27.bb      | 142 +++++++++++++++++++++
 16 files changed, 411 insertions(+), 411 deletions(-)
 delete mode 100644 meta/recipes-core/coreutils/coreutils-8.26/0001-Unset-need_charset_alias-when-building-for-musl.patch
 delete mode 100644 meta/recipes-core/coreutils/coreutils-8.26/0001-local.mk-fix-cross-compiling-problem.patch
 delete mode 100644 meta/recipes-core/coreutils/coreutils-8.26/0001-uname-report-processor-and-hardware-correctly.patch
 delete mode 100644 meta/recipes-core/coreutils/coreutils-8.26/disable-ls-output-quoting.patch
 delete mode 100644 meta/recipes-core/coreutils/coreutils-8.26/fix-selinux-flask.patch
 delete mode 100644 meta/recipes-core/coreutils/coreutils-8.26/man-decouple-manpages-from-build.patch
 delete mode 100644 meta/recipes-core/coreutils/coreutils-8.26/remove-usr-local-lib-from-m4.patch
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.27/0001-Unset-need_charset_alias-when-building-for-musl.patch
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.27/0001-local.mk-fix-cross-compiling-problem.patch
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.27/0001-uname-report-processor-and-hardware-correctly.patch
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.27/disable-ls-output-quoting.patch
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.27/fix-selinux-flask.patch
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.27/man-decouple-manpages-from-build.patch
 create mode 100644 meta/recipes-core/coreutils/coreutils-8.27/remove-usr-local-lib-from-m4.patch
 delete mode 100644 meta/recipes-core/coreutils/coreutils_8.26.bb
 create mode 100644 meta/recipes-core/coreutils/coreutils_8.27.bb

(limited to 'meta')

diff --git a/meta/recipes-core/coreutils/coreutils-8.26/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-core/coreutils/coreutils-8.26/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.26/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-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-core/coreutils/coreutils-8.26/0001-local.mk-fix-cross-compiling-problem.patch b/meta/recipes-core/coreutils/coreutils-8.26/0001-local.mk-fix-cross-compiling-problem.patch
deleted file mode 100644
index 66f9a716c9..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.26/0001-local.mk-fix-cross-compiling-problem.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Subject: local.mk: fix cross compiling problem
-
-We meet the following error when cross compiling.
-| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.
-This patch fixes this problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/local.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/local.mk b/src/local.mk
-index 36dfa4e..c5898cc 100644
---- a/src/local.mk
-+++ b/src/local.mk
-@@ -649,4 +649,4 @@ cu_install_program = @INSTALL_PROGRAM@
- else
- cu_install_program = src/ginstall
- endif
--INSTALL = $(cu_install_program) -c
-+INSTALL_PROGRAM = $(cu_install_program)
--- 
-2.1.0
-
diff --git a/meta/recipes-core/coreutils/coreutils-8.26/0001-uname-report-processor-and-hardware-correctly.patch b/meta/recipes-core/coreutils/coreutils-8.26/0001-uname-report-processor-and-hardware-correctly.patch
deleted file mode 100644
index 3c43e1d5da..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.26/0001-uname-report-processor-and-hardware-correctly.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Upstream-Status: Denied
-
-Subject: uname: report processor and hardware correctly
-
-This patch is rejected by coreutils upstream, but distros like debian and fedora
-uses this patch to make `uname -i' and `uname -p' to not report 'unknown'.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/uname.c | 18 ++++++++++++++++--
- 1 file changed, 16 insertions(+), 2 deletions(-)
-
-diff --git a/src/uname.c b/src/uname.c
-index 39bd28c..c84582d 100644
---- a/src/uname.c
-+++ b/src/uname.c
-@@ -299,13 +299,19 @@ main (int argc, char **argv)
- 
-   if (toprint & PRINT_PROCESSOR)
-     {
--      char const *element = unknown;
-+      char *element = unknown;
- #if HAVE_SYSINFO && defined SI_ARCHITECTURE
-       {
-         static char processor[257];
-         if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
-           element = processor;
-       }
-+#else
-+      {
-+	static struct utsname u;
-+	uname(&u);
-+	element = u.machine;
-+      }
- #endif
- #ifdef UNAME_PROCESSOR
-       if (element == unknown)
-@@ -343,7 +349,7 @@ main (int argc, char **argv)
- 
-   if (toprint & PRINT_HARDWARE_PLATFORM)
-     {
--      char const *element = unknown;
-+      char *element = unknown;
- #if HAVE_SYSINFO && defined SI_PLATFORM
-       {
-         static char hardware_platform[257];
-@@ -361,6 +367,14 @@ main (int argc, char **argv)
-           if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
-             element = hardware_platform;
-         }
-+#else
-+      {
-+	static struct utsname u;
-+	uname(&u);
-+	element = u.machine;
-+	if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6')
-+	  element[1]='3';
-+      }
- #endif
-       if (! (toprint == UINT_MAX && element == unknown))
-         print_element (element);
--- 
-1.9.1
-
diff --git a/meta/recipes-core/coreutils/coreutils-8.26/disable-ls-output-quoting.patch b/meta/recipes-core/coreutils/coreutils-8.26/disable-ls-output-quoting.patch
deleted file mode 100644
index e68c213550..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.26/disable-ls-output-quoting.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Subject: revert inconsistent ls quoting
-
-This is a revert of upstream commit 109b9220cead6e979d22d16327c4d9f8350431cc.
-
-Bug-Debian: https://bugs.debian.org/813164
-
-Upstream-Status: Submitted
-
-Originally-by: Adam Borowski <kilobyte@angband.pl>
-[PG: patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#78 ]
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
----
-
---- coreutils-8.25.orig/NEWS
-+++ coreutils-8.25/NEWS
-@@ -71,9 +71,6 @@ GNU coreutils NEWS
-   df now prefers sources towards the root of a device when
-   eliding duplicate bind mounted entries.
- 
--  ls now quotes file names unambiguously and appropriate for use in a shell,
--  when outputting to a terminal.
--
-   join, sort, uniq with --zero-terminated, now treat '\n' as a field delimiter.
- 
- ** Improvements
---- coreutils-8.25.orig/doc/coreutils.texi
-+++ coreutils-8.25/doc/coreutils.texi
-@@ -7750,8 +7750,8 @@ this"} in the default C locale.  This lo
- 
- You can specify the default value of the @option{--quoting-style} option
- with the environment variable @env{QUOTING_STYLE}@.  If that environment
--variable is not set, the default value is @samp{shell-escape} when the
--output is a terminal, and @samp{literal} otherwise.
-+variable is not set, the default value is @samp{literal}, but this
-+default may change to @samp{shell} in a future version of this package.
- 
- @item --show-control-chars
- @opindex --show-control-chars
---- coreutils-8.25.orig/src/ls.c
-+++ coreutils-8.25/src/ls.c
-@@ -1581,7 +1581,6 @@ decode_switches (int argc, char **argv)
-       if (isatty (STDOUT_FILENO))
-         {
-           format = many_per_line;
--          set_quoting_style (NULL, shell_escape_quoting_style);
-           /* See description of qmark_funny_chars, above.  */
-           qmark_funny_chars = true;
-         }
diff --git a/meta/recipes-core/coreutils/coreutils-8.26/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils-8.26/fix-selinux-flask.patch
deleted file mode 100644
index 9d1ae55d47..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.26/fix-selinux-flask.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a1d360509fa3a4aff57eedcd528cc0347a87531d Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 16 Sep 2014 01:59:08 -0700
-Subject: [PATCH] gnulib-comp.m4: selinux/flask.h should respect to
- with_selinux
-
-Fixed when build with meta-selinux even when --without-selinux:
-runcon.c:49:28: fatal error: selinux/flask.h: No such file or directory
- # include <selinux/flask.h>
-                            ^
-compilation terminated.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- m4/gnulib-comp.m4 |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
-index 472d3a0..5f09734 100644
---- a/m4/gnulib-comp.m4
-+++ b/m4/gnulib-comp.m4
-@@ -1730,11 +1730,11 @@ AC_DEFUN([gl_INIT],
-     AC_LIBOBJ([select])
-   fi
-   gl_SYS_SELECT_MODULE_INDICATOR([select])
--  AC_CHECK_HEADERS([selinux/flask.h])
-   AC_LIBOBJ([selinux-at])
-   gl_HEADERS_SELINUX_SELINUX_H
-   gl_HEADERS_SELINUX_CONTEXT_H
-   if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
-+    AC_CHECK_HEADERS([selinux/flask.h])
-     AC_LIBOBJ([getfilecon])
-   fi
-   gl_SERVENT
--- 
-1.7.9.5
-
diff --git a/meta/recipes-core/coreutils/coreutils-8.26/man-decouple-manpages-from-build.patch b/meta/recipes-core/coreutils/coreutils-8.26/man-decouple-manpages-from-build.patch
deleted file mode 100644
index 3c896a11bf..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.26/man-decouple-manpages-from-build.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b4d258629f090066783c3b4c91b40f63b9d0a296 Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Sun, 8 Feb 2015 16:51:57 -0500
-Subject: [PATCH] man: decouple manpages from build
-
-The use of "help2man" doesn't work at all for cross compile, in
-addition to the extra requirement of perl it adds.
-
-Just decouple the manpages from the build in order to pave the way for
-importing prebuilt manpages that can be used in a cross build situation.
-
-Upstream-Status: Inappropriate [upstream doesn't care about x-compile case.]
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index fb4af27..7576b2c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -214,5 +214,4 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
- include $(top_srcdir)/lib/local.mk
- include $(top_srcdir)/src/local.mk
- include $(top_srcdir)/doc/local.mk
--include $(top_srcdir)/man/local.mk
- include $(top_srcdir)/tests/local.mk
--- 
-2.2.2
-
diff --git a/meta/recipes-core/coreutils/coreutils-8.26/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils-8.26/remove-usr-local-lib-from-m4.patch
deleted file mode 100644
index 2ef8a548ac..0000000000
--- a/meta/recipes-core/coreutils/coreutils-8.26/remove-usr-local-lib-from-m4.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-We have problem using hardcoded directories like /usr/local here
-which will be checked for cross builds. This is a special case which
-is valid for AIX only. We do not have AIX as one of our supported
-build host or target. Therefore we get rid of the hardcoded paths
-and make life easier for cross compilation process.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [Upstream does care for AIX while we may not]
-
-Index: coreutils-8.14/m4/getloadavg.m4
-===================================================================
---- coreutils-8.14.orig/m4/getloadavg.m4	2011-09-19 08:09:24.000000000 -0700
-+++ coreutils-8.14/m4/getloadavg.m4	2011-10-19 21:42:00.385533357 -0700
-@@ -41,16 +41,6 @@
-        [LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes])
-    fi
- 
--   if test $gl_func_getloadavg_done = no; then
--     # There is a commonly available library for RS/6000 AIX.
--     # Since it is not a standard part of AIX, it might be installed locally.
--     gl_getloadavg_LIBS=$LIBS
--     LIBS="-L/usr/local/lib $LIBS"
--     AC_CHECK_LIB([getloadavg], [getloadavg],
--                  [LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes],
--                  [LIBS=$gl_getloadavg_LIBS])
--   fi
--
-    # Set up the replacement function if necessary.
-    if test $gl_func_getloadavg_done = no; then
-      HAVE_GETLOADAVG=0
diff --git a/meta/recipes-core/coreutils/coreutils-8.27/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-core/coreutils/coreutils-8.27/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 0000000000..ba1a4bab4c
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.27/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-core/coreutils/coreutils-8.27/0001-local.mk-fix-cross-compiling-problem.patch b/meta/recipes-core/coreutils/coreutils-8.27/0001-local.mk-fix-cross-compiling-problem.patch
new file mode 100644
index 0000000000..66f9a716c9
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.27/0001-local.mk-fix-cross-compiling-problem.patch
@@ -0,0 +1,26 @@
+Subject: local.mk: fix cross compiling problem
+
+We meet the following error when cross compiling.
+| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.
+This patch fixes this problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/local.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/local.mk b/src/local.mk
+index 36dfa4e..c5898cc 100644
+--- a/src/local.mk
++++ b/src/local.mk
+@@ -649,4 +649,4 @@ cu_install_program = @INSTALL_PROGRAM@
+ else
+ cu_install_program = src/ginstall
+ endif
+-INSTALL = $(cu_install_program) -c
++INSTALL_PROGRAM = $(cu_install_program)
+-- 
+2.1.0
+
diff --git a/meta/recipes-core/coreutils/coreutils-8.27/0001-uname-report-processor-and-hardware-correctly.patch b/meta/recipes-core/coreutils/coreutils-8.27/0001-uname-report-processor-and-hardware-correctly.patch
new file mode 100644
index 0000000000..3c43e1d5da
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.27/0001-uname-report-processor-and-hardware-correctly.patch
@@ -0,0 +1,64 @@
+Upstream-Status: Denied
+
+Subject: uname: report processor and hardware correctly
+
+This patch is rejected by coreutils upstream, but distros like debian and fedora
+uses this patch to make `uname -i' and `uname -p' to not report 'unknown'.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/uname.c | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/src/uname.c b/src/uname.c
+index 39bd28c..c84582d 100644
+--- a/src/uname.c
++++ b/src/uname.c
+@@ -299,13 +299,19 @@ main (int argc, char **argv)
+ 
+   if (toprint & PRINT_PROCESSOR)
+     {
+-      char const *element = unknown;
++      char *element = unknown;
+ #if HAVE_SYSINFO && defined SI_ARCHITECTURE
+       {
+         static char processor[257];
+         if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
+           element = processor;
+       }
++#else
++      {
++	static struct utsname u;
++	uname(&u);
++	element = u.machine;
++      }
+ #endif
+ #ifdef UNAME_PROCESSOR
+       if (element == unknown)
+@@ -343,7 +349,7 @@ main (int argc, char **argv)
+ 
+   if (toprint & PRINT_HARDWARE_PLATFORM)
+     {
+-      char const *element = unknown;
++      char *element = unknown;
+ #if HAVE_SYSINFO && defined SI_PLATFORM
+       {
+         static char hardware_platform[257];
+@@ -361,6 +367,14 @@ main (int argc, char **argv)
+           if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
+             element = hardware_platform;
+         }
++#else
++      {
++	static struct utsname u;
++	uname(&u);
++	element = u.machine;
++	if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6')
++	  element[1]='3';
++      }
+ #endif
+       if (! (toprint == UINT_MAX && element == unknown))
+         print_element (element);
+-- 
+1.9.1
+
diff --git a/meta/recipes-core/coreutils/coreutils-8.27/disable-ls-output-quoting.patch b/meta/recipes-core/coreutils/coreutils-8.27/disable-ls-output-quoting.patch
new file mode 100644
index 0000000000..e68c213550
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.27/disable-ls-output-quoting.patch
@@ -0,0 +1,49 @@
+Subject: revert inconsistent ls quoting
+
+This is a revert of upstream commit 109b9220cead6e979d22d16327c4d9f8350431cc.
+
+Bug-Debian: https://bugs.debian.org/813164
+
+Upstream-Status: Submitted
+
+Originally-by: Adam Borowski <kilobyte@angband.pl>
+[PG: patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#78 ]
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+---
+
+--- coreutils-8.25.orig/NEWS
++++ coreutils-8.25/NEWS
+@@ -71,9 +71,6 @@ GNU coreutils NEWS
+   df now prefers sources towards the root of a device when
+   eliding duplicate bind mounted entries.
+ 
+-  ls now quotes file names unambiguously and appropriate for use in a shell,
+-  when outputting to a terminal.
+-
+   join, sort, uniq with --zero-terminated, now treat '\n' as a field delimiter.
+ 
+ ** Improvements
+--- coreutils-8.25.orig/doc/coreutils.texi
++++ coreutils-8.25/doc/coreutils.texi
+@@ -7750,8 +7750,8 @@ this"} in the default C locale.  This lo
+ 
+ You can specify the default value of the @option{--quoting-style} option
+ with the environment variable @env{QUOTING_STYLE}@.  If that environment
+-variable is not set, the default value is @samp{shell-escape} when the
+-output is a terminal, and @samp{literal} otherwise.
++variable is not set, the default value is @samp{literal}, but this
++default may change to @samp{shell} in a future version of this package.
+ 
+ @item --show-control-chars
+ @opindex --show-control-chars
+--- coreutils-8.25.orig/src/ls.c
++++ coreutils-8.25/src/ls.c
+@@ -1581,7 +1581,6 @@ decode_switches (int argc, char **argv)
+       if (isatty (STDOUT_FILENO))
+         {
+           format = many_per_line;
+-          set_quoting_style (NULL, shell_escape_quoting_style);
+           /* See description of qmark_funny_chars, above.  */
+           qmark_funny_chars = true;
+         }
diff --git a/meta/recipes-core/coreutils/coreutils-8.27/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils-8.27/fix-selinux-flask.patch
new file mode 100644
index 0000000000..9d1ae55d47
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.27/fix-selinux-flask.patch
@@ -0,0 +1,39 @@
+From a1d360509fa3a4aff57eedcd528cc0347a87531d Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 16 Sep 2014 01:59:08 -0700
+Subject: [PATCH] gnulib-comp.m4: selinux/flask.h should respect to
+ with_selinux
+
+Fixed when build with meta-selinux even when --without-selinux:
+runcon.c:49:28: fatal error: selinux/flask.h: No such file or directory
+ # include <selinux/flask.h>
+                            ^
+compilation terminated.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ m4/gnulib-comp.m4 |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
+index 472d3a0..5f09734 100644
+--- a/m4/gnulib-comp.m4
++++ b/m4/gnulib-comp.m4
+@@ -1730,11 +1730,11 @@ AC_DEFUN([gl_INIT],
+     AC_LIBOBJ([select])
+   fi
+   gl_SYS_SELECT_MODULE_INDICATOR([select])
+-  AC_CHECK_HEADERS([selinux/flask.h])
+   AC_LIBOBJ([selinux-at])
+   gl_HEADERS_SELINUX_SELINUX_H
+   gl_HEADERS_SELINUX_CONTEXT_H
+   if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
++    AC_CHECK_HEADERS([selinux/flask.h])
+     AC_LIBOBJ([getfilecon])
+   fi
+   gl_SERVENT
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-core/coreutils/coreutils-8.27/man-decouple-manpages-from-build.patch b/meta/recipes-core/coreutils/coreutils-8.27/man-decouple-manpages-from-build.patch
new file mode 100644
index 0000000000..3c896a11bf
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.27/man-decouple-manpages-from-build.patch
@@ -0,0 +1,27 @@
+From b4d258629f090066783c3b4c91b40f63b9d0a296 Mon Sep 17 00:00:00 2001
+From: Paul Gortmaker <paul.gortmaker@windriver.com>
+Date: Sun, 8 Feb 2015 16:51:57 -0500
+Subject: [PATCH] man: decouple manpages from build
+
+The use of "help2man" doesn't work at all for cross compile, in
+addition to the extra requirement of perl it adds.
+
+Just decouple the manpages from the build in order to pave the way for
+importing prebuilt manpages that can be used in a cross build situation.
+
+Upstream-Status: Inappropriate [upstream doesn't care about x-compile case.]
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index fb4af27..7576b2c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -214,5 +214,4 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
+ include $(top_srcdir)/lib/local.mk
+ include $(top_srcdir)/src/local.mk
+ include $(top_srcdir)/doc/local.mk
+-include $(top_srcdir)/man/local.mk
+ include $(top_srcdir)/tests/local.mk
+-- 
+2.2.2
+
diff --git a/meta/recipes-core/coreutils/coreutils-8.27/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils-8.27/remove-usr-local-lib-from-m4.patch
new file mode 100644
index 0000000000..2ef8a548ac
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-8.27/remove-usr-local-lib-from-m4.patch
@@ -0,0 +1,31 @@
+We have problem using hardcoded directories like /usr/local here
+which will be checked for cross builds. This is a special case which
+is valid for AIX only. We do not have AIX as one of our supported
+build host or target. Therefore we get rid of the hardcoded paths
+and make life easier for cross compilation process.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [Upstream does care for AIX while we may not]
+
+Index: coreutils-8.14/m4/getloadavg.m4
+===================================================================
+--- coreutils-8.14.orig/m4/getloadavg.m4	2011-09-19 08:09:24.000000000 -0700
++++ coreutils-8.14/m4/getloadavg.m4	2011-10-19 21:42:00.385533357 -0700
+@@ -41,16 +41,6 @@
+        [LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes])
+    fi
+ 
+-   if test $gl_func_getloadavg_done = no; then
+-     # There is a commonly available library for RS/6000 AIX.
+-     # Since it is not a standard part of AIX, it might be installed locally.
+-     gl_getloadavg_LIBS=$LIBS
+-     LIBS="-L/usr/local/lib $LIBS"
+-     AC_CHECK_LIB([getloadavg], [getloadavg],
+-                  [LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes],
+-                  [LIBS=$gl_getloadavg_LIBS])
+-   fi
+-
+    # Set up the replacement function if necessary.
+    if test $gl_func_getloadavg_done = no; then
+      HAVE_GETLOADAVG=0
diff --git a/meta/recipes-core/coreutils/coreutils_8.26.bb b/meta/recipes-core/coreutils/coreutils_8.26.bb
deleted file mode 100644
index 52ef1013ca..0000000000
--- a/meta/recipes-core/coreutils/coreutils_8.26.bb
+++ /dev/null
@@ -1,142 +0,0 @@
-SUMMARY = "The basic file, shell and text manipulation utilities"
-DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
-manipulation utilities. These are the core utilities which are expected to exist on \
-every system."
-HOMEPAGE = "http://www.gnu.org/software/coreutils/"
-BUGTRACKER = "http://debbugs.gnu.org/coreutils"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
-                    file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
-DEPENDS = "gmp libcap"
-DEPENDS_class-native = ""
-
-inherit autotools gettext texinfo
-
-SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
-           http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
-           file://man-decouple-manpages-from-build.patch \
-           file://remove-usr-local-lib-from-m4.patch \
-           file://fix-selinux-flask.patch \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-           file://0001-uname-report-processor-and-hardware-correctly.patch \
-           file://disable-ls-output-quoting.patch \
-           file://0001-local.mk-fix-cross-compiling-problem.patch \
-          "
-
-SRC_URI[tarball.md5sum] = "d5aa2072f662d4118b9f4c63b94601a6"
-SRC_URI[tarball.sha256sum] = "155e94d748f8e2bc327c66e0cbebdb8d6ab265d2f37c3c928f7bf6c3beba9a8e"
-SRC_URI[manpages.md5sum] = "b58107f532f7beffcb2f38e2ac1f2da3"
-SRC_URI[manpages.sha256sum] = "9324ec412ffca3b0431e6299720c33ac98e749e430f72a7c6e65f3635c86aa29"
-
-EXTRA_OECONF_class-native = "--without-gmp"
-EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
-EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
-
-# acl and xattr are not default features
-#
-PACKAGECONFIG_class-target ??= "\
-    ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
-"
-
-# The lib/oe/path.py requires xattr
-PACKAGECONFIG_class-native ??= "xattr"
-
-# with, without, depends, rdepends
-#
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-
-# [ df mktemp base64 gets a special treatment and is not included in this
-bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
-                env expand expr factor fmt fold groups head hostid id install \
-                join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
-                pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
-                sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\
-                tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
-
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
-                     mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
-
-sbindir_progs= "chroot"
-
-# Let aclocal use the relative path for the m4 file rather than the
-# absolute since coreutils 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"
-
-# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
-do_compile_prepend () {
-	mkdir -p ${B}/src
-}
-
-do_install_class-native() {
-	autotools_do_install
-	# remove groups to fix conflict with shadow-native
-	rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
-	# The return is a must since native doesn't need the
-	# do_install_append() in the below.
-	return
-}
-
-do_install_append() {
-	for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
-
-	install -d ${D}${base_bindir}
-	[ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
-
-	install -d ${D}${sbindir}
-	[ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
-
-	# [ requires special handling because [.coreutils will cause the sed stuff
-	# in update-alternatives to fail, therefore use lbracket - the name used
-	# for the actual source file.
-	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-
-	# prebuilt man pages
-	install -d ${D}/${mandir}/man1
-	install -t ${D}/${mandir}/man1 ${S}/man/*.1
-	# prebuilt man pages don't do a separate man page for [ vs test.
-	# see comment above r.e. sed and update-alternatives
-	cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
-ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1  hostname.1"
-
-ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
-
-ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
-ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
-ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
-
-ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
-ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
-ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
-
-ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
-ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
-ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
-
-ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
-ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
-ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
-
-ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
-ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
-
-python __anonymous() {
-	for prog in d.getVar('base_bindir_progs').split():
-		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
-
-	for prog in d.getVar('sbindir_progs').split():
-		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/coreutils/coreutils_8.27.bb b/meta/recipes-core/coreutils/coreutils_8.27.bb
new file mode 100644
index 0000000000..667e0af560
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils_8.27.bb
@@ -0,0 +1,142 @@
+SUMMARY = "The basic file, shell and text manipulation utilities"
+DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
+manipulation utilities. These are the core utilities which are expected to exist on \
+every system."
+HOMEPAGE = "http://www.gnu.org/software/coreutils/"
+BUGTRACKER = "http://debbugs.gnu.org/coreutils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+                    file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
+DEPENDS = "gmp libcap"
+DEPENDS_class-native = ""
+
+inherit autotools gettext texinfo
+
+SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
+           http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
+           file://man-decouple-manpages-from-build.patch \
+           file://remove-usr-local-lib-from-m4.patch \
+           file://fix-selinux-flask.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://0001-uname-report-processor-and-hardware-correctly.patch \
+           file://disable-ls-output-quoting.patch \
+           file://0001-local.mk-fix-cross-compiling-problem.patch \
+          "
+
+SRC_URI[tarball.md5sum] = "502795792c212932365e077946d353ae"
+SRC_URI[tarball.sha256sum] = "8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b"
+SRC_URI[manpages.md5sum] = "1b31a688d06764e0e94aa20b7ea08222"
+SRC_URI[manpages.sha256sum] = "1f615819e9167646c731636b6c5ecbe79837e82a18666bacc82c3fb1dfcfaea3"
+
+EXTRA_OECONF_class-native = "--without-gmp"
+EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
+EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
+
+# acl and xattr are not default features
+#
+PACKAGECONFIG_class-target ??= "\
+    ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
+"
+
+# The lib/oe/path.py requires xattr
+PACKAGECONFIG_class-native ??= "xattr"
+
+# with, without, depends, rdepends
+#
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+
+# [ df mktemp base64 gets a special treatment and is not included in this
+bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
+                env expand expr factor fmt fold groups head hostid id install \
+                join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
+                pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
+                sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\
+                tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
+
+# hostname gets a special treatment and is not included in this
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
+                     mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
+
+sbindir_progs= "chroot"
+
+# Let aclocal use the relative path for the m4 file rather than the
+# absolute since coreutils 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"
+
+# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
+do_compile_prepend () {
+	mkdir -p ${B}/src
+}
+
+do_install_class-native() {
+	autotools_do_install
+	# remove groups to fix conflict with shadow-native
+	rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
+	# The return is a must since native doesn't need the
+	# do_install_append() in the below.
+	return
+}
+
+do_install_append() {
+	for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
+
+	install -d ${D}${base_bindir}
+	[ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
+
+	install -d ${D}${sbindir}
+	[ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
+
+	# [ requires special handling because [.coreutils will cause the sed stuff
+	# in update-alternatives to fail, therefore use lbracket - the name used
+	# for the actual source file.
+	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
+
+	# prebuilt man pages
+	install -d ${D}/${mandir}/man1
+	install -t ${D}/${mandir}/man1 ${S}/man/*.1
+	# prebuilt man pages don't do a separate man page for [ vs test.
+	# see comment above r.e. sed and update-alternatives
+	cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
+ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1  hostname.1"
+
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+
+ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
+ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
+ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
+
+ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
+ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
+ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
+
+ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
+ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
+ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
+
+ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
+ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
+ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
+
+ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
+
+python __anonymous() {
+	for prog in d.getVar('base_bindir_progs').split():
+		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
+
+	for prog in d.getVar('sbindir_progs').split():
+		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
+}
+
+BBCLASSEXTEND = "native nativesdk"
-- 
cgit v1.2.3