Bug 548834

Summary: uname -i started returning unknown
Product: [Fedora] Fedora Reporter: Bruno Wolff III <bruno>
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 37CC: kdudka, ovasik, twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-9.1-7.fc38 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-23 12:38:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bruno Wolff III 2009-12-18 18:47:13 UTC
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 07:48:53 UTC
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 08:03:29 UTC
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 09:06:32 UTC
Fixed in coreutils-8.2-4.fc13. Closing RAWHIDE.

Comment 4 Bruno Wolff III 2009-12-19 16:37:45 UTC
I am confirming that it is working again for me.
Thanks for fixing this quickly!

Comment 5 Kamil Dudka 2017-05-03 15:16:16 UTC
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 15:35:06 UTC
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 09:22:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 8 Ben Cotton 2018-11-27 18:29:20 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Ben Cotton 2018-11-30 17:52:04 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 10 Kamil Dudka 2018-12-06 13:43:55 UTC
Reopening.  I will propose to sync the behavior with upstream as a Fedora change.

Comment 11 Ben Cotton 2022-08-09 13:41:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 12 Kamil Dudka 2022-08-23 12:38:33 UTC
(In reply to Kamil Dudka from comment #5)
> I am about to drop the downstream patch again to make uname work as
> documented: print "unknown" if the information is not available

Fedora commit: https://src.fedoraproject.org/rpms/coreutils/c/cd953e11dd78cada371f0389171cea671949141b?branch=rawhide