Re: gnulib-tool Python tracebacks after control-C

2024-05-13 Thread Pádraig Brady
On 13/05/2024 21:48, Collin Funk wrote: Hi Paul, On 5/13/24 9:39 AM, Paul Eggert wrote: I realized that I invoked ' ./gnulib-tool --create-testdir --dir foo stdbit' with the wrong options so I interrupted it with control-C. It then gave me the following long traceback, which is not useful. I

Re: gnulib-tool: Use the Python implementation by default

2024-04-27 Thread Pádraig Brady
On 27/04/2024 14:32, Bruno Haible wrote: Hi Pádraig, +if (python3 --version) >/dev/null 2>/dev/null \ + && case `python3 --version 2>&1` in +Python\ 3.[0-6] | Python\ 3.[0-6].*) false ;; +Python\ 3.*) true ;; +*) false ;; + esac; then It

Re: gnulib-tool: Use the Python implementation by default

2024-04-27 Thread Pádraig Brady
On 26/04/2024 10:48, Bruno Haible wrote: I committed this patch, which activates the Python rewrite of gnulib-tool for all users who have Python installed, without the need to set any environment variable. I'll make announcements to info-gnu and planet.gnu.org soon. +if (python3

Re: beta-tester call draft

2024-04-20 Thread Pádraig Brady
On 20/04/2024 01:22, Bruno Haible wrote: Hi, It's now time to call for beta-testers of the Python gnulib-tool. I plan to post the same text to info-gnu and to planet.gnu.org. Here is a draft. Please comment! coreutils results... 4. Clean the built files of your package: $ make

Re: quotearg: shell escape issue with single quote

2024-04-03 Thread Pádraig Brady
On 03/04/2024 22:33, Bruno Haible wrote: Hi Pádraig, The attached should fix this issue. process_input: + bool pending_shell_escape_end = false; It has a syntax error: With clang and with GCC versions < 11, it is invalid to put a declaration after a label. See: ===

Re: quotearg: shell escape issue with single quote

2024-04-03 Thread Pádraig Brady
On 31/03/2024 22:02, Bruno Haible wrote: Pádraig Brady wrote: If a string starts with a sequence that requires $'' quoting followed by a \' and then another charactrer requiring $'' quoting, the '$' at the start of the quoted string ends up missing: $ env printf '%q\n' $'\1\'\2

[PATCH] renameatu: handle ENOSYS from renameatx_np

2024-04-02 Thread Pádraig Brady
ions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5c51c94166..1fda03418b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-04-02 Pádraig Brady + + renameatu: handle ENOSYS from renameatx_np + * lib/renameatu.c(): Fall back to renameat() without R

Re: quotearg: shell escape issue with single quote

2024-03-31 Thread Pádraig Brady
On 31/03/2024 02:16, Grisha Levit wrote: If a string starts with a sequence that requires $'' quoting followed by a \' and then another charactrer requiring $'' quoting, the '$' at the start of the quoted string ends up missing: $ env printf '%q\n' $'\1\'\2' '\001'\'''$'\002' Indeed

Re: bug#70104: "FAIL: test-canonicalize" coreutils v9.5 on musl libc

2024-03-31 Thread Pádraig Brady
On 31/03/2024 10:02, Adept's Lab wrote: test-canonicalize.c:411: assertion 'strcmp (result1, "//") == 0' failed ^ the only error log message I get. Fail was not presented with previous stable versions. This is on musl 1.1.24 as detailed at: https://github.com/coreutils/coreutils/issues/83

Re: gnulib-tool.py: Display specified modules in bold.

2024-03-31 Thread Pádraig Brady
On 30/03/2024 23:38, Bruno Haible wrote: Hi Pádraig, As a matter of interest, where did you get the figure that 94% of users have a $TERM set to xterm.* ? Personal guesses / estimations :-D. +def get_terminfo_string(capability: str) -> str: +'''Returns the value of a string-type

Re: gnulib-tool.py: Display specified modules in bold.

2024-03-30 Thread Pádraig Brady
On 29/03/2024 21:59, Bruno Haible wrote: Pádraig Brady wrote: You could determine that programatically with something like: if os.system(r'{ tput bold || tput md; } >/dev/null 2>&1') == 0: # enable bold output As a matter of interest, where did you get the figure that 94% of

Re: gnulib-tool.py: Display specified modules in bold.

2024-03-29 Thread Pádraig Brady
On 29/03/2024 13:12, Collin Funk wrote: I noticed that the bold printing was missing. One of the most important changes I've made yet. You could determine that programatically with something like: if os.system(r'{ tput bold || tput md; } >/dev/null 2>&1') == 0: # enable bold output cheers,

Re: bug#70070: FAIL: test-localtime_r

2024-03-29 Thread Pádraig Brady
On 29/03/2024 12:40, Andreas Schwab wrote: FAIL: test-localtime_r == test-localtime_r.c:58: assertion 'result->tm_hour == 18' failed FAIL test-localtime_r (exit status: 134) FAIL: test-localtime_r-mt = thread2 disturbed by thread1! thread1 disturbed

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 39.

