SHA256
1
0
forked from pool/coreutils

Accepting request 213254 from home:bernhard-voelker

- 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.

OBS-URL: https://build.opensuse.org/request/show/213254
OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=221
This commit is contained in:
Bernhard Voelker 2014-01-09 02:21:45 +00:00 committed by Git OBS Bridge
parent 35753376a8
commit 6f150a9022
16 changed files with 421 additions and 57 deletions

View File

@ -16,8 +16,8 @@ independent executable (PIE). This is enforced via RPMLINT.
Index: src/local.mk Index: src/local.mk
=================================================================== ===================================================================
--- src/local.mk.orig 2014-01-03 18:18:24.193893522 +0100 --- src/local.mk.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/local.mk 2014-01-03 19:47:24.269617498 +0100 +++ src/local.mk 2014-01-09 01:26:38.363704044 +0100
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>. ## along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -0,0 +1,90 @@
Upstream patch on top of 8.22:
http://lists.gnu.org/archive/html/coreutils/2014-01/msg00012.html
Stripped down to the relevant part: NEWS and THANKS.in chunks removed.
Original NEWS entry:
cp -a again sets the correct SELinux context for existing directories in
the destination. Previously it set the context of an existing directory
to that of its last copied descendent.
[bug introduced in coreutils-8.22]
Originally reported for Fedora by Michal Trunecka in rh#1045122:
https://bugzilla.redhat.com/show_bug.cgi?id=1045122
______________________________________________________________________
From f2f8b688b87b94ed3551f47f9a6422c873acf5d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Sun, 5 Jan 2014 15:00:55 +0000
Subject: [PATCH] copy: fix SELinux context preservation for existing
directories
* src/copy.c (copy_internal): Use the global process context
to set the context of existing directories before they're populated.
This is more consistent with the new directory case, and fixes
a bug for existing directories where we erroneously set the
context to the last copied descendent, rather than to that of
the source directory itself.
* tests/cp/cp-a-selinux.sh: Add a test for this case.
---
src/copy.c | 13 ++++++++++++-
tests/cp/cp-a-selinux.sh | 15 +++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
Index: src/copy.c
===================================================================
--- src/copy.c.orig 2013-12-05 01:59:36.000000000 +0100
+++ src/copy.c 2014-01-09 02:47:33.108744454 +0100
@@ -2408,6 +2408,17 @@ copy_internal (char const *src_name, cha
else
{
omitted_permissions = 0;
+
+ /* For directories, the process global context could be reset for
+ descendents, so use it to set the context for existing dirs here.
+ This will also give earlier indication of failure to set ctx. */
+ if (x->set_security_context || x->preserve_security_context)
+ if (! set_file_security_ctx (dst_name, x->preserve_security_context,
+ false, x))
+ {
+ if (x->require_preserve_context)
+ goto un_backup;
+ }
}
/* Decide whether to copy the contents of the directory. */
@@ -2598,7 +2609,7 @@ copy_internal (char const *src_name, cha
/* With -Z or --preserve=context, set the context for existing files.
Note this is done already for copy_reg() for reasons described therein. */
- if (!new_dst && !x->copy_as_regular
+ if (!new_dst && !x->copy_as_regular && !S_ISDIR (src_mode)
&& (x->set_security_context || x->preserve_security_context))
{
if (! set_file_security_ctx (dst_name, x->preserve_security_context,
Index: tests/cp/cp-a-selinux.sh
===================================================================
--- tests/cp/cp-a-selinux.sh.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/cp/cp-a-selinux.sh 2014-01-09 02:47:33.109744597 +0100
@@ -41,6 +41,21 @@ test -s err && fail=1 #there must be n
ls -Z e | grep $ctx || fail=1
ls -Z f | grep $ctx || fail=1
+# Check handling of existing dirs which requires specific handling
+# due to recursion, and was handled incorrectly in coreutils-8.22
+mkdir -p backup/existing_dir/ || framework_failure_
+ls -Zd backup/existing_dir | grep $ctx && framework_failure_
+touch backup/existing_dir/file || framework_failure_
+chcon $ctx backup/existing_dir/file || framework_failure_
+# Set the dir context to ensure it is reset
+mkdir -p --context="$ctx" restore/existing_dir || framework_failure_
+# Set the permissions of the source to show they're reset too
+chmod o+rw restore/existing_dir
+# Copy and ensure existing directories updated
+cp -a backup/. restore/
+ls -Zd restore/existing_dir | grep $ctx &&
+ { ls -lZd restore/existing_dir; fail=1; }
+
# Check restorecon (-Z) functionality for file and directory
get_selinux_type() { ls -Zd "$1" | sed -n 's/.*:\(.*_t\):.*/\1/p'; }
# Also make a dir with our known context

View File

@ -5,8 +5,8 @@
Index: gnulib-tests/test-isnanl.h Index: gnulib-tests/test-isnanl.h
=================================================================== ===================================================================
--- gnulib-tests/test-isnanl.h.orig 2014-01-03 18:18:24.131884585 +0100 --- gnulib-tests/test-isnanl.h.orig 2013-12-04 15:53:33.000000000 +0100
+++ gnulib-tests/test-isnanl.h 2014-01-03 19:47:25.428781733 +0100 +++ gnulib-tests/test-isnanl.h 2014-01-09 01:26:40.271972672 +0100
@@ -51,6 +51,15 @@ main () @@ -51,6 +51,15 @@ main ()
/* A bit pattern that is different from a Quiet NaN. With a bit of luck, /* A bit pattern that is different from a Quiet NaN. With a bit of luck,
it's a Signalling NaN. */ it's a Signalling NaN. */
@ -25,8 +25,8 @@ Index: gnulib-tests/test-isnanl.h
# if LDBL_EXPBIT0_BIT > 0 # if LDBL_EXPBIT0_BIT > 0
Index: gnulib-tests/test-signbit.c Index: gnulib-tests/test-signbit.c
=================================================================== ===================================================================
--- gnulib-tests/test-signbit.c.orig 2014-01-03 18:18:24.131884585 +0100 --- gnulib-tests/test-signbit.c.orig 2013-12-04 15:53:33.000000000 +0100
+++ gnulib-tests/test-signbit.c 2014-01-03 19:47:25.446784284 +0100 +++ gnulib-tests/test-signbit.c 2014-01-09 01:26:40.271972672 +0100
@@ -151,6 +151,16 @@ test_signbitl () @@ -151,6 +151,16 @@ test_signbitl ()
#define NWORDS \ #define NWORDS \
((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))

View File

@ -1,5 +1,5 @@
lib/linebuffer.h | 8 lib/linebuffer.h | 8
src/cut.c | 427 ++++++++++++++++++++++++- src/cut.c | 433 ++++++++++++++++++++++++-
src/expand.c | 165 +++++++++ src/expand.c | 165 +++++++++
src/fold.c | 308 ++++++++++++++++-- src/fold.c | 308 ++++++++++++++++--
src/join.c | 363 ++++++++++++++++++--- src/join.c | 363 ++++++++++++++++++---
@ -18,12 +18,12 @@
tests/misc/unexpand.pl | 39 ++ tests/misc/unexpand.pl | 39 ++
tests/misc/uniq.pl | 55 +++ tests/misc/uniq.pl | 55 +++
tests/pr/pr-tests.pl | 49 ++ tests/pr/pr-tests.pl | 49 ++
20 files changed, 3188 insertions(+), 180 deletions(-) 20 files changed, 3194 insertions(+), 180 deletions(-)
Index: lib/linebuffer.h Index: lib/linebuffer.h
=================================================================== ===================================================================
--- lib/linebuffer.h.orig 2013-12-04 15:53:33.000000000 +0100 --- lib/linebuffer.h.orig 2013-12-04 15:53:33.000000000 +0100
+++ lib/linebuffer.h 2014-01-05 00:03:18.941940873 +0100 +++ lib/linebuffer.h 2014-01-09 00:22:09.644387186 +0100
@@ -21,6 +21,11 @@ @@ -21,6 +21,11 @@
# include <stdio.h> # include <stdio.h>
@ -49,7 +49,7 @@ Index: lib/linebuffer.h
Index: src/cut.c Index: src/cut.c
=================================================================== ===================================================================
--- src/cut.c.orig 2013-12-04 15:48:30.000000000 +0100 --- src/cut.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/cut.c 2014-01-05 00:03:18.942941015 +0100 +++ src/cut.c 2014-01-09 00:46:30.197738943 +0100
@@ -28,6 +28,11 @@ @@ -28,6 +28,11 @@
#include <assert.h> #include <assert.h>
#include <getopt.h> #include <getopt.h>
@ -134,7 +134,16 @@ Index: src/cut.c
struct range_pair struct range_pair
{ {
@@ -106,15 +169,25 @@ enum operating_mode @@ -75,6 +138,8 @@ static size_t n_rp;
/* Number of `struct range_pair's allocated. */
static size_t n_rp_allocated;
+/* Length of the delimiter given as argument to -d. */
+size_t delimlen;
/* Append LOW, HIGH to the list RP of range pairs, allocating additional
space if necessary. Update global variable N_RP. When allocating,
@@ -106,15 +171,25 @@ enum operating_mode
{ {
undefined_mode, undefined_mode,
@ -161,7 +170,7 @@ Index: src/cut.c
/* If true do not output lines containing no delimeter characters. /* If true do not output lines containing no delimeter characters.
Otherwise, all such lines are printed. This option is valid only Otherwise, all such lines are printed. This option is valid only
with field mode. */ with field mode. */
@@ -126,6 +199,9 @@ static bool complement; @@ -126,6 +201,9 @@ static bool complement;
/* The delimeter character for field mode. */ /* The delimeter character for field mode. */
static unsigned char delim; static unsigned char delim;
@ -171,7 +180,7 @@ Index: src/cut.c
/* True if the --output-delimiter=STRING option was specified. */ /* True if the --output-delimiter=STRING option was specified. */
static bool output_delimiter_specified; static bool output_delimiter_specified;
@@ -188,7 +264,7 @@ Print selected parts of lines from each @@ -188,7 +266,7 @@ Print selected parts of lines from each
-f, --fields=LIST select only these fields; also print any line\n\ -f, --fields=LIST select only these fields; also print any line\n\
that contains no delimiter character, unless\n\ that contains no delimiter character, unless\n\
the -s option is specified\n\ the -s option is specified\n\
@ -180,7 +189,7 @@ Index: src/cut.c
"), stdout); "), stdout);
fputs (_("\ fputs (_("\
--complement complement the set of selected bytes, characters\n\ --complement complement the set of selected bytes, characters\n\
@@ -381,6 +457,9 @@ set_fields (const char *fieldstr) @@ -381,6 +459,9 @@ set_fields (const char *fieldstr)
if (operating_mode == byte_mode) if (operating_mode == byte_mode)
error (0, 0, error (0, 0,
_("byte offset %s is too large"), quote (bad_num)); _("byte offset %s is too large"), quote (bad_num));
@ -190,7 +199,7 @@ Index: src/cut.c
else else
error (0, 0, error (0, 0,
_("field number %s is too large"), quote (bad_num)); _("field number %s is too large"), quote (bad_num));
@@ -505,6 +584,82 @@ cut_bytes (FILE *stream) @@ -505,6 +586,82 @@ cut_bytes (FILE *stream)
} }
} }
@ -273,7 +282,7 @@ Index: src/cut.c
/* Read from stream STREAM, printing to standard output any selected fields. */ /* Read from stream STREAM, printing to standard output any selected fields. */
static void static void
@@ -629,13 +784,198 @@ cut_fields (FILE *stream) @@ -629,13 +786,201 @@ cut_fields (FILE *stream)
} }
} }
@ -456,7 +465,10 @@ Index: src/cut.c
+ break; + break;
+ +
+ case field_mode: + case field_mode:
+ cut_fields_mb (stream); + if (delimlen == 1)
+ cut_fields (stream);
+ else
+ cut_fields_mb (stream);
+ break; + break;
+ +
+ default: + default:
@ -475,16 +487,15 @@ Index: src/cut.c
} }
/* Process file FILE to standard output. /* Process file FILE to standard output.
@@ -687,6 +1027,8 @@ main (int argc, char **argv) @@ -687,6 +1032,7 @@ main (int argc, char **argv)
bool ok; bool ok;
bool delim_specified = false; bool delim_specified = false;
char *spec_list_string IF_LINT ( = NULL); char *spec_list_string IF_LINT ( = NULL);
+ char mbdelim[MB_LEN_MAX + 1]; + char mbdelim[MB_LEN_MAX + 1];
+ size_t delimlen = 0;
initialize_main (&argc, &argv); initialize_main (&argc, &argv);
set_program_name (argv[0]); set_program_name (argv[0]);
@@ -709,7 +1051,6 @@ main (int argc, char **argv) @@ -709,7 +1055,6 @@ main (int argc, char **argv)
switch (optc) switch (optc)
{ {
case 'b': case 'b':
@ -492,7 +503,7 @@ Index: src/cut.c
/* Build the byte list. */ /* Build the byte list. */
if (operating_mode != undefined_mode) if (operating_mode != undefined_mode)
FATAL_ERROR (_("only one type of list may be specified")); FATAL_ERROR (_("only one type of list may be specified"));
@@ -717,6 +1058,14 @@ main (int argc, char **argv) @@ -717,6 +1062,14 @@ main (int argc, char **argv)
spec_list_string = optarg; spec_list_string = optarg;
break; break;
@ -507,7 +518,7 @@ Index: src/cut.c
case 'f': case 'f':
/* Build the field list. */ /* Build the field list. */
if (operating_mode != undefined_mode) if (operating_mode != undefined_mode)
@@ -728,10 +1077,36 @@ main (int argc, char **argv) @@ -728,10 +1081,38 @@ main (int argc, char **argv)
case 'd': case 'd':
/* New delimiter. */ /* New delimiter. */
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
@ -533,6 +544,8 @@ Index: src/cut.c
+ FATAL_ERROR (_("the delimiter must be a single character")); + FATAL_ERROR (_("the delimiter must be a single character"));
+ memcpy (mbdelim, optarg, delimlen); + memcpy (mbdelim, optarg, delimlen);
+ mbdelim[delimlen] = '\0'; + mbdelim[delimlen] = '\0';
+ if (delimlen == 1)
+ delim = *optarg;
+ } + }
+ } + }
+ +
@ -548,7 +561,7 @@ Index: src/cut.c
break; break;
case OUTPUT_DELIMITER_OPTION: case OUTPUT_DELIMITER_OPTION:
@@ -744,6 +1119,7 @@ main (int argc, char **argv) @@ -744,6 +1125,7 @@ main (int argc, char **argv)
break; break;
case 'n': case 'n':
@ -556,7 +569,7 @@ Index: src/cut.c
break; break;
case 's': case 's':
@@ -783,15 +1159,34 @@ main (int argc, char **argv) @@ -783,15 +1165,34 @@ main (int argc, char **argv)
} }
if (!delim_specified) if (!delim_specified)
@ -600,7 +613,7 @@ Index: src/cut.c
Index: src/expand.c Index: src/expand.c
=================================================================== ===================================================================
--- src/expand.c.orig 2013-12-04 15:48:30.000000000 +0100 --- src/expand.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/expand.c 2014-01-05 00:03:18.942941015 +0100 +++ src/expand.c 2014-01-09 00:22:09.646387469 +0100
@@ -37,12 +37,34 @@ @@ -37,12 +37,34 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
@ -796,7 +809,7 @@ Index: src/expand.c
Index: src/fold.c Index: src/fold.c
=================================================================== ===================================================================
--- src/fold.c.orig 2013-12-04 15:48:30.000000000 +0100 --- src/fold.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/fold.c 2014-01-05 00:03:18.942941015 +0100 +++ src/fold.c 2014-01-09 00:22:09.646387469 +0100
@@ -22,12 +22,34 @@ @@ -22,12 +22,34 @@
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
@ -1197,7 +1210,7 @@ Index: src/fold.c
Index: src/join.c Index: src/join.c
=================================================================== ===================================================================
--- src/join.c.orig 2013-12-04 15:48:30.000000000 +0100 --- src/join.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/join.c 2014-01-05 00:03:18.943941157 +0100 +++ src/join.c 2014-01-09 00:22:09.648387752 +0100
@@ -22,18 +22,32 @@ @@ -22,18 +22,32 @@
#include <sys/types.h> #include <sys/types.h>
#include <getopt.h> #include <getopt.h>
@ -1693,7 +1706,7 @@ Index: src/join.c
Index: src/pr.c Index: src/pr.c
=================================================================== ===================================================================
--- src/pr.c.orig 2013-12-04 15:48:30.000000000 +0100 --- src/pr.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/pr.c 2014-01-05 00:03:18.944941300 +0100 +++ src/pr.c 2014-01-09 00:22:09.649387893 +0100
@@ -312,6 +312,24 @@ @@ -312,6 +312,24 @@
#include <getopt.h> #include <getopt.h>
@ -2460,7 +2473,7 @@ Index: src/pr.c
Index: src/sort.c Index: src/sort.c
=================================================================== ===================================================================
--- src/sort.c.orig 2013-12-04 15:48:30.000000000 +0100 --- src/sort.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/sort.c 2014-01-05 00:03:18.945941442 +0100 +++ src/sort.c 2014-01-09 00:50:40.005001889 +0100
@@ -29,6 +29,14 @@ @@ -29,6 +29,14 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <signal.h> #include <signal.h>
@ -3281,12 +3294,12 @@ Index: src/sort.c
+ diff = - NONZERO (lenb); + diff = - NONZERO (lenb);
+ else if (lenb == 0) + else if (lenb == 0)
+ diff = 1; + diff = 1;
+ else if (hard_LC_COLLATE && !folding)
+ {
+ diff = xmemcoll0 (texta, lena, textb, lenb);
+ }
+ else + else
+ { + diff = memcmp (texta, textb, MIN (lena + 1,lenb + 1));
+ diff = memcmp (texta, textb, MIN (lena,lenb));
+ if (!diff)
+ diff = xmemcoll (texta, lena, textb, lenb);
+ }
+ +
+ if (ignore || translate) + if (ignore || translate)
+ free (texta); + free (texta);
@ -3443,7 +3456,7 @@ Index: src/sort.c
Index: src/unexpand.c Index: src/unexpand.c
=================================================================== ===================================================================
--- src/unexpand.c.orig 2013-12-04 15:48:30.000000000 +0100 --- src/unexpand.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/unexpand.c 2014-01-05 00:03:18.947941726 +0100 +++ src/unexpand.c 2014-01-09 00:22:09.651388176 +0100
@@ -38,12 +38,29 @@ @@ -38,12 +38,29 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
@ -3702,7 +3715,7 @@ Index: src/unexpand.c
Index: src/uniq.c Index: src/uniq.c
=================================================================== ===================================================================
--- src/uniq.c.orig 2013-12-04 15:48:30.000000000 +0100 --- src/uniq.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/uniq.c 2014-01-05 00:03:18.947941726 +0100 +++ src/uniq.c 2014-01-09 00:22:09.651388176 +0100
@@ -21,6 +21,17 @@ @@ -21,6 +21,17 @@
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
@ -4090,7 +4103,7 @@ Index: src/uniq.c
Index: tests/local.mk Index: tests/local.mk
=================================================================== ===================================================================
--- tests/local.mk.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/local.mk.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/local.mk 2014-01-05 00:03:18.947941726 +0100 +++ tests/local.mk 2014-01-09 00:22:09.652388317 +0100
@@ -324,6 +324,7 @@ all_tests = \ @@ -324,6 +324,7 @@ all_tests = \
tests/misc/sort-discrim.sh \ tests/misc/sort-discrim.sh \
tests/misc/sort-files0-from.pl \ tests/misc/sort-files0-from.pl \
@ -4102,7 +4115,7 @@ Index: tests/local.mk
Index: tests/misc/cut.pl Index: tests/misc/cut.pl
=================================================================== ===================================================================
--- tests/misc/cut.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/misc/cut.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/cut.pl 2014-01-05 00:03:18.948941869 +0100 +++ tests/misc/cut.pl 2014-01-09 00:22:09.652388317 +0100
@@ -23,9 +23,11 @@ use strict; @@ -23,9 +23,11 @@ use strict;
# Turn off localization of executable's output. # Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4128,7 +4141,7 @@ Index: tests/misc/cut.pl
Index: tests/misc/expand.pl Index: tests/misc/expand.pl
=================================================================== ===================================================================
--- tests/misc/expand.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/misc/expand.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/expand.pl 2014-01-05 00:03:18.948941869 +0100 +++ tests/misc/expand.pl 2014-01-09 00:22:09.652388317 +0100
@@ -23,6 +23,15 @@ use strict; @@ -23,6 +23,15 @@ use strict;
# Turn off localization of executable's output. # Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4186,7 +4199,7 @@ Index: tests/misc/expand.pl
Index: tests/misc/fold.pl Index: tests/misc/fold.pl
=================================================================== ===================================================================
--- tests/misc/fold.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/misc/fold.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/fold.pl 2014-01-05 00:03:18.948941869 +0100 +++ tests/misc/fold.pl 2014-01-09 00:22:09.652388317 +0100
@@ -20,9 +20,18 @@ use strict; @@ -20,9 +20,18 @@ use strict;
(my $program_name = $0) =~ s|.*/||; (my $program_name = $0) =~ s|.*/||;
@ -4259,7 +4272,7 @@ Index: tests/misc/fold.pl
Index: tests/misc/join.pl Index: tests/misc/join.pl
=================================================================== ===================================================================
--- tests/misc/join.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/misc/join.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/join.pl 2014-01-05 00:03:18.949942011 +0100 +++ tests/misc/join.pl 2014-01-09 00:22:09.653388459 +0100
@@ -25,6 +25,15 @@ my $limits = getlimits (); @@ -25,6 +25,15 @@ my $limits = getlimits ();
my $prog = 'join'; my $prog = 'join';
@ -4329,7 +4342,7 @@ Index: tests/misc/join.pl
Index: tests/misc/sort-mb-tests.sh Index: tests/misc/sort-mb-tests.sh
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/sort-mb-tests.sh 2014-01-05 00:03:18.949942011 +0100 +++ tests/misc/sort-mb-tests.sh 2014-01-09 00:22:09.653388459 +0100
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
+#!/bin/sh +#!/bin/sh
+# Verify sort's multi-byte support. +# Verify sort's multi-byte support.
@ -4379,7 +4392,7 @@ Index: tests/misc/sort-mb-tests.sh
Index: tests/misc/sort-merge.pl Index: tests/misc/sort-merge.pl
=================================================================== ===================================================================
--- tests/misc/sort-merge.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/misc/sort-merge.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/sort-merge.pl 2014-01-05 00:03:18.949942011 +0100 +++ tests/misc/sort-merge.pl 2014-01-09 00:22:09.653388459 +0100
@@ -26,6 +26,15 @@ my $prog = 'sort'; @@ -26,6 +26,15 @@ my $prog = 'sort';
# Turn off localization of executable's output. # Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4439,7 +4452,7 @@ Index: tests/misc/sort-merge.pl
Index: tests/misc/sort.pl Index: tests/misc/sort.pl
=================================================================== ===================================================================
--- tests/misc/sort.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/misc/sort.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/sort.pl 2014-01-05 00:03:58.891623346 +0100 +++ tests/misc/sort.pl 2014-01-09 00:22:09.653388459 +0100
@@ -24,10 +24,15 @@ my $prog = 'sort'; @@ -24,10 +24,15 @@ my $prog = 'sort';
# Turn off localization of executable's output. # Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4506,7 +4519,7 @@ Index: tests/misc/sort.pl
Index: tests/misc/unexpand.pl Index: tests/misc/unexpand.pl
=================================================================== ===================================================================
--- tests/misc/unexpand.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/misc/unexpand.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/unexpand.pl 2014-01-05 00:03:18.950942153 +0100 +++ tests/misc/unexpand.pl 2014-01-09 00:22:09.654388600 +0100
@@ -27,6 +27,14 @@ my $limits = getlimits (); @@ -27,6 +27,14 @@ my $limits = getlimits ();
my $prog = 'unexpand'; my $prog = 'unexpand';
@ -4563,7 +4576,7 @@ Index: tests/misc/unexpand.pl
Index: tests/misc/uniq.pl Index: tests/misc/uniq.pl
=================================================================== ===================================================================
--- tests/misc/uniq.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/misc/uniq.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/uniq.pl 2014-01-05 00:03:18.950942153 +0100 +++ tests/misc/uniq.pl 2014-01-09 00:22:09.654388600 +0100
@@ -23,9 +23,17 @@ my $limits = getlimits (); @@ -23,9 +23,17 @@ my $limits = getlimits ();
my $prog = 'uniq'; my $prog = 'uniq';
my $try = "Try '$prog --help' for more information.\n"; my $try = "Try '$prog --help' for more information.\n";
@ -4639,7 +4652,7 @@ Index: tests/misc/uniq.pl
Index: tests/pr/pr-tests.pl Index: tests/pr/pr-tests.pl
=================================================================== ===================================================================
--- tests/pr/pr-tests.pl.orig 2013-12-04 15:48:30.000000000 +0100 --- tests/pr/pr-tests.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/pr/pr-tests.pl 2014-01-05 00:03:18.950942153 +0100 +++ tests/pr/pr-tests.pl 2014-01-09 00:22:09.654388600 +0100
@@ -23,6 +23,15 @@ use strict; @@ -23,6 +23,15 @@ use strict;
my $prog = 'pr'; my $prog = 'pr';

