public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Parameter expansion stopped working in recent ash/dash
@ 2023-02-07 12:07 Andrey Repin
  2023-02-07 17:19 ` Brian Inglis
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Repin @ 2023-02-07 12:07 UTC (permalink / raw)
  To: All

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

Greetings, All!

In the attached script, that I always run using dash, the expansion is
supposed to strip leading/trailing spaces from provided parameter.

The upgrade that took place after which the expansion stopped working is

libsolv:   - dash-0.5.11.5-1.any -> dash-0.5.12-1.any

Downgrading to 0.5.11.5 restored the expected behavior.
I failed to find anything relevant in the dash 0.5.12 patch notes, but perhaps
community could help?


-- 
With best regards,
Andrey Repin
Tuesday, February 7, 2023 14:49:46

Sorry for my terrible english...

[-- Attachment #2: par-ext.sh --]
[-- Type: application/octet-stream, Size: 276 bytes --]

#!/bin/dash -x

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
trim "beta " | od -t x1a
trim "\rgamma	" | od -t x1a

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Parameter expansion stopped working in recent ash/dash
  2023-02-07 12:07 Parameter expansion stopped working in recent ash/dash Andrey Repin
@ 2023-02-07 17:19 ` Brian Inglis
  2023-02-07 19:01   ` Brian Inglis
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Inglis @ 2023-02-07 17:19 UTC (permalink / raw)
  To: cygwin; +Cc: Andrey Repin

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

On 2023-02-07 05:07, Andrey Repin via Cygwin wrote:
> Greetings, All!
> 
> In the attached script, that I always run using dash, the expansion is
> supposed to strip leading/trailing spaces from provided parameter.
> 
> The upgrade that took place after which the expansion stopped working is
> 
> libsolv:   - dash-0.5.11.5-1.any -> dash-0.5.12-1.any
> 
> Downgrading to 0.5.11.5 restored the expected behavior.
> I failed to find anything relevant in the dash 0.5.12 patch notes, but perhaps
> community could help?

Good catch Andrey,

Looks like something in dash broke space trimming of any sort: see attached 
script and logs.

I will see what upstream has to say for themselves, or about Cygwin.

[and stop apologizing for your terrible English, it's better than most, and much 
better than most of our Russian, but we are ni kulturni, da? I kept missing out 
on new language classes because teachers got transferred: no Russian at 11, no 
Spanish at 17, or I could be kulturni!] ;^>

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

[-- Attachment #2: par-ext-t.sh --]
[-- Type: text/plain, Size: 797 bytes --]

#!/bin/dash -vx

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
trim "beta " | od -t x1a
trim "\rgamma	" | od -t x1a

trim2() {
  # remove leading whitespace characters
  __trim="${*##[[:space:]]}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%[[:space:]]}"
}

trim2 " alpha" | od -t x1a
trim2 "beta " | od -t x1a
trim2 "\rgamma	" | od -t x1a

trim3() {
  _space=$(echo -n '\b\t\n\v\f\r')
  # remove leading whitespace characters
  __trim="${*##$_space}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%$_space}"
}

trim2 " alpha" | od -t x1a
trim2 "beta " | od -t x1a
trim2 "\rgamma	" | od -t x1a


[-- Attachment #3: test11.log --]
[-- Type: text/plain, Size: 1886 bytes --]

#!/bin/dash -vx

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
+ trim  alpha
+ __trim=alpha
+ printf %s alpha
+ od -t x1a
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim "beta " | od -t x1a
+ trim beta 
+ __trim=beta 
+ printf %s beta
+ od -t x1a
0000000  62  65  74  61
          b   e   t   a
0000004
trim "\rgamma	" | od -t x1a
+ trim \rgamma	
+ __trim=gamma	
+ printf %s gamma
+ od -t x1a
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005

trim2() {
  # remove leading whitespace characters
  __trim="${*##[[:space:]]}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%[[:space:]]}"
}

trim2 " alpha" | od -t x1a
+ trim2  alpha
+ __trim=alpha
+ printf %s alpha
+ od -t x1a
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim2 "beta " | od -t x1a
+ trim2 beta 
+ __trim=beta 
+ printf %s beta
+ od -t x1a
0000000  62  65  74  61
          b   e   t   a
0000004
trim2 "\rgamma	" | od -t x1a
+ trim2 \rgamma	
+ __trim=gamma	
+ printf %s gamma
+ od -t x1a
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005

trim3() {
  _space=$(echo -n '\b\t\n\v\f\r')
  # remove leading whitespace characters
  __trim="${*##$_space}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%$_space}"
}

trim2 " alpha" | od -t x1a
+ trim2  alpha
+ __trim=alpha
+ printf %s alpha
+ od -t x1a
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim2 "beta " | od -t x1a
+ trim2 beta 
+ __trim=beta 
+ printf %s beta
+ od -t x1a
0000000  62  65  74  61
          b   e   t   a
0000004
trim2 "\rgamma	" | od -t x1a
+ trim2 \rgamma	
+ __trim=gamma	
+ printf %s gamma
+ od -t x1a
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005


[-- Attachment #4: test12.log --]
[-- Type: text/plain, Size: 1772 bytes --]

#!/bin/dash -vx

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
+ trim  alpha
+ __trim=
+ printf %s 
+ od -t x1a
0000000
trim "beta " | od -t x1a
+ trim beta 
+ __trim=
+ printf %s 
+ od -t x1a
0000000
trim "\rgamma	" | od -t x1a
+ trim \rgamma	
+ __trim=
+ printf %s 
+ od -t x1a
0000000

trim2() {
  # remove leading whitespace characters
  __trim="${*##[[:space:]]}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%[[:space:]]}"
}

trim2 " alpha" | od -t x1a
+ trim2  alpha
+ __trim= alpha
+ printf %s  alpha
+ od -t x1a
0000000  20  61  6c  70  68  61
         sp   a   l   p   h   a
0000006
trim2 "beta " | od -t x1a
+ trim2 beta 
+ __trim=beta 
+ printf %s beta 
+ od -t x1a
0000000  62  65  74  61  20
          b   e   t   a  sp
0000005
trim2 "\rgamma	" | od -t x1a
+ trim2 \rgamma	
+ __trim=\rgamma	
+ printf %s \rgamma	
+ od -t x1a
0000000  0d  67  61  6d  6d  61  09
         cr   g   a   m   m   a  ht
0000007

trim3() {
  _space=$(echo -n '\b\t\n\v\f\r')
  # remove leading whitespace characters
  __trim="${*##$_space}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%$_space}"
}

trim2 " alpha" | od -t x1a
+ trim2  alpha
+ __trim= alpha
+ printf %s  alpha
+ od -t x1a
0000000  20  61  6c  70  68  61
         sp   a   l   p   h   a
0000006
trim2 "beta " | od -t x1a
+ trim2 beta 
+ __trim=beta 
+ printf %s beta 
+ od -t x1a
0000000  62  65  74  61  20
          b   e   t   a  sp
0000005
trim2 "\rgamma	" | od -t x1a
+ trim2 \rgamma	
+ __trim=\rgamma	
+ printf %s \rgamma	
+ od -t x1a
0000000  0d  67  61  6d  6d  61  09
         cr   g   a   m   m   a  ht
0000007


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Parameter expansion stopped working in recent ash/dash
  2023-02-07 17:19 ` Brian Inglis
@ 2023-02-07 19:01   ` Brian Inglis
  2023-02-08 14:20     ` Brian Inglis
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Inglis @ 2023-02-07 19:01 UTC (permalink / raw)
  To: cygwin; +Cc: Andrey Repin

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

On 2023-02-07 10:19, Brian Inglis via Cygwin wrote:
> On 2023-02-07 05:07, Andrey Repin via Cygwin wrote:
>> Greetings, All!
>>
>> In the attached script, that I always run using dash, the expansion is
>> supposed to strip leading/trailing spaces from provided parameter.
>>
>> The upgrade that took place after which the expansion stopped working is
>>
>> libsolv:   - dash-0.5.11.5-1.any -> dash-0.5.12-1.any
>>
>> Downgrading to 0.5.11.5 restored the expected behavior.
>> I failed to find anything relevant in the dash 0.5.12 patch notes, but perhaps
>> community could help?
> 
> Good catch Andrey,
> 
> Looks like something in dash broke space trimming of any sort: see attached 
> script and logs.
> 
> I will see what upstream has to say for themselves, or about Cygwin.

Sorry Andrey,

Stupid errors in test script, didn't actually run trim3 anyway, redone, and that 
and updated logs attached.

It appears the locale dependent [[:space:]] regexp no longer works but using 
escapes generated by echo still does, see corrected trim3, so perhaps use those 
for now, if you can, while I follow this upstream.

