detecting musl (was Re: Call for testing: OpenSSH 8.9)
Steffen Nurpmeso
steffen at sdaoden.eu
Sat Feb 19 06:21:56 AEDT 2022
Thorsten Glaser wrote in
<96cab59-5c-d87c-f47c-12aa3a23adf at tarent.de>:
|(retopiccing and trimming Cc)
|On Fri, 18 Feb 2022, Steffen Nurpmeso wrote:
|
|> Well it may look secondarily. This is musl libc in the end.
|> And note it does not, as per the snippet you removed, perform any
|> action on its own, it just gives a hint for a specific configure
|> option which does.
|
|I don’t understand what you are trying to say here.
|
|>|>|Ouch, completely bogus.
|>|>
|>|> It is a nice hint imho.
|>|
|>|Nope. It hardcodes a path into the *host* system. Absolutely wrong,
|>|on multiple counts. (It would also trigger, say, on a glibc system
|>|with musl installed.)
|
|> I am using the same mechanism (i have not
|> invented it) in my ~/.profile, for setting LC_ALL.
|
|It’s plain wrong, that’s what it is.
|
|lrwxrwxrwx 1 root root 25 2. Okt 14:47 /lib/ld-linux.so.2 -> i386-linux\
|-gnu/ld-2.31.so*
|lrwxrwxrwx 1 root root 25 15. Jan 2021 /lib/ld-musl-x86_64.so.1 -> \
|x86_64-linux-musl/libc.so*
|
|This Debian system just has both, so you cannot use this to detect musl.
We were talking about AlpineLinux aka a native musl system, it was
you who came over with some sort of special development or
otherwise special-purpose thing, Mr.
|(Similarily, you cannot use this to detect a pure-static musl system;
|I’m told the suckless people have interest in these.)
|
|>|Link statically.
|>
|> Nah. For hello world you mean?
|
|Yes, link the hello world statically so strings will show MUSL_LOCPATH
|occurring. You can use -static for this, or the distro is broken.
You do have a static musl on your box Mr.?
|> #?0|kent:musl.git$ git grep -i LOCPA master
|> master:WHATSNEW:- MUSL_LOCPATH search was broken with multiple \
|> components
|> master:src/locale/locale_map.c: if (!libc.secure) path = getenv("MUSL_L\
|> OCPATH");
|
|Yes, this is where it comes from.
|
|> Never heard of it.
|
|It’s probably their equivalent of glibc LOCPATH: a path where a user
|can install custom locales into.
|See: https://serverfault.com/a/1093896/189656
I fail to see how this can be used to reliable detect this
environment.
A nice weekend everybody, if you can.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
More information about the openssh-unix-dev
mailing list