Subject: bug#13001: Reporting potential bug | uname -p and uname -i return unknown on Debian

From: Mike Frysinger <[email-masked]>
Date: Mon, 26 Nov 2012 13:11:36 -0500

On Mon, Nov 26, 2012 at 3:48 AM, Ashish, Agrawal wrote:
> I use the output of 'uname -p' in my product. It seems to work fine on very other Linux distro that I have worked on (ex. RHEL, SUSE Linux Enterprise Server and even Ubuntu 12.04), except Debian where it returns 'unknown'. The following this the relevant information of my machine and setup.

this is because many distros patch coreutils' uname to return
something useful on Linux.  the GNU version relies on the standard
interfaces to do that (which they don't).

you can find the patch i've been keeping up-to-date in Gentoo:
http://sources.gentoo.org/gentoo/src/patchsets/coreutils/8.20/003_all_coreutils-gentoo-uname.patch

> root@IWFVM00285:~# cat /etc/debian_version
> 6.0.5
> root@IWFVM00285:~# uname -a
> Linux IWFVM00285 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 GNU/Linux
> root@IWFVM00285:~# uname -m
> x86_64
> root@IWFVM00285:~# uname -p
> unknown
> root@IWFVM00285:~# uname -i
> unknown

after applying the aforementioned patched, you'd get something like:
$ uname -a
Linux vapier 3.6.5 #5 SMP PREEMPT Wed Nov 14 01:08:40 EST 2012 x86_64
AMD Phenom(tm) II X4 980 Processor AuthenticAMD GNU/Linux
$ uname -m
x86_64
$ uname -p
AMD Phenom(tm) II X4 980 Processor
$ uname -i
AuthenticAMD

> I found relevant bugs raised earlier (for example, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=193170) but it seems either it was fixed earlier and has resurfaced or it was marked as won't fix.

note: you've e-mailed the upstream GNU coreutils project, not the
Debian project.  if you want this functionality in Debian, you'll need
to file a bug with them.
-mike