Index: BOOK/introduction/common/changelog.xml
===================================================================
--- BOOK/introduction/common/changelog.xml	(revision 7456001d1e013e165d188038b3615c8924a006dd)
+++ BOOK/introduction/common/changelog.xml	(revision a624ab55c89a18fa54a05032a6ffd529b882d7af)
@@ -37,4 +37,27 @@
 -->
     <listitem>
+      <para>24 May 2017</para>
+      <itemizedlist>
+        <listitem>
+          <para>[William Harrington] - Upgrade Coreutils to 8.27. Fixes
+          ticket <ulink url="&clfs-ticket-root;1142">#1142.</ulink></para> 
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>19 May 2017</para>
+      <itemizedlist>
+        <listitem>
+          <para>[William Harrington] - Upgrade Libcap to 2.25. Fixes
+          ticket <ulink url="&clfs-ticket-root;1140">#1140.</ulink></para> 
+        </listitem>
+        <listitem>
+          <para>[William Harrington] - Move Libcap after Acl.</para> 
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>17 May 2017</para>
       <itemizedlist>
Index: BOOK/materials/common/patches.xml
===================================================================
--- BOOK/materials/common/patches.xml	(revision 7456001d1e013e165d188038b3615c8924a006dd)
+++ BOOK/materials/common/patches.xml	(revision a624ab55c89a18fa54a05032a6ffd529b882d7af)
@@ -53,13 +53,4 @@
         url="&patches-root;&coreutils-uname-patch;"/></para>
         <para>MD5 sum: <literal>&coreutils-uname-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term>Coreutils Noman Patch - <token>&coreutils-noman-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink
-        url="&patches-root;&coreutils-noman-patch;"/></para>
-        <para>MD5 sum: <literal>&coreutils-noman-patch-md5;</literal></para>
       </listitem>
     </varlistentry>
Index: BOOK/packages.ent
===================================================================
--- BOOK/packages.ent	(revision 7456001d1e013e165d188038b3615c8924a006dd)
+++ BOOK/packages.ent	(revision a624ab55c89a18fa54a05032a6ffd529b882d7af)
@@ -80,8 +80,8 @@
 <!ENTITY colo-home "http://www.colonel-panic.org/cobalt-mips">
 
-<!ENTITY coreutils-version "8.23">
-<!ENTITY coreutils-size "5,376 KB">
+<!ENTITY coreutils-version "8.27">
+<!ENTITY coreutils-size "5,286 KB">
 <!ENTITY coreutils-url "&gnu;coreutils/coreutils-&coreutils-version;.tar.xz">
-<!ENTITY coreutils-md5 "abed135279f87ad6762ce57ff6d89c41">
+<!ENTITY coreutils-md5 "502795792c212932365e077946d353ae">
 <!ENTITY coreutils-home "&gnu-software;coreutils/coreutils.html">
 
Index: BOOK/patches.ent
===================================================================
--- BOOK/patches.ent	(revision 7456001d1e013e165d188038b3615c8924a006dd)
+++ BOOK/patches.ent	(revision a624ab55c89a18fa54a05032a6ffd529b882d7af)
@@ -20,10 +20,6 @@
 
 <!ENTITY coreutils-uname-patch "coreutils-&coreutils-version;-uname-1.patch">
-<!ENTITY coreutils-uname-patch-md5 "211007089ceaca54c7c3751896836ef4">
-<!ENTITY coreutils-uname-patch-size "4.968 KB">
-
-<!ENTITY coreutils-noman-patch "coreutils-&coreutils-version;-noman-1.patch">
-<!ENTITY coreutils-noman-patch-md5 "01be731ce5ebca8d795bffc79391f1bd">
-<!ENTITY coreutils-noman-patch-size "8.481 KB">
+<!ENTITY coreutils-uname-patch-md5 "e9bc0459d313f677cebc2095c3b18818">
+<!ENTITY coreutils-uname-patch-size "5.020 KB">
 
 <!ENTITY gcc-specs-patch "gcc-&gcc-version;-specs-1.patch">
Index: BOOK/temp-system/common/coreutils.xml
===================================================================
--- BOOK/temp-system/common/coreutils.xml	(revision 7456001d1e013e165d188038b3615c8924a006dd)
+++ BOOK/temp-system/common/coreutils.xml	(revision a624ab55c89a18fa54a05032a6ffd529b882d7af)
@@ -23,18 +23,4 @@
     <title>Installation of Coreutils</title>
 
-    <para os="ba">Configure can not properly determine how to get free space
-    when cross-compiling - as a result, the <command>df</command> program will
-    not be built. Add the following entries to <filename>config.cache</filename>
-    to correct this, and fix various cross-compiling issues:</para>
-
-<screen os="bb"><userinput>cat &gt; config.cache &lt;&lt; EOF
-fu_cv_sys_stat_statfs2_bsize=yes
-gl_cv_func_working_mkstemp=yes
-EOF</userinput></screen>
-
-    <para os="p1">Apply a patch to prevent Coreutils from generating manpages :</para>
-
-<screen os="p2"><userinput>patch -Np1 -i ../&coreutils-noman-patch;</userinput></screen>
-
     <para os="bd">Prepare Coreutils for compilation:</para>
 
@@ -59,4 +45,8 @@
     </variablelist>
 
+   <para os="s1">Adjust the Makefile so man pages aren't generated:</para>
+
+<screen os="s2"><userinput>sed -i -e 's/^man1_MANS/#man1_MANS/' Makefile</userinput></screen>
+
    <para os="bf">Compile the package:</para>
 
