Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package coreutils for openSUSE:Factory checked in at 2021-11-10 21:49:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/coreutils (Old) and /work/SRC/openSUSE:Factory/.coreutils.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "coreutils" Wed Nov 10 21:49:24 2021 rev:141 rq: version:8.32 Changes: -------- --- /work/SRC/openSUSE:Factory/coreutils/coreutils.changes 2021-11-08 17:24:54.812722042 +0100 +++ /work/SRC/openSUSE:Factory/.coreutils.new.1890/coreutils.changes 2021-11-10 21:49:26.651889790 +0100 @@ -2,184 +1,0 @@ -Mon Oct 4 22:15:01 UTC 2021 - Bernhard Voelker <m...@bernhard-voelker.de> - -- 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 <dmuel...@suse.com> - -- spec file cleanups (spec-cleaner run) - -------------------------------------------------------------------- -Thu Sep 30 18:41:30 UTC 2021 - Bernhard Voelker <m...@bernhard-voelker.de> - -- 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 <m...@bernhard-voelker.de> - -- 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. - -------------------------------------------------------------------- Old: ---- coreutils-9.0.tar.xz coreutils-9.0.tar.xz.sig coreutils-chmod-fix-exit-status-ign-symlinks.patch coreutils-skip-tests-rm-ext3-perf.patch New: ---- coreutils-8.32.tar.xz coreutils-8.32.tar.xz.sig 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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ coreutils.spec ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:27.307890077 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:27.311890078 +0100 @@ -1,5 +1,5 @@ # -# spec file +# spec file for package coreutils%{?name_suffix} # # Copyright (c) 2021 SUSE LLC # @@ -16,54 +16,27 @@ # +%bcond_with ringdisabled + # 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 %define flavor @BUILD_FLAVOR@%{nil} -%bcond_with ringdisabled %if "%{flavor}" != "" %define name_suffix -%{flavor} %if %{with ringdisabled} ExclusiveArch: do_not_build %endif %endif + Name: coreutils%{?name_suffix} -Version: 9.0 -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 -Patch16: coreutils-invalid-ids.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 -# Upstream patch - remove with version >9.0: -# chmod: fix exit status when ignoring symlinks -Patch800: coreutils-chmod-fix-exit-status-ign-symlinks.patch -# tests: skip tests/rm/ext3-perf.sh temporarily as it hangs on OBS. -Patch810: coreutils-skip-tests-rm-ext3-perf.patch +Version: 8.32 +Release: 0 + BuildRequires: automake BuildRequires: gmp-devel BuildRequires: libacl-devel @@ -73,7 +46,7 @@ BuildRequires: makeinfo BuildRequires: perl BuildRequires: xz -%if 0%{?suse_version} > 1320 +%if %{suse_version} > 1320 BuildRequires: gcc-PIE %endif %if "%{name}" == "coreutils-testsuite" @@ -87,13 +60,17 @@ BuildRequires: timezone # Some tests need the 'bin' user. BuildRequires: user(bin) -%ifarch %{ix86} x86_64 ppc ppc64 s390x armv7l armv7hl +%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} +%if 0%{?usrmerged} +Provides: /bin/mktemp +%endif Provides: sh-utils = %{version} Provides: stat = %{version} Provides: textutils = %{version} @@ -103,6 +80,73 @@ %endif %endif +# this will create a cycle, broken up randomly - coreutils is just +# too core to have other prerequisites. +#PreReq: permissions + +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +#cgit-URL: https://git.savannah.gnu.org/cgit/coreutils.git/ +#Git-Clone: git://git.sv.gnu.org/coreutils +# For upgrading the upstream version, increase the version number (above), +# then remove the old tarball and signature files and let OSC download +# those files of the new version: +# osc rm coreutils-*.tar.xz coreutils-*.tar.xz.sig +# osc service localrun download_files +# osc addremove +# Then adjust the downstream patches (using quilt). +# Finally, add a changelog entry and commit: +# osc vc +# osc ci + +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 +Patch16: coreutils-invalid-ids.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 + +# Upstream commits (squashed) after the release of coreutils-8.32: +# [PATCH 1/2] ls: restore 8.31 behavior on removed directories +# [PATCH 2/2] ls: improve removed-directory test +# Remove this patch with the next coreutils release. +Patch800: coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch + +Patch820: coreutils-gnulib-disable-test-float.patch + +# Avoid FP error in gnulib tests 'test-perror2' and 'test-strerror_r'. +Patch840: gnulib-test-avoid-FP-perror-strerror.patch + +# Upstream patch - remove with version >8.32: +# avoid FP error in 'tests/ls/stat-free-color.sh'. +Patch860: coreutils-tests-fix-FP-in-ls-stat-free-color.patch + # ================================================ %description These are the GNU core utilities. This package is the union of @@ -121,9 +165,9 @@ %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 +Supplements: (coreutils-single and patterns-base-documentation) +Supplements: (coreutils and patterns-base-documentation) BuildArch: noarch %description doc @@ -140,7 +184,7 @@ %patch8 %patch16 # -%if 0%{?suse_version} <= 1320 +%if %{suse_version} <= 1320 %patch100 %endif %patch112 @@ -148,7 +192,7 @@ %patch300 -%ifarch %{ix86} x86_64 ppc ppc64 +%ifarch %ix86 x86_64 ppc ppc64 %patch301 %endif @@ -158,14 +202,21 @@ %patch501 %patch800 -%patch810 + +%ifarch ppc ppc64le +# Disable gnulib test 'test-float' temporarily as it fails on ppc and ppc64le. +%patch820 +%endif + +%patch840 +%patch860 # ================================================ %build -%if 0%{?suse_version} >= 1200 +%if 0%{suse_version} >= 1200 AUTOPOINT=true autoreconf -fi %endif -export CFLAGS="%{optflags}" +export CFLAGS="%optflags" %configure --libexecdir=%{_libdir} \ --enable-install-program=arch \ --enable-no-install-program=kill \ @@ -177,12 +228,12 @@ DEFAULT_POSIX2_VERSION=200112 \ alternative=199209 -%make_build -C po update-po +make -C po update-po # Regenerate manpages touch man/*.x -%make_build all +make all %{?_smp_mflags} V=1 # make sure that parse-datetime.{c,y} ends up in debuginfo (rh#1555079) ln -v lib/parse-datetime.{c,y} . @@ -194,20 +245,31 @@ 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 check-very-expensive \ + make check-very-expensive \ && 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 + make check %endif # ================================================ %install %if "%{name}" == "coreutils" || "%{name}" == "coreutils-single" -make install DESTDIR=%{buildroot} pkglibexecdir=%{_libdir}/%{name} +make install DESTDIR="%buildroot" pkglibexecdir=%{_libdir}/%{name} +#UsrMerge +%if !0%{?usrmerged} +install -d %{buildroot}/bin +for i in arch basename cat chgrp chmod chown cp date dd df echo \ + false ln ls mkdir mknod mktemp mv pwd rm rmdir sleep sort stat \ + stty sync touch true uname readlink md5sum +do + ln -sf %{_bindir}/$i %{buildroot}/bin/$i +done +%endif +#EndUsrMerge echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1 %if "%{name}" == "coreutils" %find_lang coreutils @@ -238,17 +300,24 @@ %files %if "%{name}" == "coreutils" || "%{name}" == "coreutils-single" +%defattr(-,root,root) %license COPYING %doc NEWS README THANKS %{_bindir}/* +#UsrMerge +%if !0%{?usrmerged} +/bin/* +%endif +#EndUsrMerge %{_libdir}/%{name} %if "%{name}" == "coreutils" %files lang -f coreutils.lang +%defattr(-,root,root) %files doc -%{_infodir}/coreutils.info*.gz -%{_mandir}/man1/*.1%{?ext_man} +%doc %{_infodir}/coreutils.info*.gz +%doc %{_mandir}/man1/*.1.gz %endif %else ++++++ coreutils-9.0.tar.xz -> coreutils-8.32.tar.xz ++++++ ++++ 566409 lines of diff (skipped) ++++++ coreutils-disable_tests.patch ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:29.887891201 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:29.891891202 +0100 @@ -6,7 +6,7 @@ =================================================================== --- gnulib-tests/gnulib.mk.orig +++ gnulib-tests/gnulib.mk -@@ -1035,10 +1035,10 @@ EXTRA_DIST += test-getloadavg.c signatur +@@ -951,10 +951,10 @@ EXTRA_DIST += test-getloadavg.c signatur ## begin gnulib module getlogin-tests ++++++ coreutils-gnulib-disable-test-float.patch ++++++ Disable gnulib test 'test-float' temporarily as it fails on ppc and ppc64le. * gnulib-tests/gnulib.mk: Comment lines related to 'test-float'. --- 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 @@ -635,9 +635,10 @@ EXTRA_DIST += test-filevercmp.c macros.h ## begin gnulib module float-tests -TESTS += test-float -check_PROGRAMS += test-float -EXTRA_DIST += test-float.c macros.h +# Test fails with GCC-10 on ppc and ppc64le. +#TESTS += test-float +#check_PROGRAMS += test-float +#EXTRA_DIST += test-float.c macros.h ## end gnulib module float-tests ++++++ coreutils-i18n.patch ++++++ ++++ 932 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/coreutils/coreutils-i18n.patch ++++ and /work/SRC/openSUSE:Factory/.coreutils.new.1890/coreutils-i18n.patch ++++++ coreutils-invalid-ids.patch ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:29.923891216 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:29.923891216 +0100 @@ -19,7 +19,7 @@ =================================================================== --- src/chgrp.c.orig +++ src/chgrp.c -@@ -89,7 +89,7 @@ parse_group (char const *name) +@@ -89,7 +89,7 @@ parse_group (const char *name) { uintmax_t tmp; if (! (xstrtoumax (name, NULL, 10, &tmp, "") == LONGINT_OK ++++++ coreutils-ls-restore-8.31-behavior-on-removed-dirs.patch ++++++ Upstream commits (squashed) after the release of coreutils-8.32: [PATCH 1/2] ls: restore 8.31 behavior on removed directories [PATCH 2/2] ls: improve removed-directory test Remove this patch with the next coreutils release. Discussed at: https://lists.gnu.org/archive/html/bug-coreutils/2020-03/msg00008.html Upstream commits: https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=10fcb97 https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=672819c commit 672819c73f2e94e61386dc0584bddf9da860cc26 (HEAD -> master, origin/master, origin/HEAD) Author: Paul Eggert <egg...@cs.ucla.edu> Date: Sat Mar 7 10:29:51 2020 -0800 ls: improve removed-directory test * tests/ls/removed-directory.sh: Remove host_triplet test. Skip this test if one cannot remove the working directory. From a suggestion by Bernhard Voelker (Bug#39929). commit 10fcb97bd728f09d4a027eddf8ad2900f0819b0a Author: Paul Eggert <egg...@cs.ucla.edu> Date: Thu Mar 5 17:25:29 2020 -0800 ls: restore 8.31 behavior on removed directories * NEWS: Mention this. * src/ls.c: Do not include <sys/sycall.h> (print_dir): Don't worry about whether the directory is removed. * tests/ls/removed-directory.sh: Adjust to match new (i.e., old) behavior. --- NEWS | 9 +++++++++ src/ls.c | 22 ---------------------- tests/ls/removed-directory.sh | 23 ++++++----------------- 3 files changed, 15 insertions(+), 39 deletions(-) Index: NEWS =================================================================== --- NEWS.orig +++ NEWS @@ -1,5 +1,14 @@ GNU coreutils NEWS -*- outline -*- +* Noteworthy downstream changes (on top of upstream coreutils-8.32) + +** Changes in behavior + + On GNU/Linux systems, ls no longer issues an error message on + directory merely because it was removed. This reverts a change + that was made in release 8.32. + + * Noteworthy changes in release 8.32 (2020-03-05) [stable] ** Bug fixes Index: src/ls.c =================================================================== --- src/ls.c.orig +++ src/ls.c @@ -49,10 +49,6 @@ # include <sys/ptem.h> #endif -#ifdef __linux__ -# include <sys/syscall.h> -#endif - #include <stdio.h> #include <assert.h> #include <setjmp.h> @@ -2896,7 +2892,6 @@ print_dir (char const *name, char const struct dirent *next; uintmax_t total_blocks = 0; static bool first = true; - bool found_any_entries = false; errno = 0; dirp = opendir (name); @@ -2972,7 +2967,6 @@ print_dir (char const *name, char const next = readdir (dirp); if (next) { - found_any_entries = true; if (! file_ignored (next->d_name)) { enum filetype type = unknown; @@ -3018,22 +3012,6 @@ print_dir (char const *name, char const if (errno != EOVERFLOW) break; } -#ifdef __linux__ - else if (! found_any_entries) - { - /* If readdir finds no directory entries at all, not even "." or - "..", then double check that the directory exists. */ - if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1 - && errno != EINVAL) - { - /* We exclude EINVAL as that pertains to buffer handling, - and we've passed NULL as the buffer for simplicity. - ENOENT is returned if appropriate before buffer handling. */ - file_failure (command_line_arg, _("reading directory %s"), name); - } - break; - } -#endif else break; Index: tests/ls/removed-directory.sh =================================================================== --- tests/ls/removed-directory.sh.orig +++ tests/ls/removed-directory.sh @@ -1,7 +1,7 @@ #!/bin/sh -# If ls is asked to list a removed directory (e.g. the parent process's -# current working directory that has been removed by another process), it -# emits an error message. +# If ls is asked to list a removed directory (e.g., the parent process's +# current working directory has been removed by another process), it +# should not emit an error message merely because the directory is removed. # Copyright (C) 2020 Free Software Foundation, Inc. @@ -21,25 +21,14 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ ls -case $host_triplet in - *linux*) ;; - *) skip_ 'non linux kernel' ;; -esac - -LS_FAILURE=2 - -cat <<\EOF >exp-err || framework_failure_ -ls: reading directory '.': No such file or directory -EOF - cwd=$(pwd) mkdir d || framework_failure_ cd d || framework_failure_ -rmdir ../d || framework_failure_ +rmdir ../d || skip_ "can't remove working directory on this platform" -returns_ $LS_FAILURE ls >../out 2>../err || fail=1 +ls >../out 2>../err || fail=1 cd "$cwd" || framework_failure_ compare /dev/null out || fail=1 -compare exp-err err || fail=1 +compare /dev/null err || fail=1 Exit $fail ++++++ coreutils-misc.patch ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:29.939891223 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:29.939891223 +0100 @@ -37,7 +37,7 @@ =================================================================== --- tests/misc/help-version.sh.orig +++ tests/misc/help-version.sh -@@ -240,6 +240,7 @@ parted_setup () { args="-s $tmp_in mklab +@@ -239,6 +239,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 @@ -58,4 +58,4 @@ + if test -z "$other_partition_tmpdir"; then skip_ \ - "requires a writable directory on a different file system, + "requires a writable directory on a different disk partition, ++++++ coreutils-remove_hostname_documentation.patch ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:29.947891227 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:29.951891229 +0100 @@ -31,7 +31,7 @@ * hostid invocation:: Print numeric host identifier * uptime invocation:: Print system uptime and load -@@ -15947,7 +15945,6 @@ information. +@@ -15761,7 +15759,6 @@ information. * arch invocation:: Print machine hardware name. * nproc invocation:: Print the number of processors. * uname invocation:: Print system information. @@ -39,7 +39,7 @@ * hostid invocation:: Print numeric host identifier. * uptime invocation:: Print system uptime and load. @end menu -@@ -16804,15 +16801,6 @@ Note this is non-portable (even across G +@@ -16623,15 +16620,6 @@ Note this is non-portable (even across G Print the machine hardware name (sometimes called the hardware class or hardware type). @@ -55,7 +55,7 @@ @item -p @itemx --processor @opindex -p -@@ -16866,34 +16854,6 @@ Print the kernel version. +@@ -16685,34 +16673,6 @@ Print the kernel version. @exitstatus ++++++ coreutils-remove_kill_documentation.patch ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:29.959891232 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:29.959891232 +0100 @@ -33,9 +33,9 @@ Delaying * sleep invocation:: Delay for a specified time -@@ -18310,90 +18304,6 @@ timeout -s INT 5s env --ignore-signal=IN - timeout -s INT -k 3s 5s env --ignore-signal=INT sleep 20 - @end example +@@ -18089,90 +18083,6 @@ the exit status of @var{command} otherwi + @end display + -@node Process control -@chapter Process control ++++++ coreutils-skip-gnulib-test-tls.patch ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:29.971891237 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:29.971891237 +0100 @@ -21,7 +21,7 @@ =================================================================== --- gnulib-tests/gnulib.mk.orig +++ gnulib-tests/gnulib.mk -@@ -2615,9 +2615,10 @@ EXTRA_DIST += test-timespec.c macros.h +@@ -2485,9 +2485,10 @@ EXTRA_DIST += test-timespec.c macros.h ## begin gnulib module tls-tests ++++++ coreutils-tests-fix-FP-in-ls-stat-free-color.patch ++++++ Upstream patch to avoid FP in testsuite. Remove with coreutils version > 8.32. Discussed at: https://lists.gnu.org/r/coreutils/2021-04/msg00050.html Upstream patch: https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=b7091093bb >From b7091093bb6505c33279f9bc940b2e94763a6e5d Mon Sep 17 00:00:00 2001 From: Bernhard Voelker <m...@bernhard-voelker.de> Date: Wed, 21 Apr 2021 00:12:00 +0200 Subject: [PATCH] tests: fix FP in ls/stat-free-color.sh On newer systems like Fedora 34 and openSUSE Tumbleweed, ls(1) calls newfstatat(STDOUT_FILENO, ...), but only when there is something to output. * tests/ls/stat-free-color.sh: Add -a option to the reference invocation of ls, thus enforcing something gets output. --- tests/ls/stat-free-color.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Index: tests/ls/stat-free-color.sh =================================================================== --- tests/ls/stat-free-color.sh.orig +++ tests/ls/stat-free-color.sh @@ -56,12 +56,14 @@ eval $(dircolors -b color-without-stat) # The system may perform additional stat-like calls before main. # 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. +# Finally, ls(1) makes a stat call for stdout, but only in the case +# when there is something to output. +# To get the comparison right, first get a baseline count for running +# 'ls -a' with one empty directory argument. Then, compare that with +# the invocation under test. mkdir d || framework_failure_ -strace -q -o log1 -e $stats ls --color=always d || fail=1 +strace -q -o log1 -e $stats ls -a --color=always d || fail=1 n_stat1=$(grep -vF '+++' log1 | wc -l) || framework_failure_ test $n_stat1 = 0 \ ++++++ coreutils-tests-shorten-extreme-factor-tests.patch ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:29.991891246 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:29.995891248 +0100 @@ -16,7 +16,7 @@ =================================================================== --- tests/local.mk.orig +++ tests/local.mk -@@ -733,14 +733,9 @@ all_tests = \ +@@ -723,14 +723,9 @@ all_tests = \ # See tests/factor/create-test.sh. tf = tests/factor factor_tests = \ ++++++ coreutils-use-python3.patch ++++++ --- /var/tmp/diff_new_pack.q19MKx/_old 2021-11-10 21:49:30.003891251 +0100 +++ /var/tmp/diff_new_pack.q19MKx/_new 2021-11-10 21:49:30.007891253 +0100 @@ -1,6 +1,4 @@ -Index: tests/du/move-dir-while-traversing.sh -=================================================================== ---- tests/du/move-dir-while-traversing.sh.orig +--- tests/du/move-dir-while-traversing.sh +++ tests/du/move-dir-while-traversing.sh @@ -20,9 +20,9 @@ print_ver_ du @@ -15,7 +13,7 @@ # 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 \ +@@ -33,7 +33,7 @@ # rename syscall before du finishes processing the subtree under D/. cat <<'EOF' > inotify-watch-for-dir-access.py ++++++ gnulib-test-avoid-FP-perror-strerror.patch ++++++ Avoid false-positive error in gnulib tests 'test-perror2' and 'test-strerror_r'. On openSUSE OBS, the above gnulib tests fail on armv7l. Corresponding report on the gnulib mailing list: https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html From: Florian Weimer Date: Thu, 27 Aug 2020 09:41:34 +0200 Subject: Use-after-free in test-perror2, test-strerror_r The problem is visible with glibc 2.32 under valgrind: ==20== Invalid read of size 1 ==20== at 0x483DAB4: strcmp (vg_replace_strmem.c:847) ==20== by 0x109414: main (test-perror2.c:84) ==20== Address 0x4a1a3d0 is 0 bytes inside a block of size 17 free'd ==20== at 0x483A9F5: free (vg_replace_malloc.c:538) ==20== by 0x48E2134: strerror_l (in /usr/lib64/libc-2.32.so) ==20== by 0x109328: main (test-perror2.c:72) ==20== Block was alloc'd at ==20== at 0x4839809: malloc (vg_replace_malloc.c:307) ==20== by 0x48CA03F: __vasprintf_internal (in /usr/lib64/libc-2.32.so) ==20== by 0x48A46F9: asprintf (in /usr/lib64/libc-2.32.so) ==20== by 0x48E2184: strerror_l (in /usr/lib64/libc-2.32.so) ==20== by 0x1092E2: main (test-perror2.c:67) ==20== ==20== Invalid read of size 1 ==20== at 0x483DAC8: strcmp (vg_replace_strmem.c:847) ==20== by 0x109414: main (test-perror2.c:84) ==20== Address 0x4a1a3d1 is 1 bytes inside a block of size 17 free'd ==20== at 0x483A9F5: free (vg_replace_malloc.c:538) ==20== by 0x48E2134: strerror_l (in /usr/lib64/libc-2.32.so) ==20== by 0x109328: main (test-perror2.c:72) ==20== Block was alloc'd at ==20== at 0x4839809: malloc (vg_replace_malloc.c:307) ==20== by 0x48CA03F: __vasprintf_internal (in /usr/lib64/libc-2.32.so) ==20== by 0x48A46F9: asprintf (in /usr/lib64/libc-2.32.so) ==20== by 0x48E2184: strerror_l (in /usr/lib64/libc-2.32.so) ==20== by 0x1092E2: main (test-perror2.c:67) I think it's the test that's invalid. This was reported as an actual grep test failure (without valgrind) on 32-bit Arm, where glibc malloc happens to return a different buffer address for the internal allocation (so that msg3 != msg4). test-strerror_r has the same issue. Thanks, Florian Upstream patch: https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=175e0bc72808 From 175e0bc72808d564074c4adcc72aeadb74adfcc6 Mon Sep 17 00:00:00 2001 From: Paul Eggert <egg...@cs.ucla.edu> Date: Thu, 27 Aug 2020 17:52:58 -0700 Subject: [PATCH] perror, strerror_r: remove unportable tests Problem reported by Florian Weimer in: https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html * tests/test-perror2.c (main): * tests/test-strerror_r.c (main): Omit unportable tests. This downstream patch is identical to upstream one modulo the ChangeLog entry. --- gnulib-tests/test-perror2.c | 3 --- gnulib-tests/test-strerror_r.c | 3 --- 2 files changed, 6 deletions(-) Index: gnulib-tests/test-perror2.c =================================================================== --- gnulib-tests/test-perror2.c.orig +++ gnulib-tests/test-perror2.c @@ -79,9 +79,6 @@ main (void) errno = -5; perror (""); ASSERT (!ferror (stderr)); - ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); - ASSERT (msg2 == msg4 || STREQ (msg2, str2)); - ASSERT (msg3 == msg4 || STREQ (msg3, str3)); ASSERT (STREQ (msg4, str4)); free (str1); Index: gnulib-tests/test-strerror_r.c =================================================================== --- gnulib-tests/test-strerror_r.c.orig +++ gnulib-tests/test-strerror_r.c @@ -165,9 +165,6 @@ main (void) strerror_r (EACCES, buf, sizeof buf); strerror_r (-5, buf, sizeof buf); - ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); - ASSERT (msg2 == msg4 || STREQ (msg2, str2)); - ASSERT (msg3 == msg4 || STREQ (msg3, str3)); ASSERT (STREQ (msg4, str4)); free (str1);