Open tamird opened 1 year ago
Looks like there's some code in libbpf that tries to get this right.
Good info, thanks. Adding a similar check for ubuntu's version_signature
sounds like the right thing to do here.
Also our procfs tests don't actually compare KernelVersion::current()
to the output of uname
, which should be fixed too
There's also this fun detail: https://github.com/torvalds/linux/commit/a256aac5b7000bdf1232ed2bbd674582c0ab27ec
TL;DR kernel 4.19.x where x >= 222 lies but it's not clear that all facilities report the same version.
Per this article the upstream kernel version is the rightmost field (so 6.2.12 in my case) while
/proc/sys/kernel/osrelease
reports6.2.0
.There are possibly some gotchas with Debian as well -- I'm not sure if there's a universal way to get this information right for all distros.