You may need to add escape sequences for any locale dependent spacing characters 
to the space string, so please let us know if there are.

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

[-- Attachment #2: test11.log --]
[-- Type: text/plain, Size: 2026 bytes --]

#!/bin/dash -vx

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
+ trim  alpha
+ __trim=alpha
+ printf %s alpha
+ od -t x1a
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim "beta " | od -t x1a
+ trim beta 
+ __trim=beta 
+ printf %s beta
+ od -t x1a
0000000  62  65  74  61
          b   e   t   a
0000004
trim "\rgamma	" | od -t x1a
+ trim \rgamma	
+ __trim=gamma	
+ printf %s gamma
+ od -t x1a
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005

trim2() {
  # remove leading whitespace characters
  __trim="${*##[[:space:]]}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%[[:space:]]}"
}

trim2 " alpha" | od -t x1a
+ trim2  alpha
+ __trim=alpha
+ printf %s alpha
+ od -t x1a
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim2 "beta " | od -t x1a
+ trim2 beta 
+ __trim=beta 
+ printf %s beta
+ od -t x1a
0000000  62  65  74  61
          b   e   t   a
0000004
trim2 "\rgamma	" | od -t x1a
+ trim2 \rgamma	
+ __trim=gamma	
+ printf %s gamma
+ od -t x1a
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005

trim3() {
  _space="$(echo -n '[\b\t\n\v\f\r ]')"
  # remove leading whitespace characters
  __trim="${*##$_space}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%$_space}"
}

trim3 " alpha" | od -t x1a
+ trim3  alpha
+ od -t x1a
+ echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=alpha
+ printf %s alpha
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim3 "beta " | od -t x1a
+ trim3 beta 
+ od -t x1a
+ echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=beta 
+ printf %s beta
0000000  62  65  74  61
          b   e   t   a
0000004
trim3 "\rgamma	" | od -t x1a
+ trim3 \rgamma	
+ + od -t x1a
echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=gamma	
+ printf %s gamma
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005


[-- Attachment #3: test12.log --]
[-- Type: text/plain, Size: 1874 bytes --]

#!/bin/dash -vx

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
+ trim  alpha
+ __trim=
+ printf %s 
+ od -t x1a
0000000
trim "beta " | od -t x1a
+ trim beta 
+ __trim=
+ printf %s 
+ od -t x1a
0000000
trim "\rgamma	" | od -t x1a
+ trim \rgamma	
+ __trim=
+ printf %s 
+ od -t x1a
0000000

trim2() {
  # remove leading whitespace characters
  __trim="${*##[[:space:]]}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%[[:space:]]}"
}

trim2 " alpha" | od -t x1a
+ trim2  alpha
+ __trim= alpha
+ printf %s  alpha
+ od -t x1a
0000000  20  61  6c  70  68  61
         sp   a   l   p   h   a
0000006
trim2 "beta " | od -t x1a
+ trim2 beta 
+ __trim=beta 
+ printf %s beta 
+ od -t x1a
0000000  62  65  74  61  20
          b   e   t   a  sp
0000005
trim2 "\rgamma	" | od -t x1a
+ trim2 \rgamma	
+ __trim=\rgamma	
+ printf %s \rgamma	
+ od -t x1a
0000000  0d  67  61  6d  6d  61  09
         cr   g   a   m   m   a  ht
0000007

trim3() {
  _space="$(echo -n '[\b\t\n\v\f\r ]')"
  # remove leading whitespace characters
  __trim="${*##$_space}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%$_space}"
}

trim3 " alpha" | od -t x1a
+ trim3  alpha
+ od -t x1a
+ echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=alpha
+ printf %s alpha
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim3 "beta " | od -t x1a
+ trim3 beta 
+ od -t x1a
+ echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=beta 
+ printf %s beta
0000000  62  65  74  61
          b   e   t   a
0000004
trim3 "\rgamma	" | od -t x1a
+ trim3 \rgamma	
+ od -t x1a
+ echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=gamma	
+ printf %s gamma
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005


[-- Attachment #4: par-ext-t.sh --]
[-- Type: text/plain, Size: 802 bytes --]

#!/bin/dash -vx

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
trim "beta " | od -t x1a
trim "\rgamma	" | od -t x1a

trim2() {
  # remove leading whitespace characters
  __trim="${*##[[:space:]]}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%[[:space:]]}"
}

trim2 " alpha" | od -t x1a
trim2 "beta " | od -t x1a
trim2 "\rgamma	" | od -t x1a

trim3() {
  _space="$(echo -n '[\b\t\n\v\f\r ]')"
  # remove leading whitespace characters
  __trim="${*##$_space}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%$_space}"
}

trim3 " alpha" | od -t x1a
trim3 "beta " | od -t x1a
trim3 "\rgamma	" | od -t x1a


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Parameter expansion stopped working in recent ash/dash
  2023-02-07 19:01   ` Brian Inglis
@ 2023-02-08 14:20     ` Brian Inglis
  2023-02-09 12:08       ` Andrey Repin
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Inglis @ 2023-02-08 14:20 UTC (permalink / raw)
  To: cygwin; +Cc: Andrey Repin

[-- Attachment #1: Type: text/plain, Size: 2498 bytes --]

On 2023-02-07 12:01, Brian Inglis via Cygwin wrote:
> On 2023-02-07 10:19, Brian Inglis via Cygwin wrote:
>> On 2023-02-07 05:07, Andrey Repin via Cygwin wrote:
>>> In the attached script, that I always run using dash, the expansion is
>>> supposed to strip leading/trailing spaces from provided parameter.
>>> The upgrade that took place after which the expansion stopped working is
>>> libsolv:   - dash-0.5.11.5-1.any -> dash-0.5.12-1.any
>>> Downgrading to 0.5.11.5 restored the expected behavior.
>>> I failed to find anything relevant in the dash 0.5.12 patch notes, but perhaps
>>> community could help?

>> Looks like something in dash broke space trimming of any sort: see attached 
>> script and logs.
>> I will see what upstream has to say for themselves, or about Cygwin.

> Stupid errors in test script, didn't actually run trim3 anyway, redone, and that 
> and updated logs attached.
> It appears the locale dependent [[:space:]] regexp no longer works but using 
> escapes generated by echo still does, see corrected trim3, so perhaps use those 
> for now, if you can, while I follow this upstream.
> You may need to add escape sequences for any locale dependent spacing characters 
> to the space string, so please let us know if there are.

Hi Andrey,

A new test release 0.5.12-2 has been uploaded so please install and test that 
behaves as expected in past releases.

The issue was caused as glibc fnmatch and glob now support locale dependent 
named character classes, equivalents, etc. as in grep, so the build now defaults 
to using the local libc fnmatch and glob, without any config test for which libc 
or supported features.

Cygwin winsup and newlib libc fnmatch and glob do not support those locale 
dependent named character classes, equivalents, etc. as in grep, so those 
features are no longer provided in dash by default.

The new test release disables the build from using libc fnmatch and glob and use 
those provided by dash (possibly by or from gnulib), so those classes again 
appear to work as expected: see attached log.

If there are no further negative reports by this weekend, I will replace the 
current stable release with this latest test release.

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

[-- Attachment #2: test12-2.log --]
[-- Type: text/plain, Size: 2026 bytes --]

#!/bin/dash -vx

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
+ trim  alpha
+ __trim=alpha
+ printf %s alpha
+ od -t x1a
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim "beta " | od -t x1a
+ trim beta 
+ __trim=beta 
+ printf %s beta
+ od -t x1a
0000000  62  65  74  61
          b   e   t   a
0000004
trim "\rgamma	" | od -t x1a
+ trim \rgamma	
+ __trim=gamma	
+ printf %s gamma
+ od -t x1a
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005

trim2() {
  # remove leading whitespace characters
  __trim="${*##[[:space:]]}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%[[:space:]]}"
}

trim2 " alpha" | od -t x1a
+ trim2  alpha
+ __trim=alpha
+ printf %s alpha
+ od -t x1a
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim2 "beta " | od -t x1a
+ trim2 beta 
+ __trim=beta 
+ printf %s beta
+ od -t x1a
0000000  62  65  74  61
          b   e   t   a
0000004
trim2 "\rgamma	" | od -t x1a
+ trim2 \rgamma	
+ __trim=gamma	
+ printf %s gamma
+ od -t x1a
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005

trim3() {
  _space="$(echo -n '[\b\t\n\v\f\r ]')"
  # remove leading whitespace characters
  __trim="${*##$_space}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%%$_space}"
}

trim3 " alpha" | od -t x1a
+ trim3  alpha
+ od -t x1a
+ echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=alpha
+ printf %s alpha
0000000  61  6c  70  68  61
          a   l   p   h   a
0000005
trim3 "beta " | od -t x1a
+ trim3 beta 
+ od -t x1a
+ echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=beta 
+ printf %s beta
0000000  62  65  74  61
          b   e   t   a
0000004
trim3 "\rgamma	" | od -t x1a
+ trim3 \rgamma	
+ od -t x1a
+ echo -n [\b\t\n\v\f\r ]
+ _space=[\b	
\v\f\r ]
+ __trim=gamma	
+ printf %s gamma
0000000  67  61  6d  6d  61
          g   a   m   m   a
0000005


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Parameter expansion stopped working in recent ash/dash
  2023-02-08 14:20     ` Brian Inglis
@ 2023-02-09 12:08       ` Andrey Repin
  0 siblings, 0 replies; 5+ messages in thread
From: Andrey Repin @ 2023-02-09 12:08 UTC (permalink / raw)
  To: Brian Inglis, cygwin

Greetings, Brian Inglis!

> On 2023-02-07 12:01, Brian Inglis via Cygwin wrote:
>> On 2023-02-07 10:19, Brian Inglis via Cygwin wrote:
>>> On 2023-02-07 05:07, Andrey Repin via Cygwin wrote:
>>>> In the attached script, that I always run using dash, the expansion is
>>>> supposed to strip leading/trailing spaces from provided parameter.
>>>> The upgrade that took place after which the expansion stopped working is
>>>> libsolv:   - dash-0.5.11.5-1.any -> dash-0.5.12-1.any
>>>> Downgrading to 0.5.11.5 restored the expected behavior.
>>>> I failed to find anything relevant in the dash 0.5.12 patch notes, but perhaps
>>>> community could help?

>>> Looks like something in dash broke space trimming of any sort: see attached >> script and logs.
>>> I will see what upstream has to say for themselves, or about Cygwin.

>> Stupid errors in test script, didn't actually run trim3 anyway, redone, and that > and updated logs attached.
>> It appears the locale dependent [[:space:]] regexp no longer works but using > escapes generated by echo still does, see corrected trim3, so perhaps use those > for now, if you can, while I follow this upstream.
>> You may need to add escape sequences for any locale dependent spacing characters > to the space string, so please let us know if there are.

> Hi Andrey,

> A new test release 0.5.12-2 has been uploaded so please install and test
> that behaves as expected in past releases.

At least it no longer clears the input in real world tests.
So that's good for me now.

> The issue was caused as glibc fnmatch and glob now support locale dependent
> named character classes, equivalents, etc. as in grep, so the build now
> defaults to using the local libc fnmatch and glob, without any config test for which libc or supported features.

That's proving importance of proper testing yet again. >.<

> Cygwin winsup and newlib libc fnmatch and glob do not support those locale
> dependent named character classes, equivalents, etc. as in grep, so those
> features are no longer provided in dash by default.

> The new test release disables the build from using libc fnmatch and glob
> and use those provided by dash (possibly by or from gnulib), so those
> classes again appear to work as expected: see attached log.

> If there are no further negative reports by this weekend, I will replace
> the current stable release with this latest test release.


-- 
With best regards,
Andrey Repin
Thursday, February 9, 2023 15:05:35

Sorry for my terrible english...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-09 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 12:07 Parameter expansion stopped working in recent ash/dash Andrey Repin
2023-02-07 17:19 ` Brian Inglis
2023-02-07 19:01   ` Brian Inglis
2023-02-08 14:20     ` Brian Inglis
2023-02-09 12:08       ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).