Projects
openEuler:22.03:LTS:Next
coreutils
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
_service:tar_scm_kernel_repo:coreutils.spec
Changed
@@ -1,6 +1,6 @@ Name: coreutils Version: 9.0 -Release: 4 +Release: 5 License: GPLv3+ Summary: A set of basic GNU tools commonly used in shell scripts Url: https://www.gnu.org/software/coreutils/ @@ -21,6 +21,9 @@ Patch7: backport-chmod-fix-exit-status-when-ignoring-symlinks.patch Patch8: backport-timeout-ensure-foreground-k-exits-with-status-137.patch Patch9: backport-config-color-alias-for-ls.patch +Patch10: backport-coreutils-i18n.patch +Patch11: backport-sort-fix-sort-g-infloop-again.patch +Patch12: backport-tests-sort-NaN-infloop-augment-testing-for-recent-fi.patch Conflicts: filesystem < 3 # To avoid clobbering installs @@ -142,6 +145,9 @@ %{_mandir}/man*/* %changelog +* Sat Aug 27 2022 zoulin <zoulin13@h-partners.com> - 9.0-5 +- fix 'sort -g' don't meet expectations + * Thu Jul 7 2022 zoulin <zoulin13@h-partners.com> - 9.0-4 - Auto display color difference when use ls
View file
_service:tar_scm_kernel_repo:backport-coreutils-i18n.patch
Added
@@ -0,0 +1,5383 @@ +From d53e5b885b9d82e2d9ba5d65ed8fd9b96712623f Mon Sep 17 00:00:00 2001 +From: rpm-build <rpm-build> +Date: Mon, 4 Oct 2021 08:54:37 +0200 +Subject: [PATCH] coreutils-i18n.patch + +--- + bootstrap.conf | 1 + + configure.ac | 2 + + lib/linebuffer.h | 8 + + lib/mbfile.c | 3 + + lib/mbfile.h | 255 ++++++++++++ + m4/mbfile.m4 | 14 + + src/cut.c | 441 +++++++++++++++++++- + src/expand-common.c | 114 ++++++ + src/expand-common.h | 12 + + src/expand.c | 90 ++++- + src/fold.c | 312 +++++++++++++-- + src/join.c | 359 ++++++++++++++--- + src/local.mk | 4 +- + src/pr.c | 443 +++++++++++++++++++-- + src/sort.c | 772 ++++++++++++++++++++++++++++++++++-- + src/unexpand.c | 101 ++++- + src/uniq.c | 119 +++++- + tests/Coreutils.pm | 3 + + tests/expand/mb.sh | 183 +++++++++ + tests/i18n/sort.sh | 29 ++ + tests/local.mk | 4 + + tests/misc/expand.pl | 42 ++ + tests/misc/fold.pl | 50 ++- + tests/misc/join.pl | 50 +++ + tests/misc/sort-mb-tests.sh | 45 +++ + tests/misc/sort-merge.pl | 42 ++ + tests/misc/sort.pl | 40 +- + tests/misc/unexpand.pl | 39 ++ + tests/misc/uniq.pl | 55 +++ + tests/pr/pr-tests.pl | 49 +++ + tests/unexpand/mb.sh | 172 ++++++++ + 31 files changed, 3640 insertions(+), 213 deletions(-) + create mode 100644 lib/mbfile.c + create mode 100644 lib/mbfile.h + create mode 100644 m4/mbfile.m4 + create mode 100755 tests/expand/mb.sh + create mode 100755 tests/i18n/sort.sh + create mode 100755 tests/misc/sort-mb-tests.sh + create mode 100755 tests/unexpand/mb.sh + +diff --git a/bootstrap.conf b/bootstrap.conf +index aef9ec7..9486e9d 100644 +--- a/bootstrap.conf ++++ b/bootstrap.conf +@@ -156,6 +156,7 @@ gnulib_modules=" + maintainer-makefile + malloc-gnu + manywarnings ++ mbfile + mbrlen + mbrtowc + mbsalign +diff --git a/configure.ac b/configure.ac +index 6960b48..8ff85f8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -457,6 +457,8 @@ fi + # I'm leaving it here for now. This whole thing needs to be modernized... + gl_WINSIZE_IN_PTEM + ++gl_MBFILE ++ + gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H + + if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \ +diff --git a/lib/linebuffer.h b/lib/linebuffer.h +index 5fa5ad2..2bdbcab 100644 +--- a/lib/linebuffer.h ++++ b/lib/linebuffer.h +@@ -22,6 +22,11 @@ + # include "idx.h" + # include <stdio.h> + ++/* Get mbstate_t. */ ++# if HAVE_WCHAR_H ++# include <wchar.h> ++# endif ++ + /* A 'struct linebuffer' holds a line of text. */ + + struct linebuffer +@@ -29,6 +34,9 @@ struct linebuffer + idx_t size; /* Allocated. */ + idx_t length; /* Used. */ + char *buffer; ++# if HAVE_WCHAR_H ++ mbstate_t state; ++# endif + }; + + /* Initialize linebuffer LINEBUFFER for use. */ +diff --git a/lib/mbfile.c b/lib/mbfile.c +new file mode 100644 +index 0000000..b0a468e +--- /dev/null ++++ b/lib/mbfile.c +@@ -0,0 +1,3 @@ ++#include <config.h> ++#define MBFILE_INLINE _GL_EXTERN_INLINE ++#include "mbfile.h" +diff --git a/lib/mbfile.h b/lib/mbfile.h +new file mode 100644 +index 0000000..11f1b12 +--- /dev/null ++++ b/lib/mbfile.h +@@ -0,0 +1,255 @@ ++/* Multibyte character I/O: macros for multi-byte encodings. ++ Copyright (C) 2001, 2005, 2009-2015 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/>. */ ++ ++/* Written by Mitsuru Chinen <mchinen@yamato.ibm.com> ++ and Bruno Haible <bruno@clisp.org>. */ ++ ++/* The macros in this file implement multi-byte character input from a ++ stream. ++ ++ mb_file_t ++ is the type for multibyte character input stream, usable for variable ++ declarations. ++ ++ mbf_char_t ++ is the type for multibyte character or EOF, usable for variable ++ declarations. ++ ++ mbf_init (mbf, stream) ++ initializes the MB_FILE for reading from stream. ++ ++ mbf_getc (mbc, mbf) ++ reads the next multibyte character from mbf and stores it in mbc. ++ ++ mb_iseof (mbc) ++ returns true if mbc represents the EOF value. ++ ++ Here are the function prototypes of the macros. ++ ++ extern void mbf_init (mb_file_t mbf, FILE *stream); ++ extern void mbf_getc (mbf_char_t mbc, mb_file_t mbf); ++ extern bool mb_iseof (const mbf_char_t mbc); ++ */ ++ ++#ifndef _MBFILE_H ++#define _MBFILE_H 1 ++ ++#include <assert.h> ++#include <stdbool.h> ++#include <stdio.h> ++#include <string.h> ++ ++/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before ++ <wchar.h>. ++ BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before ++ <wchar.h>. */ ++#include <stdio.h> ++#include <time.h> ++#include <wchar.h> ++ ++#include "mbchar.h" ++ ++#ifndef _GL_INLINE_HEADER_BEGIN ++ #error "Please include config.h first." ++#endif ++_GL_INLINE_HEADER_BEGIN ++#ifndef MBFILE_INLINE ++# define MBFILE_INLINE _GL_INLINE ++#endif ++ ++struct mbfile_multi { ++ FILE *fp; ++ bool eof_seen; ++ bool have_pushback; ++ mbstate_t state; ++ unsigned int bufcount; ++ char buf[MBCHAR_BUF_SIZE]; ++ struct mbchar pushback; ++}; ++ ++MBFILE_INLINE void ++mbfile_multi_getc (struct mbchar *mbc, struct mbfile_multi *mbf) ++{ ++ size_t bytes; ++
View file
_service:tar_scm_kernel_repo:backport-sort-fix-sort-g-infloop-again.patch
Added
@@ -0,0 +1,57 @@ +From 2f56f5a42033dc6db15d8963e54566f01fa0d61d Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Sun, 1 May 2022 22:46:21 -0700 +Subject: [PATCH] sort: fix sort -g infloop again + +Problem reported by Giulio Genovese (Bug#55212). +* src/sort.c (nan_compare): To compare NaNs, simply printf+strcmp. +This avoids the problem of padding bits and unspecified behavior. +Args are now long double instead of char *; caller changed. +--- + src/sort.c | 21 ++++++--------------- + 1 files changed, 6 insertions(+), 15 deletions(-) + +diff --git a/src/sort.c b/src/sort.c +index 3b775d6bb..b2a465cf5 100644 +--- a/src/sort.c ++++ b/src/sort.c +@@ -2359,22 +2359,13 @@ numcompare (char const *a, char const *b) + } + #endif /* HAV_EMBRTOWC */ + +-/* Work around a problem whereby the long double value returned by glibc's +- strtold ("NaN", ...) contains uninitialized bits: clear all bytes of +- A and B before calling strtold. FIXME: remove this function if +- gnulib guarantees that strtold's result is always well defined. */ + static int +-nan_compare (char const *sa, char const *sb) ++nan_compare (long double a, long double b) + { +- long double a; +- memset (&a, 0, sizeof a); +- a = strtold (sa, NULL); +- +- long double b; +- memset (&b, 0, sizeof b); +- b = strtold (sb, NULL); +- +- return memcmp (&a, &b, sizeof a); ++ char buf[2][sizeof "-nan()" + CHAR_BIT * sizeof a]; ++ snprintf (buf[0], sizeof buf[0], "%Lf", a); ++ snprintf (buf[1], sizeof buf[1], "%Lf", b); ++ return strcmp (buf[0], buf[1]); + } + + static int +@@ -2402,7 +2393,7 @@ general_numcompare (char const *sa, char const *sb) + : a == b ? 0 + : b == b ? -1 + : a == a ? 1 +- : nan_compare (sa, sb)); ++ : nan_compare (a, b)); + } + + /* Return an integer in 1..12 of the month name MONTH. +-- +2.27.0 +
View file
_service:tar_scm_kernel_repo:backport-tests-sort-NaN-infloop-augment-testing-for-recent-fi.patch
Added
@@ -0,0 +1,43 @@ +From ddafdae21c574b1dcd5c56e403c82010e7ed3565 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com> +Date: Mon, 2 May 2022 14:27:34 +0100 +Subject: [PATCH] tests: sort-NaN-infloop: augment testing for recent fix + +* tests/misc/sort-NaN-infloop.sh: Add test case from +https://unix.stackexchange.com/a/700967/37127 +* src/sort.c: Avoid syntax-check failure. +--- + src/sort.c | 2 +- + tests/misc/sort-NaN-infloop.sh | 3 +++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/sort.c b/src/sort.c +index b2a465cf5..8af356c66 100644 +--- a/src/sort.c ++++ b/src/sort.c +@@ -2006,7 +2006,7 @@ numcompare (char const *a, char const *b) + static int + nan_compare (long double a, long double b) + { +- char buf[2][sizeof "-nan()" + CHAR_BIT * sizeof a]; ++ char buf[2][sizeof "-nan""()" + CHAR_BIT * sizeof a]; + snprintf (buf[0], sizeof buf[0], "%Lf", a); + snprintf (buf[1], sizeof buf[1], "%Lf", b); + return strcmp (buf[0], buf[1]); +diff --git a/tests/misc/sort-NaN-infloop.sh b/tests/misc/sort-NaN-infloop.sh +index 93cf9bd77..cc1c583cd 100755 +--- a/tests/misc/sort-NaN-infloop.sh ++++ b/tests/misc/sort-NaN-infloop.sh +@@ -23,6 +23,9 @@ echo nan > F || framework_failure_ + printf 'nan\nnan\n' > exp || framework_failure_ + timeout 10 sort -g -m F F > out || fail=1 + ++# This was seen to infloop on some systems until coreutils v9.2 (bug 55212) ++yes nan | head -n128095 | timeout 60 sort -g > /dev/null || fail=1 ++ + compare exp out || fail=1 + + Exit $fail +-- +2.27.0 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.