PSARC 2014/271 GNU coreutils 8.23
authorRich Burridge <rich.burridge@oracle.com>
Fri, 15 Aug 2014 07:34:17 -0700
changeset 2050 7c6a1559c620
parent 2049 e2939e765e30
child 2051 1bdb33eb0332
PSARC 2014/271 GNU coreutils 8.23 18527328 Update GNU coreutils to the latest version
components/coreutils/Makefile
components/coreutils/coreutils.p5m
components/coreutils/patches/chroot-libthread.patch
components/coreutils/patches/file-type.c.patch
components/coreutils/patches/fix-od.patch
components/coreutils/patches/install.1.patch
components/coreutils/patches/libstdbuf.c.patch
components/coreutils/patches/manpages.patch
components/coreutils/patches/mountlist.c.patch
components/coreutils/patches/stat-birthtime.patch
components/coreutils/patches/stdbuf-configure.patch
components/coreutils/patches/stdbuf.c.patch
components/coreutils/patches/tests-misc-expr.patch
components/coreutils/patches/uptime.1.patch
components/coreutils/patches/who.c.patch
--- a/components/coreutils/Makefile	Thu Aug 14 23:47:06 2014 -0700
+++ b/components/coreutils/Makefile	Fri Aug 15 07:34:17 2014 -0700
@@ -23,21 +23,26 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		coreutils
-COMPONENT_VERSION=	8.16
+COMPONENT_VERSION=	8.23
 COMPONENT_PROJECT_URL=	http://www.gnu.org/software/coreutils/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:2a458fead15d9336f46bb4304cc3eaa6ed9407b9130e7ee2ec533909881d2067
+    sha256:ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d
 COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/coreutils/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	utility/gnu-coreutils
 
-TPNO=			8349
+TPNO=			18521
 
 include ../../make-rules/prep.mk
 include ../../make-rules/configure.mk
 include ../../make-rules/ips.mk
 
+# We need the GNU grep command to configure/build.
+PATH=/usr/gnu/bin:/usr/bin
+
+PATCH_LEVEL=		0
+
 CONFIGURE_PREFIX	 =	/usr/gnu
 CONFIGURE_OPTIONS	+=	--bindir=/usr/gnu/bin
 CONFIGURE_OPTIONS	+=	--libdir=/usr/lib
@@ -45,7 +50,7 @@
 CONFIGURE_OPTIONS	+=	CPPFLAGS=-I/usr/include/gmp
 CONFIGURE_OPTIONS	+=	CFLAGS="$(CFLAGS)"
 
-# Recreate configure and src/Makefile to pick up stat birthtime changes.
+# Recreate configure and Makefile to pick up changes in .../src/local.mk
 COMPONENT_PREP_ACTION = (cd $(@D) ; autoreconf -f && automake)
 
 # Always show the build and link lines for easier debugging.
@@ -70,6 +75,26 @@
 # Get the binaries to test from the component proto area.
 COMPONENT_TEST_ENV +=   PATH=$(PROTOUSRSBINDIR):/usr/bin
 
+# With coreutils version 8.23, there are currently six tests that are failing:
+# 1/ test-getlogin   - this is a known problem. See:
+#    http://www.linuxfromscratch.org/pipermail/lfs-dev/2012-April/066264.html
+#
+#    After GNU coreutils has been built, it's possible to successfully run
+#    the test manually from a terminal with:
+#
+#    $ cd build/amd64/gnulib-tests && \
+#          gmake NON_ROOT_USERNAME=nobody -k check-TESTS && \
+#          gmake check TESTS=test-get-login
+
+# 2/ test-mbrtowc3
+# 3/ test-mbrtowc4
+# 4/ test-mbsalign
+# 5/ test-mbsrtowcs4 - these four multi-byte problems have been reported to
+#                      the G11N team. CR #19368946 & #19370120 have been filed.
+#
+# 6/ test-posixtm    - this is due to a problem with the Solaris mktime
+#                      utility. CR #19344177 has been filed.
+
 test:		install $(TEST_64)
 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
--- a/components/coreutils/coreutils.p5m	Thu Aug 14 23:47:06 2014 -0700
+++ b/components/coreutils/coreutils.p5m	Fri Aug 15 07:34:17 2014 -0700
@@ -34,13 +34,16 @@
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=org.opensolaris.arc-caseid \
-    value=PSARC/2010/170 value=PSARC/2012/170
+    value=PSARC/2010/170 value=PSARC/2012/170 value=PSARC/2014/271
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 file usr/gnu/bin/base64 path=usr/bin/base64
+# Not included with Solaris GNU coreutils.
+#file usr/gnu/bin/chcon path=usr/bin/chcon
 file usr/gnu/bin/dir path=usr/bin/dir
 file usr/gnu/bin/dircolors path=usr/bin/dircolors
 file usr/gnu/bin/md5sum path=usr/bin/md5sum
 file usr/gnu/bin/nproc path=usr/bin/nproc
+file usr/gnu/bin/numfmt path=usr/bin/numfmt
 file usr/gnu/bin/pinky path=usr/bin/pinky
 file usr/gnu/bin/printenv path=usr/bin/printenv
 file usr/gnu/bin/ptx path=usr/bin/ptx
@@ -152,7 +155,9 @@
 file path=usr/gnu/share/locale/fr/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/ga/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/gl/LC_MESSAGES/coreutils.mo
+file path=usr/gnu/share/locale/hr/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/hu/LC_MESSAGES/coreutils.mo
+file path=usr/gnu/share/locale/ia/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/id/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/it/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/ja/LC_MESSAGES/coreutils.mo
@@ -253,15 +258,20 @@
 file $(MACH64)/src/libstdbuf.so path=usr/lib/$(MACH64)/libstdbuf.so
 file path=usr/share/info/coreutils.info
 file usr/gnu/share/man/man1/base64.1 path=usr/share/man/man1/base64.1
+# Not included with Solaris GNU coreutils.
+#file usr/gnu/share/man/man1/chcon.1 path=usr/share/man/man1/chcon.1
 file usr/gnu/share/man/man1/dir.1 path=usr/share/man/man1/dir.1
 file usr/gnu/share/man/man1/dircolors.1 path=usr/share/man/man1/dircolors.1
 file usr/gnu/share/man/man1/md5sum.1 path=usr/share/man/man1/md5sum.1
 file usr/gnu/share/man/man1/nproc.1 path=usr/share/man/man1/nproc.1
+file usr/gnu/share/man/man1/numfmt.1 path=usr/share/man/man1/numfmt.1
 file usr/gnu/share/man/man1/pinky.1 path=usr/share/man/man1/pinky.1
 file usr/gnu/share/man/man1/printenv.1 path=usr/share/man/man1/printenv.1
 file usr/gnu/share/man/man1/ptx.1 path=usr/share/man/man1/ptx.1
 file usr/gnu/share/man/man1/readlink.1 path=usr/share/man/man1/readlink.1
 file usr/gnu/share/man/man1/realpath.1 path=usr/share/man/man1/realpath.1
+# Not included with Solaris GNU coreutils.
+#file usr/gnu/share/man/man1/runcon.1 path=usr/share/man/man1/runcon.1
 file usr/gnu/share/man/man1/seq.1 path=usr/share/man/man1/seq.1
 file usr/gnu/share/man/man1/sha1sum.1 path=usr/share/man/man1/sha1sum.1
 file usr/gnu/share/man/man1/sha224sum.1 path=usr/share/man/man1/sha224sum.1
@@ -311,8 +321,12 @@
     target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/gl/LC_TIME/coreutils.mo \
     target=../LC_MESSAGES/coreutils.mo
+link path=usr/gnu/share/locale/hr/LC_TIME/coreutils.mo \
+    target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/hu/LC_TIME/coreutils.mo \
     target=../LC_MESSAGES/coreutils.mo
+link path=usr/gnu/share/locale/ia/LC_TIME/coreutils.mo \
+    target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/id/LC_TIME/coreutils.mo \
     target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/it/LC_TIME/coreutils.mo \
--- a/components/coreutils/patches/chroot-libthread.patch	Thu Aug 14 23:47:06 2014 -0700
+++ b/components/coreutils/patches/chroot-libthread.patch	Fri Aug 15 07:34:17 2014 -0700
@@ -1,20 +1,20 @@
 These changes have not been passed upstream. It's really a Studio compiler
 bug CR #18752073.
 
---- coreutils-8.16/src/Makefile.am.orig	2014-05-15 10:13:19.739717905 -0700
-+++ coreutils-8.16/src/Makefile.am	2014-05-16 10:39:39.250671691 -0700
[email protected]@ -178,6 +178,15 @@
- # Tell the linker to omit references to unused shared libraries.
- AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
+--- src/local.mk.orig	2014-07-30 07:15:11.502530658 -0700
++++ src/local.mk	2014-07-30 07:16:58.403637868 -0700
[email protected]@ -83,6 +83,15 @@
+ copy_ldadd =
+ remove_ldadd =
  
 +# for chroot to work correctly for root (CR #18744156)
 +# add '-z now' to disable lazy loading since we need to bring in
 +# dependencies before we chroot(2) to an environment that may not
 +# be able to satisfy them.
-+chroot_LDFLAGS =  -z now
++src_chroot_LDFLAGS =  -z now
 +# add '-mt=no' so that we don't end up with an unnecessary dependency on
 +# libthread.so.
-+chroot_LDFLAGS +=  -mt=no
++src_chroot_LDFLAGS +=  -mt=no
 +
  # Sometimes, the expansion of $(LIBINTL) includes -lc which may
  # include modules defining variables like 'optind', so libcoreutils.a
