Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package coreutils for openSUSE:Factory checked in at 2025-09-29 16:30:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/coreutils (Old) and /work/SRC/openSUSE:Factory/.coreutils.new.11973 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "coreutils" Mon Sep 29 16:30:37 2025 rev:166 rq:1307223 version:9.8 Changes: -------- --- /work/SRC/openSUSE:Factory/coreutils/coreutils.changes 2025-09-25 18:43:45.718320431 +0200 +++ /work/SRC/openSUSE:Factory/.coreutils.new.11973/coreutils.changes 2025-09-29 16:30:38.250419889 +0200 @@ -1,0 +2,7 @@ +Thu Sep 25 18:57:34 UTC 2025 - Bernhard Voelker <[email protected]> + +- coreutils-9.8-tail-large-num-of-files.patch: Add upstream patch: + https://cgit.git.sv.gnu.org/cgit/coreutils.git/commit/?id=914972e80dbf82aac9ffe + tail: fix tailing larger number of lines in regular files [rh#2398008] + +------------------------------------------------------------------- New: ---- coreutils-9.8-tail-large-num-of-files.patch ----------(New B)---------- New: - coreutils-9.8-tail-large-num-of-files.patch: Add upstream patch: https://cgit.git.sv.gnu.org/cgit/coreutils.git/commit/?id=914972e80dbf82aac9ffe ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ coreutils.spec ++++++ --- /var/tmp/diff_new_pack.1i1FRn/_old 2025-09-29 16:30:39.262462306 +0200 +++ /var/tmp/diff_new_pack.1i1FRn/_new 2025-09-29 16:30:39.270462642 +0200 @@ -62,6 +62,8 @@ # tests: skip tests/rm/ext3-perf.sh temporarily as it hangs on OBS. Patch810: coreutils-skip-tests-rm-ext3-perf.patch Patch900: coreutils-tests-workaround-make-fdleak.patch +# Upstream patch on top of v9.8 for 'tail -nN' for larger N; remove for >v9.8. +Patch910: coreutils-9.8-tail-large-num-of-files.patch BuildRequires: automake BuildRequires: gmp-devel @@ -163,6 +165,7 @@ %patch -P 810 %patch -P 900 +%patch -P 910 # ================================================ %build ++++++ coreutils-9.8-tail-large-num-of-files.patch ++++++ Upstream patch on top of v9.8 for 'tail -nN' for larger N. Remove for next release >v9.8 again. Tracked at Fedora as: rh#2398008 Upstream patch: https://cgit.git.sv.gnu.org/cgit/coreutils.git/commit/?id=914972e80dbf82aac9ffe3 tail: fix tailing larger number of lines in regular files * src/tail.c (file_lines): Seek to the previous block instead of the beginning (or a little before) of the block that was just scanned. Otherwise, the same block is read and scanned (at least partially) again. This bug was introduced by commit v9.7-219-g976f8abc1. * tests/tail/basic-seek.sh: Add a new test. * tests/local.mk: Reference the new test. * NEWS: mention the bug fix. Applied downstream/here without the NEWS entry: 'tail' outputs the correct number of lines again for non-small -n values. Previously it may have output too few lines. [bug introduced in coreutils-9.8] Index: src/tail.c =================================================================== --- src/tail.c.orig +++ src/tail.c @@ -596,7 +596,7 @@ file_lines (char const *prettyname, int goto free_buffer; } - pos = xlseek (fd, -bufsize, SEEK_CUR, prettyname); + pos = xlseek (fd, -(bufsize + bytes_read), SEEK_CUR, prettyname); bytes_read = read (fd, buffer, bufsize); if (bytes_read < 0) { Index: tests/local.mk =================================================================== --- tests/local.mk.orig +++ tests/local.mk @@ -179,6 +179,7 @@ all_tests = \ tests/tty/tty-eof.pl \ tests/misc/read-errors.sh \ tests/misc/write-errors.sh \ + tests/tail/basic-seek.sh \ tests/tail/inotify-hash-abuse.sh \ tests/tail/inotify-hash-abuse2.sh \ tests/tail/F-vs-missing.sh \ Index: tests/tail/basic-seek.sh =================================================================== --- /dev/null +++ tests/tail/basic-seek.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# Verify that tail works when seeking within a file + +# Copyright (C) 2025 Free Software Foundation, Inc. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src +print_ver_ tail + +yes '=================================' | + head -n1K > file.in || framework_failure_ + +# This returned 139 in coreutils v9.8 +test $(tail -n200 file.in | wc -l) = 200 || fail=1 + +Exit $fail
