[PATCH] Avoid -Wformat=security failures with --disable-nls

2025-01-17 Thread Pádraig Brady
ions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a77ff50a8..f80d7579c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-01-17 Pádraig Brady + + Avoid -Wformat=security failures with --disable-nls + This was noticed with GCC 14. + * lib/xmemcoll.c: Always use forma

Re: [PATCH] readutmp: work around glibc utmpx bug

2025-01-16 Thread Pádraig Brady
On 30/07/2023 14:21, Bruno Haible wrote: Paul Eggert wrote: +static void +copy_utmp_entry (STRUCT_UTMP *dst, STRUCT_UTMP *src) +{ +#if __GLIBC__ && _TIME_BITS == 64 + /* Convert from external form in SRC to internal form in DST. + It is OK to convert now, rather than earlier, before + d

[PATCH] file-has-acl: handle listxattr returning ENOTSUP

2025-01-15 Thread Pádraig Brady
+ lib/file-has-acl.c | 7 --- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index bef68432ee..9b8b525ee8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2025-01-15 Pádraig Brady + + file-has-acl: handle listxattr returni

Re: collision of static_assert macros

2025-01-14 Thread Pádraig Brady
On 14/01/2025 21:42, Paul Eggert wrote: On 2025-01-14 11:46, Pádraig Brady wrote: Testing https://www.pixelbeat.org/co/coreutils-ss.tar.xz on solaris 11 (cfarm216.cfarm.net) I get a build failure (with gcc 14) due to an already known issue on solaris where it defines a two param static_assert

collision of static_assert macros

2025-01-14 Thread Pádraig Brady
Testing https://www.pixelbeat.org/co/coreutils-ss.tar.xz on solaris 11 (cfarm216.cfarm.net) I get a build failure (with gcc 14) due to an already known issue on solaris where it defines a two param static_assert() macro. CC lib/libcoreutils_a-xfts.o ./lib/dirent.h:100:36: error: macro "

Re: [PATCH] fix consistency issues in set_program_name()

2025-01-12 Thread Pádraig Brady
program_invocation_short_name * lib/progname.c (set_program_name): Keep program_invocation_name and program_invocation_short_name consistent. --- ChangeLog | 6 ++ lib/progname.c | 11 +-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ccd

[PATCH] fix consistency issues in set_program_name()

2025-01-12 Thread Pádraig Brady
2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6ccd999e80..b52a2799b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-01-12 Pádraig Brady + + progname: also set program_invocation_short_name + * lib/progname.c (set_program_name): Keep program_i

Re: bug#74692: ls -la unexpected output on NFS shares, possibly due to listxattr in gnulib

2025-01-11 Thread Pádraig Brady
On 11/01/2025 13:44, Pádraig Brady wrote: On 11/01/2025 08:37, Paul Eggert wrote: On 2025-01-10 06:48, Pádraig Brady wrote: With the previously discussed ls patch included, we also suppress the error (while indicating the obtainable security context): $ src/ls -l /mnt/nfs total 0 --w

Re: bug#74692: ls -la unexpected output on NFS shares, possibly due to listxattr in gnulib

2025-01-11 Thread Pádraig Brady
On 11/01/2025 08:37, Paul Eggert wrote: On 2025-01-10 06:48, Pádraig Brady wrote: With the previously discussed ls patch included, we also suppress the error (while indicating the obtainable security context): $ src/ls -l /mnt/nfs total 0 --w---. 1 padraig padraig 0 Jan  8 20:42 file I&#x

Re: bug#74692: ls -la unexpected output on NFS shares, possibly due to listxattr in gnulib

2025-01-10 Thread Pádraig Brady
On 10/01/2025 04:46, Paul Eggert wrote: On 2025-01-09 05:29, Pádraig Brady wrote: over NFS with unreadable files you can GET the security.selinux xattr, but you can't LIST any xattrs: Ouch again Also there was a change since coreutils v9.5 where we don't call the GET, Ye

Re: [PATCH 3/3] mktime: improve tm_isdst heuristic

2025-01-05 Thread Pádraig Brady
On 05/01/2025 02:35, Paul Eggert wrote: * lib/mktime.c (__mktime_internal): When tm_isdst disagrees with what was requested, search at most a year (+ stride) from the requested time for a matching tm_isdst, and ignore the request if the search fails. This is more likely to match user expectation

Re: base64: gcc-15 compile issue

2024-12-21 Thread Pádraig Brady
On 21/12/2024 19:58, Jeffrey Walton wrote: On Sat, Dec 21, 2024 at 9:45 AM Bruno Haible via Gnulib discussion list wrote: Rudi Heitbaum wrote: When compiling grub-2.12 with gcc-15-20241208 the following line causes the following error: https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/ba

Re: [PATCH] crc: Add PCLMUL implementation

2024-12-18 Thread Pádraig Brady
g +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-12-18 Pádraig Brady + + crc-x86_64: fix build failure due to indentation + * modules/crc-x86_64: Remove indentation on lib_SOURCES, + so that it's transformed correctly to lib_libcoreutils_a_SOURCES. + 2024-12-17 Bruno Haible crc-x86_64: Twe

Re: Memory requirements for CRC32 calculation

2024-12-05 Thread Pádraig Brady
On 05/12/2024 14:31, Sam Russell wrote: Hi, I've been looking into other CRC32 implementations for architectures that don't have accelerated polynomial multiplication (PCLMUL/VMULL for x86-SSE/AVX or ARM-NEON), and there are improvements we can make, but they make tradeoffs for memory (both fo

Re: announce-gen: Show an SHA256 sum that can be verified more easily

2024-12-02 Thread Pádraig Brady
On 02/12/2024 21:11, Jeffrey Walton wrote: It turns out that Base64 is malleable. All tools do not produce the same results. Also see . Whether Base64 malleability leads to a vulnerability is another question. This might be an issue for non canonicity, particu

Re: bug#74428: tests/printf/printf-cov failure on macOS

2024-11-20 Thread Pádraig Brady
On 19/11/2024 16:08, Bruno Haible wrote: Pádraig Brady wrote: On your macos 15 system, iconv() of 0x30 is failing to convert from utf8 to C, and the fallback in unicodeio.c is outputting the \u0030. Now I don't have access to macos to see exactly why that iconv() is failing, The macOS

Re: bug#74428: tests/printf/printf-cov failure on macOS

2024-11-19 Thread Pádraig Brady
On 19/11/2024 17:34, Bruno Haible wrote: Pádraig Brady wrote: I would prefer to bypass the ASCII case if CODE >= 0 && CODE < 128. However is that generally correct? Yes, at least for CODE >= 32 && CODE < 128 it is correct. This can be seen from the list of supporte

Re: bug#74428: tests/printf/printf-cov failure on macOS

2024-11-19 Thread Pádraig Brady
On 19/11/2024 04:41, Grisha Levit wrote: The u4 and U8 tests in tests/printf/printf-cov.pl fail on macOS 15: u4... printf: test u4: stdout mismatch, comparing u4.1 (expected) and u4.O (actual) *** u4.1Mon Nov 18 23:30:03 2024 --- u4.OMon Nov 18 23:30:03 2024 *** *** 1

Re: bug#73418: ls (GNU coreutils) 9.4 is extremely slower than ls (GNU coreutils) 8.32 listing files on a cifs mounted share

2024-11-11 Thread Pádraig Brady
On 11/11/2024 16:47, Paul Eggert wrote: On 2024-11-10 05:48, Pádraig Brady wrote: BTW I've pushed a tweak to gnulib to avoid a -Werror=unused-variable issue with --disable-acl Thanks, I installed the attached further patch, since the res5t of the file uses MAYBE_UNUSED. Thanks for al

Re: [PATCH] crc: New optimised slice-by-8 implementation

2024-11-03 Thread Pádraig Brady
On 31/10/2024 13:51, Bruno Haible via Gnulib discussion list wrote: Simon Josefsson wrote: I merged this now, thank you! And here's the cross-compilation handling that I promised to add. 2024-10-31 Bruno Haible crc: Don't attempt to run a compiled C program when cross-compiling.

Re: [PATCH] crc: New optimised slice-by-8 implementation

2024-10-31 Thread Pádraig Brady
On 31/10/2024 18:35, Sam Russell wrote: > `cksum -a crc32` could be added I suppose to select the current implementation in gnulib both versions are CRC32 though, and then if you look at the iSCSI/SCTP version they use CRC32-C which uses a totally different polynomial, not just a reversed or

Re: [PATCH] crc: New optimised slice-by-8 implementation

2024-10-31 Thread Pádraig Brady
On 31/10/2024 21:15, Simon Josefsson wrote: Pádraig Brady writes: I'd be reluctant to complicate the gnulib implementations with variants unless needed. I'd be especially reluctant to add the existing cksum crc variant to gnulib, since I don't see anything but cksum itself u

Re: [PATCH] crc: New optimised slice-by-8 implementation

2024-10-31 Thread Pádraig Brady
On 31/10/2024 16:46, Sam Russell wrote: I can extend coreutils cksum if you like, what are your thoughts on adding some parameters to the commandline? Even if it's just an extra flag for --rfc1952 or --gzip to change all the parameters just between these two variants? Well cksum already has t

Re: [PATCH] crc: New optimised slice-by-8 implementation

2024-10-31 Thread Pádraig Brady
On 31/10/2024 12:18, Simon Josefsson via Gnulib discussion list wrote: I merged this now, thank you! FYI, I looked at using this from coreutils cksum, but unfortunately that uses a different CRC-32 variant. For my reference... coreutils cksum parameters: Polynomial: 0

Re: Adding slice-by-4 and slice-by-8 to CRC32

2024-10-15 Thread Pádraig Brady
On 15/10/2024 16:50, Jeffrey Walton wrote: On Tue, Oct 15, 2024 at 10:59 AM Pádraig Brady wrote: On 15/10/2024 12:58, Sam Russell wrote: I'm happy with the slice-by-8 code I have <https://github.com/samrussell/gnulib/blob/slice_by_8/lib/crc.c <https://github.com/samrussell/

Re: Adding slice-by-4 and slice-by-8 to CRC32

2024-10-15 Thread Pádraig Brady
On 15/10/2024 12:58, Sam Russell wrote: I'm happy with the slice-by-8 code I have > but the  cksum_pclmul implementation is quite detailed so it would be useful if we

Re: Adding slice-by-4 and slice-by-8 to CRC32

2024-10-15 Thread Pádraig Brady
On 15/10/2024 08:07, Simon Josefsson wrote: The coreutils code is GPL and the crc module in gnulib is LGPL. I'm using the gnulib crc module in some LGPL projects. Is it wortwhile to keep the optimization GPL? I would prefer a LGPL crc module that is performant, with #ifdef-varianted support fo

Re: Adding slice-by-4 and slice-by-8 to CRC32

2024-10-14 Thread Pádraig Brady
On 14/10/2024 15:53, Sam Russell wrote: > For reference, coreutils' cksum uses slice by 8 unconditionally since: > https://github.com/coreutils/coreutils/commit/a7533917e perfect, we could just copy this across then? is there a reason

Re: Adding slice-by-4 and slice-by-8 to CRC32

2024-10-14 Thread Pádraig Brady
On 14/10/2024 11:16, Sam Russell wrote: Hi, First off, this is my first GNU contribution so I have *no idea* what I'm doing, feedback is appreciated. I've noticed that GZIP trails behind zlib in performance and part of this is down to the fact that zlib is using a more efficient CRC32 impleme

Re: Building from the git repository fails with "alias_table defined but not used"

2024-10-02 Thread Pádraig Brady
On 02/10/2024 01:54, Yuri Kanivetsky wrote: Hi, https://gist.github.com/x-yuri/883efd92dff6a1ee77b14cff41c4fb12 I understand now that to make it build I need to configure with --enable-gcc-warnings=no. But is this expected or am I doing something wrong? I mean, shouldn't it build with --enable-

Re: bug#72842: Compile error due to lto warning on Arch Linux -Werror=maybe-uninitialized

2024-08-28 Thread Pádraig Brady
--git a/ChangeLog b/ChangeLog index 8a7f812b67..fdcc79134e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-08-28 Pádraig Brady + + avoid GCC -Wmaybe-uninitialized false positives with LTO + Avoids false warnings with GCC 14.2.1 with -flto + + * lib/canonicalize.c: Initialize

Re: acl, copy-file: First step towards more consistent function names

2024-08-25 Thread Pádraig Brady
On 25/08/2024 11:48, Bruno Haible wrote: Pádraig Brady wrote: I always thought the x...() variants indicate they might eXit(). Are there any other x...() variants that just output a diagnostic, and don't exit()? Indeed, we currently have three categories of x...() variants: - Mo

Re: acl, copy-file: First step towards more consistent function names

2024-08-25 Thread Pádraig Brady
On 24/08/2024 17:49, Bruno Haible wrote: In most Gnulib modules, when we have a function that does something and another function that does the same thing with diagnostics, the common convention is that the latter has an 'x' prefix. Such as for malloc — xalloc vasprintf — xvasprintf getc

Re: [PATCH 2/2] error: merge from glibc and with verror

2024-08-16 Thread Pádraig Brady
On 15/08/2024 23:13, Paul Eggert wrote: Thanks, I installed the attached. Oh it required a change in downstream projects. I assumed it was gnulib specific. Thanks for fixing it in coreutils. Pádraig

Re: [PATCH 2/2] error: merge from glibc and with verror

2024-08-15 Thread Pádraig Brady
On 15/08/2024 02:05, Paul Eggert wrote: delete mode 100644 lib/verror.c From coreutils CI: make[3]: *** No rule to make target '../lib/verror.c', needed by 'coreutils.pot-update'. thanks, Pádraig

Re: test-pthread-rwlock failure on Pop!_OS 22.04 LTS

2024-08-14 Thread Pádraig Brady
On 09/08/2024 11:03, Bruno Haible wrote: Pádraig Brady wrote: FYI coreutils CI started failing with this on cfarm13.cfarm.net (debian 11.9) with: FAIL: test-pthread-rwlock-waitqueue === test-pthread-rwlock-waitqueue.c:234: assertion 'startswith (do_test (&

Re: test-pthread-rwlock failure on Pop!_OS 22.04 LTS

2024-08-08 Thread Pádraig Brady
On 07/08/2024 18:56, Bruno Haible wrote: On 2024-07-07, I stated: This provides enough justification for gnulib to override the glibc behaviour here. I will therefore go ahead and override PTHREAD_RWLOCK_INITIALIZER pthread_rwlock_init pthread_rwlock_attr_init to use PREFER_WRITER or PR

Re: [PATCH] dfa-tests: Detect test-dfa-match-aux error.

2024-08-04 Thread Pádraig Brady
On 04/08/2024 17:23, Bernhard Voelker wrote: -LC_ALL=C returns_ 0 ${CHECKER} test-dfa-match-aux 'x+x+x+' xx > out 2>&1 +LC_ALL=C ${CHECKER} test-dfa-match-aux 'x+x+x+' xx > out 2>&1 || fail=1 Both look good, please push. thanks, Pádraig

Re: test-framework-sh: Fix 'returns_' to not turn off tracing permanently

2024-06-11 Thread Pádraig Brady
On 11/06/2024 19:54, Bruno Haible wrote: I'm debugging a unit test that consists of a dozen of shell statement groups, each with a 'returns_ 1 ...' invocation. The log file shows an error message, but no indication from which of the statement groups the error came. So, naturally, I add a 'set -x'

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 --version)

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 -k

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: === foo

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:

[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 RENAME_EXCL

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 CC'

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 terminf

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

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' perfo

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 libcrypt

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

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 Prac

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

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 with

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 to

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 use

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, d

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

2023-10-26 Thread Pádraig Brady
/test-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-cano

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 was

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 depende

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 -Wpeda

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] 41

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

2023-09-11 Thread Pádraig Brady
date | 2 +- 2 files 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-d

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 t

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 the

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 upda

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

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 rea

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 the

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 -Wno-ped

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 i

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 en

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

2023-05-19 Thread Pádraig Brady
/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 a

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 d

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

2023-05-18 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 + # https://gcc.gn

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

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 vi

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 hav

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 Di

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 ple

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 G

  1   2   3   4   5   6   7   8   9   >