View File

@ -17,8 +17,8 @@ Andreas Gruenbacher <agruen@suse.de>
Index: src/chgrp.c Index: src/chgrp.c
=================================================================== ===================================================================
--- src/chgrp.c.orig 2014-01-03 18:18:24.257902746 +0100 --- src/chgrp.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/chgrp.c 2014-01-03 19:47:23.019440368 +0100 +++ src/chgrp.c 2014-01-09 01:26:29.066362326 +0100
@@ -88,7 +88,7 @@ parse_group (const char *name) @@ -88,7 +88,7 @@ parse_group (const char *name)
{ {
unsigned long int tmp; unsigned long int tmp;

View File

@ -4,8 +4,8 @@
Index: doc/coreutils.texi Index: doc/coreutils.texi
=================================================================== ===================================================================
--- doc/coreutils.texi.orig 2014-01-03 18:18:24.527941663 +0100 --- doc/coreutils.texi.orig 2013-12-13 03:43:10.000000000 +0100
+++ doc/coreutils.texi 2014-01-03 19:47:18.522803264 +0100 +++ doc/coreutils.texi 2014-01-09 01:25:54.832410969 +0100
@@ -66,7 +66,6 @@ @@ -66,7 +66,6 @@
* groups: (coreutils)groups invocation. Print group names a user is in. * groups: (coreutils)groups invocation. Print group names a user is in.
* head: (coreutils)head invocation. Output the first part of files. * head: (coreutils)head invocation. Output the first part of files.

View File

@ -4,8 +4,8 @@
Index: doc/coreutils.texi Index: doc/coreutils.texi
=================================================================== ===================================================================
--- doc/coreutils.texi.orig 2014-01-03 19:47:18.522803264 +0100 --- doc/coreutils.texi.orig 2014-01-09 01:25:54.832410969 +0100
+++ doc/coreutils.texi 2014-01-03 19:47:20.702112039 +0100 +++ doc/coreutils.texi 2014-01-09 01:26:25.779767542 +0100
@@ -69,7 +69,6 @@ @@ -69,7 +69,6 @@
* id: (coreutils)id invocation. Print user identity. * id: (coreutils)id invocation. Print user identity.
* install: (coreutils)install invocation. Copy and change attributes. * install: (coreutils)install invocation. Copy and change attributes.

View File

@ -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 2013-12-04 16:02:24.000000000 +0100
+++ gnulib-tests/gnulib.mk 2014-01-09 01:28:13.401082108 +0100
@@ -2303,9 +2303,10 @@ EXTRA_DIST += test-time.c
## 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

View File

@ -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/misc/sort-stale-thread-mem.sh: Skip on ppc/ppc64.
* tests/misc/sort-u-FMR.sh: Likewise.
---
tests/misc/sort-stale-thread-mem.sh | 4 ++++
tests/misc/sort-u-FMR.sh | 4 ++++
2 files changed, 8 insertions(+)
Index: tests/misc/sort-stale-thread-mem.sh
===================================================================
--- tests/misc/sort-stale-thread-mem.sh.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/sort-stale-thread-mem.sh 2014-01-09 01:27:05.735557168 +0100
@@ -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/misc/sort-u-FMR.sh
===================================================================
--- tests/misc/sort-u-FMR.sh.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/sort-u-FMR.sh 2014-01-09 01:27:05.736557309 +0100
@@ -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

View File

@ -4,8 +4,8 @@
Index: src/uname.c Index: src/uname.c
=================================================================== ===================================================================
--- src/uname.c.orig 2014-01-03 18:18:24.316911250 +0100 --- src/uname.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/uname.c 2014-01-03 19:47:21.922284919 +0100 +++ src/uname.c 2014-01-09 01:26:27.130914660 +0100
@@ -337,6 +337,36 @@ main (int argc, char **argv) @@ -337,6 +337,36 @@ main (int argc, char **argv)
# endif # endif
} }

