PSARC 2012/170 GNU coreutils 8.16 s11-update
authorRich Burridge <rich.burridge@oracle.com>
Mon, 22 Oct 2012 13:49:38 -0700
branchs11-update
changeset 2399 20c46127e17a
parent 2398 54c1297f2b4b
child 2400 18f17c3a33c1
PSARC 2012/170 GNU coreutils 8.16 PSARC 2012/291 Remove /usr/gnu/bin/whoami 7161373 Update coreutils to version 8.16 7177497 Remove GNU version of whoami in /usr/gnu/bin
components/coreutils/Makefile
components/coreutils/coreutils.p5m
components/coreutils/patches/configure.patch
components/coreutils/patches/coreutils-8_5.patch
components/coreutils/patches/manpages.patch
components/coreutils/patches/mountlist.c.patch
components/coreutils/patches/tests-misc-expr.patch
--- a/components/coreutils/Makefile	Mon Oct 22 12:26:34 2012 -0700
+++ b/components/coreutils/Makefile	Mon Oct 22 13:49:38 2012 -0700
@@ -23,12 +23,12 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		coreutils
-COMPONENT_VERSION=	8.5
+COMPONENT_VERSION=	8.16
 COMPONENT_PROJECT_URL=	http://www.gnu.org/software/coreutils/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:dd243e2ac7d0ed203b170ecfb8299643779e7501fec2b45ae1cea8a450fa8ca0
+    sha256:2a458fead15d9336f46bb4304cc3eaa6ed9407b9130e7ee2ec533909881d2067
 COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/coreutils/$(COMPONENT_ARCHIVE)
 
 include ../../make-rules/prep.mk
@@ -44,12 +44,20 @@
 # common targets
 build:		$(BUILD_32)
 
-#
-# whoami is in both /usr/bin and /usr/gnu/bin; mistake?
-#
 install:	$(INSTALL_32)
 
-test:		$(TEST_32)
+# Needed for "gmake test" to work successfully.
+# If SHELLOPTS is exported (as it is by the userland makefiles),
+# then all shell options get exported to child invocations of bash,
+# which results in test failures due to nounset and xtrace being
+# set unexpectedly, and errors such as "$1: unbound variable" and
+# diffs failing due to script tracing in output files.
+unexport SHELLOPTS
+
+# Get the binaries to test from the component proto area.
+COMPONENT_TEST_ENV +=   PATH=$(PROTOUSRSBINDIR):/usr/bin
+
+test:		install $(TEST_32)
 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
 
--- a/components/coreutils/coreutils.p5m	Mon Oct 22 12:26:34 2012 -0700
+++ b/components/coreutils/coreutils.p5m	Mon Oct 22 13:49:38 2012 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
@@ -64,9 +64,9 @@
 dir path=usr/gnu/share/locale/el
 dir path=usr/gnu/share/locale/el/LC_MESSAGES
 dir path=usr/gnu/share/locale/el/LC_TIME
-dir path=usr/gnu/share/locale/en
-dir path=usr/gnu/share/locale/en/LC_MESSAGES
-dir path=usr/gnu/share/locale/en/LC_TIME
+dir path=usr/gnu/share/locale/eo
+dir path=usr/gnu/share/locale/eo/LC_MESSAGES
+dir path=usr/gnu/share/locale/eo/LC_TIME
 dir path=usr/gnu/share/locale/es
 dir path=usr/gnu/share/locale/es/LC_MESSAGES
 dir path=usr/gnu/share/locale/es/LC_TIME
@@ -100,6 +100,9 @@
 dir path=usr/gnu/share/locale/ja
 dir path=usr/gnu/share/locale/ja/LC_MESSAGES
 dir path=usr/gnu/share/locale/ja/LC_TIME
+dir path=usr/gnu/share/locale/kk
+dir path=usr/gnu/share/locale/kk/LC_MESSAGES
+dir path=usr/gnu/share/locale/kk/LC_TIME
 dir path=usr/gnu/share/locale/ko
 dir path=usr/gnu/share/locale/ko/LC_MESSAGES
 dir path=usr/gnu/share/locale/ko/LC_TIME
@@ -173,6 +176,7 @@
 file usr/gnu/bin/printenv path=usr/bin/printenv
 file usr/gnu/bin/ptx path=usr/bin/ptx
 file usr/gnu/bin/readlink path=usr/bin/readlink
+file usr/gnu/bin/realpath path=usr/bin/realpath
 file usr/gnu/bin/seq path=usr/bin/seq
 file usr/gnu/bin/sha1sum path=usr/bin/sha1sum
 file usr/gnu/bin/sha224sum path=usr/bin/sha224sum
@@ -262,7 +266,6 @@
 file path=usr/gnu/bin/uptime
 file path=usr/gnu/bin/wc
 file path=usr/gnu/bin/who
-file path=usr/gnu/bin/whoami
 file path=usr/gnu/bin/yes
 file path=usr/gnu/share/locale/af/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/be/LC_MESSAGES/coreutils.mo
@@ -272,7 +275,7 @@
 file path=usr/gnu/share/locale/da/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/de/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/el/LC_MESSAGES/coreutils.mo
-file path=usr/gnu/share/locale/en/LC_MESSAGES/coreutils.mo
+file path=usr/gnu/share/locale/eo/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/es/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/et/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/eu/LC_MESSAGES/coreutils.mo
@@ -284,6 +287,7 @@
 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
+file path=usr/gnu/share/locale/kk/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/ko/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/lg/LC_MESSAGES/coreutils.mo
 file path=usr/gnu/share/locale/lt/LC_MESSAGES/coreutils.mo
@@ -375,9 +379,8 @@
 file path=usr/gnu/share/man/man1/uptime.1
 file path=usr/gnu/share/man/man1/wc.1
 file path=usr/gnu/share/man/man1/who.1
-file path=usr/gnu/share/man/man1/whoami.1
 file path=usr/gnu/share/man/man1/yes.1
-file usr/lib/coreutils/libstdbuf.so path=usr/lib/libstdbuf.so
+file usr/gnu/libexec/coreutils/libstdbuf.so path=usr/lib/libstdbuf.so
 file path=usr/share/info/coreutils.info
 file usr/gnu/share/man/man1/base64.1 path=usr/share/man/man1/base64.1
 file usr/gnu/share/man/man1/dir.1 path=usr/share/man/man1/dir.1
@@ -388,6 +391,7 @@
 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
 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
@@ -421,7 +425,7 @@
     target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/el/LC_TIME/coreutils.mo \
     target=../LC_MESSAGES/coreutils.mo
-link path=usr/gnu/share/locale/en/LC_TIME/coreutils.mo \
+link path=usr/gnu/share/locale/eo/LC_TIME/coreutils.mo \
     target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/es/LC_TIME/coreutils.mo \
     target=../LC_MESSAGES/coreutils.mo
@@ -445,6 +449,8 @@
     target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/ja/LC_TIME/coreutils.mo \
     target=../LC_MESSAGES/coreutils.mo
+link path=usr/gnu/share/locale/kk/LC_TIME/coreutils.mo \
+    target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/ko/LC_TIME/coreutils.mo \
     target=../LC_MESSAGES/coreutils.mo
 link path=usr/gnu/share/locale/lg/LC_TIME/coreutils.mo \
@@ -628,8 +634,6 @@
     target=../gnu/bin/wc facet.compat.gnulinks=true
 link path=usr/bin/gwho \
     target=../gnu/bin/who facet.compat.gnulinks=true
-link path=usr/bin/gwhoami \
-    target=../gnu/bin/whoami facet.compat.gnulinks=true
 link path=usr/bin/gyes \
     target=../gnu/bin/yes facet.compat.gnulinks=true
 
@@ -777,7 +781,5 @@
     target=../../../gnu/share/man/man1/wc.1 facet.compat.gnulinks=true
 link path=usr/share/man/man1/gwho.1 \
     target=../../../gnu/share/man/man1/who.1 facet.compat.gnulinks=true
-link path=usr/share/man/man1/gwhoami.1 \
-    target=../../../gnu/share/man/man1/whoami.1 facet.compat.gnulinks=true
 link path=usr/share/man/man1/gyes.1 \
     target=../../../gnu/share/man/man1/yes.1 facet.compat.gnulinks=true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/coreutils/patches/configure.patch	Mon Oct 22 13:49:38 2012 -0700
@@ -0,0 +1,37 @@
+--- coreutils-8.16/configure.orig	2012-04-18 07:35:04.318609521 -0700
++++ coreutils-8.16/configure	2012-04-18 07:36:27.319985971 -0700
[email protected]@ -62005,7 +62005,6 @@
+ }
+ fi
+ 
+-# Limit stdbuf to ELF systems with GCC
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is an ELF system" >&5
+ $as_echo_n "checking whether this is an ELF system... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
[email protected]@ -62024,15 +62023,17 @@
+ 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $elf_sys" >&5
+ $as_echo "$elf_sys" >&6; }
+-if test "$elf_sys" = "yes" && \
+-   test "$GCC" = "yes"; then
+-  {
+-  if test -z "$optional_bin_progs"; then
+-    optional_bin_progs=stdbuf
+-  else
+-    optional_bin_progs="$optional_bin_progs stdbuf"
+-  fi
+-}
++
++if test -z "$optional_bin_progs"; then
++  optional_bin_progs=stdbuf
++else
++  optional_bin_progs="$optional_bin_progs stdbuf"
++ fi
++
++if test -z "$optional_pkglib_progs"; then
++  optional_pkglib_progs=libstdbuf.so
++else
++  optional_pkglib_progs="$optional_pkglib_progs libstdbuf.so"
+ fi
+ 
+ ############################################################################
--- a/components/coreutils/patches/coreutils-8_5.patch	Mon Oct 22 12:26:34 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
---- coreutils-8.5/configure_orig	2011-02-08 16:13:56.850317000 -0800
-+++ coreutils-8.5/configure	2011-02-08 16:14:04.872411000 -0800
[email protected]@ -53254,11 +53254,10 @@
-     optional_bin_progs="$optional_bin_progs df"
-   fi
- }
- fi
- 
--# Limit stdbuf to ELF systems with GCC
- optional_pkglib_progs=
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is an ELF system" >&5
- $as_echo_n "checking whether this is an ELF system... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
[email protected]@ -53274,28 +53273,24 @@
- fi
- rm -f conftest*
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $elf_sys" >&5
- $as_echo "$elf_sys" >&6; }
--if test "$elf_sys" = "yes" && \
--   test "$GCC" = "yes"; then
--  {
--  if test -z "$optional_bin_progs"; then
--    optional_bin_progs=stdbuf
--  else
--    optional_bin_progs="$optional_bin_progs stdbuf"
--  fi
--}
--  {
--  if test -z "$optional_pkglib_progs"; then
--    optional_pkglib_progs=libstdbuf.so
--  else
--    optional_pkglib_progs="$optional_pkglib_progs libstdbuf.so"
--  fi
--}
-+
-+if test -z "$optional_bin_progs"; then
-+  optional_bin_progs=stdbuf
-+else
-+  optional_bin_progs="$optional_bin_progs stdbuf"
- fi
- 
-+if test -z "$optional_pkglib_progs"; then
-+  optional_pkglib_progs=libstdbuf.so
-+else
-+  optional_pkglib_progs="$optional_pkglib_progs libstdbuf.so"
-+fi
-+
-+
- ############################################################################
- mk="$srcdir/src/Makefile.am"
- # Extract all literal names from the definition of $(EXTRA_PROGRAMS)
- # in $mk but don't expand the variable references.
- # Append each literal name to $optional_bin_progs.
--- a/components/coreutils/patches/manpages.patch	Mon Oct 22 12:26:34 2012 -0700
+++ b/components/coreutils/patches/manpages.patch	Mon Oct 22 13:49:38 2012 -0700
@@ -70,7 +70,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"
--\fBrev\fP(1).
+-\fBrev\fP(1)
 -.PP
  The full documentation for
  .B tac
--- a/components/coreutils/patches/mountlist.c.patch	Mon Oct 22 12:26:34 2012 -0700
+++ b/components/coreutils/patches/mountlist.c.patch	Mon Oct 22 13:49:38 2012 -0700
@@ -1,26 +1,17 @@
-*** coreutils-8.5/lib/mountlist.c.orig	Wed Nov  9 06:19:54 2011
---- coreutils-8.5/lib/mountlist.c	Wed Nov  9 07:25:30 2011
-***************
-*** 157,166 ****
-  #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 `//').  */
-  # define ME_REMOTE(Fs_name, Fs_type)            \
-!     (strchr (Fs_name, ':') != NULL              \
-       || ((Fs_name)[0] == '/'                    \
-           && (Fs_name)[1] == '/'                 \
-           && (strcmp (Fs_type, "smbfs") == 0     \
---- 157,167 ----
-  #endif
-  
-  #ifndef ME_REMOTE
-! /* 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 && strcmp (Fs_type, "pcfs") != 0) \
-       || ((Fs_name)[0] == '/'                    \
-           && (Fs_name)[1] == '/'                 \
-           && (strcmp (Fs_type, "smbfs") == 0     \
+--- 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 @@
+ #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 `//').  */
+ # define ME_REMOTE(Fs_name, Fs_type)            \
+-    (strchr (Fs_name, ':') != NULL              \
++    ((strchr (Fs_name, ':') != NULL && strcmp (Fs_type, "pcfs") != 0) \
+      || ((Fs_name)[0] == '/'                    \
+          && (Fs_name)[1] == '/'                 \
+          && (strcmp (Fs_type, "smbfs") == 0     \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/coreutils/patches/tests-misc-expr.patch	Mon Oct 22 13:49:38 2012 -0700
@@ -0,0 +1,24 @@
+---  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.