You are not logged in.

#1 2013-12-03 21:28:48

nathanb
Member
Registered: 2011-11-28
Posts: 103
Website

uname has become less useful

The uname command used to give me useful hardware information:

[nathanb@nathanb-box ~] uname -snrip
Linux nathanb-box 3.1.1-1-ARCH Intel(R) Xeon(R) CPU W3520 @ 2.67GHz GenuineIntel

Now, I got a new motherboard and processor, and not so much:

[nathanb@nathanb-box ~] uname -snrip
Linux nathanb-box 3.12.0-1-ARCH unknown unknown

I thought it might be related to the hw identifier database, but that seems fine:

[root@nathanb-box ~]# pacman -S hwids
warning: hwids-20130607-1 is up to date -- reinstalling

Obviously something recognizes this processor, since it shows up in dmesg:

[root@nathanb-box ~]# dmesg | grep Xeon
[    0.068103] smpboot: CPU0: Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz (fam: 06, model: 2d, stepping: 07)

(If I'm recalling correctly, and I may not be, the CPU actually has at least part of that identification information encoded in hardware anyway).

Is there something I can do to make uname become useful again?

Offline

#2 2013-12-03 21:50:34

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: uname has become less useful

A simple rebuild of coreutils fixes this. I'll file a bug report.

**EDIT**

I was mistaken on this. Sorry for the noise. Some info here by falconindy:

https://bugs.archlinux.org/task/37993?s … &closedto=

Last edited by skottish (2013-12-03 22:55:38)

Offline

#3 2013-12-03 23:02:31

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,903
Website

Re: uname has become less useful

nathanb wrote:

The uname command used to give me useful hardware information:

[nathanb@nathanb-box ~] uname -snrip
Linux nathanb-box 3.1.1-1-ARCH Intel(R) Xeon(R) CPU W3520 @ 2.67GHz GenuineIntel

Now, I got a new motherboard and processor, and not so much:

[nathanb@nathanb-box ~] uname -snrip
Linux nathanb-box 3.12.0-1-ARCH unknown unknown

I thought it might be related to the hw identifier database, but that seems fine:

[root@nathanb-box ~]# pacman -S hwids
warning: hwids-20130607-1 is up to date -- reinstalling

Obviously something recognizes this processor, since it shows up in dmesg:

[root@nathanb-box ~]# dmesg | grep Xeon
[    0.068103] smpboot: CPU0: Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz (fam: 06, model: 2d, stepping: 07)

(If I'm recalling correctly, and I may not be, the CPU actually has at least part of that identification information encoded in hardware anyway).

Is there something I can do to make uname become useful again?

You can rebuild it on your machine, with the patch applied. Here's the patch:
https://projects.archlinux.org/svntogit … 1c63395918


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2013-12-04 03:08:11

nathanb
Member
Registered: 2011-11-28
Posts: 103
Website

Re: uname has become less useful

Cool, thanks folks!

Is this the sort of thing which would be useful to put in the AUR? A version of uname with this patch applied?

Offline

#5 2013-12-04 03:49:40

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: uname has become less useful

@nathanb, no this is not the kind of thing that should be put in the AUR.  Let things get sorted out properly by upstream or the Arch packager.  Putting this in the AUR would result in an outdated and useless package as soon as a fix is pushed.  Considering that it is part of both the [core] repo and base package group, I imagine this should be fixed somewhat quickly.

Offline

#6 2013-12-04 03:59:06

nathanb
Member
Registered: 2011-11-28
Posts: 103
Website

Re: uname has become less useful

@WonderWoofy, please see this discussion: http://lists.gnu.org/archive/html/bug-c … 00063.html

Looks like the upstream devs don't see this as something they're interested in fixing because uname is a common code base across multiple platforms and the fix is Linux-specific. Note that the discussion is from 2005, and the patch linked in the bug is from 2012.

In other words, I don't think this is going to get fixed as quickly as you think, or perhaps ever.

Offline

#7 2013-12-04 05:01:54

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: uname has become less useful

nathanb wrote:

Cool, thanks folks!

Is this the sort of thing which would be useful to put in the AUR? A version of uname with this patch applied?

Yes, but then you'll need to maintain a full version of coreutils just for a single patch. Maybe you can convince the maintainer of one of these packages to use the patch.

https://aur.archlinux.org/packages/coreutils-icp/

https://aur.archlinux.org/packages/coreutils-git/

Offline

#8 2013-12-04 13:59:46

nathanb
Member
Registered: 2011-11-28
Posts: 103
Website

Re: uname has become less useful

x33a wrote:

Maybe you can convince the maintainer of one of these packages to use the patch.

The reason the bug report that skottish filed was rejected is that Arch wants uname to be as close to upstream as possible....so I don't think I'd have much luck with that argument.

x33a wrote:

Yes, but then you'll need to maintain a full version of coreutils just for a single patch. Maybe you can convince the maintainer of one of these packages to use the patch.

I don't know much about AUR, so excuse my ignorance, but here's what I was thinking: the package uname-useful depends on package coreutils. Pacman would presumably then guarantee that coreutils was installed before uname-useful. Then, the install script for uname-useful would rename /usr/bin/uname as /usr/bin/uname.old and put the patched uname in /usr/bin/uname.

My ignorance may be causing me to miss some way this approach would fail, though...

Offline

#9 2013-12-04 15:22:44

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,903
Website

Re: uname has become less useful

No, that wouldn't work. pacman would balk while installating the package, because /usr/bin/uname will already exist. You shouldn't do anything like moving files that are tracked by pacman in any case. You could install the binary to /usr/bin/uname-useful, then tell users that they should manually set up an alias in their shell's config file.

nathanb wrote:
x33a wrote:

Maybe you can convince the maintainer of one of these packages to use the patch.

The reason the bug report that skottish filed was rejected is that Arch wants uname to be as close to upstream as possible....so I don't think I'd have much luck with that argument.

All packages in the AUR are unsupported, just because the official package maintainer doesn't want to include the patch doesn't mean that the AUR package maintainers will do the same.

Last edited by WorMzy (2013-12-04 15:23:14)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#10 2013-12-04 18:28:21

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: uname has become less useful

nathanb wrote:

The reason the bug report that skottish filed was rejected is that Arch wants uname to be as close to upstream as possible....so I don't think I'd have much luck with that argument.

Actually, many AUR packages carry specific patches not included by Arch official packages. For instance coreutils-icp does carry an unsupported patch. In fact, I had this specific package in mind when asking you to contact the maintainer (the git package is clean wink).

Of course, you are free to make a coreutils-uname-useful package (or similar), but it just crowds the AUR even more. And when you lose interest / forget to maintain the package, the packages keep rotting. There's a reason the AUR has thousand of orphan or never updated packages wink

So the best option is to have a single package with multiple useful patches in the AUR.

Last edited by x33a (2013-12-04 18:29:43)

Offline

#11 2013-12-04 22:35:03

nathanb
Member
Registered: 2011-11-28
Posts: 103
Website

Re: uname has become less useful

@x33a: Oops, my reading comprehension is decreasing with age, since I didn't realize you were pointing to existing packages...you're right, that would be a great place to start the dialog.

Offline

Board footer

Powered by FluxBB