Bug 2126206 - uname -i/p is broken in latest version of RAWHIDE
Summary: uname -i/p is broken in latest version of RAWHIDE
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2162873 2188689 2189656 2203350 2208048 2248503 2261852 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-12 20:41 UTC by Chung
Modified: 2024-01-30 09:44 UTC (History)
18 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-09-26 13:05:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Chung 2022-09-12 20:41:04 UTC
Description of problem:
uname -i/p does not work


Version-Release number of selected component (if applicable):
Latest RAWHIDE:
6.0.0-0.rc4.20220909git506357871c18.34.fc38.x86_64

How reproducible:
uname -u


Steps to Reproduce:
1. Install RAWHIDE
2. Run uname -i or -p


Actual results:
$ uname -i
unknown
$ uname -p
unknown

Expected results:
$ uname -i
x86_64
$ $ uname -p
x86_64


Additional info:

Comment 1 Kamil Dudka 2022-09-13 07:08:56 UTC
The options have been documented as non-portable since 2015:
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.24-7-g6d67649

Please use `uname -m` to print hardware class.  See bug #2121153.

Comment 2 Kamil Dudka 2023-01-21 19:44:32 UTC
*** Bug 2162873 has been marked as a duplicate of this bug. ***

Comment 3 Kamil Dudka 2023-04-21 20:29:59 UTC
*** Bug 2188689 has been marked as a duplicate of this bug. ***

Comment 4 Kamil Dudka 2023-04-26 07:22:26 UTC
*** Bug 2189656 has been marked as a duplicate of this bug. ***

Comment 5 Kamil Dudka 2023-05-14 15:29:17 UTC
*** Bug 2203350 has been marked as a duplicate of this bug. ***

Comment 6 Kamil Dudka 2023-05-17 20:28:32 UTC
*** Bug 2208048 has been marked as a duplicate of this bug. ***

Comment 7 Lukáš Zaoral 2023-11-07 12:52:36 UTC
*** Bug 2248503 has been marked as a duplicate of this bug. ***

Comment 8 Harald Reindl 2023-11-07 12:57:13 UTC
my god - that worked is breaking scripts dating back way longer randomly - god knows what "non portable" means and why this nonsense just could output the same as the past 15 years instead of unknown without breaking things left and right

Comment 9 Lukáš Zaoral 2023-11-07 13:11:51 UTC
Non-portable means that there is no guarantee that uname will accept these options or that the output will be useful.  For example no script that uses uname -i can be used on macOS because it's version does not accept the -i option.  But that also applies to Linux, different Linux distributions may produce different outputs on the same hardware.  In other words, uname -i/-p are purely informative and *should not* be used in scripts for platform detection as opposed to uname -m because its behaviour is described by POSIX.

Comment 10 Kamil Dudka 2023-11-07 13:12:21 UTC
Harald, the problem is that `uname -i` printed the string only on Fedora.  On my Gentoo Linux box, `uname -i` prints `GenuineIntel`.

Comment 11 Harald Reindl 2023-11-07 13:15:01 UTC
so this options are comletly useless - anyways, until today it worked over 15 years on any Fedora version and it's a pain

Comment 12 Harald Reindl 2023-11-07 13:19:02 UTC
and what makes it terrible is that THEY FOR SURE worked a few months ago as i upgraded my testing environment from F37 to F38 and now when upgrade the production infrastrcuture stuff left adn right is suddenly broken

Comment 13 Lukáš Zaoral 2024-01-30 09:36:29 UTC
*** Bug 2261852 has been marked as a duplicate of this bug. ***

Comment 14 IBM Bug Proxy 2024-01-30 09:44:06 UTC
------- Comment From Anushree.Mathur2 2024-01-30 03:21 EDT-------
With uname -m i am getting the output:

root# uname -m
ppc64le


Note You need to log in before you can comment on or make changes to this bug.