[PATCH] basenc: fix stripping of '=' chars in some encodings

2025-08-07 Thread Pádraig Brady
* src/basenc.c (do_decode): With -i ensure we strip '=' chars if there is no padding for the chosen encoding. * tests/basenc/basenc.pl: Add a test case. * NEWS: Mention the bug fix. --- NEWS | 4 src/basenc.c | 3 ++- tests/basenc/basenc.pl | 1 + 3 files changed,

[PATCH] basenc: add base58 support

2025-08-07 Thread Pádraig Brady
A 58 character encoding that: - avoids visually ambiguous 0OIl characters - uses only alphanumeric characters Described at: - https://tools.ietf.org/html/draft-msporny-base58-03 This implementation uses GMP (or gnulib's gmp fallback). Performance is good in comparison to other implementations.

Re: [PATCH] doc: use consistent references to standard files

2025-08-06 Thread Pádraig Brady
On 06/08/2025 02:59, Collin Funk wrote: Collin Funk writes: Bernhard Voelker writes: Do we need/want more patterns, e.g. for translated strings? $ GIT_PAGER= git grep -E '_\("[^"]*std(in|out|err)' -- '*/*.c' src/du.c: error (0, 0, _("when reading file names from stdin, "

Re: bunch of coreutils changes, mostly to 'tail'

2025-08-04 Thread Pádraig Brady
On 04/08/2025 07:40, Bernhard Voelker wrote: On 8/4/25 04:50, Paul Eggert wrote: I've been remiss in forgetting to push, and just now made up for it by pushing 27 patches (attached). Most of them have to do with obscure issues in 'tail'. No doubt there are further issues. Hope I haven't introduc

date fixes

2025-07-31 Thread Pádraig Brady
Hi Bruno, Your two date patches look good. I'm replying directly since I can only see the messages in the archive, but they've not been delivered to me as of yet. (Generally GNU infra has been problematic over the last few months. Apparently this is due to ongoing DDOS as per https://hostux.soci

[PATCH] doc: use consistent references to standard files

2025-07-28 Thread Pádraig Brady
* cfg.mk (sc_standard_outputs): A new syntax check to enforce standard references. * doc/coreutils.texi: s/stderr/standard error/ etc. * src/date.c: Likewise. * src/dd.c: Likewise. * src/env.c: Likewise. * src/sort.c: Likewise. * src/split.c: Likewise. * src/stty.c: Likewise. * src/timeout.c: Likew

Re: doc: emit better output for --option=[+]count in man pages

2025-07-27 Thread Pádraig Brady
On 27/07/2025 01:20, Collin Funk wrote: In the Coreutils man pages we have occurrences of: --option=[+]count to indicate an optional '+' sign in the given number. The help2man script generates poor output for these. This can be seen on the tail man pages [1]. Here is the generated HTML:

Re: tests: avoid a false failure on Cygwin

2025-07-26 Thread Pádraig Brady
On 26/07/2025 19:44, Collin Funk wrote: Hi Pádraig, Pádraig Brady writes: That looks like a more general issue. Shouldn't the (exit $1) in Exit() set $? to $fail ? Perhaps remove_tmp_() is triggered too early or something? Thanks for checking. Here is what the full log is before the

Re: tests: avoid a false failure on Cygwin

2025-07-26 Thread Pádraig Brady
On 26/07/2025 11:44, Bruno Haible via GNU coreutils General Discussion wrote: Hi Collin, +if ! echo '' > 'backslash\is\not\dir\sep'; then Negating the exit status of a command with ! is not portable [1]. Suggestion: Swap the two branches of the 'if' statement, thus removing the need for nega

Re: tests: avoid a false failure on Cygwin

2025-07-26 Thread Pádraig Brady
On 26/07/2025 08:39, Collin Funk wrote: On Cygwin tests/cksum/md5sum-bsd.sh fails with the following logged: + : ./tests/cksum/md5sum-bsd.sh: line 73: backslash\is\not\dir\sep: No such file or directory + remove_tmp_ + __st=1 + cleanup_ [...] exit 0 After che

Re: date: add tests for the Thai solar calendar

2025-07-23 Thread Pádraig Brady
On 23/07/2025 04:58, Collin Funk wrote: Collin Funk writes: thanks for working on this No problem, thanks to you and Berny for checking. I'll write tests for the other two locales tomorrow. Done, two patches attached. I'll push them tomorrow unless there is any issues. I ran 'make syntax-c

Re: date: add tests for the Thai solar calendar

2025-07-21 Thread Pádraig Brady
On 18/07/2025 04:03, Collin Funk wrote: Hi, I've attached a basic test I wrote for the Thai solar calendar using th_TH.UTF-8 based on the properties that Bruno described [1]. One thing I was unsure of was whether we have to check if the locale is supported before using it. In other tests I see

Re: date: add tests for the Thai solar calendar

2025-07-21 Thread Pádraig Brady
On 19/07/2025 13:16, Bernhard Voelker wrote: Hi Collin, On 7/18/25 05:03, Collin Funk wrote: I've attached a basic test I wrote for the Thai solar calendar using th_TH.UTF-8 based on the properties that Bruno described [1]. > +# Current year in the Gregorian calendar. > +current_year=$(LC

Re: updates regarding non-Gregorian calendars in 'date'

2025-07-21 Thread Pádraig Brady
On 18/07/2025 04:40, Bruno Haible via GNU coreutils General Discussion wrote: Collin Funk wrote: +for specifiying your general locale, and s/specifiying/specifying/ +For more information on how to set your locale, see the GNU gettext manual at +@ifinfo +@ref{Users,,The User's View,gettext}.

Re: Suggest `isemptydir` for addition to coreutils

2025-07-06 Thread Pádraig Brady
On 06/07/2025 12:11, Stefan Klinger wrote: Hello, I've implemented a small tool [1] to test whether a directory is empty, and I think it would make a useful addition to GNU coreutils. There once was a discussion [2] on this mailing list, proposing the extension of `test` with a `-E` flag. AFAI

Re: doc: fix a dead link

2025-07-05 Thread Pádraig Brady
On 05/07/2025 05:16, Collin Funk wrote: I noticed that the documentation for SI units supported by --human-readable leads to a page saying "Sorry, this link is no longer active!" [1]. It appears the SI Brochure is no longer distributed as an html for easy linking, only PDFs [2]. This patch uses

Re: maint: prefer endian.h macros to WORDS_BIGENDIAN

2025-07-04 Thread Pádraig Brady
On 04/07/2025 04:02, Collin Funk wrote: A while ago I added the endian.h gnulib module to simplify byte-order conversions. This patch gets rid of the rest of autoconf's WORDS_BIGENDIAN macro and uses the standardized endian.h macros. Will push in a bit if there are no objections. +1 on the od

Re: [PATCH] doc: cksum: better document --check doesn't support legacy crc output

2025-07-01 Thread Pádraig Brady
On 01/07/2025 04:05, Collin Funk wrote: Hi Pádraig, One small thing I noticed while looking over this patch. Pádraig Brady writes: +Three input formats are supported. Either the "untagged" output format, +the "tagged" output format, or the BSD reversed mode format +whi

[PATCH] build: fix VPATH builds with --enable-single-binary

2025-06-30 Thread Pádraig Brady
* src/local.mk: Adjust the dependency so that speedlist.h is built irrespective of the object file name. Note we could use BUILT_SOURCES for this, but it's better to have this more accurate dependency. --- src/local.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/local.m

Re: doc: list signals added by POSIX.1-2024

2025-06-28 Thread Pádraig Brady
On 28/06/2025 06:19, Collin Funk wrote: Would appreciate someone checking the formatting of this patch. Maybe a table is excessive for only listing the one signal added by POSIX-1.2024, but I thought it was good to match the table used for other specifications. Formatting is good. +1 cheers,

[PATCH] doc: cksum: better document --check doesn't support legacy crc output

2025-06-27 Thread Pádraig Brady
* doc/coreutils.texi (cksum common options): Reorder and tweak the info to make it clearer that --check does not support the legacy crc output from the cksum command. Reported at https://bugs.debian.org/1108363 --- doc/coreutils.texi | 18 ++ 1 file changed, 10 insertions(+), 8 del

Re: doc: mention that POSIX.1-2024 added dd iflag=fullblock

2025-06-27 Thread Pádraig Brady
On 27/06/2025 02:56, Collin Funk wrote: POSIX.1-2024 added the 'iflags=fullblock' option to 'dd'. This patch documents that. Although it is a part of POSIX, it is not widely supported. FreeBSD added it in 2019, but NetBSD and OpenBSD do not support it [1]. Therefore the portability warning can s

Re: [PATCH] maint: prefer UINTMAX_MAX to TYPE_MAXIMUM (uintmax_t)

2025-06-25 Thread Pádraig Brady
On 25/06/2025 05:56, Collin Funk wrote: There was some uses of TYPE_MAXIMUM (uintmax_t) that I noticed. I guess intprops.h in gnulib existed before the inttypes.h checks, so this was more portable at the time. It looked weird to me though, so here is a patch. Pushed. cheers, Padraig.

Re: [PATCH 1/2] stty: support baud rate macro extraction on more compilers

2025-06-23 Thread Pádraig Brady
Both pushed. thanks, Padraig

Re: stdbuf: support AIX

2025-06-23 Thread Pádraig Brady
On 23/06/2025 02:48, Collin Funk wrote: Hi Pádraig, On AIX the following test fails: $ make TESTS=tests/misc/stdbuf.sh check [...] FAIL: tests/misc/stdbuf.sh [...] This is because AIX does not support the LD_PRELOAD environment variable. Copying the text from their docs [1]

two more stty speed adjustments

2025-06-22 Thread Pádraig Brady
The first is an info doc adjustment to remove explicit mention of speeds which could now be incomplete and also mention support for arbitrary speeds. The second adjusts speed parsing to disallow extraneous chars after floats. For example "9600.0bps" or "9600.0x2" were allowed before this change.

Re: build: add src/termios.c to the tarball

2025-06-22 Thread Pádraig Brady
On 22/06/2025 06:47, Collin Funk wrote: Hi Pádraig, I have 2 patches attached. Pushed. thanks! Padraig

Re: [PATCH 1/1] stty: NEWS: fix grammar error, baud rate probing is opportunistic

2025-06-21 Thread Pádraig Brady
On 21/06/2025 02:01, H. Peter Anvin wrote: 1. the full set -> is 2. the full supported set of baud rates is determined at compile time only if the C compiler supports -dM to extract macro definitions; this is not guaranteed - hence the fallback list in src/speedgen. Signed-off-by: H. Pet

Re: potential addition of sponge to POSIX

2025-06-19 Thread Pádraig Brady
On 19/06/2025 17:55, Marc Chantreux wrote: On Thu, Jun 19, 2025 at 05:32:41PM +0100, Pádraig Brady wrote: If we were to standardize a new tool, we should aim for ACID file replacement functionality. it seems to me that's the whole point of sponge: < A foo | bar | bang > A

Re: potential addition of sponge to POSIX

2025-06-19 Thread Pádraig Brady
On 19/06/2025 16:43, Eric Blake wrote: The Austin Group has been asked whether future POSIX should include the sponge(1) utility: https://www.austingroupbugs.net/view.php?id=1927 Before the Austin Group decides whether to sponsor such an addition, I'm trying to get feedback on whether standardi

Re: [PATCH 1/1] stty: arbitrary or non-a priori known speed_t support

2025-06-17 Thread Pádraig Brady
On 17/06/2025 20:07, H. Peter Anvin wrote: On June 17, 2025 5:58:48 AM PDT, "Pádraig Brady" wrote: We'll need to adjust tests a bit. Currently we check that `stty ispeed 420` fails, though I'm guessing that this may now succeed with glibc >= 2.42? Do you have any ideas o

Re: [PATCH 1/1] stty: arbitrary or non-a priori known speed_t support

2025-06-17 Thread Pádraig Brady
On 17/06/2025 00:00, Pádraig Brady wrote: On 16/06/2025 22:58, H. Peter Anvin wrote: Support the case where speed_t is simply a number, and in that case assume that arbitrary values can be passed. This is assumed to be the case when all known speed_t macros equal their own value. Try to probe

Re: [PATCH 1/1] stty: arbitrary or non-a priori known speed_t support

2025-06-17 Thread Pádraig Brady
On 17/06/2025 13:58, Pádraig Brady wrote: On 17/06/2025 00:00, Pádraig Brady wrote: On 16/06/2025 22:58, H. Peter Anvin wrote: Support the case where speed_t is simply a number, and in that case assume that arbitrary values can be passed. This is assumed to be the case when all known speed_t

Re: [PATCH 1/1] stty: arbitrary or non-a priori known speed_t support

2025-06-16 Thread Pádraig Brady
On 16/06/2025 22:58, H. Peter Anvin wrote: Support the case where speed_t is simply a number, and in that case assume that arbitrary values can be passed. This is assumed to be the case when all known speed_t macros equal their own value. Try to probe for a variety of speed_t constants by tryin

Re: `cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead`

2025-06-10 Thread Pádraig Brady
On 10/06/2025 11:35, Pádraig Brady wrote: On 10/06/2025 08:56, Σταύρος Ντέντος wrote: Hello there, I was wondering: Should the error message contain `-n/--no-clobber` and/or use the same flag as the one used in the invocation? Rationale: I try to write my dotfiles without shorthands - for

Re: `cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead`

2025-06-10 Thread Pádraig Brady
On 10/06/2025 08:56, Σταύρος Ντέντος wrote: Hello there, I was wondering: Should the error message contain `-n/--no-clobber` and/or use the same flag as the one used in the invocation? Rationale: I try to write my dotfiles without shorthands - for future readability. So, "after a distro upgrade

[PATCH] doc: cp --help: mention the new --reflink=auto default

2025-06-07 Thread Pádraig Brady
* src/cp.c (usage): Reword the REFLINK description to indicate that --reflink=auto is the default. Fixes https://github.com/coreutils/coreutils/issues/103 --- src/cp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cp.c b/src/cp.c index a0ec06714..57450dbd4 100644

Re: [Enhancement Request] Optional Structured Output via stdoutm, stderrm file descriptors.

2025-05-28 Thread Pádraig Brady
On 28/05/2025 11:18, Annada Behera wrote: Dear GNU Coreutils maintainers, I am writing to propose a backward-compatible enhancement that could improve modern scripting enviroments while maintaining complete compatiblily with existing workflows without any impact on performance. PROBLEM: Althou

Re: build: fix 'make distcheck'

2025-05-18 Thread Pádraig Brady
On 18/05/2025 06:20, Collin Funk wrote: Hi Pádraig, My last commit broke 'make distcheck' with the following: GEN lib/wctype.h GEN src/coreutils.h make[3]: *** No rule to make target 'src/make-prime-list.c', needed by 'src/primes.h'. Stop. make[3]: Leaving di

Re: dircolors: treat .zs-old as backup file

2025-05-15 Thread Pádraig Brady
On 14/05/2025 20:24, Ville Skyttä wrote: This extension is used for zsync old version files. - https://linux.die.net/man/1/zsync - https://github.com/cph6/zsync/blob/6cfe374f8f2310cbd624664ca98e5bb28244ba7a/c/client.c#L668 Given there's a perf cost to this, and the relative rarity of this progr

Re: doc: Suggest GNULIB_REFDIR instead of GNULIB_SRCDIR

2025-05-12 Thread Pádraig Brady
On 11/05/2025 18:21, Collin Funk wrote: Currently README-hacking suggests using GNULIB_SRCDIR to clone a Gnulib submodule with 'git clone --reference'. This used to be the case but changed in 2022 [1]. Nowadays, GNULIB_SRCDIR still exists but ./bootstrap will just use that directory instead of u

Re: ls, etc.?

2025-05-05 Thread Pádraig Brady
On 05/05/2025 14:30, David Chmelik wrote: Can $LS_OPTIONS set long date only when '-l' is used?  Some my files are from 1994 to now, showing only day & month is pretty useless/confusing/problematic.  I need year, month, day, time of day for every 'ls -l'.  Meanwhile, I aliased ls to eza. Try: e

Re: Q: enable-single-binary=hardlinks?

2025-04-25 Thread Pádraig Brady
On 25/04/2025 19:41, Bernhard Voelker wrote: Is there a particular reason why we only have --enable-single-binary=shebangs|symlinks i.e., no hardlinks? It seems to work very well. OTOH this might rather be a downstream packager issue? It's a good question. I can't remember any previous

Re: configure --enable-systemd

2025-04-24 Thread Pádraig Brady
On 24/04/2025 10:25, Bruno Haible via Gnulib discussion list wrote: When the option --enable-systemd was introduced in August 2023, it was experimental, because the code that uses it (readutmp in gnulib) was new and not widely tested. Things have changed now: Ubuntu 25.04 ships with no /var/run/u

[PATCH] tests: fix false failure with constrained setfacl

2025-04-21 Thread Pádraig Brady
* tests/ls/acl.sh: In constrained environments, like with setxattr() disabled for example, require_acl_ does not check for the required functionality, so use the more stringent require_setfacl_ instead. Reported at https://github.com/NixOS/nixpkgs/issues/394953 --- tests/ls/acl.sh | 2 +- 1 file c

Re: cp clashing options reflink / sparse

2025-04-15 Thread Pádraig Brady
On 14/04/2025 23:18, Philip Rowlands wrote: $ ( dd if=/dev/zero count=100; dd if=/dev/urandom count=100; dd if=/dev/zero count=100 ) > unsparse $ cp --sparse=always unsparse sparse $ ls -ls * 52 -rw-r--r--. 1 root root 153600 Apr 14 22:55 sparse 152 -rw-r--r--. 1 root root 153600 Apr 14 22:5

Re: new snapshot available: coreutils-9.6.53-14af8.tar.xz

2025-04-10 Thread Pádraig Brady
On 06/04/2025 15:58, Jim Meyering wrote: On Sun, Apr 6, 2025 at 12:18 AM Pádraig Brady wrote: On 06/04/2025 02:37, Jim Meyering wrote: On Sat, Apr 5, 2025 at 4:34 PM Pádraig Brady wrote: We plan to release coreutils-9.7 early next week so any testing you can do on various different systems

coreutils-9.7 released [stable]

2025-04-09 Thread Pádraig Brady
release: Bruno Haible (1)Jim Meyering (2) Collin Funk (2) Lukáš Zaoral (1) Daniel Hofstetter (1) Mike Swanson (1) Frédéric Yhuel (1) Paul Eggert (21) G. Branden Robinson (1) Pádraig Brady (32) Grisha Levit (1) Pádraig [on

Re: new snapshot available: coreutils-9.6.61-7007c

2025-04-08 Thread Pádraig Brady
Summary of my testing so far amd64, Fedora 41, all tests pass ppc64le, debian 12, all tests pass aarch64, suse 15, all tests pass arm64, macOS 12.6, all tests pass arm64, FreeBSD 15 (CheriBSD), 1 test fail: FAIL: tests/csplit/csplit-heap quarantine_insert: couldn't allocate new descriptor

new snapshot available: coreutils-9.6.61-7007c

2025-04-08 Thread Pádraig Brady
We plan to release coreutils-9.7 tomorrow so any testing you can do on various different systems would be most welcome. This release comes about 11 weeks after the 9.6 release, and is mainly a bug fix release. -- You can download the coreutils snapshot in xz f

Re: new snapshot available: coreutils-9.6.53-14af8.tar.xz

2025-04-06 Thread Pádraig Brady
On 06/04/2025 02:37, Jim Meyering wrote: On Sat, Apr 5, 2025 at 4:34 PM Pádraig Brady wrote: We plan to release coreutils-9.7 early next week so any testing you can do on various different systems between now and then would be most welcome. This release comes about 11 weeks after the 9.6

new snapshot available: coreutils-9.6.53-14af8.tar.xz

2025-04-05 Thread Pádraig Brady
tion setup sort: improve -u brief doc build: update gnulib submodule to latest mv: port test to OpenBSD 7.5 timeout: round timeouts up Pádraig Brady (27): maint: post-release administrivia ls: fix crash with --context tests: remove use of unprotected &#x

[PATCH] ls: fix crash on systems with SELinux but without xattr support

2025-04-05 Thread Pádraig Brady
This was seen on termux with ./configure --disable-xattr where listxattr() and getxattr() returned ENOTSUP. Then the valid security context obtained by file_has_aclinfo() was discounted, and problematically then freed multiple times. Reported at https://github.com/termux/termux-packages/issues/2375

Re: od: display verbatim utf8 characters along side dump

2025-04-05 Thread Pádraig Brady
On 03/04/2025 07:10, Avid Seeker wrote: ``` $ echo -n this is a 🐕 | od -cx 000 t h i s i s a 360 237 220 225 687473696920207320619ff09590 016 ``` Can od print UTF-8 characters verbatim instead of encoding them in octal? I gue

Re: z/OS enablement patches

2025-04-05 Thread Pádraig Brady
On 01/04/2025 12:49, Igor Todorovski wrote: Hi, I currently maintain a set of enablement patches for coreutils for z/OS. They are available here (a few of them need cleanup): https://github.com/zopencommunity/coreutilsport/tree/main/stable-patches/src z/OS is unique in that files can contain

Re: maint: ensure that new "make syntax-check"-run sc_codespell passes

2025-04-04 Thread Pádraig Brady
On 04/04/2025 20:40, Collin Funk wrote: Hi, The next update from Gnulib will add sc_codespell. The attached patch will fix the 'make syntax-check' errors that occur as a result. A few typo fixes, but mostly ignoring common variable names and sed commands that codespell doesn't understand. I s

Re: symbolic link curiousity in 3.6.0

2025-04-04 Thread Pádraig Brady
On 29/03/2025 16:31, Paul Eggert wrote: On 3/29/25 04:30, Corinna Vinschen wrote: What it should do if only the POSIX.1e draft 17 functions are available is something along these lines: Yes, that sounds like a better approach. However, shouldn't it use O_PATH not O_RDONLY? We might lack read a

Re: symbolic link curiousity in 3.6.0

2025-03-31 Thread Pádraig Brady
On 31/03/2025 17:32, Paul Eggert wrote: On 2025-03-30 07:26, Pádraig Brady wrote: On 30/03/2025 13:50, Corinna Vinschen wrote: In terms of coreutils, I think either ls(1) gobble_file() or file_has_aclinfo_cache() should still handle ENOENT from file_has_aclinfo() and not print any error

Re: symbolic link curiousity in 3.6.0

2025-03-30 Thread Pádraig Brady
ll handle ENOENT from file_has_aclinfo() and not print any error message. After all, due to the preconditions for building acl_get_link_np, we can't be sure acl_get_link_np has really been built into file-has-acl.c, and the problem persists. I tend to agree. I'll apply this later: comm

Re: Adding a flag to cat for O_NOFOLLOW

2025-03-30 Thread Pádraig Brady
On 25/03/2025 14:19, Ethan Heilman wrote: Howdy coreutils, I would like to add a O_NOFOLLOW flag to cat so that users can specify if cat should follow a symlink at the final file in a path. This is motivated by the need to atomically read a file while ensuring it is not a symlink. This functiona

Re: symbolic link curiousity in 3.6.0

2025-03-28 Thread Pádraig Brady
On 28/03/2025 14:30, Bruno Haible via Gnulib discussion list wrote: [CCing bug-gnulib] Corinna Vinschen wrote in : Responding to previous messages in the above thread, I think the triggering commit in coreutils 9.6 was: https://gi

Re: dircolors help

2025-03-20 Thread Pádraig Brady
On 20/03/2025 09:05, Александр Коновалов wrote: Good afternoon! I need some help with dircolors setup I have a MacBook with macOS Sequoia 15.3.2 I installed coreutils through the brew and then checked everything - tried 'which gdircolors' and 'gdircolors --print-ls-colors' - it worked perfectly.

Re: should "cp -p" exit with non-zero status when it can't copy a non-existing xattr?

2025-03-15 Thread Pádraig Brady
On 10/03/2025 18:20, Christoph Badura wrote: I'm compiling emacs from source in a debian/bookworm VM hosted on macOS. The VM runs und VirtualBox. The emacs source directory is mounted via NFSv3 into the VM. (macOS doesn't support NFSv4 as NFS server.) The build failed early because autogen.sh s

[PATCH] dircolors: add vt220 as a color capable terminal

2025-03-15 Thread Pádraig Brady
This isn't strictly historically accurate but most practical these days, especially since systemd uses this as its default TERM type. See https://github.com/coreutils/coreutils/issues/96 Tested with: $ LS_COLORS= COLORTERM= TERM=vt220 src/ls --color $ COLORTERM= TERM=vt220 src/dircolors * src

Re: [PATCH] dd: fix check of return value of posix_fadvise()

2025-03-11 Thread Pádraig Brady
On 10/03/2025 09:11, Frédéric Yhuel wrote: On 3/9/25 20:22, Pádraig Brady wrote: On 09/03/2025 17:35, Frédéric Yhuel via GNU coreutils General Discussion wrote: Hi, dd doesn't error out if posix_fadvise() returns an error. Here is a patch for the fix. fadvise64() always returns -1 on

Re: [PATCH] dd: fix check of return value of posix_fadvise()

2025-03-11 Thread Pádraig Brady
On 09/03/2025 17:35, Frédéric Yhuel via GNU coreutils General Discussion wrote: Hi, dd doesn't error out if posix_fadvise() returns an error. Here is a patch for the fix. fadvise64() always returns -1 on error, but not posix_fadvise(). Good catch. The main issue of processing non seekable fi

Re: ls sort ignore . in file names

2025-03-07 Thread Pádraig Brady
On 06/03/2025 20:50, Valérie et David VANTYGHEM via GNU coreutils General Discussion wrote: Hello, When I list files in a directory, they are sorted like . before file extension is ignored. |$ ls -AR --format=single-column ./DISQUETTE\ 1/*| ‘./DISQUETTE 1/CONF.ENG’ ‘./DISQUETTE 1/CONF.FRE’ ‘.

Re: enhancement suggestions for "sort" for sorting for text

2025-03-05 Thread Pádraig Brady
On 05/03/2025 13:15, Schneider, Silvio-MGB wrote: Dear guardians for the coreutils I would like to sort some hundert lines like host server1programname is not running host server2programname is running host server214b programname is running host server300c programname is not running

Re: [PATCH] build: fix LIBCRYPTO_SONAME value with config cache

2025-02-26 Thread Pádraig Brady
On 07/02/2025 01:56, Grisha Levit wrote: * configure.ac (LIBCRYPTO_SONAME): Store library name in cache so we do not end up with an empty value for it when a cache file is used. --- Fixes: $ ./configure -C >/dev/null && grep LIBCRYPTO_SONAME config.status D["LIBCRYPTO_SONAME"]=" \"libcr

Re: [PATCH] who: fix -m with guessed tty names

2025-02-24 Thread Pádraig Brady
On 24/02/2025 13:33, Lukáš Zaoral wrote: On 24. 2. 2025, at 14:16, Pádraig Brady wrote: On 24/02/2025 09:36, Lukáš Zaoral wrote: ... It's always good to provide as much context as possible. I see this comes from https://bugzilla.redhat.com/2343998 My apologies! The change looks

Re: [PATCH] who: fix -m with guessed tty names

2025-02-24 Thread Pádraig Brady
On 24/02/2025 09:36, Lukáš Zaoral wrote: * who.c (scan_entries): Account for guessed tty names (e.g. 'sshd pts/1') from the readutmp module when using the systemd backend. * bootstrap.conf (gnulib_modules): Add str_endswith. --- bootstrap.conf | 1 + src/who.c | 2 +- 2 files changed, 2

[PATCH] tests: du: avoid intermittent false failure

2025-02-05 Thread Pádraig Brady
* tests/du/long-sloop.sh: Avoid failure due to intermittent reception of FTS_DNR, seen on BTRFS at least. --- tests/du/long-sloop.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/du/long-sloop.sh b/tests/du/long-sloop.sh index b9acfbf63..e5ca20212 100755 --- a/tests/d

Re: Feature Request: chmod u+s/g+s/+t for dirs only

2025-02-04 Thread Pádraig Brady
On 03/02/2025 19:22, Aaron Davies wrote: FYI my specific use case is a secure environment where files owned by anyone can be chmod'd via a program that can only run single commands--if many directories need to be changed, `chmod -R g+S dir` could be much faster than `find dir -type d -not -perm -

Re: the version-etc module

2025-01-28 Thread Pádraig Brady
On 28/01/2025 13:13, Pádraig Brady wrote: On 28/01/2025 09:14, Bruno Haible via Gnulib discussion list wrote: Then, it is interesting to note that * For coreutils programs, " --help" does not has a "Report bugs..." output section, because coreut

Re: RFC: split(1) and content-defined chunking, e.g. --bytes h/N & --line-bytes=h/N

2025-01-20 Thread Pádraig Brady
On 20/01/2025 12:51, Leonid Evdokimov wrote: On Wed, Jan 15, 2025 at 3:20 PM Pádraig Brady wrote: This might indeed be general enough for coreutils. What do you think about "API stability guarantees"? I think that the aforementioned --hash-seed is a bit of a bold move and, pro

Re: [PATCH] tests: fix typo in ls-time.sh

2025-01-19 Thread Pádraig Brady
On 19/01/2025 16:11, Daniel Hofstetter wrote: Hi, I noticed a typo in tests/ls/ls-time.sh: "--sort-name" is used instead of "--sort=name". I pushed that (but also with the arg order changed). cheers, Pádraig

Re: new snapshot available, ls -Z crash

2025-01-17 Thread Pádraig Brady
On 17/01/2025 17:23, Pádraig Brady wrote: On 17/01/2025 16:17, Pádraig Brady wrote: On 17/01/2025 16:00, Bruno Haible wrote: On - OpenBSD 6.0, - NetBSD 7.1 I see a test failure: The cause is a crash that is easy to reproduce interactively: $ src/ls -Z . Attached is a more

Re: new snapshot available, ls -Z crash

2025-01-17 Thread Pádraig Brady
On 17/01/2025 16:17, Pádraig Brady wrote: On 17/01/2025 16:00, Bruno Haible wrote: On - OpenBSD 6.0, - NetBSD 7.1 I see a test failure: FAIL tests/ls/selinux-segfault.sh (exit status: 1) Note I couldn't repro the failure on cfarm220 at least. But yes I do see problems in

Re: new snapshot available, ls -Z crash

2025-01-17 Thread Pádraig Brady
On 17/01/2025 16:00, Bruno Haible wrote: On - OpenBSD 6.0, - NetBSD 7.1 I see a test failure: FAIL tests/ls/selinux-segfault.sh (exit status: 1) Log is attached. The cause is a crash that is easy to reproduce interactively: $ src/ls -Z . In gdb, I get this stack trace (same on bo

[coreutils-announce] coreutils-9.6 released [stable]

2025-01-17 Thread Pádraig Brady
Jerrick (1) Bruno Haible (5) Collin Funk (16) Daniel Hofstetter (1) Evgeny Nizhibitsky (1) Lukáš Zaoral (1) Masatake YAMATO (1) Nikolaos Chatzikonstantinou (1) Nikolay Nechaev (3) Paul Eggert (123) Pádraig Brady (95) Richard Purdie (1) Sam Russell (2) Sylvestre Ledru (7

Re: new snapshot available, on Linux

2025-01-17 Thread Pádraig Brady
On 17/01/2025 15:14, Bruno Haible wrote: Test results of a recent snapshot on various Linux systems (other than the issues already reported): Ubuntu with clang+asan+ubsan OK Alpine Linux 3.20 OK Debian 12/m68kOK CentOS 5 3 FAIL (was 4

Re: new snapshot available

2025-01-17 Thread Pádraig Brady
On 17/01/2025 14:02, Bruno Haible wrote: Building a coreutils + gnulib snapshot from yesterday on GNU/Hurd (x86_64) [1]: The test 'wc/wc-total' hangs the file system. The first time I had to reboot. The second time, Ctrl-C was sufficient to interrupt it. [1] https://cdimage.debian.org/cdimage/

Re: new snapshot available: coreutils-9.5.257-9c068.tar.xz

2025-01-16 Thread Pádraig Brady
Summary of my testing... amd64, Fedora 41, gcc 15: pass amd64, Fedora 41, clang 19: pass riscv64, Alpine 3.21.0_alpha20240923, gcc-14 (cfarm94): pass aarch64, Debian Trixie/sid, gcc-14 (cfarm103): 1 gnulib fail test-fcntl.c:279: assertion 'fcntl (fd, F_DUPFD_CLOEXEC, -1) == -1' faileda arm64

Re: new snapshot available: coreutils-9.5.257-9c068.tar.xz

2025-01-16 Thread Pádraig Brady
We plan to release coreutils-9.6 in the next couple of days so any testing you can do on various different systems would be most welcome. -- You can download the coreutils snapshot in xz format (5.9 MiB) from: https://pixelbeat.org/cu/coreutils-ss.tar

[PATCH] tests: avoid false failure with replaced readdir

2025-01-16 Thread Pádraig Brady
* tests/rm/rm-readdir-fail.sh: Simulate EIO rather than ENOENT, as gnulib absorbs the latter since commit 5a2d28df. --- tests/rm/rm-readdir-fail.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/rm/rm-readdir-fail.sh b/tests/rm/rm-readdir-fail.sh index 8921190d6..1c2

[PATCH] tests: misc/write-errors.sh: increase memory limit

2025-01-15 Thread Pádraig Brady
* tests/head/head-c.sh: Use a larger VM limit to avoid mem allocation failures, which were seen on CheriBSD. --- tests/misc/write-errors.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/misc/write-errors.sh b/tests/misc/write-errors.sh index 13e6d11fa..35487c6e0 100755

[PATCH] tests: head: avoid false failure on some systems

2025-01-15 Thread Pádraig Brady
* tests/head/head-c.sh: Pass a more similar operation to get_min_ulimit_v_, so we get a more appropriate limit. This was seen to be significant with CheriBSD. --- tests/head/head-c.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/head/head-c.sh b/tests/head/head-c.sh in

[PATCH] yes: avoid failure on CHERI protected systems

2025-01-15 Thread Pádraig Brady
* src/yes.c (main): Don't reuse the argv array as CHERI's capability bounds do not allow for that, failing like: $ yes $(seq 156) | head -n1 In-address space security exception (core dumped) --- src/yes.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/yes.c b/src/yes.c index 3966

[PATCH] tac: avoid out of bounds access

2025-01-15 Thread Pádraig Brady
This was flagged on CheriBSD on ARM Morello with the error: "In-address space security exception (core dumped)" triggered with: tac -s '' /dev/null * src/tac.c (main): Ensure we don't read beyond the end of the supplied optarg. --- src/tac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] tests: avoid false failure with many mountpoints

2025-01-15 Thread Pádraig Brady
* tests/ls/readdir-mountpoint-inode.sh: Only take the first 64. --- tests/ls/readdir-mountpoint-inode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ls/readdir-mountpoint-inode.sh b/tests/ls/readdir-mountpoint-inode.sh index a147b148f..d6e967a15 100755 --- a/tests/ls

[PATCH] tests: use more portable timeout presence check

2025-01-15 Thread Pádraig Brady
* init.cfg: timeout(1) on FreeBSD doesn't support --version (or --help with success status), so use syntax compatible with both FreeBSD and GNU. --- init.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.cfg b/init.cfg index 0aaba4ee2..ae158c7a3 100644 --- a/init.cfg

[PATCH] tests: avoid ERRORs with no mntent.h

2025-01-15 Thread Pádraig Brady
* tests/df/skip-duplicates.sh: Just skip this test if we fail to build the shared lib. This fails on Solaris 11 at least due to no HAVE_MNTENT_H. Note HAVE_SYS_MNTENT_H does not suffice for this wrapper code. * tests/df/no-mtab-status.sh: Likewise. --- tests/df/no-mtab-status.sh | 2 +- tests/d

Re: [PATCH] tests: protect ulimit -v determination with a timeout

2025-01-15 Thread Pádraig Brady
On 15/01/2025 11:59, Pádraig Brady wrote: On 15/01/2025 07:33, Bernhard Voelker wrote: Hi Padraig, On 1/15/25 02:36, Pádraig Brady wrote: This avoids a test hang seen with bash on Solaris 11 + # Wrap with timeout as on some systems (like Solaris 11) + # fork() can return EAGAIN under vm

Re: RFC: split(1) and content-defined chunking, e.g. --bytes h/N & --line-bytes=h/N

2025-01-15 Thread Pádraig Brady
On 15/01/2025 11:56, Leonid Evdokimov wrote: Hello. I'd like to ask split maintainers if a patch implementing content-defined chunking for split is a possibly interesting one or not. My use-case is a simple one: I need a content-defined chunker to put 100'000 versions of a ~500 MiB text file in

Re: [PATCH] tests: protect ulimit -v determination with a timeout

2025-01-15 Thread Pádraig Brady
On 15/01/2025 07:33, Bernhard Voelker wrote: Hi Padraig, On 1/15/25 02:36, Pádraig Brady wrote: This avoids a test hang seen with bash on Solaris 11 + # Wrap with timeout as on some systems (like Solaris 11) + # fork() can return EAGAIN under vm constraints, + # causing bash at least to

[PATCH] tests: protect ulimit -v determination with a timeout

2025-01-14 Thread Pádraig Brady
This avoids a test hang seen with bash on Solaris 11 * init.cfg (ulimit_supported_): Change to a wrapper that uses timeout(1) with ... * tests/ulimit_supported: ... a separated helper. * tests/misc/write-errors.sh: Be more conservative and skip the test if we fail to determine an appropriate vm li

[PATCH] tests: tail: avoid failure on Solaris 11

2025-01-14 Thread Pádraig Brady
* tests/tail/tail-c.sh: On Solaris 11, tail -c 4096 /dev/urandom, will induce an lseek(,-4096,SEEK_END) which returns -4096 without setting errno, and a subsequent read() then gives EINVAL. Since tailing the end of a psuedo device is an edge case, we just verify that we don't spin reading the devic

Re: tests: env-S.pl: unset GNU/Hurd env vars

2025-01-14 Thread Pádraig Brady
On 14/01/2025 03:50, Collin Funk wrote: GNU/Hurd fails a test for env because LD_ORIGIN_PATH is defined. If it is unset it passes. I attached a patch. Pushed. thanks, Pádraig

Re: Feature Request: Add -a Option to mkdir for Single-Directory Names with Custom Formatting

2025-01-14 Thread Pádraig Brady
On 14/01/2025 04:05, Ranuga D wrote: Dear Coreutils Team, I hope this message finds you well. I am writing to propose a feature enhancement for the mkdir command. This enhancement introduces a new -a option for handling single-directory names with spaces or special formatting. Proposed Functiona

[PATCH] tail: fix regression in open() flags used

2025-01-13 Thread Pádraig Brady
* src/tail.c (tail_file): Fix precedence so that we pass correct flags to open(). Effectively this meant we would have dropped the O_BINARY flag on windows, since O_RDONLY is generally 0. Issue spotted by coverity. --- src/tail.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

  1   2   3   4   5   6   7   8   9   10   >