bug#79410: Error in expr match handling patterns with null expression subpatterns

2025-09-08 Thread Paul Eggert
On 2025-09-08 10:05, Michael Figiel via GNU coreutils Bug Reports wrote: The expected behaviour is on FreeBSD and OpenBSD, so different code base, but I think it's more consistent with the POSIX description of expr. My reading of POSIX is that the GNU behavior is required and the Fr

bug#70411: [bug] install(1) fails to read /dev/stdin on Darwin

2025-09-07 Thread Collin Funk
Sergei Trofimovich writes: >> > > This is a kernel bug in macOS. Can you report it or otherwise >> > > arrange to have the kernel bug fixed? I expect that you have >> > > better connections with Apple than I do. A proposed patch >> > > (relat

bug#79301: fold-spaces test failure

2025-09-07 Thread Collin Funk
am confident it will fix the others. Closing this bug report. Collin >From 24fb014092ba8d831c25cd8757a6a738927bb743 Mon Sep 17 00:00:00 2001 Message-ID: <24fb014092ba8d831c25cd8757a6a738927bb743.1757040561.git.collin.fu...@gmail.com> From: Collin Funk Date: Thu, 4 Sep 2025 19:30:00

bug#70411: [bug] install(1) fails to read /dev/stdin on Darwin

2025-09-07 Thread Sergei Trofimovich
e number, > > > which is what we want. So that's not indicating any problem. > > > > > > > > > Oh, I see the problem now. For a socket or pipe, macOS fstat > > > returns the full 64-bit inode number, whereas macOS stat returns > > > only

bug#70411: [bug] install(1) fails to read /dev/stdin on Darwin

2025-09-07 Thread Alejandro Colomar via GNU coreutils Bug Reports
ze field, and a unique device and inode > > > number. > > > > The BUGS note simply means that a pipe has a unique inode number, which > > is what we want. So that's not indicating any problem. > > > > > > Oh, I see the problem now. For a socket o

bug#79300: fold-nbsp test failure

2025-09-06 Thread Collin Funk
Bruno Haible writes: >> P.S. I actually just noticed this unchanged hunk in my diff: >> >> $ git ls-files | grep -E '\.[ch]' | xargs grep -F 'isw' >> src/wc.c: in_word2 = (! iswspace (wide_char) >> >> Okay to change this one to the c32 variant? > > Yes. Since 'wide_char' is

bug#79301: fold-spaces test failure

2025-09-05 Thread Bruno Haible via GNU coreutils Bug Reports
Collin Funk wrote: > I pushed the attached patch. Tested > in an alpine container, but I am confident it will fix the > others. Confirmed: The CI builds on Alpine Linux, macOS 15, FreeBSD 15 succeed now. Bruno

bug#79301: fold-spaces test failure

2025-09-04 Thread Pádraig Brady
ith a fold-nbsp failure (bug #79300), not a fold-spaces failure. As of today, the failures on macOS 13 and 14 are fixed. The failures on - Alpine Linux, - macOS 15, - FreeBSD 14 are still present in today's CI run. Yep, I was planning on fixing this one next. So them failing is exp

bug#79300: fold-nbsp test failure

2025-09-04 Thread Bruno Haible via GNU coreutils Bug Reports
Hi Collin, > Pushed the attatched two patches. The second fixes a 'make syntax-check' > failure. Will close this bug now. Thanks. I confirm (via today's CI run) that bug #79300 is fixed. > P.S. I actually just noticed this unchanged hunk in my diff: > > $

bug#79301: fold-spaces test failure

2025-09-04 Thread Collin Funk
Bruno Haible writes: > On 2025-08-24 I wrote: >> Today's CI reports a test failure >> FAIL: tests/fold/fold-spaces >> on several systems: >> - Alpine Linux, >> - macOS 13..15, >> - FreeBSD 14. > > Sorry for the incorrect reporting: macO

bug#79301: fold-spaces test failure

2025-09-04 Thread Bruno Haible via GNU coreutils Bug Reports
Hi, On 2025-08-24 I wrote: > Today's CI reports a test failure > FAIL: tests/fold/fold-spaces > on several systems: > - Alpine Linux, > - macOS 13..15, > - FreeBSD 14. Sorry for the incorrect reporting: macOS 13 and 14 failed with a fold-nbsp failure (bug #79

bug#79300: fold-nbsp test failure

2025-09-03 Thread Collin Funk
but name it maybe_c32isnbspace(). Since I don't want the function to be misunderstood as a wchar_t function. Pushed the attatched two patches. The second fixes a 'make syntax-check' failure. Will close this bug now. Collin P.S. I actually just noticed this unchanged hunk in my

bug#79381: patch needed after gnulib changed

2025-09-03 Thread Paul Eggert
Thanks, I installed that and am closing the bug report.

bug#79381: patch needed after gnulib changed

2025-09-03 Thread Bruno Haible via GNU coreutils Bug Reports
Hi, There was a change today in gnulib, that requires a small change in packages that use gnulib-tool --with-tests with --makefile-name. GNU coreutils is one such package. Currently, './bootstrap' fails like this: ... autoreconf: running: automake --add-missing --copy --force-missing gnulib-tests

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-09-03 Thread Paul Eggert
Closing the bug report.From c6397d08725e651fe81fbbd91df2043674206865 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Sep 2025 09:55:29 -0700 Subject: [PATCH] df: pacify static analysis Problem reported by Yubiao Hu <https://bugs.gnu.org/79336>. * src/df.c (get_dev): Assume MOUNT_P

bug#79300: fold-nbsp test failure

2025-09-03 Thread Pádraig Brady
On 03/09/2025 05:04, Collin Funk wrote: Pádraig Brady writes: Thanks, I forgot about that function. That sounds like a good idea to me. We can be nice to people who do not use glibc. We will have to hoist the 'posixly_correct' check out of it before though. Technically POSIX says that 'fold -s

bug#79369: seq generates wrong sequences for big numbers

2025-09-02 Thread Collin Funk
Pádraig Brady writes: >> We can improve for the above 2 cases anyway, >> with something like the attached. >> Large magnitude negative start values are still problematic. > > Ok I pushed that with a test > included:https://github.com/coreutils/coreutils/commit/701416709 > Marking this as done.

bug#79300: fold-nbsp test failure

2025-09-02 Thread Collin Funk
Pádraig Brady writes: >> Thanks, I forgot about that function. That sounds like a good idea >> to >> me. We can be nice to people who do not use glibc. >> We will have to hoist the 'posixly_correct' check out of it before >> though. Technically POSIX says that 'fold -s' should only break at >> c

bug#79369: seq generates wrong sequences for big numbers

2025-09-02 Thread Pádraig Brady
On 02/09/2025 16:52, Pádraig Brady wrote: On 02/09/2025 13:11, ondra007@seznam.cz wrote: It looks like seq for integers bigger than 2^64 sometimes generate wrong results. There are few examples of wrong output I have found: $ seq 18446744073709551617 inf | head -3 18446744073709551616 184

bug#79369: seq generates wrong sequences for big numbers

2025-09-02 Thread Pádraig Brady
On 02/09/2025 13:11, ondra007@seznam.cz wrote: It looks like seq for integers bigger than 2^64 sometimes generate wrong results. There are few examples of wrong output I have found: $ seq 18446744073709551617 inf | head -3 18446744073709551616 18446744073709551617 18446744073709551618

bug#79369: seq generates wrong sequences for big numbers

2025-09-02 Thread ondra007.tom
999731564544 999731564545 999731564546 $  seq -1 0 | head -3 -1 -1 -1 It is similar to bug #75994 which reports the same issue but only for

bug#79366: paste -d option not accepting UTF-8

2025-09-01 Thread Collin Funk
avidseeker via GNU coreutils Bug Reports writes: > $ paste -d "␞" file1 file2 > > results in ␞ (U+241e) character being converted to � (U+FFFD) > > paste command doesn't seem to support UTF-8 characters. Thanks for the report. This is a long standing issue with mor

bug#79366: paste -d option not accepting UTF-8

2025-09-01 Thread avidseeker via GNU coreutils Bug Reports
$ paste -d "␞" file1 file2 results in ␞ (U+241e) character being converted to � (U+FFFD) paste command doesn't seem to support UTF-8 characters. Regards, Avid

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-09-01 Thread yubiao hu
> On 8/31/25 18:58, yubiao hu wrote: >> Yes, this bug was identified via static code analysis. The initial >> finding that core dump would occur in `cell = xstrdup (mount_point);` >> when mount_point is NULL. > > It appears that the static analysis is reporting a fal

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-08-31 Thread Paul Eggert
On 8/31/25 18:58, yubiao hu wrote: Yes, this bug was identified via static code analysis. The initial finding that core dump would occur in `cell = xstrdup (mount_point);` when mount_point is NULL. It appears that the static analysis is reporting a false positive. Which static analyzer are

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-08-31 Thread yubiao hu
> On 29/08/2025 02:45, yubiao hu wrote: >> * src/df.c (get_dev): Fix potential null pointer dereference >> - Avoid dereferencing stat_file when both device and >> mount_point are NULL >> - Handle allocation failure for cell when mount_point >> is NULL > > These are valid concerns. > I also see

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-08-31 Thread yubiao hu
Why is this patch needed? Can you give an example df invocation in which > mount_point is null there? As far as I can see, that cannot happen. > > Did your bug report come from static analysis? If so, which static > analyzer did you use and how did you use it? Does the attached patc

bug#79347: Bad formatting for ls with block-size 'k

2025-08-31 Thread Pádraig Brady
strings appropriately. Instead work out the padding required and use: printf("%*s%s", padding, "", string) to pad multi-byte appropriately. * NEWS: Mention the bug fix. --- NEWS | 4 src/ls.c | 16 2 files changed, 16 insertions(+), 4 deletions(-)

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-08-30 Thread Pádraig Brady
On 30/08/2025 18:52, Pádraig Brady wrote: On 29/08/2025 02:45, yubiao hu wrote: * src/df.c (get_dev): Fix potential null pointer dereference - Avoid dereferencing stat_file when both device and mount_point are NULL - Handle allocation failure for cell when mount_point is NULL These are v

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-08-30 Thread Collin Funk
Paul Eggert writes: > On 2025-08-28 18:45, yubiao hu wrote: >> * src/df.c (get_dev): Fix potential null pointer dereference >> - Avoid dereferencing stat_file when both device and >> mount_point are NULL >> - Handle allocation failure for cell when mount_point >> is NULL > > Why is this patch

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-08-30 Thread Pádraig Brady
On 29/08/2025 02:45, yubiao hu wrote: * src/df.c (get_dev): Fix potential null pointer dereference - Avoid dereferencing stat_file when both device and mount_point are NULL - Handle allocation failure for cell when mount_point is NULL These are valid concerns. I also see potential null dere

bug#79347: Bad formatting for ls with block-size 'k

2025-08-30 Thread Peter Laan
Hi, I'm a GNU/Linux noob so maybe I'm doing something wrong. But see the attached image for badly formatted output from ls -s1 --block-size=\'k. The columns are not always aligned. This only happens when you have large files in the directory. Everything looks fine with --block-size=k. I'm running

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-08-30 Thread Paul Eggert
invocation in which mount_point is null there? As far as I can see, that cannot happen. Did your bug report come from static analysis? If so, which static analyzer did you use and how did you use it? Does the attached patch pacify your static analyzer? From

bug#79300: fold-nbsp test failure

2025-08-30 Thread Pádraig Brady
On 30/08/2025 04:27, Collin Funk wrote: Pádraig Brady writes: Thanks for the suggestion, but that doesn't work. Any issue with skipping based on $host_os for this test and for fold-spaces.sh? I was thinking of testing "printf '\u00A0' | ./src/tr -d '[:blank:]'" but that won't work since 'tr' o

bug#79336: [PATCH] df: fix potential null pointer dereference

2025-08-30 Thread yubiao hu
* src/df.c (get_dev): Fix potential null pointer dereference - Avoid dereferencing stat_file when both device and mount_point are NULL - Handle allocation failure for cell when mount_point is NULL --- src/df.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) d

bug#79300: fold-nbsp test failure

2025-08-30 Thread Collin Funk
Pádraig Brady writes: >> Thanks for the suggestion, but that doesn't work. Any issue with >> skipping based on $host_os for this test and for fold-spaces.sh? >> I was thinking of testing "printf '\u00A0' | ./src/tr -d >> '[:blank:]'" >> but that won't work since 'tr' operates on bytes and U+00A0

bug#79300: fold-nbsp test failure

2025-08-30 Thread Pádraig Brady
On 29/08/2025 05:23, Collin Funk wrote: Pádraig Brady writes: Perhaps the techniques from tests/wc/wc-nbsp.sh could be used? Maybe something like: check_space() { char="$1" # Use -L to determine whether NBSP is printable. # FreeBSD 11 and OS X treat NBSP as non printable ? test "$

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-30 Thread Martin D Kealey
On Tue, 26 Aug 2025, 07:15 James Feeney, wrote: > Hey Martin > > On Mon, 2025-08-25 at 20:10 +1000, Martin D Kealey wrote: > > TL;DR locale and timezone are independent; neither implies the other. > > Thanks for your note. Short version: your point is taken, and I submit a > revised argument, an

bug#79300: fold-nbsp test failure

2025-08-30 Thread Collin Funk
Pádraig Brady writes: > Perhaps the techniques from tests/wc/wc-nbsp.sh could be used? > Maybe something like: > > check_space() { > char="$1" > # Use -L to determine whether NBSP is printable. > # FreeBSD 11 and OS X treat NBSP as non printable ? > test "$(env printf "=$char=" | wc -L)"

bug#79300: fold-nbsp test failure

2025-08-30 Thread Collin Funk
Bruno Haible writes: > Collin Funk wrote: >> My initial idea was to check if U+2007 FIGURE SPACE and U+00A0 NO-BREAK >> SPACE are blank using grep. But apparently Solaris grep does not handle >> multibyte characters. Therefore, FIGURE SPACE cannot be checked. :( > > I'm not sure we are talking ab

bug#79331: [PATCH] expr: fix memory leaks

2025-08-28 Thread yubiao hu
fix: https://lists.gnu.org/archive/html/bug-coreutils/2025-08/msg00094.html --- src/expr.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/expr.c b/src/expr.c index cd87763..534bb44 100644 --- a/src/expr.c +++ b/src/expr.c @@ -93,6 +93,7 @@ static VALUE *eval (bool

bug#79328: expr: memory not freed before program exit(memory leak)

2025-08-28 Thread Paul Eggert
On 2025-08-28 01:08, Collin Funk wrote: Most (all?) of the programs in Coreutils will not free memory before exit, since it just takes extra time for no benefit. Not only does it take extra time (and sometimes even space!), it makes the programs slightly less reliable because if there are bugs

bug#79328: expr: memory not freed before program exit(memory leak)

2025-08-28 Thread Collin Funk
Hi, yubiao hu writes: > Package: coreutils > Version: 9.4 > Severity: normal > > I was trying to build coreutils with ASan, and found a memory leak in expr. > > When running: > expr length "hello" > > Output: > = > ==755058==ERROR:

bug#79328: expr: memory not freed before program exit(memory leak)

2025-08-28 Thread yubiao hu
Package: coreutils Version: 9.4 Severity: normal I was trying to build coreutils with ASan, and found a memory leak in expr. When running: expr length "hello" Output: = ==755058==ERROR: LeakSanitizer: detected memory leaks Direct

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-26 Thread Paul Eggert
On 8/26/25 08:43, James Feeney wrote: Your definition of "longstanding" seems a bit disingenuous, since this change, from the default POSIX `date -u` 24 hour format to the 12 hour format, was made in 2020 ? No it wasn't. I just now ran 'date -u' from the coreutils 5.93 (2005) shipped with Sol

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-26 Thread James Feeney via GNU coreutils Bug Reports
On Mon, 2025-08-25 at 15:20 -0700, Paul Eggert wrote: > > > > Are you inclined to accept the time format of ISO 8601 for the display of > > UTC - or no? > > We should not change the behavior of plain 'date -u' based on any > arguments presented so far in this thread. The current behavior is >

bug#79300: fold-nbsp test failure

2025-08-26 Thread Bruno Haible via GNU coreutils Bug Reports
Collin Funk wrote: > My initial idea was to check if U+2007 FIGURE SPACE and U+00A0 NO-BREAK > SPACE are blank using grep. But apparently Solaris grep does not handle > multibyte characters. Therefore, FIGURE SPACE cannot be checked. :( I'm not sure we are talking about the same thing. I reported

bug#79300: fold-nbsp test failure

2025-08-26 Thread Pádraig Brady
On 26/08/2025 03:24, Collin Funk wrote: Bruno Haible via GNU coreutils Bug Reports writes: Today's CI run reports FAIL: tests/fold/fold-nbsp on NetBSD 10 and Solaris 11.4. The log output in both cases is: FAIL: tests/fold/fold-nbsp == --- exp12025-

bug#79300: fold-nbsp test failure

2025-08-25 Thread Collin Funk
Bruno Haible via GNU coreutils Bug Reports writes: > Today's CI run reports > FAIL: tests/fold/fold-nbsp > on NetBSD 10 and Solaris 11.4. > > The log output in both cases is: > > FAIL: tests/fold/fold-nbsp > == > > --- exp1

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-25 Thread Paul Eggert
On 2025-08-25 14:15, James Feeney via GNU coreutils Bug Reports wrote: For anyone inclined to accept my appeal to ISO 8601, the current display format returned by `date -u`, especially within the USA, is wrong, and that is a bug that needs to be fixed. Are you inclined to accept the time

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-25 Thread James Feeney via GNU coreutils Bug Reports
Hey Martin On Mon, 2025-08-25 at 20:10 +1000, Martin D Kealey wrote: > Hi James > > On Mon, 25 Aug 2025, 07:33 James Feeney via GNU coreutils Bug Reports, > wrote: > > it must also be noted that "UTC" is in *Great Britain*,  > > To be honest, referring to U

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-25 Thread Jeremy Allison via GNU coreutils Bug Reports
AYS. > > Not quite following but I hope the comment is OK now with the first > patch installed. > > > squashfs is giving the wrong info here after all, > > right? > > Yes, that's the actual space-performance bug here. I installed the > second attached patch to try to work around it. > > Jeremy, can you please try these two further patches? Thanks.

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-24 Thread Paul Eggert
On 2025-08-24 14:33, James Feeney via GNU coreutils Bug Reports wrote: reporting UTC in 12 hour format is just plain wrong. No it's fine, actually. UTC is a world-wide standard; it's not local to Greenwich. Many people prefer 12-hour format, and there's nothing wrong with disp

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-24 Thread James Feeney via GNU coreutils Bug Reports
d *not* "Mountain Daylight Time", in 12 hour format. We note that `man 1 date` explicitly says that `date -u` will display "UTC" time: -u, --utc, --universal print or set Coordinated Universal Time (UTC) ---- It never occurred to me that UTC could ever b

bug#79301: fold-spaces test failure

2025-08-24 Thread Bruno Haible via GNU coreutils Bug Reports
[CCing bug-gnulib] Collin Funk wrote: > On Alpine this is because iswblank in UTF-8 locales is the same as > isblank in the C locale. This means it only returns 1 for U+0009 TAB and > U+0020 SPACE. It is allowed to behave this way. https://pubs.opengroup.org/onlinepubs/9799919799.20

bug#79301: fold-spaces test failure

2025-08-24 Thread Collin Funk
Bruno Haible via GNU coreutils Bug Reports writes: > Today's CI reports a test failure > FAIL: tests/fold/fold-spaces > on several systems: > - Alpine Linux, > - macOS 13..15, > - FreeBSD 14. > > Here are the relevant parts of the log files. Thanks. On Al

bug#79299: nproc-quota test failure

2025-08-24 Thread Collin Funk
Bruno Haible writes: > Collin Funk wrote: >> The CentOS 7 one fails because SCHED_DEADLINE is not defined by >> sched.h. But it is defined in linux/sched.h. The second patch, which is >> for Gnulib, fixed it in my CentOS 7 container. > > This patch would be fine to apply in Gnulib, except that th

bug#79299: nproc-quota test failure

2025-08-24 Thread Bruno Haible via GNU coreutils Bug Reports
Collin Funk wrote: > The CentOS 7 one fails because SCHED_DEADLINE is not defined by > sched.h. But it is defined in linux/sched.h. The second patch, which is > for Gnulib, fixed it in my CentOS 7 container. This patch would be fine to apply in Gnulib, except that the rationale (why do we include

bug#79299: nproc-quota test failure

2025-08-24 Thread Pádraig Brady
On 24/08/2025 10:56, Collin Funk wrote: Bruno Haible via GNU coreutils Bug Reports writes: Today's CI run produces a FAIL: tests/nproc/nproc-quota on CentOS 7 and on Alpine Linux. Here are the two relevant log file portions. Thanks. The Alpine one fails because sched_getscheduler

bug#79299: nproc-quota test failure

2025-08-24 Thread Collin Funk
Bruno Haible via GNU coreutils Bug Reports writes: > Today's CI run produces a > FAIL: tests/nproc/nproc-quota > on CentOS 7 and on Alpine Linux. > > Here are the two relevant log file portions. Thanks. The Alpine one fails because sched_getscheduler is a stub that always

bug#79301: fold-spaces test failure

2025-08-24 Thread Bruno Haible via GNU coreutils Bug Reports
Today's CI reports a test failure FAIL: tests/fold/fold-spaces on several systems: - Alpine Linux, - macOS 13..15, - FreeBSD 14. Here are the relevant parts of the log files. Alpine Linux: FAIL: tests/fold/fold-spaces + initial_cwd_=/work/coreutils-2025-08-

bug#79300: fold-nbsp test failure

2025-08-24 Thread Bruno Haible via GNU coreutils Bug Reports
e the   character has been treated like a space. If you need a correction at the Gnulib level (in the functions iswblank, iswspace, c32isblank, or c32isspace), please report this to bug-gnulib. Alternatively, you may declare this a "quality of implementation" issue and simply disable the test on Net

bug#79299: nproc-quota test failure

2025-08-24 Thread Bruno Haible via GNU coreutils Bug Reports
Today's CI run produces a FAIL: tests/nproc/nproc-quota on CentOS 7 and on Alpine Linux. Here are the two relevant log file portions. CentOS 7: FAIL: tests/nproc/nproc-quota = ++ initial_cwd_=/work/coreutils-2025-08-24/build +++ testdir_prefix_ +++ printf gt ++ pf

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-23 Thread Paul Eggert
On 2025-08-23 11:46, Phillip Lougher wrote: As far as Squashfs is concerned SEEK_HOLE/SEEK_DATA is easy to implement.  So I'll think about adding it as a build option. Thanks, that'll be helpful. But this isn't going to fix it for any other case. Right, and bleeding-edge coreutils already h

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-23 Thread Paul Eggert
On 2025-08-23 11:27, Phillip Lougher wrote: Yeah let's take the attitude everyone writes well written programs, and if they don't it's their fault when they unexpectedly break in production. In reality a lot of code in embedded Linux systems is dreadful, written by inexperienced programmers

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-23 Thread Phillip Lougher
On 23/08/2025 17:46, Paul Eggert wrote: On 2025-08-22 19:11, Phillip Lougher wrote: any Squashfs SEEK_HOLE/SEEK_DATA implementation will not behave like other Linux filesystems, because it won't report sparseness at the 4K granularity that most people or programs will expect it to. Coreutils

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-23 Thread Phillip Lougher
On 23/08/2025 17:46, Paul Eggert wrote: On 2025-08-22 19:11, Phillip Lougher wrote: any Squashfs SEEK_HOLE/SEEK_DATA implementation will not behave like other Linux filesystems, because it won't report sparseness at the 4K granularity that most people or programs will expect it to. Coreutils

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-23 Thread Pádraig Brady
On 23/08/2025 01:48, Paul Eggert wrote: On 8/22/25 07:04, Pádraig Brady wrote:   /* Copy this extent, looking for further opportunities to not bother to write zeros if --sparse=always, since SEEK_HOLE is conservative and may miss some holes.  */ So the comment needs

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-23 Thread Paul Eggert
On 2025-08-22 19:11, Phillip Lougher wrote: any Squashfs SEEK_HOLE/SEEK_DATA implementation will not behave like other Linux filesystems, because it won't report sparseness at the 4K granularity that most people or programs will expect it to. Coreutils doesn't expect 4 KiB granularity for LSEEK

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-22 Thread Phillip Lougher
Jeremy Allison wrote: > It turns out that: lseek(3, 0, SEEK_HOLE) returns end-of-file for a > sparse file copied from a Linux squashfs mounted drive. This breaks > the --sparse=auto heuristic that detects a sparse file. The reason for this is because Squashfs supports sparse files, but it has ne

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-22 Thread Phillip Lougher
Padraig Brady wrote: > with --sparse=always. squashfs is giving the wrong info here after all, right? No Squashfs is not giving the wrong information here. Support for SEEK_HOLE/SEEK_DATA is not mandated, and no Linux filesystem is required to support it. What you are seeing here is the de

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-22 Thread Paul Eggert
OK now with the first patch installed. squashfs is giving the wrong info here after all, right? Yes, that's the actual space-performance bug here. I installed the second attached patch to try to work around it. Jeremy, can you please try these two further p

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-22 Thread Pádraig Brady
A question about this hunk: @@ -619,9 +615,9 @@ lseek_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size, is conservative and may miss some holes. */ off_t n_read; if ( ! sparse_copy (src_fd, dest_fd, abuf, buf_size, - true, allow_reflin

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-21 Thread Paul Eggert
Thanks for checking; closing the bug report.

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-21 Thread Jeremy Allison via GNU coreutils Bug Reports
Yes - that seems to fix the problem ! Thanks Paul. On Thu, Aug 21, 2025 at 4:03 PM Paul Eggert wrote: > > Thanks for the bug report. Although this part of the code is messy and > needs a revamp, in the meantime I installed the attached into the master > branch on Savannah; please give it a try.

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-21 Thread Paul Eggert
Thanks for the bug report. Although this part of the code is messy and needs a revamp, in the meantime I installed the attached into the master branch on Savannah; please give it a try.From b7fc76269bbc830bf96320cd5cca3cfd90d33f68 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 21 Aug

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-19 Thread Glenn Golden
On Tue, Aug 19, 2025, at 09:13, James Feeney via GNU coreutils Bug Reports wrote: > > Yes, that's it, along with the coincidence that MDT relative to UTC is > exactly 12 hours. > That coincidence is true only in base 4. :)

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-19 Thread James Feeney via GNU coreutils Bug Reports
ttps://askubuntu.com/questions/1238397/ubuntu-server-20-04-time-format-24-hours-on-shell-with-date-command which comments that: 24-hour clock in en_US locale was a bug in glibc locale definition and has been corrected in this commit. So, the change was intentional. – Mateusz C

bug#79267: cp --sparse=auto heuristic fails on a squashfs mounted drive.

2025-08-18 Thread Jeremy Allison via GNU coreutils Bug Reports
It turns out that: lseek(3, 0, SEEK_HOLE) returns end-of-file for a sparse file copied from a Linux squashfs mounted drive. This breaks the --sparse=auto heuristic that detects a sparse file. I have a fix for you to consider. To reproduce: First, create a squashfs drive containing a file output_

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-18 Thread Pádraig Brady
tag 79261 notabug close 79261 stop On 17/08/2025 17:02, James Feeney via GNU coreutils Bug Reports wrote: Arch Linux coreutils 9.7-1 $ timedatectl;date;date -u Local time: Sun 2025-08-17 09:50:24 MDT Universal time: Sun 2025-08-17 15:50:24 UTC RTC

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-17 Thread Glenn Golden
On Sun, Aug 17, 2025, at 10:02, James Feeney via GNU coreutils Bug Reports wrote: > Arch Linux > coreutils 9.7-1 > > $ timedatectl;date;date -u >Local time: Sun 2025-08-17 09:50:24 MDT >Universal time: Sun 2025-08-17 15:50:24 UTC >

bug#79261: coreutils 9.7 "date -u" - timezone offset is in the wrong direction

2025-08-17 Thread James Feeney via GNU coreutils Bug Reports
Arch Linux coreutils 9.7-1 $ timedatectl;date;date -u Local time: Sun 2025-08-17 09:50:24 MDT Universal time: Sun 2025-08-17 15:50:24 UTC RTC time: Sun 2025-08-17 15:50:24 Time zone: US/Mountain (MDT, -0600) System clock synchronized: yes

bug#5926: feature request: mv -p to create missing target dir

2025-08-16 Thread Mavik Bow
a file from one file system to another it is impossible to > have an atomic rename(). In that case mv falls back to effectively cp > plus rm. That is mentioned in the mv documentation. If this right here doesn't sound like pseudocode, I don't know what does. Perfect pseudocode to

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-16 Thread Collin Funk
Closing this now that the patches are pushed. Thanks for the help Paul and Pádraig. Collin

bug#62385: POSIX behavior of readlink, realpath

2025-08-16 Thread Collin Funk
Paul Eggert writes: > On 2025-08-03 12:47, Collin Funk wrote: >> How about the wording and formatting of the attatched patch? > > Thanks, looks good. Marking this bug as done since readlink and realpath should now comply with POSIX 2024. If not, we can treat it as a new bug.

bug#69939: test utility bug: "test -a -a -a" and "test -o -o -o" fail

2025-08-15 Thread Paul Eggert
On 8/14/25 21:18, Collin Funk wrote: Just adding here that POSIX.1-2024 removed the -a and -o operators [1]: Austin Group Defect 1330 is applied, removing the obsolescent (and optional) -a and -o binary primaries, and '(' and ')' operators. So I don't think we should spend much time w

bug#69939: test utility bug: "test -a -a -a" and "test -o -o -o" fail

2025-08-14 Thread Collin Funk
aries, and '(' and ')' operators. So I don't think we should spend much time worrying about it. That is my excuse at least. Will leave this bug report open though. [1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-14 Thread Collin Funk
Paul Eggert writes: > - parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, > - Version, true, usage, AUTHORS, > - (char const *) nullptr); > + while (true) The removal of this function call without removi

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-14 Thread Pádraig Brady
On 14/08/2025 17:33, Collin Funk wrote: Paul Eggert writes: Come to think of it, how about setting MAX_CYCLES to 1? There's no real use for values greater than 1. This is much simpler (it avoids the abovementioned problems among other things), and POSIX allows this. Proposed patch attached.

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-14 Thread Collin Funk
Pádraig Brady writes: >> I have attached a proposed patch. >> I followed the POSIX recommendation of using the exit status 0 - 124 >> for >> the number of cycles and 125 for program errors (e.g. closing standard >> output). > > -w seems a bit arbitrary to standardize since I only see it in OpenBS

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-14 Thread Collin Funk
Paul Eggert writes: > Come to think of it, how about setting MAX_CYCLES to 1? There's no > real use for values greater than 1. This is much simpler (it avoids > the abovementioned problems among other things), and POSIX allows > this. Proposed patch attached. Haven't tested the patch. But I do n

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-14 Thread Paul Eggert
On 8/13/25 22:01, Collin Funk wrote: +error (0 <= cycle_count ? MAX_CYCLES + 1 : EXIT_FAILURE, errno, "%s", This sort of thing is awkward and doesn't suffice anyway since if (say) xmalloc fails the exit status is wrong. Instead, code should use initialize_exit_failure to set the desired

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-14 Thread Paul Eggert
On 8/14/25 04:45, Pádraig Brady wrote: So we could just always exit >= 125 on error, and it would suffice to mention this in NEWS under "Change in behavior". But I'm inclined to only do the exit status adjustments if -w was specified. and just document the exit status range in the info docs f

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-14 Thread Pádraig Brady
On 14/08/2025 06:01, Collin Funk wrote: Collin Funk writes: I'll have a look at implementing this behavior. But figured it was worth sending on bug-coreutils for tracking like the rest of the missing POSIX 2024 features. I have attached a proposed patch. I followed the POSIX recommend

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-13 Thread Collin Funk
Collin Funk writes: > However, that means that when POSIXLY_CORRECT is not defined the exit > status is ambiguous as shown in the following example: > > # Input with a cycle. > $ printf 'a b\nb a\n' | ./src/tsort > tsort: -: input contains a loop: > tsort: a > tsort: b > a

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-13 Thread Collin Funk
Collin Funk writes: > I'll have a look at implementing this behavior. But figured it was worth > sending on bug-coreutils for tracking like the rest of the missing POSIX > 2024 features. I have attached a proposed patch. I followed the POSIX recommendation of using the exit stat

bug#79232: tsort doesn't support -w added by POSIX 2024.

2025-08-13 Thread Collin Funk
values above that maximum through 125 for other errors, and leaving values 126 and greater to have the special meanings that the shell assigns to them. I'll have a look at implementing this behavior. But figured it was worth sending on bug-coreutils for tracking like the rest of the mi

bug#79221: basenc triggers undefined-behaviour in mini-gmp

2025-08-11 Thread Paul Eggert
Thanks, I installed that.

bug#79221: basenc triggers undefined-behaviour in mini-gmp

2025-08-11 Thread Bruno Haible via GNU coreutils Bug Reports
eger-Import-and-Export . If yes, then it's a bug in mini-gmp.c around line 4529. If no, it's a bug in coreutils/src/basenc.c. If yes, feel free to report that to the GMP people, without CCing me, please. If no, feel free to apply the attached fix. It passes "make check". Bruno

bug#79218: BUG: sudo rm -rf /* removes without --no-preserve-root

2025-08-11 Thread Pádraig Brady
On 11/08/2025 11:16, Doctorixx wrote: Hello coreutils maintainers, I noticed a potentially dangerous difference in how rm handles the / and /* patterns. Currently: $ sudo rm -rf / rm: it is dangerous to operate recursively on '/' rm: use --no-preserve-root to override this failsafe This preve

  1   2   3   4   5   6   7   8   9   10   >