Index: tches/coreutils-8.23-noman-1.patch
===================================================================
--- patches/coreutils-8.23-noman-1.patch	(revision 7456001d1e013e165d188038b3615c8924a006dd)
+++ 	(revision )
@@ -1,199 +1,0 @@
-Submitted By: William Harrington (kb0iic at cross-lfs dot org)
-Date: 2014-10-30
-Initial Package Version: 8.22
-Origin: Openbox 
-Upstream Status: Inapprorpiate
-Description: Keep man pages from being generated during cross compile.
-
-diff -Naur coreutils-8.23.orig/Makefile.in coreutils-8.23/Makefile.in
---- coreutils-8.23.orig/Makefile.in	2014-08-14 20:32:59.291203870 +0100
-+++ coreutils-8.23/Makefile.in	2014-08-14 20:50:29.969203839 +0100
-@@ -75,26 +75,6 @@
- # You should have received a copy of the GNU General Public License
- # along with this program.  If not, see <http://www.gnu.org/licenses/>.
- 
--# Make coreutils man pages.				-*-Makefile-*-
--# This is included by the top-level Makefile.am.
--
--# Copyright (C) 2002-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 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/>.
--
--
--
- VPATH = @srcdir@
- am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
- am__make_running_with_option = \
-@@ -160,7 +140,7 @@
- DIST_COMMON = $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk \
- 	$(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk \
- 	$(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk \
--	$(top_srcdir)/man/local.mk $(top_srcdir)/tests/local.mk \
-+	$(top_srcdir)/tests/local.mk \
- 	INSTALL NEWS README AUTHORS ChangeLog $(srcdir)/Makefile.in \
- 	$(srcdir)/Makefile.am $(top_srcdir)/configure \
- 	$(am__configure_deps) $(top_srcdir)/lib/config.hin ABOUT-NLS \
-@@ -2606,7 +2586,6 @@
- EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
- ERRNO_H = @ERRNO_H@
- EXEEXT = @EXEEXT@
--EXTRA_MANS = @EXTRA_MANS@
- FLOAT_H = @FLOAT_H@
- FNMATCH_H = @FNMATCH_H@
- GETADDRINFO_LIB = @GETADDRINFO_LIB@
-@@ -3820,7 +3799,6 @@
- lispdir = @lispdir@
- localedir = @localedir@
- localstatedir = @localstatedir@
--man1_MANS = @man1_MANS@
- mandir = @mandir@
- mkdir_p = @mkdir_p@
- oldincludedir = @oldincludedir@
-@@ -4023,8 +4001,7 @@
- 	lib/xnanosleep.h lib/xreadlink.h lib/xstrtod.h lib/xstrtol.h \
- 	lib/xstrtod.c lib/xstrtod.h lib/xalloc.h lib/yesno.h src/dcgen \
- 	src/dircolors.hin src/primes.h src/tac-pipe.c \
--	src/extract-magic src/c99-to-c89.diff man/help2man \
--	man/dummy-man $(man1_MANS:.1=.x) $(EXTRA_MANS:.1=.x) \
-+	src/extract-magic src/c99-to-c89.diff \
- 	$(all_tests) init.cfg tests/Coreutils.pm tests/CuSkip.pm \
- 	tests/CuTmpdir.pm tests/d_type-check tests/envvar-check \
- 	tests/factor/run.sh tests/factor/create-test.sh \
-@@ -4036,7 +4013,7 @@
- ACLOCAL_AMFLAGS = -I m4
- 
- # Just prior to distribution, ...
--# transform the automake-generated rule that runs 'rm -f rm > /dev/null 2>&1 || /bin/rm -f rm'.
-+# transform the automake-generated rule that runs 'rm -f rm'.
- # On some systems, that command would fail with a diagnostic like
- # "rm: cannot unlink 'rm': Text file busy" when '.' appears so early
- # in the shell's search path that running 'rm' would run the 'rm'
-@@ -4154,7 +4131,7 @@
- 	lib/ref-add.sed lib/ref-del.sed $(SCRIPTS) \
- 	$(no_install__progs) src/coreutils_symlinks \
- 	src/coreutils_shebangs src/fs-def src/fs-magic \
--	src/fs-kernel-magic $(ALL_MANS) $(factor_tests)
-+	src/fs-kernel-magic $(factor_tests)
- MOSTLYCLEANDIRS = lib/arpa lib/netinet lib/selinux lib/sys lib/sys \
- 	lib/sys lib/sys lib/sys lib/sys lib/sys lib/sys
- AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
-@@ -4962,18 +4939,6 @@
-      }				\
-    END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
- 
--@HAVE_PERL_FALSE@run_help2man = $(SHELL) $(srcdir)/man/dummy-man
--@HAVE_PERL_TRUE@run_help2man = $(PERL) -- $(srcdir)/man/help2man
--ALL_MANS = $(man1_MANS) $(EXTRA_MANS)
--
--# Dependencies common to all man pages.  Updated below.
--
--# Depend on this to get version number changes.
--
--# This is required so that changes to e.g., emit_bug_reporting_address
--# provoke regeneration of all the manpages.
--mandeps = .version $(top_srcdir)/src/system.h
--
- # Indirections required so that we'll still be able to know the
- # complete list of our tests even if the user overrides TESTS
- # from the command line (as permitted by the test harness API).
-@@ -5764,10 +5729,10 @@
- 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
- 
- .SUFFIXES:
--.SUFFIXES: .1 .c .dvi .log .o .obj .pl .pl$(EXEEXT) .ps .sed .sh .sh$(EXEEXT) .sin .trs .x .xpl .xpl$(EXEEXT) .y
-+.SUFFIXES: .c .dvi .log .o .obj .pl .pl$(EXEEXT) .ps .sed .sh .sh$(EXEEXT) .sin .trs .x .xpl .xpl$(EXEEXT) .y
- am--refresh: Makefile
- 	@:
--$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/man/local.mk $(top_srcdir)/tests/local.mk $(am__configure_deps)
-+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/tests/local.mk $(am__configure_deps)
- 	@for dep in $?; do \
- 	  case '$(am__configure_deps)' in \
- 	    *$$dep*) \
-@@ -5790,7 +5755,7 @@
- 	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- 	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- 	esac;
--$(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/man/local.mk $(top_srcdir)/tests/local.mk:
-+$(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/tests/local.mk:
- 
- $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- 	$(SHELL) ./config.status --recheck
-@@ -7421,7 +7386,7 @@
- 	cd "$(DESTDIR)$(bindir)" && rm -f $$files
- 
- clean-binPROGRAMS:
--	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) > /dev/null 2>&1 || /bin/rm -f $(bin_PROGRAMS)
-+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 
- 
- clean-noinstPROGRAMS:
- 	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-@@ -14033,58 +13998,6 @@
- 
- check-local: check-texinfo
- 
--# This is a kludge to remove generated 'man/*.1' from a non-srcdir build.
--# Without this, "make distcheck" might fail.
--distclean-local:
--	test x$(srcdir) = x$(builddir) || rm -f $(ALL_MANS)
--
--$(ALL_MANS): $(mandeps)
--man/dynamic-deps.mk: Makefile
--	$(AM_V_GEN)rm -f $@ $@-t
--	$(AM_V_at)for man in $(ALL_MANS); do				\
--		name=`echo "$$man"|sed 's|.*/||; s|\.1$$||'` || exit 1;	\
--		case $$name in						\
--		     arch) prog='uname';;				\
--		  install) prog='ginstall';;				\
--		     test) prog='[';;					\
--			*) prog=$$name;;				\
--		esac;							\
--		case " $(single_binary_progs) " in			\
--			*" $$prog "*)					\
--				echo $$man: src/coreutils$(EXEEXT);;	\
--			*)						\
--				echo $$man: src/$$prog$(EXEEXT);;	\
--		esac							\
--	done > $@-t							\
--	&& mv $@-t $@
--
--# Include the generated man dependencies.
--@AMDEP_TRUE@@am__include@ man/dynamic-deps.mk
--
--.x.1:
--	$(AM_V_GEN)name=`echo $@ | sed 's|.*/||; s|\.1$$||'` || exit 1;	\
--	case $$name in							\
--	  install) prog='ginstall'; argv=$$name;;			\
--	     test) prog='['; argv='[';;					\
--		*) prog=$$name; argv=$$prog;;				\
--	esac;								\
--	rm -f $@ $@-t							\
--	  && t=$*.td							\
--	  && rm -rf $$t							\
--	  && $(MKDIR_P) $$t						\
--	  && (cd $$t && $(LN_S) '$(abs_top_builddir)/src/'$$prog $$argv) \
--	  && $(run_help2man)						\
--		     --source='$(PACKAGE_STRING)'			\
--		     --include=$(srcdir)/man/$$name.x			\
--		     --output=$$t/$$name.1 $$t/$$argv			\
--		     --info-page='coreutils \(aq'$$name' invocation\(aq' \
--	  && sed \
--	       -e 's|$*\.td/||g' \
--	       -e '/For complete documentation/d' \
--	       $$t/$$name.1 > $@-t			\
--	  && rm -rf $$t							\
--	  && chmod a-w $@-t						\
--	  && mv $@-t $@
- .PHONY: check-root
- check-root:
- 	$(MAKE) check TESTS='$(root_tests)' SUBDIRS=.
Index: tches/coreutils-8.23-uname-1.patch
===================================================================
--- patches/coreutils-8.23-uname-1.patch	(revision 7456001d1e013e165d188038b3615c8924a006dd)
+++ 	(revision )
@@ -1,181 +1,0 @@
-Submitted By: Jim Gifford <jim at cross-lfs dot org>
-Date: 2010-07-26
-Initial Package Version: 5.97
-Upstream Status: Not Accepted
-Origin: Gentoo - http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/coreutils
-Description: Display CPU Information from /proc/cpuinfo or /proc/sysinfo
-
-Rediffed for 7.1 by Jim Gifford
-Rediffed for 7.5 by Jim Gifford
-Rediffed for 8.4 by Joe Ciccone
-Rediffed for 8.9 by Joe Ciccone
-Rediffed for 8.16 by Jonathan Norman - 2012-06-10
-Rediffed for 8.19 by William Harrington - 2012-08-27
-Renamed for 8.20 by William Harrington - 2012-11-01
-Rediffed for 8.21 by William Harrington 2013-05-31
-Renamed for 8.22 by William Harrington - 2013-12-14
-Renamed for 8.23 by William Harrington - 2014-10-30
-
-diff -Naur coreutils-8.21.orig/src/uname.c coreutils-8.21/src/uname.c
---- coreutils-8.21.orig/src/uname.c	2013-01-31 00:46:24.000000000 +0000
-+++ coreutils-8.21/src/uname.c	2013-05-31 13:41:32.683326834 +0000
-@@ -49,6 +49,11 @@
- # include <mach-o/arch.h>
- #endif
- 
-+#if defined (__linux__)
-+# define USE_PROCINFO
-+# define UNAME_HARDWARE_PLATFORM
-+#endif
-+
- #include "system.h"
- #include "error.h"
- #include "quote.h"
-@@ -153,6 +158,117 @@
-   exit (status);
- }
- 
-+#if defined(USE_PROCINFO)
-+
-+# if defined(__s390__) || defined(__s390x__)
-+#  define CPUINFO_FILE    "/proc/sysinfo"
-+#  define CPUINFO_FORMAT  "%64[^\t :]%*[ :]%256[^\n]%c"
-+# else
-+#  define CPUINFO_FILE    "/proc/cpuinfo"
-+#  define CPUINFO_FORMAT  "%64[^\t:]\t:%256[^\n]%c"
-+# endif
-+
-+# define PROCINFO_PROCESSOR      0
-+# define PROCINFO_HARDWARE_PLATFORM 1
-+
-+static void __eat_cpuinfo_space(char *buf)
-+{
-+	/* first eat trailing space */
-+	char *tmp = buf + strlen(buf) - 1;
-+	while (tmp > buf && isspace(*tmp))
-+		*tmp-- = '\0';
-+	/* then eat leading space */
-+	tmp = buf;
-+	while (*tmp && isspace(*tmp))
-+		tmp++;
-+	if (tmp != buf)
-+		memmove(buf, tmp, strlen(tmp)+1);
-+	/* finally collapse whitespace */
-+	tmp = buf;
-+	while (tmp[0] && tmp[1]) {
-+		if (isspace(tmp[0]) && isspace(tmp[1])) {
-+			memmove(tmp, tmp+1, strlen(tmp));
-+			continue;
-+		}
-+		++tmp;
-+	}
-+}
-+
-+static int __linux_procinfo (int x, char *fstr, size_t s)
-+{
-+	FILE *fp;
-+
-+	char *procinfo_keys[] = {
-+		/* --processor --hardware-platform */
-+		#if defined(__alpha__)
-+			"cpu model", "system type"
-+		#elif defined(__arm__)
-+			"Processor", "Hardware"
-+		#elif defined(__avr32__)
-+			"processor", "cpu family"
-+		#elif defined(__bfin__)
-+			"CPU", "BOARD Name"
-+		#elif defined(__cris__)
-+			"cpu", "cpu model"
-+		#elif defined(__frv__)
-+			"CPU-Core", "System"
-+		#elif defined(__i386__) || defined(__x86_64__)
-+			"model name", "vendor_id"
-+		#elif defined(__ia64__)
-+			"family", "vendor"
-+		#elif defined(__hppa__)
-+			"cpu", "model"
-+		#elif defined(__m68k__)
-+			"CPU", "MMU"
-+		#elif defined(__mips__)
-+			"cpu model", "system type"
-+		#elif defined(__powerpc__) || defined(__powerpc64__)
-+			"cpu", "machine"
-+		#elif defined(__s390__) || defined(__s390x__)
-+			"Type", "Manufacturer"
-+		#elif defined(__sh__)
-+			"cpu type", "machine"
-+		#elif defined(sparc) || defined(__sparc__)
-+			"type", "cpu"
-+		#elif defined(__vax__)
-+			"cpu type", "cpu"
-+		#else
-+			"unknown", "unknown"
-+		#endif
-+	};
-+
-+	if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
-+		char key[65], value[257], eol, *ret = NULL;
-+
-+		while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
-+			__eat_cpuinfo_space(key);
-+			if (!strcmp(key, procinfo_keys[x])) {
-+				__eat_cpuinfo_space(value);
-+				ret = value;
-+				break;
-+			}
-+			if (eol != '\n') {
-+				/* we need two fscanf's here in case the previous
-+				 * length limit caused us to read right up to the
-+				 * newline ... doing "%*[^\n]\n" wont eat the newline
-+				 */
-+				fscanf(fp, "%*[^\n]");
-+				fscanf(fp, "\n");
-+			}
-+		}
-+		fclose(fp);
-+
-+		if (ret) {
-+			strncpy(fstr, ret, s);
-+			return 0;
-+		}
-+	}
-+
-+	return -1;
-+}
-+
-+#endif
-+
- /* Print ELEMENT, preceded by a space if something has already been
-    printed.  */
- 
-@@ -300,10 +416,14 @@
-   if (toprint & PRINT_PROCESSOR)
-     {
-       char const *element = unknown;
--#if HAVE_SYSINFO && defined SI_ARCHITECTURE
-+#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
-       {
-         static char processor[257];
-+#if defined(USE_PROCINFO)
-+        if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
-+#else
-         if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
-+#endif
-           element = processor;
-       }
- #endif
-@@ -356,9 +476,13 @@
-       if (element == unknown)
-         {
-           static char hardware_platform[257];
-+#if defined(USE_PROCINFO)
-+        if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
-+#else
-           size_t s = sizeof hardware_platform;
-           static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
-           if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
-+#endif
-             element = hardware_platform;
-         }
- #endif
Index: patches/coreutils-8.27-uname-1.patch
===================================================================
--- patches/coreutils-8.27-uname-1.patch	(revision a624ab55c89a18fa54a05032a6ffd529b882d7af)
+++ patches/coreutils-8.27-uname-1.patch	(revision a624ab55c89a18fa54a05032a6ffd529b882d7af)
@@ -0,0 +1,182 @@
+Submitted By: Jim Gifford <jim at cross-lfs dot org>
+Date: 2010-07-26
+Initial Package Version: 5.97
+Upstream Status: Not Accepted
+Origin: Gentoo - http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/coreutils
+Description: Display CPU Information from /proc/cpuinfo or /proc/sysinfo
+
+Rediffed for 7.1 by Jim Gifford
+Rediffed for 7.5 by Jim Gifford
+Rediffed for 8.4 by Joe Ciccone
+Rediffed for 8.9 by Joe Ciccone
+Rediffed for 8.16 by Jonathan Norman - 2012-06-10
+Rediffed for 8.19 by William Harrington - 2012-08-27
+Renamed for 8.20 by William Harrington - 2012-11-01
+Rediffed for 8.21 by William Harrington 2013-05-31
+Renamed for 8.22 by William Harrington - 2013-12-14
+Renamed for 8.23 by William Harrington - 2014-10-30
+Renamed for 8.27 by William Harrington - 2017-05-24
+
+diff -Naur coreutils-8.21.orig/src/uname.c coreutils-8.21/src/uname.c
+--- coreutils-8.21.orig/src/uname.c	2013-01-31 00:46:24.000000000 +0000
++++ coreutils-8.21/src/uname.c	2013-05-31 13:41:32.683326834 +0000
+@@ -49,6 +49,11 @@
+ # include <mach-o/arch.h>
+ #endif
+ 
++#if defined (__linux__)
++# define USE_PROCINFO
++# define UNAME_HARDWARE_PLATFORM
++#endif
++
+ #include "system.h"
+ #include "error.h"
+ #include "quote.h"
+@@ -153,6 +158,117 @@
+   exit (status);
+ }
+ 
++#if defined(USE_PROCINFO)
++
++# if defined(__s390__) || defined(__s390x__)
++#  define CPUINFO_FILE    "/proc/sysinfo"
++#  define CPUINFO_FORMAT  "%64[^\t :]%*[ :]%256[^\n]%c"
++# else
++#  define CPUINFO_FILE    "/proc/cpuinfo"
++#  define CPUINFO_FORMAT  "%64[^\t:]\t:%256[^\n]%c"
++# endif
++
++# define PROCINFO_PROCESSOR      0
++# define PROCINFO_HARDWARE_PLATFORM 1
++
++static void __eat_cpuinfo_space(char *buf)
++{
++	/* first eat trailing space */
++	char *tmp = buf + strlen(buf) - 1;
++	while (tmp > buf && isspace(*tmp))
++		*tmp-- = '\0';
++	/* then eat leading space */
++	tmp = buf;
++	while (*tmp && isspace(*tmp))
++		tmp++;
++	if (tmp != buf)
++		memmove(buf, tmp, strlen(tmp)+1);
++	/* finally collapse whitespace */
++	tmp = buf;
++	while (tmp[0] && tmp[1]) {
++		if (isspace(tmp[0]) && isspace(tmp[1])) {
++			memmove(tmp, tmp+1, strlen(tmp));
++			continue;
++		}
++		++tmp;
++	}
++}
++
++static int __linux_procinfo (int x, char *fstr, size_t s)
++{
++	FILE *fp;
++
++	char *procinfo_keys[] = {
++		/* --processor --hardware-platform */
++		#if defined(__alpha__)
++			"cpu model", "system type"
++		#elif defined(__arm__)
++			"Processor", "Hardware"
++		#elif defined(__avr32__)
++			"processor", "cpu family"
++		#elif defined(__bfin__)
++			"CPU", "BOARD Name"
++		#elif defined(__cris__)
++			"cpu", "cpu model"
++		#elif defined(__frv__)
++			"CPU-Core", "System"
++		#elif defined(__i386__) || defined(__x86_64__)
++			"model name", "vendor_id"
++		#elif defined(__ia64__)
++			"family", "vendor"
++		#elif defined(__hppa__)
++			"cpu", "model"
++		#elif defined(__m68k__)
++			"CPU", "MMU"
++		#elif defined(__mips__)
++			"cpu model", "system type"
++		#elif defined(__powerpc__) || defined(__powerpc64__)
++			"cpu", "machine"
++		#elif defined(__s390__) || defined(__s390x__)
++			"Type", "Manufacturer"
++		#elif defined(__sh__)
++			"cpu type", "machine"
++		#elif defined(sparc) || defined(__sparc__)
++			"type", "cpu"
++		#elif defined(__vax__)
++			"cpu type", "cpu"
++		#else
++			"unknown", "unknown"
++		#endif
++	};
++
++	if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
++		char key[65], value[257], eol, *ret = NULL;
++
++		while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
++			__eat_cpuinfo_space(key);
++			if (!strcmp(key, procinfo_keys[x])) {
++				__eat_cpuinfo_space(value);
++				ret = value;
++				break;
++			}
++			if (eol != '\n') {
++				/* we need two fscanf's here in case the previous
++				 * length limit caused us to read right up to the
++				 * newline ... doing "%*[^\n]\n" wont eat the newline
++				 */
++				fscanf(fp, "%*[^\n]");
++				fscanf(fp, "\n");
++			}
++		}
++		fclose(fp);
++
++		if (ret) {
++			strncpy(fstr, ret, s);
++			return 0;
++		}
++	}
++
++	return -1;
++}
++
++#endif
++
+ /* Print ELEMENT, preceded by a space if something has already been
+    printed.  */
+ 
+@@ -300,10 +416,14 @@
+   if (toprint & PRINT_PROCESSOR)
+     {
+       char const *element = unknown;
+-#if HAVE_SYSINFO && defined SI_ARCHITECTURE
++#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
+       {
+         static char processor[257];
++#if defined(USE_PROCINFO)
++        if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
++#else
+         if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
++#endif
+           element = processor;
+       }
+ #endif
+@@ -356,9 +476,13 @@
+       if (element == unknown)
+         {
+           static char hardware_platform[257];
++#if defined(USE_PROCINFO)
++        if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
++#else
+           size_t s = sizeof hardware_platform;
+           static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
+           if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
++#endif
+             element = hardware_platform;
+         }
+ #endif
