On Sun, 2023-02-26 at 10:50 +0100, Arne Nordmark wrote: > The search for enabled services in /etc/nsswitch.conf breaks when > using the Swedish locale. > > LANG=C sed -n > 's/^[[:space:]]*\([a-z]*\)[[:space:]]*:.*[[:space:]]ldap\([[:space:]].*\)\?/\1/p' > /etc/nsswitch.conf | xargs > > gives "passwd group shadow" which is correct, whereas > > LANG=sv_SE.UTF-8 sed -n > 's/^[[:space:]]*\([a-z]*\)[[:space:]]*:.*[[:space:]]ldap\([[:space:]].*\)\?/\1/p' > /etc/nsswitch.conf | xargs > > gives "group".
Interestingly, I cannot reproduce this on unstable (I generated the proper locale and use LC_ALL instead of LANG to override all LC_* variables I had set), also minimising the problem doesn't show this issue: echo "shadow: " | LC_ALL=C sed -n 's/^[[:space:]]*\([a-z]*\)[[:space:]]*:.*/\1/p' echo "shadow: " | LC_ALL=sv_SE.UTF-8 sed -n 's/^[[:space:]]*\([a-z]*\)[[:space:]]*:.*/\1/p' (both return the same output for me) Anyway, I'll change the maintainer scripts to force the C locale so we have consistent rexex processing by sed, grep and other tools. Thanks for reporting the issue! -- -- arthur - adej...@debian.org - https://people.debian.org/~adejong --
signature.asc
Description: This is a digitally signed message part