summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/coreutils/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/coreutils/coreutils')
-rw-r--r--meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch26
-rw-r--r--meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch64
-rw-r--r--meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch49
-rw-r--r--meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch39
-rw-r--r--meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch31
-rw-r--r--meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch56
6 files changed, 265 insertions, 0 deletions
diff --git a/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch b/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
new file mode 100644
index 0000000000..66f9a716c9
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/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/0001-uname-report-processor-and-hardware-correctly.patch b/meta/recipes-core/coreutils/coreutils/0001-uname-report-processor-and-hardware-correctly.patch
new file mode 100644
index 0000000000..3c43e1d5da
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/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/disable-ls-output-quoting.patch b/meta/recipes-core/coreutils/coreutils/disable-ls-output-quoting.patch
new file mode 100644
index 0000000000..e68c213550
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/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/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils/fix-selinux-flask.patch
new file mode 100644
index 0000000000..9d1ae55d47
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/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/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch
new file mode 100644
index 0000000000..2ef8a548ac
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/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/strtod_fix_clash_with_strtold.patch b/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch
new file mode 100644
index 0000000000..77770093cd
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch
@@ -0,0 +1,56 @@
+From 0562b040fa17f1722ba2b3096067b45d0582ca53 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Mon, 11 Mar 2019 16:40:29 -0700
+Subject: [PATCH] strtod: fix clash with strtold
+
+Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
+* lib/strtod.c (compute_minus_zero, minus_zero):
+Simplify by remving the macro / external variable,
+and having just a function. User changed. This avoids
+the need for an external variable that might clash.
+
+Upstream-Status: Backport [rhel5]
+
+Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
+
+---
+ ChangeLog | 9 +++++++++
+ lib/strtod.c | 11 +++++------
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/lib/strtod.c b/lib/strtod.c
+index b9eaa51b4..69b1564e1 100644
+--- a/lib/strtod.c
++++ b/lib/strtod.c
+@@ -294,16 +294,15 @@ parse_number (const char *nptr,
+ ICC 10.0 has a bug when optimizing the expression -zero.
+ The expression -MIN * MIN does not work when cross-compiling
+ to PowerPC on Mac OS X 10.5. */
+-#if defined __hpux || defined __sgi || defined __ICC
+ static DOUBLE
+-compute_minus_zero (void)
++minus_zero (void)
+ {
++#if defined __hpux || defined __sgi || defined __ICC
+ return -MIN * MIN;
+-}
+-# define minus_zero compute_minus_zero ()
+ #else
+-DOUBLE minus_zero = -0.0;
++ return -0.0;
+ #endif
++}
+
+ /* Convert NPTR to a DOUBLE. If ENDPTR is not NULL, a pointer to the
+ character after the last one used in the number is put in *ENDPTR. */
+@@ -479,6 +478,6 @@ STRTOD (const char *nptr, char **endptr)
+ /* Special case -0.0, since at least ICC miscompiles negation. We
+ can't use copysign(), as that drags in -lm on some platforms. */
+ if (!num && negative)
+- return minus_zero;
++ return minus_zero ();
+ return negative ? -num : num;
+ }
+--
+2.20.1
+