Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gentoo detected as OracleLinux #301

Closed
stefson opened this issue Apr 10, 2022 · 2 comments · Fixed by #317
Closed

Gentoo detected as OracleLinux #301

stefson opened this issue Apr 10, 2022 · 2 comments · Fixed by #317

Comments

@stefson
Copy link

stefson commented Apr 10, 2022

when I fire up /usr/bin/cargo -vV on gentoo, it shows the following:

/usr/bin/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]

this missdetection happens, as your crate does depend on lsb-release to be installed at runtime to check for a version. Unlinke debian, gentoo doesn't have "real" fixed version numbers since it is a rolling release distro. Therefore, installing lsb-release repeating the command 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]

which is a slight improvement, but still not really correct.

A common practice is to use the version of sys-apps/baselayout as the version number of Gentoo. It ships a simple release file:

cat /etc/gentoo-release
Gentoo Base System release 2.7

maybe its possible to exploit that file in the future?

@stanislav-tkach
Copy link
Owner

Thanks for the report! I will try to look into it.

@stefson
Copy link
Author

stefson commented Aug 10, 2022

ok so in reality this is kind of fixed

current git without lsb-release at runtime:

cargo -Vv 

cargo 1.65.0-dev (ce40690a5 2022-08-09)
release: 1.65.0-dev
commit-hash: ce40690a5e4e315d3dab0aae1eae69d0252c52ac
commit-date: 2022-08-09
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.84.0 (sys:0.4.55+curl-7.83.1 system ssl:OpenSSL/1.1.1q)
os: Linux [64-bit]

current git with lsb-release at runtime:

cargo -Vv

cargo 1.65.0-dev (ce40690a5 2022-08-09)
release: 1.65.0-dev
commit-hash: ce40690a5e4e315d3dab0aae1eae69d0252c52ac
commit-date: 2022-08-09
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.84.0 (sys:0.4.55+curl-7.83.1 system ssl:OpenSSL/1.1.1q)
os: Gentoo Linux 2.8 [64-bit]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants