Compiling my own uname gives a different output

Asked by hemithec0nyx

I was reading the source code of uname and I didn't understand how it could display something other than "unknown" for the processor (-p) flag on Ubuntu, because it basically uses:
- sysinfo if available
- sysctl if available
- "unknown"
But there is neither sysinfo nor sysctl on Ubuntu.

When running `uname -p` with apt-installed coreutils, I get "x86_64".

So I tried compiling coreutils from source, and when I run it I get "unknown".
I figured it might be a specific version on apt so I downloaded the source archive, compiled it (`./configure && make`), ran it, and got again "unknown".

Am I missing something ?


Ubuntu version: Ubuntu 22.04.2 LTS jammy

Question information

English Edit question
Ubuntu coreutils Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
hemithec0nyx (hemithec0nyx) said :

I just realized that I was looking at `coreutils_8.32.orig` but patches are applied on top of that, now I can see the real code.