My uname -r (and as is my real problem, Java system property os.version) returns a version number that has dashes in it. It looks like: 5.9.12-gentoo-blah-blah.
This breaks an app I'm using which doesn't like the dashes in the version number (it expects just a number, no dashes allowed).
How can I change the version number of my operating system? I just want to return the kernel version and don't worry about the rest.
os.version, or you patch that application. I'd have a clear favourite.unameexecutable, it uses the uname(2) system call. (Found this using your suggestion ofstrace. I don't care if I change my OS version system wide, I just need to know how to do it at all, not just for this one application.LD_PRELOADto intercept its call touname(2)once you figure out howjavaresolves that through glibc and then you can fool justjavaabout the kernel version.LD_PRELOADapproach for fun: github.com/binki/binki-fool-java-os-versionptrace. It's a bit more complicated thanLD_PRELOAD. See e.g. stackoverflow.com/questions/13426561/…, nullprogram.com/blog/2018/06/23