--- a/components/coreutils/patches/file-type.c.patch	Thu Aug 14 23:47:06 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-Add support for the Solaris "door" file type with the GNU stat command
-(CR #16575088)
-
-This patch will be submitted upstream.
-
---- coreutils-8.16/lib/file-type.c.orig	2014-02-04 08:45:32.295255617 -0800
-+++ coreutils-8.16/lib/file-type.c	2014-02-04 14:31:27.647845083 -0800
[email protected]@ -55,6 +55,9 @@
-   if (S_ISSOCK (st->st_mode))
-     return _("socket");
- 
-+  if (S_ISDOOR (st->st_mode))
-+    return _("door");
-+
-   if (S_TYPEISMQ (st))
-     return _("message queue");
- 
--- a/components/coreutils/patches/fix-od.patch	Thu Aug 14 23:47:06 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-Fix for CR #16833210 - god does not handle large values of -w well
-
-GNU od -wN with N larger than 64K on a system with 32-bit size_t would
-print approximately 2*N bytes of extraneous padding.
-[Bug introduced in coreutils-7.0]
-
-From: Jim Meyering <[email protected]>
-Date: Sat, 1 Jun 2013 19:20:06 -0700
-Subject: [PATCH] od: -wN, N>64K, avoid misbehavior on systems with 32-bit
- size_t
-
-* src/od.c (PRINT_FIELDS): Declare "i" to be of type uintmax_t, so that
-the numerator in the expression for "next_pad" does not overflow.
-(print_named_ascii): Likewise.
-(print_ascii): Likewise.
-Bug introduced via commit v6.12-42-g20c0b87.
-* tests/misc/od.pl: Exercise each of the three affected code paths.
-* NEWS (Bug fixes): Mention it.
-Reported by Rich Burridge.
----
- NEWS             | 4 ++++
- THANKS.in        | 1 +
- src/od.c         | 6 +++---
- tests/misc/od.pl | 7 +++++++
- 4 files changed, 15 insertions(+), 3 deletions(-)
-
-Also see the email thread at:
-http://lists.gnu.org/archive/html/bug-coreutils/2013-06/msg00009.html
-
---- coreutils-8.16/src/od.c.orig	2013-06-03 06:32:09.966956225 -0700
-+++ coreutils-8.16/src/od.c	2013-06-03 07:15:29.690420676 -0700
[email protected]@ -394,7 +394,7 @@
-    char const *FMT_STRING, int width, int pad)                          \
- {                                                                       \
-   T const *p = block;                                                   \
--  size_t i;                                                             \
-+  uintmax_t i;                                                          \
-   int pad_remaining = pad;                                              \
-   for (i = fields; blank < i; i--)                                      \
-     {                                                                   \
[email protected]@ -450,7 +450,7 @@
-                    int width, int pad)
- {
-   unsigned char const *p = block;
--  size_t i;
-+  uintmax_t i;
-   int pad_remaining = pad;
-   for (i = fields; blank < i; i--)
-     {
[email protected]@ -481,7 +481,7 @@
-              int pad)
- {
-   unsigned char const *p = block;
--  size_t i;
-+  uintmax_t i;
-   int pad_remaining = pad;
-   for (i = fields; blank < i; i--)
-     {
---- coreutils-8.16/tests/misc/od.orig	2013-06-03 06:34:10.913221535 -0700
-+++ coreutils-8.16/tests/misc/od	2013-06-03 06:34:46.766226767 -0700
[email protected]@ -57,6 +57,14 @@
-      # even if the kernel reports that the file has stat.st_size = 0.
-      ['j-proc', "-An -c -j $proc_file_byte_count $proc_file",
-                                {IN=>{f2=>'e'}}, {OUT=>"   e\n"}],
-+
-+     # Ensure that a large width does not cause trouble.
-+     # From coreutils-7.0 through coreutils-8.21, these would print
-+     # approximately 128KiB of padding.
-+     ['wide-a',   '-a -w65537 -An', {IN=>{g=>'x'}}, {OUT=>"   x\n"}],
-+     ['wide-c',   '-c -w65537 -An', {IN=>{g=>'x'}}, {OUT=>"   x\n"}],
-+     ['wide-x', '-tx1 -w65537 -An', {IN=>{g=>'B'}}, {OUT=>" 42\n"}],
-+
-     );
- 
- my $save_temps = $ENV{DEBUG};
--- a/components/coreutils/patches/install.1.patch	Thu Aug 14 23:47:06 2014 -0700
+++ b/components/coreutils/patches/install.1.patch	Fri Aug 15 07:34:17 2014 -0700
@@ -1,21 +1,18 @@
-*** coreutils-8.5/man/install.1.orig	Wed Oct 12 11:00:13 2011
---- coreutils-8.5/man/install.1	Wed Oct 12 11:00:55 2011
-***************
-*** 19,26 ****
-  .PP
-  This install program copies files (often just compiled) into destination
-  locations you choose.  If you want to download and install a ready\-to\-use
-! package on a GNU/Linux system, you should instead be using a package manager
-! like yum(1) or apt\-get(1).
-  .PP
-  In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to
-  the existing DIRECTORY, while setting permission modes and owner/group.
---- 19,26 ----
-  .PP
-  This install program copies files (often just compiled) into destination
-  locations you choose.  If you want to download and install a ready\-to\-use
-! package on a Solaris system, you should instead be using a package manager
-! like pkg(1) or packagemanager(1).
-  .PP
-  In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to
-  the existing DIRECTORY, while setting permission modes and owner/group.
+Adjust the text used in the install help message and man page to mention
+the Solaris specific packaging tool. Mention of packagemanager(1) has been
+removed as this is EOF in S12.
+
+This patch has not been passed upstream yet. It needs to be reworked into
+a format that would be acceptable.
+
+--- src/install.c.orig	2014-07-30 06:38:25.530839453 -0700
++++ src/install.c	2014-07-30 06:38:54.087493628 -0700
[email protected]@ -610,7 +610,7 @@
+ This install program copies files (often just compiled) into destination\n\
+ locations you choose.  If you want to download and install a ready-to-use\n\
+ package on a GNU/Linux system, you should instead be using a package manager\n\
+-like yum(1) or apt-get(1).\n\
++like pkg(1).\n\
+ \n\
+ In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to\n\
+ the existing DIRECTORY, while setting permission modes and owner/group.\n\
--- a/components/coreutils/patches/libstdbuf.c.patch	Thu Aug 14 23:47:06 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-Changes needed to properly create the libstdbuf.so shared library on Solaris.
-
-This change has been passed upstream.
-
---- coreutils-8.16/src/libstdbuf.c.orig	2014-05-08 21:41:23.436563716 -0700
-+++ coreutils-8.16/src/libstdbuf.c	2014-05-12 17:44:17.575294603 -0700
[email protected]@ -127,7 +127,14 @@
-     }
- }
- 
--__attribute__ ((constructor)) static void
-+#if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) \
-+     || 0x590 <= __SUNPRO_C)
-+/* Explicitly define to avoid otherwise elided __attribute on SUNPRO_C  */
-+# define ATTRIBUTE_CONSTRUCTOR __attribute ((constructor))
-+#else
-+# error "__attribute ((constructor)) support is required"
-+#endif
-+static void ATTRIBUTE_CONSTRUCTOR
- stdbuf (void)
- {
-   char *e_mode = getenv ("_STDBUF_E");
--- a/components/coreutils/patches/manpages.patch	Thu Aug 14 23:47:06 2014 -0700
+++ b/components/coreutils/patches/manpages.patch	Fri Aug 15 07:34:17 2014 -0700
@@ -1,88 +1,70 @@
---- coreutils-8.5/man/mkfifo.1.orig	Wed Nov  9 09:02:34 2011
-+++ coreutils-8.5/man/mkfifo.1	Wed Nov  9 09:10:31 2011
[email protected]@ -40,7 +40,7 @@
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- .SH "SEE ALSO"
+Adjust the text used in various man pages to use the Solaris specific
+man page section or remove references to commands that are't relevant
+to Solaris.
+
+This patch has not been passed upstream yet. It needs to be reworked into
+a format that would be acceptable.
+
+--- man/mkfifo.x.orig	2014-07-30 06:49:11.199126893 -0700
++++ man/mkfifo.x	2014-07-30 06:53:52.101716577 -0700
[email protected]@ -3,4 +3,4 @@
+ [DESCRIPTION]
+ .\" Add any additional description here
+ [SEE ALSO]
 -mkfifo(3)
 +mkfifo(3C)
- .PP
- The full documentation for
- .B mkfifo
---- coreutils-8.5/man/mktemp.1.orig	Wed Nov  9 09:02:34 2011
-+++ coreutils-8.5/man/mktemp.1	Wed Nov  9 09:09:43 2011
[email protected]@ -62,7 +62,7 @@
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- .SH "SEE ALSO"
+--- man/mktemp.x.orig	2014-07-30 06:49:11.203140097 -0700
++++ man/mktemp.x	2014-07-30 06:54:11.141190540 -0700
[email protected]@ -3,4 +3,4 @@
+ [DESCRIPTION]
+ .\" Add any additional description here
+ [SEE ALSO]
 -mkstemp(3), mkdtemp(3), mktemp(3)
 +mkstemp(3C), mkdtemp(3C), mktemp(3C)
- .PP
- The full documentation for
- .B mktemp
---- coreutils-8.5/man/printf.1.orig	Wed Nov  9 09:00:19 2011
-+++ coreutils-8.5/man/printf.1	Wed Nov  9 08:57:38 2011
[email protected]@ -96,7 +96,7 @@
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- .SH "SEE ALSO"
+--- man/printf.x.orig	2014-07-30 06:49:11.206916592 -0700
++++ man/printf.x	2014-07-30 06:54:19.607330057 -0700
[email protected]@ -3,4 +3,4 @@
+ [DESCRIPTION]
+ .\" Add any additional description here
+ [SEE ALSO]
 -printf(3)
 +printf(3C)
- .PP
- The full documentation for
- .B printf
---- coreutils-8.5/man/pwd.1.orig	Wed Nov  9 09:02:34 2011
-+++ coreutils-8.5/man/pwd.1	Wed Nov  9 09:10:12 2011
[email protected]@ -42,7 +42,7 @@
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- .SH "SEE ALSO"
+--- man/pwd.x.orig	2014-07-30 06:49:11.210693423 -0700
++++ man/pwd.x	2014-07-30 06:54:31.497670121 -0700
[email protected]@ -3,4 +3,4 @@
+ [DESCRIPTION]
+ .\" Add any additional description here
+ [SEE ALSO]
 -getcwd(3)
 +getcwd(3C)
- .PP
- The full documentation for
- .B pwd
---- coreutils-8.5/man/rm.1.orig	Wed Nov  9 09:02:34 2011
-+++ coreutils-8.5/man/rm.1	Wed Nov  9 09:05:42 2011
[email protected]@ -99,7 +99,7 @@
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- .SH "SEE ALSO"
+--- man/rm.x.orig	2014-07-30 06:49:11.214453258 -0700
++++ man/rm.x	2014-07-30 06:54:55.003442272 -0700
[email protected]@ -28,4 +28,4 @@
+ not affirmative, the file is skipped.
+ .SH OPTIONS
+ [SEE ALSO]
 -unlink(1), unlink(2), chattr(1), shred(1)
 +unlink(1), unlink(2), shred(1)
- .PP
- The full documentation for
- .B rm
---- coreutils-8.5/man/sleep.1.orig	Wed Nov  9 09:02:34 2011
-+++ coreutils-8.5/man/sleep.1	Wed Nov  9 09:10:47 2011
[email protected]@ -39,7 +39,7 @@
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- .SH "SEE ALSO"
+--- man/sleep.x.orig	2014-07-30 06:49:11.217060981 -0700
++++ man/sleep.x	2014-07-30 06:55:05.302644446 -0700
[email protected]@ -3,4 +3,4 @@
+ [DESCRIPTION]
+ .\" Add any additional description here
+ [SEE ALSO]
 -sleep(3)
 +sleep(3C)
- .PP
- The full documentation for
- .B sleep
---- coreutils-8.5/man/tac.1.orig	Wed Nov  9 09:02:34 2011
-+++ coreutils-8.5/man/tac.1	Wed Nov  9 09:07:47 2011
[email protected]@ -44,8 +44,6 @@
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- .SH "SEE ALSO"
+--- man/tac.x.orig	2014-07-30 06:49:11.219413108 -0700
++++ man/tac.x	2014-07-30 06:55:43.098711014 -0700
[email protected]@ -3,4 +3,3 @@
+ [DESCRIPTION]
+ .\" Add any additional description here
+ [SEE ALSO]
 -\fBrev\fP(1)
--.PP
- The full documentation for
- .B tac
- is maintained as a Texinfo manual.  If the
---- coreutils-8.5/man/truncate.1.orig	Wed Nov  9 09:02:34 2011
-+++ coreutils-8.5/man/truncate.1	Wed Nov  9 09:09:02 2011
[email protected]@ -61,7 +61,7 @@
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law.
- .SH "SEE ALSO"
+--- man/truncate.x.orig	2014-07-30 06:49:11.224283357 -0700
++++ man/truncate.x	2014-07-30 06:56:07.280167859 -0700
[email protected]@ -3,4 +3,4 @@
+ [DESCRIPTION]
+ .\" Add any additional description here
+ [SEE ALSO]
 -dd(1), truncate(2), ftruncate(2)
 +dd(1), truncate(3C), ftruncate(3C)
- .PP
- The full documentation for
- .B truncate
--- a/components/coreutils/patches/mountlist.c.patch	Thu Aug 14 23:47:06 2014 -0700
+++ b/components/coreutils/patches/mountlist.c.patch	Fri Aug 15 07:34:17 2014 -0700
@@ -1,17 +1,20 @@
 Properly detect remote mounted file systems with /usr/gnu/bin/df on Solaris.
 See the comments in CR# 15595871 for more details.
 
---- coreutils-8.16/lib/mountlist.c.orig	2012-04-18 07:41:27.645801306 -0700
-+++ coreutils-8.16/lib/mountlist.c	2012-04-18 07:42:23.796304225 -0700
[email protected]@ -187,10 +187,11 @@
+This patch has not been passed upstream yet. It needs to be reworked into
+a format that would be acceptable.
+
+--- lib/mountlist.c.orig	2014-07-27 14:40:04.634723388 -0700
++++ lib/mountlist.c	2014-07-27 14:40:58.062935347 -0700
[email protected]@ -212,10 +212,11 @@
  #endif
  
  #ifndef ME_REMOTE
 -/* A file system is "remote" if its Fs_name contains a ':'
 -   or if (it is of type (smbfs or cifs) and its Fs_name starts with '//').  */
-+/* A file system is `remote' if its Fs_name contains a `:' (and isn't of 
-+   type pcfs), or if (it is of type (smbfs or cifs) and its Fs_name starts
-+   with `//').  */
++/* A file system is `remote' if its Fs_name contains a `:' (and isn't of
+++   type pcfs), or if (it is of type (smbfs or cifs) and its Fs_name starts
+++   with `//').  */
  # define ME_REMOTE(Fs_name, Fs_type)            \
 -    (strchr (Fs_name, ':') != NULL              \
 +    ((strchr (Fs_name, ':') != NULL && strcmp (Fs_type, "pcfs") != 0) \
--- a/components/coreutils/patches/stat-birthtime.patch	Thu Aug 14 23:47:06 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-Changes to implement:
-16575074 stat could support birthtime/crtime on ZFS
-
-These changes have already been accepted upstream. See:
-http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=ea916c70a5fc47ee6036a05416bc7462fd8dc1cd
-
---- coreutils-8.16/configure.ac.orig	2014-03-18 20:12:23.362356112 -0700
-+++ coreutils-8.16/configure.ac	2014-03-18 20:13:47.327463395 -0700
[email protected]@ -240,6 +240,13 @@
-   AC_DEFINE([LOCALTIME_CACHE], [1], [FIXME])
- fi
- 
-+# Assume that if getattrat exists, it's compatible with Solaris 11.
-+AC_CHECK_FUNCS([getattrat])
-+if test $ac_cv_func_getattrat = yes; then
-+  LIB_NVPAIR=-lnvpair
-+  AC_SUBST([LIB_NVPAIR])
-+fi
-+
- # SCO-ODT-3.0 is reported to need -los to link programs using initgroups
- AC_CHECK_FUNCS([initgroups])
- if test $ac_cv_func_initgroups = no; then
---- coreutils-8.16/src/Makefile.am.orig	2014-03-18 20:19:34.447566111 -0700
-+++ coreutils-8.16/src/Makefile.am	2014-03-18 20:20:20.876086076 -0700
[email protected]@ -326,6 +326,9 @@
- runcon_LDADD += $(LIB_SELINUX)
- stat_LDADD += $(LIB_SELINUX)
- 
-+# for nvlist_lookup_uint64_array
-+stat_LDADD += $(LIB_NVPAIR)
-+
- # for gettime, settime, utimecmp, utimens
- copy_LDADD += $(LIB_CLOCK_GETTIME)
- date_LDADD += $(LIB_CLOCK_GETTIME)
---- coreutils-8.16/src/stat.c.orig	2014-03-16 16:55:52.605732676 -0700
-+++ coreutils-8.16/src/stat.c	2014-03-18 20:27:04.302699124 -0700
[email protected]@ -148,6 +148,11 @@
- # endif
- #endif
- 
-+#if HAVE_GETATTRAT
-+# include <attr.h>
-+# include <sys/nvpair.h>
-+#endif
-+
- /* FIXME: these are used by printf.c, too */
- #define isodigit(c) ('0' <= (c) && (c) <= '7')
- #define octtobin(c) ((c) - '0')
[email protected]@ -689,7 +694,7 @@
- /* Print statfs info.  Return zero upon success, nonzero upon failure.  */
- static bool ATTRIBUTE_WARN_UNUSED_RESULT
- print_statfs (char *pformat, size_t prefix_len, unsigned int m,
--              char const *filename,
-+              int fd, char const *filename,
-               void const *data)
- {
-   STRUCT_STATVFS const *statfsbuf = data;
[email protected]@ -861,6 +866,38 @@
-   return fail;
- }
- 
-+static struct timespec
-+get_birthtime (int fd, char const *filename, struct stat const *st)
-+{
-+  struct timespec ts = get_stat_birthtime (st);
-+
-+#if HAVE_GETATTRAT
-+  if (ts.tv_nsec < 0)
-+    {
-+      nvlist_t *response;
-+      if ((fd < 0
-+           ? getattrat (AT_FDCWD, XATTR_VIEW_READWRITE, filename, &response)
-+           : fgetattr (fd, XATTR_VIEW_READWRITE, &response))
-+          == 0)
-+        {
-+          uint64_t *val;
-+          uint_t n;
-+          if (nvlist_lookup_uint64_array (response, A_CRTIME, &val, &n) == 0
-+              && 2 <= n
-+              && val[0] <= TYPE_MAXIMUM (time_t)
-+              && val[1] < 1000000000 * 2 /* for leap seconds */)
-+            {
-+              ts.tv_sec = val[0];
-+              ts.tv_nsec = val[1];
-+            }
-+          nvlist_free (response);
-+        }
-+    }
-+#endif
-+
-+  return ts;
-+}
-+
- /* Map a TS with negative TS.tv_nsec to {0,0}.  */
- static inline struct timespec
- neg_to_zero (struct timespec ts)
[email protected]@ -874,7 +911,7 @@
- /* Print stat info.  Return zero upon success, nonzero upon failure.  */
- static bool
- print_stat (char *pformat, size_t prefix_len, unsigned int m,
--            char const *filename, void const *data)
-+            int fd, char const *filename, void const *data)
- {
-   struct stat *statbuf = (struct stat *) data;
-   struct passwd *pw_ent;
[email protected]@ -967,7 +1004,7 @@
-       break;
-     case 'w':
-       {
--        struct timespec t = get_stat_birthtime (statbuf);
-+        struct timespec t = get_birthtime (fd, filename, statbuf);
-         if (t.tv_nsec < 0)
-           out_string (pformat, prefix_len, "-");
-         else
[email protected]@ -976,7 +1013,7 @@
-       break;
-     case 'W':
-       out_epoch_sec (pformat, prefix_len, statbuf,
--                     neg_to_zero (get_stat_birthtime (statbuf)));
-+                     neg_to_zero (get_birthtime (fd, filename, statbuf)));
-       break;
-     case 'x':
-       out_string (pformat, prefix_len, human_time (get_stat_atime (statbuf)));
[email protected]@ -1051,9 +1088,9 @@
-    calling PRINT_FUNC for each %-directive encountered.
-    Return zero upon success, nonzero upon failure.  */
- static bool ATTRIBUTE_WARN_UNUSED_RESULT
--print_it (char const *format, char const *filename,
-+print_it (char const *format, int fd, char const *filename,
-           bool (*print_func) (char *, size_t, unsigned int,
--                              char const *, void const *),
-+                              int, char const *, void const *),
-           void const *data)
- {
-   bool fail = false;
[email protected]@ -1102,7 +1139,8 @@
-                 putchar ('%');
-                 break;
-               default:
--                fail |= print_func (dest, len + 1, fmt_code, filename, data);
-+                fail |= print_func (dest, len + 1, fmt_code,
-+                                    fd, filename, data);
-                 break;
-               }
-             break;
[email protected]@ -1185,7 +1223,7 @@
-       return false;
-     }
- 
--  bool fail = print_it (format, filename, print_statfs, &statfsbuf);
-+  bool fail = print_it (format, -1, filename, print_statfs, &statfsbuf);
-   return ! fail;
- }
- 
[email protected]@ -1194,11 +1232,12 @@
- do_stat (char const *filename, char const *format,
-          char const *format2)
- {
-+  int fd = STREQ (filename, "-") ? 0 : -1;
-   struct stat statbuf;
- 
--  if (STREQ (filename, "-"))
-+  if (0 <= fd)
-     {
--      if (fstat (STDIN_FILENO, &statbuf) != 0)
-+      if (fstat (fd, &statbuf) != 0)
-         {
-           error (0, errno, _("cannot stat standard input"));
-           return false;
[email protected]@ -1218,7 +1257,7 @@
-   if (S_ISBLK (statbuf.st_mode) || S_ISCHR (statbuf.st_mode))
-     format = format2;
- 
--  bool fail = print_it (format, filename, print_stat, &statbuf);
-+  bool fail = print_it (format, fd, filename, print_stat, &statbuf);
-   return ! fail;
- }
- 
--- a/components/coreutils/patches/stdbuf-configure.patch	Thu Aug 14 23:47:06 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-Always build stdbuf irrespective of whether this is an ELF system.
-
---- coreutils-8.16/configure.ac.orig	2014-03-18 20:59:59.283886213 -0700
-+++ coreutils-8.16/configure.ac	2014-03-18 21:02:30.881534195 -0700
[email protected]@ -395,16 +395,13 @@
-   gl_ADD_PROG([optional_bin_progs], [df])
- fi
- 
--# Limit stdbuf to ELF systems with GCC
- AC_MSG_CHECKING([whether this is an ELF system])
- AC_EGREP_CPP([yes], [#if __ELF__
- yes
- #endif], [elf_sys=yes], [elf_sys=no])
- AC_MSG_RESULT([$elf_sys])
--if test "$elf_sys" = "yes" && \
--   test "$GCC" = "yes"; then
--  gl_ADD_PROG([optional_bin_progs], [stdbuf])
--fi
-+gl_ADD_PROG([optional_bin_progs], [stdbuf])
-+gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so])
- 
- ############################################################################
- mk="$srcdir/src/Makefile.am"
--- a/components/coreutils/patches/stdbuf.c.patch	Thu Aug 14 23:47:06 2014 -0700
+++ b/components/coreutils/patches/stdbuf.c.patch	Fri Aug 15 07:34:17 2014 -0700
@@ -1,22 +1,22 @@
 Change needed to get stdbuf to successfully preload libstdbuf.so
 for both 32-bit and 64-bit applications.
 
-This change has been passed upstream.
+Since we don't link against libstdbuf.so, we need to LD_PRELOAD it.
+libstdbuf.so lives in /usr/lib and /usr/lib/64, so we just use a
+search path value of "" and that equates to LD_PRELOAD=libstdbuf.so,
+and ld.so.1 finds the right one associated with the process class.
+ie. we don't use full path names for the preload names.
 
---- coreutils-8.16/src/stdbuf.c.orig	2014-05-12 13:48:24.644347899 -0700
-+++ coreutils-8.16/src/stdbuf.c	2014-05-14 09:45:52.507614923 -0700
[email protected]@ -200,6 +200,14 @@
+This change has been passed upstream, but the GNU coreutils maintainer
+turned it into a comment explaining why it's not included by default.
+
+--- src/stdbuf.c.orig	2014-07-30 16:44:53.956056259 -0700
++++ src/stdbuf.c	2014-07-30 16:46:19.570693225 -0700
[email protected]@ -214,6 +214,7 @@
    char const *const search_path[] = {
      program_path,
      PKGLIBEXECDIR,
-+
-+   /* Since we don't link against libstdbuf.so, we need to LD_PRELOAD it.
-+      libstdbuf.so lives in /usr/lib and /usr/lib/64, so we just use a
-+      search path value of "" and that equates to LD_PRELOAD=libstdbuf.so,
-+      and ld.so.1 finds the right one associated with the process class.
-+      ie. we don't use full path names for the preload names.  */
-+
-+    "",              /* System default */
++    "",			/* System default */
      NULL
    };
  
--- a/components/coreutils/patches/tests-misc-expr.patch	Thu Aug 14 23:47:06 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-The tests/misc/expr test is broken by default in version 8.16.
-
-Looking at the ChangeLog for GNU coreutils 8.19, I found:
-
-2012-04-03  Jim Meyering  <[email protected]>
-...
-        tests: avoid spurious misc/expr failure on AIX 6.1
-        * tests/misc/expr: Avoid spurious failure on AIX 6.1 due to
-        differing regexp diagnostic.  Reported by Michael Felt.
-
-If I use the .../tests/misc/expr test script from 8.19, it works fine.
-So I've added the 'tests-misc-expr.patch' file to do just that.
-
----  coreutils-8.16/tests/misc/expr.orig	2012-09-03 07:18:28.214998564 -0700
-+++  coreutils-8.16/tests/misc/expr	2012-09-03 07:22:12.547808280 -0700
[email protected]@ -140,7 +140,11 @@
-      ['bre48', '_ : "a\\{1,x"',
-       {ERR => "$prog: Unmatched \\{\n"}, {EXIT => 2}],
-      ['bre49', '_ : "a\\{32768\\}"',
--      {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2}],
-+      {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2},
-+      # Map AIX-6's different diagnostic to the one we expect:
-+      {ERR_SUBST =>
-+       's,Regular expression too big,Invalid content of \\\\{\\\\},'},
-+      ],
-      ['bre50', '_ : "a\\{1,0\\}"',
-       {ERR => "$prog: Invalid content of \\{\\}\n"}, {EXIT => 2}],
-      ['bre51', '"acabc" : ".*ab\\{0,0\\}c"', {OUT => '2'}],
[email protected]@ -171,7 +175,7 @@
-     );
- 
- # If using big numbers fails, remove all /^bignum-/ tests
--`expr $big_prod '*' $big_prod '*' $big_prod`
-+qx!expr $big_prod '*' $big_prod '*' $big_prod!
-   or @Tests = grep {$_->[0] !~ /^bignum-/} @Tests;
- 
- # Append a newline to end of each expected 'OUT' string.
--- a/components/coreutils/patches/uptime.1.patch	Thu Aug 14 23:47:06 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- coreutils-8.5/man/uptime.1.orig	Tue Nov 22 09:28:45 2011
-+++ coreutils-8.5/man/uptime.1	Tue Nov 22 09:30:49 2011
[email protected]@ -12,7 +12,7 @@
- the number of users on the system, and the average number of jobs
- in the run queue over the last 1, 5 and 15 minutes.  Processes in
- an uninterruptible sleep state also contribute to the load average.
--If FILE is not specified, use /var/run/utmp.  /var/log/wtmp as FILE is common.
-+If FILE is not specified, use /system/volatile/utmpx.  /var/adm/wtmpx as FILE is common.
- .TP
- \fB\-\-help\fR
- display this help and exit
--- a/components/coreutils/patches/who.c.patch	Thu Aug 14 23:47:06 2014 -0700
+++ b/components/coreutils/patches/who.c.patch	Fri Aug 15 07:34:17 2014 -0700
@@ -1,6 +1,12 @@
---- coreutils-8.5/src/who.c.orig	Thu Nov 10 07:54:27 2011
-+++ coreutils-8.5/src/who.c	Thu Nov 10 07:55:13 2011
[email protected]@ -524,8 +524,8 @@
+Needed so that GNU 'who -r' correctly prints the run-level.
+See CR #15651288 for more details.
+
+This patch has not been passed upstream yet. It needs to be reworked into
+a format that would be acceptable.
+
+--- src/who.c.orig	2014-07-27 14:59:42.573346371 -0700
++++ src/who.c	2014-07-27 15:00:16.713849303 -0700
[email protected]@ -514,8 +514,8 @@
    unsigned char curr = UT_PID (utmp_ent) % 256;
  
    if (!runlevline)