resolve merge conflict

This commit is contained in:
Ondřej Vašík 2016-01-13 13:05:08 +01:00
commit 0907d290f7
2 changed files with 93 additions and 3 deletions

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 8.24
Release: 3%{?dist}
Release: 5%{?dist}
License: GPLv3+
Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
@ -32,6 +32,8 @@ Patch104: coreutils-df-direct.patch
Patch107: coreutils-8.4-mkdir-modenote.patch
# Don't run the currently failing test-update-copyright.sh test
Patch108: coreutils-remove-test-update-copyright.patch
#avoid false failure due to extra stat() calls done by opendir() in glibc 2.22
Patch109: glibc-2.22-test-fix.patch
# sh-utils
#add info about TZ envvar to date manpage
@ -136,6 +138,7 @@ the old GNU fileutils, sh-utils, and textutils packages.
%patch104 -p1 -b .dfdirect
%patch107 -p1 -b .mkdirmode
%patch108 -p1 -b .crtest
%patch109 -p1 -b .opendir_stat
# sh-utils
%patch703 -p1 -b .dateman
@ -379,11 +382,15 @@ fi
%{_sbindir}/chroot
%changelog
* Wed Jan 13 2016 Ondrej Vasik <ovasik@redhat.com> - 8.24-3
* Wed Jan 13 2016 Ondrej Vasik <ovasik@redhat.com> - 8.24-5
- mv: prevent dataloss when source dir is specified multiple
times (#1297464, by P.Brady)
- fix memory leak in sort/I18N (patches written by Pádraig, #1259942)
- Use the new i18n implementation for expand/unexpand
* Wed Sep 16 2015 Kamil Dudka <kdudka@redhat.com> - 8.24-4
- fix memory leak in sort/I18N (patches written by Pádraig, #1259942)
* Sat Sep 12 2015 Ondrej Vasik <ovasik@redhat.com> 8.24-3
- fix one still existing occurance of non-full path in colorls.sh
* Thu Jul 16 2015 Ondrej Vasik <ovasik@redhat.com> 8.24-2

83
glibc-2.22-test-fix.patch Normal file
View File

@ -0,0 +1,83 @@
From fd5f2b1569e2e0b31be755e14e236a7a02478fc0 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
Date: Sun, 30 Aug 2015 22:49:35 +0200
Subject: [PATCH] tests: avoid FP of ls/stat-free-color.sh with newer glibc
Since glibc-2.22, specifically commit [0], the opendir() implementation
implicitly makes an additional stat call thus leading to a FP.
Seen on openSUSE:Tumbleweed since snapshot 20150821.
[0]
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=46f894d8c60a
* tests/ls/stat-free-color.sh: Change the test to verify that ls(1)
needs the same number of stat-like calls for a single, empty directory
argument as for one with a few directory entries (sub-directory,
regular file, symlink, etc.).
---
tests/ls/stat-free-color.sh | 39 ++++++++++++++++++++++++---------------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
index fb2ee8b..35816a3 100755
--- a/tests/ls/stat-free-color.sh
+++ b/tests/ls/stat-free-color.sh
@@ -27,8 +27,6 @@ stats='stat,lstat,stat64,lstat64,newfstatat'
require_strace_ $stats
require_dirent_d_type_
-ln -s nowhere dangle || framework_failure_
-
# Disable enough features via LS_COLORS so that ls --color
# can do its job without calling stat (other than the obligatory
# one-call-per-command-line argument).
@@ -54,22 +52,33 @@ EOF
eval $(dircolors -b color-without-stat)
# The system may perform additional stat-like calls before main.
-# To avoid counting those, first get a baseline count by running
-# ls with only the --help option. Then, compare that with the
+# Furthermore, underlying library functions may also implicitly
+# add an extra stat call, e.g. opendir since glibc-2.21-360-g46f894d.
+# To avoid counting those, first get a baseline count for running
+# ls with one empty directory argument. Then, compare that with the
# invocation under test.
-strace -o log-help -e $stats ls --help >/dev/null || fail=1
-n_lines_help=$(wc -l < log-help)
+mkdir d || framework_failure_
+
+strace -o log1 -e $stats ls --color=always d || fail=1
+n_stat1=$(wc -l < log1) || framework_failure_
+
+test $n_stat1 = 0 \
+ && skip_ 'No stat calls recognized on this platform'
-strace -o log -e $stats ls --color=always . || fail=1
-n_lines=$(wc -l < log)
+# Populate the test directory.
+mkdir d/subdir \
+ && touch d/regf \
+ && ln d/regf d/hlink \
+ && ln -s regf d/slink \
+ && ln -s nowhere d/dangle \
+ || framework_failure_
-n_stat=$(expr $n_lines - $n_lines_help)
+# Invocation under test.
+strace -o log2 -e $stats ls --color=always d || fail=1
+n_stat2=$(wc -l < log2) || framework_failure_
-# Expect one stat call.
-case $n_stat in
- 0) skip_ 'No stat calls recognized on this platform' ;;
- 1) ;; # Corresponding to stat(".")
- *) fail=1; head -n30 log* ;;
-esac
+# Expect the same number of stat calls.
+test $n_stat1 = $n_stat2 \
+ || { fail=1; head -n30 log*; }
Exit $fail
--
2.4.1