From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by sourceware.org (Postfix) with ESMTPS id 6D2B93858416 for ; Mon, 13 Feb 2023 19:37:04 +0000 (GMT) Authentication-Results: sourceware.org; dmarc=permerror header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M2fHt-1pQIFd42D1-004Aob for ; Mon, 13 Feb 2023 20:37:03 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id C8B0EA80C72; Mon, 13 Feb 2023 20:37:01 +0100 (CET) Date: Mon, 13 Feb 2023 20:37:01 +0100 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] Updated: dash 0.5.12-2 Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <6810586169.20230213204858@yandex.ru> <8a583e14-b413-d1a2-35d9-e76f73a4b338@Shaw.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8a583e14-b413-d1a2-35d9-e76f73a4b338@Shaw.ca> X-Provags-ID: V03:K1:jit1v/e47jhRORhPY7TZlCgWDKvvl5ZN1i4wDP3S4stF9WbH1sv XHyzE0tVKq4+/I2bdaXMlwoqbu+kB9kSsPOjsqzAUtwP3WkkzYAxJXMB8KxI5yaejZW6LhR USlmsAcN3FU31o9W9C4ngPBhxe0quFe+VrMepGs9DTCR5WEoHTfHjDE7oywY7waavUm1KnG nZ+U6JdunGtO9MxIbfZXA== UI-OutboundReport: notjunk:1;M01:P0:mOKfOE8GIvA=;8H6iq6I58v+4KukjxHfor46/OzO BWyFKN1e+82Hd/+xyLB9kHSnwA6gSAI2aefH0x92tsYbXJwjJPYcyyK/djk4CtlQrSUlY23pz dhWFNQ1s1OnaJQ7AYX29MoAFrAEr2z8D8QaT8dzLMIHUe0pUdIz07ItqfdjWmG08lgAepGVrk YQvMllaqIKnDrPNlXk9o12+DfRe/ihB2qB3A8uNbU1mXWmzmLa3oyh4dQ0mRx56xtTENk0C7S u6I12RSYxX+bLh6Gn/uvthRAX5tCkKlyCXCjjyCZ/veX1a4PRJW4icM5kf1w4vAhZ5QtU2uIO RVZ/0OwnG+PRz18IiQxwUkudASzSLRkTlIbU5M83urT5LpmlASMfJv+AH+mrCAs0EdedZFqoy EWKrpqnNsaKkJGPqHip75qr/MIiW993F9HjAEmePl5/j0DCrXyNtM5UCDwlejD5nlg5e9fFzz obF/Tc06H9DYYTSnDQzPBR3v5rp7VTy/RzCU0ZE/X+6pM7m3nXzeweVK0wv3FeIvSAo3/LfUh ti5VlUXlLI4JYALHk2z+5JG3+92Hbf2EENLLdrx3C9loAhWckEKcNrLr+EZo3tC52riSOnvqD Ck8nnwraGum2pKvc75BqeE5uB7lH0ti3PkEjs4R30OUQhKs/RY8+fey8kjVlC39qdsSwRTkR6 fSCrBEzbGJFOMnTFU7gemlO2Nf3jeCUhvf1iHolS6Q== X-Spam-Status: No, score=-97.1 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_DMARC_STATUS,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_FAIL,SPF_HELO_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Feb 13 12:03, Brian Inglis via Cygwin wrote: > On 2023-02-13 10:43, ASSI via Cygwin wrote: > > Corinna Vinschen via Cygwin writes: > > > On Feb 12 22:03, Cygwin dash Co-Maintainer wrote: > > > > The following packages have been upgraded in the Cygwin distribution: > > > > > > > > * dash 0.5.12-2 > > > > > > > > This package is being upgraded to current as the previous release > > > > breaks existing function that may be relied on by some scripts. > > > > This release has been rebuilt disabling libc fnmatch and glob as > > > > Cygwin/winsup/newlib do not support locale dependent named character > > > > classes like glibc. > > > > Can you give me an example? I'm a bit puzzled because fnmatch as well > > > as glob in Cygwin support native characters. > > But not locale dependent named character classes like regexp in paths. I checked the dash code of curent dash git, and while its internal glob implementation supports character classes, they are no localized, using standard singlebyte functions isalnum, isalpha, etc. under the hood. So, yeah, what you say further down this mail... looks like dash supports locale dependent character classes only with glibc. > > AFAIU, the issue was with locale dependent character classes, not > > characters. Andrey specifically mentioned [[:space:]] in the original > > bugreport. > > Specifically support in fnmatch and glob, now updated in glibc, and their > use in dash for parameter expansion in place of (gnulib?) regexp support. > > > > So how do we fix in Cygwin without pulling in GLibc code? > > It's fixed in release 2 which disables 0.5.12 changed default (using > [Cygwin/winsup/newlib] libc fnmatch and glob, without testing > functionality), and goes back to using its own previous default (gnulib?) > regexp code for parameter expansion which supports locale dependent named > character classes. > > As glibc "recently" fixed their fnmatch and glob to support locale dependent > named character classes like [[:blank:]], dash decided to use those in > parameter expansions for consistency, but not exactly clearly documented, > although they added config options to enable/disable each of libc > fnmatch/glob. > > Cygwin bash parameter expansion also supports locale dependent named > character classes. > > $ info bash pattern > $ info sed classes These info pages are mostly target-system independent. There's no guarantee that this works in a Cygwin bash or sed. Either way, I don't care much for what a certain application provides by itself. I'm talking about our libc, that is Cygwin, and what it provides to processes calling its implementations of regcomp/regexec, glob and fnmatch. All these functions have been taken from FreeBSD and all three suffer shortcomings: - regcomp/regexec supports POSIX named character classes, collating symbols, and equivalence class expressions, but all of them only work for ASCII chars. - fnmatch and glob support neither of named character classes, collating symbols, and equivalence class expressions. I checked the upstream code in FreeBSD, OpenBSD and NetBSD and none of these functions are improved to support locales (regcomp) or any of the character classes stuff (fnmatch/glob). So, if we want to add this support to Cygwin (and thus, to all applications calling the libc implementation of these functions), quite a bit of work is required. Being able to fetch the implementation from some other source would reduce the effort enourmously :} Corinna