View File

@ -0,0 +1,36 @@
From 84e67a5bd239179e2faded424861dce5718fa12c Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Tue, 7 Jan 2014 19:18:25 +0100
Subject: [PATCH] tests: avoid FP failure when cp fails for /proc/cpuinfo
On aarch64, cp fails to copy /proc/cpuinfo because the inode number
seems to change between the initial stat() call and copying the file:
$ cp /proc/cpuinfo exp
cp: skipping file '/proc/cpuinfo', as it was \
replaced while being copied
* tests/cp/proc-zero-len.sh: When cp fails, check on the above
error message to skip the test.
---
tests/cp/proc-zero-len.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: tests/cp/proc-zero-len.sh
===================================================================
--- tests/cp/proc-zero-len.sh.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/cp/proc-zero-len.sh 2014-01-09 01:28:38.447905329 +0100
@@ -27,7 +27,12 @@ test -r $f || f=empty
cat $f > out || fail=1
# With coreutils-6.9, this would create a zero-length "exp" file.
-cp $f exp || fail=1
+# Skip this test on architectures like aarch64 where the inode
+# number of the file changed during the cp run.
+cp $f exp 2>err \
+ || { fail=1;
+ grep 'replaced while being copied' \
+ && skip_ "File $f is being replaced while being copied"; }
# Don't simply compare contents; they might differ,
# e.g., if CPU freq changes between cat and cp invocations.

