[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt-get source linux-image-$(uname -r) downloads incorrect version



David Wittman <dwittman@gmail.com> wrote:

>> 3.16.0-4 is *not* the kernel version but the ABI name used.

> I feel dumb for asking, but the output of uname is not the exact
> kernel version I'm running? That seems contradictory to everything
> I've learned and read... including what I just read here[1]:

>> Kernel version 
>> This is the version that appears in kernel messages,
>> filenames, package names and the output of 'uname -r'.

> [1]: https://kernel-handbook.alioth.debian.org/ch-versions.html

You have to quote the whole paragraph:

,----
| Upstream version
| The version that Linus or a stable series maintainer uses for a release.
| Currently Linus will use the version format: 4.x[-rcy]. Stable series
| maintainers use the version format: 4.x.y.
`----

,----
| Kernel version
| This is the version that appears in kernel messages, filenames, package
| names and the output of 'uname -r'. In official kernel packages it
| follows the format upstreamversion[-abiname][-featureset]-flavour. It is
| not changed for every new package version. The abiname is changed as
| explained below.
|
| Many programs parse the kernel version string reported by the uname
| system call or command and expect to find at least 3 version components
| separated by dots. For compatibility, the official kernel packages
| currently add '.0' to the upstream version.
`----

So the upstream version is "3.16" (without the added stable release
minor-number), a '.0' is appended and then the ABI version is added,
"-4" in the current case.

This has to be put into the value visible by "uname -r", because all
kernel with the same ABI are binary compatible and modules don't need
recompiling. But all tools use the string from "uname -r" to decide if
the module needs updating, so the Debian maintainers decided to put the
ABI into that value and the real version (including compile date) is
available via "uname -v".

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.


Reply to: