GNU bug report logs -
#70298
uname -i returns unknown since fedora 38
Previous Next
Full log
Message #16 received at 70298 <at> debbugs.gnu.org (full text, mbox):
On 09/04/2024 10:17, Collin Funk wrote:
> On 4/9/24 12:57 AM, Paul Eggert wrote:
>> Indeed there is, and I merged your bug report into that old one. It'd be nice if someone could get to the bottom of that bug.
>
> I decided to look into this a bit, since I also have an unknown
> 'uname -i' and 'uname -p'.
>
> It seems that this option is a Solaris thing. I found the commit that
> it was introduced [1]. It also adds some other Solaris compatibility
> stuff, so everything seems to add up so far.
>
> The first function it tries is sysinfo (SI_PLATFORM, ...) which seems
> to be a Solaris thing [2]. I think Linux has sysinfo but not
> SI_PLATFORM.
>
> Then it tries sysctl (...) with a UNAME_HARDWARE_PLATFORM macro to deal
> with the BSDs. I think OpenBSD might be missing that definition in the
> #ifdef, but I have no way of testing it at the moment [3].
>
> I'm not sure if 'uname -i', 'uname -p', or 'uname -m' are supposed to
> be any different from each other. Maybe someone who knows Solaris can
> help more?
>
> Illumios defines 'sysinfo' as an alias to 'systeminfo' [4]. There it
> returns an 'extern char *platform' in the given buffer when passed
> SI_PLATFORM [5]. I've found the definition of the variable, but I
> don't know where it is actually set to something useful [6]. Hopefully
> that information helps someone...
>
> [1] https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=aaeb7a61c4662fd28cf2bc161b740352711538d2
> [2] https://github.com/illumos/illumos-gate/blob/cf618897f43ea305e3a426f93bbcef4e8106829c/usr/src/uts/common/sys/systeminfo.h#L86
> [3] https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/uname.c#n36
> [4] https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libc/common/sys/sysinfo.S
> [5] https://github.com/illumos/illumos-gate/blob/cf618897f43ea305e3a426f93bbcef4e8106829c/usr/src/uts/common/syscall/systeminfo.c#L124
> [6] https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/conf/param.c#L533
Thanks for looking at this.
From the Fedora side, they dropped a Fedora specific patch for Fedora 38.
https://bugzilla.redhat.com/show_bug.cgi?id=548834
https://bugzilla.redhat.com/show_bug.cgi?id=2208048
cheers,
Pádraig.
This bug report was last modified 1 year and 129 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.