Red Hat Bugzilla – Full Text Bug Listing
|Summary:||uname -i started returning unknown|
|Product:||[Fedora] Fedora||Reporter:||Bruno Wolff III <bruno>|
|Component:||coreutils||Assignee:||Kamil Dudka <kdudka>|
|Status:||ASSIGNED ---||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||27||CC:||kdudka, ovasik, twaugh|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2009-12-19 04:06:32 EST||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Bruno Wolff III 2009-12-18 13:47:13 EST
Description of problem: I am running rawhide with f12 kernels (due to f13 kernels not booting) and recently uname -i started returning unknown instead of i386 which broke some scripts I was using. Version-Release number of selected component (if applicable): coreutils-8.2-3.fc13.i686 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Comment 1 Ondrej Vasik 2009-12-19 02:48:53 EST
Thanks for report, this was caused by my drop of one hacky patch for uname which never got upstream. It seems that I have to put at least parts of that patch back - but I'll check if there is some other way... sorry for troubles...
Comment 2 Ondrej Vasik 2009-12-19 03:03:29 EST
Looking into http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=193170 it seems there is no easy way to get the correct results other way - no <sys/systeminfo.h> header... I'll put the sysinfo patch back - except the part for athlon, which is really hacky and unreliable.
Comment 3 Ondrej Vasik 2009-12-19 04:06:32 EST
Fixed in coreutils-8.2-4.fc13. Closing RAWHIDE.
Comment 4 Bruno Wolff III 2009-12-19 11:37:45 EST
I am confirming that it is working again for me. Thanks for fixing this quickly!
Comment 5 Kamil Dudka 2017-05-03 11:16:16 EDT
I believe the correct solution is to use 'uname -m' instead of 'uname -i' in your scripts. The -p/-i options of uname are now documented as non-portable: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.24-7-g6d67649 I am about to drop the downstream patch again to make uname work as documented: print "unknown" if the information is not available
Comment 6 Kamil Dudka 2017-05-03 11:35:06 EDT
Note that Gentoo Linux uses the following patch to get the info from /proc: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/coreutils/8.24/003_all_coreutils-gentoo-uname.patch
Comment 7 Jan Kurik 2017-08-15 05:22:05 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'.