View File

@ -0,0 +1,36 @@
From d3b433bd41c8978c31fee085cc7e6b0554a4c03e Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
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 2014-01-09 00:22:09.652388317 +0100
+++ tests/local.mk 2014-01-09 01:29:51.697680994 +0100
@@ -649,14 +649,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)

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
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 Sat Jan 4 23:05:46 UTC 2014 - mail@bernhard-voelker.de

View File

@ -97,9 +97,28 @@ Patch16: coreutils-invalid-ids.patch
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option. # OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
Patch100: coreutils-build-timeout-as-pie.patch Patch100: coreutils-build-timeout-as-pie.patch
# Upstream patch to 8.22: cp -a: set the correct SELinux context
# on already existing destination directories.
Patch110: coreutils-copy-fix-selinux-existing-dirs.patch
# Fix imported gnulib long double math tests for little-endian PowerPC # Fix imported gnulib long double math tests for little-endian PowerPC
Patch202: coreutils-gnulib-tests-ppc64le.patch Patch202: coreutils-gnulib-tests-ppc64le.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
%ifarch %ix86 x86_64 ppc ppc64
Patch301: coreutils-skip-gnulib-test-tls.patch
%endif
# tests: avoid FP failure when cp fails for /proc/cpuinfo
# which happens e.g. on aarch64.
Patch302: coreutils-tests-avoid-FP-cp-cpuinfo.patch
# tests: shorten extreme-expensive factor tests
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
# ================================================ # ================================================
%description %description
These are the GNU core utilities. This package is the union of These are the GNU core utilities. This package is the union of
@ -126,9 +145,18 @@ the GNU fileutils, sh-utils, and textutils packages.
%patch16 %patch16
# #
%patch100 %patch100
%patch110
%patch202 %patch202
%patch300
%ifarch %ix86 x86_64 ppc ppc64
%patch301
%endif
%patch302
%patch303
#???## We need to statically link to gmp, otherwise we have a build loop #???## We need to statically link to gmp, otherwise we have a build loop
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in #???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
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 Sat Jan 4 23:05:46 UTC 2014 - mail@bernhard-voelker.de

