[PATCH 0/1] version via build V1

Andy Whitcroft apw at canonical.com
Tue Dec 2 14:46:02 UTC 2008


We have had a bunch of patches looking at various aspects of how the
Ubuntu version is exposed.  Particularly that the base version for our
kernel is the ABI level, 2.6.27-10, and as such is not specific enough
to allow us to know which kernel we are actually running.  To fix that
we expose the full version in /proc/version signature.  However only the
base version is reported in Oops'es and panics, making it hard to detect
Ubuntu kernels and even more difficult to know which of any particular
ABI series a panic is from given only the kernel output.

One thing of note is that the kernel actually emits two parts of the
kernel version information when it Oops'es.  It emits the full release
string (our ABI version) and it also emits the first word (up to a space)
of the version field (normally the first word of '#1 SMP <date>').
Given this field is called the version it seems reasonable to use this
field to carry some more of our version information.  As this field is
designed to be overridden during build it is pretty easy to add the
rest of the debian/changelog entry to this field so that we end up with
something like the following for blessed builds:

   Linux version 2.6.27-10-generic (root at dm)
	(gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) )
	#21-Ubuntu SMP Mon Dec 1 17:56:07 GMT 2008

and something like this for home builds:

   Linux version 2.6.27-10-generic (root at dm)
	(gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) )
	#21~lp276943apw1 SMP Mon Dec 1 17:56:07 GMT 2008
	
The #21 here represents the real upload number from the debian/changelog
and the -Ubuntu indicates that this kernel was generated via a buildd.

Comments?

-apw

Andy Whitcroft (1):
  UBUNTU: expose the debian changelog version number via the kernel
    build number

 debian/rules.d/0-common-vars.mk |    9 ++++++++-
 debian/rules.d/1-maintainer.mk  |    1 +
 2 files changed, 9 insertions(+), 1 deletions(-)





More information about the kernel-team mailing list