Accepting request 215038 from Base:System

- Testsuite: avoid a failure of tests/mkdir/p-acl.sh on armv7l.
- Refresh patches with QUILT_REFRESH_ARGS="-p0 --no-timestamps"
 (forwarded request 215037 from bernhard-voelker)

OBS-URL: https://build.opensuse.org/request/show/215038
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=100
This commit is contained in:
Stephan Kulow 2014-01-30 11:51:46 +00:00 committed by Git OBS Bridge
parent 5c4ed49d54
commit 7847858e54
17 changed files with 164 additions and 68 deletions

View File

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

View File

@ -33,8 +33,8 @@ the source directory itself.
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
--- src/copy.c.orig
+++ src/copy.c
@@ -2408,6 +2408,17 @@ copy_internal (char const *src_name, cha
else
{
@ -64,8 +64,8 @@ Index: src/copy.c
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
--- tests/cp/cp-a-selinux.sh.orig
+++ tests/cp/cp-a-selinux.sh
@@ -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

View File

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

View File

@ -22,8 +22,8 @@
Index: lib/linebuffer.h
===================================================================
--- lib/linebuffer.h.orig 2013-12-04 15:53:33.000000000 +0100
+++ lib/linebuffer.h 2014-01-09 00:22:09.644387186 +0100
--- lib/linebuffer.h.orig
+++ lib/linebuffer.h
@@ -21,6 +21,11 @@
# include <stdio.h>
@ -48,8 +48,8 @@ Index: lib/linebuffer.h
/* Initialize linebuffer LINEBUFFER for use. */
Index: src/cut.c
===================================================================
--- src/cut.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/cut.c 2014-01-09 00:46:30.197738943 +0100
--- src/cut.c.orig
+++ src/cut.c
@@ -28,6 +28,11 @@
#include <assert.h>
#include <getopt.h>
@ -612,8 +612,8 @@ Index: src/cut.c
if (optind == argc)
Index: src/expand.c
===================================================================
--- src/expand.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/expand.c 2014-01-09 00:22:09.646387469 +0100
--- src/expand.c.orig
+++ src/expand.c
@@ -37,12 +37,34 @@
#include <stdio.h>
#include <getopt.h>
@ -808,8 +808,8 @@ Index: src/expand.c
error (EXIT_FAILURE, errno, "-");
Index: src/fold.c
===================================================================
--- src/fold.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/fold.c 2014-01-09 00:22:09.646387469 +0100
--- src/fold.c.orig
+++ src/fold.c
@@ -22,12 +22,34 @@
#include <getopt.h>
#include <sys/types.h>
@ -1209,8 +1209,8 @@ Index: src/fold.c
case 's': /* Break at word boundaries. */
Index: src/join.c
===================================================================
--- src/join.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/join.c 2014-01-09 00:22:09.648387752 +0100
--- src/join.c.orig
+++ src/join.c
@@ -22,18 +22,32 @@
#include <sys/types.h>
#include <getopt.h>
@ -1705,8 +1705,8 @@ Index: src/join.c
case 'z':
Index: src/pr.c
===================================================================
--- src/pr.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/pr.c 2014-01-09 00:22:09.649387893 +0100
--- src/pr.c.orig
+++ src/pr.c
@@ -312,6 +312,24 @@
#include <getopt.h>
@ -2472,8 +2472,8 @@ Index: src/pr.c
Index: src/sort.c
===================================================================
--- src/sort.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/sort.c 2014-01-09 00:50:40.005001889 +0100
--- src/sort.c.orig
+++ src/sort.c
@@ -29,6 +29,14 @@
#include <sys/wait.h>
#include <signal.h>
@ -3455,8 +3455,8 @@ Index: src/sort.c
Index: src/unexpand.c
===================================================================
--- src/unexpand.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/unexpand.c 2014-01-09 00:22:09.651388176 +0100
--- src/unexpand.c.orig
+++ src/unexpand.c
@@ -38,12 +38,29 @@
#include <stdio.h>
#include <getopt.h>
@ -3714,8 +3714,8 @@ Index: src/unexpand.c
error (EXIT_FAILURE, errno, "-");
Index: src/uniq.c
===================================================================
--- src/uniq.c.orig 2013-12-04 15:48:30.000000000 +0100
+++ src/uniq.c 2014-01-09 00:22:09.651388176 +0100
--- src/uniq.c.orig
+++ src/uniq.c
@@ -21,6 +21,17 @@
#include <getopt.h>
#include <sys/types.h>
@ -4102,8 +4102,8 @@ Index: src/uniq.c
check_chars = SIZE_MAX;
Index: tests/local.mk
===================================================================
--- tests/local.mk.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/local.mk 2014-01-09 00:22:09.652388317 +0100
--- tests/local.mk.orig
+++ tests/local.mk
@@ -324,6 +324,7 @@ all_tests = \
tests/misc/sort-discrim.sh \
tests/misc/sort-files0-from.pl \
@ -4114,8 +4114,8 @@ Index: tests/local.mk
tests/misc/sort-month.sh \
Index: tests/misc/cut.pl
===================================================================
--- tests/misc/cut.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/cut.pl 2014-01-09 00:22:09.652388317 +0100
--- tests/misc/cut.pl.orig
+++ tests/misc/cut.pl
@@ -23,9 +23,11 @@ use strict;
# Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4140,8 +4140,8 @@ Index: tests/misc/cut.pl
push @Tests, @new;
Index: tests/misc/expand.pl
===================================================================
--- tests/misc/expand.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/expand.pl 2014-01-09 00:22:09.652388317 +0100
--- tests/misc/expand.pl.orig
+++ tests/misc/expand.pl
@@ -23,6 +23,15 @@ use strict;
# Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@ -4198,8 +4198,8 @@ Index: tests/misc/expand.pl
Index: tests/misc/fold.pl
===================================================================
--- tests/misc/fold.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/fold.pl 2014-01-09 00:22:09.652388317 +0100
--- tests/misc/fold.pl.orig
+++ tests/misc/fold.pl
@@ -20,9 +20,18 @@ use strict;
(my $program_name = $0) =~ s|.*/||;
@ -4271,8 +4271,8 @@ Index: tests/misc/fold.pl
exit $fail;
Index: tests/misc/join.pl
===================================================================
--- tests/misc/join.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/join.pl 2014-01-09 00:22:09.653388459 +0100
--- tests/misc/join.pl.orig
+++ tests/misc/join.pl
@@ -25,6 +25,15 @@ my $limits = getlimits ();
my $prog = 'join';
@ -4341,8 +4341,8 @@ Index: tests/misc/join.pl
Index: tests/misc/sort-mb-tests.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ tests/misc/sort-mb-tests.sh 2014-01-09 00:22:09.653388459 +0100
--- /dev/null
+++ tests/misc/sort-mb-tests.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Verify sort's multi-byte support.
@ -4391,8 +4391,8 @@ Index: tests/misc/sort-mb-tests.sh
+Exit $fail
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 2014-01-09 00:22:09.653388459 +0100
--- tests/misc/sort-merge.pl.orig
+++ tests/misc/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;
@ -4451,8 +4451,8 @@ Index: tests/misc/sort-merge.pl
Index: tests/misc/sort.pl
===================================================================
--- tests/misc/sort.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/sort.pl 2014-01-09 00:22:09.653388459 +0100
--- tests/misc/sort.pl.orig
+++ tests/misc/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;
@ -4518,8 +4518,8 @@ Index: tests/misc/sort.pl
my $verbose = $ENV{VERBOSE};
Index: tests/misc/unexpand.pl
===================================================================
--- tests/misc/unexpand.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/unexpand.pl 2014-01-09 00:22:09.654388600 +0100
--- tests/misc/unexpand.pl.orig
+++ tests/misc/unexpand.pl
@@ -27,6 +27,14 @@ my $limits = getlimits ();
my $prog = 'unexpand';
@ -4575,8 +4575,8 @@ Index: tests/misc/unexpand.pl
Index: tests/misc/uniq.pl
===================================================================
--- tests/misc/uniq.pl.orig 2013-12-04 15:48:30.000000000 +0100
+++ tests/misc/uniq.pl 2014-01-09 00:22:09.654388600 +0100
--- tests/misc/uniq.pl.orig
+++ tests/misc/uniq.pl
@@ -23,9 +23,17 @@ my $limits = getlimits ();
my $prog = 'uniq';
my $try = "Try '$prog --help' for more information.\n";
@ -4651,8 +4651,8 @@ Index: tests/misc/uniq.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 2014-01-09 00:22:09.654388600 +0100
--- tests/pr/pr-tests.pl.orig
+++ tests/pr/pr-tests.pl
@@ -23,6 +23,15 @@ use strict;
my $prog = 'pr';

View File

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

View File

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

View File

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

View File

@ -19,8 +19,8 @@ with a diagnostic like:
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
--- gnulib-tests/gnulib.mk.orig
+++ gnulib-tests/gnulib.mk
@@ -2303,9 +2303,10 @@ EXTRA_DIST += test-time.c
## begin gnulib module tls-tests

View File

@ -22,8 +22,8 @@ Valgrind diagnoses problems in 'mkstemp64' deep down in glibc on PowerPC:
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
--- tests/misc/sort-stale-thread-mem.sh.orig
+++ tests/misc/sort-stale-thread-mem.sh
@@ -27,6 +27,10 @@ require_valgrind_
grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null ||
skip_ 'requires pthreads'
@ -37,8 +37,8 @@ Index: tests/misc/sort-stale-thread-mem.sh
(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
--- tests/misc/sort-u-FMR.sh.orig
+++ tests/misc/sort-u-FMR.sh
@@ -20,6 +20,10 @@
print_ver_ sort
require_valgrind_

View File

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

View File

@ -0,0 +1,68 @@
tests: avoid test framework failure if the file system lacks ACL support
Prompted by a test framework failure of tests/mkdir/p-acl.sh on armv7l,
I pushed the following patch upstream which will go into 8.23 some day.
_______________________________________________
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=5d7591d0
commit 5d7591d0edf0dd31c2daa195ee766c1383b89f4c
Author: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Fri Jan 10 16:48:25 2014 +0100
tests: improve test for a working setfacl
Prompted by a test framework failure of tests/mkdir/p-acl.sh on armv7l:
The previous test for a working setfacl was not sufficient in some
circumstances.
* init.cfg (require_setfacl_): Call setfacl twice with conflictive
ACL specs, and use ACL specs which can't be mapped into regular file
permission bits. Document the reasons.
---
init.cfg | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
Index: init.cfg
===================================================================
--- init.cfg.orig
+++ init.cfg
@@ -192,9 +192,37 @@ require_valgrind_()
skip_ "requires a working valgrind"
}
+# Skip the current test if setfacl doesn't work on the current file system,
+# which could happen if not installed, or if ACLs are not supported by the
+# kernel or the file system, or are turned off via mount options.
+#
+# Work around the following two issues:
+#
+# 1) setfacl maps ACLs into file permission bits if on "noacl" file systems.
+#
+# On file systems which do not support ACLs (e.g. ext4 mounted with -o noacl),
+# setfacl operates on the regular file permission bits, and only fails if the
+# given ACL spec does not fit into there. Thus, to test if ACLs really work
+# on the current file system, pass an ACL spec which can't be mapped that way.
+# "Default" ACLs (-d) seem to fulfill this requirement.
+#
+# 2) setfacl only invokes the underlying system call if the ACL would change.
+#
+# If the given ACL spec would not change the ACLs on the file, then setfacl
+# does not invoke the underlying system call - setxattr(). Therefore, to test
+# if setting ACLs really works on the current file system, call setfacl twice
+# with conflictive ACL specs.
require_setfacl_()
{
- setfacl -m user::rwx . \
+ local d='acltestdir_'
+ mkdir $d || framework_failure_
+ local f=0
+
+ setfacl -d -m user::r-x $d \
+ && setfacl -d -m user::rwx $d \
+ || f=1
+ rm -rf $d || framework_failure_
+ test $f = 0 \
|| skip_ "setfacl does not work on the current file system"
}

View File

@ -18,8 +18,8 @@ error message to skip the test.
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
--- tests/cp/proc-zero-len.sh.orig
+++ tests/cp/proc-zero-len.sh
@@ -27,7 +27,12 @@ test -r $f || f=empty
cat $f > out || fail=1

View File

@ -14,8 +14,8 @@ or arm6l. Strip the tests down from 37 to 3.
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
--- tests/local.mk.orig
+++ tests/local.mk
@@ -649,14 +649,9 @@ all_tests = \
# See tests/factor/create-test.sh.
tf = tests/factor

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
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

View File

@ -119,6 +119,9 @@ Patch302: coreutils-tests-avoid-FP-cp-cpuinfo.patch
# tests: shorten extreme-expensive factor tests
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
# tests: avoid test framework failure if the file system lacks ACL support
Patch304: coreutils-test-avoid-FP-when-no-ACL-support.patch
# ================================================
%description
These are the GNU core utilities. This package is the union of
@ -156,6 +159,7 @@ the GNU fileutils, sh-utils, and textutils packages.
%patch302
%patch303
%patch304
#???## We need to statically link to gmp, otherwise we have a build loop
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
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

View File

@ -119,6 +119,9 @@ Patch302: coreutils-tests-avoid-FP-cp-cpuinfo.patch
# tests: shorten extreme-expensive factor tests
Patch303: coreutils-tests-shorten-extreme-factor-tests.patch
# tests: avoid test framework failure if the file system lacks ACL support
Patch304: coreutils-test-avoid-FP-when-no-ACL-support.patch
# ================================================
%description
These are the GNU core utilities. This package is the union of
@ -156,6 +159,7 @@ the GNU fileutils, sh-utils, and textutils packages.
%patch302
%patch303
%patch304
#???## We need to statically link to gmp, otherwise we have a build loop
#???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in