so when I fired up /usr/bin/cargo -vV, it shows: /usr/bin/cargo -Vv cargo 1.58.0 release: 1.58.0 host: x86_64-unknown-linux-gnu libgit2: 1.3.0 (sys:0.13.23 vendored) libcurl: 7.79.1 (sys:0.4.51+curl-7.80.0 system ssl:OpenSSL/1.1.1n) os: Linux 2.7 [64-bit] if the gentoo install doesn't have sys-apps/lsb-release emerged at runtime, cargo believes it is on an OS called OracleLinux: cargo -Vv cargo 1.58.0 release: 1.58.0 host: x86_64-gentoo-linux-musl libgit2: 1.3.0 (sys:0.13.23 vendored) libcurl: 7.79.1 (sys:0.4.51+curl-7.80.0 system ssl:OpenSSL/1.1.1n) os: OracleLinux [64-bit] I don't know if this has any real world consequences, but adding sys-apps/lsb-release to runtime dependencies of dev-lang/rust will propably not hurt anyone.
The logic is here: https://github.com/stanislav-tkach/os_info/blob/master/os_info/src/linux/file_release.rs#L115 https://github.com/stanislav-tkach/os_info/commit/4f341a549dbcc32fdb5424af9c648f66baaafd95
will check it out, thanks for finding exact crate responsible. while we can add lsb-release support and it looks harmless indeed, I believe crate needs to be fixed too =) there are some PRs got in that fixed other distros mis-detected too.
I believe that /etc/gentoo-release from baselayout would be a good source for the crate.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bcdd0766268c493cddfbe5a20637d89d4e8a8f2 commit 1bcdd0766268c493cddfbe5a20637d89d4e8a8f2 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2022-04-08 01:24:10 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2022-04-08 04:58:48 +0000 dev-lang/rust: add 1.60.0 Bug: https://bugs.gentoo.org/835800 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-lang/rust/Manifest | 34 ++ dev-lang/rust/rust-1.60.0.ebuild | 703 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 737 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d77470d58e206aa88fb7b72473f4b90fd38d191 commit 1d77470d58e206aa88fb7b72473f4b90fd38d191 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2022-04-08 01:23:50 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2022-04-08 04:58:48 +0000 dev-lang/rust-bin: add 1.60.0 Bug: https://bugs.gentoo.org/835800 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-lang/rust-bin/Manifest | 33 +++++ dev-lang/rust-bin/rust-bin-1.60.0.ebuild | 219 +++++++++++++++++++++++++++++++ 2 files changed, 252 insertions(+)
there is a fix which landed in os_info, and it seems that it will be available through rust-1.64.0; if someone has the nightly available - maybe you can confirm the fix?
the fix is in the crate, and all current rust versions have the crate updated to include the fix: $ cargo -Vv cargo 1.75.0 (1d8b05cdd 2023-11-20) release: 1.75.0 commit-hash: 1d8b05cdd1287c64467306cf3ca2c8ac60c11eb0 commit-date: 2023-11-20 host: aarch64-unknown-linux-gnu libgit2: 1.7.1 (sys:0.18.1 vendored) libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/1.1.1u) ssl: OpenSSL 1.1.1u 30 May 2023 os: Gentoo Linux 2.14 [64-bit]