Bug 208291

Summary: uname --kernel-version doesn't display kernel version
Product: [Fedora] Fedora Reporter: Evert Verhellen <evert.verhellen>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 5CC: davej, kzak, meyering, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-03 04:36:09 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Evert Verhellen 2006-09-27 14:38:11 EDT
Description of problem:
The command "uname --kernel-version" doesn't display kernel version.

Version-Release number of selected component (if applicable):
coreutils-5.97-1.2

How reproducible:
Always.

Steps to Reproduce:
1. uname --kernel-version
  
Actual results:
#1 Sat Jul 1 13:03:45 EDT 2006

Expected results:
2.6.17

Additional info:
The command "uname --kernel-release" works properly as it displays:
"2.6.17-1.2145_FC5". I expect the "--kernel-version" flag to display "2.6.17"
instead of a timestamp.
Comment 1 Tim Waugh 2006-09-28 05:25:55 EDT
It's just reporting what the kernel tells it to from the uname() syscall. 
Reassigning.
Comment 2 Dave Jones 2006-10-02 20:19:42 EDT
Tim, I see no evidence that this ever did anything different.
Here's a RHEL3 box running 2.4 kernel..

(20:16:16:davej@devserv:davej)$ uname --kernel-version
#1 SMP Thu Dec 1 20:31:15 EST 2005
(20:16:16:davej@devserv:davej)$ uname -r
2.4.21-38.ELsmp

uname -r works in FC5 too.

Clearly uname can get the right string with uname -r, so this looks like a
userspace bug to me ?
Comment 3 Karel Zak 2006-10-03 04:08:36 EDT
This is not util from the util-linux package:

  # rpm -qf /bin/uname
  coreutils-5.97-1.1

and ... I don't think there is any problem with uname:

  $ cat /proc/sys/kernel/version; uname --kernel-version
  #1 Tue Aug 8 15:30:55 EDT 2006
  #1 Tue Aug 8 15:30:55 EDT 2006

  $ cat /proc/sys/kernel/osrelease; uname --kernel-release
  2.6.17-1.2174_FC5
  2.6.17-1.2174_FC5

and ... "--kernel-version" != "-r", see man page. 

Reassigning to coreutils.
Comment 4 Tim Waugh 2006-10-03 04:36:09 EDT
..back in a circle.  No one can find any bug here.  Closing.
Comment 5 Evert Verhellen 2006-10-03 16:05:36 EDT
What do you mean there's no bug? As far as I can tell, timestamps and kernel
versions are 2 different things, right?
Comment 6 Tim Waugh 2006-10-03 18:29:26 EDT
'#1' is the _version_ number, and you get the build timestamp as well -- you are
thinking of the _release_ number.

uname is just reporting what the kernel says.  You ask for the version number,
you get the version number.  Ask for the release, you get the release instead. 
There is no bug here.