View File

@ -97,9 +97,28 @@ Patch16: coreutils-invalid-ids.patch
# OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option. # OBS / RPMLINT require /usr/bin/timeout to be built with the -fpie option.
Patch100: coreutils-build-timeout-as-pie.patch Patch100: coreutils-build-timeout-as-pie.patch
# Upstream patch to 8.22: cp -a: set the correct SELinux context
# on already existing destination directories.
Patch110: coreutils-copy-fix-selinux-existing-dirs.patch
# Fix imported gnulib long double math tests for little-endian PowerPC # Fix imported gnulib long double math tests for little-endian PowerPC
Patch202: coreutils-gnulib-tests-ppc64le.patch Patch202: coreutils-gnulib-tests-ppc64le.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
%ifarch %ix86 x86_64 ppc ppc64
Patch301: coreutils-skip-gnulib-test-tls.patch
%endif
# tests: avoid FP failure when cp fails for /proc/cpuinfo
# which happens e.g. on aarch64.
Patch302: coreutils-tests-avoid-FP-cp-cpuinfo.patch
# tests: shorten extreme-expensive factor tests
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
# ================================================ # ================================================
%description %description
These are the GNU core utilities. This package is the union of These are the GNU core utilities. This package is the union of
@ -126,9 +145,18 @@ the GNU fileutils, sh-utils, and textutils packages.
%patch16 %patch16
# #
%patch100 %patch100
%patch110
%patch202 %patch202
%patch300
%ifarch %ix86 x86_64 ppc ppc64
%patch301
%endif
%patch302
%patch303
#???## We need to statically link to gmp, otherwise we have a build loop #???## We need to statically link to gmp, otherwise we have a build loop
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in #???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in