Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#58575 - [linux-api-headers] uname and /usr/include/linux/version.h

Attached to Project: Arch Linux
Opened by Sami Kerola (kerolasa) - Sunday, 13 May 2018, 11:05 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 13 May 2018, 14:40 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
* Linux run time version and system header do not agree what is the version number

Additional info:
* This has probably been the case since beginning of time.

Steps to reproduce:

Lets look what running kernel thinks is the kernel version.

$ uname -r
4.16.8-1-ARCH

Okay, how does that compare to version in header file.

$ awk '/LINUX_VERSION_CODE/ {print rshift($3, 16), and(rshift($3, 8), 255), and($3, 255)}' /usr/include/linux/version.h
4 16 1

That's strange. Where did that file come from.

$ pacman -Qo /usr/include/linux/version.h
/usr/include/linux/version.h is owned by linux-api-headers 4.16.1-1

Oh I see. Maybe I am overly pedantic but perhaps linux/version.h should come from 'linux' package rather than 'linux-api-headers'. What do you think?
This task depends upon

Closed by  Doug Newgard (Scimmia)
Sunday, 13 May 2018, 14:40 GMT
Reason for closing:  Not a bug
Comment by Doug Newgard (Scimmia) - Sunday, 13 May 2018, 14:10 GMT
Why does this matter?
Comment by Sami Kerola (kerolasa) - Sunday, 13 May 2018, 14:38 GMT
I was working with util-linux sources and ensuring kernel version checking is done without errors. Fact that run time and header did not mach just caught my eye. And now after couple hours I am leaning towards this is correct. This version should tell what is the version kernel shources where headers came from. Run time version can always be asked from kernel with uname, and it's better to have information around about mismatch.

Feel free to close with status code of 'answerred' or something like that.

Loading...