Bug#638878: linux-image-3.0.0-1-amd64: Maybe report Debian kernel version with uname
On Mon, Aug 22, 2011 at 01:44:03PM -0500, Jonathan Nieder wrote:
> Ben Hutchings wrote:
> >> Touko Korpela wrote:
>
> >>> Would it be possible to report Debian kernel version in uname
> >>> output? Maybe it can be added to "kernel version" string, uname -v
> >>> (now it's "#1 SMP Wed Aug 17 05:07:22 UTC 2011".
> >>> This information is present in /proc/version and could be in uname too.
> [...]
> > I don't think uname(1) should be changed; it is supposed to report
> > just what uname(2) does. We should change the behaviour of the
> > latter, if anything.
>
> Ah, ok. I admit my bias is towards not passing this information back
> from uname(2), since application authors could be tempted to parse it
> to provide Debian-specific behavior changes (for example, to work
> around bugs using the Debian kernel version number instead of finding
> some robust way to work around them that applies to other distros,
> too). On the other hand, as a human-readable version identifier,
> "linux-2.6 3.0.0-2 as compiled by Ben Hutchings on 2011-08-17
> 04:08:52" is more convenient than
>
> Linux 3.0.0-1-amd64 #1 SMP Wed Aug 17 04:08:52 UTC 2011 x86_64 GNU/Linux
>
> What is the underlying problem being solved? Is it that it is hard
> when reporting bugs to tell the difference between the package version
> and ABI version in order to provide the former?
I think the problem is that many generic scripts that attempt to
capture the kernel version will not use 'uname -a', 'uname -rv', or
similar. If they were to use /proc/version, that would be sufficient,
but then the uname commands probably work for almost every other
distribution. A generic script won't check package status (which
in any case doesn't necessarily match the running kernel version).
(We have an even worse problem with kernel tracebacks; they only show
the release e.g. '2.6.32-5-amd64'. But we could change that too.)
Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
Reply to: