coreutils: 8.31 -> 8.32

This commit is contained in:
Tim Steinbach 2020-10-17 17:03:05 -04:00
parent 347696a30b
commit d14a910029
No known key found for this signature in database
GPG Key ID: FD36A5EAAC49035A
4 changed files with 3 additions and 1266 deletions

View File

@ -1,52 +0,0 @@
From 0251229bfd9617e8a35cf9dd7d338d63fff74a0c Mon Sep 17 00:00:00 2001
From: Assaf Gordon <assafgordon@gmail.com>
Date: Mon, 13 May 2019 16:37:40 -0600
Subject: [PATCH] tests: avoid false-positive in date-debug test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When debugging an invalid date due to DST switching, the intermediate
'normalized time' should not be checked - its value can differ between
systems (e.g. glibc vs musl).
Reported by Niklas Hambüchen in
https://lists.gnu.org/r/coreutils/2019-05/msg00031.html
Analyzed by Rich Felker in
https://lists.gnu.org/r/coreutils/2019-05/msg00039.html
* tests/misc/date-debug.sh: Replace the exact normalized time
with 'XX:XX:XX' so different values would not trigger test failure.
---
tests/misc/date-debug.sh | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/misc/date-debug.sh b/tests/misc/date-debug.sh
index aa47f1abb..2ce6f4ce8 100755
--- a/tests/misc/date-debug.sh
+++ b/tests/misc/date-debug.sh
@@ -71,7 +71,7 @@ date: input timezone: TZ="America/Edmonton" in date string
date: using specified time as starting value: '02:30:00'
date: error: invalid date/time value:
date: user provided time: '(Y-M-D) 2006-04-02 02:30:00'
-date: normalized time: '(Y-M-D) 2006-04-02 03:30:00'
+date: normalized time: '(Y-M-D) 2006-04-02 XX:XX:XX'
date: --
date: possible reasons:
date: non-existing due to daylight-saving time;
@@ -81,7 +81,14 @@ date: invalid date 'TZ="America/Edmonton" 2006-04-02 02:30:00'
EOF
# date should return 1 (error) for invalid date
-returns_ 1 date --debug -d "$in2" >out2 2>&1 || fail=1
+returns_ 1 date --debug -d "$in2" >out2-t 2>&1 || fail=1
+
+# The output line of "normalized time" can differ between systems
+# (e.g. glibc vs musl) and should not be checked.
+# See: https://lists.gnu.org/archive/html/coreutils/2019-05/msg00039.html
+sed '/normalized time:/s/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/ XX:XX:XX/' \
+ out2-t > out2 || framework_failure_
+
compare exp2 out2 || fail=1
##

View File

@ -1,51 +0,0 @@
From 3bd82a82cf4ba693d2c31c7b95aaec4e56dc92a4 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 1/1] 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.
---
ChangeLog | 9 +++++++++
lib/strtod.c | 11 +++++------
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/lib/strtod.c b/lib/strtod.c
index b9eaa51..69b1564 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;
}
--
1.9.1

File diff suppressed because it is too large Load Diff

View File

@ -22,21 +22,14 @@ with lib;
stdenv.mkDerivation (rec {
pname = "coreutils";
version = "8.31";
version = "8.32";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz";
sha256 = "sha256-RFjY3nhJ30TMqxXhaxVIsoUiTbul8I+sBwwcDgvMTPo=";
};
patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch
# Fix failing test with musl. See https://lists.gnu.org/r/coreutils/2019-05/msg00031.html
# To be removed in coreutils-8.32.
++ optional stdenv.hostPlatform.isMusl ./avoid-false-positive-in-date-debug-test.patch
# Fix compilation in musl-cross environments. To be removed in coreutils-8.32.
++ optional stdenv.hostPlatform.isMusl ./coreutils-8.31-musl-cross.patch
# Fix compilation in android-cross environments. To be removed in coreutils-8.32.
++ [ ./coreutils-8.31-android-cross.patch ];
patches = optional stdenv.hostPlatform.isCygwin ./coreutils-8.23-4.cygwin.patch;
postPatch = ''
# The test tends to fail on btrfs,f2fs and maybe other unusual filesystems.