2024-03-03 Thread Pádraig Brady
On 03/03/2024 05:33, Collin Funk wrote: On 3/2/24 7:02 PM, Collin Funk wrote: When working on the one of the TODO entries I noticed that the gnulib-comp.m4 output was incorrect. Here is the item I was working on. I _think_ I understood it correctly but you guys are much more talented at shell

Re: sort dynamic linking overhead

2024-02-28 Thread Pádraig Brady
On 27/02/2024 21:36, Bruno Haible wrote: Pádraig Brady wrote: Does this work for all the various names of libcrypto in various distros? Debian 12 libcrypto.so.3 Ubuntu 22.04libcrypto.so.1.1 libcrypto.so.3 Slackware 15libcrypto.so.1.1 openSUSE 15.5 libcrypto.so.1.1 CentOS Stream

Re: sort dynamic linking overhead

2024-02-27 Thread Pádraig Brady
On 27/02/2024 11:15, Bruno Haible wrote: Paul Eggert wrote: I installed the attached patch into coreutils. With it, 'sort -R' continues to use MD5 but on GNUish platforms 'sort' links libcrypto dynamically only if -R is used (Bruno's suggestion). This doesn't significantly affect 'sort -R'

Re: sort dynamic linking overhead

2024-02-26 Thread Pádraig Brady
On 26/02/2024 18:06, Andreas Schwab wrote: On Feb 26 2024, Pádraig Brady wrote: https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=3bbdb3938 It's still bad as it adds a hidden dependency that is invisible to rpm. Right. In practice though since coreutils also links libcrypto

Re: sort dynamic linking overhead

2024-02-26 Thread Pádraig Brady
On 26/02/2024 17:39, Bruno Haible wrote: Pádraig Brady wrote: + void *handle = dlopen ("libcrypto.so", RTLD_LAZY | RTLD_GLOBAL); That only works if libopenssl-devel is installed. Good spot. I'd already pushed a fix for this at: https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=co

Re: sort dynamic linking overhead

2024-02-26 Thread Pádraig Brady
On 26/02/2024 17:11, Andreas Schwab wrote: On Feb 25 2024, Paul Eggert wrote: +/* Dynamically link the crypto library, if it needs linking. */ +static void +link_libcrypto (void) +{ +#if DLOPEN_LIBCRYPTO && HAVE_OPENSSL_MD5 + void *handle = dlopen ("libcrypto.so", RTLD_LAZY | RTLD_GLOBAL);

Re: sort dynamic linking overhead

2024-02-26 Thread Pádraig Brady
On 26/02/2024 06:44, Yann Collet wrote: * xxhash128 is not a cryptographic hash function, so it doesn't attempt tobe random. Just a correction : xxh128 does try to be random. And quite hardly: a significant amount of development is spent on ensuring this property. It’s even tested with

Re: [GNULIB PATCH] selinux: add stubs and wrappers for raw counterparts

2023-12-19 Thread Pádraig Brady
On 19/12/2023 14:54, Christian Göttsche wrote: Add stubs and wrappers of already covered libselinux interfaces for their `raw` counterparts. These counterparts perform the same operation expect for context translation. Context translation is used to convert SELinux MCS/MLS labales into human

Re: bug#67731: bootstrap, tries to fetch files although using --no-git --skip-po and --gnulib-srcdir...

2023-12-10 Thread Pádraig Brady
On 10/12/2023 15:33, Bruno Haible wrote: Pádraig Brady wrote: The attached adjusts bootstrap so the options are passed through the upgrade_bootstrap() function. What about the upgrade_bootstrap invocation in top/bootstrap line 195? Does it need the change as well? Oh I see; build-aux

Re: bug#67731: bootstrap, tries to fetch files although using --no-git --skip-po and --gnulib-srcdir...

2023-12-10 Thread Pádraig Brady
| 6 ++ build-aux/bootstrap | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a3429e03b..b0d748029d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-12-10 Pádraig Brady + + bootstrap: fix option propagation

Re: [PATCH] base32, base64: disallow non-canonical encodings

2023-10-27 Thread Pádraig Brady
On 27/10/2023 10:23, Simon Josefsson wrote: Pádraig Brady writes: However if there are good use-cases for bad inputs we may need to adjust this patch, rather than failing unconditionally. For example we could just flag non canonical input in the context, and leave it up to the caller how

Re: [PATCH] base32, base64: disallow non-canonical encodings

2023-10-27 Thread Pádraig Brady
On 27/10/2023 08:28, Simon Josefsson wrote: Pádraig Brady writes: To give a little more context, this will avoid round trip issues like the following, by failing early: $ echo "HelloWorld==" | base64 -d | base64 HelloWorlQ== Thanks for background and patches! There are

Re: [PATCH] base32, base64: disallow non-canonical encodings

2023-10-26 Thread Pádraig Brady
On 26/10/2023 16:38, Pádraig Brady wrote: Unconditionally disallow encodings that don't have appropriate zero bits before padding characters. This handles one class of encoding variations discussed at: https://eprint.iacr.org/2022/361.pdf Note the other variations discussed there, due

[PATCH] base32, base64: disallow non-canonical encodings

2023-10-26 Thread Pádraig Brady
-base32.c | 15 +++ tests/test-base64.c | 9 + 5 files changed, 59 insertions(+) diff --git a/ChangeLog b/ChangeLog index fed7803763..2a42cd4217 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-10-26 Pádraig Brady + + base32, base64: disallow non-canonical

Re: new modules nan, qnan, snan

2023-10-13 Thread Pádraig Brady
Hi Bruno, coreutils ci fails due to modules/snan referring to a non existent m4/snan.m4 file. cheers, Pádraig

Re: sort dynamic linking overhead

2023-10-09 Thread Pádraig Brady
On 08/10/2023 21:53, Pádraig Brady wrote: On 08/10/2023 14:36, Pádraig Brady wrote: On 07/10/2023 22:29, Paul Eggert wrote: On 2023-10-07 04:42, Pádraig Brady wrote: The auto linking is globally controlled with the --with-openssl cofigure option, but you could build sort (and md5sum) without

sort dynamic linking overhead

2023-10-08 Thread Pádraig Brady
On 08/10/2023 14:36, Pádraig Brady wrote: On 07/10/2023 22:29, Paul Eggert wrote: On 2023-10-07 04:42, Pádraig Brady wrote: The auto linking is globally controlled with the --with-openssl cofigure option, but you could build sort (and md5sum) without that dependency with:   ./configure

Re: sort and -lm

2023-10-08 Thread Pádraig Brady
On 07/10/2023 22:29, Paul Eggert wrote: On 2023-10-07 04:42, Pádraig Brady wrote: The auto linking is globally controlled with the --with-openssl cofigure option, but you could build sort (and md5sum) without that dependency with:   ./configure ac_cv_lib_crypto_MD5=no Thanks, I

Re: sort and -lm

2023-10-07 Thread Pádraig Brady
On 07/10/2023 04:38, Paul Eggert wrote: On 2023-10-06 19:33, Bruno Haible wrote: Why would that be a problem? The average run time of a 'sort' invocation is long enough that an additional link dependency to libm shouldn't matter. We've avoided -lm in the past, I think more to avoid the

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-21 Thread Pádraig Brady
On 21/09/2023 21:43, Bruno Haible wrote: Pádraig Brady wrote: I was trying to use -Wpedantic to check for standards conformance, where some code compilable on gcc 13 by default, is no longer compilable on gcc <= 10. ?? Do you mean, you want to use gcc 13 with some specific options, in or

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-21 Thread Pádraig Brady
On 21/09/2023 22:31, Paul Eggert wrote: On 2023-09-21 13:21, Pádraig Brady wrote: I was trying to use -Wpedantic to check for standards conformance, where some code compilable on gcc 13 by default, is no longer compilable on gcc <= 10. Like Bruno, I've not had much luck with -Wpedan

Re: ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

2023-09-21 Thread Pádraig Brady
On 02/09/2023 18:54, Bruno Haible wrote: Bjarni Ingi Gislason wrote: While compiling "groff" with gcc (Debian 13.2.0-2) 13.2.0) and "-std=gnu2x": ../lib/openat-die.c: In function 'openat_save_fail': ./lib/error.h:410:8: warning: ISO C forbids braced-groups within expressions [-Wpedantic]

[PATCH] gnu-web-doc-update: fix updating of manual directory

2023-09-11 Thread Pádraig Brady
changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 88e1d80ce7..ac57b7b5bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-09-11 Pádraig Brady + + gnu-web-doc-update: fix updating of manual directory + * build-aux/gnu-web-doc-update: Change

Re: readutmp, boot-time: Use the BSD sysctl as fallback

2023-08-13 Thread Pádraig Brady
On 12/08/2023 14:22, Bruno Haible wrote: The best approaches to get the boot time access some files. For the case of programs that execute in Docker containers on Linux, we have the fallback that relies on the kernel's uptime counter — although it produces wrong values in a VM that has been put

Re: Debugging du v9.3

2023-07-20 Thread Pádraig Brady
On 19/07/2023 19:27, Saulius Krasuckas wrote: Hello, I am trying to build Coreutils-9.3 from source. [1] If I run ./configure && make, it builds. But I noticed that it calculates some things wrong. So I decided to enable some debugging. Any suggestions? Since I found none, I looked up at

Re: uses of xinmalloc and xpmalloc triggered make syntax-check failure

2023-06-09 Thread Pádraig Brady
On 07/06/2023 05:34, Jim Meyering wrote: I noticed some syntax-check failures in diffutils. Its uses of relatively new xinmalloc and xpmalloc functions triggered a "make syntax-check" failure claiming that xalloc.h need not be included, because none of its (old list) functions was used. This

Re: error: Support the compiler's control flow analysis better (was: copy-file: Silence gcc warnings)

2023-06-01 Thread Pádraig Brady
On 01/06/2023 13:10, Bruno Haible wrote: Pádraig Brady wrote: Was there a reason to prefer curly braces there, rather than the more conventional parentheses? '$(error_fns) \(.*%s[:"], .*(name|file)[^"]*\);$$' *.c; \ I had a slight preference for the curly br

Re: error: Support the compiler's control flow analysis better (was: copy-file: Silence gcc warnings)

2023-06-01 Thread Pádraig Brady
On 31/05/2023 18:46, Jim Meyering wrote: On Wed, May 31, 2023 at 9:12 AM Pádraig Brady wrote: - 'error \(.*%s[:"], .*(name|file)[^"]*\);$$' *.c; \ + '${error_fns} \(.*%s[:"], .*(name|file)[^"]*\);$$' *.c; \ Thanks! Was there a reason to prefer curly

Re: error: Support the compiler's control flow analysis better (was: copy-file: Silence gcc warnings)

2023-05-31 Thread Pádraig Brady
On 30/05/2023 22:29, Paul Eggert wrote: On 5/28/23 06:07, Pádraig Brady wrote: There still is a gotcha (hit in dd.c in coreutils) where if you define an error macro yourself you get a macro redefinition error, I see you fixed that by adding a quick "#define _GL_NO_INLINE_ERROR" to

Re: error: Support the compiler's control flow analysis better (was: copy-file: Silence gcc warnings)

2023-05-28 Thread Pádraig Brady
On 28/05/2023 13:50, Pádraig Brady wrote: On 28/05/2023 13:31, Pádraig Brady wrote: On 27/05/2023 21:53, Bruno Haible wrote: +# ifndef _GL_NO_INLINE_ERROR +# undef error +# define error(status, ...) \ + ((rpl_error)(0, __VA_ARGS__), (status) ? exit (status) : (void)0) +# endif We might

Re: error: Support the compiler's control flow analysis better (was: copy-file: Silence gcc warnings)

2023-05-28 Thread Pádraig Brady
On 28/05/2023 13:31, Pádraig Brady wrote: On 27/05/2023 21:53, Bruno Haible wrote: +# ifndef _GL_NO_INLINE_ERROR +# undef error +# define error(status, ...) \ + ((rpl_error)(0, __VA_ARGS__), (status) ? exit (status) : (void)0) +# endif We might need to cast STATUS to bool to avoid

Re: error: Support the compiler's control flow analysis better (was: copy-file: Silence gcc warnings)

2023-05-28 Thread Pádraig Brady
On 27/05/2023 21:53, Bruno Haible wrote: Paul Eggert wrote: Maybe by defining error and error_at_line as inline functions They're defined by glibc, no? The definitions might collide. Yes, they are defined in glibc. Overriding functions without causing collisions is our core expertise here

Re: copy-file: Silence gcc warnings

2023-05-26 Thread Pádraig Brady
On 26/05/2023 18:34, Bruno Haible wrote: In GNU gettext, I see these compilation warnings with gcc 13.1.0: gcc ... -Wall -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough

Re: nstrftime.c fails to build due to memset overflow

2023-05-19 Thread Pádraig Brady
On 19/05/2023 17:39, Bruno Haible wrote: Pádraig Brady wrote: I'm going to keep this one. ... I've lost many hours to analyzing false positives from this one ... and I've never found a real issue identified by this warning. But can you please remove the line # FP wth -O0 in nstrftime.c w

Re: [PATCH] hash: pacify gcc -Wsuggest-attribute=const

2023-05-19 Thread Pádraig Brady
On 19/05/2023 12:03, Bruno Haible wrote: Hi Pádraig, diff --git a/lib/hash.c b/lib/hash.c index 918aa0d1c3..332cca6df9 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -492,7 +492,7 @@ check_tuning (Hash_table *table) TUNING, or return 0 if there is no possible way to allocate that many

[PATCH] hash: pacify gcc -Wsuggest-attribute=const

2023-05-19 Thread Pádraig Brady
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-05-19 Pádraig Brady + + hash: pacify gcc -Wsuggest-attribute=const + * lib/hash.c (compute_bucket_size): Change _GL_ATTRIBUTE_PURE + to _GL_ATTRIBUTE_CONST as suggested by GCC 13 with -flto. + 2023-05-19 Pádraig Brady

[PATCH] modechange: pacify gcc -Wsuggest-attribute=pure

2023-05-19 Thread Pádraig Brady
/ChangeLog @@ -1,3 +1,9 @@ +2023-05-19 Pádraig Brady + + modechange: pacify gcc -Wsuggest-attribute=pure + * lib/modechange.h (mode_adjust): Add _GL_ATTRIBUTE_PURE + suggested with GCC 12 with -flto. + 2023-05-18 Bruno Haible getndelim2: Silence gcc warning. diff --git

Re: nstrftime.c fails to build due to memset overflow

2023-05-19 Thread Pádraig Brady
On 18/05/2023 22:27, Paul Eggert wrote: Let's revert the "avoid incorrect -Wmaybe-uninitialized warnings" patch. --enable-gcc-warnings is designed for the default gcc -O2, and we shouldn't dumb down our source code for lesser platforms like "gcc -O0", or clang, or whatever. OK I'll revert. I

Re: nstrftime.c fails to build due to memset overflow

2023-05-19 Thread Pádraig Brady
On 18/05/2023 22:43, Paul Eggert wrote: --- a/configure.ac +++ b/configure.ac @@ -261,6 +261,11 @@ if test $gl_gcc_warnings != no; then # FP in careadlinkat.c w/gcc 10.0.1 20200205 gl_WARN_ADD([-Wno-return-local-addr]) + # FIXME: remove this line when gcc improves + #

Re: nstrftime.c fails to build due to memset overflow

2023-05-18 Thread Pádraig Brady
On 14/03/2023 16:50, Pádraig Brady wrote: On 14/03/2023 13:55, Marcus Müller wrote: Dear Gnulib community, On Linux, x86_64, Fedora 37, ran, on today's coreutils' HEAD (e68b15), which submodule-includes gnulib f17d3977: CFLAGS=-Wno-deprecated-declarations ./configure (as that CFLAGS

Re: [PATCH] timespec: fill in other members

2023-05-15 Thread Pádraig Brady
On 15/05/2023 07:30, Paul Eggert wrote: This problem was found when compiling GNU Emacs with --enable-gcc-warnings on a platform where tv_sec is 64 bits and tv_nsec is 32 bits, and struct timespec has padding. GCC -Wuse-of-uninitialized-value complained when a struct timespec initialized only

Re: coreutils CI

2023-05-13 Thread Pádraig Brady
On 11/05/2023 15:31, Bruno Haible wrote: Pádraig Brady wrote: @Padraig: you're at least doing some pre-release tests on several platforms, but that's no real CI, is it? Right. No real CI at present. It would be good though, directly for coreutils and indirectly for gnulib. We have a CI

Re: coreutils CI

2023-05-11 Thread Pádraig Brady
On 11/05/2023 07:58, Bernhard Voelker wrote: On 5/9/23 20:57, Bruno Haible wrote: Bernhard Voelker wrote: I noticed the issue because the following "very-expensive" tests failed (which succeeded with coreutils-9.3): FAIL: tests/rm/ext3-perf FAIL: tests/rm/many-dir-entries-vs-OOM

Re: Add more reminders to include

2023-04-13 Thread Pádraig Brady
On 12/04/2023 18:51, Bruno Haible wrote: Pádraig Brady wrote: CC src/cksum-crctab.o In file included from ./lib/time.h:50, from /usr/include/sys/time.h:421, from ./lib/sys/time.h:39, from /usr/include/sys/select.h:23, from ./lib/sys/select.h:36, from /usr/sfw/lib/gcc/sparc-sun-solaris2.10

Re: stddef: Define 'unreachable', for ISO C 23 compliance

2023-04-10 Thread Pádraig Brady
On 10/04/2023 19:05, Pádraig Brady wrote: On 10/04/2023 18:46, Bruno Haible wrote: Hi Pádraig, +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn The above _Noreturn is causing a build failure on Solaris 10 on Sparc. A bui

Re: stddef: Define 'unreachable', for ISO C 23 compliance

2023-04-10 Thread Pádraig Brady
On 10/04/2023 18:46, Bruno Haible wrote: Hi Pádraig, +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn The above _Noreturn is causing a build failure on Solaris 10 on Sparc. A build failure of which package, which version? Can you

Re: stddef: Define 'unreachable', for ISO C 23 compliance

2023-04-10 Thread Pádraig Brady
On 16/03/2023 12:48, Bruno Haible wrote: ISO C 23 § 7.21.1 requires that implements 'unreachable'. This patch does it. 2023-03-16 Bruno Haible stddef: Define 'unreachable', for ISO C 23 compliance. * lib/verify.h (_GL_HAS_BUILTIN_UNREACHABLE): Don't define if already

Re: recommending AC_SYS_YEAR2038_REQUIRED ?

2023-04-10 Thread Pádraig Brady
On 10/04/2023 14:40, Bruno Haible wrote: Hi Paul, In yesterday's changes, you added to the Gnulib documentation, section "Avoiding the year 2038 problem", wording that * explicitly recommends the ‘year2038-required’ module, which does AC_REQUIRE([AC_SYS_YEAR2038_REQUIRED]): "The

Re: bug#62607: cp --recursive --backup broken in 9.2

2023-04-04 Thread Pádraig Brady
On 03/04/2023 18:19, Pádraig Brady wrote: On 02/04/2023 13:40, Pádraig Brady wrote: For completeness the correct repro is: mkdir -p {src,dst}/foo touch {src,dst}/foo/bar cp --recursive --backup src/* dst The attached two patches should address this. The first fixes the bug

Re: bug#62607: cp --recursive --backup broken in 9.2

2023-04-03 Thread Pádraig Brady
On 02/04/2023 13:40, Pádraig Brady wrote: On 01/04/2023 23:40, Kristian Klausen via GNU coreutils Bug Reports wrote: Hi After upgrading to coreutils 9.2-2 on Arch Linux the following: mkdir -p src dst touch {src,dst}/bar cp --recursive --backup src/* dst fails with: cp: cannot create regular

Re: *printf-posix: ISO C 23: Add %b directive for binary output of integers

2023-03-18 Thread Pádraig Brady
On 17/03/2023 21:51, Bruno Haible wrote: This set of patches adds support for the %b format string directive, required by ISO C 23, to the *printf family of functions. So far, only glibc implements it (since version 2.35). For portability to the other platforms, use the *printf-posix modules.

Re: nstrftime.c fails to build due to memset overflow

2023-03-14 Thread Pádraig Brady
On 14/03/2023 13:55, Marcus Müller wrote: Dear Gnulib community, On Linux, x86_64, Fedora 37, ran, on today's coreutils' HEAD (e68b15), which submodule-includes gnulib f17d3977: CFLAGS=-Wno-deprecated-declarations ./configure (as that CFLAGS is necessary, otherwise sha will fail to build due

Re: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-03-06 Thread Pádraig Brady
On 06/03/2023 07:37, Paul Eggert wrote: I recall reading somewhere in this thread that a 'split' test was failing on macOS because it doesn't let you lseek on /dev/null. I fixed that problem here:

Re: 回复: lib/fts.c: return when malloc failed

2023-02-27 Thread Pádraig Brady
On 27/02/2023 11:36, ChuanGang Jiang wrote: I found this by accident and then reproduce it through artificial mem pressure test. And I update the patch as you said. *lib/fts.c:return when malloc failed in function setup_dir() --- lib/fts.c | 6 +- 1 file changed, 5 insertions(+), 1

Re: lib/fts.c: return when malloc failed

2023-02-26 Thread Pádraig Brady
On 26/02/2023 14:46, ChuanGang Jiang wrote: Hi,‘rm’ of coreutils was terminated with signal SIGSEGV, Segmentation fault. Here is the backtrace with gdb. Core was generated by `/usr/bin/rm -rf test1/test2/'. Program terminated with signal SIGSEGV, Segmentation fault. #0 cycle_check (state=0x0,

Re: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-25 Thread Pádraig Brady
On 24/02/2023 23:23, George Valkov wrote: Are we in a state where I can update OpenWRT to the latest coreutils master or perhaps it would be better to wait until you fix the tests and coreutils-9.2 is released? You mentioned the release is coming soon? Probably best to wait for the 9.2

Re: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-24 Thread Pádraig Brady
On 24/02/2023 22:06, George Valkov wrote: If I revert a0803c4bad6f8e11bb05effcc42ef433f4fc3f9b, the requirement to press enter after PASS: tests/rm/isatty.sh is fixed. Ah very useful info. I'll test this on my macOS 13.2 system. Sometimes it might randomly hang: gdb after PASS:

Re: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-24 Thread Pádraig Brady
On 24/02/2023 14:33, George Valkov wrote: On 2023-02-24, at 12:23 AM, Paul Eggert wrote: On 2/20/23 13:14, Pádraig Brady wrote: Since https://github.com/coreutils/gnulib/commit/4db8db34 gnulib has been unconditionally replacing lseek() on macos. Now with SEEK_DATA undefined that replaced

Re: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-23 Thread Pádraig Brady
On 23/02/2023 22:23, Paul Eggert wrote: On 2/20/23 13:14, Pádraig Brady wrote: Since https://github.com/coreutils/gnulib/commit/4db8db34 gnulib has been unconditionally replacing lseek() on macos. Now with SEEK_DATA undefined that replaced lseek() will run the code intended for BeOS. So either

Re: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-20 Thread Pádraig Brady
On 20/02/2023 19:35, George Valkov wrote: On 2023-02-20, at 7:49 PM, Pádraig Brady wrote: On 20/02/2023 15:02, George Valkov wrote: Hi Paul, the following tests fail after your patch: FAIL: tests/split/filter.sh FAIL: tests/split/b-chunk.sh FAIL: tests/split/l-chunk.sh These look

Re: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-20 Thread Pádraig Brady
On 20/02/2023 15:02, George Valkov wrote: Hi Paul, the following tests fail after your patch: FAIL: tests/split/filter.sh FAIL: tests/split/b-chunk.sh FAIL: tests/split/l-chunk.sh These look unrelated and may be due to some other change in your environment. Specifically lseek() is failing on

Re: bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS

2023-02-19 Thread Pádraig Brady
On 19/02/2023 06:08, Paul Eggert wrote: George, given what you've written I suppose we should give up the idea of copying sparse files efficiently on macOS (and on FreeBSD 13.0-RELEASE, as it has a similar bug with SEEK_HOLE and SEEK_DATA), in cases where fclonefileat does not work. Please try

Re: Improve support for ACLs in coreutils (ls & chmod) following the Solaris way

2023-01-16 Thread Pádraig Brady
On 16/01/2023 15:03, Ondrej Valousek wrote: Hi, As per our conversation with Bruno I was thinking if it would make a sense to extend support of ACLs in gnulib/coreutils, mainly covering "ls" (1st stage) and "chmod" (2nd stage) with the goal to have the ACLs better understandable for end

[PATCH] doc: poll: document poll of special files not supported on macOS

2022-12-02 Thread Pádraig Brady
.m4| 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90664d16a5..aa24e4d999 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2022-12-02 Pádraig Brady + + doc: poll: document poll of special files not supported on ma

Re: [PATCH] add new ronna and quetta SI prefixes

2022-11-29 Thread Pádraig Brady
On 29/11/2022 17:37, Bruno Haible wrote: The code looks good; thanks! As voted for in Nov 2022 but the BIPM: What does 'but' mean here? Did you mean "by the BIPM"? Right, had just fixed that locally :) thanks, Pádraig

[PATCH] add new ronna and quetta SI prefixes

2022-11-29 Thread Pádraig Brady
changed, 21 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1b00bf5c9..12887e3917 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2022-11-29 Pádraig Brady + + add new ronna and quetta SI prefixes + As voted for in Nov 2022 but the BIPM: + https

Re: [PATCH] maintainer-makefile: Fix Apple Xcode 'make syntax-check'.

2022-11-15 Thread Pádraig Brady
On 01/11/2022 08:12, Simon Josefsson via Gnulib discussion list wrote: Bruno Haible writes: Hi Simon, + @if ! indent --version 2> /dev/null | grep -q 'GNU indent'; then\ As mentioned in the Autoconf manual [1], the grep option '-q' is not portable. E.g. on Solaris 10: $ echo | grep

Re: [PATCH] fix descriptions for AT_NO_AUTOMOUNT

2022-03-14 Thread Pádraig Brady
On 14/03/2022 13:24, Alejandro Colomar (man-pages) wrote: [Added a few CCs from the relevant kernel commits] Hi Pádraig, On 3/10/22 14:46, Pádraig Brady wrote: On 10/03/2022 07:44, Andreas Schwab wrote: On Mär 09 2022, Paul Eggert wrote: I audited gnulib's uses of fstatat and found one

Re: [PATCH] fix descriptions for AT_NO_AUTOMOUNT

2022-03-10 Thread Pádraig Brady
On 10/03/2022 19:29, Paul Eggert wrote: On 3/10/22 05:46, Pádraig Brady wrote: After looking at the kernel code, it seems that:   fstatat() did _not_ imply AT_NO_AUTOMOUNT from 2.6.38 -> 4.11     I'm not sure it even honored the AT_NO_AUTOMOUNT flag before 4.11   fstatat() did im

[PATCH] fix descriptions for AT_NO_AUTOMOUNT

2022-03-10 Thread Pádraig Brady
On 10/03/2022 07:44, Andreas Schwab wrote: On Mär 09 2022, Paul Eggert wrote: I audited gnulib's uses of fstatat and found one fishy one that doesn't use AT_NO_AUTOMOUNT, namely, in fts.c where the follow-symlink branch uses 'stat' whereas the no-follow-symlink branch uses fstatat without

[PATCH] fcntl-h: add AT_NO_AUTOMOUNT

2022-03-07 Thread Pádraig Brady
/ChangeLog @@ -1,3 +1,9 @@ +2022-03-07 Pádraig Brady + + fcntl-h: add AT_NO_AUTOMOUNT + * lib/fcntl.in.h: Define AT_NO_AUTOMOUNT to 0 where not defined. + This is available on Linux since 2.6.38. + 2022-03-01 Paul Eggert Create lib/Makefile.am after gnulib-comp.m4 diff

Re: [PATCH] argmatch: add variants that only match full argument

2022-01-30 Thread Pádraig Brady
On 30/01/2022 18:58, Bruno Haible wrote: Pádraig Brady wrote: * lib/argmatch.h (argmatch_exact, [X]ARGMATCH_EXACT): New interfaces that don't support abbreviations. * lib/argmatch.c (argmatch_exact, __xargmatch_exact_internal): Likewise. * tests/test-argmatch.c: Add tests. The code looks

argmatch: add variants that only match full argument

2022-01-30 Thread Pádraig Brady
I would like a more constrained argument matching to improve forward compatibility and robustness. For example I would like `cksum -a sha3` to _not_ be equivalent to `cksum -a sha386`, so that a user specifying `-a sha3` on an older cksum would not be surprised. Also argmatch() is used when

[PATCH] argmatch: add variants that only match full argument

2022-01-30 Thread Pádraig Brady
+ lib/argmatch.h| 17 + tests/test-argmatch.c | 23 +++ 4 files changed, 85 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4c9a1e7989..e51a00190a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2022-01-30 Pádraig

Re: [PATCH] copy-file-range: work around Linux kernel bug

2022-01-16 Thread Pádraig Brady
On 16/01/2022 18:06, Paul Eggert wrote: On 1/16/22 05:37, Pádraig Brady wrote: This looks like the replacement will only be used when the build system uses an older kernel? If so this seems brittle. Consider the case where el7 rpms are being built on central build systems with newer kernels

Re: [PATCH] copy-file-range: work around Linux kernel bug

2022-01-16 Thread Pádraig Brady
On 15/01/2022 01:33, Paul Eggert wrote: --- a/m4/copy-file-range.m4 +++ b/m4/copy-file-range.m4 @@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_COPY_FILE_RANGE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) +

[PATCH] maintainer-makefile: add 'can' to sc_prohibit_doubled_word

2021-09-09 Thread Pádraig Brady
2021-09-09 Pádraig Brady + + maintainer-makefile: add 'can' to sc_prohibit_doubled_word + * top/maint.mk (sc_prohibit_doubled_word): Check for "can can". + 2021-09-08 Paul Eggert strerror_r-posix: port even better to Android diff --git a/top/maint.mk b/top/main

Re: Seeking input from developers: glibc copyright assignment policy.

2021-06-15 Thread Pádraig Brady
On 15/06/2021 13:03, Eric Blake wrote: On Mon, Jun 14, 2021 at 01:39:26PM -0700, Paul Eggert wrote: A proposal to change the glibc copyright assignment policy is being circulated on libc-alpha. The email thread starts at , and

Re: [PATCH] mountlist: recognize fuse.portal as dummy file system

2021-06-07 Thread Pádraig Brady
On 07/06/2021 13:43, Kamil Dudka wrote: This was originally proposed at: https://lists.gnu.org/archive/html/bug-gnulib/2021-02/msg00053.html As the full review might take some time, would it be possible to apply at least the part related to fuse.portal file systems? They started to cause

Re: *alloc-gnu on glibc

2021-05-15 Thread Pádraig Brady
b38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2021-05-15 Pádraig Brady + + realloc-gnu: avoid glibc MALLOC_CHECK_ issue + * tests/test-realloc-gnu.c (main): if MALLOC_CHECK_ env var + is set then don't check ENOMEM is returned from realloc(). + See https://sourceware.org/bugzi

Re: *alloc-gnu on glibc

2021-05-15 Thread Pádraig Brady
On glibc-2.31-5.fc32.x86_64 I'm seeing this test failure with coreutils, since the tests are now checking for a specific errno. I just checked a later Fedora 34 system which has the same issue. Specifically test-realloc-gnu is enabled in coreutils and it's failing as realloc is returning NULL as

Re: Suggested fix to mountlist.c: Define fuse.portal, devtmpfs and squashfs mounts as dummy

2021-02-12 Thread Pádraig Brady
On 13/02/2021 01:40, Daniel Bonner wrote: Hi gnulib developers, At present many gnulib users encounter this error: Running 'df' as user (not root) causes results in output that includes this error message: "df: /run/user/1000/doc: Operation not permitted" I would like to pass on to you a

Re: different CFLAGS for gnulib code?

2021-01-17 Thread Pádraig Brady
On 15/01/2021 08:55, Bruno Haible wrote: I always thought that GNU package maintainers want their entire package to be compiled with the same CFLAGS and CPPFLAGS. Would compiling the gnulib part with options for fewer warnings be OK with you? Paul, Pádraig, Jim, Paul, Akim, Simon, all: what's

Re: [PATCH] free: preserve errno

2020-12-17 Thread Pádraig Brady
On 17/12/2020 09:54, Paul Eggert wrote: * lib/free.c (rpl_free): Preserve errno. Check for null only if CANNOT_FREE_NULL is defined, as an optimization for POSIX 2008 platforms that do not preserve errno. * m4/free.m4 (gl_FUNC_FREE): Check whether free preserves errno. Also, define

[PATCH] selinux-at, selinux-h: use const correct declarations

2020-11-23 Thread Pádraig Brady
ib/selinux-at.h| 4 ++-- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 044b12d8c..a17f2b208 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-11-23 Pádraig Brady + + selinux-at, selinux-h: use const correct declarations +

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Pádraig Brady
On 22/11/2020 17:56, Pádraig Brady wrote: On 22/11/2020 14:27, Bernhard Voelker wrote: On 11/22/20 1:28 PM, Kamil Dudka wrote: The coreutils patch introduced tab-indented lines into src/mv.c, which otherwise does not use tabs for indentation. This is caught by a syntax-check rule as well

Re: [PATCH] selinux-h: add stubs for selabel_open etc.

2020-11-22 Thread Pádraig Brady
On 22/11/2020 14:27, Bernhard Voelker wrote: On 11/22/20 1:28 PM, Kamil Dudka wrote: The coreutils patch introduced tab-indented lines into src/mv.c, which otherwise does not use tabs for indentation. This is caught by a syntax-check rule as well. Fixed with the attached patch - as well as 2

  1   2   3   4   5   6   7   8   9   >