commit a296bffe53c6183278b8f01ebed47099a30d5d2ce6521603223fa62715471528 Author: Bernhard Voelker Date: Wed Jul 10 21:09:17 2024 +0000 - coreutils-i18n.patch: fold(1): fix exit code for non-existent file. The exit code of fold(1) was zero for non-existent file: $ fold badfile; echo $? fold: badfile: No such file or directory 0 * coreutils-i18n.patch (src/fold.c:fold_file): Fix incorrect return code for non-existent files; the I18N patch incorrectly returned an integer instead of a bool on failure. While at it, also fix the assignment to 'have_read_stdin' to bool. The bug was introduced by the downstrean I18N patch. (rhbz#2296201) Based on patch by Sohum Mendon . OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=364 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..404121f --- /dev/null +++ b/_multibuild @@ -0,0 +1,5 @@ + + systemd + single + testsuite + diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..5b642b4 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,3 @@ +targettype x86 package coreutils + +^/bin/uname$ + prereq -glibc-x86 diff --git a/coreutils-9.5.tar.xz b/coreutils-9.5.tar.xz new file mode 100644 index 0000000..63773fa --- /dev/null +++ b/coreutils-9.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd328edeac92f6a665de9f323c93b712af1858bc2e0d88f3f7100469470a1b8a +size 6007136 diff --git a/coreutils-9.5.tar.xz.sig b/coreutils-9.5.tar.xz.sig new file mode 100644 index 0000000..6607e1a --- /dev/null +++ b/coreutils-9.5.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEbDfcEhIaUAa8HbgE32/ZcTBgN9kFAmYFirgACgkQ32/ZcTBg +N9nZMg//WF6fyy6kxNZJIeUnAzAyMhY5hjlD33hFSaj2ihfmt7IQzRuOu7bhYk94 +5lpDJvfljubJpuAU15MD0g/7xdRVPEf/igkRqdvm79eWips1c8d7HfcorxqJcYKf +40JV0rQyDaMqQbqFl6rPipAaagE3GBSdHz3eNVhiEQ9MII/XKNX7dZ/5MBIUW/wl +VM7G7sA4WBh0k+K0fGNALrlFHSmQDqwVIVhuDlFNcVmY37NIsIcvIT910HlKTFWV +A5okdepRs9a2dOIhGvMVK/U+4D9vbVbS+QlnXH74UlmnczKPQsCQKsusG02bv9L0 +ih+jFj9BVCoUjB1fQlo6/VE4Kvdhpg/NZKZCaKIEH0d4mn1XHqvyTTRN0SVOlJr8 +ZmY7e94A5TDbpkt5MFPxZ6M1Z5dZTtVX2/rkQtb59jIr/p5eYmjId3NsjWtoXICo +XMr+hLtjMt/XIfN/eXnaSOZSoyNxOPurfe59hfjVhaexCeIrEIglZmYWw8HhkfWz +vAxGWOFVwYfWlWlfxggdYkysRvU0vUb1JhO8HIRwmCX05YEhvTwKZMnvo/z/Y++G +CrXyduj9e8jzRkunlU6mqFmHqaYrgt5t7e1PLFYxEgWBX77fvpSbBsLhX5nH2c6I +4uRaQpaZQ+hnYu7U5OHfhy1OwG2qcYjbou4zK4BuI1ktnBHFgbc= +=IhBg +-----END PGP SIGNATURE----- diff --git a/coreutils-build-timeout-as-pie.patch b/coreutils-build-timeout-as-pie.patch new file mode 100644 index 0000000..0633f3e --- /dev/null +++ b/coreutils-build-timeout-as-pie.patch @@ -0,0 +1,39 @@ +From d1a49cccf99373293a88f5bce74857d5bb813e46 Mon Sep 17 00:00:00 2001 +From: Bernhard Voelker +Date: Thu, 10 Jan 2013 09:21:22 +0200 +Subject: build timeout as PIE + +The OBS requires /usr/bin/timeout to be built as an position +independent executable (PIE). This is enforced via RPMLINT. + +* src/local.mk (AM_CFLAGS): Add -fpie option. +(timeout_CFLAGS): Likewise. +(timeout_LDFLAGS): Add -pie option. + +--- + src/local.mk | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: src/local.mk +=================================================================== +--- src/local.mk.orig ++++ src/local.mk +@@ -17,7 +17,7 @@ + ## along with this program. If not, see . + + # FIXME: once lib/ and gnulib-tests/ are also converted, hoist to Makefile.am +-AM_CFLAGS = $(WERROR_CFLAGS) ++AM_CFLAGS = $(WERROR_CFLAGS) -fpie + + # The list of all programs (separated in different variables to express + # the how and when they should be installed) is defined in this makefile +@@ -280,6 +280,9 @@ src_factor_LDADD += $(LIB_GMP) + # for getloadavg + src_uptime_LDADD += $(GETLOADAVG_LIBS) + ++src_timeout_CFLAGS = -fpie ++src_timeout_LDFLAGS = -pie ++ + # for various ACL functions + copy_ldadd += $(LIB_ACL) + src_ls_LDADD += $(LIB_HAS_ACL) diff --git a/coreutils-disable_tests.patch b/coreutils-disable_tests.patch new file mode 100644 index 0000000..ad68a23 --- /dev/null +++ b/coreutils-disable_tests.patch @@ -0,0 +1,23 @@ +--- + gnulib-tests/gnulib.mk | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: gnulib-tests/gnulib.mk +=================================================================== +--- gnulib-tests/gnulib.mk.orig ++++ gnulib-tests/gnulib.mk +@@ -1473,10 +1473,10 @@ EXTRA_DIST += test-getloadavg.c signatur + + ## begin gnulib module getlogin-tests + +-TESTS += test-getlogin +-check_PROGRAMS += test-getlogin +-test_getlogin_LDADD = $(LDADD) $(GETLOGIN_LIB) +-EXTRA_DIST += test-getlogin.c test-getlogin.h signature.h macros.h ++# TESTS += test-getlogin ++# check_PROGRAMS += test-getlogin ++# test_getlogin_LDADD = $(LDADD) $(GETLOGIN_LIB) ++# EXTRA_DIST += test-getlogin.c test-getlogin.h signature.h macros.h + + ## end gnulib module getlogin-tests + diff --git a/coreutils-fix-gnulib-time_r-tests.patch b/coreutils-fix-gnulib-time_r-tests.patch new file mode 100644 index 0000000..d8036d3 --- /dev/null +++ b/coreutils-fix-gnulib-time_r-tests.patch @@ -0,0 +1,95 @@ +2 upstream gnulib commits for coreutils-9.5 to skip localtime_r tests +when the timezone 'Europe/Paris' does not work. + +Commit 1: + http://git.sv.gnu.org/cgit/gnulib.git/commit/?id=f130f5426ecd4edd559 + +From f130f5426ecd4edd5596797e0a5721b927f80126 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sat, 30 Mar 2024 13:28:01 -0600 +Subject: [PATCH 1/2] time_r-tests: skip French tests if no Europe/Paris + +* tests/test-localtime_r.c (main): +* tests/test-localtime_r-mt.c (main): +If TZ='Europe/Paris' does not work, skip these tests. + +Commit 2: + http://git.sv.gnu.org/cgit/gnulib.git/commit/?id=2c04db80e2c52b8f05b + +From 2c04db80e2c52b8f05b4136af955510e7d370470 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sat, 30 Mar 2024 22:50:39 +0100 +Subject: [PATCH 2/2] time_r tests: Avoid misleading skip message on native + Windows. + +* tests/test-localtime_r.c (main): Use the macro FRENCH_TZ. +* tests/test-localtime_r-mt.c (main): Likewise. +--- + gnulib-tests/test-localtime_r-mt.c | 21 +++++++++++++++++++++ + gnulib-tests/test-localtime_r.c | 21 +++++++++++++++++++++ + 2 files changed, 42 insertions(+) + +Index: gnulib-tests/test-localtime_r-mt.c +=================================================================== +--- gnulib-tests/test-localtime_r-mt.c.orig ++++ gnulib-tests/test-localtime_r-mt.c +@@ -107,6 +107,27 @@ main (int argc, char *argv[]) + { + setenv ("TZ", FRENCH_TZ, 1); + ++ /* Check that this TZ works. */ ++ { ++ time_t t = 0; /* 1970-01-01 01:00:00 */ ++ struct tm *result = localtime (&t); ++ if (! (result ++ && result->tm_sec == 0 ++ && result->tm_min == 0 ++ && result->tm_hour == 1 ++ && result->tm_mday == 1 ++ && result->tm_mon == 1 - 1 ++ && result->tm_year == 1970 - 1900 ++ && result->tm_wday == 4 ++ && result->tm_yday == 0 ++ && result->tm_isdst == 0)) ++ { ++ fputs ("Skipping test: TZ='" FRENCH_TZ "' is not Paris time\n", ++ stderr); ++ return 77; ++ } ++ } ++ + /* Create the threads. */ + gl_thread_create (thread1_func, NULL); + gl_thread_create (thread2_func, NULL); +Index: gnulib-tests/test-localtime_r.c +=================================================================== +--- gnulib-tests/test-localtime_r.c.orig ++++ gnulib-tests/test-localtime_r.c +@@ -43,6 +43,27 @@ main (void) + { + setenv ("TZ", FRENCH_TZ, 1); + ++ /* Check that this TZ works. */ ++ { ++ time_t t = 0; /* 1970-01-01 01:00:00 */ ++ struct tm *result = localtime (&t); ++ if (! (result ++ && result->tm_sec == 0 ++ && result->tm_min == 0 ++ && result->tm_hour == 1 ++ && result->tm_mday == 1 ++ && result->tm_mon == 1 - 1 ++ && result->tm_year == 1970 - 1900 ++ && result->tm_wday == 4 ++ && result->tm_yday == 0 ++ && result->tm_isdst == 0)) ++ { ++ fputs ("Skipping test: TZ='" FRENCH_TZ "' is not Paris time\n", ++ stderr); ++ return 77; ++ } ++ } ++ + /* Note: The result->tm_gmtoff values and the result->tm_zone values are the + same (3600, "CET" or 7200, "CEST") across all tested platforms: + glibc, musl, macOS, FreeBSD, NetBSD, OpenBSD, Minix, Cygwin, Android. */ diff --git a/coreutils-getaddrinfo.patch b/coreutils-getaddrinfo.patch new file mode 100644 index 0000000..410d377 --- /dev/null +++ b/coreutils-getaddrinfo.patch @@ -0,0 +1,21 @@ +--- + gnulib-tests/test-getaddrinfo.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +Index: gnulib-tests/test-getaddrinfo.c +=================================================================== +--- gnulib-tests/test-getaddrinfo.c.orig ++++ gnulib-tests/test-getaddrinfo.c +@@ -93,11 +93,7 @@ simple (char const *host, char const *se + the test merely because someone is down the country on their + in-law's farm. */ + if (res == EAI_AGAIN) +- { +- skip++; +- fprintf (stderr, "skipping getaddrinfo test: no network?\n"); +- return 77; +- } ++ return 0; + /* IRIX reports EAI_NONAME for "https". Don't fail the test + merely because of this. */ + if (res == EAI_NONAME) diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch new file mode 100644 index 0000000..7ce2f78 --- /dev/null +++ b/coreutils-i18n.patch @@ -0,0 +1,5171 @@ +From 3a1b92e80708319bcc89852e3da1029c3d1ff6b3 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Wed, 30 Aug 2023 17:19:58 +0200 +Subject: [PATCH] coreutils-i18n.patch + +--- + bootstrap.conf | 2 + configure.ac | 6 + lib/linebuffer.h | 8 + lib/mbchar.c | 23 + + lib/mbchar.h | 373 ++++++++++++++++++++ + lib/mbfile.c | 20 + + lib/mbfile.h | 267 ++++++++++++++ + m4/mbchar.m4 | 13 + m4/mbfile.m4 | 14 + src/cut.c | 508 ++++++++++++++++++++++++++-- + src/expand-common.c | 114 ++++++ + src/expand-common.h | 12 + src/expand.c | 90 ++++- + src/fold.c | 312 +++++++++++++++-- + src/local.mk | 4 + src/pr.c | 443 ++++++++++++++++++++++-- + src/sort.c | 792 +++++++++++++++++++++++++++++++++++++++++--- + src/unexpand.c | 102 ++++- + 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/sort-mb-tests.sh | 45 ++ + tests/misc/unexpand.pl | 39 ++ + tests/pr/pr-tests.pl | 49 ++ + tests/sort/sort-merge.pl | 42 ++ + tests/sort/sort.pl | 40 ++ + tests/unexpand/mb.sh | 172 +++++++++ + 30 files changed, 3605 insertions(+), 196 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 + +Index: coreutils-9.5/bootstrap.conf +=================================================================== +--- coreutils-9.5.orig/bootstrap.conf ++++ coreutils-9.5/bootstrap.conf +@@ -163,6 +163,8 @@ gnulib_modules=" + maintainer-makefile + malloc-gnu + manywarnings ++ mbchar ++ mbfile + mbrlen + mbrtoc32 + mbrtowc +Index: coreutils-9.5/configure.ac +=================================================================== +--- coreutils-9.5.orig/configure.ac ++++ coreutils-9.5/configure.ac +@@ -504,6 +504,12 @@ fi + # I'm leaving it here for now. This whole thing needs to be modernized... + gl_WINSIZE_IN_PTEM + ++gl_MBFILE ++dnl Do not use gl_MODULE_INDICATOR([mbfile]) here: we don't want 'struct mbchar' ++dnl to have a different size in lib/ than in tests/. ++AC_DEFINE([GNULIB_MBFILE], [1], ++ [Define to 1 if the gnulib module 'mbfile' is in use.]) ++ + gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H + + if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \ +Index: coreutils-9.5/lib/linebuffer.h +=================================================================== +--- coreutils-9.5.orig/lib/linebuffer.h ++++ coreutils-9.5/lib/linebuffer.h +@@ -22,6 +22,11 @@ + # include "idx.h" + # include + ++/* Get mbstate_t. */ ++# if HAVE_WCHAR_H ++# include ++# 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. */ +Index: coreutils-9.5/lib/mbfile.c +=================================================================== +--- /dev/null ++++ coreutils-9.5/lib/mbfile.c +@@ -0,0 +1,20 @@ ++/* Multibyte character I/O: macros for multi-byte encodings. ++ Copyright (C) 2012-2023 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation, either version 3 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ ++#include ++ ++#define MBFILE_INLINE _GL_EXTERN_INLINE ++#include "mbfile.h" +Index: coreutils-9.5/lib/mbfile.h +=================================================================== +--- /dev/null ++++ coreutils-9.5/lib/mbfile.h +@@ -0,0 +1,267 @@ ++/* Multibyte character I/O: macros for multi-byte encodings. ++ Copyright (C) 2001, 2005, 2009-2023 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation, either version 3 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ ++/* Written by Mitsuru Chinen ++ and Bruno Haible . */ ++ ++/* 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 ++ ++/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE. */ ++#if !_GL_CONFIG_H_INCLUDED ++ #error "Please include config.h first." ++#endif ++ ++#include ++#include ++#include ++#include ++ ++#include "mbchar.h" ++ ++_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) ++{ ++ unsigned int new_bufcount; ++ size_t bytes; ++ ++ /* If EOF has already been seen, don't use getc. This matters if ++ mbf->fp is connected to an interactive tty. */ ++ if (mbf->eof_seen) ++ goto eof; ++ ++ /* Return character pushed back, if there is one. */ ++ if (mbf->have_pushback) ++ { ++ mb_copy (mbc, &mbf->pushback); ++ mbf->have_pushback = false; ++ return; ++ } ++ ++ new_bufcount = mbf->bufcount; ++ ++ /* If mbf->state is not in an initial state, some more 32-bit wide character ++ may be hiding in the state. We need to call mbrtoc32 again. */ ++ #if GNULIB_MBRTOC32_REGULAR ++ assert (mbsinit (&mbf->state)); ++ #else ++ if (mbsinit (&mbf->state)) ++ #endif ++ { ++ /* Before using mbrtoc32, we need at least one byte. */ ++ if (new_bufcount == 0) ++ { ++ int c = getc (mbf->fp); ++ if (c == EOF) ++ { ++ mbf->eof_seen = true; ++ goto eof; ++ } ++ mbf->buf[0] = (unsigned char) c; ++ new_bufcount++; ++ } ++ ++ /* Handle most ASCII characters quickly, without calling mbrtoc32(). */ ++ if (new_bufcount == 1 && is_basic (mbf->buf[0])) ++ { ++ /* These characters are part of the POSIX portable character set. ++ For most of them, namely those in the ISO C basic character set, ++ ISO C 99 guarantees that their wide character code is identical to ++ their char code. For the few other ones, this is the case as well, ++ in all locale encodings that are in use. The 32-bit wide character ++ code is the same as well. */ ++ mbc->wc = mbc->buf[0] = mbf->buf[0]; ++ mbc->wc_valid = true; ++ mbc->ptr = &mbc->buf[0]; ++ mbc->bytes = 1; ++ mbf->bufcount = 0; ++ return; ++ } ++ } ++ ++ /* Use mbrtoc32 on an increasing number of bytes. Read only as many bytes ++ from mbf->fp as needed. This is needed to give reasonable interactive ++ behaviour when mbf->fp is connected to an interactive tty. */ ++ for (;;) ++ { ++ /* Feed the bytes one by one into mbrtoc32. */ ++ bytes = mbrtoc32 (&mbc->wc, &mbf->buf[mbf->bufcount], new_bufcount - mbf->bufcount, &mbf->state); ++ ++ if (bytes == (size_t) -1) ++ { ++ /* An invalid multibyte sequence was encountered. */ ++ mbf->bufcount = new_bufcount; ++ /* Return a single byte. */ ++ bytes = 1; ++ mbc->wc_valid = false; ++ /* Allow the next invocation to continue from a sane state. */ ++ mbszero (&mbf->state); ++ break; ++ } ++ else if (bytes == (size_t) -2) ++ { ++ /* An incomplete multibyte character. */ ++ mbf->bufcount = new_bufcount; ++ if (mbf->bufcount == MBCHAR_BUF_SIZE) ++ { ++ /* An overlong incomplete multibyte sequence was encountered. */ ++ /* Return a single byte. */ ++ bytes = 1; ++ mbc->wc_valid = false; ++ break; ++ } ++ else ++ { ++ /* Read one more byte and retry mbrtoc32. */ ++ int c = getc (mbf->fp); ++ if (c == EOF) ++ { ++ /* An incomplete multibyte character at the end. */ ++ mbf->eof_seen = true; ++ bytes = new_bufcount; ++ mbc->wc_valid = false; ++ break; ++ } ++ mbf->buf[new_bufcount] = (unsigned char) c; ++ new_bufcount++; ++ } ++ } ++ else ++ { ++ #if !GNULIB_MBRTOC32_REGULAR ++ if (bytes == (size_t) -3) ++ { ++ /* The previous multibyte sequence produced an additional 32-bit ++ wide character. */ ++ mbf->bufcount = new_bufcount; ++ bytes = 0; ++ } ++ else ++ #endif ++ { ++ bytes = mbf->bufcount + bytes; ++ mbf->bufcount = new_bufcount; ++ if (bytes == 0) ++ { ++ /* A null 32-bit wide character was encountered. */ ++ bytes = 1; ++ assert (mbf->buf[0] == '\0'); ++ assert (mbc->wc == 0); ++ } ++ } ++ mbc->wc_valid = true; ++ break; ++ } ++ } ++ ++ /* Return the multibyte sequence mbf->buf[0..bytes-1]. */ ++ mbc->ptr = &mbc->buf[0]; ++ memcpy (&mbc->buf[0], &mbf->buf[0], bytes); ++ mbc->bytes = bytes; ++ ++ mbf->bufcount -= bytes; ++ if (mbf->bufcount > 0) ++ { ++ /* It's not worth calling memmove() for so few bytes. */ ++ unsigned int count = mbf->bufcount; ++ char *p = &mbf->buf[0]; ++ ++ do ++ { ++ *p = *(p + bytes); ++ p++; ++ } ++ while (--count > 0); ++ } ++ return; ++ ++eof: ++ /* An mbchar_t with bytes == 0 is used to indicate EOF. */ ++ mbc->ptr = NULL; ++ mbc->bytes = 0; ++ mbc->wc_valid = false; ++ return; ++} ++ ++MBFILE_INLINE void ++mbfile_multi_ungetc (const struct mbchar *mbc, struct mbfile_multi *mbf) ++{ ++ mb_copy (&mbf->pushback, mbc); ++ mbf->have_pushback = true; ++} ++ ++typedef struct mbfile_multi mb_file_t; ++ ++typedef mbchar_t mbf_char_t; ++ ++#define mbf_init(mbf, stream) \ ++ ((mbf).fp = (stream), \ ++ (mbf).eof_seen = false, \ ++ (mbf).have_pushback = false, \ ++ mbszero (&(mbf).state), \ ++ (mbf).bufcount = 0) ++ ++#define mbf_getc(mbc, mbf) mbfile_multi_getc (&(mbc), &(mbf)) ++ ++#define mbf_ungetc(mbc, mbf) mbfile_multi_ungetc (&(mbc), &(mbf)) ++ ++#define mb_iseof(mbc) ((mbc).bytes == 0) ++ ++_GL_INLINE_HEADER_END ++ ++#endif /* _MBFILE_H */ +Index: coreutils-9.5/m4/mbfile.m4 +=================================================================== +--- /dev/null ++++ coreutils-9.5/m4/mbfile.m4 +@@ -0,0 +1,14 @@ ++# mbfile.m4 serial 7 ++dnl Copyright (C) 2005, 2008-2023 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl autoconf tests required for use of mbfile.h ++dnl From Bruno Haible. ++ ++AC_DEFUN([gl_MBFILE], ++[ ++ AC_REQUIRE([AC_TYPE_MBSTATE_T]) ++ : ++]) +Index: coreutils-9.5/src/cut.c +=================================================================== +--- coreutils-9.5.orig/src/cut.c ++++ coreutils-9.5/src/cut.c +@@ -27,6 +27,11 @@ + #include + #include + #include ++ ++/* Get mbstate_t, mbrtowc(). */ ++#if HAVE_WCHAR_H ++# include ++#endif + #include "system.h" + + #include "assure.h" +@@ -35,6 +40,18 @@ + + #include "set-fields.h" + ++/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC ++ installation; work around this configuration error. */ ++#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 ++# undef MB_LEN_MAX ++# define MB_LEN_MAX 16 ++#endif ++ ++/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ ++#if HAVE_MBRTOWC && defined mbstate_t ++# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) ++#endif ++ + /* The official name of this program (e.g., no 'g' prefix). */ + #define PROGRAM_NAME "cut" + +@@ -51,6 +68,52 @@ + } \ + while (0) + ++/* Refill the buffer BUF to get a multibyte character. */ ++#define REFILL_BUFFER(BUF, BUFPOS, BUFLEN, STREAM) \ ++ do \ ++ { \ ++ if (BUFLEN < MB_LEN_MAX && !feof (STREAM) && !ferror (STREAM)) \ ++ { \ ++ memmove (BUF, BUFPOS, BUFLEN); \ ++ BUFLEN += fread (BUF + BUFLEN, sizeof(char), BUFSIZ, STREAM); \ ++ BUFPOS = BUF; \ ++ } \ ++ } \ ++ while (0) ++ ++/* Get wide character on BUFPOS. BUFPOS is not included after that. ++ If byte sequence is not valid as a character, CONVFAIL is true. Otherwise false. */ ++#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \ ++ do \ ++ { \ ++ mbstate_t state_bak; \ ++ \ ++ if (BUFLEN < 1) \ ++ { \ ++ WC = WEOF; \ ++ break; \ ++ } \ ++ \ ++ /* Get a wide character. */ \ ++ CONVFAIL = false; \ ++ state_bak = STATE; \ ++ MBLENGTH = mbrtowc ((wchar_t *)&WC, BUFPOS, BUFLEN, &STATE); \ ++ \ ++ switch (MBLENGTH) \ ++ { \ ++ case (size_t)-1: \ ++ case (size_t)-2: \ ++ CONVFAIL = true; \ ++ STATE = state_bak; \ ++ /* Fall througn. */ \ ++ \ ++ case 0: \ ++ MBLENGTH = 1; \ ++ break; \ ++ } \ ++ } \ ++ while (0) ++ + + /* Pointer inside RP. When checking if a byte or field is selected + by a finite range, we check if it is between CURRENT_RP.LO +@@ -58,6 +121,9 @@ + CURRENT_RP.HI then we make CURRENT_RP to point to the next range pair. */ + static struct field_range_pair *current_rp; + ++/* Length of the delimiter given as argument to -d. */ ++size_t delimlen; ++ + /* This buffer is used to support the semantics of the -s option + (or lack of same) when the specified field list includes (does + not include) the first field. In both of those cases, the entire +@@ -70,6 +136,29 @@ static char *field_1_buffer; + /* The number of bytes allocated for FIELD_1_BUFFER. */ + static size_t field_1_bufsize; + ++enum operating_mode ++ { ++ undefined_mode, ++ ++ /* Output bytes that are at the given positions. */ ++ byte_mode, ++ ++ /* Output characters that are at the given positions. */ ++ character_mode, ++ ++ /* Output the given delimiter-separated fields. */ ++ field_mode ++ }; ++ ++static enum operating_mode operating_mode; ++ ++/* If nonzero, when in byte mode, don't split multibyte characters. */ ++static int byte_mode_character_aware; ++ ++/* If nonzero, the function for single byte locale is work ++ if this program runs on multibyte locale. */ ++static int force_singlebyte_mode; ++ + /* If true, do not output lines containing no delimiter characters. + Otherwise, all such lines are printed. This option is valid only + with field mode. */ +@@ -81,10 +170,16 @@ static bool complement; + + /* The delimiter character for field mode. */ + static unsigned char delim; ++#if HAVE_WCHAR_H ++static wchar_t wcdelim; ++#endif + + /* The delimiter for each line/record. */ + static unsigned char line_delim = '\n'; + ++/* True if the --output-delimiter=STRING option was specified. */ ++static bool output_delimiter_specified; ++ + /* The length of output_delimiter_string. */ + static size_t output_delimiter_length; + +@@ -92,9 +187,6 @@ static size_t output_delimiter_length; + string consisting of the input delimiter. */ + static char *output_delimiter_string; + +-/* The output delimiter string contents, if the default. */ +-static char output_delimiter_default[1]; +- + /* True if we have ever read standard input. */ + static bool have_read_stdin; + +@@ -148,7 +240,7 @@ Print selected parts of lines from each + -f, --fields=LIST select only these fields; also print any line\n\ + that contains no delimiter character, unless\n\ + the -s option is specified\n\ +- -n (ignored)\n\ ++ -n with -b: don't split multibyte characters\n\ + "), stdout); + fputs (_("\ + --complement complement the set of selected bytes, characters\n\ +@@ -252,7 +344,7 @@ cut_bytes (FILE *stream) + next_item (&byte_idx); + if (print_kth (byte_idx)) + { +- if (output_delimiter_string != output_delimiter_default) ++ if (output_delimiter_specified) + { + if (print_delimiter && is_range_start_index (byte_idx)) + { +@@ -271,6 +363,82 @@ cut_bytes (FILE *stream) + } + } + ++#if HAVE_MBRTOWC ++/* This function is in use for the following case. ++ ++ 1. Read from the stream STREAM, printing to standard output any selected ++ characters. ++ ++ 2. Read from stream STREAM, printing to standard output any selected bytes, ++ without splitting multibyte characters. */ ++ ++static void ++cut_characters_or_cut_bytes_no_split (FILE *stream) ++{ ++ uintmax_t idx; /* number of bytes or characters in the line so far. */ ++ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ ++ char *bufpos; /* Next read position of BUF. */ ++ size_t buflen; /* The length of the byte sequence in buf. */ ++ wint_t wc; /* A gotten wide character. */ ++ size_t mblength; /* The byte size of a multibyte character which shows ++ as same character as WC. */ ++ mbstate_t state; /* State of the stream. */ ++ bool convfail = false; /* true, when conversion failed. Otherwise false. */ ++ /* Whether to begin printing delimiters between ranges for the current line. ++ Set after we've begun printing data corresponding to the first range. */ ++ bool print_delimiter = false; ++ ++ idx = 0; ++ buflen = 0; ++ bufpos = buf; ++ memset (&state, '\0', sizeof(mbstate_t)); ++ ++ current_rp = frp; ++ ++ while (1) ++ { ++ REFILL_BUFFER (buf, bufpos, buflen, stream); ++ ++ GET_NEXT_WC_FROM_BUFFER (wc, bufpos, buflen, mblength, state, convfail); ++ (void) convfail; /* ignore unused */ ++ ++ if (wc == WEOF) ++ { ++ if (idx > 0) ++ putchar (line_delim); ++ break; ++ } ++ else if (wc == line_delim) ++ { ++ putchar (line_delim); ++ idx = 0; ++ print_delimiter = false; ++ current_rp = frp; ++ } ++ else ++ { ++ next_item (&idx); ++ if (print_kth (idx)) ++ { ++ if (output_delimiter_specified) ++ { ++ if (print_delimiter && is_range_start_index (idx)) ++ { ++ fwrite (output_delimiter_string, sizeof (char), ++ output_delimiter_length, stdout); ++ } ++ print_delimiter = true; ++ } ++ fwrite (bufpos, mblength, sizeof(char), stdout); ++ } ++ } ++ ++ buflen -= mblength; ++ bufpos += mblength; ++ } ++} ++#endif ++ + /* Read from stream STREAM, printing to standard output any selected fields. */ + + static void +@@ -433,11 +601,218 @@ cut_fields (FILE *stream) + } + } + +-/* Process file FILE to standard output, using CUT_STREAM. ++#if HAVE_MBRTOWC ++static void ++cut_fields_mb (FILE *stream) ++{ ++ int c; ++ uintmax_t field_idx; ++ int found_any_selected_field; ++ int buffer_first_field; ++ int empty_input; ++ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ ++ char *bufpos; /* Next read position of BUF. */ ++ size_t buflen; /* The length of the byte sequence in buf. */ ++ wint_t wc = 0; /* A gotten wide character. */ ++ size_t mblength; /* The byte size of a multibyte character which shows ++ as same character as WC. */ ++ mbstate_t state; /* State of the stream. */ ++ bool convfail = false; /* true, when conversion failed. Otherwise false. */ ++ ++ current_rp = frp; ++ ++ found_any_selected_field = 0; ++ field_idx = 1; ++ bufpos = buf; ++ buflen = 0; ++ memset (&state, '\0', sizeof(mbstate_t)); ++ ++ c = getc (stream); ++ empty_input = (c == EOF); ++ if (c != EOF) ++ { ++ ungetc (c, stream); ++ wc = 0; ++ } ++ else ++ wc = WEOF; ++ ++ /* To support the semantics of the -s flag, we may have to buffer ++ all of the first field to determine whether it is `delimited.' ++ But that is unnecessary if all non-delimited lines must be printed ++ and the first field has been selected, or if non-delimited lines ++ must be suppressed and the first field has *not* been selected. ++ That is because a non-delimited line has exactly one field. */ ++ buffer_first_field = (suppress_non_delimited ^ !print_kth (1)); ++ ++ while (1) ++ { ++ if (field_idx == 1 && buffer_first_field) ++ { ++ int len = 0; ++ ++ while (1) ++ { ++ REFILL_BUFFER (buf, bufpos, buflen, stream); ++ ++ GET_NEXT_WC_FROM_BUFFER ++ (wc, bufpos, buflen, mblength, state, convfail); ++ ++ if (wc == WEOF) ++ break; ++ ++ field_1_buffer = xrealloc (field_1_buffer, len + mblength); ++ memcpy (field_1_buffer + len, bufpos, mblength); ++ len += mblength; ++ buflen -= mblength; ++ bufpos += mblength; ++ ++ if (!convfail && (wc == line_delim || wc == wcdelim)) ++ break; ++ } ++ ++ if (len <= 0 && wc == WEOF) ++ break; ++ ++ /* If the first field extends to the end of line (it is not ++ delimited) and we are printing all non-delimited lines, ++ print this one. */ ++ if (convfail || (!convfail && wc != wcdelim)) ++ { ++ if (suppress_non_delimited) ++ { ++ /* Empty. */ ++ } ++ else ++ { ++ fwrite (field_1_buffer, sizeof (char), len, stdout); ++ /* Make sure the output line is newline terminated. */ ++ if (convfail || (!convfail && wc != line_delim)) ++ putchar (line_delim); ++ } ++ continue; ++ } ++ ++ if (print_kth (1)) ++ { ++ /* Print the field, but not the trailing delimiter. */ ++ fwrite (field_1_buffer, sizeof (char), len - 1, stdout); ++ found_any_selected_field = 1; ++ } ++ next_item (&field_idx); ++ } ++ ++ if (wc != WEOF) ++ { ++ if (print_kth (field_idx)) ++ { ++ if (found_any_selected_field) ++ { ++ fwrite (output_delimiter_string, sizeof (char), ++ output_delimiter_length, stdout); ++ } ++ found_any_selected_field = 1; ++ } ++ ++ while (1) ++ { ++ REFILL_BUFFER (buf, bufpos, buflen, stream); ++ ++ GET_NEXT_WC_FROM_BUFFER ++ (wc, bufpos, buflen, mblength, state, convfail); ++ ++ if (wc == WEOF) ++ break; ++ else if (!convfail && (wc == wcdelim || wc == line_delim)) ++ { ++ buflen -= mblength; ++ bufpos += mblength; ++ break; ++ } ++ ++ if (print_kth (field_idx)) ++ fwrite (bufpos, mblength, sizeof(char), stdout); ++ ++ buflen -= mblength; ++ bufpos += mblength; ++ } ++ } ++ ++ if ((!convfail || wc == line_delim) && buflen < 1) ++ wc = WEOF; ++ ++ if (!convfail && wc == wcdelim) ++ next_item (&field_idx); ++ else if (wc == WEOF || (!convfail && wc == line_delim)) ++ { ++ if (found_any_selected_field ++ || (!empty_input && !(suppress_non_delimited && field_idx == 1))) ++ putchar (line_delim); ++ if (wc == WEOF) ++ break; ++ field_idx = 1; ++ current_rp = frp; ++ found_any_selected_field = 0; ++ } ++ } ++} ++#endif ++ ++static void ++cut_stream (FILE *stream) ++{ ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1 && !force_singlebyte_mode) ++ { ++ switch (operating_mode) ++ { ++ case byte_mode: ++ if (byte_mode_character_aware) ++ cut_characters_or_cut_bytes_no_split (stream); ++ else ++ cut_bytes (stream); ++ break; ++ ++ case character_mode: ++ cut_characters_or_cut_bytes_no_split (stream); ++ break; ++ ++ case field_mode: ++ if (delimlen == 1) ++ { ++ /* Check if we have utf8 multibyte locale, so we can use this ++ optimization because of uniqueness of characters, which is ++ not true for e.g. SJIS */ ++ char * loc = setlocale(LC_CTYPE, NULL); ++ if (loc && (strstr (loc, "UTF-8") || strstr (loc, "utf-8") || ++ strstr (loc, "UTF8") || strstr (loc, "utf8"))) ++ { ++ cut_fields (stream); ++ break; ++ } ++ } ++ cut_fields_mb (stream); ++ break; ++ ++ default: ++ abort (); ++ } ++ } ++ else ++#endif ++ { ++ if (operating_mode == field_mode) ++ cut_fields (stream); ++ else ++ cut_bytes (stream); ++ } ++} ++ ++/* Process file FILE to standard output. + Return true if successful. */ + + static bool +-cut_file (char const *file, void (*cut_stream) (FILE *)) ++cut_file (char const *file) + { + FILE *stream; + +@@ -482,8 +857,8 @@ main (int argc, char **argv) + int optc; + bool ok; + bool delim_specified = false; +- bool byte_mode = false; +- char *spec_list_string = nullptr; ++ char *spec_list_string IF_LINT ( = nullptr); ++ char mbdelim[MB_LEN_MAX + 1]; + + initialize_main (&argc, &argv); + set_program_name (argv[0]); +@@ -493,6 +868,8 @@ main (int argc, char **argv) + + atexit (close_stdout); + ++ operating_mode = undefined_mode; ++ + /* By default, all non-delimited lines are printed. */ + suppress_non_delimited = false; + +@@ -505,35 +882,77 @@ main (int argc, char **argv) + switch (optc) + { + case 'b': +- case 'c': + /* Build the byte list. */ +- byte_mode = true; +- FALLTHROUGH; ++ if (operating_mode != undefined_mode) ++ FATAL_ERROR (_("only one type of list may be specified")); ++ operating_mode = byte_mode; ++ spec_list_string = optarg; ++ break; ++ ++ case 'c': ++ /* Build the character list. */ ++ if (operating_mode != undefined_mode) ++ FATAL_ERROR (_("only one type of list may be specified")); ++ operating_mode = character_mode; ++ spec_list_string = optarg; ++ break; ++ + case 'f': + /* Build the field list. */ +- if (spec_list_string) +- FATAL_ERROR (_("only one list may be specified")); ++ if (operating_mode != undefined_mode) ++ FATAL_ERROR (_("only one type of list may be specified")); ++ operating_mode = field_mode; + spec_list_string = optarg; + break; + + case 'd': + /* New delimiter. */ + /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ +- if (optarg[0] != '\0' && optarg[1] != '\0') +- FATAL_ERROR (_("the delimiter must be a single character")); +- delim = optarg[0]; +- delim_specified = true; ++ { ++#if HAVE_MBRTOWC ++ if(MB_CUR_MAX > 1) ++ { ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof(mbstate_t)); ++ delimlen = mbrtowc (&wcdelim, optarg, strnlen(optarg, MB_LEN_MAX), &state); ++ ++ if (delimlen == (size_t)-1 || delimlen == (size_t)-2) ++ ++force_singlebyte_mode; ++ else ++ { ++ delimlen = (delimlen < 1) ? 1 : delimlen; ++ if (wcdelim != L'\0' && *(optarg + delimlen) != '\0') ++ FATAL_ERROR (_("the delimiter must be a single character")); ++ memcpy (mbdelim, optarg, delimlen); ++ mbdelim[delimlen] = '\0'; ++ if (delimlen == 1) ++ delim = *optarg; ++ } ++ } ++ ++ if (MB_CUR_MAX <= 1 || force_singlebyte_mode) ++#endif ++ { ++ if (optarg[0] != '\0' && optarg[1] != '\0') ++ FATAL_ERROR (_("the delimiter must be a single character")); ++ delim = (unsigned char) optarg[0]; ++ } ++ delim_specified = true; ++ } + break; + + case OUTPUT_DELIMITER_OPTION: ++ output_delimiter_specified = true; + /* Interpret --output-delimiter='' to mean + 'use the NUL byte as the delimiter.' */ + output_delimiter_length = (optarg[0] == '\0' + ? 1 : strlen (optarg)); +- output_delimiter_string = optarg; ++ output_delimiter_string = xstrdup (optarg); + break; + + case 'n': ++ byte_mode_character_aware = 1; + break; + + case 's': +@@ -555,40 +974,57 @@ main (int argc, char **argv) + } + } + +- if (!spec_list_string) ++ if (operating_mode == undefined_mode) + FATAL_ERROR (_("you must specify a list of bytes, characters, or fields")); + +- if (byte_mode) +- { +- if (delim_specified) +- FATAL_ERROR (_("an input delimiter may be specified only\ ++ if (delim_specified && operating_mode != field_mode) ++ FATAL_ERROR (_("an input delimiter may be specified only\ + when operating on fields")); + +- if (suppress_non_delimited) +- FATAL_ERROR (_("suppressing non-delimited lines makes sense\n\ ++ if (suppress_non_delimited && operating_mode != field_mode) ++ FATAL_ERROR (_("suppressing non-delimited lines makes sense\n\ + \tonly when operating on fields")); +- } + + set_fields (spec_list_string, +- ((byte_mode ? SETFLD_ERRMSG_USE_POS : 0) +- | (complement ? SETFLD_COMPLEMENT : 0))); ++ ( (operating_mode == field_mode) ? 0 : SETFLD_ERRMSG_USE_POS) ++ | (complement ? SETFLD_COMPLEMENT : 0) ); + + if (!delim_specified) +- delim = '\t'; ++ { ++ delim = '\t'; ++#ifdef HAVE_MBRTOWC ++ wcdelim = L'\t'; ++ mbdelim[0] = '\t'; ++ mbdelim[1] = '\0'; ++ delimlen = 1; ++#endif ++ } + + if (output_delimiter_string == nullptr) + { +- output_delimiter_default[0] = delim; +- output_delimiter_string = output_delimiter_default; +- output_delimiter_length = 1; ++#ifdef HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1 && !force_singlebyte_mode) ++ { ++ output_delimiter_string = xstrdup(mbdelim); ++ output_delimiter_length = delimlen; ++ } ++ ++ if (MB_CUR_MAX <= 1 || force_singlebyte_mode) ++#endif ++ { ++ static char dummy[2]; ++ dummy[0] = delim; ++ dummy[1] = '\0'; ++ output_delimiter_string = dummy; ++ output_delimiter_length = 1; ++ } + } + +- void (*cut_stream) (FILE *) = byte_mode ? cut_bytes : cut_fields; + if (optind == argc) +- ok = cut_file ("-", cut_stream); ++ ok = cut_file ("-"); + else + for (ok = true; optind < argc; optind++) +- ok &= cut_file (argv[optind], cut_stream); ++ ok &= cut_file (argv[optind]); + + + if (have_read_stdin && fclose (stdin) == EOF) +Index: coreutils-9.5/src/expand-common.c +=================================================================== +--- coreutils-9.5.orig/src/expand-common.c ++++ coreutils-9.5/src/expand-common.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include "system.h" + #include "fadvise.h" + #include "quote.h" +@@ -123,6 +124,119 @@ set_increment_size (uintmax_t tabval) + return ok; + } + ++extern int ++set_utf_locale (void) ++{ ++ /*try using some predefined locale */ ++ const char* predef_locales[] = {"C.UTF8","en_US.UTF8","en_GB.UTF8"}; ++ ++ const int predef_locales_count=3; ++ for (int i=0;ibufcount=0; ++ if (c == 0xEF) ++ { ++ c=fgetc(fp); ++ } ++ else ++ { ++ if (c != EOF) ++ { ++ ungetc(c,fp); ++ } ++ return false; ++ } ++ ++ if (c == 0xBB) ++ { ++ c=fgetc(fp); ++ } ++ else ++ { ++ if ( c!= EOF ) ++ { ++ mbf->buf[0]=(unsigned char) 0xEF; ++ mbf->bufcount=1; ++ ungetc(c,fp); ++ return false; ++ } ++ else ++ { ++ ungetc(0xEF,fp); ++ return false; ++ } ++ } ++ if (c == 0xBF) ++ { ++ mbf->bufcount=0; ++ return true; ++ } ++ else ++ { ++ if (c != EOF) ++ { ++ mbf->buf[0]=(unsigned char) 0xEF; ++ mbf->buf[1]=(unsigned char) 0xBB; ++ mbf->bufcount=2; ++ ungetc(c,fp); ++ return false; ++ } ++ else ++ { ++ mbf->buf[0]=(unsigned char) 0xEF; ++ mbf->bufcount=1; ++ ungetc(0xBB,fp); ++ return false; ++ } ++ } ++ return false; ++} ++ ++extern void ++print_bom(void) ++{ ++ putc (0xEF, stdout); ++ putc (0xBB, stdout); ++ putc (0xBF, stdout); ++} ++ + /* Add the comma or blank separated list of tab stops STOPS + to the list of tab stops. */ + extern void +Index: coreutils-9.5/src/expand-common.h +=================================================================== +--- coreutils-9.5.orig/src/expand-common.h ++++ coreutils-9.5/src/expand-common.h +@@ -25,6 +25,18 @@ extern size_t max_column_width; + /* The desired exit status. */ + extern int exit_status; + ++extern int ++set_utf_locale (void); ++ ++extern bool ++check_utf_locale(void); ++ ++extern bool ++check_bom(FILE* fp, mb_file_t *mbf); ++ ++extern void ++print_bom(void); ++ + /* Add tab stop TABVAL to the end of 'tab_list'. */ + extern void + add_tab_stop (uintmax_t tabval); +Index: coreutils-9.5/src/expand.c +=================================================================== +--- coreutils-9.5.orig/src/expand.c ++++ coreutils-9.5/src/expand.c +@@ -38,6 +38,9 @@ + #include + #include + #include ++ ++#include ++ + #include "system.h" + #include "expand-common.h" + +@@ -96,19 +99,41 @@ expand (void) + { + /* Input stream. */ + FILE *fp = next_file (nullptr); ++ mb_file_t mbf; ++ mbf_char_t c; ++ /* True if the starting locale is utf8. */ ++ bool using_utf_locale; ++ ++ /* True if the first file contains BOM header. */ ++ bool found_bom; ++ using_utf_locale=check_utf_locale(); + + if (!fp) + return; ++ mbf_init (mbf, fp); ++ found_bom=check_bom(fp,&mbf); + +- while (true) ++ if (using_utf_locale == false && found_bom == true) ++ { ++ /*try using some predefined locale */ ++ ++ if (set_utf_locale () != 0) + { +- /* Input character, or EOF. */ +- int c; ++ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale")); ++ } ++ } ++ + ++ if (found_bom == true) ++ { ++ print_bom(); ++ } ++ ++ while (true) ++ { + /* If true, perform translations. */ + bool convert = true; + +- + /* The following variables have valid values only when CONVERT + is true: */ + +@@ -118,17 +143,48 @@ expand (void) + /* Index in TAB_LIST of next tab stop to examine. */ + size_t tab_index = 0; + +- + /* Convert a line of text. */ + + do + { +- while ((c = getc (fp)) < 0 && (fp = next_file (fp))) +- continue; ++ while (true) { ++ mbf_getc (c, mbf); ++ if ((mb_iseof (c)) && (fp = next_file (fp))) ++ { ++ mbf_init (mbf, fp); ++ if (fp!=NULL) ++ { ++ if (check_bom(fp,&mbf)==true) ++ { ++ /*Not the first file - check BOM header*/ ++ if (using_utf_locale==false && found_bom==false) ++ { ++ /*BOM header in subsequent file but not in the first one. */ ++ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); ++ } ++ } ++ else ++ { ++ if(using_utf_locale==false && found_bom==true) ++ { ++ /*First file conatined BOM header - locale was switched to UTF ++ *all subsequent files should contain BOM. */ ++ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); ++ } ++ } ++ } ++ continue; ++ } ++ else ++ { ++ break; ++ } ++ } ++ + + if (convert) + { +- if (c == '\t') ++ if (mb_iseq (c, '\t')) + { + /* Column the next input tab stop is on. */ + uintmax_t next_tab_column; +@@ -147,32 +203,34 @@ expand (void) + if (putchar (' ') < 0) + write_error (); + +- c = ' '; ++ mb_setascii (&c, ' '); + } +- else if (c == '\b') ++ else if (mb_iseq (c, '\b')) + { + /* Go back one column, and force recalculation of the + next tab stop. */ + column -= !!column; + tab_index -= !!tab_index; + } +- else ++ /* A leading control character could make us trip over. */ ++ else if (!mb_iscntrl (c)) + { +- column++; ++ column += mb_width (c); + if (!column) + error (EXIT_FAILURE, 0, _("input line is too long")); + } + +- convert &= convert_entire_line || !! isblank (c); ++ convert &= convert_entire_line || mb_isblank (c); + } + +- if (c < 0) ++ if (mb_iseof (c)) + return; + +- if (putchar (c) < 0) ++ mb_putc (c, stdout); ++ if (ferror (stdout)) + write_error (); + } +- while (c != '\n'); ++ while (!mb_iseq (c, '\n')); + } + } + +Index: coreutils-9.5/src/fold.c +=================================================================== +--- coreutils-9.5.orig/src/fold.c ++++ coreutils-9.5/src/fold.c +@@ -23,10 +23,32 @@ + #include + #include + ++/* Get mbstate_t, mbrtowc(), wcwidth(). */ ++#if HAVE_WCHAR_H ++# include ++#endif ++ ++/* Get iswprint(), iswblank(), wcwidth(). */ ++#if HAVE_WCTYPE_H ++# include ++#endif ++ + #include "system.h" + #include "fadvise.h" + #include "xdectoint.h" + ++/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC ++ installation; work around this configuration error. */ ++#if !defined MB_LEN_MAX || MB_LEN_MAX < 2 ++# undef MB_LEN_MAX ++# define MB_LEN_MAX 16 ++#endif ++ ++/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ ++#if HAVE_MBRTOWC && defined mbstate_t ++# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) ++#endif ++ + #define TAB_WIDTH 8 + + /* The official name of this program (e.g., no 'g' prefix). */ +@@ -34,20 +56,41 @@ + + #define AUTHORS proper_name ("David MacKenzie") + ++#define FATAL_ERROR(Message) \ ++ do \ ++ { \ ++ error (0, 0, (Message)); \ ++ usage (2); \ ++ } \ ++ while (0) ++ ++enum operating_mode ++{ ++ /* Fold texts by columns that are at the given positions. */ ++ column_mode, ++ ++ /* Fold texts by bytes that are at the given positions. */ ++ byte_mode, ++ ++ /* Fold texts by characters that are at the given positions. */ ++ character_mode, ++}; ++ ++/* The argument shows current mode. (Default: column_mode) */ ++static enum operating_mode operating_mode; ++ + /* If nonzero, try to break on whitespace. */ + static bool break_spaces; + +-/* If nonzero, count bytes, not column positions. */ +-static bool count_bytes; +- + /* If nonzero, at least one of the files we read was standard input. */ + static bool have_read_stdin; + +-static char const shortopts[] = "bsw:0::1::2::3::4::5::6::7::8::9::"; ++static char const shortopts[] = "bcsw:0::1::2::3::4::5::6::7::8::9::"; + + static struct option const longopts[] = + { + {"bytes", no_argument, nullptr, 'b'}, ++ {"characters", no_argument, nullptr, 'c'}, + {"spaces", no_argument, nullptr, 's'}, + {"width", required_argument, nullptr, 'w'}, + {GETOPT_HELP_OPTION_DECL}, +@@ -75,6 +118,7 @@ Wrap input lines in each FILE, writing t + + fputs (_("\ + -b, --bytes count bytes rather than columns\n\ ++ -c, --characters count characters rather than columns\n\ + -s, --spaces break at spaces\n\ + -w, --width=WIDTH use WIDTH columns instead of 80\n\ + "), stdout); +@@ -92,7 +136,7 @@ Wrap input lines in each FILE, writing t + static size_t + adjust_column (size_t column, char c) + { +- if (!count_bytes) ++ if (operating_mode != byte_mode) + { + if (c == '\b') + { +@@ -115,30 +159,14 @@ adjust_column (size_t column, char c) + to stdout, with maximum line length WIDTH. + Return true if successful. */ + +-static bool +-fold_file (char const *filename, size_t width) ++static void ++fold_text (FILE *istream, size_t width, int *saved_errno) + { +- FILE *istream; + int c; + size_t column = 0; /* Screen column where next char will go. */ + size_t offset_out = 0; /* Index in 'line_out' for next char. */ + static char *line_out = nullptr; + static size_t allocated_out = 0; +- int saved_errno; +- +- if (STREQ (filename, "-")) +- { +- istream = stdin; +- have_read_stdin = true; +- } +- else +- istream = fopen (filename, "r"); +- +- if (istream == nullptr) +- { +- error (0, errno, "%s", quotef (filename)); +- return false; +- } + + fadvise (istream, FADVISE_SEQUENTIAL); + +@@ -168,6 +196,15 @@ fold_file (char const *filename, size_t + bool found_blank = false; + size_t logical_end = offset_out; + ++ /* If LINE_OUT has no wide character, ++ put a new wide character in LINE_OUT ++ if column is bigger than width. */ ++ if (offset_out == 0) ++ { ++ line_out[offset_out++] = c; ++ continue; ++ } ++ + /* Look for the last blank. */ + while (logical_end) + { +@@ -214,13 +251,225 @@ fold_file (char const *filename, size_t + line_out[offset_out++] = c; + } + +- saved_errno = errno; ++ *saved_errno = errno; + if (!ferror (istream)) +- saved_errno = 0; ++ *saved_errno = 0; + + if (offset_out) + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); + ++} ++ ++#if HAVE_MBRTOWC ++static void ++fold_multibyte_text (FILE *istream, size_t width, int *saved_errno) ++{ ++ char buf[MB_LEN_MAX + BUFSIZ]; /* For spooling a read byte sequence. */ ++ size_t buflen = 0; /* The length of the byte sequence in buf. */ ++ char *bufpos = buf; /* Next read position of BUF. */ ++ wint_t wc; /* A gotten wide character. */ ++ size_t mblength; /* The byte size of a multibyte character which shows ++ as same character as WC. */ ++ mbstate_t state, state_bak; /* State of the stream. */ ++ int convfail = 0; /* 1, when conversion is failed. Otherwise 0. */ ++ ++ static char *line_out = NULL; ++ size_t offset_out = 0; /* Index in `line_out' for next char. */ ++ static size_t allocated_out = 0; ++ ++ int increment; ++ size_t column = 0; ++ ++ size_t last_blank_pos; ++ size_t last_blank_column; ++ int is_blank_seen; ++ int last_blank_increment = 0; ++ int is_bs_following_last_blank; ++ size_t bs_following_last_blank_num; ++ int is_cr_after_last_blank; ++ ++#define CLEAR_FLAGS \ ++ do \ ++ { \ ++ last_blank_pos = 0; \ ++ last_blank_column = 0; \ ++ is_blank_seen = 0; \ ++ is_bs_following_last_blank = 0; \ ++ bs_following_last_blank_num = 0; \ ++ is_cr_after_last_blank = 0; \ ++ } \ ++ while (0) ++ ++#define START_NEW_LINE \ ++ do \ ++ { \ ++ putchar ('\n'); \ ++ column = 0; \ ++ offset_out = 0; \ ++ CLEAR_FLAGS; \ ++ } \ ++ while (0) ++ ++ CLEAR_FLAGS; ++ memset (&state, '\0', sizeof(mbstate_t)); ++ ++ for (;; bufpos += mblength, buflen -= mblength) ++ { ++ if (buflen < MB_LEN_MAX && !feof (istream) && !ferror (istream)) ++ { ++ memmove (buf, bufpos, buflen); ++ buflen += fread (buf + buflen, sizeof(char), BUFSIZ, istream); ++ bufpos = buf; ++ } ++ ++ if (buflen < 1) ++ break; ++ ++ /* Get a wide character. */ ++ state_bak = state; ++ mblength = mbrtowc ((wchar_t *)&wc, bufpos, buflen, &state); ++ ++ switch (mblength) ++ { ++ case (size_t)-1: ++ case (size_t)-2: ++ convfail++; ++ state = state_bak; ++ /* Fall through. */ ++ ++ case 0: ++ mblength = 1; ++ break; ++ } ++ ++rescan: ++ if (operating_mode == byte_mode) /* byte mode */ ++ increment = mblength; ++ else if (operating_mode == character_mode) /* character mode */ ++ increment = 1; ++ else /* column mode */ ++ { ++ if (convfail) ++ increment = 1; ++ else ++ { ++ switch (wc) ++ { ++ case L'\n': ++ fwrite (line_out, sizeof(char), offset_out, stdout); ++ START_NEW_LINE; ++ continue; ++ ++ case L'\b': ++ increment = (column > 0) ? -1 : 0; ++ break; ++ ++ case L'\r': ++ increment = -1 * column; ++ break; ++ ++ case L'\t': ++ increment = 8 - column % 8; ++ break; ++ ++ default: ++ increment = wcwidth (wc); ++ increment = (increment < 0) ? 0 : increment; ++ } ++ } ++ } ++ ++ if (column + increment > width && break_spaces && last_blank_pos) ++ { ++ fwrite (line_out, sizeof(char), last_blank_pos, stdout); ++ putchar ('\n'); ++ ++ offset_out = offset_out - last_blank_pos; ++ column = column - last_blank_column + ((is_cr_after_last_blank) ++ ? last_blank_increment : bs_following_last_blank_num); ++ memmove (line_out, line_out + last_blank_pos, offset_out); ++ CLEAR_FLAGS; ++ goto rescan; ++ } ++ ++ if (column + increment > width && column != 0) ++ { ++ fwrite (line_out, sizeof(char), offset_out, stdout); ++ START_NEW_LINE; ++ goto rescan; ++ } ++ ++ if (allocated_out < offset_out + mblength) ++ { ++ line_out = X2REALLOC (line_out, &allocated_out); ++ } ++ ++ memcpy (line_out + offset_out, bufpos, mblength); ++ offset_out += mblength; ++ column += increment; ++ ++ if (is_blank_seen && !convfail && wc == L'\r') ++ is_cr_after_last_blank = 1; ++ ++ if (is_bs_following_last_blank && !convfail && wc == L'\b') ++ ++bs_following_last_blank_num; ++ else ++ is_bs_following_last_blank = 0; ++ ++ if (break_spaces && !convfail && iswblank (wc)) ++ { ++ last_blank_pos = offset_out; ++ last_blank_column = column; ++ is_blank_seen = 1; ++ last_blank_increment = increment; ++ is_bs_following_last_blank = 1; ++ bs_following_last_blank_num = 0; ++ is_cr_after_last_blank = 0; ++ } ++ } ++ ++ *saved_errno = errno; ++ if (!ferror (istream)) ++ *saved_errno = 0; ++ ++ if (offset_out) ++ fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); ++ ++} ++#endif ++ ++/* Fold file FILENAME, or standard input if FILENAME is "-", ++ to stdout, with maximum line length WIDTH. ++ Return true if successful. */ ++ ++static bool ++fold_file (char const *filename, size_t width) ++{ ++ FILE *istream; ++ int saved_errno; ++ ++ if (STREQ (filename, "-")) ++ { ++ istream = stdin; ++ have_read_stdin = true; ++ } ++ else ++ istream = fopen (filename, "r"); ++ ++ if (istream == nullptr) ++ { ++ error (0, errno, "%s", filename); ++ return false; ++ } ++ ++ /* Define how ISTREAM is being folded. */ ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1) ++ fold_multibyte_text (istream, width, &saved_errno); ++ else ++#endif ++ fold_text (istream, width, &saved_errno); ++ + if (STREQ (filename, "-")) + clearerr (istream); + else if (fclose (istream) != 0 && !saved_errno) +@@ -251,7 +500,8 @@ main (int argc, char **argv) + + atexit (close_stdout); + +- break_spaces = count_bytes = have_read_stdin = false; ++ operating_mode = column_mode; ++ break_spaces = have_read_stdin = false; + + while ((optc = getopt_long (argc, argv, shortopts, longopts, nullptr)) != -1) + { +@@ -260,7 +510,15 @@ main (int argc, char **argv) + switch (optc) + { + case 'b': /* Count bytes rather than columns. */ +- count_bytes = true; ++ if (operating_mode != column_mode) ++ FATAL_ERROR (_("only one way of folding may be specified")); ++ operating_mode = byte_mode; ++ break; ++ ++ case 'c': ++ if (operating_mode != column_mode) ++ FATAL_ERROR (_("only one way of folding may be specified")); ++ operating_mode = character_mode; + break; + + case 's': /* Break at word boundaries. */ +Index: coreutils-9.5/src/local.mk +=================================================================== +--- coreutils-9.5.orig/src/local.mk ++++ coreutils-9.5/src/local.mk +@@ -450,8 +450,8 @@ src_base32_CPPFLAGS = -DBASE_TYPE=32 $(A + src_basenc_SOURCES = src/basenc.c + src_basenc_CPPFLAGS = -DBASE_TYPE=42 $(AM_CPPFLAGS) + +-src_expand_SOURCES = src/expand.c src/expand-common.c +-src_unexpand_SOURCES = src/unexpand.c src/expand-common.c ++src_expand_SOURCES = src/expand.c src/expand-common.c lib/mbfile.c lib/mbchar.c ++src_unexpand_SOURCES = src/unexpand.c src/expand-common.c lib/mbfile.c lib/mbchar.c + + src_wc_SOURCES = src/wc.c + if USE_AVX2_WC_LINECOUNT +Index: coreutils-9.5/src/pr.c +=================================================================== +--- coreutils-9.5.orig/src/pr.c ++++ coreutils-9.5/src/pr.c +@@ -312,6 +312,24 @@ + #include + #include + #include ++ ++/* Get MB_LEN_MAX. */ ++#include ++/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC ++ installation; work around this configuration error. */ ++#if !defined MB_LEN_MAX || MB_LEN_MAX == 1 ++# define MB_LEN_MAX 16 ++#endif ++ ++/* Get MB_CUR_MAX. */ ++#include ++ ++/* Solaris 2.5 has a bug: must be included before . */ ++/* Get mbstate_t, mbrtowc(), wcwidth(). */ ++#if HAVE_WCHAR_H ++# include ++#endif ++ + #include "system.h" + #include "fadvise.h" + #include "hard-locale.h" +@@ -324,6 +342,18 @@ + #include "xstrtol-error.h" + #include "xdectoint.h" + ++/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ ++#if HAVE_MBRTOWC && defined mbstate_t ++# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) ++#endif ++ ++#ifndef HAVE_DECL_WCWIDTH ++"this configure-time declaration test was not run" ++#endif ++#if !HAVE_DECL_WCWIDTH ++extern int wcwidth (); ++#endif ++ + /* The official name of this program (e.g., no 'g' prefix). */ + #define PROGRAM_NAME "pr" + +@@ -416,7 +446,20 @@ struct COLUMN + + typedef struct COLUMN COLUMN; + +-static int char_to_clump (char c); ++/* Funtion pointers to switch functions for single byte locale or for ++ multibyte locale. If multibyte functions do not exist in your sysytem, ++ these pointers always point the function for single byte locale. */ ++static void (*print_char) (char c); ++static int (*char_to_clump) (char c); ++ ++/* Functions for single byte locale. */ ++static void print_char_single (char c); ++static int char_to_clump_single (char c); ++ ++/* Functions for multibyte locale. */ ++static void print_char_multi (char c); ++static int char_to_clump_multi (char c); ++ + static bool read_line (COLUMN *p); + static bool print_page (void); + static bool print_stored (COLUMN *p); +@@ -428,6 +471,7 @@ static void add_line_number (COLUMN *p); + static void getoptnum (char const *n_str, int min, int *num, + char const *errfmt); + static void getoptarg (char *arg, char switch_char, char *character, ++ int *character_length, int *character_width, + int *number); + static void print_files (int number_of_files, char **av); + static void init_parameters (int number_of_files); +@@ -441,7 +485,6 @@ static void store_char (char c); + static void pad_down (unsigned int lines); + static void read_rest_of_line (COLUMN *p); + static void skip_read (COLUMN *p, int column_number); +-static void print_char (char c); + static void cleanup (void); + static void print_sep_string (void); + static void separator_string (char const *optarg_S); +@@ -453,7 +496,7 @@ static COLUMN *column_vector; + we store the leftmost columns contiguously in buff. + To print a line from buff, get the index of the first character + from line_vector[i], and print up to line_vector[i + 1]. */ +-static char *buff; ++static unsigned char *buff; + + /* Index of the position in buff where the next character + will be stored. */ +@@ -557,7 +600,7 @@ static int chars_per_column; + static bool untabify_input = false; + + /* (-e) The input tab character. */ +-static char input_tab_char = '\t'; ++static char input_tab_char[MB_LEN_MAX] = "\t"; + + /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ... + where the leftmost column is 1. */ +@@ -567,7 +610,10 @@ static int chars_per_input_tab = 8; + static bool tabify_output = false; + + /* (-i) The output tab character. */ +-static char output_tab_char = '\t'; ++static char output_tab_char[MB_LEN_MAX] = "\t"; ++ ++/* (-i) The byte length of output tab character. */ ++static int output_tab_char_length = 1; + + /* (-i) The width of the output tab. */ + static int chars_per_output_tab = 8; +@@ -637,7 +683,13 @@ static int line_number; + static bool numbered_lines = false; + + /* (-n) Character which follows each line number. */ +-static char number_separator = '\t'; ++static char number_separator[MB_LEN_MAX] = "\t"; ++ ++/* (-n) The byte length of the character which follows each line number. */ ++static int number_separator_length = 1; ++ ++/* (-n) The character width of the character which follows each line number. */ ++static int number_separator_width = 0; + + /* (-n) line counting starts with 1st line of input file (not with 1st + line of 1st page printed). */ +@@ -690,6 +742,7 @@ static bool use_col_separator = false; + -a|COLUMN|-m is a 'space' and with the -J option a 'tab'. */ + static char const *col_sep_string = ""; + static int col_sep_length = 0; ++static int col_sep_width = 0; + static char *column_separator = (char *) " "; + static char *line_separator = (char *) "\t"; + +@@ -852,6 +905,13 @@ separator_string (char const *optarg_S) + integer_overflow (); + col_sep_length = len; + col_sep_string = optarg_S; ++ ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1) ++ col_sep_width = mbswidth (col_sep_string, 0); ++ else ++#endif ++ col_sep_width = col_sep_length; + } + + int +@@ -876,6 +936,21 @@ main (int argc, char **argv) + + atexit (close_stdout); + ++/* Define which functions are used, the ones for single byte locale or the ones ++ for multibyte locale. */ ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1) ++ { ++ print_char = print_char_multi; ++ char_to_clump = char_to_clump_multi; ++ } ++ else ++#endif ++ { ++ print_char = print_char_single; ++ char_to_clump = char_to_clump_single; ++ } ++ + n_files = 0; + file_names = (argc > 1 + ? xnmalloc (argc - 1, sizeof (char *)) +@@ -952,8 +1027,12 @@ main (int argc, char **argv) + break; + case 'e': + if (optarg) +- getoptarg (optarg, 'e', &input_tab_char, +- &chars_per_input_tab); ++ { ++ int dummy_length, dummy_width; ++ ++ getoptarg (optarg, 'e', input_tab_char, &dummy_length, ++ &dummy_width, &chars_per_input_tab); ++ } + /* Could check tab width > 0. */ + untabify_input = true; + break; +@@ -966,8 +1045,12 @@ main (int argc, char **argv) + break; + case 'i': + if (optarg) +- getoptarg (optarg, 'i', &output_tab_char, +- &chars_per_output_tab); ++ { ++ int dummy_width; ++ ++ getoptarg (optarg, 'i', output_tab_char, &output_tab_char_length, ++ &dummy_width, &chars_per_output_tab); ++ } + /* Could check tab width > 0. */ + tabify_output = true; + break; +@@ -985,8 +1068,8 @@ main (int argc, char **argv) + case 'n': + numbered_lines = true; + if (optarg) +- getoptarg (optarg, 'n', &number_separator, +- &chars_per_number); ++ getoptarg (optarg, 'n', number_separator, &number_separator_length, ++ &number_separator_width, &chars_per_number); + break; + case 'N': + skip_count = false; +@@ -1011,6 +1094,7 @@ main (int argc, char **argv) + /* Reset an additional input of -s, -S dominates -s */ + col_sep_string = ""; + col_sep_length = 0; ++ col_sep_width = 0; + use_col_separator = true; + if (optarg) + separator_string (optarg); +@@ -1165,7 +1249,8 @@ getoptnum (char const *n_str, int min, i + a number. */ + + static void +-getoptarg (char *arg, char switch_char, char *character, int *number) ++getoptarg (char *arg, char switch_char, char *character, int *character_length, ++ int *character_width, int *number) + { + if (!*arg) + { +@@ -1174,7 +1259,41 @@ getoptarg (char *arg, char switch_char, + } + + if (!ISDIGIT (*arg)) +- *character = *arg++; ++ { ++#ifdef HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1) /* for multibyte locale. */ ++ { ++ wchar_t wc; ++ size_t mblength; ++ int width; ++ mbstate_t state = {'\0'}; ++ ++ mblength = mbrtowc (&wc, arg, strnlen(arg, MB_LEN_MAX), &state); ++ ++ if (mblength == (size_t)-1 || mblength == (size_t)-2) ++ { ++ *character_length = 1; ++ *character_width = 1; ++ } ++ else ++ { ++ *character_length = (mblength < 1) ? 1 : mblength; ++ width = wcwidth (wc); ++ *character_width = (width < 0) ? 0 : width; ++ } ++ ++ strncpy (character, arg, *character_length); ++ arg += *character_length; ++ } ++ else /* for single byte locale. */ ++#endif ++ { ++ *character = *arg++; ++ *character_length = 1; ++ *character_width = 1; ++ } ++ } ++ + if (*arg) + { + long int tmp_long; +@@ -1203,6 +1322,11 @@ static void + init_parameters (int number_of_files) + { + int chars_used_by_number = 0; ++ int mb_len = 1; ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1) ++ mb_len = MB_LEN_MAX; ++#endif + + lines_per_body = lines_per_page - lines_per_header - lines_per_footer; + if (lines_per_body <= 0) +@@ -1240,7 +1364,7 @@ init_parameters (int number_of_files) + else + col_sep_string = column_separator; + +- col_sep_length = 1; ++ col_sep_length = col_sep_width = 1; + use_col_separator = true; + } + /* It's rather pointless to define a TAB separator with column +@@ -1272,11 +1396,11 @@ init_parameters (int number_of_files) + + TAB_WIDTH (chars_per_input_tab, chars_per_number); */ + + /* Estimate chars_per_text without any margin and keep it constant. */ +- if (number_separator == '\t') ++ if (number_separator[0] == '\t') + number_width = (chars_per_number + + TAB_WIDTH (chars_per_default_tab, chars_per_number)); + else +- number_width = chars_per_number + 1; ++ number_width = chars_per_number + number_separator_width; + + /* The number is part of the column width unless we are + printing files in parallel. */ +@@ -1285,7 +1409,7 @@ init_parameters (int number_of_files) + } + + int sep_chars, useful_chars; +- if (ckd_mul (&sep_chars, columns - 1, col_sep_length)) ++ if (ckd_mul (&sep_chars, columns - 1, col_sep_width)) + sep_chars = INT_MAX; + if (ckd_sub (&useful_chars, chars_per_line - chars_used_by_number, + sep_chars)) +@@ -1308,7 +1432,7 @@ init_parameters (int number_of_files) + We've to use 8 as the lower limit, if we use chars_per_default_tab = 8 + to expand a tab which is not an input_tab-char. */ + free (clump_buff); +- clump_buff = xmalloc (MAX (8, chars_per_input_tab)); ++ clump_buff = xmalloc (mb_len * MAX (8, chars_per_input_tab)); + } + + /* Open the necessary files, +@@ -1414,7 +1538,7 @@ init_funcs (void) + + /* Enlarge p->start_position of first column to use the same form of + padding_not_printed with all columns. */ +- h = h + col_sep_length; ++ h = h + col_sep_width; + + /* This loop takes care of all but the rightmost column. */ + +@@ -1448,7 +1572,7 @@ init_funcs (void) + } + else + { +- h = h_next + col_sep_length; ++ h = h_next + col_sep_width; + h_next = h + chars_per_column; + } + } +@@ -1745,9 +1869,9 @@ static void + align_column (COLUMN *p) + { + padding_not_printed = p->start_position; +- if (col_sep_length < padding_not_printed) ++ if (col_sep_width < padding_not_printed) + { +- pad_across_to (padding_not_printed - col_sep_length); ++ pad_across_to (padding_not_printed - col_sep_width); + padding_not_printed = ANYWHERE; + } + +@@ -2021,13 +2145,13 @@ store_char (char c) + /* May be too generous. */ + buff = X2REALLOC (buff, &buff_allocated); + } +- buff[buff_current++] = c; ++ buff[buff_current++] = (unsigned char) c; + } + + static void + add_line_number (COLUMN *p) + { +- int i; ++ int i, j; + char *s; + int num_width; + +@@ -2044,22 +2168,24 @@ add_line_number (COLUMN *p) + /* Tabification is assumed for multiple columns, also for n-separators, + but 'default n-separator = TAB' hasn't been given priority over + equal column_width also specified by POSIX. */ +- if (number_separator == '\t') ++ if (number_separator[0] == '\t') + { + i = number_width - chars_per_number; + while (i-- > 0) + (p->char_func) (' '); + } + else +- (p->char_func) (number_separator); ++ for (j = 0; j < number_separator_length; j++) ++ (p->char_func) (number_separator[j]); + } + else + /* To comply with POSIX, we avoid any expansion of default TAB + separator with a single column output. No column_width requirement + has to be considered. */ + { +- (p->char_func) (number_separator); +- if (number_separator == '\t') ++ for (j = 0; j < number_separator_length; j++) ++ (p->char_func) (number_separator[j]); ++ if (number_separator[0] == '\t') + output_position = POS_AFTER_TAB (chars_per_output_tab, + output_position); + } +@@ -2218,7 +2344,7 @@ print_white_space (void) + while (goal - h_old > 1 + && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal) + { +- putchar (output_tab_char); ++ fwrite (output_tab_char, sizeof(char), output_tab_char_length, stdout); + h_old = h_new; + } + while (++h_old <= goal) +@@ -2238,6 +2364,7 @@ print_sep_string (void) + { + char const *s = col_sep_string; + int l = col_sep_length; ++ int not_space_flag; + + if (separators_not_printed <= 0) + { +@@ -2249,6 +2376,7 @@ print_sep_string (void) + { + for (; separators_not_printed > 0; --separators_not_printed) + { ++ not_space_flag = 0; + while (l-- > 0) + { + /* 3 types of sep_strings: spaces only, spaces and chars, +@@ -2262,12 +2390,15 @@ print_sep_string (void) + } + else + { ++ not_space_flag = 1; + if (spaces_not_printed > 0) + print_white_space (); + putchar (*s++); +- ++output_position; + } + } ++ if (not_space_flag) ++ output_position += col_sep_width; ++ + /* sep_string ends with some spaces */ + if (spaces_not_printed > 0) + print_white_space (); +@@ -2295,7 +2426,7 @@ print_clump (COLUMN *p, int n, char *clu + required number of tabs and spaces. */ + + static void +-print_char (char c) ++print_char_single (char c) + { + if (tabify_output) + { +@@ -2319,6 +2450,74 @@ print_char (char c) + putchar (c); + } + ++#ifdef HAVE_MBRTOWC ++static void ++print_char_multi (char c) ++{ ++ static size_t mbc_pos = 0; ++ static char mbc[MB_LEN_MAX] = {'\0'}; ++ static mbstate_t state = {'\0'}; ++ mbstate_t state_bak; ++ wchar_t wc; ++ size_t mblength; ++ int width; ++ ++ if (tabify_output) ++ { ++ state_bak = state; ++ mbc[mbc_pos++] = c; ++ mblength = mbrtowc (&wc, mbc, mbc_pos, &state); ++ ++ while (mbc_pos > 0) ++ { ++ switch (mblength) ++ { ++ case (size_t)-2: ++ state = state_bak; ++ return; ++ ++ case (size_t)-1: ++ state = state_bak; ++ ++output_position; ++ putchar (mbc[0]); ++ memmove (mbc, mbc + 1, MB_CUR_MAX - 1); ++ --mbc_pos; ++ break; ++ ++ case 0: ++ mblength = 1; ++ ++ default: ++ if (wc == L' ') ++ { ++ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); ++ --mbc_pos; ++ ++spaces_not_printed; ++ return; ++ } ++ else if (spaces_not_printed > 0) ++ print_white_space (); ++ ++ /* Nonprintables are assumed to have width 0, except L'\b'. */ ++ if ((width = wcwidth (wc)) < 1) ++ { ++ if (wc == L'\b') ++ --output_position; ++ } ++ else ++ output_position += width; ++ ++ fwrite (mbc, sizeof(char), mblength, stdout); ++ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); ++ mbc_pos -= mblength; ++ } ++ } ++ return; ++ } ++ putchar (c); ++} ++#endif ++ + /* Skip to page PAGE before printing. + PAGE may be larger than total number of pages. */ + +@@ -2495,9 +2694,9 @@ read_line (COLUMN *p) + align_empty_cols = false; + } + +- if (col_sep_length < padding_not_printed) ++ if (col_sep_width < padding_not_printed) + { +- pad_across_to (padding_not_printed - col_sep_length); ++ pad_across_to (padding_not_printed - col_sep_width); + padding_not_printed = ANYWHERE; + } + +@@ -2566,7 +2765,7 @@ print_stored (COLUMN *p) + COLUMN *q; + + int line = p->current_line++; +- char *first = &buff[line_vector[line]]; ++ unsigned char *first = &buff[line_vector[line]]; + /* FIXME + UMR: Uninitialized memory read: + * This is occurring while in: +@@ -2578,7 +2777,7 @@ print_stored (COLUMN *p) + xmalloc [xmalloc.c:94] + init_store_cols [pr.c:1648] + */ +- char *last = &buff[line_vector[line + 1]]; ++ unsigned char *last = &buff[line_vector[line + 1]]; + + pad_vertically = true; + +@@ -2598,9 +2797,9 @@ print_stored (COLUMN *p) + } + } + +- if (col_sep_length < padding_not_printed) ++ if (col_sep_width < padding_not_printed) + { +- pad_across_to (padding_not_printed - col_sep_length); ++ pad_across_to (padding_not_printed - col_sep_width); + padding_not_printed = ANYWHERE; + } + +@@ -2613,8 +2812,8 @@ print_stored (COLUMN *p) + if (spaces_not_printed == 0) + { + output_position = p->start_position + end_vector[line]; +- if (p->start_position - col_sep_length == chars_per_margin) +- output_position -= col_sep_length; ++ if (p->start_position - col_sep_width == chars_per_margin) ++ output_position -= col_sep_width; + } + + return true; +@@ -2633,7 +2832,7 @@ print_stored (COLUMN *p) + number of characters is 1.) */ + + static int +-char_to_clump (char c) ++char_to_clump_single (char c) + { + unsigned char uc = c; + char *s = clump_buff; +@@ -2643,10 +2842,10 @@ char_to_clump (char c) + int chars; + int chars_per_c = 8; + +- if (c == input_tab_char) ++ if (c == input_tab_char[0]) + chars_per_c = chars_per_input_tab; + +- if (c == input_tab_char || c == '\t') ++ if (c == input_tab_char[0] || c == '\t') + { + width = TAB_WIDTH (chars_per_c, input_position); + +@@ -2727,6 +2926,164 @@ char_to_clump (char c) + return chars; + } + ++#ifdef HAVE_MBRTOWC ++static int ++char_to_clump_multi (char c) ++{ ++ static size_t mbc_pos = 0; ++ static char mbc[MB_LEN_MAX] = {'\0'}; ++ static mbstate_t state = {'\0'}; ++ mbstate_t state_bak; ++ wchar_t wc; ++ size_t mblength; ++ int wc_width; ++ register char *s = clump_buff; ++ register int i, j; ++ char esc_buff[4]; ++ int width; ++ int chars; ++ int chars_per_c = 8; ++ ++ state_bak = state; ++ mbc[mbc_pos++] = c; ++ mblength = mbrtowc (&wc, mbc, mbc_pos, &state); ++ ++ width = 0; ++ chars = 0; ++ while (mbc_pos > 0) ++ { ++ switch (mblength) ++ { ++ case (size_t)-2: ++ state = state_bak; ++ return 0; ++ ++ case (size_t)-1: ++ state = state_bak; ++ mblength = 1; ++ ++ if (use_esc_sequence || use_cntrl_prefix) ++ { ++ width = +4; ++ chars = +4; ++ *s++ = '\\'; ++ sprintf (esc_buff, "%03o", (unsigned char) mbc[0]); ++ for (i = 0; i <= 2; ++i) ++ *s++ = (int) esc_buff[i]; ++ } ++ else ++ { ++ width += 1; ++ chars += 1; ++ *s++ = mbc[0]; ++ } ++ break; ++ ++ case 0: ++ mblength = 1; ++ /* Fall through */ ++ ++ default: ++ if (memcmp (mbc, input_tab_char, mblength) == 0) ++ chars_per_c = chars_per_input_tab; ++ ++ if (memcmp (mbc, input_tab_char, mblength) == 0 || c == '\t') ++ { ++ int width_inc; ++ ++ width_inc = TAB_WIDTH (chars_per_c, input_position); ++ width += width_inc; ++ ++ if (untabify_input) ++ { ++ for (i = width_inc; i; --i) ++ *s++ = ' '; ++ chars += width_inc; ++ } ++ else ++ { ++ for (i = 0; i < mblength; i++) ++ *s++ = mbc[i]; ++ chars += mblength; ++ } ++ } ++ else if ((wc_width = wcwidth (wc)) < 1) ++ { ++ if (use_esc_sequence) ++ { ++ for (i = 0; i < mblength; i++) ++ { ++ width += 4; ++ chars += 4; ++ *s++ = '\\'; ++ sprintf (esc_buff, "%03o", (unsigned char) mbc[i]); ++ for (j = 0; j <= 2; ++j) ++ *s++ = (int) esc_buff[j]; ++ } ++ } ++ else if (use_cntrl_prefix) ++ { ++ if (wc < 0200) ++ { ++ width += 2; ++ chars += 2; ++ *s++ = '^'; ++ *s++ = wc ^ 0100; ++ } ++ else ++ { ++ for (i = 0; i < mblength; i++) ++ { ++ width += 4; ++ chars += 4; ++ *s++ = '\\'; ++ sprintf (esc_buff, "%03o", (unsigned char) mbc[i]); ++ for (j = 0; j <= 2; ++j) ++ *s++ = (int) esc_buff[j]; ++ } ++ } ++ } ++ else if (wc == L'\b') ++ { ++ width += -1; ++ chars += 1; ++ *s++ = c; ++ } ++ else ++ { ++ width += 0; ++ chars += mblength; ++ for (i = 0; i < mblength; i++) ++ *s++ = mbc[i]; ++ } ++ } ++ else ++ { ++ width += wc_width; ++ chars += mblength; ++ for (i = 0; i < mblength; i++) ++ *s++ = mbc[i]; ++ } ++ } ++ memmove (mbc, mbc + mblength, MB_CUR_MAX - mblength); ++ mbc_pos -= mblength; ++ } ++ ++ /* Too many backspaces must put us in position 0 -- never negative. */ ++ if (width < 0 && input_position == 0) ++ { ++ chars = 0; ++ input_position = 0; ++ } ++ else if (width < 0 && input_position <= -width) ++ input_position = 0; ++ else ++ input_position += width; ++ ++ return chars; ++} ++#endif ++ + /* We've just printed some files and need to clean up things before + looking for more options and printing the next batch of files. + +Index: coreutils-9.5/src/sort.c +=================================================================== +--- coreutils-9.5.orig/src/sort.c ++++ coreutils-9.5/src/sort.c +@@ -29,6 +29,14 @@ + #include + #include + #include ++#if HAVE_WCHAR_H ++# include ++#endif ++/* Get isw* functions. */ ++#if HAVE_WCTYPE_H ++# include ++#endif ++ + #include "system.h" + #include "argmatch.h" + #include "assure.h" +@@ -157,14 +165,39 @@ static int thousands_sep; + /* We currently ignore multi-byte grouping chars. */ + static bool thousands_sep_ignored; + ++/* True if -f is specified. */ ++static bool folding; ++ + /* Nonzero if the corresponding locales are hard. */ + static bool hard_LC_COLLATE; +-#if HAVE_NL_LANGINFO ++#if HAVE_LANGINFO_CODESET + static bool hard_LC_TIME; + #endif + + #define NONZERO(x) ((x) != 0) + ++/* get a multibyte character's byte length. */ ++#define GET_BYTELEN_OF_CHAR(LIM, PTR, MBLENGTH, STATE) \ ++ do \ ++ { \ ++ wchar_t wc; \ ++ mbstate_t state_bak; \ ++ \ ++ state_bak = STATE; \ ++ mblength = mbrtowc (&wc, PTR, LIM - PTR, &STATE); \ ++ \ ++ switch (MBLENGTH) \ ++ { \ ++ case (size_t)-1: \ ++ case (size_t)-2: \ ++ STATE = state_bak; \ ++ /* Fall through. */ \ ++ case 0: \ ++ MBLENGTH = 1; \ ++ } \ ++ } \ ++ while (0) ++ + /* The kind of blanks for '-b' to skip in various options. */ + enum blanktype { bl_start, bl_end, bl_both }; + +@@ -341,13 +374,11 @@ static bool stable; + /* An int value outside char range. */ + enum { NON_CHAR = CHAR_MAX + 1 }; + +-/* If TAB has this value, blanks separate fields. */ +-enum { TAB_DEFAULT = CHAR_MAX + 1 }; +- +-/* Tab character separating fields. If TAB_DEFAULT, then fields are ++/* Tab character separating fields. If tab_length is 0, then fields are + separated by the empty string between a non-blank character and a blank + character. */ +-static int tab = TAB_DEFAULT; ++static char tab[MB_LEN_MAX + 1]; ++static size_t tab_length = 0; + + /* Flag to remove consecutive duplicate lines from the output. + Only the last of a sequence of equal lines will be output. */ +@@ -804,6 +835,46 @@ reap_all (void) + reap (-1); + } + ++/* Function pointers. */ ++static void ++(*inittables) (void); ++static char * ++(*begfield) (const struct line*, const struct keyfield *); ++static char * ++(*limfield) (const struct line*, const struct keyfield *); ++static void ++(*skipblanks) (char **ptr, char *lim); ++static int ++(*getmonth) (char const *, size_t, char **); ++static int ++(*keycompare) (const struct line *, const struct line *); ++static int ++(*numcompare) (const char *, const char *); ++ ++/* Test for white space multibyte character. ++ Set LENGTH the byte length of investigated multibyte character. */ ++#if HAVE_MBRTOWC ++static int ++ismbblank (const char *str, size_t len, size_t *length) ++{ ++ size_t mblength; ++ wchar_t wc; ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof(mbstate_t)); ++ mblength = mbrtowc (&wc, str, len, &state); ++ ++ if (mblength == (size_t)-1 || mblength == (size_t)-2) ++ { ++ *length = 1; ++ return 0; ++ } ++ ++ *length = (mblength < 1) ? 1 : mblength; ++ return iswblank (wc) || wc == '\n'; ++} ++#endif ++ + /* Clean up any remaining temporary files. */ + + static void +@@ -1271,7 +1342,7 @@ zaptemp (char const *name) + free (node); + } + +-#if HAVE_NL_LANGINFO ++#if HAVE_LANGINFO_CODESET + + static int + struct_month_cmp (void const *m1, void const *m2) +@@ -1286,7 +1357,7 @@ struct_month_cmp (void const *m1, void c + /* Initialize the character class tables. */ + + static void +-inittables (void) ++inittables_uni (void) + { + size_t i; + +@@ -1298,7 +1369,7 @@ inittables (void) + fold_toupper[i] = toupper (i); + } + +-#if HAVE_NL_LANGINFO ++#if HAVE_LANGINFO_CODESET + /* If we're not in the "C" locale, read different names for months. */ + if (hard_LC_TIME) + { +@@ -1380,6 +1451,84 @@ specify_nmerge (int oi, char c, char con + xstrtol_fatal (e, oi, c, long_options, s); + } + ++#if HAVE_MBRTOWC ++static void ++inittables_mb (void) ++{ ++ int i, j, k, l; ++ char *name, *s, *lc_time, *lc_ctype; ++ size_t s_len, mblength; ++ char mbc[MB_LEN_MAX]; ++ wchar_t wc, pwc; ++ mbstate_t state_mb, state_wc; ++ ++ lc_time = setlocale (LC_TIME, ""); ++ if (lc_time) ++ lc_time = xstrdup (lc_time); ++ ++ lc_ctype = setlocale (LC_CTYPE, ""); ++ if (lc_ctype) ++ lc_ctype = xstrdup (lc_ctype); ++ ++ if (lc_time && lc_ctype) ++ /* temporarily set LC_CTYPE to match LC_TIME, so that we can convert ++ * the names of months to upper case */ ++ setlocale (LC_CTYPE, lc_time); ++ ++ for (i = 0; i < MONTHS_PER_YEAR; i++) ++ { ++ s = (char *) nl_langinfo (ABMON_1 + i); ++ s_len = strlen (s); ++ monthtab[i].name = name = (char *) xmalloc (s_len + 1); ++ monthtab[i].val = i + 1; ++ ++ memset (&state_mb, '\0', sizeof (mbstate_t)); ++ memset (&state_wc, '\0', sizeof (mbstate_t)); ++ ++ for (j = 0; j < s_len;) ++ { ++ if (!ismbblank (s + j, s_len - j, &mblength)) ++ break; ++ j += mblength; ++ } ++ ++ for (k = 0; j < s_len;) ++ { ++ mblength = mbrtowc (&wc, (s + j), (s_len - j), &state_mb); ++ assert (mblength != (size_t)-1 && mblength != (size_t)-2); ++ if (mblength == 0) ++ break; ++ ++ pwc = towupper (wc); ++ if (pwc == wc) ++ { ++ memcpy (mbc, s + j, mblength); ++ j += mblength; ++ } ++ else ++ { ++ j += mblength; ++ mblength = wcrtomb (mbc, pwc, &state_wc); ++ assert (mblength != (size_t)0 && mblength != (size_t)-1); ++ } ++ ++ for (l = 0; l < mblength; l++) ++ name[k++] = mbc[l]; ++ } ++ name[k] = '\0'; ++ } ++ qsort ((void *) monthtab, MONTHS_PER_YEAR, ++ sizeof (struct month), struct_month_cmp); ++ ++ if (lc_time && lc_ctype) ++ /* restore the original locales */ ++ setlocale (LC_CTYPE, lc_ctype); ++ ++ free (lc_ctype); ++ free (lc_time); ++} ++#endif ++ + /* Specify the amount of main memory to use when sorting. */ + static void + specify_sort_size (int oi, char c, char const *s) +@@ -1611,7 +1760,7 @@ buffer_linelim (struct buffer const *buf + by KEY in LINE. */ + + static char * +-begfield (struct line const *line, struct keyfield const *key) ++begfield_uni (const struct line *line, const struct keyfield *key) + { + char *ptr = line->text, *lim = ptr + line->length - 1; + size_t sword = key->sword; +@@ -1620,10 +1769,10 @@ begfield (struct line const *line, struc + /* The leading field separator itself is included in a field when -t + is absent. */ + +- if (tab != TAB_DEFAULT) ++ if (tab_length) + while (ptr < lim && sword--) + { +- while (ptr < lim && *ptr != tab) ++ while (ptr < lim && *ptr != tab[0]) + ++ptr; + if (ptr < lim) + ++ptr; +@@ -1649,12 +1798,71 @@ begfield (struct line const *line, struc + return ptr; + } + ++#if HAVE_MBRTOWC ++static char * ++begfield_mb (const struct line *line, const struct keyfield *key) ++{ ++ int i; ++ char *ptr = line->text, *lim = ptr + line->length - 1; ++ size_t sword = key->sword; ++ size_t schar = key->schar; ++ size_t mblength; ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof(mbstate_t)); ++ ++ if (tab_length) ++ while (ptr < lim && sword--) ++ { ++ while (ptr < lim && memcmp (ptr, tab, tab_length) != 0) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ptr += mblength; ++ } ++ if (ptr < lim) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ptr += mblength; ++ } ++ } ++ else ++ while (ptr < lim && sword--) ++ { ++ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) ++ ptr += mblength; ++ if (ptr < lim) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ptr += mblength; ++ } ++ while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength)) ++ ptr += mblength; ++ } ++ ++ if (key->skipsblanks) ++ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) ++ ptr += mblength; ++ ++ for (i = 0; i < schar; i++) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ++ if (ptr + mblength > lim) ++ break; ++ else ++ ptr += mblength; ++ } ++ ++ return ptr; ++} ++#endif ++ + /* Return the limit of (a pointer to the first character after) the field + in LINE specified by KEY. */ + + ATTRIBUTE_PURE + static char * +-limfield (struct line const *line, struct keyfield const *key) ++limfield_uni (struct line const *line, struct keyfield const *key) + { + char *ptr = line->text, *lim = ptr + line->length - 1; + size_t eword = key->eword, echar = key->echar; +@@ -1669,10 +1877,10 @@ limfield (struct line const *line, struc + 'beginning' is the first character following the delimiting TAB. + Otherwise, leave PTR pointing at the first 'blank' character after + the preceding field. */ +- if (tab != TAB_DEFAULT) ++ if (tab_length) + while (ptr < lim && eword--) + { +- while (ptr < lim && *ptr != tab) ++ while (ptr < lim && *ptr != tab[0]) + ++ptr; + if (ptr < lim && (eword || echar)) + ++ptr; +@@ -1718,10 +1926,10 @@ limfield (struct line const *line, struc + */ + + /* Make LIM point to the end of (one byte past) the current field. */ +- if (tab != TAB_DEFAULT) ++ if (tab_length) + { + char *newlim; +- newlim = memchr (ptr, tab, lim - ptr); ++ newlim = memchr (ptr, tab[0], lim - ptr); + if (newlim) + lim = newlim; + } +@@ -1752,6 +1960,130 @@ limfield (struct line const *line, struc + return ptr; + } + ++#if HAVE_MBRTOWC ++static char * _GL_ATTRIBUTE_PURE ++limfield_mb (const struct line *line, const struct keyfield *key) ++{ ++ char *ptr = line->text, *lim = ptr + line->length - 1; ++ size_t eword = key->eword, echar = key->echar; ++ int i; ++ size_t mblength; ++ mbstate_t state; ++ ++ if (echar == 0) ++ eword++; /* skip all of end field. */ ++ ++ memset (&state, '\0', sizeof(mbstate_t)); ++ ++ if (tab_length) ++ while (ptr < lim && eword--) ++ { ++ while (ptr < lim && memcmp (ptr, tab, tab_length) != 0) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ptr += mblength; ++ } ++ if (ptr < lim && (eword | echar)) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ptr += mblength; ++ } ++ } ++ else ++ while (ptr < lim && eword--) ++ { ++ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) ++ ptr += mblength; ++ if (ptr < lim) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ptr += mblength; ++ } ++ while (ptr < lim && !ismbblank (ptr, lim - ptr, &mblength)) ++ ptr += mblength; ++ } ++ ++ ++# ifdef POSIX_UNSPECIFIED ++ /* Make LIM point to the end of (one byte past) the current field. */ ++ if (tab_length) ++ { ++ char *newlim, *p; ++ ++ newlim = NULL; ++ for (p = ptr; p < lim;) ++ { ++ if (memcmp (p, tab, tab_length) == 0) ++ { ++ newlim = p; ++ break; ++ } ++ ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ p += mblength; ++ } ++ } ++ else ++ { ++ char *newlim; ++ newlim = ptr; ++ ++ while (newlim < lim && ismbblank (newlim, lim - newlim, &mblength)) ++ newlim += mblength; ++ if (ptr < lim) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ptr += mblength; ++ } ++ while (newlim < lim && !ismbblank (newlim, lim - newlim, &mblength)) ++ newlim += mblength; ++ lim = newlim; ++ } ++# endif ++ ++ if (echar != 0) ++ { ++ /* If we're skipping leading blanks, don't start counting characters ++ * until after skipping past any leading blanks. */ ++ if (key->skipeblanks) ++ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) ++ ptr += mblength; ++ ++ memset (&state, '\0', sizeof(mbstate_t)); ++ ++ /* Advance PTR by ECHAR (if possible), but no further than LIM. */ ++ for (i = 0; i < echar; i++) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ ++ if (ptr + mblength > lim) ++ break; ++ else ++ ptr += mblength; ++ } ++ } ++ ++ return ptr; ++} ++#endif ++ ++static void ++skipblanks_uni (char **ptr, char *lim) ++{ ++ while (*ptr < lim && blanks[to_uchar (**ptr)]) ++ ++(*ptr); ++} ++ ++#if HAVE_MBRTOWC ++static void ++skipblanks_mb (char **ptr, char *lim) ++{ ++ size_t mblength; ++ while (*ptr < lim && ismbblank (*ptr, lim - *ptr, &mblength)) ++ (*ptr) += mblength; ++} ++#endif ++ + /* Fill BUF reading from FP, moving buf->left bytes from the end + of buf->buf to the beginning first. If EOF is reached and the + file wasn't terminated by a newline, supply one. Set up BUF's line +@@ -1838,8 +2170,22 @@ fillbuf (struct buffer *buf, FILE *fp, c + else + { + if (key->skipsblanks) +- while (blanks[to_uchar (*line_start)]) +- line_start++; ++ { ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1) ++ { ++ size_t mblength; ++ while (line_start < line->keylim && ++ ismbblank (line_start, ++ line->keylim - line_start, ++ &mblength)) ++ line_start += mblength; ++ } ++ else ++#endif ++ while (blanks[to_uchar (*line_start)]) ++ line_start++; ++ } + line->keybeg = line_start; + } + } +@@ -1977,12 +2323,10 @@ find_unit_order (char const *number) + + ATTRIBUTE_PURE + static int +-human_numcompare (char const *a, char const *b) ++human_numcompare (char *a, char *b) + { +- while (blanks[to_uchar (*a)]) +- a++; +- while (blanks[to_uchar (*b)]) +- b++; ++ skipblanks(&a, a + strlen(a)); ++ skipblanks(&b, b + strlen(b)); + + int diff = find_unit_order (a) - find_unit_order (b); + return (diff ? diff : strnumcmp (a, b, decimal_point, thousands_sep)); +@@ -1994,7 +2338,7 @@ human_numcompare (char const *a, char co + + ATTRIBUTE_PURE + static int +-numcompare (char const *a, char const *b) ++numcompare_uni (const char *a, const char *b) + { + while (blanks[to_uchar (*a)]) + a++; +@@ -2004,6 +2348,25 @@ numcompare (char const *a, char const *b + return strnumcmp (a, b, decimal_point, thousands_sep); + } + ++#if HAVE_MBRTOWC ++static int ++numcompare_mb (const char *a, const char *b) ++{ ++ size_t mblength, len; ++ len = strlen (a); /* okay for UTF-8 */ ++ while (*a && ismbblank (a, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength)) ++ { ++ a += mblength; ++ len -= mblength; ++ } ++ len = strlen (b); /* okay for UTF-8 */ ++ while (*b && ismbblank (b, len > MB_CUR_MAX ? MB_CUR_MAX : len, &mblength)) ++ b += mblength; ++ ++ return strnumcmp (a, b, decimal_point, thousands_sep); ++} ++#endif /* HAV_EMBRTOWC */ ++ + static int + nan_compare (long double a, long double b) + { +@@ -2045,7 +2408,7 @@ general_numcompare (char const *sa, char + Return 0 if the name in S is not recognized. */ + + static int +-getmonth (char const *month, char **ea) ++getmonth_uni (char const *month, size_t len, char **ea) + { + size_t lo = 0; + size_t hi = MONTHS_PER_YEAR; +@@ -2372,15 +2735,14 @@ debug_key (struct line const *line, stru + char saved = *lim; + *lim = '\0'; + +- while (blanks[to_uchar (*beg)]) +- beg++; ++ skipblanks (&beg, lim); + + char *tighter_lim = beg; + + if (lim < beg) + tighter_lim = lim; + else if (key->month) +- getmonth (beg, &tighter_lim); ++ getmonth (beg, lim-beg, &tighter_lim); + else if (key->general_numeric) + ignore_value (strtold (beg, &tighter_lim)); + else if (key->numeric || key->human_numeric) +@@ -2526,7 +2888,7 @@ key_warnings (struct keyfield const *gke + /* Warn about significant leading blanks. */ + bool implicit_skip = key_numeric (key) || key->month; + bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */ +- if (!zero_width && !gkey_only && tab == TAB_DEFAULT && !line_offset ++ if (!zero_width && !gkey_only && !tab_length && !line_offset + && ((!key->skipsblanks && !implicit_skip) + || (!key->skipsblanks && key->schar) + || (!key->skipeblanks && key->echar))) +@@ -2574,9 +2936,9 @@ key_warnings (struct keyfield const *gke + bool number_locale_warned = false; + if (basic_numeric_field_span) + { +- if (tab == TAB_DEFAULT +- ? thousands_sep != NON_CHAR && (isblank (to_uchar (thousands_sep))) +- : tab == thousands_sep) ++ if (tab_length ++ ? tab[0] == thousands_sep ++ : thousands_sep != NON_CHAR && (isblank (to_uchar (thousands_sep)))) + { + error (0, 0, + _("field separator %s is treated as a " +@@ -2587,9 +2949,9 @@ key_warnings (struct keyfield const *gke + } + if (basic_numeric_field_span || general_numeric_field_span) + { +- if (tab == TAB_DEFAULT +- ? thousands_sep != NON_CHAR && (isblank (to_uchar (decimal_point))) +- : tab == decimal_point) ++ if (tab_length ++ ? tab[0] == decimal_point ++ : thousands_sep != NON_CHAR && (isblank (to_uchar (decimal_point)))) + { + error (0, 0, + _("field separator %s is treated as a " +@@ -2597,19 +2959,19 @@ key_warnings (struct keyfield const *gke + quote (((char []) {decimal_point, 0}))); + number_locale_warned = true; + } +- else if (tab == '-') ++ else if (tab_length && tab[0] == '-') + { + error (0, 0, + _("field separator %s is treated as a " + "minus sign in numbers"), +- quote (((char []) {tab, 0}))); ++ quote (((char []) {tab[0], 0}))); + } +- else if (general_numeric_field_span && tab == '+') ++ else if (general_numeric_field_span && tab_length && tab[0] == '+') + { + error (0, 0, + _("field separator %s is treated as a " + "plus sign in numbers"), +- quote (((char []) {tab, 0}))); ++ quote (((char []) {tab[0], 0}))); + } + } + +@@ -2620,7 +2982,7 @@ key_warnings (struct keyfield const *gke + { + error (0, 0, + _("%snumbers use %s as a decimal point in this locale"), +- tab == decimal_point ? "" : _("note "), ++ (tab_length && tab[0] == decimal_point) ? "" : _("note "), + quote (((char []) {decimal_point, 0}))); + + } +@@ -2662,11 +3024,87 @@ diff_reversed (int diff, bool reversed) + return reversed ? (diff < 0) - (diff > 0) : diff; + } + ++#if HAVE_MBRTOWC ++static int ++getmonth_mb (const char *s, size_t len, char **ea) ++{ ++ char *month; ++ register size_t i; ++ register int lo = 0, hi = MONTHS_PER_YEAR, result; ++ char *tmp; ++ size_t wclength, mblength; ++ const char *pp; ++ const wchar_t *wpp; ++ wchar_t *month_wcs; ++ mbstate_t state; ++ ++ while (len > 0 && ismbblank (s, len, &mblength)) ++ { ++ s += mblength; ++ len -= mblength; ++ } ++ ++ if (len == 0) ++ return 0; ++ ++ if (SIZE_MAX - len < 1) ++ xalloc_die (); ++ ++ month = (char *) xnmalloc (len + 1, MB_CUR_MAX); ++ ++ pp = tmp = (char *) xnmalloc (len + 1, MB_CUR_MAX); ++ memcpy (tmp, s, len); ++ tmp[len] = '\0'; ++ wpp = month_wcs = (wchar_t *) xnmalloc (len + 1, sizeof (wchar_t)); ++ memset (&state, '\0', sizeof (mbstate_t)); ++ ++ wclength = mbsrtowcs (month_wcs, &pp, len + 1, &state); ++ if (wclength == (size_t)-1 || pp != NULL) ++ error (SORT_FAILURE, 0, _("Invalid multibyte input %s."), quote(s)); ++ ++ for (i = 0; i < wclength; i++) ++ { ++ month_wcs[i] = towupper(month_wcs[i]); ++ if (iswblank (month_wcs[i])) ++ { ++ month_wcs[i] = L'\0'; ++ break; ++ } ++ } ++ ++ mblength = wcsrtombs (month, &wpp, (len + 1) * MB_CUR_MAX, &state); ++ assert (mblength != (-1) && wpp == NULL); ++ ++ do ++ { ++ int ix = (lo + hi) / 2; ++ ++ if (strncmp (month, monthtab[ix].name, strlen (monthtab[ix].name)) < 0) ++ hi = ix; ++ else ++ lo = ix; ++ } ++ while (hi - lo > 1); ++ ++ result = (!strncmp (month, monthtab[lo].name, strlen (monthtab[lo].name)) ++ ? monthtab[lo].val : 0); ++ ++ if (ea && result) ++ *ea = (char*) s + strlen (monthtab[lo].name); ++ ++ free (month); ++ free (tmp); ++ free (month_wcs); ++ ++ return result; ++} ++#endif ++ + /* Compare two lines A and B trying every key in sequence until there + are no more keys or a difference is found. */ + + static int +-keycompare (struct line const *a, struct line const *b) ++keycompare_uni (const struct line *a, const struct line *b) + { + struct keyfield *key = keylist; + +@@ -2747,7 +3185,7 @@ keycompare (struct line const *a, struct + else if (key->human_numeric) + diff = human_numcompare (ta, tb); + else if (key->month) +- diff = getmonth (ta, nullptr) - getmonth (tb, nullptr); ++ diff = getmonth (ta, tlena, nullptr) - getmonth (tb, tlenb, nullptr); + else if (key->random) + diff = compare_random (ta, tlena, tb, tlenb); + else if (key->version) +@@ -2857,6 +3295,211 @@ keycompare (struct line const *a, struct + return diff_reversed (diff, key->reverse); + } + ++#if HAVE_MBRTOWC ++static int ++keycompare_mb (const struct line *a, const struct line *b) ++{ ++ struct keyfield *key = keylist; ++ ++ /* For the first iteration only, the key positions have been ++ precomputed for us. */ ++ char *texta = a->keybeg; ++ char *textb = b->keybeg; ++ char *lima = a->keylim; ++ char *limb = b->keylim; ++ ++ size_t mblength_a, mblength_b; ++ wchar_t wc_a, wc_b; ++ mbstate_t state_a, state_b; ++ ++ int diff = 0; ++ ++ memset (&state_a, '\0', sizeof(mbstate_t)); ++ memset (&state_b, '\0', sizeof(mbstate_t)); ++ /* Ignore keys with start after end. */ ++ if (a->keybeg - a->keylim > 0) ++ return 0; ++ ++ ++ /* Ignore and/or translate chars before comparing. */ ++# define IGNORE_CHARS(NEW_LEN, LEN, TEXT, COPY, WC, MBLENGTH, STATE) \ ++ do \ ++ { \ ++ wchar_t uwc; \ ++ char mbc[MB_LEN_MAX]; \ ++ mbstate_t state_wc; \ ++ \ ++ for (NEW_LEN = i = 0; i < LEN;) \ ++ { \ ++ mbstate_t state_bak; \ ++ \ ++ state_bak = STATE; \ ++ MBLENGTH = mbrtowc (&WC, TEXT + i, LEN - i, &STATE); \ ++ \ ++ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1 \ ++ || MBLENGTH == 0) \ ++ { \ ++ if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1) \ ++ STATE = state_bak; \ ++ if (!ignore) \ ++ COPY[NEW_LEN++] = TEXT[i]; \ ++ i++; \ ++ continue; \ ++ } \ ++ \ ++ if (ignore) \ ++ { \ ++ if ((ignore == nonprinting && !iswprint (WC)) \ ++ || (ignore == nondictionary \ ++ && !iswalnum (WC) && !iswblank (WC))) \ ++ { \ ++ i += MBLENGTH; \ ++ continue; \ ++ } \ ++ } \ ++ \ ++ if (translate) \ ++ { \ ++ \ ++ uwc = towupper(WC); \ ++ if (WC == uwc) \ ++ { \ ++ memcpy (mbc, TEXT + i, MBLENGTH); \ ++ i += MBLENGTH; \ ++ } \ ++ else \ ++ { \ ++ i += MBLENGTH; \ ++ WC = uwc; \ ++ memset (&state_wc, '\0', sizeof (mbstate_t)); \ ++ \ ++ MBLENGTH = wcrtomb (mbc, WC, &state_wc); \ ++ assert (MBLENGTH != (size_t)-1 && MBLENGTH != 0); \ ++ } \ ++ \ ++ for (j = 0; j < MBLENGTH; j++) \ ++ COPY[NEW_LEN++] = mbc[j]; \ ++ } \ ++ else \ ++ for (j = 0; j < MBLENGTH; j++) \ ++ COPY[NEW_LEN++] = TEXT[i++]; \ ++ } \ ++ COPY[NEW_LEN] = '\0'; \ ++ } \ ++ while (0) ++ ++ /* Actually compare the fields. */ ++ ++ for (;;) ++ { ++ /* Find the lengths. */ ++ size_t lena = lima <= texta ? 0 : lima - texta; ++ size_t lenb = limb <= textb ? 0 : limb - textb; ++ ++ char enda IF_LINT (= 0); ++ char endb IF_LINT (= 0); ++ ++ char const *translate = key->translate; ++ bool const *ignore = key->ignore; ++ ++ if (ignore || translate) ++ { ++ if (SIZE_MAX - lenb - 2 < lena) ++ xalloc_die (); ++ char *copy_a = (char *) xnmalloc (lena + lenb + 2, MB_CUR_MAX); ++ char *copy_b = copy_a + lena * MB_CUR_MAX + 1; ++ size_t new_len_a, new_len_b; ++ size_t i, j; ++ ++ IGNORE_CHARS (new_len_a, lena, texta, copy_a, ++ wc_a, mblength_a, state_a); ++ IGNORE_CHARS (new_len_b, lenb, textb, copy_b, ++ wc_b, mblength_b, state_b); ++ texta = copy_a; textb = copy_b; ++ lena = new_len_a; lenb = new_len_b; ++ } ++ else ++ { ++ /* Use the keys in-place, temporarily null-terminated. */ ++ enda = texta[lena]; texta[lena] = '\0'; ++ endb = textb[lenb]; textb[lenb] = '\0'; ++ } ++ ++ if (key->random) ++ diff = compare_random (texta, lena, textb, lenb); ++ else if (key->numeric | key->general_numeric | key->human_numeric) ++ { ++ char savea = *lima, saveb = *limb; ++ ++ *lima = *limb = '\0'; ++ diff = (key->numeric ? numcompare (texta, textb) ++ : key->general_numeric ? general_numcompare (texta, textb) ++ : human_numcompare (texta, textb)); ++ *lima = savea, *limb = saveb; ++ } ++ else if (key->version) ++ diff = filevercmp (texta, textb); ++ else if (key->month) ++ diff = getmonth (texta, lena, NULL) - getmonth (textb, lenb, NULL); ++ else if (lena == 0) ++ diff = - NONZERO (lenb); ++ else if (lenb == 0) ++ diff = 1; ++ else if (hard_LC_COLLATE && !folding) ++ { ++ diff = xmemcoll0 (texta, lena + 1, textb, lenb + 1); ++ } ++ else ++ { ++ diff = memcmp (texta, textb, MIN (lena, lenb)); ++ if (diff == 0) ++ diff = lena < lenb ? -1 : lena != lenb; ++ } ++ ++ if (ignore || translate) ++ free (texta); ++ else ++ { ++ texta[lena] = enda; ++ textb[lenb] = endb; ++ } ++ ++ if (diff) ++ goto not_equal; ++ ++ key = key->next; ++ if (! key) ++ break; ++ ++ /* Find the beginning and limit of the next field. */ ++ if (key->eword != -1) ++ lima = limfield (a, key), limb = limfield (b, key); ++ else ++ lima = a->text + a->length - 1, limb = b->text + b->length - 1; ++ ++ if (key->sword != -1) ++ texta = begfield (a, key), textb = begfield (b, key); ++ else ++ { ++ texta = a->text, textb = b->text; ++ if (key->skipsblanks) ++ { ++ while (texta < lima && ismbblank (texta, lima - texta, &mblength_a)) ++ texta += mblength_a; ++ while (textb < limb && ismbblank (textb, limb - textb, &mblength_b)) ++ textb += mblength_b; ++ } ++ } ++ } ++ ++not_equal: ++ if (key && key->reverse) ++ return -diff; ++ else ++ return diff; ++} ++#endif ++ + /* Compare two lines A and B, returning negative, zero, or positive + depending on whether A compares less than, equal to, or greater than B. */ + +@@ -2884,7 +3527,7 @@ compare (struct line const *a, struct li + diff = - NONZERO (blen); + else if (blen == 0) + diff = 1; +- else if (hard_LC_COLLATE) ++ else if (hard_LC_COLLATE && !folding) + { + /* xmemcoll0 is a performance enhancement as + it will not unconditionally write '\0' after the +@@ -4272,6 +4915,7 @@ set_ordering (char const *s, struct keyf + break; + case 'f': + key->translate = fold_toupper; ++ folding = true; + break; + case 'g': + key->general_numeric = true; +@@ -4351,7 +4995,7 @@ main (int argc, char **argv) + initialize_exit_failure (SORT_FAILURE); + + hard_LC_COLLATE = hard_locale (LC_COLLATE); +-#if HAVE_NL_LANGINFO ++#if HAVE_LANGINFO_CODESET + hard_LC_TIME = hard_locale (LC_TIME); + #endif + +@@ -4374,6 +5018,29 @@ main (int argc, char **argv) + thousands_sep = NON_CHAR; + } + ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1) ++ { ++ inittables = inittables_mb; ++ begfield = begfield_mb; ++ limfield = limfield_mb; ++ skipblanks = skipblanks_mb; ++ getmonth = getmonth_mb; ++ keycompare = keycompare_mb; ++ numcompare = numcompare_mb; ++ } ++ else ++#endif ++ { ++ inittables = inittables_uni; ++ begfield = begfield_uni; ++ limfield = limfield_uni; ++ skipblanks = skipblanks_uni; ++ getmonth = getmonth_uni; ++ keycompare = keycompare_uni; ++ numcompare = numcompare_uni; ++ } ++ + have_read_stdin = false; + inittables (); + +@@ -4644,13 +5311,34 @@ main (int argc, char **argv) + + case 't': + { +- char newtab = optarg[0]; +- if (! newtab) ++ char newtab[MB_LEN_MAX + 1]; ++ size_t newtab_length = 1; ++ strncpy (newtab, optarg, MB_LEN_MAX); ++ if (! newtab[0]) + error (SORT_FAILURE, 0, _("empty tab")); +- if (optarg[1]) ++#if HAVE_MBRTOWC ++ if (MB_CUR_MAX > 1) ++ { ++ wchar_t wc; ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof (mbstate_t)); ++ newtab_length = mbrtowc (&wc, newtab, strnlen (newtab, ++ MB_LEN_MAX), ++ &state); ++ switch (newtab_length) ++ { ++ case (size_t) -1: ++ case (size_t) -2: ++ case 0: ++ newtab_length = 1; ++ } ++ } ++#endif ++ if (newtab_length == 1 && optarg[1]) + { + if (STREQ (optarg, "\\0")) +- newtab = '\0'; ++ newtab[0] = '\0'; + else + { + /* Provoke with 'sort -txx'. Complain about +@@ -4661,9 +5349,11 @@ main (int argc, char **argv) + quote (optarg)); + } + } +- if (tab != TAB_DEFAULT && tab != newtab) ++ if (tab_length && (tab_length != newtab_length ++ || memcmp (tab, newtab, tab_length) != 0)) + error (SORT_FAILURE, 0, _("incompatible tabs")); +- tab = newtab; ++ memcpy (tab, newtab, newtab_length); ++ tab_length = newtab_length; + } + break; + +Index: coreutils-9.5/src/unexpand.c +=================================================================== +--- coreutils-9.5.orig/src/unexpand.c ++++ coreutils-9.5/src/unexpand.c +@@ -39,6 +39,9 @@ + #include + #include + #include ++ ++#include ++ + #include "system.h" + #include "expand-common.h" + +@@ -105,24 +108,47 @@ unexpand (void) + { + /* Input stream. */ + FILE *fp = next_file (nullptr); ++ mb_file_t mbf; + + /* The array of pending blanks. In non-POSIX locales, blanks can + include characters other than spaces, so the blanks must be + stored, not merely counted. */ +- char *pending_blank; ++ mbf_char_t *pending_blank; ++ /* True if the starting locale is utf8. */ ++ bool using_utf_locale; ++ ++ /* True if the first file contains BOM header. */ ++ bool found_bom; ++ using_utf_locale=check_utf_locale(); + + if (!fp) + return; ++ mbf_init (mbf, fp); ++ found_bom=check_bom(fp,&mbf); + ++ if (using_utf_locale == false && found_bom == true) ++ { ++ /*try using some predefined locale */ ++ ++ if (set_utf_locale () != 0) ++ { ++ error (EXIT_FAILURE, errno, _("cannot set UTF-8 locale")); ++ } ++ } + /* The worst case is a non-blank character, then one blank, then a + tab stop, then MAX_COLUMN_WIDTH - 1 blanks, then a non-blank; so + allocate MAX_COLUMN_WIDTH bytes to store the blanks. */ +- pending_blank = xmalloc (max_column_width); ++ pending_blank = xmalloc (max_column_width * sizeof (mbf_char_t)); ++ ++ if (found_bom == true) ++ { ++ print_bom(); ++ } + + while (true) + { + /* Input character, or EOF. */ +- int c; ++ mbf_char_t c; + + /* If true, perform translations. */ + bool convert = true; +@@ -156,12 +182,44 @@ unexpand (void) + + do + { +- while ((c = getc (fp)) < 0 && (fp = next_file (fp))) +- continue; ++ while (true) { ++ mbf_getc (c, mbf); ++ if ((mb_iseof (c)) && (fp = next_file (fp))) ++ { ++ mbf_init (mbf, fp); ++ if (fp!=NULL) ++ { ++ if (check_bom(fp,&mbf)==true) ++ { ++ /*Not the first file - check BOM header*/ ++ if (using_utf_locale==false && found_bom==false) ++ { ++ /*BOM header in subsequent file but not in the first one. */ ++ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); ++ } ++ } ++ else ++ { ++ if(using_utf_locale==false && found_bom==true) ++ { ++ /*First file conatined BOM header - locale was switched to UTF ++ *all subsequent files should contain BOM. */ ++ error (EXIT_FAILURE, errno, _("combination of files with and without BOM header")); ++ } ++ } ++ } ++ continue; ++ } ++ else ++ { ++ break; ++ } ++ } ++ + + if (convert) + { +- bool blank = !! isblank (c); ++ bool blank = mb_isblank (c); + + if (blank) + { +@@ -178,16 +236,16 @@ unexpand (void) + if (next_tab_column < column) + error (EXIT_FAILURE, 0, _("input line is too long")); + +- if (c == '\t') ++ if (mb_iseq (c, '\t')) + { + column = next_tab_column; + + if (pending) +- pending_blank[0] = '\t'; ++ mb_setascii (&pending_blank[0], '\t'); + } + else + { +- column++; ++ column += mb_width (c); + + if (! (prev_blank && column == next_tab_column)) + { +@@ -195,13 +253,14 @@ unexpand (void) + will be replaced by tabs. */ + if (column == next_tab_column) + one_blank_before_tab_stop = true; +- pending_blank[pending++] = c; ++ mb_copy (&pending_blank[pending++], &c); + prev_blank = true; + continue; + } + + /* Replace the pending blanks by a tab or two. */ +- pending_blank[0] = c = '\t'; ++ mb_setascii (&c, '\t'); ++ mb_setascii (&pending_blank[0], '\t'); + } + + /* Discard pending blanks, unless it was a single +@@ -209,7 +268,7 @@ unexpand (void) + pending = one_blank_before_tab_stop; + } + } +- else if (c == '\b') ++ else if (mb_iseq (c, '\b')) + { + /* Go back one column, and force recalculation of the + next tab stop. */ +@@ -219,16 +278,20 @@ unexpand (void) + } + else + { +- column++; +- if (!column) ++ const uintmax_t orig_column = column; ++ column += mb_width (c); ++ if (column < orig_column) + error (EXIT_FAILURE, 0, _("input line is too long")); + } + + if (pending) + { + if (pending > 1 && one_blank_before_tab_stop) +- pending_blank[0] = '\t'; +- if (fwrite (pending_blank, 1, pending, stdout) != pending) ++ mb_setascii (&pending_blank[0], '\t'); ++ ++ for (int n = 0; n < pending; ++n) ++ mb_putc (pending_blank[n], stdout); ++ if (ferror (stdout)) + write_error (); + pending = 0; + one_blank_before_tab_stop = false; +@@ -238,16 +301,17 @@ unexpand (void) + convert &= convert_entire_line || blank; + } + +- if (c < 0) ++ if (mb_iseof (c)) + { + free (pending_blank); + return; + } + +- if (putchar (c) < 0) ++ mb_putc (c, stdout); ++ if (ferror (stdout)) + write_error (); + } +- while (c != '\n'); ++ while (!mb_iseq (c, '\n')); + } + } + +Index: coreutils-9.5/tests/Coreutils.pm +=================================================================== +--- coreutils-9.5.orig/tests/Coreutils.pm ++++ coreutils-9.5/tests/Coreutils.pm +@@ -269,6 +269,9 @@ sub run_tests ($$$$$) + # Yes, this is an arbitrary limit. If it causes trouble, + # consider removing it. + my $max = 30; ++ # The downstream i18n multi-byte tests have a "-mb" suffix. ++ # Therefore add 3 to the maximum test name length. ++ $max += 3; + if ($max < length $test_name) + { + warn "$program_name: $test_name: test name is too long (> $max)\n"; +Index: coreutils-9.5/tests/expand/mb.sh +=================================================================== +--- /dev/null ++++ coreutils-9.5/tests/expand/mb.sh +@@ -0,0 +1,183 @@ ++#!/bin/sh ++ ++# Copyright (C) 2012-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 . ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ expand ++ ++export LC_ALL=en_US.UTF-8 ++ ++#input containing multibyte characters ++cat <<\EOF > in || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++EOF ++env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ ++ ++cat <<\EOF > exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#multiple files as an input ++cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++expand ./in ./in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#test characters with display widths != 1 ++env printf '12345678 ++e\t|ascii(1) ++\u00E9\t|composed(1) ++e\u0301\t|decomposed(1) ++\u3000\t|ideo-space(2) ++\uFF0D\t|full-hypen(2) ++' > in || framework_failure_ ++ ++env printf '12345678 ++e |ascii(1) ++\u00E9 |composed(1) ++e\u0301 |decomposed(1) ++\u3000 |ideo-space(2) ++\uFF0D |full-hypen(2) ++' > exp || framework_failure_ ++ ++expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#shouldn't fail with "input line too long" ++#when a line starts with a control character ++env printf '\n' > in || framework_failure_ ++ ++expand < in > out || fail=1 ++compare in out > /dev/null 2>&1 || fail=1 ++ ++#non-Unicode characters interspersed between Unicode ones ++env printf '12345678 ++\t\xFF| ++\xFF\t| ++\t\xFFä| ++ä\xFF\t| ++\tä\xFF| ++\xFF\tä| ++äbcdef\xFF\t| ++' > in || framework_failure_ ++ ++env printf '12345678 ++ \xFF| ++\xFF | ++ \xFFä| ++ä\xFF | ++ ä\xFF| ++\xFF ä| ++äbcdef\xFF | ++' > exp || framework_failure_ ++ ++expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++ ++ ++#BOM header test 1 ++printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++EOF ++env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ ++ ++printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++ ++expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LANG=C expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LC_ALL=C expand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++ ++printf '\xEF\xBB\xBF' > in1; cat <<\EOF >> in1 || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++EOF ++env printf ' äöü\t. öüä. \tä xx\n' >> in1 || framework_failure_ ++ ++ ++printf '\xEF\xBB\xBF' > exp; cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++expand in1 in1 > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LANG=C expand in1 in1 > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LC_ALL=C expand in1 in1 > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++exit $fail +Index: coreutils-9.5/tests/i18n/sort.sh +=================================================================== +--- /dev/null ++++ coreutils-9.5/tests/i18n/sort.sh +@@ -0,0 +1,29 @@ ++#!/bin/sh ++# Verify sort's multi-byte support. ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ sort ++ ++export LC_ALL=en_US.UTF-8 ++locale -k LC_CTYPE | grep -q "charmap.*UTF-8" \ ++ || skip_ "No UTF-8 locale available" ++ ++# Enable heap consistency checkng on older systems ++export MALLOC_CHECK_=2 ++ ++ ++# check buffer overflow issue due to ++# expanding multi-byte representation due to case conversion ++# https://bugzilla.suse.com/show_bug.cgi?id=928749 ++cat < exp ++. ++É‘ ++EOF ++cat < out || fail=1 ++. ++É‘ ++EOF ++compare exp out || { fail=1; cat out; } ++ ++ ++Exit $fail +Index: coreutils-9.5/tests/local.mk +=================================================================== +--- coreutils-9.5.orig/tests/local.mk ++++ coreutils-9.5/tests/local.mk +@@ -387,6 +387,8 @@ all_tests = \ + tests/sort/sort-discrim.sh \ + tests/sort/sort-files0-from.pl \ + tests/sort/sort-float.sh \ ++ tests/misc/sort-mb-tests.sh \ ++ tests/i18n/sort.sh \ + tests/sort/sort-h-thousands-sep.sh \ + tests/sort/sort-merge.pl \ + tests/sort/sort-merge-fdlimit.sh \ +@@ -590,6 +592,7 @@ all_tests = \ + tests/du/threshold.sh \ + tests/du/trailing-slash.sh \ + tests/du/two-args.sh \ ++ tests/expand/mb.sh \ + tests/id/gnu-zero-uids.sh \ + tests/id/no-context.sh \ + tests/id/context.sh \ +@@ -746,6 +749,7 @@ all_tests = \ + tests/touch/read-only.sh \ + tests/touch/relative.sh \ + tests/touch/trailing-slash.sh \ ++ tests/unexpand/mb.sh \ + $(all_root_tests) + + # See tests/factor/create-test.sh. +Index: coreutils-9.5/tests/misc/expand.pl +=================================================================== +--- coreutils-9.5.orig/tests/misc/expand.pl ++++ coreutils-9.5/tests/misc/expand.pl +@@ -27,6 +27,15 @@ my $prog = 'expand'; + # Turn off localization of executable's output. + @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; + ++#comment out next line to disable multibyte tests ++my $mb_locale = $ENV{LOCALE_FR_UTF8}; ++! defined $mb_locale || $mb_locale eq 'none' ++ and $mb_locale = 'C'; ++ ++my $prog = 'expand'; ++my $try = "Try \`$prog --help' for more information.\n"; ++my $inval = "$prog: invalid byte, character or field list\n$try"; ++ + my @Tests = + ( + ['t1', '--tabs=3', {IN=>"a\tb"}, {OUT=>"a b"}], +@@ -168,6 +177,8 @@ my @Tests = + + + # Test errors ++ # FIXME: The following tests contain ‘quoting’ specific to LC_MESSAGES ++ # So we force LC_MESSAGES=C to make them pass. + ['e1', '--tabs="a"', {IN=>''}, {OUT=>''}, {EXIT=>1}, + {ERR => "$prog: tab size contains invalid character(s): 'a'\n"}], + ['e2', "-t $UINTMAX_OFLOW", {IN=>''}, {OUT=>''}, {EXIT=>1}, +@@ -184,6 +195,37 @@ my @Tests = + {ERR => "$prog: '/' specifier not at start of number: '/'\n"}], + ); + ++if ($mb_locale ne 'C') ++ { ++ # Duplicate each test vector, appending "-mb" to the test name and ++ # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we ++ # provide coverage for the distro-added multi-byte code paths. ++ my @new; ++ foreach my $t (@Tests) ++ { ++ my @new_t = @$t; ++ my $test_name = shift @new_t; ++ ++ # Depending on whether expand is multi-byte-patched, ++ # it emits different diagnostics: ++ # non-MB: invalid byte or field list ++ # MB: invalid byte, character or field list ++ # Adjust the expected error output accordingly. ++ if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval} ++ (@new_t)) ++ { ++ my $sub = {ERR_SUBST => 's/, character//'}; ++ push @new_t, $sub; ++ push @$t, $sub; ++ } ++ push @new, ["$test_name-mb", @new_t, {ENV => "LANG=$mb_locale LC_MESSAGES=C"}]; ++ } ++ push @Tests, @new; ++ } ++ ++ ++@Tests = triple_test \@Tests; ++ + my $save_temps = $ENV{DEBUG}; + my $verbose = $ENV{VERBOSE}; + +Index: coreutils-9.5/tests/misc/fold.pl +=================================================================== +--- coreutils-9.5.orig/tests/misc/fold.pl ++++ coreutils-9.5/tests/misc/fold.pl +@@ -20,9 +20,18 @@ use strict; + + (my $program_name = $0) =~ s|.*/||; + ++my $prog = 'fold'; ++my $try = "Try \`$prog --help' for more information.\n"; ++my $inval = "$prog: invalid byte, character or field list\n$try"; ++ + # Turn off localization of executable's output. + @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; + ++# uncommented to enable multibyte paths ++my $mb_locale = $ENV{LOCALE_FR_UTF8}; ++! defined $mb_locale || $mb_locale eq 'none' ++ and $mb_locale = 'C'; ++ + my @Tests = + ( + ['s1', '-w2 -s', {IN=>"a\t"}, {OUT=>"a\n\t"}], +@@ -31,9 +40,48 @@ my @Tests = + ['s4', '-w4 -s', {IN=>"abc ef\n"}, {OUT=>"abc \nef\n"}], + ); + ++# Add _POSIX2_VERSION=199209 to the environment of each test ++# that uses an old-style option like +1. ++if ($mb_locale ne 'C') ++ { ++ # Duplicate each test vector, appending "-mb" to the test name and ++ # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we ++ # provide coverage for the distro-added multi-byte code paths. ++ my @new; ++ foreach my $t (@Tests) ++ { ++ my @new_t = @$t; ++ my $test_name = shift @new_t; ++ ++ # Depending on whether fold is multi-byte-patched, ++ # it emits different diagnostics: ++ # non-MB: invalid byte or field list ++ # MB: invalid byte, character or field list ++ # Adjust the expected error output accordingly. ++ if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval} ++ (@new_t)) ++ { ++ my $sub = {ERR_SUBST => 's/, character//'}; ++ push @new_t, $sub; ++ push @$t, $sub; ++ } ++ push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; ++ } ++ push @Tests, @new; ++ } ++ ++@Tests = triple_test \@Tests; ++ ++# Remember that triple_test creates from each test with exactly one "IN" ++# file two more tests (.p and .r suffix on name) corresponding to reading ++# input from a file and from a pipe. The pipe-reading test would fail ++# due to a race condition about 1 in 20 times. ++# Remove the IN_PIPE version of the "output-is-input" test above. ++# The others aren't susceptible because they have three inputs each. ++@Tests = grep {$_->[0] ne 'output-is-input.p'} @Tests; ++ + my $save_temps = $ENV{DEBUG}; + my $verbose = $ENV{VERBOSE}; + +-my $prog = 'fold'; + my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose); + exit $fail; +Index: coreutils-9.5/tests/misc/sort-mb-tests.sh +=================================================================== +--- /dev/null ++++ coreutils-9.5/tests/misc/sort-mb-tests.sh +@@ -0,0 +1,45 @@ ++#!/bin/sh ++# Verify sort's multi-byte support. ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ sort ++ ++export LC_ALL=en_US.UTF-8 ++locale -k LC_CTYPE | grep -q "charmap.*UTF-8" \ ++ || skip_ "No UTF-8 locale available" ++ ++ ++cat < exp ++Bananaï¼ 5 ++Appleï¼ 10 ++Citrusï¼ 20 ++Cherryï¼ 30 ++EOF ++ ++cat < out || fail=1 ++Appleï¼ 10 ++Bananaï¼ 5 ++Citrusï¼ 20 ++Cherryï¼ 30 ++EOF ++ ++compare exp out || { fail=1; cat out; } ++ ++ ++cat < exp ++Citrus@AA20ï¼ ï¼ 5 ++Cherry@AA30ï¼ ï¼ 10 ++Apple@AA10ï¼ ï¼ 20 ++Banana@AA5ï¼ ï¼ 30 ++EOF ++ ++cat < out || fail=1 ++Apple@AA10ï¼ ï¼ 20 ++Banana@AA5ï¼ ï¼ 30 ++Citrus@AA20ï¼ ï¼ 5 ++Cherry@AA30ï¼ ï¼ 10 ++EOF ++ ++compare exp out || { fail=1; cat out; } ++ ++Exit $fail +Index: coreutils-9.5/tests/misc/unexpand.pl +=================================================================== +--- coreutils-9.5.orig/tests/misc/unexpand.pl ++++ coreutils-9.5/tests/misc/unexpand.pl +@@ -27,6 +27,14 @@ my $limits = getlimits (); + + my $prog = 'unexpand'; + ++# comment out next line to disable multibyte tests ++my $mb_locale = $ENV{LOCALE_FR_UTF8}; ++! defined $mb_locale || $mb_locale eq 'none' ++ and $mb_locale = 'C'; ++ ++my $try = "Try \`$prog --help' for more information.\n"; ++my $inval = "$prog: invalid byte, character or field list\n$try"; ++ + my @Tests = + ( + ['a1', {IN=> ' 'x 1 ."y\n"}, {OUT=> ' 'x 1 ."y\n"}], +@@ -128,6 +136,37 @@ my @Tests = + ['ts2', '-t5,8', {IN=>"x\t \t y\n"}, {OUT=>"x\t\t y\n"}], + ); + ++if ($mb_locale ne 'C') ++ { ++ # Duplicate each test vector, appending "-mb" to the test name and ++ # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we ++ # provide coverage for the distro-added multi-byte code paths. ++ my @new; ++ foreach my $t (@Tests) ++ { ++ my @new_t = @$t; ++ my $test_name = shift @new_t; ++ ++ # Depending on whether unexpand is multi-byte-patched, ++ # it emits different diagnostics: ++ # non-MB: invalid byte or field list ++ # MB: invalid byte, character or field list ++ # Adjust the expected error output accordingly. ++ if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval} ++ (@new_t)) ++ { ++ my $sub = {ERR_SUBST => 's/, character//'}; ++ push @new_t, $sub; ++ push @$t, $sub; ++ } ++ next if ($test_name =~ 'b-1'); ++ push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; ++ } ++ push @Tests, @new; ++ } ++ ++@Tests = triple_test \@Tests; ++ + my $save_temps = $ENV{DEBUG}; + my $verbose = $ENV{VERBOSE}; + +Index: coreutils-9.5/tests/pr/pr-tests.pl +=================================================================== +--- coreutils-9.5.orig/tests/pr/pr-tests.pl ++++ coreutils-9.5/tests/pr/pr-tests.pl +@@ -24,6 +24,15 @@ use strict; + my $prog = 'pr'; + my $normalize_strerror = "s/': .*/'/"; + ++my $mb_locale; ++#Uncomment the following line to enable multibyte tests ++$mb_locale = $ENV{LOCALE_FR_UTF8}; ++! defined $mb_locale || $mb_locale eq 'none' ++ and $mb_locale = 'C'; ++ ++my $try = "Try \`$prog --help' for more information.\n"; ++my $inval = "$prog: invalid byte, character or field list\n$try"; ++ + my @tv = ( + + # -b option is no longer an official option. But it's still working to +@@ -515,8 +524,48 @@ push @Tests, + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx\tx\tx\tx\tx\tx\n"} ]; + ++# Add _POSIX2_VERSION=199209 to the environment of each test ++# that uses an old-style option like +1. ++if ($mb_locale ne 'C') ++ { ++ # Duplicate each test vector, appending "-mb" to the test name and ++ # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we ++ # provide coverage for the distro-added multi-byte code paths. ++ my @new; ++ foreach my $t (@Tests) ++ { ++ my @new_t = @$t; ++ my $test_name = shift @new_t; ++ ++ # Depending on whether pr is multi-byte-patched, ++ # it emits different diagnostics: ++ # non-MB: invalid byte or field list ++ # MB: invalid byte, character or field list ++ # Adjust the expected error output accordingly. ++ if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval} ++ (@new_t)) ++ { ++ my $sub = {ERR_SUBST => 's/, character//'}; ++ push @new_t, $sub; ++ push @$t, $sub; ++ } ++ #temporarily skip some failing tests ++ next if ($test_name =~ "col-0" or $test_name =~ "col-inval" or $test_name =~ "asan1"); ++ push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; ++ } ++ push @Tests, @new; ++ } ++ + @Tests = triple_test \@Tests; + ++# Remember that triple_test creates from each test with exactly one "IN" ++# file two more tests (.p and .r suffix on name) corresponding to reading ++# input from a file and from a pipe. The pipe-reading test would fail ++# due to a race condition about 1 in 20 times. ++# Remove the IN_PIPE version of the "output-is-input" test above. ++# The others aren't susceptible because they have three inputs each. ++@Tests = grep {$_->[0] ne 'output-is-input.p'} @Tests; ++ + my $save_temps = $ENV{DEBUG}; + my $verbose = $ENV{VERBOSE}; + +Index: coreutils-9.5/tests/sort/sort-merge.pl +=================================================================== +--- coreutils-9.5.orig/tests/sort/sort-merge.pl ++++ coreutils-9.5/tests/sort/sort-merge.pl +@@ -26,6 +26,15 @@ my $prog = 'sort'; + # Turn off localization of executable's output. + @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; + ++my $mb_locale; ++# uncommented according to upstream commit enabling multibyte paths ++$mb_locale = $ENV{LOCALE_FR_UTF8}; ++! defined $mb_locale || $mb_locale eq 'none' ++ and $mb_locale = 'C'; ++ ++my $try = "Try \`$prog --help' for more information.\n"; ++my $inval = "$prog: invalid byte, character or field list\n$try"; ++ + # three empty files and one that says 'foo' + my @inputs = (+(map{{IN=> {"empty$_"=> ''}}}1..3), {IN=> {foo=> "foo\n"}}); + +@@ -77,6 +86,39 @@ my @Tests = + {OUT=>$big_input}], + ); + ++# Add _POSIX2_VERSION=199209 to the environment of each test ++# that uses an old-style option like +1. ++if ($mb_locale ne 'C') ++ { ++ # Duplicate each test vector, appending "-mb" to the test name and ++ # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we ++ # provide coverage for the distro-added multi-byte code paths. ++ my @new; ++ foreach my $t (@Tests) ++ { ++ my @new_t = @$t; ++ my $test_name = shift @new_t; ++ ++ # Depending on whether sort is multi-byte-patched, ++ # it emits different diagnostics: ++ # non-MB: invalid byte or field list ++ # MB: invalid byte, character or field list ++ # Adjust the expected error output accordingly. ++ if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval} ++ (@new_t)) ++ { ++ my $sub = {ERR_SUBST => 's/, character//'}; ++ push @new_t, $sub; ++ push @$t, $sub; ++ } ++ next if ($test_name =~ "nmerge-."); ++ push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; ++ } ++ push @Tests, @new; ++ } ++ ++@Tests = triple_test \@Tests; ++ + my $save_temps = $ENV{DEBUG}; + my $verbose = $ENV{VERBOSE}; + +Index: coreutils-9.5/tests/sort/sort.pl +=================================================================== +--- coreutils-9.5.orig/tests/sort/sort.pl ++++ coreutils-9.5/tests/sort/sort.pl +@@ -24,10 +24,15 @@ my $prog = 'sort'; + # Turn off localization of executable's output. + @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; + +-my $mb_locale = $ENV{LOCALE_FR_UTF8}; ++my $mb_locale; ++#Comment out next line to disable multibyte tests ++$mb_locale = $ENV{LOCALE_FR_UTF8}; + ! defined $mb_locale || $mb_locale eq 'none' + and $mb_locale = 'C'; + ++my $try = "Try \`$prog --help' for more information.\n"; ++my $inval = "$prog: invalid byte, character or field list\n$try"; ++ + # Since each test is run with a file name and with redirected stdin, + # the name in the diagnostic is either the file name or "-". + # Normalize each diagnostic to use '-'. +@@ -423,6 +428,38 @@ foreach my $t (@Tests) + } + } + ++if ($mb_locale ne 'C') ++ { ++ # Duplicate each test vector, appending "-mb" to the test name and ++ # inserting {ENV => "LC_ALL=$mb_locale"} in the copy, so that we ++ # provide coverage for the distro-added multi-byte code paths. ++ my @new; ++ foreach my $t (@Tests) ++ { ++ my @new_t = @$t; ++ my $test_name = shift @new_t; ++ ++ # Depending on whether sort is multi-byte-patched, ++ # it emits different diagnostics: ++ # non-MB: invalid byte or field list ++ # MB: invalid byte, character or field list ++ # Adjust the expected error output accordingly. ++ if (grep {ref $_ eq 'HASH' && exists $_->{ERR} && $_->{ERR} eq $inval} ++ (@new_t)) ++ { ++ my $sub = {ERR_SUBST => 's/, character//'}; ++ push @new_t, $sub; ++ push @$t, $sub; ++ } ++ #disable several failing tests until investigation, disable all tests with envvars set ++ next if (grep {ref $_ eq 'HASH' && exists $_->{ENV}} (@new_t)); ++ next if ($test_name =~ "18g" or $test_name =~ "sort-numeric" or $test_name =~ "08[ab]" or $test_name =~ "03[def]" or $test_name =~ "h4" or $test_name =~ "n1" or $test_name =~ "2[01]a"); ++ next if ($test_name =~ "11[ab]"); # avoid FP: expected result differs to MB result due to collation rules. ++ push @new, ["$test_name-mb", @new_t, {ENV => "LC_ALL=$mb_locale"}]; ++ } ++ push @Tests, @new; ++ } ++ + @Tests = triple_test \@Tests; + + # Remember that triple_test creates from each test with exactly one "IN" +@@ -432,6 +469,7 @@ foreach my $t (@Tests) + # Remove the IN_PIPE version of the "output-is-input" test above. + # The others aren't susceptible because they have three inputs each. + @Tests = grep {$_->[0] ne 'output-is-input.p'} @Tests; ++@Tests = grep {$_->[0] ne 'output-is-input-mb.p'} @Tests; + + my $save_temps = $ENV{DEBUG}; + my $verbose = $ENV{VERBOSE}; +Index: coreutils-9.5/tests/unexpand/mb.sh +=================================================================== +--- /dev/null ++++ coreutils-9.5/tests/unexpand/mb.sh +@@ -0,0 +1,172 @@ ++#!/bin/sh ++ ++# Copyright (C) 2012-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 . ++ ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++print_ver_ unexpand ++ ++export LC_ALL=en_US.UTF-8 ++ ++#input containing multibyte characters ++cat > in <<\EOF ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++cat > exp <<\EOF ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++unexpand -a < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++ ++#multiple files as an input ++cat >> exp <<\EOF ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++ ++unexpand -a ./in ./in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#test characters with a display width larger than 1 ++ ++env printf '12345678 ++e |ascii(1) ++\u00E9 |composed(1) ++e\u0301 |decomposed(1) ++\u3000 |ideo-space(2) ++\uFF0D |full-hypen(2) ++' > in || framework_failure_ ++ ++env printf '12345678 ++e\t|ascii(1) ++\u00E9\t|composed(1) ++e\u0301\t|decomposed(1) ++\u3000\t|ideo-space(2) ++\uFF0D\t|full-hypen(2) ++' > exp || framework_failure_ ++ ++unexpand -a < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#test input where a blank of width > 1 is not being substituted ++in="$(LC_ALL=en_US.UTF-8 printf ' \u3000 ö ü ß')" ++exp='   ö ü ß' ++ ++unexpand -a < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#non-Unicode characters interspersed between Unicode ones ++env printf '12345678 ++ \xFF| ++\xFF | ++ \xFFä| ++ä\xFF | ++ ä\xFF| ++\xFF ä| ++äbcdef\xFF | ++' > in || framework_failure_ ++ ++env printf '12345678 ++\t\xFF| ++\xFF\t| ++\t\xFFä| ++ä\xFF\t| ++\tä\xFF| ++\xFF\tä| ++äbcdef\xFF\t| ++' > exp || framework_failure_ ++ ++unexpand -a < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++#BOM header test 1 ++printf "\xEF\xBB\xBF" > in; cat <<\EOF >> in || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ ++ ++printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++unexpand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LANG=C unexpand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LC_ALL=C unexpand < in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++ ++printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++1234567812345678123456781 ++. . . . ++a b c d ++. . . . ++ä ö ü ß ++. . . . ++ äöü . öüä. ä xx ++EOF ++ ++ ++unexpand in in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LANG=C unexpand in in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 ++ ++LC_ALL=C unexpand in in > out || fail=1 ++compare exp out > /dev/null 2>&1 || fail=1 +Index: coreutils-9.5/lib/mbchar.c +=================================================================== +--- /dev/null ++++ coreutils-9.5/lib/mbchar.c +@@ -0,0 +1,23 @@ ++/* Copyright (C) 2001, 2006, 2009-2024 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ ++ ++#include ++ ++#define MBCHAR_INLINE _GL_EXTERN_INLINE ++ ++#include ++ ++#include "mbchar.h" +Index: coreutils-9.5/lib/mbchar.h +=================================================================== +--- /dev/null ++++ coreutils-9.5/lib/mbchar.h +@@ -0,0 +1,373 @@ ++/* Multibyte character data type. ++ Copyright (C) 2001, 2005-2007, 2009-2024 Free Software Foundation, Inc. ++ ++ This file is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as ++ published by the Free Software Foundation; either version 2.1 of the ++ License, or (at your option) any later version. ++ ++ This file 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 Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with this program. If not, see . */ ++ ++/* Written by Bruno Haible . */ ++ ++/* A multibyte character is a short subsequence of a char* string, ++ representing a single 32-bit wide character. ++ ++ We use multibyte characters instead of 32-bit wide characters because ++ of the following goals: ++ 1) correct multibyte handling, i.e. operate according to the LC_CTYPE ++ locale, ++ 2) ease of maintenance, i.e. the maintainer needs not know all details ++ of the ISO C 99 standard, ++ 3) don't fail grossly if the input is not in the encoding set by the ++ locale, because often different encodings are in use in the same ++ countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...), ++ 4) fast in the case of ASCII characters. ++ ++ Multibyte characters are only accessed through the mb* macros. ++ ++ mb_ptr (mbc) ++ return a pointer to the beginning of the multibyte sequence. ++ ++ mb_len (mbc) ++ returns the number of bytes occupied by the multibyte sequence. ++ Always > 0. ++ ++ mb_iseq (mbc, sc) ++ returns true if mbc is the standard ASCII character sc. ++ ++ mb_isnul (mbc) ++ returns true if mbc is the nul character. ++ ++ mb_cmp (mbc1, mbc2) ++ returns a positive, zero, or negative value depending on whether mbc1 ++ sorts after, same or before mbc2. ++ ++ mb_casecmp (mbc1, mbc2) ++ returns a positive, zero, or negative value depending on whether mbc1 ++ sorts after, same or before mbc2, modulo upper/lowercase conversion. ++ ++ mb_equal (mbc1, mbc2) ++ returns true if mbc1 and mbc2 are equal. ++ ++ mb_caseequal (mbc1, mbc2) ++ returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion. ++ ++ mb_isalnum (mbc) ++ returns true if mbc is alphanumeric. ++ ++ mb_isalpha (mbc) ++ returns true if mbc is alphabetic. ++ ++ mb_isascii(mbc) ++ returns true if mbc is plain ASCII. ++ ++ mb_isblank (mbc) ++ returns true if mbc is a blank. ++ ++ mb_iscntrl (mbc) ++ returns true if mbc is a control character. ++ ++ mb_isdigit (mbc) ++ returns true if mbc is a decimal digit. ++ ++ mb_isgraph (mbc) ++ returns true if mbc is a graphic character. ++ ++ mb_islower (mbc) ++ returns true if mbc is lowercase. ++ ++ mb_isprint (mbc) ++ returns true if mbc is a printable character. ++ ++ mb_ispunct (mbc) ++ returns true if mbc is a punctuation character. ++ ++ mb_isspace (mbc) ++ returns true if mbc is a space character. ++ ++ mb_isupper (mbc) ++ returns true if mbc is uppercase. ++ ++ mb_isxdigit (mbc) ++ returns true if mbc is a hexadecimal digit. ++ ++ mb_width (mbc) ++ returns the number of columns on the output device occupied by mbc. ++ Always >= 0. ++ ++ mb_putc (mbc, stream) ++ outputs mbc on stream, a byte oriented FILE stream opened for output. ++ ++ mb_setascii (&mbc, sc) ++ assigns the standard ASCII character sc to mbc. ++ (Only available if the 'mbfile' module is in use.) ++ ++ mb_copy (&destmbc, &srcmbc) ++ copies srcmbc to destmbc. ++ ++ Here are the function prototypes of the macros. ++ ++ extern const char * mb_ptr (const mbchar_t mbc); ++ extern size_t mb_len (const mbchar_t mbc); ++ extern bool mb_iseq (const mbchar_t mbc, char sc); ++ extern bool mb_isnul (const mbchar_t mbc); ++ extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2); ++ extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2); ++ extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2); ++ extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2); ++ extern bool mb_isalnum (const mbchar_t mbc); ++ extern bool mb_isalpha (const mbchar_t mbc); ++ extern bool mb_isascii (const mbchar_t mbc); ++ extern bool mb_isblank (const mbchar_t mbc); ++ extern bool mb_iscntrl (const mbchar_t mbc); ++ extern bool mb_isdigit (const mbchar_t mbc); ++ extern bool mb_isgraph (const mbchar_t mbc); ++ extern bool mb_islower (const mbchar_t mbc); ++ extern bool mb_isprint (const mbchar_t mbc); ++ extern bool mb_ispunct (const mbchar_t mbc); ++ extern bool mb_isspace (const mbchar_t mbc); ++ extern bool mb_isupper (const mbchar_t mbc); ++ extern bool mb_isxdigit (const mbchar_t mbc); ++ extern int mb_width (const mbchar_t mbc); ++ extern void mb_putc (const mbchar_t mbc, FILE *stream); ++ extern void mb_setascii (mbchar_t *new, char sc); ++ extern void mb_copy (mbchar_t *new, const mbchar_t *old); ++ */ ++ ++#ifndef _MBCHAR_H ++#define _MBCHAR_H 1 ++ ++/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE. */ ++#if !_GL_CONFIG_H_INCLUDED ++ #error "Please include config.h first." ++#endif ++ ++#include ++#include ++ ++_GL_INLINE_HEADER_BEGIN ++#ifndef MBCHAR_INLINE ++# define MBCHAR_INLINE _GL_INLINE ++#endif ++ ++/* The longest multibyte characters, nowadays, are 4 bytes long. ++ Regardless of the values of MB_CUR_MAX and MB_LEN_MAX. */ ++#define MBCHAR_BUF_SIZE 4 ++ ++struct mbchar ++{ ++ const char *ptr; /* pointer to current character */ ++ size_t bytes; /* number of bytes of current character, > 0 */ ++ bool wc_valid; /* true if wc is a valid 32-bit wide character */ ++ char32_t wc; /* if wc_valid: the current character */ ++#if defined GNULIB_MBFILE ++ char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */ ++#endif ++}; ++ ++/* EOF (not a real character) is represented with bytes = 0 and ++ wc_valid = false. */ ++ ++typedef struct mbchar mbchar_t; ++ ++/* Access the current character. */ ++#define mb_ptr(mbc) ((mbc).ptr) ++#define mb_len(mbc) ((mbc).bytes) ++ ++/* Comparison of characters. */ ++#define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc)) ++#define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0) ++#define mb_cmp(mbc1, mbc2) \ ++ ((mbc1).wc_valid \ ++ ? ((mbc2).wc_valid \ ++ ? _GL_CMP ((mbc1).wc, (mbc2).wc) \ ++ : -1) \ ++ : ((mbc2).wc_valid \ ++ ? 1 \ ++ : (mbc1).bytes == (mbc2).bytes \ ++ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ ++ : (mbc1).bytes < (mbc2).bytes \ ++ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ ++ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) ++#define mb_casecmp(mbc1, mbc2) \ ++ ((mbc1).wc_valid \ ++ ? ((mbc2).wc_valid \ ++ ? _GL_CMP (c32tolower ((mbc1).wc), c32tolower ((mbc2).wc)) \ ++ : -1) \ ++ : ((mbc2).wc_valid \ ++ ? 1 \ ++ : (mbc1).bytes == (mbc2).bytes \ ++ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ ++ : (mbc1).bytes < (mbc2).bytes \ ++ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ ++ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) ++#define mb_equal(mbc1, mbc2) \ ++ ((mbc1).wc_valid && (mbc2).wc_valid \ ++ ? (mbc1).wc == (mbc2).wc \ ++ : (mbc1).bytes == (mbc2).bytes \ ++ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) ++#define mb_caseequal(mbc1, mbc2) \ ++ ((mbc1).wc_valid && (mbc2).wc_valid \ ++ ? c32tolower ((mbc1).wc) == c32tolower ((mbc2).wc) \ ++ : (mbc1).bytes == (mbc2).bytes \ ++ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) ++ ++/* , classification. */ ++#define mb_isascii(mbc) \ ++ ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127) ++#define mb_isalnum(mbc) ((mbc).wc_valid && c32isalnum ((mbc).wc)) ++#define mb_isalpha(mbc) ((mbc).wc_valid && c32isalpha ((mbc).wc)) ++#define mb_isblank(mbc) ((mbc).wc_valid && c32isblank ((mbc).wc)) ++#define mb_iscntrl(mbc) ((mbc).wc_valid && c32iscntrl ((mbc).wc)) ++#define mb_isdigit(mbc) ((mbc).wc_valid && c32isdigit ((mbc).wc)) ++#define mb_isgraph(mbc) ((mbc).wc_valid && c32isgraph ((mbc).wc)) ++#define mb_islower(mbc) ((mbc).wc_valid && c32islower ((mbc).wc)) ++#define mb_isprint(mbc) ((mbc).wc_valid && c32isprint ((mbc).wc)) ++#define mb_ispunct(mbc) ((mbc).wc_valid && c32ispunct ((mbc).wc)) ++#define mb_isspace(mbc) ((mbc).wc_valid && c32isspace ((mbc).wc)) ++#define mb_isupper(mbc) ((mbc).wc_valid && c32isupper ((mbc).wc)) ++#define mb_isxdigit(mbc) ((mbc).wc_valid && c32isxdigit ((mbc).wc)) ++ ++/* Extra function. */ ++ ++/* Unprintable characters appear as a small box of width 1. */ ++#define MB_UNPRINTABLE_WIDTH 1 ++ ++MBCHAR_INLINE int ++mb_width_aux (char32_t wc) ++{ ++ int w = c32width (wc); ++ /* For unprintable characters, arbitrarily return 0 for control characters ++ and MB_UNPRINTABLE_WIDTH otherwise. */ ++ return (w >= 0 ? w : c32iscntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH); ++} ++ ++#define mb_width(mbc) \ ++ ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH) ++ ++/* Output. */ ++#define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream)) ++ ++#if defined GNULIB_MBFILE ++/* Assignment. */ ++# define mb_setascii(mbc, sc) \ ++ ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \ ++ (mbc)->wc = (mbc)->buf[0] = (sc)) ++#endif ++ ++/* Copying a character. */ ++MBCHAR_INLINE void ++mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) ++{ ++#if defined GNULIB_MBFILE ++ if (old_mbc->ptr == &old_mbc->buf[0]) ++ { ++ memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); ++ new_mbc->ptr = &new_mbc->buf[0]; ++ } ++ else ++#endif ++ new_mbc->ptr = old_mbc->ptr; ++ new_mbc->bytes = old_mbc->bytes; ++ if ((new_mbc->wc_valid = old_mbc->wc_valid)) ++ new_mbc->wc = old_mbc->wc; ++} ++ ++ ++/* is_basic(c) tests whether the single-byte character c is ++ - in the ISO C "basic character set" or is one of '@', '$', and '`' ++ which ISO C 23 § 5.2.1.1.(1) guarantees to be single-byte and in ++ practice are safe to treat as basic in the execution character set, ++ or ++ - in the POSIX "portable character set", which ++ ++ equally guarantees to be single-byte. ++ This is a convenience function, and is in this file only to share code ++ between mbiter.h, mbuiter.h, and mbfile.h. */ ++#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ ++ && ('$' == 36) && ('%' == 37) && ('&' == 38) && ('\'' == 39) \ ++ && ('(' == 40) && (')' == 41) && ('*' == 42) && ('+' == 43) \ ++ && (',' == 44) && ('-' == 45) && ('.' == 46) && ('/' == 47) \ ++ && ('0' == 48) && ('1' == 49) && ('2' == 50) && ('3' == 51) \ ++ && ('4' == 52) && ('5' == 53) && ('6' == 54) && ('7' == 55) \ ++ && ('8' == 56) && ('9' == 57) && (':' == 58) && (';' == 59) \ ++ && ('<' == 60) && ('=' == 61) && ('>' == 62) && ('?' == 63) \ ++ && ('@' == 64) && ('A' == 65) && ('B' == 66) && ('C' == 67) \ ++ && ('D' == 68) && ('E' == 69) && ('F' == 70) && ('G' == 71) \ ++ && ('H' == 72) && ('I' == 73) && ('J' == 74) && ('K' == 75) \ ++ && ('L' == 76) && ('M' == 77) && ('N' == 78) && ('O' == 79) \ ++ && ('P' == 80) && ('Q' == 81) && ('R' == 82) && ('S' == 83) \ ++ && ('T' == 84) && ('U' == 85) && ('V' == 86) && ('W' == 87) \ ++ && ('X' == 88) && ('Y' == 89) && ('Z' == 90) && ('[' == 91) \ ++ && ('\\' == 92) && (']' == 93) && ('^' == 94) && ('_' == 95) \ ++ && ('`' == 96) && ('a' == 97) && ('b' == 98) && ('c' == 99) \ ++ && ('d' == 100) && ('e' == 101) && ('f' == 102) && ('g' == 103) \ ++ && ('h' == 104) && ('i' == 105) && ('j' == 106) && ('k' == 107) \ ++ && ('l' == 108) && ('m' == 109) && ('n' == 110) && ('o' == 111) \ ++ && ('p' == 112) && ('q' == 113) && ('r' == 114) && ('s' == 115) \ ++ && ('t' == 116) && ('u' == 117) && ('v' == 118) && ('w' == 119) \ ++ && ('x' == 120) && ('y' == 121) && ('z' == 122) && ('{' == 123) \ ++ && ('|' == 124) && ('}' == 125) && ('~' == 126) ++/* The character set is ISO-646, not EBCDIC. */ ++# define IS_BASIC_ASCII 1 ++ ++/* All locale encodings (see localcharset.h) map the characters 0x00..0x7F ++ to U+0000..U+007F, like ASCII, except for ++ CP864 different mapping of '%' ++ SHIFT_JIS different mappings of 0x5C, 0x7E ++ JOHAB different mapping of 0x5C ++ However, these characters in the range 0x20..0x7E are in the ISO C ++ "basic character set" and in the POSIX "portable character set", which ++ ISO C and POSIX guarantee to be single-byte. Thus, locales with these ++ encodings are not POSIX compliant. And they are most likely not in use ++ any more (as of 2023). */ ++# define is_basic(c) ((unsigned char) (c) < 0x80) ++ ++#else ++ ++MBCHAR_INLINE bool ++is_basic (char c) ++{ ++ switch (c) ++ { ++ case '\0': ++ case '\007': case '\010': ++ case '\t': case '\n': case '\v': case '\f': case '\r': ++ case ' ': case '!': case '"': case '#': case '$': case '%': ++ case '&': case '\'': case '(': case ')': case '*': ++ case '+': case ',': case '-': case '.': case '/': ++ case '0': case '1': case '2': case '3': case '4': ++ case '5': case '6': case '7': case '8': case '9': ++ case ':': case ';': case '<': case '=': case '>': ++ case '?': case '@': ++ case 'A': case 'B': case 'C': case 'D': case 'E': ++ case 'F': case 'G': case 'H': case 'I': case 'J': ++ case 'K': case 'L': case 'M': case 'N': case 'O': ++ case 'P': case 'Q': case 'R': case 'S': case 'T': ++ case 'U': case 'V': case 'W': case 'X': case 'Y': ++ case 'Z': ++ case '[': case '\\': case ']': case '^': case '_': case '`': ++ case 'a': case 'b': case 'c': case 'd': case 'e': ++ case 'f': case 'g': case 'h': case 'i': case 'j': ++ case 'k': case 'l': case 'm': case 'n': case 'o': ++ case 'p': case 'q': case 'r': case 's': case 't': ++ case 'u': case 'v': case 'w': case 'x': case 'y': ++ case 'z': case '{': case '|': case '}': case '~': ++ return 1; ++ default: ++ return 0; ++ } ++} ++ ++#endif ++ ++_GL_INLINE_HEADER_END ++ ++#endif /* _MBCHAR_H */ +Index: coreutils-9.5/m4/mbchar.m4 +=================================================================== +--- /dev/null ++++ coreutils-9.5/m4/mbchar.m4 +@@ -0,0 +1,13 @@ ++# mbchar.m4 serial 9 ++dnl Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl autoconf tests required for use of mbchar.m4 ++dnl From Bruno Haible. ++ ++AC_DEFUN([gl_MBCHAR], ++[ ++ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ++]) diff --git a/coreutils-misc.patch b/coreutils-misc.patch new file mode 100644 index 0000000..976d6b5 --- /dev/null +++ b/coreutils-misc.patch @@ -0,0 +1,31 @@ +--- + tests/help/help-version.sh | 1 + + tests/other-fs-tmpdir | 3 +++ + 2 files changed, 4 insertions(+) + +Index: tests/help/help-version.sh +=================================================================== +--- tests/help/help-version.sh.orig ++++ tests/help/help-version.sh +@@ -241,6 +241,7 @@ parted_setup () { args="-s $tmp_in mklab + for i in $built_programs; do + # Skip these. + case $i in chroot|stty|tty|false|chcon|runcon|coreutils) continue;; esac ++ case $i in df) continue;; esac + + rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out $bigZ_in $zin $zin2 + echo z |gzip > $zin +Index: tests/other-fs-tmpdir +=================================================================== +--- tests/other-fs-tmpdir.orig ++++ tests/other-fs-tmpdir +@@ -43,6 +43,9 @@ for d in $CANDIDATE_TMP_DIRS; do + + done + ++# Autobuild hack ++test -f /bin/uname.bin && other_partition_tmpdir= ++ + if test -z "$other_partition_tmpdir"; then + skip_ \ + "requires a writable directory on a different file system, diff --git a/coreutils-remove_hostname_documentation.patch b/coreutils-remove_hostname_documentation.patch new file mode 100644 index 0000000..75fef4f --- /dev/null +++ b/coreutils-remove_hostname_documentation.patch @@ -0,0 +1,92 @@ +--- + doc/coreutils.texi | 42 +----------------------------------------- + 1 file changed, 1 insertion(+), 41 deletions(-) + +Index: doc/coreutils.texi +=================================================================== +--- doc/coreutils.texi.orig ++++ doc/coreutils.texi +@@ -73,7 +73,6 @@ + * groups: (coreutils)groups invocation. Print group names a user is in. + * head: (coreutils)head invocation. Output the first part of files. + * hostid: (coreutils)hostid invocation. Print numeric host identifier. +-* hostname: (coreutils)hostname invocation. Print or set system name. + * id: (coreutils)id invocation. Print user identity. + * install: (coreutils)install invocation. Copy files and set attributes. + * join: (coreutils)join invocation. Join lines on a common field. +@@ -206,7 +205,7 @@ Free Documentation License''. + * File name manipulation:: dirname basename pathchk mktemp realpath + * Working context:: pwd stty printenv tty + * User information:: id logname whoami groups users who +-* System context:: date arch nproc uname hostname hostid uptime ++* System context:: date arch nproc uname hostid uptime + * SELinux context:: chcon runcon + * Modified command invocation:: chroot env nice nohup stdbuf timeout + * Process control:: kill +@@ -430,7 +429,6 @@ System context + * date invocation:: Print or set system date and time + * nproc invocation:: Print the number of processors + * uname invocation:: Print system information +-* hostname invocation:: Print or set system name + * hostid invocation:: Print numeric host identifier + * uptime invocation:: Print system uptime and load + +@@ -16421,7 +16419,6 @@ information. + * arch invocation:: Print machine hardware name. + * nproc invocation:: Print the number of processors. + * uname invocation:: Print system information. +-* hostname invocation:: Print or set system name. + * hostid invocation:: Print numeric host identifier. + * uptime invocation:: Print system uptime and load. + @end menu +@@ -17329,15 +17326,6 @@ This is non-portable, even across GNU/Li + Print the machine hardware name (sometimes called the hardware class + or hardware type). + +-@item -n +-@itemx --nodename +-@opindex -n +-@opindex --nodename +-@cindex hostname +-@cindex node name +-@cindex network node name +-Print the network node hostname. +- + @item -p + @itemx --processor + @opindex -p +@@ -17391,34 +17379,6 @@ Print the kernel version. + + @exitstatus + +- +-@node hostname invocation +-@section @command{hostname}: Print or set system name +- +-@pindex hostname +-@cindex setting the hostname +-@cindex printing the hostname +-@cindex system name, printing +-@cindex appropriate privileges +- +-With no arguments, @command{hostname} prints the name of the current host +-system. With one argument, it sets the current host name to the +-specified string. You must have appropriate privileges to set the host +-name. Synopsis: +- +-@example +-hostname [@var{name}] +-@end example +- +-The only options are @option{--help} and @option{--version}. @xref{Common +-options}. +- +-@command{hostname} is not installed by default, and other packages +-also supply a @command{hostname} command, so portable scripts should +-not rely on its existence or on the exact behavior documented above. +- +-@exitstatus +- + + @node hostid invocation + @section @command{hostid}: Print numeric host identifier diff --git a/coreutils-remove_kill_documentation.patch b/coreutils-remove_kill_documentation.patch new file mode 100644 index 0000000..ba300f7 --- /dev/null +++ b/coreutils-remove_kill_documentation.patch @@ -0,0 +1,126 @@ +--- + doc/coreutils.texi | 90 ----------------------------------------------------- + 1 file changed, 90 deletions(-) + +Index: doc/coreutils.texi +=================================================================== +--- doc/coreutils.texi.orig ++++ doc/coreutils.texi +@@ -76,7 +76,6 @@ + * id: (coreutils)id invocation. Print user identity. + * install: (coreutils)install invocation. Copy files and set attributes. + * join: (coreutils)join invocation. Join lines on a common field. +-* kill: (coreutils)kill invocation. Send a signal to processes. + * link: (coreutils)link invocation. Make hard links between files. + * ln: (coreutils)ln invocation. Make links between files. + * logname: (coreutils)logname invocation. Print current login name. +@@ -208,7 +207,6 @@ Free Documentation License''. + * System context:: date arch nproc uname hostid uptime + * SELinux context:: chcon runcon + * Modified command invocation:: chroot env nice nohup stdbuf timeout +-* Process control:: kill + * Delaying:: sleep + * Numeric operations:: factor numfmt seq + * File permissions:: Access modes +@@ -457,10 +455,6 @@ Modified command invocation + * stdbuf invocation:: Run a command with modified I/O buffering + * timeout invocation:: Run a command with a time limit + +-Process control +- +-* kill invocation:: Sending a signal to processes. +- + Delaying + + * sleep invocation:: Delay for a specified time +@@ -18848,90 +18842,6 @@ timeout -s INT 5s env --ignore-signal=IN + timeout -s INT -k 3s 5s env --ignore-signal=INT sleep 20 + @end example + +-@node Process control +-@chapter Process control +- +-@cindex processes, commands for controlling +-@cindex commands for controlling processes +- +-@menu +-* kill invocation:: Sending a signal to processes. +-@end menu +- +- +-@node kill invocation +-@section @command{kill}: Send a signal to processes +- +-@pindex kill +-@cindex send a signal to processes +- +-The @command{kill} command sends a signal to processes, causing them +-to terminate or otherwise act upon receiving the signal in some way. +-Alternatively, it lists information about signals. Synopses: +- +-@example +-kill [-s @var{signal} | --signal @var{signal} | -@var{signal}] @var{pid}@dots{} +-kill [-l | --list | -t | --table] [@var{signal}]@dots{} +-@end example +- +-@mayConflictWithShellBuiltIn{kill} +- +-The first form of the @command{kill} command sends a signal to all +-@var{pid} arguments. The default signal to send if none is specified +-is @samp{TERM}@. The special signal number @samp{0} does not denote a +-valid signal, but can be used to test whether the @var{pid} arguments +-specify processes to which a signal could be sent. +- +-If @var{pid} is positive, the signal is sent to the process with the +-process ID @var{pid}. If @var{pid} is zero, the signal is sent to all +-processes in the process group of the current process. If @var{pid} +-is @minus{}1, the signal is sent to all processes for which the user has +-permission to send a signal. If @var{pid} is less than @minus{}1, the signal +-is sent to all processes in the process group that equals the absolute +-value of @var{pid}. +- +-If @var{pid} is not positive, a system-dependent set of system +-processes is excluded from the list of processes to which the signal +-is sent. +- +-If a negative @var{pid} argument is desired as the first one, it +-should be preceded by @option{--}. However, as a common extension to +-POSIX, @option{--} is not required with @samp{kill +--@var{signal} -@var{pid}}. The following commands are equivalent: +- +-@example +-kill -15 -1 +-kill -TERM -1 +-kill -s TERM -- -1 +-kill -- -1 +-@end example +- +-The first form of the @command{kill} command succeeds if every @var{pid} +-argument specifies at least one process that the signal was sent to. +- +-The second form of the @command{kill} command lists signal information. +-Either the @option{-l} or @option{--list} option, or the @option{-t} +-or @option{--table} option must be specified. Without any +-@var{signal} argument, all supported signals are listed. The output +-of @option{-l} or @option{--list} is a list of the signal names, one +-per line; if @var{signal} is already a name, the signal number is +-printed instead. The output of @option{-t} or @option{--table} is a +-table of signal numbers, names, and descriptions. This form of the +-@command{kill} command succeeds if all @var{signal} arguments are valid +-and if there is no output error. +- +-The @command{kill} command also supports the @option{--help} and +-@option{--version} options. @xref{Common options}. +- +-A @var{signal} may be a signal name like @samp{HUP}, or a signal +-number like @samp{1}, or an exit status of a process terminated by the +-signal. A signal name can be given in canonical form or prefixed by +-@samp{SIG}@. The case of the letters is ignored, except for the +-@option{-@var{signal}} option which must use upper case to avoid +-ambiguity with lower case option letters. +-@xref{Signal specifications}, for a list of supported +-signal names and numbers. +- + @node Delaying + @chapter Delaying + diff --git a/coreutils-skip-gnulib-test-tls.patch b/coreutils-skip-gnulib-test-tls.patch new file mode 100644 index 0000000..8670699 --- /dev/null +++ b/coreutils-skip-gnulib-test-tls.patch @@ -0,0 +1,37 @@ +Subject: Skip the gnulib test 'test-tls' on some platforms + +On i586, x86_64, ppc and ppc64, this test is known to sometimes fail +with a diagnostic like: + + Starting test_tls ...*** Error in `./test-tls': free(): invalid pointer: 0x00007f21500008c0 *** + ======= Backtrace: ========= + /lib64/libc.so.6(+0x7406f)[0x7f215845006f] + /lib64/libc.so.6(+0x7989e)[0x7f215845589e] + /lib64/libpthread.so.0(+0x7ee2)[0x7f215878fee2] + /lib64/libpthread.so.0(+0x813e)[0x7f215879013e] + /lib64/libc.so.6(clone+0x6d)[0x7f21584c3d6d] + +* gnulib-tests/gnulib.mk (test-tls): Comment to skip for now. + +--- + gnulib-tests/gnulib.mk | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +Index: gnulib-tests/gnulib.mk +=================================================================== +--- gnulib-tests/gnulib.mk.orig ++++ gnulib-tests/gnulib.mk +@@ -3299,9 +3299,10 @@ EXTRA_DIST += test-timespec.c macros.h + + ## begin gnulib module tls-tests + +-TESTS += test-tls +-check_PROGRAMS += test-tls +-test_tls_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ ++# Fails on i586 and x86_64. ++#TESTS += test-tls ++#check_PROGRAMS += test-tls ++#test_tls_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ + + EXTRA_DIST += test-tls.c + diff --git a/coreutils-skip-some-sort-tests-on-ppc.patch b/coreutils-skip-some-sort-tests-on-ppc.patch new file mode 100644 index 0000000..88ecc71 --- /dev/null +++ b/coreutils-skip-some-sort-tests-on-ppc.patch @@ -0,0 +1,52 @@ +Subject: tests: skip some valgrind-ed tests of sort on ppc/ppc64 + +Valgrind diagnoses problems in 'mkstemp64' deep down in glibc on PowerPC: + + Conditional jump or move depends on uninitialised value(s) + at 0xFDB37DC: __udivmoddi4 (in /lib/libc-2.18.90.so) + by 0xFDB3DD7: __umoddi3@GLIBC_2.0 (in /lib/libc-2.18.90.so) + by 0xFDFDF9F: __gen_tempname (in /lib/libc-2.18.90.so) + by 0xFE77563: mkstemp64 (in /lib/libc-2.18.90.so) + by 0x100135D3: mkstemp_safer (mkstemp-safer.c:33) + by 0x10006ECF: create_temp_file (sort.c:942) + by 0x1000A427: maybe_create_temp (sort.c:1176) + by 0x100031BF: main (sort.c:1223) + +* tests/sort/sort-stale-thread-mem.sh: Skip on ppc/ppc64. +* tests/sort/sort-u-FMR.sh: Likewise. + +--- + tests/sort/sort-stale-thread-mem.sh | 4 ++++ + tests/sort/sort-u-FMR.sh | 4 ++++ + 2 files changed, 8 insertions(+) + +Index: tests/sort/sort-stale-thread-mem.sh +=================================================================== +--- tests/sort/sort-stale-thread-mem.sh.orig ++++ tests/sort/sort-stale-thread-mem.sh +@@ -27,6 +27,10 @@ require_valgrind_ + grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null || + skip_ 'requires pthreads' + ++case "$( uname -m )" in ++ ppc | ppc64) skip_ "SUSE: disabled for now on ppc/ppc64";; ++esac ++ + # gensort output seems to trigger the failure more often, + # so prefer gensort if it is available. + (gensort -a 10000 in) 2>/dev/null || +Index: tests/sort/sort-u-FMR.sh +=================================================================== +--- tests/sort/sort-u-FMR.sh.orig ++++ tests/sort/sort-u-FMR.sh +@@ -20,6 +20,10 @@ + print_ver_ sort + require_valgrind_ + ++case "$( uname -m )" in ++ ppc | ppc64) skip_ "SUSE: disabled for now on ppc/ppc64";; ++esac ++ + { echo 0; printf '%0900d\n' 1; } > in || framework_failure_ + + valgrind --error-exitcode=1 sort --p=1 -S32b -u in > out || fail=1 diff --git a/coreutils-skip-tests-rm-ext3-perf.patch b/coreutils-skip-tests-rm-ext3-perf.patch new file mode 100644 index 0000000..4693780 --- /dev/null +++ b/coreutils-skip-tests-rm-ext3-perf.patch @@ -0,0 +1,23 @@ +# Downstream patch to skip a test failing on OBS. +# tests: skip tests/rm/ext3-perf.sh temporarily as it hangs on OBS +# (but otherwise is known to work locally). +--- + tests/rm/ext3-perf.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +Index: tests/rm/ext3-perf.sh +=================================================================== +--- tests/rm/ext3-perf.sh.orig ++++ tests/rm/ext3-perf.sh +@@ -19,6 +19,11 @@ + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src + print_ver_ rm + ++# Skip this test: it's known to work locally (and it was working for a long ++# time on OBS), but it started to fail in Sep 2021 on OBS - seemingly on all ++# platforms (i586, x84_64, ppc64le, ppc64, aarch64, s390x). ++skip_ "SUSE: disabled for now as known to be failing on OBS" ++ + very_expensive_ + + # In a circa 2008 benchmark, using rm -rf to remove a 400k-entry directory took: diff --git a/coreutils-sysinfo.patch b/coreutils-sysinfo.patch new file mode 100644 index 0000000..0d80ce9 --- /dev/null +++ b/coreutils-sysinfo.patch @@ -0,0 +1,64 @@ +--- + src/uname.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +Index: src/uname.c +=================================================================== +--- src/uname.c.orig ++++ src/uname.c +@@ -341,6 +341,36 @@ main (int argc, char **argv) + element = processor; + } + #endif ++ if (element == unknown) ++ { ++ struct utsname name; ++ static char processor[sizeof (name.machine)]; ++ if (uname (&name) != 0) ++ error (EXIT_FAILURE, errno, _("cannot get system name")); ++ strcpy (processor, name.machine); ++ element = processor; ++#ifdef __linux__ ++ if (!strcmp (element, "i686")) ++ { ++ /* Check for Athlon */ ++ char line[1024]; ++ FILE *f = fopen ("/proc/cpuinfo", "r"); ++ if (f) ++ { ++ while (fgets (line, sizeof (line), f) > 0) ++ { ++ if (strncmp (line, "vendor_id", 9) == 0) ++ { ++ if (strstr (line, "AuthenticAMD")) ++ element = "athlon"; ++ break; ++ } ++ } ++ fclose (f); ++ } ++ } ++#endif ++ } + if (! (toprint == UINT_MAX && element == unknown)) + print_element (element); + } +@@ -366,6 +396,18 @@ main (int argc, char **argv) + element = hardware_platform; + } + #endif ++ if (element == unknown) ++ { ++ struct utsname name; ++ static char hardware_platform[sizeof (name.machine)]; ++ if (uname (&name) != 0) ++ error (EXIT_FAILURE, errno, _("cannot get system name")); ++ strcpy (hardware_platform, name.machine); ++ if (hardware_platform[0] == 'i' && hardware_platform[2] == '8' ++ && hardware_platform[3] == '6' && hardware_platform[4] == 0) ++ hardware_platform[1] = '3'; ++ element = hardware_platform; ++ } + if (! (toprint == UINT_MAX && element == unknown)) + print_element (element); + } diff --git a/coreutils-test_without_valgrind.patch b/coreutils-test_without_valgrind.patch new file mode 100644 index 0000000..4ec6cdb --- /dev/null +++ b/coreutils-test_without_valgrind.patch @@ -0,0 +1,18 @@ +--- + tests/shuf/shuf-reservoir.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +Index: tests/shuf/shuf-reservoir.sh +=================================================================== +--- tests/shuf/shuf-reservoir.sh.orig ++++ tests/shuf/shuf-reservoir.sh +@@ -37,8 +37,7 @@ run_shuf_n() + + # Critical memory-related bugs will cause a segfault here + # (with varying numbers of input/output lines) +- seq "$INPUT_LINES" | valgrind --leak-check=$leaklevel --error-exitcode=1 \ +- shuf -n "$OUTPUT_LINES" -o "out_${INPUT_LINES}_${OUTPUT_LINES}" || return 1 ++ seq "$INPUT_LINES" | shuf -n "$OUTPUT_LINES" -o "out_${INPUT_LINES}_${OUTPUT_LINES}" || return 1 + + EXPECTED_LINES="$OUTPUT_LINES" + test "$INPUT_LINES" -lt "$OUTPUT_LINES" && EXPECTED_LINES="$INPUT_LINES" diff --git a/coreutils-tests-shorten-extreme-factor-tests.patch b/coreutils-tests-shorten-extreme-factor-tests.patch new file mode 100644 index 0000000..01b2063 --- /dev/null +++ b/coreutils-tests-shorten-extreme-factor-tests.patch @@ -0,0 +1,36 @@ +From d3b433bd41c8978c31fee085cc7e6b0554a4c03e Mon Sep 17 00:00:00 2001 +From: Bernhard Voelker +Date: Wed, 8 Jan 2014 01:15:58 +0100 +Subject: [PATCH] tests: shorten extreme-expensive factor tests + +The extended factor tests alone can take several hours on e.g. i586 +or arm6l. Strip the tests down from 37 to 3. + +* tests/local.mk (factor_tests): From the sequence of the tests +00..36, remove all but t00, t05 and t36. +--- + tests/local.mk | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +Index: tests/local.mk +=================================================================== +--- tests/local.mk.orig ++++ tests/local.mk +@@ -755,14 +755,9 @@ all_tests = \ + # See tests/factor/create-test.sh. + tf = tests/factor + factor_tests = \ +- $(tf)/t00.sh $(tf)/t01.sh $(tf)/t02.sh $(tf)/t03.sh $(tf)/t04.sh \ +- $(tf)/t05.sh $(tf)/t06.sh $(tf)/t07.sh $(tf)/t08.sh $(tf)/t09.sh \ +- $(tf)/t10.sh $(tf)/t11.sh $(tf)/t12.sh $(tf)/t13.sh $(tf)/t14.sh \ +- $(tf)/t15.sh $(tf)/t16.sh $(tf)/t17.sh $(tf)/t18.sh $(tf)/t19.sh \ +- $(tf)/t20.sh $(tf)/t21.sh $(tf)/t22.sh $(tf)/t23.sh $(tf)/t24.sh \ +- $(tf)/t25.sh $(tf)/t26.sh $(tf)/t27.sh $(tf)/t28.sh $(tf)/t29.sh \ +- $(tf)/t30.sh $(tf)/t31.sh $(tf)/t32.sh $(tf)/t33.sh $(tf)/t34.sh \ +- $(tf)/t35.sh $(tf)/t36.sh ++ $(tf)/t00.sh \ ++ $(tf)/t05.sh \ ++ $(tf)/t36.sh + + $(factor_tests): $(tf)/run.sh $(tf)/create-test.sh + $(AM_V_GEN)$(MKDIR_P) $(tf) diff --git a/coreutils-tests-workaround-make-fdleak.patch b/coreutils-tests-workaround-make-fdleak.patch new file mode 100644 index 0000000..aae4084 --- /dev/null +++ b/coreutils-tests-workaround-make-fdleak.patch @@ -0,0 +1,25 @@ +--- + tests/init.sh | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +Index: tests/init.sh +=================================================================== +--- tests/init.sh.orig ++++ tests/init.sh +@@ -691,6 +691,16 @@ compare () + } + + # ----------------------------------------------------------------------------- ++# OpenSUSE/OSC workaround. ++# GNU make 4.3.90 leaks a lot of file descriptors when using the jobserver. ++# Close all of them pointing to files matching '/tmp/Gm*'. ++p=$$ ++for n in $(find /proc/$p/fd -lname '/tmp/Gm*' -printf '%P\n'); do ++ exec {n}>&- ++done ++# ----------------------------------------------------------------------------- ++ ++# ----------------------------------------------------------------------------- + + # If you want to override the testdir_prefix_ function, + # or to add more utility functions, use this file. diff --git a/coreutils-use-python3.patch b/coreutils-use-python3.patch new file mode 100644 index 0000000..212d836 --- /dev/null +++ b/coreutils-use-python3.patch @@ -0,0 +1,30 @@ +--- + tests/du/move-dir-while-traversing.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: tests/du/move-dir-while-traversing.sh +=================================================================== +--- tests/du/move-dir-while-traversing.sh.orig ++++ tests/du/move-dir-while-traversing.sh +@@ -20,9 +20,9 @@ + print_ver_ du + require_trap_signame_ + +-# We use a python-inotify script, so... +-python -m pyinotify -h > /dev/null \ +- || skip_ 'python inotify package not installed' ++# We use a python3-inotify script, so... ++python3 -m pyinotify -h > /dev/null \ ++ || skip_ 'python3 inotify package not installed' + + # Move a directory "up" while du is processing its sub-directories. + # While du is processing a hierarchy .../B/C/D/... this script +@@ -33,7 +33,7 @@ python -m pyinotify -h > /dev/null \ + # rename syscall before du finishes processing the subtree under D/. + + cat <<'EOF' > inotify-watch-for-dir-access.py +-#!/usr/bin/env python ++#!/usr/bin/env python3 + import pyinotify as pn + import os,sys + diff --git a/coreutils.changes b/coreutils.changes new file mode 100644 index 0000000..9d2d52f --- /dev/null +++ b/coreutils.changes @@ -0,0 +1,4834 @@ +------------------------------------------------------------------- +Tue Jul 9 20:22:23 UTC 2024 - Bernhard Voelker + +- coreutils-i18n.patch: fold(1): fix exit code for non-existent file. + The exit code of fold(1) was zero for non-existent file: + $ fold badfile; echo $? + fold: badfile: No such file or directory + 0 + The bug was introduced by the downstrean I18N patch. (rhbz#2296201) + +------------------------------------------------------------------- +Mon Apr 1 18:07:16 UTC 2024 - Bernhard Voelker + +- Update to 9.5: + Bug fixes: + * chmod -R now avoids a race where an attacker may replace a traversed file + with a symlink, causing chmod to operate on an unintended file. + [This bug was present in "the beginning".] + * cp, mv, and install no longer issue spurious diagnostics like "failed + to preserve ownership" when copying to GNU/Linux CIFS file systems. + They do this by working around some Linux CIFS bugs. + * cp --no-preserve=mode will correctly maintain set-group-ID bits + for created directories. Previously on systems that didn't support ACLs, + cp would have reset the set-group-ID bit on created directories. + [bug introduced in coreutils-8.20] + * join and uniq now support multi-byte characters better. + For example, 'join -tX' now works even if X is a multi-byte character, + and both programs now treat multi-byte characters like U+3000 + IDEOGRAPHIC SPACE as blanks if the current locale treats them so. + * numfmt options like --suffix no longer have an arbitrary 127-byte limit. + [bug introduced with numfmt in coreutils-8.21] + * mktemp with --suffix now better diagnoses templates with too few X's. + Previously it conflated the insignificant --suffix in the error. + [bug introduced in coreutils-8.1] + * sort again handles thousands grouping characters in single-byte locales + where the grouping character is greater than CHAR_MAX. For e.g. signed + character platforms with a 0xA0 (aka  ) grouping character. + [bug introduced in coreutils-9.1] + * split --line-bytes with a mixture of very long and short lines + no longer overwrites the heap (CVE-2024-0684). + [bug introduced in coreutils-9.2] + * tail no longer mishandles input from files in /proc and /sys file systems, + on systems with a page size larger than the stdio BUFSIZ. + [This bug was present in "the beginning".] + * timeout avoids a narrow race condition, where it might kill arbitrary + processes after a failed process fork. + [bug introduced with timeout in coreutils-7.0] + * timeout avoids a narrow race condition, where it might fail to + kill monitored processes immediately after forking them. + [bug introduced with timeout in coreutils-7.0] + * wc no longer fails to count unprintable characters as parts of words. + [bug introduced in textutils-2.1] + Changes in behavior: + * base32 and base64 no longer require padding when decoding. + Previously an error was given for non padded encoded data. + * base32 and base64 have improved detection of corrupted encodings. + Previously encodings with non zero padding bits were accepted. + * basenc --base16 -d now supports lower case hexadecimal characters. + Previously an error was given for lower case hex digits. + * cp --no-clobber, and mv -n no longer exit with failure status if + existing files are encountered in the destination. Instead they revert + to the behavior from before v9.2, silently skipping existing files. + * ls --dired now implies long format output without hyperlinks enabled, + and will take precedence over previously specified formats or hyperlink + mode. + * numfmt will accept lowercase 'k' to indicate Kilo or Kibi units on input, + and uses lowercase 'k' when outputting such units in '--to=si' mode. + * pinky no longer tries to canonicalize the user's login location by default, + rather requiring the new --lookup option to enable this often slow feature. + * wc no longer ignores encoding errors when counting words. + Instead, it treats them as non white space. + New features: + * chgrp now accepts the --from=OWNER:GROUP option to restrict changes to files + with matching current OWNER and/or GROUP, as already supported by chown(1). + * chmod adds support for -h, -H,-L,-P, and --dereference options, providing + more control over symlink handling. This supports more secure handling of + CLI arguments, and is more consistent with chown, and chmod on other + systems. + * cp now accepts the --keep-directory-symlink option (like tar), to preserve + and follow existing symlinks to directories in the destination. + * cp and mv now accept the --update=none-fail option, which is similar + to the --no-clobber option, except that existing files are diagnosed, + and the command exits with failure status if existing files. + The -n,--no-clobber option is best avoided due to platform differences. + * env now accepts the -a,--argv0 option to override the zeroth argument + of the command being executed. + * mv now accepts an --exchange option, which causes the source and + destination to be exchanged. It should be combined with + --no-target-directory (-T) if the destination is a directory. + The exchange is atomic if source and destination are on a single + file system that supports atomic exchange; --exchange is not yet + supported in other situations. + * od now supports printing IEEE half precision floating point with -t fH, + or brain 16 bit floating point with -t fB, where supported by the compiler. + * tail now supports following multiple processes, with repeated --pid options. + Improvements: + * cp,mv,install,cat,split now read and write a minimum of 256KiB at a time. + This was previously 128KiB and increasing to 256KiB was seen to increase + throughput by 10-20% when reading cached files on modern systems. + * env,kill,timeout now support unnamed signals. kill(1) for example now + supports sending such signals, and env(1) will list them appropriately. + * SELinux operations in file copy operations are now more efficient, + avoiding unneeded MCS/MLS label translation. + * sort no longer dynamically links to libcrypto unless -R is used. + This decreases startup overhead in the typical case. + * wc is now much faster in single-byte locales and somewhat faster in + multi-byte locales. +- coreutils-9.4.split-CVE-2024-0684.patch: Remove now-upstream patch. +- gnulib-readutmp-under-gdm.patch: Likewise. +- gnulib-readutmp.patch: Likewise. +- coreutils-i18n.patch: Remove multi-byte patches for join and uniq, as the + upstream version now handles those tests. + Pull in gnulib module mbchar manually, as it is a dependency of mbfile, + but dropped out of the upstream dependency chain. +- coreutils-misc.patch: Remove change for gnulib-tests/test-isnanl.h. +- coreutils-fix-gnulib-time_r-tests.patch: Add upstream gnulib patch to skip + French test if TZ='Europe/Paris' does not work. + +------------------------------------------------------------------- +Mon Feb 26 10:48:14 UTC 2024 - Dominique Leuenberger + +- Use %patch -P N instead of deprecated %patchN. + +------------------------------------------------------------------- +Sun Jan 21 09:50:55 UTC 2024 - Bernhard Voelker + +- coreutils-9.4.split-CVE-2024-0684.patch: Add upstream patch: + split: do not shrink hold buffer. (CVE-2024-0684, bsc#1218982) +- coreutils-i18n.patch: Update from Fedora to fix build on i686 on GCC14. + +------------------------------------------------------------------- +Sun Sep 17 16:15:24 UTC 2023 - Bernhard Voelker + +- gnulib-readutmp-under-gdm.patch: Add upstream gnulib patch to fix crash + of who/uptime when gdm is in use. [bsc#1215361] +- gnulib-readutmp.patch: Update with upstream patch. + +------------------------------------------------------------------- +Thu Aug 31 09:56:48 UTC 2023 - Thorsten Kukuk + +- Update to 9.4: + Bug fixes: + * b2sum --check will no longer read unallocated memory when + presented with malformed checksum lines. + [bug introduced in coreutils-9.2] + * cp --parents again succeeds when preserving mode for absolute directories. + Previously it would have failed with a "No such file or directory" error. + [bug introduced in coreutils-9.1] + * cp --sparse=never will avoid copy-on-write (reflinking) and copy offloading, + to ensure no holes present in the destination copy. + [bug introduced in coreutils-9.0] + * cksum again diagnoses read errors in its default CRC32 mode. + [bug introduced in coreutils-9.0] + * cksum --check now ensures filenames with a leading backslash character + are escaped appropriately in the status output. + This also applies to the standalone checksumming utilities. + [bug introduced in coreutils-8.25] + * dd again supports more than two multipliers for numbers. + Previously numbers of the form '1024x1024x32' gave "invalid number" errors. + [bug introduced in coreutils-9.1] + * factor, numfmt, and tsort now diagnose read errors on the input. + [This bug was present in "the beginning".] + * install --strip now supports installing to files with a leading hyphen. + Previously such file names would have caused the strip process to fail. + [This bug was present in "the beginning".] + * ls now shows symlinks specified on the command line that can't be traversed. + Previously a "Too many levels of symbolic links" diagnostic was given. + [This bug was present in "the beginning".] + * pr --length=1 --double-space no longer enters an infinite loop. + [This bug was present in "the beginning".] + * tac now handles short reads on its input. Previously it may have exited + erroneously, especially with large input files with no separators. + [This bug was present in "the beginning".] + * uptime no longer incorrectly prints "0 users" on OpenBSD, + and is being built again on FreeBSD and Haiku. + [bugs introduced in coreutils-9.2] + * wc -l and cksum no longer crash with an "Illegal instruction" error + on x86 Linux kernels that disable XSAVE YMM. This was seen on Xen VMs. + [bug introduced in coreutils-9.0] + Changes in behavior: + * cp -v and mv -v will no longer output a message for each file skipped + due to -i, or -u. Instead they only output this information with --debug. + I.e., 'cp -u -v' etc. will have the same verbosity as before coreutils-9.3. + * cksum -b no longer prints base64-encoded checksums. Rather that + short option is reserved to better support emulation of the standalone + checksum utilities with cksum. + * mv dir x now complains differently if x/dir is a nonempty directory. + Previously it said "mv: cannot move 'dir' to 'x/dir': Directory not empty", + where it was unclear whether 'dir' or 'x/dir' was the problem. + Now it says "mv: cannot overwrite 'x/dir': Directory not empty". + Similarly for other renames where the destination must be the problem. + [problem introduced in coreutils-6.0] +- Enable systemd-logind support +- Add gnulib-readutmp.patch: Fix seg.fault of who, pinky, uptime [dgo#65617] +- Create -systemd flavor with binaries linked against libsystemd +- Drop coreutils-invalid-ids.patch to get consistent behavior, most tools + where already removed from that patch. +- coreutils-misc.patch: adjust paths +- coreutils-skip-some-sort-tests-on-ppc.patch: adjust paths +- coreutils-test_without_valgrind.patch: adjust paths +- coreutils-i18n.patch: update from Fedora + +------------------------------------------------------------------- +Thu Apr 20 09:19:20 UTC 2023 - Bernhard Voelker + +- update to 9.3: + Bug fixes: + * cp --reflink=auto (the default), mv, and install + will again fall back to a standard copy in more cases. + Previously copies could fail with permission errors on + more restricted systems like android or containers etc. + [bug introduced in coreutils-9.2] + * cp --recursive --backup will again operate correctly. + Previousy it may have issued "File exists" errors when + it failed to appropriately rename files being replaced. + [bug introduced in coreutils-9.2] + * date --file and dircolors will now diagnose a failure to read a file. + Previously they would have silently ignored the failure. + [This bug was present in "the beginning".] + * md5sum --check again correctly prints the status of each file checked. + Previously the status for files was printed as 'OK' once any file had passed. + This also applies to cksum, sha*sum, and b2sum. + [bug introduced in coreutils-9.2] + * wc will now diagnose if any total counts have overflowed. + [This bug was present in "the beginning".] + * `wc -c` will again correctly update the read offset of inputs. + Previously it deduced the size of inputs while leaving the offset unchanged. + [bug introduced in coreutils-8.27] + * Coreutils programs no longer fail for timestamps past the year 2038 + on obsolete configurations with 32-bit signed time_t, because the + build procedure now rejects these configurations. + [This bug was present in "the beginning".] + Changes in behavior: + * 'cp -n' and 'mv -n' now issue an error diagnostic if skipping a file, + to correspond with -n inducing a nonzero exit status as of coreutils 9.2. + Similarly 'cp -v' and 'mv -v' will output a message for each file skipped + due to -n, -i, or -u. + New features: + * cp and mv now support --update=none to always skip existing files + in the destination, while not affecting the exit status. + This is equivalent to the --no-clobber behavior from before v9.2. +- drop fix-reflink-fallback.patch (upstream). + +------------------------------------------------------------------- +Thu Apr 6 16:12:43 UTC 2023 - Dirk Müller + +- add fix-reflink-fallback.patch (bsc#1210033) + +------------------------------------------------------------------- +Tue Mar 21 20:58:07 UTC 2023 - Dirk Müller + +- update to 9.2: + * cksum now accepts the --base64 (-b) option to print + base64-encoded checksums. It also accepts/checks such + checksums. + * cksum now accepts the --raw option to output a raw binary + checksum. No file name or other information is output in + this mode. + * cp, mv, and install now accept the --debug option to + print details on how a file is being copied. + * factor now accepts the --exponents (-h) option to print + factors in the form p^e, rather than repeating the prime p, e + times. + * ls now supports the --time=modification option, to explicitly + select the default mtime timestamp for display and sorting. + * mv now supports the --no-copy option, which causes it to fail + when asked to move a file to a different file system. + * split now accepts options like '-n SIZE' that exceed machine + integer range, when they can be implemented as if they were + infinity. + * split -n now accepts piped input even when not in round-robin + mode, by first copying input to a temporary file to determine its + size. + * wc now accepts the --total={auto,never,always,only} option + to give explicit control over when the total is output. + * 'cp --reflink=always A B' no longer leaves behind a newly + created empty file B merely because copy-on-write clones are not + supported. + * 'cp -n' and 'mv -n' now exit with nonzero status if they skip + their action because the destination exists, and likewise for 'cp + -i', 'ln -i', and 'mv -i' when the user declines. (POSIX + specifies this for 'cp -i' and 'mv -i'.) + * cp, mv, and install again read in multiples of the reported + block size, to support unusual devices that may have this + constraint. + * du --apparent now counts apparent sizes only of regular files + and symbolic links. POSIX does not specify the meaning of + apparent sizes (i.e., st_size) for other file types, and + counting those sizes could cause confusing and unwanted size + mismatches. + * 'ls -v' and 'sort -V' go back to sorting ".0" before ".A", + reverting to the behavior in coreutils-9.0 and earlier. + This behavior is now documented. + * ls --color now matches a file extension case sensitively + if there are different sequences defined for separate cases. + * printf unicode \uNNNN, \UNNNNNNNN syntax, now supports all + valid unicode code points. Previously is was restricted to + the C universal character subset, which restricted most points <= + 0x9F. + * runcon now exits with status 125 for internal errors. + Previously upon internal errors it would exit with status 1, + which was less distinguishable + from errors from the invoked command. + * 'split -n N' now splits more evenly when the input size is + not a multiple of N, by creating N output files whose sizes + differ by at most 1 byte. Formerly, it did this only when + the input size was less than N. + * 'stat -c %s' now prints sizes as unsigned, consistent with + 'ls'. + * a long list of bugfixes, see included NEWS file for details + +- drop gnulib-simple-backup-fix.patch (upstream) +- drop coreutils-tests-workaround-make-fdleak.patch (obsolete) + +------------------------------------------------------------------- +Mon Sep 26 20:29:11 UTC 2022 - Bernhard Voelker + +- coreutils-tests-workaround-make-fdleak.patch: Add patch to work around + a GNU make bug which leaks file descriptors when using the jobserver; + this makes some tests fail. +- coreutils.spec: Reference the patch. + +------------------------------------------------------------------- +Tue Aug 9 12:13:00 UTC 2022 - Dirk Müller + +- refresh coreutils-i18n.patch from Fedora to make expand and unexpand + more similar + +------------------------------------------------------------------- +Mon Aug 8 12:19:30 UTC 2022 - Stephan Kulow + +- Remove python2 from buildrequires - appears to be a left over + +------------------------------------------------------------------- +Tue Aug 2 11:05:45 UTC 2022 - Dirk Müller + +- add missing hostname buildrequires + +------------------------------------------------------------------- +Mon Aug 1 21:16:27 UTC 2022 - Dirk Müller + +- refresh coreutils-i18n.patch to prevent unexpand from failing on control + characters (brc#2112870) (bsc#1202029) +- extend psuffix handling to be quilt(1) compatible + +------------------------------------------------------------------- +Tue Apr 26 08:21:58 UTC 2022 - Dirk Müller + +- remove builddisabled conditions for rings - will be done now as + BuildFlags: excludebuilds + +------------------------------------------------------------------- +Sun Apr 24 09:49:04 UTC 2022 - Bernhard Voelker + +- gnulib-simple-backup-fix.patch: Add patch to make simple backups in correct + directory; broken in 9.1. See https://bugs.gnu.org/55029 + +------------------------------------------------------------------- +Thu Apr 21 20:58:30 UTC 2022 - Dirk Müller + +- update to 9.1: + * chmod -R no longer exits with error status when encountering symlinks. + All files would be processed correctly, but the exit status was incorrect. + * If 'cp -Z A B' checks B's status and some other process then removes B, + cp no longer creates B with a too-generous SELinux security context + before adjusting it to the correct value. + * 'cp --preserve=ownership A B' no longer ignores the umask when creating B. + Also, 'cp --preserve-xattr A B' is less likely to temporarily chmod u+w B. + * 'id xyz' now uses the name 'xyz' to determine groups, instead of xyz's uid. + * 'ls -v' and 'sort -V' no longer mishandle corner cases like "a..a" vs "a.+" + or lines containing NULs. Their behavior now matches the documentation + for file names like ".m4" that consist entirely of an extension, + and the documentation has been clarified for unusual cases. + * 'mv -T --backup=numbered A B/' no longer miscalculates the backup number + for B when A is a directory, possibly inflooping. + * cat now uses the copy_file_range syscall if available, when doing + simple copies between regular files. This may be more efficient, by avoiding + user space copies, and possibly employing copy offloading or reflinking. + * chown and chroot now warn about usages like "chown root.root f", + which have the nonstandard and long-obsolete "." separator that + causes problems on platforms where user names contain ".". + Applications should use ":" instead of ".". + * cksum no longer allows abbreviated algorithm names, + so that forward compatibility and robustness is improved. + * date +'%-N' now suppresses excess trailing digits, instead of always + padding them with zeros to 9 digits. It uses clock_getres and + clock_gettime to infer the clock resolution. + * dd conv=fsync now synchronizes output even after a write error, + and similarly for dd conv=fdatasync. + * dd now counts bytes instead of blocks if a block count ends in "B". + For example, 'dd count=100KiB' now copies 100 KiB of data, not + 102,400 blocks of data. The flags count_bytes, skip_bytes and + seek_bytes are therefore obsolescent and are no longer documented, + though they still work. + * ls no longer colors files with capabilities by default, as file-based + capabilties are very rarely used, and lookup increases processing per file by + about 30%. It's best to use getcap [-r] to identify files with capabilities. + * ls no longer tries to automount files, reverting to the behavior + before the statx() call was introduced in coreutils-8.32. + * stat no longer tries to automount files by default, reverting to the + behavior before the statx() call was introduced in coreutils-8.32. + Only `stat --cached=never` will continue to automount files. + * timeout --foreground --kill-after=... will now exit with status 137 + if the kill signal was sent, which is consistent with the behavior + when the --foreground option is not specified. This allows users to + distinguish if the command was more forcefully terminated. + * dd now supports the aliases iseek=N for skip=N, and oseek=N for seek=N, + like FreeBSD and other operating systems. + * dircolors takes a new --print-ls-colors option to display LS_COLORS + entries, on separate lines, colored according to the entry color code. + * dircolors will now also match COLORTERM in addition to TERM environment + variables. The default config will apply colors with any COLORTERM set. + * cp, mv, and install now use openat-like syscalls when copying to a directory. + * This avoids some race conditions and should be more efficient. + * The new 'date' option --resolution outputs the timestamp resolution. + * With conv=fdatasync or conv=fsync, dd status=progress now reports + any extra final progress just before synchronizing output data, + since synchronizing can take a long time. + * printf now supports printing the numeric value of multi-byte characters. + * sort --debug now diagnoses issues with --field-separator characters + that conflict with characters possibly used in numbers. + * 'tail -f file | filter' now exits on Solaris when filter exits. + * root invoked coreutils, that are built and run in single binary mode, + now adjust /proc/$pid/cmdline to be more specific to the utility + being run, rather than using the general "coreutils" binary name. +- coreutils-i18n.patch: Re-sync the patch with Fedora. +- drop coreutils-chmod-fix-exit-status-ign-symlinks.patch (upstream) + +------------------------------------------------------------------- +Mon Oct 4 22:15:01 UTC 2021 - Bernhard Voelker + +- coreutils-i18n.patch: Re-sync the patch with Fedora. + Refresh the patch, adding a hunk to link the expand+unexpand tools + against lib/mbfile.c, thus fixing build problems with clang + (see https://src.fedoraproject.org/rpms/coreutils/c/f4a53e34). + +------------------------------------------------------------------- +Fri Oct 1 19:38:16 UTC 2021 - Dirk Müller + +- spec file cleanups (spec-cleaner run) + +------------------------------------------------------------------- +Thu Sep 30 18:41:30 UTC 2021 - Bernhard Voelker + +- coreutils-skip-tests-rm-ext3-perf.patch: Add patch to skip the test + 'tests/rm/ext3-perf.sh' temporarily as it hangs on OBS. + +------------------------------------------------------------------- +Sun Sep 26 15:15:00 UTC 2021 - Bernhard Voelker + +- Update to 9.0: + * Noteworthy changes in release 9.0 (2021-09-24) [stable] + + ** Bug fixes + + chmod -v no longer misreports modes of dangling symlinks. + [bug introduced in coreutils-5.3.0] + + cp -a --attributes-only now never removes destination files, + even if the destination files are hardlinked, or the source + is a non regular file. + [bug introduced in coreutils-8.6] + + csplit --suppress-matched now elides the last matched line + when a specific number of pattern matches are performed. + [bug introduced with the --suppress-matched feature in coreutils-8.22] + + df no longer outputs duplicate remote mounts in the presence of bind mounts. + [bug introduced in coreutils-8.26] + + df no longer mishandles command-line args that it pre-mounts + [bug introduced in coreutils-8.29] + + du no longer crashes on XFS file systems when the directory hierarchy is + heavily changed during the run. + [bug introduced in coreutils-8.25] + + env -S no longer crashes when given unusual whitespace characters + [bug introduced in coreutils-8.30] + + expr no longer mishandles unmatched \(...\) in regular expressions. + [bug introduced in coreutils-6.0] + + ls no longer crashes when printing the SELinux context for unstatable files. + [bug introduced in coreutils-6.9.91] + + mkdir -m no longer mishandles modes more generous than the umask. + [bug introduced in coreutils-8.22] + + nl now handles single character --section-delimiter arguments, + by assuming a second ':' character has been specified, as specified by POSIX. + [This bug was present in "the beginning".] + + pr again adjusts tabs in input, to maintain alignment in multi column output. + [bug introduced in coreutils-6.9] + + rm no longer skips an extra file when the removal of an empty directory fails. + [bug introduced by the rewrite to use fts in coreutils-8.0] + + split --number=K/N will again correctly split chunk K of N to stdout. + Previously a chunk starting after 128KiB, output the wrong part of the file. + [bug introduced in coreutils-8.26] + + tail -f no longer overruns a stack buffer when given too many files + to follow and ulimit -n exceeds 1024. + [bug introduced in coreutils-7.5] + + tr no longer crashes when using --complement with certain + invalid combinations of case character classes. + [bug introduced in coreutils-8.6] + + basenc --base64 --decode no longer silently discards decoded characters + on (1024*5) buffer boundaries + [bug introduced in coreutils-8.31] + + ** Changes in behavior + + cp and install now default to copy-on-write (COW) if available. + + cp, install and mv now use the copy_file_range syscall if available. + Also, they use lseek+SEEK_HOLE rather than ioctl+FS_IOC_FIEMAP on sparse + files, as lseek is simpler and more portable. + + On GNU/Linux systems, ls no longer issues an error message on a + directory merely because it was removed. This reverts a change + that was made in release 8.32. + + ptx -T no longer attempts to substitute old-fashioned TeX escapes + for 8-bit non-ASCII alphabetic characters. TeX indexes should + instead use '\usepackage[latin1]{inputenc}' or equivalent. + + stat will use decomposed (major,minor) device numbers in its default format. + This is less ambiguous, and more consistent with ls. + + sum [-r] will output a file name, even if only a single name is passed. + This is consistent with sum -s, cksum, and other sum(1) implementations. + + ** New Features + + cksum now supports the -a (--algorithm) option to select any + of the existing sum, md5sum, b2sum, sha*sum implementations etc. + cksum now subsumes all of these programs, and coreutils + will introduce no future standalone checksum utility. + + cksum -a now supports the 'sm3' argument, to use the SM3 digest algorithm. + + cksum --check now supports auto detecting the digest type to use, + when verifying tagged format checksums. + + expr and factor now support bignums on all platforms. + + ls --classify now supports the "always", "auto", or "never" flags, + to support only outputting classifier characters if connected to a tty. + + ls now accepts the --sort=width option, to sort by file name width. + This is useful to more compactly organize the default vertical column output. + + ls now accepts the --zero option, to terminate each output line with + NUL instead of newline. + + nl --line-increment can now take a negative number to decrement the count. + + stat supports more formats for representing decomposed device numbers. + %Hd,%Ld and %Hr,%Lr will output major,minor device numbers and device types + respectively. %d corresponds to st_dev and %r to std_rdev. + + ** Improvements + + cat --show-ends will now show \r\n as ^M$. Previously the \r was taken + literally, thus overwriting the first character in the line with '$'. + + cksum [-a crc] is now up to 4 times faster by using a slice by 8 algorithm, + and at least 8 times faster where pclmul instructions are supported. + A new --debug option will indicate if pclmul is being used. + + md5sum --check now supports checksum files with CRLF line endings. + This also applies to cksum, sha*sum, and b2sum. + + df now recognizes these file systems as remote: + acfs, coda, fhgfs, gpfs, ibrix, ocfs2, and vxfs. + + rmdir now clarifies the error if a symlink_to_dir/ has not been traversed. + This is the case on GNU/Linux systems, where the trailing slash is ignored. + + stat and tail now know about the "devmem", "exfat", "secretmem", "vboxsf", + and "zonefs" file system types. stat -f -c%T now reports the file system + type, and tail -f uses polling for "vboxsf" and inotify for the others. + + timeout now supports sub-second timeouts on macOS. + + wc is up to 5 times faster when counting only new line characters, + where avx2 instructions are supported. + A new --debug option will indicate if avx2 is being used. + +- Remove patches which are included in the new upstream version now: + * coreutils-gnulib-disable-test-float.patch + * coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch + * coreutils-tests-fix-FP-in-ls-stat-free-color.patch + * gnulib-test-avoid-FP-perror-strerror.patch + +- coreutils-i18n.patch: Refresh patch. Also patch 'tests/Coreutils.pm' used + by perl-based tests to allow longer test names ... which the i18n tests with + their "-mb" suffix have. + +- coreutils-chmod-fix-exit-status-ign-symlinks.patch: Add upstream patch to + fix a regression with the exit code of chmod introduced in 9.0. + +- coreutils.spec: + * Version: bump version. + * Remove the above removed patches. + * Reference the above new patch. + +------------------------------------------------------------------- +Thu Apr 29 16:21:49 UTC 2021 - Callum Farmer + +- Use new packageand format + +------------------------------------------------------------------- +Fri Apr 23 14:08:32 UTC 2021 - Bernhard Voelker + +- coreutils-tests-fix-FP-in-ls-stat-free-color.patch: Add upstream patch + to avoid FP in testsuite. +- coreutils.spec: + - Reference the above patch. + - Change keyring URL to new GNU coreutils Group Release Keyring. +- coreutils.keyring: Update with the Group Release Keyring. + +------------------------------------------------------------------- +Fri Oct 16 07:26:20 UTC 2020 - Ludwig Nussel + +- prepare usrmerge (boo#1029961) + +------------------------------------------------------------------- +Mon Aug 31 07:14:12 UTC 2020 - Bernhard Voelker + +- gnulib-test-avoid-FP-perror-strerror.patch: Add patch to +avoid false-positive error in gnulib tests 'test-perror2' and +'test-strerror_r', visible on armv7l. +- coreutils.spec: Reference the patch. + +------------------------------------------------------------------- +Thu Jul 16 11:23:47 UTC 2020 - Dominique Leuenberger + +- Drop suse-module-tools BuildRequires: this was used for the macro + regenerate_initrd_post/posttrans, which have been moved to + rpm-config-SUSE in Jan 2019. + +------------------------------------------------------------------- +Sat Jun 13 08:48:03 UTC 2020 - Bernhard Voelker + +- coreutils-gnulib-disable-test-float.patch: Add patch to temporarily + disable the gnulib test 'test-float' failing on ppc and ppc64le. +- coreutils.spec: Reference the patch. While at it, avoid conditional + Patch and Source entries as that break cross-platform builds from + source RPMs. + +------------------------------------------------------------------- +Mon May 4 08:05:15 UTC 2020 - Dirk Mueller + +- add coreutils-use-python3.patch to minimally port away from + python 2.x use of pyinotify in the testsuite + +------------------------------------------------------------------- +Mon Mar 9 07:17:46 UTC 2020 - Bernhard Voelker + +- Update to 8.32: + * Noteworthy changes in release 8.32 (2020-03-05) [stable] + + ** Bug fixes + + cp now copies /dev/fd/N correctly on platforms like Solaris where + it is a character-special file whose minor device number is N. + [bug introduced in fileutils-4.1.6] + + dd conv=fdatasync no longer reports a "Bad file descriptor" error + when fdatasync is interrupted, and dd now retries interrupted calls + to close, fdatasync, fstat and fsync instead of incorrectly + reporting an "Interrupted system call" error. + [bugs introduced in coreutils-6.0] + + df now correctly parses the /proc/self/mountinfo file for unusual entries + like ones with '\r' in a field value ("mount -t tmpfs tmpfs /foo$'\r'bar"), + when the source field is empty ('mount -t tmpfs "" /mnt'), and when the + filesystem type contains characters like a blank which need escaping. + [bugs introduced in coreutils-8.24 with the introduction of reading + the /proc/self/mountinfo file] + + factor again outputs immediately when stdout is a tty but stdin is not. + [bug introduced in coreutils-8.24] + + ln works again on old systems without O_DIRECTORY support (like Solaris 10), + and on systems where symlink ("x", ".") fails with errno == EINVAL + (like Solaris 10 and Solaris 11). + [bug introduced in coreutils-8.31] + + rmdir --ignore-fail-on-non-empty now works correctly for directories + that fail to be removed due to permission issues. Previously the exit status + was reversed, failing for non empty and succeeding for empty directories. + [bug introduced in coreutils-6.11] + + 'shuf -r -n 0 file' no longer mistakenly reads from standard input. + [bug introduced with the --repeat feature in coreutils-8.22] + + split no longer reports a "output file suffixes exhausted" error + when the specified number of files is evenly divisible by 10, 16, 26, + for --numeric, --hex, or default alphabetic suffixes respectively. + [bug introduced in coreutils-8.24] + + seq no longer prints an extra line under certain circumstances (such as + 'seq -f "%g " 1000000 1000000'). + [bug introduced in coreutils-6.10] + + ** Changes in behavior + + Several programs now check that numbers end properly. For example, + 'du -d 1x' now reports an error instead of silently ignoring the 'x'. + Affected programs and options include du -d, expr's numeric operands + on non-GMP builds, install -g and -o, ls's TABSIZE environment + variable, mknod b and c, ptx -g and -w, shuf -n, and sort --batch-size + and --parallel. + + date now parses military time zones in accordance with common usage: + "A" to "M" are equivalent to UTC+1 to UTC+12 + "N" to "Y" are equivalent to UTC-1 to UTC-12 + "Z" is "zulu" time (UTC). + For example, 'date -d "09:00B" is now equivalent to 9am in UTC+2 time zone. + Previously, military time zones were parsed according to the obsolete + rfc822, with their value negated (e.g., "B" was equivalent to UTC-2). + [The old behavior was introduced in sh-utils 2.0.15 ca. 1999, predating + coreutils package.] + + ls issues an error message on a removed directory, on GNU/Linux systems. + Previously no error and no entries were output, and so indistinguishable + from an empty directory, with default ls options. + + uniq no longer uses strcoll() to determine string equivalence, + and so will operate more efficiently and consistently. + + ** New Features + + ls now supports the --time=birth option to display and sort by + file creation time, where available. + + od --skip-bytes now can use lseek even if the input is not a regular + file, greatly improving performance in some cases. + + stat(1) supports a new --cached= option, used on systems with statx(2) + to control cache coherency of file system attributes, + useful on network file systems. + + ** Improvements + + stat and ls now use the statx() system call where available, which can + operate more efficiently by only retrieving requested attributes. + + stat and tail now know about the "binderfs", "dma-buf-fs", "erofs", + "ppc-cmm-fs", and "z3fold" file systems. + stat -f -c%T now reports the file system type, and tail -f uses inotify. + + ** Build-related + + gzip-compressed tarballs are distributed once again + +- Refresh patches: + * coreutils-disable_tests.patch + * coreutils-getaddrinfo.patch + * coreutils-i18n.patch + * coreutils-invalid-ids.patch + * coreutils-remove_hostname_documentation.patch + * coreutils-remove_kill_documentation.patch + * coreutils-skip-gnulib-test-tls.patch + * coreutils-tests-shorten-extreme-factor-tests.patch + +- coreutils-i18n.patch: + * uniq: remove collation handling as required by newer POSIX; see + - https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=8e81d44b5 + - https://www.austingroupbugs.net/view.php?id=963 + +- coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch: + * Add patch for 'ls' to restore 8.31 behavior on removed directories. + +- coreutils.spec: + * Version: bump version. + * %check: re-enable regular 'make check' for non-multibuild package. + * reference the above new patch. + +- coreutils.keyring: + * Update from upstream (Savannah). + +------------------------------------------------------------------- +Tue Jan 28 08:13:51 UTC 2020 - Ludwig Nussel + +- disable single and testsuite builds in rings/staging +- remove duplicate "coreutils" in flavor to make it look nicer in OBS + +------------------------------------------------------------------- +Mon Jan 20 15:00:06 UTC 2020 - Bernhard Voelker + +- minor: remove obsolete comment in spec file. + +------------------------------------------------------------------- +Thu Jan 9 16:23:59 UTC 2020 - Ludwig Nussel + +- switch to multibuild +- add coreutils-single subpackage that contains a single binary coreutils tool + similar to busybox +- package LC_CTIME directories also in lang package +- split off doc package +- remove info macros, handled by file trigger nowadays + +------------------------------------------------------------------- +Thu Sep 19 11:53:13 UTC 2019 - Ludwig Nussel + +- Do not recommend lang package. The lang package already has a + supplements. + +------------------------------------------------------------------- +Mon Mar 11 07:13:38 UTC 2019 - Bernhard Voelker + +- Update to 8.31: + * Noteworthy changes in release 8.31 (2019-03-10) [stable] + + ** Bug fixes + + 'base64 a b' now correctly diagnoses 'b' as the extra operand, not 'a'. + [bug introduced in coreutils-5.3.0] + + When B already exists, 'cp -il A B' no longer immediately fails + after asking the user whether to proceed. + [This bug was present in "the beginning".] + + df no longer corrupts displayed multibyte characters on macOS. + [bug introduced with coreutils-8.18] + + seq no longer outputs inconsistent decimal point characters + for the last number, when locales are misconfigured. + [bug introduced in coreutils-7.0] + + shred, sort, and split no longer falsely report ftruncate errors + when outputting to less-common file types. For example, the shell + command 'sort /dev/null -o /dev/stdout | cat' no longer fails with + an "error truncating" diagnostic. + [bug was introduced with coreutils-8.18 for sort and split, and + (for shared memory objects only) with fileutils-4.1 for shred] + + sync no longer fails for write-only file arguments. + [bug introduced with argument support to sync in coreutils-8.24] + + 'tail -f file | filter' no longer exits immediately on AIX. + [bug introduced in coreutils-8.28] + + 'tail -f file | filter' no longer goes into an infinite loop + if filter exits and SIGPIPE is ignored. + [bug introduced in coreutils-8.28] + + ** Changes in behavior + + cksum, dd, hostid, hostname, link, logname, sleep, tsort, unlink, + uptime, users, whoami, yes: now always process --help and --version options, + regardless of any other arguments present before any optional '--' + end-of-options marker. + + nohup now processes --help and --version as first options even if other + parameters follow. + + 'yes a -- b' now outputs 'a b' instead of including the end-of-options + marker as before: 'a -- b'. + + echo now always processes backslash escapes when the POSIXLY_CORRECT + environment variable is set. + + When possible 'ln A B' now merely links A to B and reports an error + if this fails, instead of statting A and B before linking. This + uses fewer system calls and avoids some races. The old statting + approach is still used in situations where hard links to directories + are allowed (e.g., NetBSD when superuser). + + ls --group-directories-first will also group symlinks to directories. + + 'test -a FILE' is not supported anymore. Long ago, there were concerns about + the high probability of humans confusing the -a primary with the -a binary + operator, so POSIX changed this to 'test -e FILE'. Scripts using it were + already broken and non-portable; the -a unary operator was never documented. + + wc now treats non breaking space characters as word delimiters + unless the POSIXLY_CORRECT environment variable is set. + + ** New features + + id now supports specifying multiple users. + + 'date' now supports the '+' conversion specification flag, + introduced in POSIX.1-2017. + + printf, seq, sleep, tail, and timeout now accept floating point + numbers in either the current or the C locale. For example, if the + current locale's decimal point is ',', 'sleep 0,1' and 'sleep 0.1' + now mean the same thing. Previously, these commands accepted only + C-locale syntax with '.' as the decimal point. The new behavior is + more compatible with other implementations in non-C locales. + + test now supports the '-N FILE' unary operator (like e.g. bash) to check + whether FILE exists and has been modified since it was last read. + + env now supports '--default-signal[=SIG]', '--ignore-signal[=SIG]', and + '--block-signal[=SIG], to setup signal handling before executing a program. + + env now supports '--list-signal-handling' to indicate non-default + signal handling before executing a program. + + ** New commands + + basenc is added to complement existing base64,base32 commands, + and encodes and decodes printable text using various common encodings: + base64,base64url,base32,base32hex,base16,base2,z85. + + ** Improvements + + ls -l now better aligns abbreviated months containing digits, + which is common in Asian locales. + + stat and tail now know about the "sdcardfs" file system on Android. + stat -f -c%T now reports the file system type, and tail -f uses inotify. + + stat now prints file creation time when supported by the file system, + on GNU Linux systems with glibc >= 2.28 and kernel >= 4.11. + +- Refresh patches (line number changes only): + * coreutils-disable_tests.patch + * coreutils-i18n.patch + * coreutils-misc.patch + * coreutils-remove_hostname_documentation.patch + * coreutils-remove_kill_documentation.patch + * coreutils-skip-gnulib-test-tls.patch + * coreutils-tests-shorten-extreme-factor-tests.patch + + +- coreutils.spec: + * Version: bump version. + * URL: Use https scheme. + * %description: Add 'basenc' tool. + * Change gitweb to cgit URL with https in a comment. + +- coreutils.keyring: + * Update for added section headers ('GPG keys of '). + +------------------------------------------------------------------- +Tue Jul 3 23:20:18 UTC 2018 - mail@bernhard-voelker.de + +- Update to 8.30: + * Noteworthy changes in release 8.30 (2018-07-01) [stable] + + ** Bug fixes + + 'cp --symlink SRC DST' will again correctly validate DST. + If DST is a regular file and SRC is a symlink to DST, + then cp will no longer allow that operation to clobber DST. + Also with -d, if DST is a symlink, then it can always be replaced, + even if it points to SRC on a separate device. + [bugs introduced with coreutils-8.27] + + 'cp -n -u' and 'mv -n -u' now consistently ignore the -u option. + Previously, this option combination suffered from race conditions + that caused -u to sometimes override -n. + [bug introduced with coreutils-7.1] + + 'cp -a --no-preserve=mode' now sets appropriate default permissions + for non regular files like fifos and character device nodes etc., + and leaves mode bits of existing files unchanged. + Previously it would have set executable bits on created special files, + and set mode bits for existing files as if they had been created. + [bug introduced with coreutils-8.20] + + 'cp --remove-destination file symlink' now removes the symlink + even if it can't be traversed. + [bug introduced with --remove-destination in fileutils-4.1.1] + + ls no longer truncates the abbreviated month names that have a + display width between 6 and 12 inclusive. Previously this would have + output ambiguous months for Arabic or Catalan locales. + + 'ls -aA' is now equivalent to 'ls -A', since -A now overrides -a. + [bug introduced in coreutils-5.3.0] + + 'mv -n A B' no longer suffers from a race condition that can + overwrite a simultaneously-created B. This bug fix requires + platform support for the renameat2 or renameatx_np syscalls, found + in recent Linux and macOS kernels. As a side effect, ‘mv -n A A’ + now silently does nothing if A exists. + [bug introduced with coreutils-7.1] + + ** Changes in behavior + + 'cp --force file symlink' now removes the symlink even if + it is self referential. + + ls --color now matches file extensions case insensitively. + + ** New features + + cp --reflink now supports --reflink=never to enforce a standard copy. + + env supports a new -v/--debug option to show verbose information about + each processing step. + + env supports a new -S/--split-string=S option to split a single argument + string into multiple arguments. Used to pass multiple arguments in scripts + (shebang lines). + + md5sum accepts a new option: --zero (-z) to delimit the output lines with a + NUL instead of a newline character. This also disables file name escaping. + This also applies to sha*sum and b2sum. + + rm --preserve-root now supports the --preserve-root=all option to + reject any command line argument that is mounted to a separate file system. + + ** Improvements + + cut supports line lengths up to the max file size on 32 bit systems. + Previously only offsets up to SIZE_MAX-1 were supported. + + stat and tail now know about the "exfs" file system, which is a + version of XFS. stat -f --format=%T now reports the file system type, + and tail -f uses inotify. + + wc avoids redundant processing of ASCII text in multibyte locales, + which is especially significant on macOS. + + ** Build-related + + Adjust to glibc >= 2.28 (bsc#1182550, jsc#SLE-13520, jsc#SLE-13756) + +- Refresh patches (line number changes only): + * coreutils-build-timeout-as-pie.patch + * coreutils-disable_tests.patch + * coreutils-remove_hostname_documentation.patch + * coreutils-remove_kill_documentation.patch + * coreutils-skip-gnulib-test-tls.patch + * coreutils-tests-shorten-extreme-factor-tests.patch + +- coreutils.spec: + * (License): osc changed the value from "GPL-3.0+" to "GPL-3.0-or-later". + * (build): Make sure that parse-datetime.{c,y} ends up in debuginfo (rh#1555079). + +- coreutils-i18n.patch: + * src/exand.c,src/unexpand.c: Avoid -Wcomment warning. + * src/cut.c (cut_characters_or_cut_bytes_no_split): Change idx from size_t + to uintmax_t type to avoid a regression on i586, armv7l and ppc. + Compare upstream, non-MB commit: + https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=d1a754c8272 + (cut_fields_mb): Likewise for field_idx. + * tests/misc/cut.pl: Remove downstream tweaks as upstream MB tests are + working since a while. + +- coreutils.keyring: Update Assaf Gordon's GPG public key. + +------------------------------------------------------------------- +Thu Feb 22 15:12:57 UTC 2018 - fvogt@suse.com + +- Use %license (boo#1082318) + +------------------------------------------------------------------- +Thu Dec 28 18:18:20 UTC 2017 - mail@bernhard-voelker.de + +- Update to 8.29: + * Noteworthy changes in release 8.29 (2017-12-27) [stable] + + ** Bug fixes + + b2sum no longer crashes when processing certain truncated check files. + [bug introduced with b2sum coreutils-8.26] + + dd now ensures the correct cache ranges are specified for the "nocache" + and "direct" flags. Previously some pages in the page cache were not + invalidated. [bug introduced for "direct" in coreutils-7.5, + and with the "nocache" implementation in coreutils-8.11] + + df no longer hangs when given a fifo argument. + [bug introduced in coreutils-7.3] + + ptx -S no longer infloops for a pattern which returns zero-length matches. + [the bug dates back to the initial implementation] + + shred --remove will again repeatedly rename files with shortening names + to attempt to hide the original length of the file name. + [bug introduced in coreutils-8.28] + + stty no longer crashes when processing settings with -F also specified. + [bug introduced in fileutils-4.0] + + tail --bytes again supports non seekable inputs on all systems. + On systems like android it always tried to process as seekable inputs. + [bug introduced in coreutils-8.24] + + timeout will again notice its managed command exiting, even when + invoked with blocked CHLD signal, or in a narrow window where + this CHLD signal from the exiting child was missed. In each case + timeout would have then waited for the time limit to expire. + [bug introduced in coreutils-8.27] + + ** New features + + timeout now supports the --verbose option to diagnose forced termination. + + ** Improvements + + dd now supports iflag=direct with arbitrary sized files on all file systems. + + tail --bytes=NUM will efficiently seek to the end of block devices, + rather than reading from the start. + + Utilities which do not support long options (other than the default --help + and --version), e.g. cksum and sleep, now use more consistent error diagnostic + for unknown long options. + + ** Build-related + + Default man pages are now distributed which are used if perl is + not available on the build system, or when cross compiling. + +- Refresh patches (line number changes only): + * coreutils-i18n.patch + * coreutils-remove_hostname_documentation.patch + * coreutils-remove_kill_documentation.patch + * coreutils-tests-shorten-extreme-factor-tests.patch + +------------------------------------------------------------------- +Mon Sep 4 18:00:24 UTC 2017 - mail@bernhard-voelker.de + +- Update to 8.28 + (for details see included NEWS file) +- Refresh patches: + * coreutils-disable_tests.patch + * coreutils-i18n.patch + * coreutils-remove_hostname_documentation.patch + * coreutils-remove_kill_documentation.patch + * coreutils-skip-gnulib-test-tls.patch + * coreutils-tests-shorten-extreme-factor-tests.patch +- coreutils.keyring: Update from upstream (Savannah). +- Remove now-upstream patches: + * coreutils-cve-2017-7476-out-of-bounds-with-large-tz.patch + * coreutils-tests-port-to-timezone-2017a.patch +- coreutils.spec: Add "BuildRequires: user(bin)" for the tests. + +------------------------------------------------------------------- +Wed Aug 16 14:26:30 UTC 2017 - ghe@suse.com + +- Drop coreutils-ocfs2_reflinks.patch + OCFS2 file system has supported file clone ioctls like btrfs, + then, coreutils doesn't need this patch from the kernel v4.10-rc1 + +------------------------------------------------------------------- +Tue May 2 21:29:32 UTC 2017 - mail@bernhard-voelker.de + +- coreutils-cve-2017-7476-out-of-bounds-with-large-tz.patch: + Add upstream patch to fix an heap overflow security issue + in date(1) and touch(1) with a large TZ variable + (CVE-2017-7476, rh#1444774, boo#1037124). + +------------------------------------------------------------------- +Fri Mar 10 09:42:51 UTC 2017 - mail@bernhard-voelker.de + +- Update to 8.27 + (for details see included NEWS file) +- Refresh patches: + * coreutils-build-timeout-as-pie.patch + * coreutils-disable_tests.patch + * coreutils-getaddrinfo.patch + * coreutils-i18n.patch + * coreutils-ocfs2_reflinks.patch + * coreutils-remove_hostname_documentation.patch + * coreutils-remove_kill_documentation.patch + * coreutils-skip-gnulib-test-tls.patch + * coreutils-tests-shorten-extreme-factor-tests.patch + * coreutils-testsuite.spec +- coreutils.keyring: Update (now ascii-armored) by + 'osc service localrun download_files'. +- coreutils-tests-port-to-timezone-2017a.patch: Add patch to + workaround a FP test failure with newer timezone-2017a. + +------------------------------------------------------------------- +Fri Dec 2 17:17:40 UTC 2016 - mail@bernhard-voelker.de + +- Update to 8.26 + (for details see included NEWS file) +- coreutils.spec (%description): Add b2sum, a new utility. +(BuildRequires): Add timezone to enable new 'date-debug.sh' test. +- coreutils-i18n.patch: Sync I18N patch from Fedora, as the diff + for the old i18n implementation of expand/unexpand has become + unmaintainable: + git://pkgs.fedoraproject.org/coreutils.git +- Remove now-upstream patches: + * coreutils-df-hash-in-filter.patch + * coreutils-diagnose-fts-readdir-failure.patch + * coreutils-m5sum-sha-sum-fix-ignore-missing-with-00-checksums.patch + * coreutils-maint-fix-dependency-of-man-arch.1.patch +- Refresh/merge all other patches: + * coreutils-invalid-ids.patch + * coreutils-ocfs2_reflinks.patch + * coreutils-remove_hostname_documentation.patch + * coreutils-remove_kill_documentation.patch + * coreutils-skip-gnulib-test-tls.patch + * coreutils-sysinfo.patch + * coreutils-tests-shorten-extreme-factor-tests.patch + +------------------------------------------------------------------- +Tue Nov 1 09:41:12 UTC 2016 - mail@bernhard-voelker.de + +- coreutils-m5sum-sha-sum-fix-ignore-missing-with-00-checksums.patch: + Add upstream patch to fix "md5sum --check --ignore-missing" which + treated files with checksums starting with "00" as missing. + +------------------------------------------------------------------- +Thu Jul 28 17:02:53 UTC 2016 - mail@bernhard-voelker.de + +- coreutils-maint-fix-dependency-of-man-arch.1.patch: Add Upstream + patch to fix the build dependency between src/arch -> man/arch.1 + which lead to spurious build failures. +- coreutils-df-hash-in-filter.patch: Refresh with -p0. + +------------------------------------------------------------------- +Fri Jul 22 10:48:50 CEST 2016 - pth@suse.de + +- Add coreutils-df-hash-in-filter.patch that speeds up df. + +------------------------------------------------------------------- +Wed Jul 6 06:54:54 UTC 2016 - mail@bernhard-voelker.de + +- coreutils-diagnose-fts-readdir-failure.patch: Add upstream patch + to diagnose readdir() failures in fts-based utilities: rm, chmod, + du, etc. (boo#984910) + +------------------------------------------------------------------- +Fri Jan 29 22:08:45 UTC 2016 - mail@bernhard-voelker.de + +- Update to 8.25 + (for details see included NEWS file) +- coreutils.spec (%description): Add base32, a new utility. +- Remove now-upstream patch: + * coreutils-tests-avoid-FP-of-ls-stat-free-color.patch +- Refresh/merge all other patches: + * coreutils-build-timeout-as-pie.patch + * coreutils-disable_tests.patch + * coreutils-i18n.patch + * coreutils-invalid-ids.patch + * coreutils-misc.patch + * coreutils-ocfs2_reflinks.patch + * coreutils-remove_hostname_documentation.patch + * coreutils-remove_kill_documentation.patch + * coreutils-skip-gnulib-test-tls.patch + * coreutils-test_without_valgrind.patch + * coreutils-tests-shorten-extreme-factor-tests.patch + +------------------------------------------------------------------- +Sun Sep 20 15:22:45 UTC 2015 - mail@bernhard-voelker.de + +- coreutils-i18n.patch: Sync I18N patch from semi-official repository + (shared among distributions, maintained by Padraig Brady): + https://github.com/pixelb/coreutils/tree/i18n + This fixes the following issues in multi-byte locales: + * sort: fix large mem leak with --month-sort (boo#945361, rh#1259942): + https://github.com/pixelb/coreutils/commit/b429f5d8c7 + * sort: fix assertion with some inputs to --month-sort + https://github.com/pixelb/coreutils/commit/31e8211aca + +------------------------------------------------------------------- +Sun Aug 30 21:52:13 UTC 2015 - mail@bernhard-voelker.de + +- coreutils-tests-avoid-FP-of-ls-stat-free-color.patch: Add upstream +patch on top of v8.24 to avoid a FP test failure with glibc>=2.22. + +------------------------------------------------------------------- +Thu Jul 16 01:28:36 UTC 2015 - mail@bernhard-voelker.de + +- Sync I18N patch from semi-official repository (shared among + distributions, maintained by Padraig Brady): + https://github.com/pixelb/coreutils/tree/i18n + * coreutils-i18n.patch: Improve cut(1) performance in field-mode + in UTF8 locales. Squash in sort-keycompare-mb.patch. + * sort-keycompare-mb.patch: Remove. + +- coreutils-build-timeout-as-pie.patch: Refresh. + +------------------------------------------------------------------- +Thu Jul 9 15:12:10 CEST 2015 - pth@suse.de + +- Update to 8.24: + ** Bug fixes + + * dd supports more robust SIGINFO/SIGUSR1 handling for outputting statistics. + Previously those signals may have inadvertently terminated the process. + + * df --local no longer hangs with inaccessible remote mounts. + [bug introduced in coreutils-8.21] + + * du now silently ignores all directory cycles due to bind mounts. + Previously it would issue a warning and exit with a failure status. + [bug introduced in coreutils-8.1 and partially fixed in coreutils-8.23] + + * chroot again calls chroot(DIR) and chdir("/"), even if DIR is "/". + This handles separate bind mounted "/" trees, and environments + depending on the implicit chdir("/"). + [bugs introduced in coreutils-8.23] + + * cp no longer issues an incorrect warning about directory hardlinks when a + source directory is specified multiple times. Now, consistent with other + file types, a warning is issued for source directories with duplicate names, + or with -H the directory is copied again using the symlink name. + + * factor avoids writing partial lines, thus supporting parallel operation. + [the bug dates back to the initial implementation] + + * head, od, split, tac, tail, and wc no longer mishandle input from files in + /proc and /sys file systems that report somewhat-incorrect file sizes. + + * mkdir --parents -Z now correctly sets the context for the last component, + even if the parent directory exists and has a different default context. + [bug introduced with the -Z restorecon functionality in coreutils-8.22] + + * numfmt no longer outputs incorrect overflowed values seen with certain + large numbers, or with numbers with increased precision. + [bug introduced when numfmt was added in coreutils-8.21] + + * numfmt now handles leading zeros correctly, not counting them when + settings processing limits, and making them optional with floating point. + [bug introduced when numfmt was added in coreutils-8.21] + + * paste no longer truncates output for large input files. This would happen + for example with files larger than 4GiB on 32 bit systems with a '\n' + character at the 4GiB position. + [the bug dates back to the initial implementation] + + * rm indicates the correct number of arguments in its confirmation prompt, + on all platforms. [bug introduced in coreutils-8.22] + + * shuf -i with a single redundant operand, would crash instead of issuing + a diagnostic. [bug introduced in coreutils-8.22] + + * tail releases inotify resources when unused. Previously it could exhaust + resources with many files, or with -F if files were replaced many times. + [bug introduced in coreutils-7.5] + + * tail -f again follows changes to a file after it's renamed. + [bug introduced in coreutils-7.5] + + * tail --follow no longer misses changes to files if those files were + replaced before inotify watches were created. + [bug introduced in coreutils-7.5] + + * tail --follow consistently outputs all data for a truncated file. + [bug introduced in the beginning] + + * tail --follow=name correctly outputs headers for multiple files + when those files are being created or renamed. + [bug introduced in coreutils-7.5] + + ** New features + + * chroot accepts the new --skip-chdir option to not change the working directory + to "/" after changing into the chroot(2) jail, thus retaining the current wor- + king directory. The new option is only permitted if the new root directory is + the old "/", and therefore is useful with the --group and --userspec options. + + * dd accepts a new status=progress level to print data transfer statistics + on stderr approximately every second. + + * numfmt can now process multiple fields with field range specifications similar + to cut, and supports setting the output precision with the --format option. + + * split accepts a new --separator option to select a record separator character + other than the default newline character. + + * stty allows setting the "extproc" option where supported, which is + a useful setting with high latency links. + + * sync no longer ignores arguments, and syncs each specified file, or with the + --file-system option, the file systems associated with each specified file. + + * tee accepts a new --output-error option to control operation with pipes + and output errors in general. + + ** Changes in behavior + + * df no longer suppresses separate exports of the same remote device, as + these are generally explicitly mounted. The --total option does still + suppress duplicate remote file systems. + [suppression was introduced in coreutils-8.21] + + * mv no longer supports moving a file to a hardlink, instead issuing an error. + The implementation was susceptible to races in the presence of multiple mv + instances, which could result in both hardlinks being deleted. Also on case + insensitive file systems like HFS, mv would just remove a hardlinked 'file' + if called like `mv file File`. The feature was added in coreutils-5.0.1. + + * numfmt --from-unit and --to-unit options now interpret suffixes as SI units, + and IEC (power of 2) units are now specified by appending 'i'. + + * tee will exit early if there are no more writable outputs. + + * tee does not treat the file operand '-' as meaning standard output any longer, + for better conformance to POSIX. This feature was added in coreutils-5.3.0. + + * timeout --foreground no longer sends SIGCONT to the monitored process, + which was seen to cause intermittent issues with GDB for example. + + ** Improvements + + * cp,install,mv will convert smaller runs of NULs in the input to holes, + and cp --sparse=always avoids speculative preallocation on XFS for example. + + * cp will read sparse files more efficiently when the destination is a + non regular file. For example when copying a disk image to a device node. + + * mv will try a reflink before falling back to a standard copy, which is + more efficient when moving files across BTRFS subvolume boundaries. + + * stat and tail now know about IBRIX. stat -f --format=%T now reports the file + system type, and tail -f uses polling for files on IBRIX file systems. + + * wc -l processes short lines much more efficiently. + + * References from --help and the man pages of utilities have been corrected + in various cases, and more direct links to the corresponding online + documentation are provided. + +- Patches adapted because of changed sources: + coreutils-disable_tests.patch + coreutils-i18n.patch + coreutils-misc.patch + coreutils-ocfs2_reflinks.patch + coreutils-remove_hostname_documentation.patch + coreutils-remove_kill_documentation.patch + coreutils-skip-gnulib-test-tls.patch + coreutils-tests-shorten-extreme-factor-tests.patch + sort-keycompare-mb.patch + +- Patches removed because they're included in 8.24: + coreutils-chroot-perform-chdir-unless-skip-chdir.patch + coreutils-df-doc-df-a-includes-duplicate-file-systems.patch + coreutils-df-improve-mount-point-selection.patch + coreutils-df-show-all-remote-file-systems.patch + coreutils-df-total-suppress-separate-remotes.patch + coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch + coreutils-fix_false_du_failure_on_newer_xfs.patch + coreutils-fix-man-deps.patch + coreutils-tests-aarch64-env.patch + coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch + coreutils-tests-rm-ext3-perf-increase-timeout.patch + +------------------------------------------------------------------- +Wed Jun 3 10:56:39 UTC 2015 - mail@bernhard-voelker.de + +- coreutils-doc-adjust-reference-to-info-nodes-in-man-pages.patch: + add upstream patch: + doc: adjust reference to info nodes in man pages (boo#933396) +- coreutils-i18n.patch: Use a later version of the previous patch + to fix the sort I18N issue (boo#928749, CVE-2015-4041) to also + avoid CVE-2015-4042. + https://github.com/pixelb/coreutils/commit/bea5e36cc876 + +------------------------------------------------------------------- +Tue May 12 09:32:53 UTC 2015 - mail@bernhard-voelker.de + +- Download keyring file from Savannah; prefer HTTPS over FTP + for remote sources. + +------------------------------------------------------------------- +Tue May 12 08:56:13 UTC 2015 - mail@bernhard-voelker.de + +- Fix memory handling error with case insensitive sort using UTF-8 + (boo#928749): coreutils-i18n.patch + src/sort.c (keycompare_mb): Ensure the buffer is big enough + to handle anything output from wctomb(). Theoretically any + input char could be converted to multiple output chars, + and so we need to multiply the storage by MB_CUR_MAX. + +------------------------------------------------------------------- +Tue Apr 7 18:18:31 UTC 2015 - crrodriguez@opensuse.org + +- If coreutils changes, for consistency, we must regenerate + the initrd. + +------------------------------------------------------------------- +Thu Apr 2 15:26:50 UTC 2015 - mpluskal@suse.com + +- Add gpg signature + +------------------------------------------------------------------- +Thu Mar 26 13:06:58 UTC 2015 - rguenther@suse.com + +- For openSUSE > 13.2 drop coreutils-build-timeout-as-pie.patch and + instead add a BuildRequire for gcc-PIE. + +------------------------------------------------------------------- +Thu Feb 5 06:58:52 UTC 2015 - mail@bernhard-voelker.de + +- coreutils-tests-aarch64-env.patch: Add patch to avoid false + positive failures of the coreutils-testsuite on OBS/aarch64: + work around execve() reversing the order of "env" output. + +------------------------------------------------------------------- +Mon Jan 19 23:06:22 UTC 2015 - mail@bernhard-voelker.de + +- Add upstream patches for df(1) from upstream, thus aligning with SLES12: + * df: improve mount point selection with inaccurate mount list: + - coreutils-df-improve-mount-point-selection.patch + * doc: mention that df -a includes duplicate file systems (deb#737399) + - coreutils-df-doc-df-a-includes-duplicate-file-systems.patch + * df: ensure -a shows all remote file system entries (deb#737399) + - coreutils-df-show-all-remote-file-systems.patch + * df: only suppress remote mounts of separate exports with --total + (deb#737399, rh#920806, boo#866010, boo#901905) + - coreutils-df-total-suppress-separate-remotes.patch +- Refresh patches: + * coreutils-chroot-perform-chdir-unless-skip-chdir.patch + * coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch + +------------------------------------------------------------------- +Sat Nov 1 00:20:55 UTC 2014 - mail@bernhard-voelker.de + +Avoid spurious false positive failures of the testsuite on OBS due +to high load. + +- coreutils-tests-rm-ext3-perf-increase-timeout.patch: + Add patch to increase timeout. + +- coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch: + Add upstream patch. + +------------------------------------------------------------------- +Sat Sep 27 17:46:01 UTC 2014 - schwab@linux-m68k.org + +- sort-keycompare-mb.patch: make sure to NUL-terminate the sort keys. + Fixes http://bugs.gnu.org/18540 + +------------------------------------------------------------------- +Thu Sep 18 18:04:37 CEST 2014 - pth@suse.de + +- Add coreutils-fix_false_du_failure_on_newer_xfs.patch that fixes a false + negative in the testsuite. +- Add coreutils-disable_tests.patch to not run a tests that fail inside the OBS. +- Add coreutils-test_without_valgrind.patch to not use valgrind in shuf-reservoir. + +------------------------------------------------------------------- +Fri Aug 1 15:54:41 UTC 2014 - mail@bernhard-voelker.de + +- Add patches for upstream glitches: + - coreutils-fix-man-deps.patch + - coreutils-chroot-perform-chdir-unless-skip-chdir.patch + +- Refresh patches: + - coreutils-build-timeout-as-pie.patch + - coreutils-getaddrinfo.patch + - coreutils-i18n.patch + - coreutils-misc.patch + - coreutils-ocfs2_reflinks.patch + - coreutils-remove_hostname_documentation.patch + - coreutils-remove_kill_documentation.patch + - coreutils-skip-gnulib-test-tls.patch + - coreutils-tests-shorten-extreme-factor-tests.patch + +- Remove now-upstream patches: + - coreutils-copy-fix-selinux-existing-dirs.patch + - coreutils-gnulib-tests-ppc64le.patch + - coreutils-tests-avoid-FP-cp-cpuinfo.patch + - coreutils-test-avoid-FP-when-no-ACL-support.patch + - coreutils-ln-avoid-segfault-for-empty-target.patch + - coreutils-date-avoid-crash-in-TZ-parsing.patch + - coreutils-shuf-repeat-avoid-crash-when-input-empty.patch + - coreutils-improve_df_--human_and_--si,_help_and_man_page.patch + - coreutils-avoid_sizeof_charPP__static_analysis_warning.patch + - coreutils-also_deduplicate_virtual_file_systems.patch + - coreutils-fix_handling_of_symlinks_in_mount_list.patch + - coreutils-ignore_non_file_system_entries_in_proc_mounts.patch + - coreutils-avoid_clang_-Wtautological-constant-out-of-range-compare_warning.patch + - coreutils-use_the_last_device_name_provided_by_the_system.patch + - coreutils-avoid_compiler_warnings_with_some_assert_implementations.patch + - coreutils-use_all_of_the_last_device_details_provided.patch + - coreutils-output_placeholder_values_for_inaccessible_mount_points.patch + - coreutils-look_for_accessible_mount_points_for_specified_devices.patch + - coreutils-report_correct_device_in_presence_of_eclipsed_mounts.patch + - coreutils-avoid_an_inconsequential_mem_leak.patch + +- Update to 8.23 (2014-07-18) [stable] + + ** Bug fixes + + chmod -Rc no longer issues erroneous warnings for files with special bits set. + [bug introduced in coreutils-6.0] + + cp -a, mv, and install --preserve-context, once again set the correct SELinux + context for existing directories in the destination. Previously they set + the context of an existing directory to that of its last copied descendent. + [bug introduced in coreutils-8.22] + + cp -a, mv, and install --preserve-context, no longer seg fault when running + with SELinux enabled, when copying from file systems that return an error + when reading the SELinux context for a file. + [bug introduced in coreutils-8.22] + + cp -a and mv now preserve xattrs of symlinks copied across file systems. + [bug introduced with extended attribute preservation feature in coreutils-7.1] + + date could crash or go into an infinite loop when parsing a malformed TZ="". + [bug introduced with the --date='TZ="" ..' parsing feature in coreutils-5.3.0] + + dd's ASCII and EBCDIC conversions were incompatible with common practice and + with POSIX, and have been corrected as follows. First, conv=ascii now + implies conv=unblock, and conv=ebcdic and conv=ibm now imply conv=block. + Second, the translation tables for dd conv=ascii and conv=ebcdic have been + corrected as shown in the following table, where A is the ASCII value, W is + the old, wrong EBCDIC value, and E is the new, corrected EBCDIC value; all + values are in octal. + + A W E + 041 117 132 + 133 112 255 + 135 132 275 + 136 137 232 + 174 152 117 + 176 241 137 + 313 232 152 + 325 255 112 + 345 275 241 + + [These dd bugs were present in "the beginning".] + + df has more fixes related to the newer dynamic representation of file systems: + Duplicates are elided for virtual file systems like tmpfs. + Details for the correct device are output for points mounted multiple times. + Placeholder values are output for inaccessible file systems, rather than + than error messages or values for the wrong file system. + [These bugs were present in "the beginning".] + + df now outputs all appropriate entries in the presence of bind mounts. + On some systems, entries would have been incorrectly elided due to + them being considered "dummy" mounts. + [bug introduced in coreutils-8.22] + + du now silently ignores directory cycles introduced with bind mounts. + Previously it would issue a warning and exit with a failure status. + [bug introduced in coreutils-8.1] + + head --bytes=-N and --lines=-N now handles devices more + consistently, not ignoring data from virtual devices like /dev/zero, + or on BSD systems data from tty devices. + [bug introduced in coreutils-5.0.1] + + head --bytes=-N - no longer fails with a bogus diagnostic when stdin's + seek pointer is not at the beginning. + [bug introduced with the --bytes=-N feature in coreutils-5.0.1] + + head --lines=-0, when the input does not contain a trailing '\n', + now copies all input to stdout. Previously nothing was output in this case. + [bug introduced with the --lines=-N feature in coreutils-5.0.1] + + id, when invoked with no user name argument, now prints the correct group ID. + Previously, in the default output format, it would print the default group ID + in the password database, which may be neither real nor effective. For e.g., + when run set-GID, or when the database changes outside the current session. + [bug introduced in coreutils-8.1] + + ln -sf now replaces symbolic links whose targets can't exist. Previously + it would display an error, requiring --no-dereference to avoid the issue. + [bug introduced in coreutils-5.3.0] + + ln -sr '' F no longer segfaults. Now works as expected. + [bug introduced with the --relative feature in coreutils-8.16] + + numfmt now handles blanks correctly in all unibyte locales. Previously + in locales where character 0xA0 is a blank, numfmt would mishandle it. + [bug introduced when numfmt was added in coreutils-8.21] + + ptx --format long option parsing no longer falls through into the --help case. + [bug introduced in TEXTUTILS-1_22i] + + ptx now consistently trims whitespace when processing multiple files. + [This bug was present in "the beginning".] + + seq again generates correct output with start or end values = -0. + [bug introduced in coreutils-8.20.] + + shuf --repeat no longer dumps core if the input is empty. + [bug introduced with the --repeat feature in coreutils-8.22] + + sort when using multiple threads now avoids undefined behavior with mutex + destruction, which could cause deadlocks on some implementations. + [bug introduced in coreutils-8.6] + + tail -f now uses polling mode for VXFS to cater for its clustered mode. + [bug introduced with inotify support added in coreutils-7.5] + + ** New features + + od accepts a new option: --endian=TYPE to handle inputs with different byte + orders, or to provide consistent output on systems with disparate endianness. + + configure accepts the new option --enable-single-binary to build all the + selected programs in a single binary called "coreutils". The selected + programs can still be called directly using symlinks to "coreutils" or + shebangs with the option --coreutils-prog= passed to this program. The + install behavior is determined by the option --enable-single-binary=symlinks + or --enable-single-binary=shebangs (the default). With the symlinks option, + you can't make a second symlink to any program because that will change the + name of the called program, which is used by coreutils to determine the + desired program. The shebangs option doesn't suffer from this problem, but + the /proc/$pid/cmdline file might not be updated on all the platforms. The + functionality of each program is not affected but this single binary will + depend on all the required dynamic libraries even to run simple programs. + If you desire to build some tools outside the single binary file, you can + pass the option --enable-single-binary-exceptions=PROG_LIST with the comma + separated list of programs you want to build separately. This flag + considerably reduces the overall size of the installed binaries which makes + it suitable for embedded system. + + ** Changes in behavior + + chroot with an argument of "/" no longer implicitly changes the current + directory to "/", allowing changing only user credentials for a command. + + chroot --userspec will now unset supplemental groups associated with root, + and instead use the supplemental groups of the specified user. + + cut -d$'\n' again outputs lines identified in the --fields list, having + not done so in v8.21 and v8.22. Note using this non portable functionality + will result in the delayed output of lines. + + ls with none of LS_COLORS or COLORTERM environment variables set, + will now honor an empty or unknown TERM environment variable, + and not output colors even with --colors=always. + + ** Improvements + + chroot has better --userspec and --group look-ups, with numeric IDs never + causing name look-up errors. Also look-ups are first done outside the chroot, + in case the look-up within the chroot fails due to library conflicts etc. + + install now allows the combination of the -D and -t options. + + numfmt supports zero padding of numbers using the standard printf + syntax of a leading zero, for example --format="%010f". + Also throughput was improved by up to 800% by avoiding redundant processing. + + shred now supports multiple passes on GNU/Linux tape devices by rewinding + the tape before each pass, avoids redundant writes to empty files, + uses direct I/O for all passes where possible, and attempts to clear + inode storage used for small files on some file systems. + + split avoids unnecessary input buffering, immediately writing input to output + which is significant with --filter or when writing to fifos or stdout etc. + + stat and tail work better with HFS+, HFSX, LogFS and ConfigFS. stat -f + --format=%T now reports the file system type, and tail -f now uses inotify, + rather than the default of issuing a warning and reverting to polling. + +------------------------------------------------------------------- +Fri Jul 25 23:48:47 CEST 2014 - pth@suse.de + +- Incorporate 9 bugfixes, one documentation update and two maintenance + patches that won't harm (bnc#888215), See NEWS for specifics: + + coreutils-improve_df_--human_and_--si,_help_and_man_page.patch + coreutils-avoid_sizeof_charPP__static_analysis_warning.patch + coreutils-also_deduplicate_virtual_file_systems.patch + coreutils-fix_handling_of_symlinks_in_mount_list.patch + coreutils-ignore_non_file_system_entries_in_proc_mounts.patch + coreutils-avoid_clang_-Wtautological-constant-out-of-range-compare_warning.patch + coreutils-use_the_last_device_name_provided_by_the_system.patch + coreutils-avoid_compiler_warnings_with_some_assert_implementations.patch + coreutils-use_all_of_the_last_device_details_provided.patch + coreutils-output_placeholder_values_for_inaccessible_mount_points.patch + coreutils-look_for_accessible_mount_points_for_specified_devices.patch + coreutils-report_correct_device_in_presence_of_eclipsed_mounts.patch + coreutils-avoid_an_inconsequential_mem_leak.patch + +------------------------------------------------------------------- +Sun Mar 16 20:38:48 UTC 2014 - mail@bernhard-voelker.de + +- Add upstream patch (gnu#16855): + * coreutils-shuf-repeat-avoid-crash-when-input-empty.patch: Add + patch for shuf: with -r, don't dump core if the input is empty. + +------------------------------------------------------------------- +Sun Mar 16 19:28:34 UTC 2014 - mail@bernhard-voelker.de + +- Add upstream patch (gnu#16872): + * coreutils-date-avoid-crash-in-TZ-parsing.patch: Add patch for + date: fix crash or infinite loop when parsing a malformed TZ="". + +------------------------------------------------------------------- +Sun Mar 16 16:00:15 UTC 2014 - mail@bernhard-voelker.de + +- Add upstream patch (gnu#17010): + * coreutils-ln-avoid-segfault-for-empty-target.patch: Add patch + to avoid that ln(1) segfaults for an empty, relative target. + +------------------------------------------------------------------- +Mon Feb 24 14:59:35 CET 2014 - pth@suse.de + +- Add three patches from SLE12 that aren't upstream: + coreutils-misc.patch (fixes for tests) + coreutils-getaddrinfo.patch (fake success as there's no network + in the build system) + coreutils-ocfs2_reflinks.patch (support ocfs2 reflinks in cp) + +------------------------------------------------------------------- +Fri Jan 24 13:36:37 UTC 2014 - mail@bernhard-voelker.de + +- Testsuite: avoid a failure of tests/mkdir/p-acl.sh on armv7l. + * coreutils-test-avoid-FP-when-no-ACL-support.patch: Add upstream + patch to improve the check for a working ACL support. + +- Refresh patches with QUILT_REFRESH_ARGS="-p0 --no-timestamps" + for easier patch handling. + +------------------------------------------------------------------- +Thu Jan 9 01:55:08 UTC 2014 - mail@bernhard-voelker.de + +- Add upstream patch (coreutils-copy-fix-selinux-existing-dirs.patch): + cp -a: set the correct SELinux context on already existing + destination directories (rh#1045122). + +- Merge I18n fixes from Fedora (coreutils-i18n.patch): + * sort: fix sorting by non-first field (rh#1003544) + * cut: avoid using slower multi-byte code in non-UTF-8 locales + (rh#1021403, rh#499220). + +- Testsuite: skip some tests: + * coreutils-skip-some-sort-tests-on-ppc.patch: Add patch to + skip 2 valgrind'ed sort tests on ppc/ppc64. + * coreutils-skip-gnulib-test-tls.patch: Add patch to skip + the gnulib test 'test-tls' on i586, x86_64, ppc and ppc64. + * coreutils-tests-avoid-FP-cp-cpuinfo.patch: Add patch to skip a + test when cp fails for /proc/cpuinfo which happens on aarch64. + * coreutils-tests-shorten-extreme-factor-tests.patch: Add patch + to skip most of the extreme-expensive factor tests. + +------------------------------------------------------------------- +Sat Jan 4 23:05:46 UTC 2014 - mail@bernhard-voelker.de + +- Refresh patches to match the new version. + + * coreutils-build-timeout-as-pie.patch: Update line number. + * coreutils-gnulib-tests-ppc64le.patch: Likewise. + * coreutils-invalid-ids.patch: Likewise. + * coreutils-remove_hostname_documentation.patch: Likewise. + * coreutils-remove_kill_documentation.patch: Likewise. + * coreutils-sysinfo.patch: Likewise. + * coreutils-i18n.patch: Likewise. + +- Additional changes in coreutils-i18n.patch: + * Accommodate to upstream changes in cut.c and uniq.c. + * Fix some compiler warnings. + * Fix 145-mb test in tests/misc/uniq.pl. + * Skip sort's "2[01]a" test cases for now + to avoid a test failure on i586/x86_64. + +- Remove now-upstream and therefore obsolete patches. + + * coreutils-8.21.de.po.xz: Remove, upstream is latest. + * coreutils-gnulib-tests-fix-nap-race-obs.patch: + Remove, now upstream. + * coreutils-gnulib-tests-fix-nap-race.patch: Likewise. + * longlong-aarch64.patch: Likewise. + +- Update to 8.22 (2013-12-13) [stable] + + ** Bug fixes + + df now processes the mount list correctly in the presence of unstatable + mount points. Previously it may have failed to output some mount points. + [bug introduced in coreutils-8.21] + + df now processes symbolic links and relative paths to special files containing + a mounted file system correctly. Previously df displayed the statistics about + the file system the file is stored on rather than the one inside. + [This bug was present in "the beginning".] + + df now processes disk device nodes correctly in the presence of bind mounts. + Now df shows the base mounted file system rather than the last one mounted. + [This bug was present in "the beginning".] + + install now removes the target file if the strip program failed for any + reason. Before, that file was left behind, sometimes even with wrong + permissions. + [This bug was present in "the beginning".] + + ln --relative now updates existing symlinks correctly. Previously it based + the relative link on the dereferenced path of an existing link. + [This bug was introduced when --relative was added in coreutils-8.16.] + + ls --recursive will no longer exit with "serious" exit code (2), if there + is an error reading a directory not specified on the command line. + [Bug introduced in coreutils-5.3.0] + + mkdir, mkfifo, and mknod now work better when creating a file in a directory + with a default ACL whose umask disagrees with the process's umask, on a + system such as GNU/Linux where directory ACL umasks override process umasks. + [bug introduced in coreutils-6.0] + + mv will now replace empty directories in the destination with directories + from the source, when copying across file systems. + [This bug was present in "the beginning".] + + 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] + + rm -I now prompts for confirmation before removing a write protected file. + [Bug introduced in coreutils-6.8] + + shred once again uses direct I/O on systems requiring aligned buffers. + Also direct I/O failures for odd sized writes at end of file are now handled. + [The "last write" bug was introduced in coreutils-5.3.0 but masked + by the alignment bug introduced in coreutils-6.0] + + tail --retry -f now waits for the files specified to appear. Before, tail + would immediately exit when such a file is initially inaccessible. + [This bug was introduced when inotify support was added in coreutils-7.5] + + tail -F has improved handling of symlinks. Previously tail didn't respond + to the symlink target (re)appearing after being (re)created. + [This bug was introduced when inotify support was added in coreutils-7.5] + + ** New features + + cp, install, mkdir, mknod, mkfifo and mv now support "restorecon" + functionality through the -Z option, to set the SELinux context + appropriate for the new item location in the file system. + + csplit accepts a new option: --suppressed-matched, to elide the lines + used to identify the split points. + + df --output now accepts a 'file' field, to propagate a specified + command line argument through to the output. + + du accepts a new option: --inodes to show the number of inodes instead + of the blocks used. + + id accepts a new option: --zero (-z) to delimit the output entries by + a NUL instead of a white space character. + + id and ls with -Z report the SMACK security context where available. + mkdir, mkfifo and mknod with -Z set the SMACK context where available. + + id can now lookup by user ID, in addition to the existing name lookup. + + join accepts a new option: --zero-terminated (-z). As with the sort,uniq + option of the same name, this makes join consume and produce NUL-terminated + lines rather than newline-terminated lines. + + uniq accepts a new option: --group to print all items, while separating + unique groups with empty lines. + + shred accepts new parameters to the --remove option to give greater + control over that operation, which can greatly reduce sync overhead. + + shuf accepts a new option: --repeat (-r), which can repeat items in + the output. + + ** Changes in behavior + + cp --link now dereferences a symbolic link as source before creating the + hard link in the destination unless the -P,--no-deref option is specified. + Previously, it would create a hard link of the symbolic link, even when + the dereferencing options -L or -H were specified. + + cp, install, mkdir, mknod and mkfifo no longer accept an argument to the + short -Z option. The --context equivalent still takes an optional argument. + + dd status=none now suppresses all non fatal diagnostic messages, + not just the transfer counts. + + df no longer accepts the long-obsolescent --megabytes option. + + stdbuf now requires at least one buffering mode option to be specified, + as per the documented interface. + + ** Improvements + + base64 encoding throughput for bulk data is increased by about 60%. + + md5sum can use libcrypto hash routines where allowed to potentially + get better performance through using more system specific logic. + sha1sum for example has improved throughput by 40% on an i3-2310M. + This also affects sha1sum, sha224sum, sha256sum, sha384sum and sha512sum. + + stat and tail work better with EFIVARFS, EXOFS, F2FS, HOSTFS, SMACKFS, SNFS + and UBIFS. stat -f --format=%T now reports the file system type, and tail -f + now uses inotify for files on all those except SNFS, rather than the default + (for unknown file system types) of issuing a warning and reverting to polling. + + shuf outputs subsets of large inputs much more efficiently. + Reservoir sampling is used to limit memory usage based on the number of + outputs, rather than the number of inputs. + + shred increases the default write block size from 12KiB to 64KiB + to align with other utilities and reduce the system call overhead. + + split --line-bytes=SIZE, now only allocates memory as needed rather + than allocating SIZE bytes at program start. + + stty now supports configuring "stick" (mark/space) parity where available. + + ** Build-related + + factor now builds on aarch64 based systems [bug introduced in coreutils-8.20] + +------------------------------------------------------------------- +Thu Dec 19 23:37:39 UTC 2013 - uweigand@de.ibm.com + +- coreutils-gnulib-tests-ppc64le.patch: Fix imported gnulib long double + math tests for little-endian PowerPC. + +------------------------------------------------------------------- +Thu Dec 19 22:54:26 UTC 2013 - mail@bernhard-voelker.de + +- Fix issue with binary input in non-C locale (rh#1036289) + (coreutils-i18n.patch): Initialize memory for some edge cases + in the i18n patch for uniq and join. + +------------------------------------------------------------------- +Wed Dec 11 20:22:47 UTC 2013 - mail@bernhard-voelker.de + +- Avoid false sort test failure (coreutils-i18n.patch): + As for the C locale, skip the multi-byte test case + 'output-is-input-mb.p'. + +------------------------------------------------------------------- +Sat Dec 7 19:15:40 UTC 2013 - schwab@linux-m68k.org + +- Require valgrind only when it exists + +------------------------------------------------------------------- +Sun Dec 1 22:48:48 UTC 2013 - mail@bernhard-voelker.de + +- Update I18N patch from Fedora: + (coreutils-i18n.patch) + * sort: fix multibyte incompabilities (rh#821264) + * pr -e, with a mix of backspaces and TABs, could corrupt the + heap in multibyte locales (analyzed by J.Koncicky) + * path in the testsuite to cover i18n regressions + * Enable cut and sort-merge perl tests for multibyte as well +- Refresh longlong-aarch64.patch. + +------------------------------------------------------------------- +Wed Aug 7 08:10:22 UTC 2013 - mail@bernhard-voelker.de + +- Remove "BuildRequires: help2man" as it is included. + +------------------------------------------------------------------- +Tue Aug 6 14:02:42 CEST 2013 - pth@suse.de + +- Remove the the unnecessary povision of itself as rpmbuild takes + care of that. +- Remove all traces of coreutils-8.9-singlethreaded-sort.patch in + the spec file. + +------------------------------------------------------------------- +Tue Jul 23 13:22:21 UTC 2013 - mail@bernhard-voelker.de + +- Undo the previous change. + Remove configure options gl_cv_func_printf_directive_n and + gl_cv_func_printf_infinite_long_double again because of constant + factory build failures on x86_64 and i586. The argument for + adding them was that the fortify checks would be bypassed + by the gnulib "reimplementation of printf", but that is not + the case: instead, gnulib just adds some wrapping code to ensure + a consistent behaviour on all supported platforms. + +------------------------------------------------------------------- +Mon Jul 8 15:09:22 UTC 2013 - schwab@suse.de + +- Override broken configure checks +- coreutils-gl_printf_safe.patch: remove unused patch + +------------------------------------------------------------------- +Sun Jun 16 23:59:28 UTC 2013 - jengelh@inai.de + +- Explicitly list libattr-devel as BuildRequires +- More robust make install call + +------------------------------------------------------------------- +Fri Jun 7 14:36:26 UTC 2013 - schwab@suse.de + +- longlong-aarch64.patch: fix build on aarch64 + +------------------------------------------------------------------- +Fri Jun 7 01:50:04 UTC 2013 - mail@bernhard-voelker.de + +- Remove su(1) and kill(1) - both are provided by util-linux now. + * su.pamd, su.default, coreutils-su.patch: Remove patch and PAM + config files related to su(1). + * coreutils-remove_kill_documentation.patch: Add patch to remove + kill from the texinfo manual. + * coreutils.spec: Remove above, su-related patch and sources. + Remove Requires:pam and BuildRequires:pam-devel. + Remove Provides:/bin/{su,kill}. + Remove paragraph mentioning su(1) and kill(1) in %description. + Remove `moving su trickery` and other left-overs from %install, + %post and %files. + Remove %posttrans and %verifyscript sections (as these contained + su-related stuff). + Add code to %install to remove kill's program and man page. + +------------------------------------------------------------------- +Mon May 20 15:38:30 UTC 2013 - mail@bernhard-voelker.de + +- Try to fix nap() races in gnulib-tests. + (coreutils-gnulib-tests-fix-nap-race.patch: add upstream patch) + (coreutils-gnulib-tests-fix-nap-race-obs.patch: add openSUSE patch for OBS) + +------------------------------------------------------------------- +Wed May 15 11:26:29 UTC 2013 - mhrusecky@suse.com + +- Provides: /bin/{kill,su} + * for compatibility with programs requiring these (like lsb) until these will + be provided by util-linux + +------------------------------------------------------------------- +Thu Apr 4 23:25:17 UTC 2013 - mail@bernhard-voelker.de + +- Fix source url for coreutils-testsuite. + +------------------------------------------------------------------- +Thu Mar 21 11:55:13 UTC 2013 - mmeister@suse.com + +- Added url as source. + Please see http://en.opensuse.org/SourceUrls + +------------------------------------------------------------------- +Thu Mar 21 11:54:05 UTC 2013 - mail@bernhard-voelker.de + +- Fix multibyte issue in unexpand (rh#821262) + (coreutils-i18n.patch: patch by Roman Kollár ) + +- Fix cut to terminate mbdelim string + + Otherwise, cut might do an unbounded strdup of the delimiter string + in i18n mode (https://bugzilla.redhat.com/show_bug.cgi?id=911929) + (coreutils-i18n.patch, from Mark Wielaard ) + +- Add su(1) again + + Now, su(1) will be provided via a symlink trick + to the file installed with a ".core" suffix. + By this, we can upgrade to 8.21 without having to wait + for a util-linux version providing it. + + * coreutils-su.patch: Add cumulative su patch from previous Base:System + version 8.17, ported to 8.21 build structure. This supersedes the + following partial patches: + coreutils-8.6-compile-su-with-fpie.diff, + coreutils-8.6-honor-settings-in-etc-default-su-resp-etc-login.defs.diff, + coreutils-8.6-log-all-su-attempts.diff, + coreutils-8.6-make-sure-sbin-resp-usr-sbin-are-in-PATH.diff, + coreutils-8.6-pam-support-for-su.diff, + coreutils-8.6-set-sane-default-path.diff, + coreutils-8.6-update-man-page-for-pam.diff, + coreutils-bnc#697897-setsid.patch. + + * pam, pam-devel: Add as requirements, also during build. + * coreutils.spec (%description): Clarify that su is included although removed + upstreams. + (%install): Install su+kill files with suffix ".core". + (%post): Move setting permissions on su from %posttrans to %install. + (%posttrans): Create symlinks to files with ".core" suffix unless already + existing. + +- Install kill(1) with the same symlink trick. + +- Remove now-obsolete patches and files: + + * coreutils-8.17.de.po.xz: + * coreutils-8.17.tar.xz: + Remove sources + translation of previous version + + * coreutils-acl-nofollow.patch: + * coreutils-basename_documentation.patch: + * coreutils-cp-corrupt-fragmented-sparse.patch: + * coreutils-df-always-hide-rootfs.patch: + * coreutils-skip-du-slink-test.patch: + Fixed upstream. + + * coreutils-getaddrinfo.patch: + * coreutils-misc.patch: + * coreutils-no_silent-rule.patch: + Remove test and build related patches. + + * coreutils-ptr_int_casts.patch: + Remove because merged into coreutils-i18n.patch. + +- Add files: + + * coreutils-8.21.tar.xz: + Add tarball of the new upstream version + * coreutils-8.21.de.po.xz: + Add language file. + +- Update patches: + + * coreutils-i18n.patch + Merge some Fedora changes to keep the i18n patch like theirs. + Fix and cleanup sort's multibyte test with incorporated test data. + + * coreutils-remove_hostname_documentation.patch + +- Add patch to build 'timeout' as PIE (OBS requires it). + This patch actually was included in one of the old su patches. + + * new patch name: coreutils-build-timeout-as-pie.patch + +- Temporary disable some questionable patches (by commenting in the spec file): + + * coreutils-gl_printf_safe.patch + * coreutils-8.9-singlethreaded-sort.patch + +- Change build / spec file: + + * Bump version from 8.17 to 8.21. + * Fix macro invocation in "Provides" for stat. + * Remove ancient "Obsoletes" entries. + * Remove/add the above removed/added sources and patches. + * Temporarily comment the code for statically linking LIB_GMP + (as it does not work). + * Remove -Wall from CFLAGS as it is already included in OBS' default options. + * Remove the --without-included-regex option to use + coreutils' regex implementation. + * Remove custom gl_cv_func_printf_directive_n and gl_cv_func_isnanl_works. + * Touch "man/*.x" to force the rebuild of the man pages. + * Make sort's multi-byte test script executable in %check section. + * Hardcode package name for "%find_lang" and "%files lang -f" lines. + * In the %files section, add the COPYING and THANKS files. + Furthermore, fix the path to the LC_TIME files. + * Change package description to accomodate to added programs + (hostid, nproc, realpath, stdbuf, truncate) + and mention the hacky installation of programs to move (kill, su). + + +- Update to 8.21 (2013-02-14) [stable] + + ** New programs + + numfmt: reformat numbers + + ** New features + + df now accepts the --output[=FIELD_LIST] option to define the list of columns + to include in the output, or all available columns if the FIELD_LIST is + omitted. Note this enables df to output both block and inode fields together. + + du now accepts the --threshold=SIZE option to restrict the output to entries + with such a minimum SIZE (or a maximum SIZE if it is negative). + du recognizes -t SIZE as equivalent, for compatibility with FreeBSD. + + ** Bug fixes + + cp --no-preserve=mode now no longer exits non-zero. + [bug introduced in coreutils-8.20] + + cut with a range like "N-" no longer allocates N/8 bytes. That buffer + would never be used, and allocation failure could cause cut to fail. + [bug introduced in coreutils-8.10] + + cut no longer accepts the invalid range 0-, which made it print empty lines. + Instead, cut now fails and emits an appropriate diagnostic. + [This bug was present in "the beginning".] + + cut now handles overlapping to-EOL ranges properly. Before, it would + interpret "-b2-,3-" like "-b3-". Now it's treated like "-b2-". + [This bug was present in "the beginning".] + + cut no longer prints extraneous delimiters when a to-EOL range subsumes + another range. Before, "echo 123|cut --output-delim=: -b2-,3" would print + "2:3". Now it prints "23". [bug introduced in 5.3.0] + + cut -f no longer inspects input line N+1 before fully outputting line N, + which avoids delayed output for intermittent input. + [bug introduced in TEXTUTILS-1_8b] + + factor no longer loops infinitely on 32 bit powerpc or sparc systems. + [bug introduced in coreutils-8.20] + + install -m M SOURCE DEST no longer has a race condition where DEST's + permissions are temporarily derived from SOURCE instead of from M. + + pr -n no longer crashes when passed values >= 32. Also, line numbers are + consistently padded with spaces, rather than with zeros for certain widths. + [bug introduced in TEXTUTILS-1_22i] + + seq -w ensures that for numbers input in scientific notation, + the output numbers are properly aligned and of the correct width. + [This bug was present in "the beginning".] + + seq -w ensures correct alignment when the step value includes a precision + while the start value does not, and the number sequence narrows. + [This bug was present in "the beginning".] + + seq -s no longer prints an erroneous newline after the first number, and + outputs a newline after the last number rather than a trailing separator. + Also seq no longer ignores a specified step value when the end value is 1. + [bugs introduced in coreutils-8.20] + + timeout now ensures that blocking of ALRM signals is not inherited from + its parent, which would cause timeouts to be ignored. + [the bug dates back to the initial implementation] + + ** Changes in behavior + + df --total now prints '-' into the target column (mount point) of the + summary line, accommodating the --output option where the target field + can be in any column. If there is no source column, then df prints + 'total' in the target column. + + df now properly outputs file system information with bind mounts present on + the system by skipping duplicate entries (identified by the device number). + Consequently, df also elides the early-boot pseudo file system type "rootfs". + + nl no longer supports the --page-increment option, which has been + deprecated since coreutils-7.5. Use --line-increment instead. + + ** Improvements + + readlink now supports multiple arguments, and a complementary + -z, --zero option to delimit output items with the NUL character. + + stat and tail now know about CEPH. stat -f --format=%T now reports the file + system type, and tail -f uses polling for files on CEPH file systems. + + stty now supports configuring DTR/DSR hardware flow control where available. + + ** Build-related + + Perl is now more of a prerequisite. It has long been required in order + to run (not skip) a significant percentage of the tests. Now, it is + also required in order to generate proper man pages, via help2man. The + generated man/*.1 man pages are no longer distributed. Building without + perl, you would create stub man pages. Thus, while perl is not an + official prerequisite (build and "make check" will still succeed), any + resulting man pages would be inferior. In addition, this fixes a bug + in distributed (not from clone) Makefile.in that could cause parallel + build failure when building from modified sources, as is common practice + for a patched distribution package. + + factor now builds on x86_64 with x32 ABI, 32 bit MIPS, and all HPPA systems, + by avoiding incompatible asm. [bug introduced in coreutils-8.20] + + A root-only test predicate would always fail. Its job was to determine + whether our dummy user, $NON_ROOT_USERNAME, was able to run binaries from + the build directory. As a result, all dependent tests were always skipped. + Now, those tests may be run once again. [bug introduced in coreutils-8.20] + + +- Update to 8.20 (2012-10-23) [stable] + + ** New features + + dd now accepts 'status=none' to suppress all informational output. + + md5sum now accepts the --tag option to print BSD-style output with GNU + file name escaping. This also affects sha1sum, sha224sum, sha256sum, + sha384sum and sha512sum. + + ** Bug fixes + + cp could read from freed memory and could even make corrupt copies. + This could happen with a very fragmented and sparse input file, + on GNU/Linux file systems supporting fiemap extent scanning. + This bug also affects mv when it resorts to copying, and install. + [bug introduced in coreutils-8.11] + + cp --no-preserve=mode now no longer preserves the original file's + permissions but correctly sets mode specified by 0666 & ~umask + + du no longer emits a "disk-corrupted"-style diagnostic when it detects + a directory cycle that is due to a bind-mounted directory. Instead, + it detects this precise type of cycle, diagnoses it as such and + eventually exits nonzero. + + factor (when using gmp) would mistakenly declare some composite numbers + to be prime, e.g., 465658903, 2242724851, 6635692801 and many more. + The fix makes factor somewhat slower (~25%) for ranges of consecutive + numbers, and up to 8 times slower for some worst-case individual numbers. + [bug introduced in coreutils-7.0, with GNU MP support] + + ls now correctly colors dangling symlinks when listing their containing + directories, with orphaned symlink coloring disabled in LS_COLORS. + [bug introduced in coreutils-8.14] + + rm -i -d now prompts the user then removes an empty directory, rather + than ignoring the -d option and failing with an 'Is a directory' error. + [bug introduced in coreutils-8.19, with the addition of --dir (-d)] + + rm -r S/ (where S is a symlink-to-directory) no longer gives the invalid + "Too many levels of symbolic links" diagnostic. + [bug introduced in coreutils-8.6] + + seq now handles arbitrarily long non-negative whole numbers when the + increment is 1 and when no format-changing option is specified. + Before, this would infloop: + b=100000000000000000000; seq $b $b + [the bug dates back to the initial implementation] + + ** Changes in behavior + + nproc now diagnoses with an error, non option command line parameters. + + ** Improvements + + factor's core has been rewritten for speed and increased range. + It can now factor numbers up to 2^128, even without GMP support. + Its speed is from a few times better (for small numbers) to over + 10,000 times better (just below 2^64). The new code also runs a + deterministic primality test for each prime factor, not just a + probabilistic test. + + seq is now up to 70 times faster than it was in coreutils-8.19 and prior, + but only with non-negative whole numbers, an increment of 1, and no + format-changing options. + + stat and tail know about ZFS, VZFS and VMHGFS. stat -f --format=%T now + reports the file system type, and tail -f now uses inotify for files on + ZFS and VZFS file systems, rather than the default (for unknown file + system types) of issuing a warning and reverting to polling. tail -f + still uses polling for files on VMHGFS file systems. + + ** Build-related + + root-only tests now check for permissions of our dummy user, + $NON_ROOT_USERNAME, before trying to run binaries from the build directory. + Before, we would get hard-to-diagnose reports of failing root-only tests. + Now, those tests are skipped with a useful diagnostic when the root tests + are run without following the instructions in README. + + We now build most directories using non-recursive make rules. I.e., + rather than running make in man/, lib/, src/, tests/, instead, the top + level Makefile.am includes a $dir/local.mk that describes how to build + the targets in the corresponding directory. Two directories remain + unconverted: po/, gnulib-tests/. One nice side-effect is that the more + accurate dependencies have eliminated a nagging occasional failure that + was seen when running parallel "make syntax-check". + + +- Update to 8.19 (2012-08-20) [stable] + + ** Bug fixes + + df now fails when the list of mounted file systems (/etc/mtab) cannot + be read, yet the file system type information is needed to process + certain options like -a, -l, -t and -x. + [This bug was present in "the beginning".] + + sort -u could fail to output one or more result lines. + For example, this command would fail to print "1": + (yes 7 | head -11; echo 1) | sort --p=1 -S32b -u + [bug introduced in coreutils-8.6] + + sort -u could read freed memory. + For example, this evokes a read from freed memory: + perl -le 'print "a\n"."0"x900'|valgrind sort --p=1 -S32b -u>/dev/null + [bug introduced in coreutils-8.6] + + ** New features + + rm now accepts the --dir (-d) option which makes it remove empty directories. + Since removing empty directories is relatively safe, this option can be + used as a part of the alias rm='rm --dir'. This improves compatibility + with Mac OS X and BSD systems which also honor the -d option. + + +- Update to 8.18 (2012-08-12) [stable] + + ** Bug fixes + + cksum now prints checksums atomically so that concurrent + processes will not intersperse their output. + [the bug dates back to the initial implementation] + + date -d "$(printf '\xb0')" would print 00:00:00 with today's date + rather than diagnosing the invalid input. Now it reports this: + date: invalid date '\260' + [This bug was present in "the beginning".] + + df no longer outputs control characters present in the mount point name. + Such characters are replaced with '?', so for example, scripts consuming + lines output by df, can work reliably. + [This bug was present in "the beginning".] + + df --total now exits with an appropriate diagnostic and error code, when + file system --type options do not lead to a processed file system. + [This bug dates back to when --total was added in coreutils-7.0] + + head --lines=-N (-n-N) now resets the read pointer of a seekable input file. + This means that "head -n-3" no longer consumes all of its input, and lines + not output by head may be processed by other programs. For example, this + command now prints the final line, 2, while before it would print nothing: + seq 2 > k; (head -n-1 > /dev/null; cat) < k + [This bug was present in "the beginning".] + + ls --color would mis-color relative-named symlinks in / + [bug introduced in coreutils-8.17] + + split now ensures it doesn't overwrite the input file with generated output. + [the bug dates back to the initial implementation] + + stat and df now report the correct file system usage, + in all situations on GNU/Linux, by correctly determining the block size. + [df bug since coreutils-5.0.91, stat bug since the initial implementation] + + tail -f no longer tries to use inotify on AUFS or PanFS file systems + [you might say this was introduced in coreutils-7.5, along with inotify + support, but even now, its magic number isn't in the usual place.] + + ** New features + + stat -f recognizes the new remote file system types: aufs, panfs. + + ** Changes in behavior + + su: this program has been removed. We stopped installing "su" by + default with the release of coreutils-6.9.90 on 2007-12-01. Now, + that the util-linux package has the union of the Suse and Fedora + patches as well as enough support to build on the Hurd, we no longer + have any reason to include it here. + + ** Improvements + + sort avoids redundant processing in the presence of inaccessible inputs, + or unwritable output. Sort now diagnoses certain errors at start-up, + rather than after potentially expensive processing. + + sort now allocates no more than 75% of physical memory by default, + to better share system resources, and thus operate more efficiently. + [The default max memory usage changed from 50% to 100% in coreutils-8.16] + +------------------------------------------------------------------- +Sun Jan 27 08:16:16 UTC 2013 - coolo@suse.com + +- do not require texinfo for building, texlive is a bit too heavy + +------------------------------------------------------------------- +Sun Jan 20 13:18:28 UTC 2013 - mail@bernhard-voelker.de + +- Avoid segmentation fault in "join -i" with long line input + (bnc#798541, VUL-1, CVE-2013-0223) + + * src/join.c: Instead of usig unreliable alloca() stack allocation, + use heap allocation via xmalloc()+free(). + (coreutils-i18n.patch, from Philipp Thomas ) + +- Avoid segmentation fault in "sort -d" and "sort -M" with long line input + (bnc#798538, VUL-1, CVE-2013-0221) + + * src/sort.c: Instead of usig unreliable alloca() stack allocation, + use heap allocation via xmalloc()+free(). + (coreutils-i18n.patch, from Philipp Thomas ) + +- Avoid segmentation fault in "uniq" with long line input + (bnc#796243, VUL-1, CVE-2013-0222) + + * src/cut.c: Instead of usig unreliable alloca() stack allocation, + use heap allocation via xmalloc()+free(). + (coreutils-i18n.patch) + +- Fix test-suite errors (bnc#798261). + + * tests/cp/fiemap-FMR: Fix path to src directory and declare + require_valgrind_ function. + (coreutils-cp-corrupt-fragmented-sparse.patch) + * tests/misc/cut: + Fix src/cut.c to properly pass output-delimiter tests. + Synchronize cut.c related part of the i18n patch with Fedora's. + Merge coreutils-i18n-infloop.patch into coreutils-i18n.patch. + Merge coreutils-i18n-uninit.patch into coreutils-i18n.patch. + In tests/misc/cut, do not replace the non-i18n error messages. + (coreutils-i18n.patch) + * tests/rm/ext3-perf: + This test failed due to heavy parallel CPU and/or disk load because it + is based on timeouts. Do not run the test-suite with 'make -jN. + (coreutils.spec, coreutils-testsuite.spec) + * tests/du/slink: + This test fails on OBS infrastructure and will be removed upstreams + in coreutils-8.21 anyway. Skip the test until we upgrade. + Upstream discussion: + http://lists.gnu.org/archive/html/coreutils/2013-01/msg00053.html + (coreutils-skip-du-slink-test.patch) + * Further spec changes: + Run more tests: also run "very expensive" tests; add acl, python-pyinotify, + strace and valgrind to the build requirements. + Remove patch5 and patch6 as they are now merged into coreutils-i18n.patch + (see above). + (coreutils.spec, coreutils-testsuite.spec) + +- Maintenance changes: + (coreutils.spec, coreutils-testsuite.spec) + + * Add perl and texinfo to the build requirements as they are needed to + re-generate the man pages and the texinfo documentation. + * Remove already-active "-Wall" compiler option from CFLAGS variable. + * Install the compressed test-suite.log into the documentation directory + of the coreutils-testsuite package (section %check and %files). + * Properly guard the spec sections for the coreutils and the + coreutils-testsuite package. + * Update patches to reflect new line numbers. + +------------------------------------------------------------------- +Thu Jan 10 21:18:52 CET 2013 - phisama@suse.de + +- Hardcode the name passed to find_lang so that it works for + coreutils-testsuite too. + +------------------------------------------------------------------- +Thu Jan 10 11:58:17 CET 2013 - pth@suse.de + +- Don't call autoreconf on distributions older then 12.0 + because their autoconf is too old, so also patch Makefile.in + in addition to Makefile.am where needed. + +------------------------------------------------------------------- +Tue Dec 4 08:16:35 UTC 2012 - mail@bernhard-voelker.de + +- Update default posix version to 200112 (bnc#783352). +- Add coreutils-df-always-hide-rootfs.patch: + Hide rootfs in df (df not using yet /proc/self/mountinfo). + +------------------------------------------------------------------- +Mon Nov 19 13:04:44 UTC 2012 - idonmez@suse.com + +- Statically link to gmp otherwise expr depends on gmp and gmp + configure script depends on expr which creates a build cycle. + +------------------------------------------------------------------- +Thu Nov 8 13:12:25 CET 2012 - pth@suse.de + +- Add the missing parts in coreutil.spec so that the testsuite is + only run when coreutils-testsuite is built. Also add additional + BuildRequires for the testsuite. + +------------------------------------------------------------------- +Tue Nov 6 13:23:45 CET 2012 - pth@suse.de + +- Add script pre_checkin.sh that creates spec and changes for + coreutils-testsuite from their coreutils counterparts. + +------------------------------------------------------------------- +Sun Oct 28 20:31:28 UTC 2012 - mail@bernhard-voelker.de + +- Add upstream patch: + + * cp could read from freed memory and could even make corrupt copies. + This could happen with a very fragmented and sparse input file, + on GNU/Linux file systems supporting fiemap extent scanning. + This bug also affects mv when it resorts to copying, and install. + [bug introduced in coreutils-8.11] (bnc#788459 gnu#12656) + +------------------------------------------------------------------- +Fri Sep 21 11:55:12 UTC 2012 - froh@suse.com + +- fix coreutils-8.9-singlethreaded-sort.patch to + respect OMP_NUM_THREADS again. + +------------------------------------------------------------------- +Tue Jun 19 12:37:47 CEST 2012 - pth@suse.de + +- Update to 8.17: + ** Bug fixes + + * stat no longer reports a negative file size as a huge positive + number. [bug present since 'stat' was introduced in + fileutils-4.1.9] + + ** New features + + * split and truncate now allow any seekable files in situations + where the file size is needed, instead of insisting on regular + files. + + * fmt now accepts the --goal=WIDTH (-g) option. + + * stat -f recognizes new file system types: bdevfs, inodefs, qnx6 + + ** Changes in behavior + + * cp,mv,install,cat,split: now read and write a minimum of 64KiB at + a time. This was previously 32KiB and increasing to 64KiB was + seen to increase throughput by about 10% when reading cached + files on 64 bit GNU/Linux. + + * cp --attributes-only no longer truncates any existing destination + file, allowing for more general copying of attributes from one + file to another. +- Bring german message catalog up-to-date + +------------------------------------------------------------------- +Tue May 15 22:34:03 UTC 2012 - schwab@linux-m68k.org + +- Build factor with gmp support + +------------------------------------------------------------------- +Mon May 7 14:22:29 CEST 2012 - pth@suse.de + +- Two new upstream patches: + + * id and groups, when invoked with no user name argument, would + print the default group ID listed in the password database, and + sometimes that ID would be neither real nor effective. For + example, when run set-GID, or in a session for which the default + group has just been changed, the new group ID would be listed, + even though it is not yet effective. + + * 'cp S D' is no longer subject to a race: if an existing D were + removed between the initial stat and subsequent + open-without-O_CREAT, cp would fail with a confusing diagnostic + saying that the destination, D, was not found. Now, in this + unusual case, it retries the open (but with O_CREAT), and hence + usually succeeds. With NFS attribute caching, the condition was + particularly easy to trigger, since there, the removal of D could + precede the initial stat. [This bug was present in "the + beginning".] (bnc#760926). + +------------------------------------------------------------------- +Fri Apr 27 12:38:23 CEST 2012 - pth@suse.de + +- Make stdbuf binary find libstdbuf.so by looking in the right + path (bnc#741241). + +------------------------------------------------------------------- +Mon Apr 16 13:23:56 CEST 2012 - pth@suse.de + +- Update to 8.16: + + - Improvements: + * As a GNU extension, 'chmod', 'mkdir', and 'install' now accept + operators '-', '+', '=' followed by octal modes; + * Also, ordinary numeric modes with five or more digits no longer + preserve setuid and setgid bits, so that 'chmod 00755 FOO' now + clears FOO's setuid and setgid bits. + * dd now accepts the count_bytes, skip_bytes iflags and the + seek_bytes oflag, to more easily allow processing portions of a + file. + * dd now accepts the conv=sparse flag to attempt to create sparse + output, by seeking rather than writing to the output file. + * ln now accepts the --relative option, to generate a relative + symbolic link to a target, irrespective of how the target is + specified. + * split now accepts an optional "from" argument to + --numeric-suffixes, which changes the start number from the + default of 0. + * split now accepts the --additional-suffix option, to append an + additional static suffix to output file names. + * basename now supports the -a and -s options, which allow + processing of more than one argument at a time. Also the + complementary -z option was added to delimit output items with + the NUL character. + * dirname now supports more than one argument. Also the complementary + z option was added to delimit output items with the NUL character. + + - Bug fixes + * du --one-file-system (-x) would ignore any non-directory + specified on the command line. For example, "touch f; du -x f" + would print nothing. [bug introduced in coreutils-8.15] + * mv now lets you move a symlink onto a same-inode destination + file that has two or more hard links. + * "mv A B" could succeed, yet A would remain. + * realpath no longer mishandles a root directory. + + - Improvements + * ls can be much more efficient, especially with large directories + on file systems for which getfilecon-, ACL-check- and XATTR- + check-induced syscalls fail with ENOTSUP or similar. + * 'realpath --relative-base=dir' in isolation now implies + '--relative-to=dir' instead of causing a usage failure. + * split now supports an unlimited number of split files as default + behavior. + + For a detaild list se NEWS in the documentation. + +- Add up-to-date german translation. + +------------------------------------------------------------------- +Mon Apr 16 12:00:34 CEST 2012 - pth@suse.de + +- Add two upstream patches that speed up ls (bnc#752943): + * Cache (l)getfilecon calls to avoid the vast majority of the failing + underlying getxattr syscalls. + * Avoids always-failing queries for whether a file has a nontrivial + ACL and for whether a file has certain "capabilities". + +------------------------------------------------------------------- +Fri Mar 9 17:30:19 CET 2012 - pth@suse.de + +- Update to 8.15: + ** New programs + + realpath: print resolved file names. + + ** Bug fixes + + du --one-file-system (-x) would ignore any non-directory specified on + the command line. For example, "touch f; du -x f" would print nothing. + [bug introduced in coreutils-8.14] + + du -x no longer counts root directories of other file systems. + [bug introduced in coreutils-5.1.0] + + ls --color many-entry-directory was uninterruptible for too long + [bug introduced in coreutils-5.2.1] + + ls's -k option no longer affects how ls -l outputs file sizes. + It now affects only the per-directory block counts written by -l, + and the sizes written by -s. This is for compatibility with BSD + and with POSIX 2008. Because -k is no longer equivalent to + --block-size=1KiB, a new long option --kibibyte stands for -k. + [bug introduced in coreutils-4.5.4] + + ls -l would leak a little memory (security context string) for each + nonempty directory listed on the command line, when using SELinux. + [bug probably introduced in coreutils-6.10 with SELinux support] + + split -n 1/2 FILE no longer fails when operating on a growing file, or + (on some systems) when operating on a non-regular file like /dev/zero. + It would report "/dev/zero: No such file or directory" even though + the file obviously exists. Same for -n l/2. + [bug introduced in coreutils-8.8, with the addition of the -n option] + + stat -f now recognizes the FhGFS and PipeFS file system types. + + tac no longer fails to handle two or more non-seekable inputs + [bug introduced in coreutils-5.3.0] + + tail -f no longer tries to use inotify on GPFS or FhGFS file systems + [you might say this was introduced in coreutils-7.5, along with inotify + support, but the new magic numbers weren't in the usual places then.] + + ** Changes in behavior + + df avoids long UUID-including file system names in the default listing. + With recent enough kernel/tools, these long names would be used, pushing + second and subsequent columns far to the right. Now, when a long name + refers to a symlink, and no file systems are specified, df prints the + usually-short referent instead. + + tail -f now uses polling (not inotify) when any of its file arguments + resides on a file system of unknown type. In addition, for each such + argument, tail -f prints a warning with the FS type magic number and a + request to report it to the bug-reporting address. + +- Bring german message catalog up to date. +- Include upstream fix for du. +- Include upstream patch fixing basename documentation. + +------------------------------------------------------------------- +Mon Feb 6 17:18:37 UTC 2012 - rschweikert@suse.com + +- keep binaries in /usr (UserMerge project) + +------------------------------------------------------------------- +Mon Dec 19 15:09:12 UTC 2011 - lnussel@suse.de + +- Adjust license for coreutils-8.6-honor-settings-in-etc-default-su-resp-etc-login.defs.diff + [bnc#735081]. + +------------------------------------------------------------------- +Fri Dec 2 08:09:09 UTC 2011 - cfarrell@suse.com + +- license update: GPL-3.0+ + Consolidate to GPL-3.0+ and use SPDX format + (http://www.spdx.org/licenses). More or less compatible to Fedora package + (who don^t use full SPDX implementation) + +------------------------------------------------------------------- +Wed Nov 30 09:45:46 UTC 2011 - coolo@suse.com + +- add automake as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Mon Oct 17 15:25:21 CEST 2011 - pth@suse.de + +- Add upstream patch that fixes three bugs in tac: + - remove sole use of sprintf in favor of stpcpy + - don't misbehave with multiple non-seekable inputs + - don't leak a file descriptor for each non-seekable input + +------------------------------------------------------------------- +Fri Oct 14 16:51:48 CEST 2011 - pth@suse.de + +- Uniformly use german quotes not french ones in german messages. + +------------------------------------------------------------------- +Thu Oct 13 16:07:16 CEST 2011 - pth@suse.de + +- Update to 8.14. Changes since 8.12: + Bug fixes: + + - ls --dereference no longer outputs erroneous "argetm" strings for + dangling symlinks when an 'ln=target' entry is in $LS_COLORS. + [bug introduced in fileutils-4.0] + + - ls -lL symlink once again properly prints "+" when the referent has + an ACL. [bug introduced in coreutils-8.13] + + - sort -g no longer infloops for certain inputs containing NaNs [bug + introduced in coreutils-8.5] + + - chown and chgrp with the -v --from= options, now output the correct + owner. I.E. for skipped files, the original ownership is output, + not the new one. [bug introduced in sh-utils-2.0g] + + - cp -r could mistakenly change the permissions of an existing + destination directory. [bug introduced in coreutils-6.8] + + - cp -u -p would fail to preserve one hard link for each up-to-date + copy of a src-hard-linked name in the destination tree. I.e., if + s/a and s/b are hard-linked and dst/s/a is up to date, "cp -up s + dst" would copy s/b to dst/s/b rather than simply linking dst/s/b + to dst/s/a. [This bug appears to have been present in "the + beginning".] + + - fts-using tools (rm, du, chmod, chgrp, chown, chcon) no longer use + memory proportional to the number of entries in each directory they + process. Before, rm -rf 4-million-entry-directory would consume + about 1GiB of memory. Now, it uses less than 30MB, no matter how + many entries there are. [this bug was inherent in the use of fts: + thus, for rm the bug was introduced in coreutils-8.0. The prior + implementation of rm did not use as much memory. du, chmod, chgrp + and chown started using fts in 6.0. chcon was added in + coreutils-6.9.91 with fts support. ] + + - pr -T no longer ignores a specified LAST_PAGE to stop at. [bug + introduced in textutils-1.19q] + + - printf '%d' '"' no longer accesses out-of-bounds memory in the + diagnostic. [bug introduced in sh-utils-1.16] + + - split --number l/... no longer creates extraneous files in certain + cases. [bug introduced in coreutils-8.8] + + - timeout now sends signals to commands that create their own process + group. timeout is no longer confused when starting off with a + child process. [bugs introduced in coreutils-7.0] + + - unexpand -a now aligns correctly when there are spaces spanning a + tabstop, followed by a tab. In that case a space was dropped, + causing misalignment. We also now ensure that a space never + precedes a tab. [bug introduced in coreutils-5.3.0] + + New features: + + - date now accepts ISO 8601 date-time strings with "T" as the + separator. It has long parsed dates like "2004-02-29 16:21:42" + with a space between the date and time strings. Now it also parses + "2004-02-29T16:21:42" and fractional-second and time-zone-annotated + variants like "2004-02-29T16:21:42.333-07:00" + - md5sum accepts the new --strict option. With --check, it makes the + tool exit non-zero for any invalid input line, rather than just warning. + This also affects sha1sum, sha224sum, sha384sum and sha512sum. + + - split accepts a new --filter=CMD option. With it, split filters + output through CMD. CMD may use the $FILE environment variable, + which is set to the nominal output file name for each invocation of + CMD. For example, to split a file into 3 approximately equal + parts, which are then compressed: + + split -n3 --filter='xz > $FILE.xz' big + + Note the use of single quotes, not double quotes. That creates + files named xaa.xz, xab.xz and xac.xz. + + - timeout accepts a new --foreground option, to support commands not + started directly from a shell prompt, where the command is + interactive or needs to receive signals initiated from the + terminal. + + Improvements: + + - md5sum --check now supports the -r format from the corresponding + BSD tool. This also affects sha1sum, sha224sum, sha384sum and + sha512sum. + + - pwd now works also on systems without openat. On such systems, pwd + would fail when run from a directory whose absolute name contained + more than PATH_MAX / 3 components. The df, stat and readlink + programs are also affected due to their use of the canonicalize_* + functions. + + - join --check-order now prints "join: FILE:LINE_NUMBER: bad_line" + for an unsorted input, rather than e.g., "join: file 1 is not in + sorted order". + + - shuf outputs small subsets of large permutations much more + efficiently. For example `shuf -i1-$((2**32-1)) -n2` no longer + exhausts memory. + + - stat -f now recognizes the GPFS, MQUEUE and PSTOREFS file system + types. + + - timeout now supports sub-second timeouts. + + Changes in behavior: + + - chmod, chown and chgrp now output the original attributes in + messages, when -v or -c specified. + + - cp -au (where --preserve=links is implicit) may now replace newer + files in the destination, to mirror hard links from the source. + +------------------------------------------------------------------- +Sat Sep 17 23:29:33 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + +------------------------------------------------------------------- +Tue Aug 2 00:26:05 UTC 2011 - lchiquitto@suse.com + +- file-has-acl: use acl_extended_file_nofollow if available to + avoid triggering unwanted AutoFS mounts (bnc#701659). + +------------------------------------------------------------------- +Tue May 3 16:42:41 CEST 2011 - pth@suse.de + +- Remove services. + +------------------------------------------------------------------- +Tue May 3 14:28:01 CEST 2011 - ro@suse.de + +- delete coreutils-testsuite.spec + +------------------------------------------------------------------- +Thu Apr 28 15:35:59 CEST 2011 - pth@suse.de + +- Update to 8.12: + * Bug fixes + + tail's --follow=name option no longer implies --retry on systems + with inotify support. [bug introduced in coreutils-7.5] + + * Changes in behavior + + cp's extent-based (FIEMAP) copying code is more reliable in the face + of varying and undocumented file system semantics: + - it no longer treats unwritten extents specially + - a FIEMAP-based extent copy always uses the FIEMAP_FLAG_SYNC flag. + Before, it would incur the performance penalty of that sync only + for 2.6.38 and older kernels. We thought all problems would be + resolved for 2.6.39. + - it now attempts a FIEMAP copy only on a file that appears sparse. + Sparse files are relatively unusual, and the copying code incurs + the performance penalty of the now-mandatory sync only for them. +- Add complete german meesage catalogue. + +------------------------------------------------------------------- +Thu Apr 14 14:46:41 CEST 2011 - pth@suse.de + +- Update to 8.11: + + * Bug fixes + + cp -a --link would not create a hardlink to a symlink, instead + copying the symlink and then not preserving its timestamp. + [bug introduced in coreutils-8.0] + + cp now avoids FIEMAP issues with BTRFS before Linux 2.6.38, + which could result in corrupt copies of sparse files. + [bug introduced in coreutils-8.10] + + cut could segfault when invoked with a user-specified output + delimiter and an unbounded range like "-f1234567890-". + [bug introduced in coreutils-5.3.0] + + du would infloop when given --files0-from=DIR + [bug introduced in coreutils-7.1] + + sort no longer spawns 7 worker threads to sort 16 lines + [bug introduced in coreutils-8.6] + + touch built on Solaris 9 would segfault when run on Solaris 10 + [bug introduced in coreutils-8.8] + + wc would dereference a NULL pointer upon an early out-of-memory error + [bug introduced in coreutils-7.1] + + ** New features + + dd now accepts the 'nocache' flag to the iflag and oflag options, + which will discard any cache associated with the files, or + processed portion thereof. + + dd now warns that 'iflag=fullblock' should be used, + in various cases where partial reads can cause issues. + + ** Changes in behavior + + cp now avoids syncing files when possible, when doing a FIEMAP copy. + The sync is only needed on Linux kernels before 2.6.39. + [The sync was introduced in coreutils-8.10] + + cp now copies empty extents efficiently, when doing a FIEMAP copy. + It no longer reads the zero bytes from the input, and also can + efficiently create a hole in the output file when --sparse=always + is specified. + + df now aligns columns consistently, and no longer wraps entries + with longer device identifiers, over two lines. + + install now rejects its long-deprecated --preserve_context option. + Use --preserve-context instead. + + test now accepts "==" as a synonym for "=" + +------------------------------------------------------------------- +Tue Apr 5 15:13:42 CEST 2011 - pth@suse.de + +- Adapt coreutils-testsuite.spec to changes in patches. + +------------------------------------------------------------------- +Tue Apr 5 11:40:19 CEST 2011 - pth@suse.de + +- Remove unneeded split_suffix patch. + +------------------------------------------------------------------- +Mon Apr 4 16:13:04 CEST 2011 - pth@suse.de + +- Remove the last patch as it isn't needed. It was an old patch + that removed the documentation for both hostname and hostid. + I've modified that to only remove the hostname documentation. + +------------------------------------------------------------------- +Fri Apr 1 15:34:49 CEST 2011 - pth@suse.de + +- Readd documentation of hostname and hostid to texinfo + documentation. +- Remove obsolete and unused german translation. + +------------------------------------------------------------------- +Thu Feb 10 14:35:49 CET 2011 - pth@suse.de + +- Update to 8.10: + * Bug fixes + + - du would abort with a failed assertion when two conditions are + met: part of the hierarchy being traversed is moved to a higher + level in the directory tree, and there is at least one more + command line directory argument following the one containing + the moved sub-tree. [bug introduced in coreutils-5.1.0] + + - join --header now skips the ordering check for the first line + even if the other file is empty. [bug introduced in + coreutils-8.5] + + - rm -f no longer fails for EINVAL or EILSEQ on file systems that + reject file names invalid for that file system. + + - uniq -f NUM no longer tries to process fields after end of + line. [bug introduced in coreutils-7.0] + + * New features + + - cp now copies sparse files efficiently on file systems with + FIEMAP support (ext4, btrfs, xfs, ocfs2). Before, it had to + read 2^20 bytes when copying a 1MiB sparse file. Now, it + copies bytes only for the non-sparse sections of a file. + Similarly, to induce a hole in the output file, it had to + detect a long sequence of zero bytes. Now, it knows precisely + where each hole in an input file is, and can reproduce them + efficiently in the output file. mv also benefits when it + resorts to copying, e.g., between file systems. + + - join now supports -o 'auto' which will automatically infer the + output format from the first line in each file, to ensure the + same number of fields are output for each line. + + * Changes in behavior + + - join no longer reports disorder when one of the files is empty. + This allows one to use join as a field extractor like: + join -a1 -o 1.3,1.1 - /dev/null + +- Add upstream patch that fixes a segfault in cut. +- Add upstream patch to fix sparse fiemap tests. +- Fix i18n patch for join. + +------------------------------------------------------------------- +Fri Jan 14 14:13:28 CET 2011 - uli@suse.de + +- sort threading still broken, it deadlocks occasionally; set + default number of threads to 1 as a workaround + +------------------------------------------------------------------- +Wed Jan 5 14:25:16 CET 2011 - pth@suse.de + +- Update to 8.9: + Bug fixes + + split no longer creates files with a suffix length that + is dependent on the number of bytes or lines per file. + [bug introduced in coreutils-8.8] + +------------------------------------------------------------------- +Mon Jan 3 19:32:57 CET 2011 - pth@suse.de + +- Update to 8.8. Changes since 8.6: + + Bug fixes: + + cp -u no longer does unnecessary copying merely because the source + has finer-grained time stamps than the destination. + + od now prints floating-point numbers without losing information, and + it no longer omits spaces between floating-point columns in some cases. + + sort -u with at least two threads could attempt to read through a + corrupted pointer. [bug introduced in coreutils-8.6] + + sort with at least two threads and with blocked output would busy-loop + (spinlock) all threads, often using 100% of available CPU cycles to + do no work. I.e., "sort < big-file | less" could waste a lot of power. + [bug introduced in coreutils-8.6] + + sort with at least two threads no longer segfaults due to use of pointers + into the stack of an expired thread. [bug introduced in coreutils-8.6] + + sort --compress no longer mishandles subprocesses' exit statuses, + no longer hangs indefinitely due to a bug in waiting for subprocesses, + and no longer generates many more than NMERGE subprocesses. + + sort -m -o f f ... f no longer dumps core when file descriptors are limited. + + csplit no longer corrupts heap when writing more than 999 files, + nor does it leak memory for every chunk of input processed + [the bugs were present in the initial implementation] + + tail -F once again notices changes in a currently unavailable + remote directory [bug introduced in coreutils-7.5] + + Changes in behavior: + + sort will not create more than 8 threads by default due to diminishing + performance gains. Also the --parallel option is no longer restricted + to the number of available processors. + + cp --attributes-only now completely overrides --reflink. + Previously a reflink was needlessly attempted. + + stat's %X, %Y, and %Z directives once again print only the integer + part of seconds since the epoch. This reverts a change from + coreutils-8.6, that was deemed unnecessarily disruptive. + To obtain a nanosecond-precision time stamp for %X use %.X; + if you want (say) just 3 fractional digits, use %.3X. + Likewise for %Y and %Z. + + stat's new %W format directive would print floating point seconds. + However, with the above change to %X, %Y and %Z, we've made %W work + the same way as the others. + + New features: + + split accepts the --number option to generate a specific number of files. + +- Add a complete german translation. +- Add upstreams patch for suffix calculation in split. + +------------------------------------------------------------------- +Wed Dec 22 15:53:13 UTC 2010 - pth@novell.com + +- Use software services. +- Remove coreutils tarball. +- Don't use version specific patches as it breaks automatic + updates. + +------------------------------------------------------------------- +Wed Nov 17 08:33:10 UTC 2010 - coolo@novell.com + +- remove the prerequire on permissions - this will create a bad + cycle, coreutils is just too core + +------------------------------------------------------------------- +Tue Nov 16 10:50:04 UTC 2010 - lnussel@suse.de + +- split pam patch into separate independent files so the main + feature can be shared with other distros +- don't hard require coreutils-lang + +------------------------------------------------------------------- +Thu Nov 11 16:33:50 CET 2010 - pth@suse.de + +- Update to 8.6: + o bugfixes + * du no longer multiply counts a file that is a directory or whose + link count is 1. + * du -H and -L now consistently count pointed-to files instead of + symbolic links, and correctly diagnose dangling symlinks. + * du --ignore=D now ignores directory D even when that directory is + found to be part of a directory cycle. + * split now diagnoses read errors rather than silently exiting. + * tac would perform a double-free when given an input line longer + than 16KiB. + * tail -F once again notices changes in a currently unavailable + directory, and works around a Linux kernel bug where inotify runs + out of resources. + * tr now consistently handles case conversion character classes. + + o New features + * cp now accepts the --attributes-only option to not copy file data. + * du recognizes -d N as equivalent to --max-depth=N + * sort now accepts the --debug option, to highlight the part of the + line significant in the sort, and warns about questionable options. + * sort now supports -d, -f, -i, -R, and -V in any combination. + * stat now accepts the %m format directive to output the mount point + for a file. It also accepts the %w and %W format directives for + outputting the birth time of a file, if one is available. + + o Changes in behavior + * df now consistently prints the device name for a bind mounted file, + rather than its aliased target. + * du now uses less than half as much memory when operating on trees + with many hard-linked files. + * ls -l now uses the traditional three field time style rather than + the wider two field numeric ISO style in locales where a style has + not been specified. + * rm's -d now evokes an error; before, it was silently ignored. + * sort -g now uses long doubles for greater range and precision. + * sort -h no longer rejects numbers with leading or trailing ".", and + no longer accepts numbers with multiple ".". It now considers all + zeros to be equal. + * sort now uses the number of available processors to parallelize + the sorting operation. + * stat now provides translated output when no format is specified. + * stat no longer accepts the --context (-Z) option. + * stat no longer accepts the %C directive when the --file-system + option is in effect. + * stat now outputs the full sub-second resolution for the atime, + mtime, and ctime values since the Epoch, when using the %X, %Y, and + %Z directives of the --format option. + * touch's --file option is no longer recognized. Use --reference=F + (-r) instead. + * truncate now supports setting file sizes relative to a reference + file. Also errors are no longer suppressed for unsupported file + types, and relative sizes are restricted to supported file types. + + See NEWS in the package documentation for more verbose description. +- Add a man page for [ (a link to test1). +- Fix assignment of a char to a char * in join.c +- Add permissions verifying for su. +- Use RELRO for su. + +------------------------------------------------------------------- +Tue Aug 31 09:36:00 UTC 2010 - aj@suse.de + +- Recommend instead of require lang package since it's not mandatory. + +------------------------------------------------------------------- +Thu Jul 1 21:23:40 UTC 2010 - jengelh@medozas.de + +- Use %_smp_mflags + +------------------------------------------------------------------- +Tue Jun 29 20:18:04 CEST 2010 - pth@suse.de + +- Fix 'sort -V' not working because the i18n (mb handling) patch + wasn't updated to handle the new option (bnc#615073). + +------------------------------------------------------------------- +Mon Jun 28 12:52:15 CEST 2010 - pth@suse.de + +- Fix typo in spec file (% missing from version). + +------------------------------------------------------------------- +Fri Jun 18 11:57:47 CEST 2010 - kukuk@suse.de + +- Last part of fix for [bnc#533249]: Don't run account part of + PAM stack for su as root. Requires pam > 1.1.1. + +------------------------------------------------------------------- +Fri May 7 15:44:53 UTC 2010 - pth@novell.com + +- Update to 8.5: + Bug fixes + * cp and mv once again support preserving extended attributes. + * cp now preserves "capabilities" when also preserving file ownership.7 + * ls --color once again honors the 'NORMAL' dircolors directive. + [bug introduced in coreutils-6.11] + * sort -M now handles abbreviated months that are aligned using + blanks in the locale database. Also locales with 8 bit characters + are handled correctly, including multi byte locales with the caveat + that multi byte characters are matched case sensitively. + * sort again handles obsolescent key formats (+POS -POS) correctly. + Previously if -POS was specified, 1 field too many was used in the + sort. [bug introduced in coreutils-7.2] + + New features + + * join now accepts the --header option, to treat the first line of + each file as a header line to be joined and printed + unconditionally. + + * timeout now accepts the --kill-after option which sends a kill + signal to the monitored command if it's still running the specified + duration after the initial signal was sent. + + * who: the "+/-" --mesg (-T) indicator of whether a user/tty is + accepting messages could be incorrectly listed as "+", when in + fact, the user was not accepting messages (mesg no). Before, who + would examine only the permission bits, and not consider the group + of the TTY device file. Thus, if a login tty's group would change + somehow e.g., to "root", that would make it unwritable (via + write(1)) by normal users, in spite of whatever the permission bits + might imply. Now, when configured using the + --with-tty-group[=NAME] option, who also compares the group of the + TTY device with NAME (or "tty" if no group name is specified). + + Changes in behavior + + * ls --color no longer emits the final 3-byte color-resetting escape + sequence when it would be a no-op. + + * join -t '' no longer emits an error and instead operates on each + line as a whole (even if they contain NUL characters). + + For other changes since 7.1 see NEWS. +- Split-up coreutils-%%{version}.diff as far as possible. +- Prefix all patches with coreutils-. +- All patches have the .patch suffix. +- Use the i18n patch from Archlinux as it fixes at least one test + suite failure. + +------------------------------------------------------------------- +Tue May 4 17:13:37 UTC 2010 - pth@novell.com + +- Fix security bug in distcheck (bnc#564373). +- refresh patches to apply cleanly. + +------------------------------------------------------------------- +Tue Mar 2 09:54:10 UTC 2010 - lnussel@suse.de + +- enable hostid (bnc#584562) + +------------------------------------------------------------------- +Sat Dec 12 18:46:28 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + +------------------------------------------------------------------- +Mon Mar 23 15:34:29 CET 2009 - pth@suse.de + +- Add .ogv to dircolors (bnc#487561). + +------------------------------------------------------------------- +Sun Feb 22 10:49:52 CET 2009 - schwab@suse.de + +- Update to coreutils 7.1. + ** New features + Add extended attribute support available on certain filesystems like ext2 + and XFS. + cp: Tries to copy xattrs when --preserve=xattr or --preserve=all specified + mv: Always tries to copy xattrs + install: Never copies xattrs + cp and mv accept a new option, --no-clobber (-n): silently refrain + from overwriting any existing destination file + dd accepts iflag=cio and oflag=cio to open the file in CIO (concurrent I/O) + mode where this feature is available. + install accepts a new option, --compare (-C): compare each pair of source + and destination files, and if the destination has identical content and + any specified owner, group, permissions, and possibly SELinux context, then + do not modify the destination at all. + ls --color now highlights hard linked files, too + stat -f recognizes the Lustre file system type + ** Bug fixes + chgrp, chmod, chown --silent (--quiet, -f) no longer print some diagnostics + [bug introduced in coreutils-5.1] + cp uses much less memory in some situations + cp -a now correctly tries to preserve SELinux context (announced in 6.9.90), + doesn't inform about failure, unlike with --preserve=all + du --files0-from=FILE no longer reads all of FILE into RAM before + processing the first file name + seq 9223372036854775807 9223372036854775808 now prints only two numbers + on systems with extended long double support and good library support. + Even with this patch, on some systems, it still produces invalid output, + from 3 to at least 1026 lines long. [bug introduced in coreutils-6.11] + seq -w now accounts for a decimal point added to the last number + to correctly print all numbers to the same width. + wc --files0-from=FILE no longer reads all of FILE into RAM, before + processing the first file name, unless the list of names is known + to be small enough. + ** Changes in behavior + cp and mv: the --reply={yes,no,query} option has been removed. + Using it has elicited a warning for the last three years. + dd: user specified offsets that are too big are handled better. + Previously, erroneous parameters to skip and seek could result + in redundant reading of the file with no warnings or errors. + du: -H (initially equivalent to --si) is now equivalent to + --dereference-args, and thus works as POSIX requires + shred: now does 3 overwrite passes by default rather than 25. + ls -l now marks SELinux-only files with the less obtrusive '.', + rather than '+'. A file with any other combination of MAC and ACL + is still marked with a '+'. + +------------------------------------------------------------------- +Wed Nov 19 12:42:10 CET 2008 - werner@suse.de + +- Enable stat(1) to detect (k)AFS and CIFS network file systems + +------------------------------------------------------------------- +Tue Nov 18 16:48:05 CET 2008 - schwab@suse.de + +- Move stat to /bin. + +------------------------------------------------------------------- +Tue Oct 21 11:31:35 CEST 2008 - schwab@suse.de + +- Fix pam cleanup. + +------------------------------------------------------------------- +Thu Sep 18 16:38:01 CEST 2008 - schwab@suse.de + +- Move readlink and md5sum to /bin. + +------------------------------------------------------------------- +Wed Aug 20 15:40:47 CEST 2008 - schwab@suse.de + +- Add libselinux-devel to BuildRequires. + +------------------------------------------------------------------- +Tue Jun 24 15:57:01 CEST 2008 - schwab@suse.de + +- Fix sort field limit in multibyte case. + +------------------------------------------------------------------- +Wed Jun 4 14:10:05 CEST 2008 - schwab@suse.de + +- Update to coreutils 6.12. + ** Bug fixes + chcon, runcon: --help output now includes the bug-reporting address + cp -p copies permissions more portably. For example, on MacOS X 10.5, + "cp -p some-fifo some-file" no longer fails while trying to copy the + permissions from the some-fifo argument. + id with no options now prints the SELinux context only when invoked + with no USERNAME argument. + id and groups once again print the AFS-specific nameless group-ID (PAG). + Printing of such large-numbered, kernel-only (not in /etc/group) group-IDs + was suppressed in 6.11 due to ignorance that they are useful. + uniq: avoid subtle field-skipping malfunction due to isblank misuse. + In some locales on some systems, isblank(240) (aka  ) is nonzero. + On such systems, uniq --skip-fields=N would fail to skip the proper + number of fields for some inputs. + tac: avoid segfault with --regex (-r) and multiple files, e.g., + "echo > x; tac -r x x". [bug present at least in textutils-1.8b, from 1992] + ** Changes in behavior + install once again sets SELinux context, when possible + [it was deliberately disabled in 6.9.90] + +------------------------------------------------------------------- +Sun Apr 20 00:19:07 CEST 2008 - schwab@suse.de + +- Update to coreutils 6.11. + ** Bug fixes + configure --enable-no-install-program=groups now works. + "cp -fR fifo E" now succeeds with an existing E. Before this fix, using + -fR to copy a fifo or "special" file onto an existing file would fail + with EEXIST. Now, it once again unlinks the destination before trying + to create the destination file. [bug introduced in coreutils-5.90] + dd once again works with unnecessary options like if=/dev/stdin and + of=/dev/stdout. [bug introduced in fileutils-4.0h] + id now uses getgrouplist, when possible. This results in + much better performance when there are many users and/or groups. + ls no longer segfaults on files in /proc when linked with an older version + of libselinux. E.g., ls -l /proc/sys would dereference a NULL pointer. + md5sum would segfault for invalid BSD-style input, e.g., + echo 'MD5 (' | md5sum -c - Now, md5sum ignores that line. + sha1sum, sha224sum, sha384sum, and sha512sum are affected, too. + [bug introduced in coreutils-5.1.0] + md5sum -c would accept a NUL-containing checksum string like "abcd\0..." + and would unnecessarily read and compute the checksum of the named file, + and then compare that checksum to the invalid one: guaranteed to fail. + Now, it recognizes that the line is not valid and skips it. + sha1sum, sha224sum, sha384sum, and sha512sum are affected, too. + [bug present in the original version, in coreutils-4.5.1, 1995] + "mkdir -Z x dir" no longer segfaults when diagnosing invalid context "x" + mkfifo and mknod would fail similarly. Now they're fixed. + mv would mistakenly unlink a destination file before calling rename, + when the destination had two or more hard links. It no longer does that. + [bug introduced in coreutils-5.3.0] + "paste -d'\' file" no longer overruns memory (heap since coreutils-5.1.2, + stack before then) [bug present in the original version, in 1992] + "pr -e" with a mix of backspaces and TABs no longer corrupts the heap + [bug present in the original version, in 1992] + "ptx -F'\' long-file-name" would overrun a malloc'd buffer and corrupt + the heap. That was triggered by a lone backslash (or odd number of them) + at the end of the option argument to --flag-truncation=STRING (-F), + --word-regexp=REGEXP (-W), or --sentence-regexp=REGEXP (-S). + "rm -r DIR" would mistakenly declare to be "write protected" -- and + prompt about -- full DIR-relative names longer than MIN (PATH_MAX, 8192). + "rmdir --ignore-fail-on-non-empty" detects and ignores the failure + in more cases when a directory is empty. + "seq -f % 1" would issue the erroneous diagnostic "seq: memory exhausted" + rather than reporting the invalid string format. + [bug introduced in coreutils-6.0] + ** New features + join now verifies that the inputs are in sorted order. This check can + be turned off with the --nocheck-order option. + sort accepts the new option --sort=WORD, where WORD can be one of + general-numeric, month, numeric or random. These are equivalent to the + options --general-numeric-sort/-g, --month-sort/-M, --numeric-sort/-n + and --random-sort/-R, resp. + ** Improvements + id and groups work around an AFS-related bug whereby those programs + would print an invalid group number, when given no user-name argument. + ls --color no longer outputs unnecessary escape sequences + seq gives better diagnostics for invalid formats. + ** Portability + rm now works properly even on systems like BeOS and Haiku, + which have negative errno values. + ** Consistency + install, mkdir, rmdir and split now write --verbose output to stdout, + not to stderr. + + +------------------------------------------------------------------- +Fri Apr 11 11:42:57 CEST 2008 - schwab@suse.de + +- Work around a recent glibc/getopt.c diagnostic change. +- Fix frexpl test. + +------------------------------------------------------------------- +Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de + +- added baselibs.conf file to build xxbit packages + for multilib support + +------------------------------------------------------------------- +Mon Feb 18 18:19:19 CET 2008 - dmueller@suse.de + +- split off -lang subpackage to reduce one CD media size + +------------------------------------------------------------------- +Mon Feb 4 12:33:30 CET 2008 - kukuk@suse.de + +- sux is deprecated since 3 years, let's finaly remove symlink. + +------------------------------------------------------------------- +Tue Jan 22 23:03:33 CET 2008 - schwab@suse.de + +- Update to coreutils 6.10. + ** Bug fixes + Fix a non-portable use of sed in configure.ac. + [bug introduced in coreutils-6.9.92] + +------------------------------------------------------------------- +Sun Jan 13 12:59:37 CET 2008 - rguenther@suse.de + +- Reapply dropped patch: + adjust test-getaddrinfo to not fail w/o network connection + +------------------------------------------------------------------- +Sat Jan 12 19:08:54 CET 2008 - schwab@suse.de + +- Update to coreutils 6.9.92. + ** Bug fixes + cp --parents no longer uses uninitialized memory when restoring the + permissions of a just-created destination directory. + [bug introduced in coreutils-6.9.90] + tr's case conversion would fail in a locale with differing numbers + of lower case and upper case characters. E.g., this would fail: + env LC_CTYPE=en_US.ISO-8859-1 tr '[:upper:]' '[:lower:]' + [bug introduced in coreutils-6.9.90] + ** Improvements + "touch -d now writable-but-owned-by-someone-else" now succeeds + whenever that same command would succeed without "-d now". + Before, it would work fine with no -d option, yet it would + fail with the ostensibly-equivalent "-d now". + +------------------------------------------------------------------- +Mon Jan 7 16:14:51 CET 2008 - schwab@suse.de + +- Update to coreutils 6.9.91. + ** Bug fixes + "ls -l" would not output "+" on SELinux hosts unless -Z was also given. + "rm" would fail to unlink a non-directory when run in an environment + in which the user running rm is capable of unlinking a directory. + [bug introduced in coreutils-6.9] + +------------------------------------------------------------------- +Mon Jan 7 11:12:01 CET 2008 - jblunck@suse.de + +- fix a cp bug with -p --parents + +------------------------------------------------------------------- +Wed Dec 12 11:27:08 CET 2007 - rguenther@suse.de + +- adjust test-getaddrinfo to not fail w/o network connection + +------------------------------------------------------------------- +Mon Dec 10 17:50:07 CET 2007 - ro@suse.de + +- change source archive compression back to .bz2 to avoid another + dependency in the lowest basesystem + +------------------------------------------------------------------- +Mon Dec 3 10:44:24 CET 2007 - schwab@suse.de + +- Update to coreutils-6.9.90. + ** New programs + arch: equivalent to uname -m, not installed by default + But don't install this program on Solaris systems. + chcon: change the SELinux security context of a file + mktemp: create a temporary file or directory (or names) + runcon: run a program in a different SELinux security context + ** Programs no longer installed by default + hostname, su + ** Changes in behavior + cp, by default, refuses to copy through a dangling destination symlink + Set POSIXLY_CORRECT if you require the old, risk-prone behavior. + pr -F no longer suppresses the footer or the first two blank lines in + the header. This is for compatibility with BSD and POSIX. + tr now warns about an unescaped backslash at end of string. + The tr from coreutils-5.2.1 and earlier would fail for such usage, + and Solaris' tr ignores that final byte. + ** New features + Add SELinux support, based on the patch from Fedora: + * cp accepts new --preserve=context option. + * "cp -a" works with SELinux: + Now, cp -a attempts to preserve context, but failure to do so does + not change cp's exit status. However "cp --preserve=context" is + similar, but failure *does* cause cp to exit with nonzero status. + * install accepts new "-Z, --context=C" option. + * id accepts new "-Z" option. + * stat honors the new %C format directive: SELinux security context string + * ls accepts a slightly modified -Z option. + * ls: contrary to Fedora version, does not accept --lcontext and --scontext + cp -p tries to preserve the GID of a file even if preserving the UID + is not possible. + uniq accepts a new option: --zero-terminated (-z). As with the sort + option of the same name, this makes uniq consume and produce + NUL-terminated lines rather than newline-terminated lines. + wc no longer warns about character decoding errors in multibyte locales. + This means for example that "wc /bin/sh" now produces normal output + (though the word count will have no real meaning) rather than many + error messages. + ** New build options + By default, "make install" no longer attempts to install (or even build) su. + To change that, use ./configure --enable-install-program=su. + If you also want to install the new "arch" program, do this: + ./configure --enable-install-program=arch,su. + You can inhibit the compilation and installation of selected programs + at configure time. For example, to avoid installing "hostname" and + "uptime", use ./configure --enable-no-install-program=hostname,uptime + Note: currently, "make check" passes, even when arch and su are not + built (that's the new default). However, if you inhibit the building + and installation of other programs, don't be surprised if some parts + of "make check" fail. + ** Remove deprecated options + df no longer accepts the --kilobytes option. + du no longer accepts the --kilobytes or --megabytes options. + ls no longer accepts the --kilobytes option. + ptx longer accepts the --copyright option. + who no longer accepts -i or --idle. + ** Improved robustness + ln -f can no longer silently clobber a just-created hard link. + In some cases, ln could be seen as being responsible for data loss. + For example, given directories a, b, c, and files a/f and b/f, we + should be able to do this safely: ln -f a/f b/f c && rm -f a/f b/f + However, before this change, ln would succeed, and thus cause the + loss of the contents of a/f. + stty no longer silently accepts certain invalid hex values + in its 35-colon commmand-line argument + ** Bug fixes + chmod no longer ignores a dangling symlink. Now, chmod fails + with a diagnostic saying that it cannot operate on such a file. + [bug introduced in coreutils-5.1.0] + cp attempts to read a regular file, even if stat says it is empty. + Before, "cp /proc/cpuinfo c" would create an empty file when the kernel + reports stat.st_size == 0, while "cat /proc/cpuinfo > c" would "work", + and create a nonempty one. [bug introduced in coreutils-6.0] + cp --parents no longer mishandles symlinks to directories in file + name components in the source, e.g., "cp --parents symlink/a/b d" + no longer fails. Also, 'cp' no longer considers a destination + symlink to be the same as the referenced file when copying links + or making backups. For example, if SYM is a symlink to FILE, + "cp -l FILE SYM" now reports an error instead of silently doing + nothing. The behavior of 'cp' is now better documented when the + destination is a symlink. + "cp -i --update older newer" no longer prompts; same for mv + "cp -i" now detects read errors on standard input, and no longer consumes + too much seekable input; same for ln, install, mv, and rm. + cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid; + before, it would treat it as if it started with 1 (-f 1-2). + "cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-" + cut now diagnoses the '-' in "cut -f -" as an invalid range, rather + than interpreting it as the unlimited range, "1-". + date -d now accepts strings of the form e.g., 'YYYYMMDD +N days', + in addition to the usual 'YYYYMMDD N days'. + du -s now includes the size of any stat'able-but-inaccessible directory + in the total size. + du (without -s) prints whatever it knows of the size of an inaccessible + directory. Before, du would print nothing for such a directory. + ls -x DIR would sometimes output the wrong string in place of the + first entry. [introduced in coreutils-6.8] + ls --color would mistakenly color a dangling symlink as if it were + a regular symlink. This would happen only when the dangling symlink + was not a command-line argument and in a directory with d_type support. + [introduced in coreutils-6.0] + ls --color, (with a custom LS_COLORS envvar value including the + ln=target attribute) would mistakenly output the string "target" + before the name of each symlink. [introduced in coreutils-6.0] + od's --skip (-j) option now works even when the kernel says that a + nonempty regular file has stat.st_size = 0. This happens at least + with files in /proc and linux-2.6.22. + "od -j L FILE" had a bug: when the number of bytes to skip, L, is exactly + the same as the length of FILE, od would skip *no* bytes. When the number + of bytes to skip is exactly the sum of the lengths of the first N files, + od would skip only the first N-1 files. [introduced in textutils-2.0.9] + ./printf %.10000000f 1 could get an internal ENOMEM error and generate + no output, yet erroneously exit with status 0. Now it diagnoses the error + and exits with nonzero status. [present in initial implementation] + seq no longer mishandles obvious cases like "seq 0 0.000001 0.000003", + so workarounds like "seq 0 0.000001 0.0000031" are no longer needed. + seq would mistakenly reject some valid format strings containing %%, + and would mistakenly accept some invalid ones. e.g., %g%% and %%g, resp. + "seq .1 .1" would mistakenly generate no output on some systems + Obsolete sort usage with an invalid ordering-option character, e.g., + "env _POSIX2_VERSION=199209 sort +1x" no longer makes sort free an + invalid pointer [introduced in coreutils-6.5] + sorting very long lines (relative to the amount of available memory) + no longer provokes unaligned memory access + split --line-bytes=N (-C N) no longer creates an empty file + [this bug is present at least as far back as textutils-1.22 (Jan, 1997)] + tr -c no longer aborts when translating with Set2 larger than the + complement of Set1. [present in the original version, in 1992] + tr no longer rejects an unmatched [:lower:] or [:upper:] in SET1. + [present in the original version] + +------------------------------------------------------------------- +Thu Nov 29 14:28:26 CET 2007 - schwab@suse.de + +- Update to coreutils-6.9.89.48 snapshot. + +------------------------------------------------------------------- +Mon Jul 23 15:15:11 CEST 2007 - schwab@suse.de + +- Fix random sort. +- Fix invalid free. +- Fix misalignment. + +------------------------------------------------------------------- +Sun May 20 19:17:21 CEST 2007 - schwab@suse.de + +- Fix compiling with glibc 2.6. + +------------------------------------------------------------------- +Sun May 20 10:53:16 CEST 2007 - schwab@suse.de + +- Fix fchownat test. + +------------------------------------------------------------------- +Mon Apr 2 11:17:36 CEST 2007 - schwab@suse.de + +- Fix ls -x. + +------------------------------------------------------------------- +Fri Mar 23 17:03:38 CET 2007 - schwab@suse.de + +- Update to coreutils 6.9. + ** Bug fixes + cp -x (--one-file-system) would fail to set mount point permissions + The default block size and output format for df -P are now unaffected by + the DF_BLOCK_SIZE, BLOCK_SIZE, and BLOCKSIZE environment variables. It + is still affected by POSIXLY_CORRECT, though. + Using pr -m -s (i.e. merging files, with TAB as the output separator) + no longer inserts extraneous spaces between output columns. + +------------------------------------------------------------------- +Wed Mar 14 15:50:36 CET 2007 - lnussel@suse.de + +- su: actually use /etc/pam.d/su-l when running su - (#254428) + +------------------------------------------------------------------- +Mon Mar 5 17:23:45 CET 2007 - lnussel@suse.de + +- su: don't chdir("/") before fork() (#251287) + +------------------------------------------------------------------- +Fri Mar 2 13:47:35 CET 2007 - lnussel@suse.de + +- split off and rework PAM patch for su: + * run pam_open_session as root (#245706) + * use separate pam configs for "su" and "su -" (RedHat #198639) + * detect pam libs in configure script, add option to disable it + * don't set argv[0] to "-su", use upstream behavior instead + * don't use getlogin() for setting PAM_RUSER + +------------------------------------------------------------------- +Sun Feb 25 10:58:58 CET 2007 - schwab@suse.de + +- Update to coreutils 6.8. + ** Bug fixes + chgrp, chmod, and chown now honor the --preserve-root option. + Before, they would warn, yet continuing traversing and operating on /. + chmod no longer fails in an environment (e.g., a chroot) with openat + support but with insufficient /proc support. + "cp --parents F/G D" no longer creates a directory D/F when F is not + a directory (and F/G is therefore invalid). + "cp --preserve=mode" would create directories that briefly had + too-generous permissions in some cases. For example, when copying a + directory with permissions 777 the destination directory might + temporarily be setgid on some file systems, which would allow other + users to create subfiles with the same group as the directory. Fix + similar problems with 'install' and 'mv'. + cut no longer dumps core for usage like "cut -f2- f1 f2" with two or + more file arguments. This was due to a double-free bug, introduced + in coreutils-5.3.0. + dd bs= operands now silently override any later ibs= and obs= + operands, as POSIX and tradition require. + "ls -FRL" always follows symbolic links on Linux. Introduced in + coreutils-6.0. + A cross-partition "mv /etc/passwd ~" (by non-root) now prints + a reasonable diagnostic. Before, it would print this: + "mv: cannot remove `/etc/passwd': Not a directory". + pwd and "readlink -e ." no longer fail unnecessarily when a parent + directory is unreadable. + "rm -rf /etc/passwd" (run by non-root) now prints a diagnostic. + Before it would print nothing. + "rm --interactive=never F" no longer prompts for an unwritable F + ** New features + sort's new --compress-program=PROG option specifies a compression + program to use when writing and reading temporary files. + This can help save both time and disk space when sorting large inputs. + ** New features + sort accepts the new option -C, which acts like -c except no diagnostic + is printed. Its --check option now accepts an optional argument, and + --check=quiet and --check=silent are now aliases for -C, while + --check=diagnose-first is an alias for -c or plain --check. + +------------------------------------------------------------------- +Tue Jan 9 13:08:01 CET 2007 - schwab@suse.de + +- Fix localized month sorting [#231790]. + +------------------------------------------------------------------- +Wed Dec 13 13:27:36 CET 2006 - schwab@suse.de + +- Fix acl tests. + +------------------------------------------------------------------- +Sat Dec 9 01:00:28 CET 2006 - schwab@suse.de + +- Update to coreutils 6.7. + ** Bug fixes + When cp -p copied a file with special mode bits set, the same bits + were set on the copy even when ownership could not be preserved. + This could result in files that were setuid to the wrong user. + To fix this, special mode bits are now set in the copy only if its + ownership is successfully preserved. Similar problems were fixed + with mv when copying across file system boundaries. This problem + affects all versions of coreutils through 6.6. + cp --preserve=ownership would create output files that temporarily + had too-generous permissions in some cases. For example, when + copying a file with group A and mode 644 into a group-B sticky + directory, the output file was briefly readable by group B. + Fix similar problems with cp options like -p that imply + --preserve=ownership, with install -d when combined with either -o + or -g, and with mv when copying across file system boundaries. + This bug affects coreutils 6.0 through 6.6. + du --one-file-system (-x) would skip subdirectories of any directory + listed as second or subsequent command line argument. This bug affects + coreutils-6.4, 6.5 and 6.6. + +------------------------------------------------------------------- +Wed Nov 22 16:16:52 CET 2006 - schwab@suse.de + +- Update to coreutils 6.6. + ** Bug fixes + ls would segfault (dereference a NULL pointer) for a file with a + nameless group or owner. This bug was introduced in coreutils-6.5. + A bug in the latest official m4/gettext.m4 (from gettext-0.15) + made configure fail to detect gettext support, due to the unusual + way in which coreutils uses AM_GNU_GETTEXT. + ** Improved robustness + Now, du (and the other fts clients: chmod, chgrp, chown) honor a + trailing slash in the name of a symlink-to-directory even on + Solaris 9, by working around its buggy fstatat implementation. + +------------------------------------------------------------------- +Mon Nov 20 11:34:05 CET 2006 - schwab@suse.de + +- Update to coreutils 6.5. + ** Bug fixes + du (and the other fts clients: chmod, chgrp, chown) would exit early + when encountering an inaccessible directory on a system with native + openat support (i.e., linux-2.6.16 or newer along with glibc-2.4 + or newer). This bug was introduced with the switch to gnulib's + openat-based variant of fts, for coreutils-6.0. + "ln --backup f f" now produces a sensible diagnostic + ** New features + rm accepts a new option: --one-file-system + +------------------------------------------------------------------- +Mon Oct 23 10:58:38 CEST 2006 - schwab@suse.de + +- Update to coreutils 6.4. + ** Bug fixes + chgrp and chown would malfunction when invoked with both -R and -H and + with one or more of the following: --preserve-root, --verbose, --changes, + --from=o:g (chown only). This bug was introduced with the switch to + gnulib's openat-based variant of fts, for coreutils-6.0. + cp --backup dir1 dir2, would rename an existing dir2/dir1 to dir2/dir1~. + This bug was introduced in coreutils-6.0. + With --force (-f), rm no longer fails for ENOTDIR. + For example, "rm -f existing-non-directory/anything" now exits + successfully, ignoring the error about a nonexistent file. + +------------------------------------------------------------------- +Mon Oct 9 14:48:23 CEST 2006 - schwab@suse.de + +- Update to coreutils 6.3. + ** Improved robustness + pinky no longer segfaults on Darwin 7.9.0 (MacOS X 10.3.9) due to a + buggy native getaddrinfo function. + rm works around a bug in Darwin 7.9.0 (MacOS X 10.3.9) that would + sometimes keep it from removing all entries in a directory on an HFS+ + or NFS-mounted partition. + sort would fail to handle very large input (around 40GB) on systems with a + mkstemp function that returns a file descriptor limited to 32-bit offsets. + ** Bug fixes + chmod would fail unnecessarily in an unusual case: when an initially- + inaccessible argument is rendered accessible by chmod's action on a + preceding command line argument. This bug also affects chgrp, but + it is harder to demonstrate. It does not affect chown. The bug was + introduced with the switch from explicit recursion to the use of fts + in coreutils-5.1.0 (2003-10-15). + cp -i and mv -i occasionally neglected to prompt when the copy or move + action was bound to fail. This bug dates back to before fileutils-4.0. + With --verbose (-v), cp and mv would sometimes generate no output, + or neglect to report file removal. + For the "groups" command: + "groups" no longer prefixes the output with "user :" unless more + than one user is specified; this is for compatibility with BSD. + "groups user" now exits nonzero when it gets a write error. + "groups" now processes options like --help more compatibly. + shuf would infloop, given 8KB or more of piped input + ** Portability + Versions of chmod, chown, chgrp, du, and rm (tools that use openat etc.) + compiled for Solaris 8 now also work when run on Solaris 10. + +------------------------------------------------------------------- +Thu Oct 5 00:16:42 CEST 2006 - agruen@suse.de + +- cp: Replace the old --attributes=regex option with + --preserve=xattrs. Only copy extended attributes if this + option is given. Use libattr's new copy_attr_action() function + to check which attributes to copy in /etc/xattr.conf. + +------------------------------------------------------------------- +Tue Sep 19 13:20:47 CEST 2006 - schwab@suse.de + +- Disable broken autopoint. + +------------------------------------------------------------------- +Mon Sep 18 13:13:58 CEST 2006 - schwab@suse.de + +- Update to coreutils 6.2. + ** Changes in behavior + mkdir -p and install -d (or -D) now use a method that forks a child + process if the working directory is unreadable and a later argument + uses a relative file name. This avoids some race conditions, but it + means you may need to kill two processes to stop these programs. + rm now rejects attempts to remove the root directory, e.g., `rm -fr /' + now fails without removing anything. Likewise for any file name with + a final `./' or `../' component. + tail now ignores the -f option if POSIXLY_CORRECT is set, no file + operand is given, and standard input is any FIFO; formerly it did + this only for pipes. + ** Infrastructure changes + Coreutils now uses gnulib via the gnulib-tool script. + If you check the source out from CVS, then follow the instructions + in README-cvs. Although this represents a large change to the + infrastructure, it should cause no change in how the tools work. + ** Bug fixes + cp --backup no longer fails when the last component of a source file + name is "." or "..". + "ls --color" would highlight other-writable and sticky directories + no differently than regular directories on a file system with + dirent.d_type support. + "mv -T --verbose --backup=t A B" now prints the " (backup: B.~1~)" + suffix when A and B are directories as well as when they are not. + mv and "cp -r" no longer fail when invoked with two arguments + where the first one names a directory and the second name ends in + a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B, + now succeeds, once more. This bug was introduced in coreutils-5.3.0. + +------------------------------------------------------------------- +Fri Sep 1 15:56:51 CEST 2006 - schwab@suse.de + +- Fix sbin patch [#202632]. + +------------------------------------------------------------------- +Mon Aug 21 11:32:53 CEST 2006 - schwab@suse.de + +- Update to coreutils 6.1. + ** Changes in behavior + df now considers BSD "kernfs" file systems to be dummies + ** Bug fixes + cp --sparse preserves sparseness at the end of a file, even when + the file's apparent size is not a multiple of its block size. + [introduced with the original design, in fileutils-4.0r, 2000-04-29] + df (with a command line argument) once again prints its header + [introduced in coreutils-6.0] + ls -CF would misalign columns in some cases involving non-stat'able files + [introduced in coreutils-6.0] + +------------------------------------------------------------------- +Tue Aug 15 17:50:41 CEST 2006 - schwab@suse.de + +- Update to coreutils 6.0. + ** Improved robustness + df: if the file system claims to have more available than total blocks, + report the number of used blocks as being "total - available" + (a negative number) rather than as garbage. + dircolors: a new autoconf run-test for AIX's buggy strndup function + prevents malfunction on that system; may also affect cut, expand, + and unexpand. + fts no longer changes the current working directory, so its clients + (chmod, chown, chgrp, du) no longer malfunction under extreme conditions. + pwd and other programs using lib/getcwd.c work even on file systems + where dirent.d_ino values are inconsistent with those from stat.st_ino. + rm's core is now reentrant: rm --recursive (-r) now processes + hierarchies without changing the working directory at all. + ** Changes in behavior + basename and dirname now treat // as different from / on platforms + where the two are distinct. + chmod, install, and mkdir now preserve a directory's set-user-ID and + set-group-ID bits unless you explicitly request otherwise. E.g., + `chmod 755 DIR' and `chmod u=rwx,go=rx DIR' now preserve DIR's + set-user-ID and set-group-ID bits instead of clearing them, and + similarly for `mkdir -m 755 DIR' and `mkdir -m u=rwx,go=rx DIR'. To + clear the bits, mention them explicitly in a symbolic mode, e.g., + `mkdir -m u=rwx,go=rx,-s DIR'. To set them, mention them explicitly + in either a symbolic or a numeric mode, e.g., `mkdir -m 2755 DIR', + `mkdir -m u=rwx,go=rx,g+s' DIR. This change is for convenience on + systems where these bits inherit from parents. Unfortunately other + operating systems are not consistent here, and portable scripts + cannot assume the bits are set, cleared, or preserved, even when the + bits are explicitly mentioned. For example, OpenBSD 3.9 `mkdir -m + 777 D' preserves D's setgid bit but `chmod 777 D' clears it. + Conversely, Solaris 10 `mkdir -m 777 D', `mkdir -m g-s D', and + `chmod 0777 D' all preserve D's setgid bit, and you must use + something like `chmod g-s D' to clear it. + `cp --link --no-dereference' now works also on systems where the + link system call cannot create a hard link to a symbolic link. + This change has no effect on systems with a Linux-based kernel. + csplit and nl now use POSIX syntax for regular expressions, not + Emacs syntax. As a result, character classes like [[:print:]] and + interval expressions like A\{1,9\} now have their usual meaning, + . no longer matches the null character, and \ must precede the + and + ? operators. + date: a command like date -d '2006-04-23 21 days ago' would print + the wrong date in some time zones. (see the test for an example) + df now considers "none" and "proc" file systems to be dummies and + therefore does not normally display them. Also, inaccessible file + systems (which can be caused by shadowed mount points or by chrooted + bind mounts) are now dummies, too. + expr no longer complains about leading ^ in a regular expression + (the anchor is ignored), or about regular expressions like A** (the + second "*" is ignored). expr now exits with status 2 (not 3) for + errors it detects in the expression's values; exit status 3 is now + used only for internal errors (such as integer overflow, which expr + now checks for). + install and mkdir now implement the X permission symbol correctly, + e.g., `mkdir -m a+X dir'; previously the X was ignored. + install now creates parent directories with mode u=rwx,go=rx (755) + instead of using the mode specified by the -m option; and it does + not change the owner or group of parent directories. This is for + compatibility with BSD and closes some race conditions. + ln now uses different (and we hope clearer) diagnostics when it fails. + ln -v now acts more like FreeBSD, so it generates output only when + successful and the output is easier to parse. + ls now defaults to --time-style='locale', not --time-style='posix-long-iso'. + However, the 'locale' time style now behaves like 'posix-long-iso' + if your locale settings appear to be messed up. This change + attempts to have the default be the best of both worlds. + mkfifo and mknod no longer set special mode bits (setuid, setgid, + and sticky) with the -m option. + nohup's usual diagnostic now more precisely specifies the I/O + redirections, e.g., "ignoring input and appending output to + nohup.out". Also, nohup now redirects stderr to nohup.out (or + $HOME/nohup.out) if stdout is closed and stderr is a tty; this is in + response to Open Group XCU ERN 71. + rm --interactive now takes an optional argument, although the + default of using no argument still acts like -i. + rm no longer fails to remove an empty, unreadable directory + seq changes: + seq defaults to a minimal fixed point format that does not lose + information if seq's operands are all fixed point decimal numbers. + You no longer need the `-f%.f' in `seq -f%.f 1048575 1024 1050623', + for example, since the default format now has the same effect. + seq now lets you use %a, %A, %E, %F, and %G formats. + seq now uses long double internally rather than double. + sort now reports incompatible options (e.g., -i and -n) rather than + silently ignoring one of them. + stat's --format=FMT option now works the way it did before 5.3.0: + FMT is automatically newline terminated. The first stable release + containing this change was 5.92. + stat accepts the new option --printf=FMT, where FMT is *not* + automatically newline terminated. + stat: backslash escapes are interpreted in a format string specified + via --printf=FMT, but not one specified via --format=FMT. That includes + octal (\ooo, at most three octal digits), hexadecimal (\xhh, one or + two hex digits), and the standard sequences (\a, \b, \f, \n, \r, \t, + \v, \", \\). + With no operand, 'tail -f' now silently ignores the '-f' only if + standard input is a FIFO or pipe and POSIXLY_CORRECT is set. + Formerly, it ignored the '-f' when standard input was a FIFO, pipe, + or socket. + ** Scheduled for removal + ptx's --copyright (-C) option is scheduled for removal in 2007, and + now evokes a warning. Use --version instead. + rm's --directory (-d) option is scheduled for removal in 2006. This + option has been silently ignored since coreutils 5.0. On systems + that support unlinking of directories, you can use the "unlink" + command to unlink a directory. + Similarly, we are considering the removal of ln's --directory (-d, + -F) option in 2006. Please write to if this + would cause a problem for you. On systems that support hard links + to directories, you can use the "link" command to create one. + ** New programs + base64: base64 encoding and decoding (RFC 3548) functionality. + sha224sum: print or check a SHA224 (224-bit) checksum + sha256sum: print or check a SHA256 (256-bit) checksum + sha384sum: print or check a SHA384 (384-bit) checksum + sha512sum: print or check a SHA512 (512-bit) checksum + shuf: Shuffle lines of text. + ** New features + chgrp now supports --preserve-root, --no-preserve-root (default), + as it was documented to do, and just as chmod, chown, and rm do. + New dd iflag= and oflag= flags: + 'directory' causes dd to fail unless the file is a directory, on + hosts that support this (e.g., Linux kernels, version 2.1.126 and + later). This has limited utility but is present for completeness. + 'noatime' causes dd to read a file without updating its access + time, on hosts that support this (e.g., Linux kernels, version + 2.6.8 and later). + 'nolinks' causes dd to fail if the file has multiple hard links, + on hosts that support this (e.g., Solaris 10 and later). + ls accepts the new option --group-directories-first, to make it + list directories before files. + rm now accepts the -I (--interactive=once) option. This new option + prompts once if rm is invoked recursively or if more than three + files are being deleted, which is less intrusive than -i prompting + for every file, but provides almost the same level of protection + against mistakes. + shred and sort now accept the --random-source option. + sort now accepts the --random-sort (-R) option and `R' ordering option. + sort now supports obsolete usages like "sort +1 -2" unless + POSIXLY_CORRECT is set. However, when conforming to POSIX + 1003.1-2001 "sort +1" still sorts the file named "+1". + wc accepts a new option --files0-from=FILE, where FILE contains a + list of NUL-terminated file names. + ** Bug fixes + cat with any of the options, -A -v -e -E -T, when applied to a + file in /proc or /sys (linux-specific), would truncate its output, + usually printing nothing. + cp -p would fail in a /proc-less chroot, on some systems + When `cp -RL' encounters the same directory more than once in the + hierarchy beneath a single command-line argument, it no longer confuses + them with hard-linked directories. + fts-using tools (chmod, chown, chgrp, du) no longer fail due to + a double-free bug -- it could be triggered by making a directory + inaccessible while e.g., du is traversing the hierarchy under it. + fts-using tools (chmod, chown, chgrp, du) no longer misinterpret + a very long symlink chain as a dangling symlink. Before, such a + misinterpretation would cause these tools not to diagnose an ELOOP error. + ls --indicator-style=file-type would sometimes stat a symlink + unnecessarily. + ls --file-type worked like --indicator-style=slash (-p), + rather than like --indicator-style=file-type. + mv: moving a symlink into the place of an existing non-directory is + now done atomically; before, mv would first unlink the destination. + mv -T DIR EMPTY_DIR no longer fails unconditionally. Also, mv can + now remove an empty destination directory: mkdir -p a b/a; mv a b + rm (on systems with openat) can no longer exit before processing + all command-line arguments. + rm is no longer susceptible to a few low-probability memory leaks. + rm -r no longer fails to remove an inaccessible and empty directory + rm -r's cycle detection code can no longer be tricked into reporting + a false positive (introduced in fileutils-4.1.9). + shred --remove FILE no longer segfaults on Gentoo systems + sort would fail for large inputs (~50MB) on systems with a buggy + mkstemp function. sort and tac now use the replacement mkstemp + function, and hence are no longer subject to limitations (of 26 or 32, + on the maximum number of files from a given template) on HP-UX 10.20, + SunOS 4.1.4, Solaris 2.5.1 and OSF1/Tru64 V4.0F&V5.1. + tail -f once again works on a file with the append-only + attribute (affects at least Linux ext2, ext3, xfs file systems) + +------------------------------------------------------------------- +Tue Aug 8 15:29:32 CEST 2006 - schwab@suse.de + +- Move sux to %{_bindir}. + +------------------------------------------------------------------- +Mon Jun 26 13:20:23 CEST 2006 - schwab@suse.de + +- Update to coreutils 5.97. + ** Bug fixes + rebuild with better autoconf test for when the lstat replacement + function is needed -- required for Solaris 9 + cat with any of the options, -A -v -e -E -T, when applied to a + file in /proc or /sys (linux-specific), would truncate its output, + usually printing nothing. + ** Improved robustness + dircolors: a new autoconf run-test for AIX's buggy strndup function + prevents malfunction on that system; may also affect cut, expand, + and unexpand. + ** New features + chgrp now supports --preserve-root, --no-preserve-root (default), + as it was documented to do, and just as chmod, chown, and rm do. + +------------------------------------------------------------------- +Thu Jun 22 15:38:27 CEST 2006 - schwab@suse.de + +- Fix conflict with . + +------------------------------------------------------------------- +Mon May 22 13:34:26 CEST 2006 - schwab@suse.de + +- Update to coreutils 5.96. + +------------------------------------------------------------------- +Sat May 13 16:39:03 CEST 2006 - schwab@suse.de + +- Update to coreutils 5.95. + +------------------------------------------------------------------- +Fri Apr 7 16:34:42 CEST 2006 - cthiel@suse.de + +- added Obsoletes: libselinux (hack for bug #156519) + +------------------------------------------------------------------- +Mon Feb 13 01:31:31 CET 2006 - schwab@suse.de + +- Fix spurious failure with cp -LR. +- Move check for /proc. + +------------------------------------------------------------------- +Mon Jan 30 16:27:11 CET 2006 - schwab@suse.de + +- Always print newline after format in stat [#145905]. +- Barf if /proc is not mounted. + +------------------------------------------------------------------- +Wed Jan 25 21:30:02 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Thu Jan 19 16:43:57 CET 2006 - meissner@suse.de + +- Do not strip /bin/su. + +------------------------------------------------------------------- +Wed Jan 11 15:20:50 CET 2006 - schwab@suse.de + +- Fix infloop when ignoring characters [#141756]. + +------------------------------------------------------------------- +Mon Dec 19 12:03:23 CET 2005 - kukuk@suse.de + +- Add fallback if futimesat does not work + +------------------------------------------------------------------- +Mon Dec 5 17:15:17 CET 2005 - ke@suse.de + +- Fix typo in German translation file; reported by Olaf Hering + [#105863]. + +------------------------------------------------------------------- +Mon Dec 5 16:53:58 CET 2005 - schwab@suse.de + +- Drop SELinux support. + +------------------------------------------------------------------- +Tue Nov 15 16:47:44 CET 2005 - uli@suse.de + +- some tests fail on ARM (QEMU problem?); ignore for now + +------------------------------------------------------------------- +Sun Nov 6 17:42:27 CET 2005 - schwab@suse.de + +- Update to coreutils 5.93. + +------------------------------------------------------------------- +Wed Nov 2 14:55:10 CET 2005 - schwab@suse.de + +- Update to coreutils 5.92. +- Fix invalid use of va_list. +- Add some fixes from cvs. + +------------------------------------------------------------------- +Thu Oct 20 10:16:26 CEST 2005 - schwab@suse.de + +- Reenable DEFAULT_POSIX2_VERSION. + +------------------------------------------------------------------- +Wed Oct 19 19:04:17 CEST 2005 - agruen@suse.de + +- Add acl and xattr patches. + +------------------------------------------------------------------- +Mon Oct 17 15:45:25 CEST 2005 - schwab@suse.de + +- Update to coreutils 5.91. + +------------------------------------------------------------------- +Sat Oct 1 16:05:24 CEST 2005 - schwab@suse.de + +- Update to coreutils 5.90. +- Disable acl patches for now. + +------------------------------------------------------------------- +Sun Sep 25 21:33:05 CEST 2005 - schwab@suse.de + +- Fix warning. + +------------------------------------------------------------------- +Wed Aug 24 15:07:03 CEST 2005 - werner@suse.de + +- Let `su' handle /sbin and /usr/sbin in path + +------------------------------------------------------------------- +Mon Aug 1 16:48:44 CEST 2005 - kukuk@suse.de + +- And yet another uninitialized variable fix. + +------------------------------------------------------------------- +Fri Jul 29 16:01:07 CEST 2005 - schwab@suse.de + +- Fix another uninitialized variable. + +------------------------------------------------------------------- +Wed Jul 6 18:33:56 CEST 2005 - schwab@suse.de + +- Fix uninitialized variable. + +------------------------------------------------------------------- +Mon Jul 4 11:00:33 CEST 2005 - schwab@suse.de + +- Update i18n patch. + +------------------------------------------------------------------- +Mon Jun 20 23:11:53 CEST 2005 - schwab@suse.de + +- Fix last change. + +------------------------------------------------------------------- +Wed Jun 15 17:34:06 CEST 2005 - kukuk@suse.de + +- Compile/link su with -fpie/-pie + +------------------------------------------------------------------- +Sat May 21 16:46:32 CEST 2005 - kukuk@suse.de + +- Add support for /etc/default/su + +------------------------------------------------------------------- +Mon May 2 11:32:05 CEST 2005 - kukuk@suse.de + +- Don't overwrite PATH if su is called with "-" option. + +------------------------------------------------------------------- +Wed Mar 2 14:29:21 CET 2005 - schwab@suse.de + +- Fix merge error [#67103]. + +------------------------------------------------------------------- +Mon Feb 28 16:18:57 CET 2005 - schwab@suse.de + +- Call pam_getenvlist before pam_end. + +------------------------------------------------------------------- +Mon Feb 28 13:16:14 CET 2005 - schwab@suse.de + +- Link su to sux [#66830]. + +------------------------------------------------------------------- +Wed Feb 2 19:48:49 CET 2005 - schwab@suse.de + +- Handle xfs and jfs in stat [#50415]. + +------------------------------------------------------------------- +Wed Feb 2 02:02:28 CET 2005 - schwab@suse.de + +- Handle subfs like autofs. + +------------------------------------------------------------------- +Tue Jan 25 13:52:57 CET 2005 - schwab@suse.de + +- Fix path_concat. + +------------------------------------------------------------------- +Thu Jan 20 17:26:10 CET 2005 - schwab@suse.de + +- Use pam_xauth [#42238]. + +------------------------------------------------------------------- +Fri Jan 14 22:04:46 CET 2005 - schwab@suse.de + +- Fix merge error [#49853]. + +------------------------------------------------------------------- +Tue Jan 11 18:39:44 CET 2005 - schwab@suse.de + +- Update to coreutils 5.3.0. + +------------------------------------------------------------------- +Mon Nov 8 17:15:39 CET 2004 - kukuk@suse.de + +- Use common-* PAM config files for su PAM configuration + +------------------------------------------------------------------- +Mon Oct 25 15:01:04 CEST 2004 - schwab@suse.de + +- Fix last change. +- Fix selinux patch. + +------------------------------------------------------------------- +Wed Oct 20 01:55:31 CEST 2004 - ro@suse.de + +- remove no language support (nb is already there) + +------------------------------------------------------------------- +Sat Oct 2 03:08:31 CEST 2004 - agruen@suse.de + +- #46609: Fix chown and chgrp utilities for uid == (uid_t) -1 and + gid == (gid_t) -1 case. +- Add missing #include to have NULL defined in lib/acl.c + +------------------------------------------------------------------- +Fri Sep 10 00:13:28 CEST 2004 - schwab@suse.de + +- Fix uninitialized variable [#44929]. +- Fix selinux patch. + +------------------------------------------------------------------- +Wed Aug 25 13:32:20 CEST 2004 - schwab@suse.de + +- Fix hardlink accounting patch. + +------------------------------------------------------------------- +Mon May 24 18:07:35 CEST 2004 - schwab@suse.de + +- Update testsuite for change in chown. + +------------------------------------------------------------------- +Mon May 24 16:34:33 CEST 2004 - schwab@suse.de + +- Precompute length in caller of ismbblank to avoid quadratic behaviour + [#40741]. + +------------------------------------------------------------------- +Mon May 17 15:33:12 CEST 2004 - schwab@suse.de + +- Fix handling of symlinks in chown [#40691]. + +------------------------------------------------------------------- +Sat Apr 17 20:09:11 CEST 2004 - schwab@suse.de + +- Pacify autobuild. + +------------------------------------------------------------------- +Fri Apr 2 14:48:24 CEST 2004 - schwab@suse.de + +- Add support for IUTF8 in stty. + +------------------------------------------------------------------- +Tue Mar 30 18:39:10 CEST 2004 - schwab@suse.de + +- Fix merge error in selinux patch [#37431]. + +------------------------------------------------------------------- +Mon Mar 29 14:51:59 CEST 2004 - schwab@suse.de + +- Fix hardlink accounting in du. + +------------------------------------------------------------------- +Mon Mar 22 14:19:59 CET 2004 - schwab@suse.de + +- Fix race in the testsuite. + +------------------------------------------------------------------- +Mon Mar 15 16:21:20 CET 2004 - kukuk@suse.de + +- Update SELinux patch to new libselinux interface + +------------------------------------------------------------------- +Mon Mar 15 11:25:54 CET 2004 - schwab@suse.de + +- Fix date parsing. + +------------------------------------------------------------------- +Sat Mar 13 18:21:40 CET 2004 - schwab@suse.de + +- Update to coreutils 5.2.1. + * Includes mv fix. + * Fix sparse handling in cp. + * Fix descriptor leak in nohup. + * Fix POSIX issues in expr. + * Always allow user.group in chown. + +------------------------------------------------------------------- +Fri Mar 12 18:18:33 CET 2004 - schwab@suse.de + +- Fix sysinfo patch [#35337]. + +------------------------------------------------------------------- +Fri Mar 12 16:57:21 CET 2004 - schwab@suse.de + +- Fix preserving links in mv. + +------------------------------------------------------------------- +Wed Mar 3 15:28:06 CET 2004 - schwab@suse.de + +- Fix help output from mkdir. + +------------------------------------------------------------------- +Fri Feb 20 01:06:39 CET 2004 - schwab@suse.de + +- Update to coreutils 5.2.0. + +------------------------------------------------------------------- +Mon Feb 9 18:03:45 CET 2004 - schwab@suse.de + +- Update to coreutils 5.1.3. + +------------------------------------------------------------------- +Mon Feb 2 17:20:11 CET 2004 - agruen@suse.de + +- Update acl and xattr patches, and add some Changelog text. + +------------------------------------------------------------------- +Mon Jan 26 14:34:12 CET 2004 - schwab@suse.de + +- Update to coreutils 5.1.2. + +------------------------------------------------------------------- +Fri Jan 23 17:16:32 CET 2004 - schwab@suse.de + +- Don't link [ to test. + +------------------------------------------------------------------- +Mon Jan 19 13:26:00 CET 2004 - schwab@suse.de + +- Update to coreutils 5.1.1. +- Default to POSIX.2-1992. + +------------------------------------------------------------------- +Fri Jan 16 12:26:48 CET 2004 - kukuk@suse.de + +- Add pam-devel to neededforbuild + +------------------------------------------------------------------- +Fri Jan 9 13:51:53 CET 2004 - schwab@suse.de + +- Fix spurious test failure. + +------------------------------------------------------------------- +Thu Jan 8 16:48:32 CET 2004 - schwab@suse.de + +- Update to coreutils 5.1.0. + +------------------------------------------------------------------- +Fri Dec 12 23:08:27 CET 2003 - schwab@suse.de + +- Fix use of AC_SEARCH_LIBS. + +------------------------------------------------------------------- +Tue Dec 9 17:31:09 CET 2003 - schwab@suse.de + +- Cleanup SELinux patch. + +------------------------------------------------------------------- +Tue Dec 9 16:07:28 CET 2003 - kukuk@suse.de + +- Add SELinux patch. + +------------------------------------------------------------------- +Wed Nov 26 11:59:34 CET 2003 - schwab@suse.de + +- Fix sorting of months in multibyte case [#33299]. + +------------------------------------------------------------------- +Wed Oct 22 15:33:21 CEST 2003 - schwab@suse.de + +- Fix building without extended attributes. + +------------------------------------------------------------------- +Wed Oct 15 15:17:11 CEST 2003 - schwab@suse.de + +- Cleanup sysinfo patch. + +------------------------------------------------------------------- +Fri Sep 19 11:09:36 CEST 2003 - kukuk@suse.de + +- Add missing textutil to Provides + +------------------------------------------------------------------- +Mon Aug 25 17:42:23 CEST 2003 - agruen@suse.de + +- Fix uname command to report reasonable processor and platform + information (coreutils-sysinfo.diff: based on similar RedHat + patch). + +------------------------------------------------------------------- +Mon Jul 21 15:23:56 CEST 2003 - schwab@suse.de + +- Fix typo in i18n patch for join. + +------------------------------------------------------------------- +Fri Jul 18 12:05:56 CEST 2003 - schwab@suse.de + +- Avoid abort in sort on inconsistent locales [#26506]. + +------------------------------------------------------------------- +Tue Jul 15 15:16:37 CEST 2003 - okir@suse.de + +- make su export variables declared via pam_putenv + +------------------------------------------------------------------- +Wed May 28 10:15:39 CEST 2003 - kukuk@suse.de + +- PAM fixes for su: + - Move pam_open_session call before dropping privilegs, session + management needs max. possible credentials and needs to be done + before we change into the home directory of the user. + - Don't set PAM_TTY and PAM_RUSER to fake names. + - Use conversion function from libpam_misc. + +------------------------------------------------------------------- +Fri May 16 11:11:44 CEST 2003 - schwab@suse.de + +- Fix exit status from su. + +------------------------------------------------------------------- +Thu Apr 24 11:43:14 CEST 2003 - ro@suse.de + +- fix head calling syntax + +------------------------------------------------------------------- +Mon Apr 7 13:11:19 CEST 2003 - schwab@suse.de + +- Only delete info entries when removing last version. + +------------------------------------------------------------------- +Fri Apr 4 17:58:20 CEST 2003 - schwab@suse.de + +- Update to coreutils 5.0. + +------------------------------------------------------------------- +Mon Mar 31 12:53:29 CEST 2003 - schwab@suse.de + +- Update to coreutils 4.5.12. + +------------------------------------------------------------------- +Thu Mar 20 18:10:25 CET 2003 - schwab@suse.de + +- Update to coreutils 4.5.11. + +------------------------------------------------------------------- +Mon Mar 10 13:42:36 CET 2003 - schwab@suse.de + +- Fix LFS bug in du [#24960]. + +------------------------------------------------------------------- +Thu Feb 27 15:39:06 CET 2003 - schwab@suse.de + +- Readd textutils i18n patches. + +------------------------------------------------------------------- +Thu Feb 27 14:53:19 CET 2003 - agruen@suse.de + +- Per hint from Andreas Schwab, don't use awk in autoconf. (The + improved test is simpler, too.) + +------------------------------------------------------------------- +Thu Feb 27 05:29:05 CET 2003 - agruen@suse.de + +- Fix autoconf test for attr_copy_file that caused all binaries + to be linked needlessly against libattr.so. + +------------------------------------------------------------------- +Tue Feb 25 15:18:39 CET 2003 - agruen@suse.de + +- Extended attribute copying: Use the newly exported + attr_copy_check_permissions() callback exported by libattr.so, + so that the EA copying done by coreutils is consistent with + other apps [#24244]. + +------------------------------------------------------------------- +Mon Feb 24 16:27:21 CET 2003 - schwab@suse.de + +- Update to coreutils 4.5.8. + * Fixes bugs in du. + +------------------------------------------------------------------- +Mon Feb 17 15:00:04 CET 2003 - agruen@suse.de + +- Add extended attribute copying patch: Affects cp, mv, install. + See the cp manual page for details on the changes in cp. The + mv utility always tries to copy extended attributes; install + never does. + +------------------------------------------------------------------- +Mon Feb 10 13:16:58 CET 2003 - schwab@suse.de + +- Update to coreutils 4.5.7. + +------------------------------------------------------------------- +Fri Feb 7 13:47:58 CET 2003 - kukuk@suse.de + +- Use pam_unix2.so instead of pam_unix.so, use same rules for + password changing as passwd. + +------------------------------------------------------------------- +Thu Feb 6 17:48:08 CET 2003 - schwab@suse.de + +- Use %install_info. + +------------------------------------------------------------------- +Thu Feb 6 17:05:42 CET 2003 - schwab@suse.de + +- Update to coreutils 4.5.6. + +------------------------------------------------------------------- +Mon Feb 3 14:47:47 CET 2003 - schwab@suse.de + +- Package created, combining textutils, sh-utils and fileutils. + diff --git a/coreutils.keyring b/coreutils.keyring new file mode 100644 index 0000000..befb97a --- /dev/null +++ b/coreutils.keyring @@ -0,0 +1,312 @@ +Release GPG keyring of coreutils group. + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +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 +ELphkzjc6eM3CaOZ73u4GVXotheeUabUHQ== +=drvb +-----END PGP PUBLIC KEY BLOCK----- \ No newline at end of file diff --git a/coreutils.spec b/coreutils.spec new file mode 100644 index 0000000..dceae30 --- /dev/null +++ b/coreutils.spec @@ -0,0 +1,292 @@ +# +# spec file for package coreutils +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +# there are more fancy ways to define a package name using magic +# macros but OBS and the bots that rely on parser information from +# OBS can't deal with all of them +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "single" +%global psuffix -single +%elif "%{flavor}" == "testsuite" +%global psuffix -testsuite +%elif "%{flavor}" == "systemd" +%global psuffix -systemd +%else +%global psuffix %{nil} +%endif +Name: coreutils%{?psuffix} +Version: 9.5 +Release: 0 +Summary: GNU Core Utilities +License: GPL-3.0-or-later +Group: System/Base +URL: https://www.gnu.org/software/coreutils/ +Source0: https://ftp.gnu.org/gnu/coreutils/coreutils-%{version}.tar.xz +Source1: https://ftp.gnu.org/gnu/coreutils/coreutils-%{version}.tar.xz.sig +Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=coreutils&download=1&file=./coreutils.keyring +Source3: baselibs.conf +Patch1: coreutils-remove_hostname_documentation.patch +Patch3: coreutils-remove_kill_documentation.patch +Patch4: coreutils-i18n.patch +Patch8: coreutils-sysinfo.patch +# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option. +Patch100: coreutils-build-timeout-as-pie.patch +# There is no network in the build root so make the test succeed +Patch112: coreutils-getaddrinfo.patch +# Assorted fixes +Patch113: coreutils-misc.patch +# Skip 2 valgrind'ed sort tests on ppc/ppc64 which would fail due to +# a glibc issue in mkstemp. +Patch300: coreutils-skip-some-sort-tests-on-ppc.patch +Patch301: coreutils-skip-gnulib-test-tls.patch +# tests: shorten extreme-expensive factor tests +Patch303: coreutils-tests-shorten-extreme-factor-tests.patch +# Stop using Python 2.x +Patch304: coreutils-use-python3.patch +Patch500: coreutils-disable_tests.patch +Patch501: coreutils-test_without_valgrind.patch +# Downstream patch to skip a test failing on OBS. +# tests: skip tests/rm/ext3-perf.sh temporarily as it hangs on OBS. +Patch810: coreutils-skip-tests-rm-ext3-perf.patch +Patch900: coreutils-tests-workaround-make-fdleak.patch +# Upstream gnulib patch for coreutils-9.5. +Patch920: coreutils-fix-gnulib-time_r-tests.patch +BuildRequires: automake +BuildRequires: gmp-devel +BuildRequires: hostname +BuildRequires: libacl-devel +BuildRequires: libattr-devel +BuildRequires: libcap-devel +BuildRequires: libselinux-devel +BuildRequires: makeinfo +BuildRequires: perl +BuildRequires: xz +%if "%{name}" == "coreutils-systemd" +BuildRequires: pkgconfig(libsystemd) +%endif +%if 0%{?suse_version} > 1320 +BuildRequires: gcc-PIE +%endif +%if "%{name}" == "coreutils-testsuite" +BuildRequires: acl +BuildRequires: gdb +BuildRequires: perl-Expect +BuildRequires: python3 +BuildRequires: python3-pyinotify +BuildRequires: strace +BuildRequires: timezone +# Some tests need the 'bin' user. +BuildRequires: user(bin) +%ifarch %{ix86} x86_64 ppc ppc64 s390x armv7l armv7hl +BuildRequires: valgrind +%endif +%endif +%if "%{name}" == "coreutils" || "%{name}" == "coreutils-single" +Provides: fileutils = %{version} +Provides: mktemp = %{version} +Provides: sh-utils = %{version} +Provides: stat = %{version} +Provides: textutils = %{version} +%if "%{name}" == "coreutils-single" +Conflicts: coreutils +Provides: coreutils = %{version}-%{release} +%endif +%endif +%if "%{name}" == "coreutils-systemd" +Provides: coreutils:%{_bindir}/who +Requires: coreutils = %{version} +%endif + +# ================================================ +%description +These are the GNU core utilities. This package is the union of +the GNU fileutils, sh-utils, and textutils packages. + + [ arch b2sum base32 base64 basename basenc cat chcon chgrp chmod chown chroot + cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand + expr factor false fmt fold groups head hostid id install join + link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup + nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink + realpath rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum + shred shuf sleep sort split stat stdbuf stty sum sync tac tail tee test + timeout touch tr true truncate tsort tty uname unexpand uniq unlink + uptime users vdir wc who whoami yes + +%package doc +Summary: Documentation for the GNU Core Utilities +Group: Documentation/Man +Supplements: (coreutils and patterns-base-documentation) +Supplements: (coreutils-single and patterns-base-documentation) +Provides: coreutils:%{_infodir}/coreutils.info.gz +BuildArch: noarch + +%description doc +This package contains the documentation for the GNU Core Utilities. + +# ================================================ +%lang_package + +%prep +%setup -q -n coreutils-%{version} +%patch -P 4 -p1 +%patch -P 1 +%patch -P 3 +%patch -P 8 +# +%if 0%{?suse_version} <= 1320 +%patch -P 100 +%endif +%patch -P 112 +%patch -P 113 + +%patch -P 300 + +%ifarch %{ix86} x86_64 ppc ppc64 +%patch -P 301 +%endif + +%patch -P 303 +%patch -P 304 +%patch -P 500 +%patch -P 501 + +%patch -P 810 +%patch -P 900 +%patch -P 920 + +# ================================================ +%build +%if 0%{?suse_version} >= 1200 +AUTOPOINT=true autoreconf -fi +%endif +export CFLAGS="%{optflags}" +%configure --libexecdir=%{_libdir} \ + --enable-install-program=arch \ + --enable-no-install-program=kill \ +%if "%{name}" == "coreutils-single" + --enable-single-binary \ + --without-openssl \ + --without-gmp \ +%endif +%if "%{name}" == "coreutils-systemd" + --enable-systemd \ +%endif + DEFAULT_POSIX2_VERSION=200112 \ + alternative=199209 + +%make_build -C po update-po + +# Regenerate manpages +touch man/*.x + +%make_build all + +# make sure that parse-datetime.{c,y} ends up in debuginfo (rh#1555079) +ln -v lib/parse-datetime.{c,y} . + +# ================================================ +%check +%if "%{name}" == "coreutils-testsuite" + # Make our multi-byte test for sort executable + chmod a+x tests/misc/sort-mb-tests.sh + # Avoid parallel make, because otherwise some timeout based tests like + # rm/ext3-perf may fail due to high CPU or IO load. + %make_build -j1 check-very-expensive VERBOSE=yes \ + && install -d -m 755 %{buildroot}%{_docdir}/%{name} \ + && xz -c tests/test-suite.log \ + > %{buildroot}%{_docdir}/%{name}/test-suite.log.xz +%else + # Run the shorter check otherwise. + %make_build check VERBOSE=yes +%endif + +# ================================================ +%install +%if "%{name}" == "coreutils" || "%{name}" == "coreutils-single" +make install DESTDIR=%{buildroot} pkglibexecdir=%{_libdir}/%{name} + +echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1 +%if "%{name}" == "coreutils" +%find_lang coreutils +# add LC_TIME directories to lang package +awk '/LC_TIME/ {a=$2; gsub(/\/[^\/]+\.mo/,"", a); print "%%dir", a} {print}' < coreutils.lang > tmp +mv tmp coreutils.lang +%else +rm -rf %{buildroot}%{_mandir} +rm -rf %{buildroot}%{_infodir} +rm -rf %{buildroot}%{_datadir}/locale +> coreutils.lang +%endif +%endif +%if "%{name}" == "coreutils-systemd" +mkdir -p %{buildroot}%{_bindir} +install src/{pinky,uptime,users,who} %{buildroot}%{_bindir}/ +%endif + +# ================================================ +%post +%if "%{name}" == "coreutils" || "%{name}" == "coreutils-single" +%{?regenerate_initrd_post} +%endif + +# ================================================ +%posttrans +%if "%{name}" == "coreutils" || "%{name}" == "coreutils-single" +%{?regenerate_initrd_posttrans} +%endif + +# ================================================ +%files +%if "%{name}" == "coreutils" || "%{name}" == "coreutils-single" + +%license COPYING +%doc NEWS README THANKS +%exclude %{_bindir}/pinky +%exclude %{_bindir}/uptime +%exclude %{_bindir}/users +%exclude %{_bindir}/who +%{_bindir}/* +%{_libdir}/%{name} + +%if "%{name}" == "coreutils" +%files lang -f coreutils.lang + +%files doc +%{_infodir}/coreutils.info*.gz +%{_mandir}/man1/*.1%{?ext_man} +%endif + +%elif "%{name}" == "coreutils-systemd" +%license COPYING +%doc NEWS README THANKS +%{_bindir}/pinky +%{_bindir}/uptime +%{_bindir}/users +%{_bindir}/who + +%else + +# test-suite +%dir %{_docdir}/%{name} +%doc %{_docdir}/%{name}/test-suite.log.xz + +%endif + +# ================================================ + +%changelog