UBUNTU: expose the debian changelog version number via the kernel build number
We currently expose the Ubuntu ABI via the basic kernel version
number (in /proc/version and uname) and expose the full version via
/proc/version_signature. We do this to maintain stability in the naming
of our modules simplifying external module updates. But this does mean
that the normal version is lacking some information needed to directly
identify the actual build, both to normal tools and more importantly in
the Oops/panic output:
$ cat /proc/version
Linux version 2.6.27-10-generic (root@dm) (gcc version 4.3.2 (Ubuntu
4.3.2-1ubuntu11) ) #1 SMP Mon Dec 1 17:56:07 GMT 2008
$ cat /proc/version_signature
Ubuntu 2.6.27-10.21~lp276943apw1-generic
This patch additionally exposed the version suffix via the 'version'
field, the #1 SMP <date> section above as below. This exposes the
upload number plus and relative updates:
$ cat /proc/version
Linux version 2.6.27-10-generic (root@dm) (gcc version 4.3.2 (Ubuntu
4.3.2-1ubuntu11) ) #21~lp276943apw1 SMP Mon Dec 1 17:56:07 GMT 2008
This has the advantage that the oops reporter also reports the the
beginning of this field (up to the first space) as part of a panic so
they would then look like the below which should aid kernel
identification:
Pid: 2847, comm: grub Not tainted 2.6.27-10-generic #21~lp276943apw1
For autobuilder generated builds we also add a -Ubuntu suffix indicating
they are offical releases. This also appears with the upload number in
oopses.
Pid: 2847, comm: grub Not tainted 2.6.27-10-generic #21-Ubuntu
This may be enough for kerneloops to know they are ours.
+uploadnum := $(shell echo $(revision) | sed -e 's/.*.//')
+ifneq ($(wildcard /CurrentlyBuilding),)
+ uploadnum := $(uploadnum)-Ubuntu
+endif
+
# We force the sublevel to be exactly what we want. The actual source may
# be an in development git tree. We want to force it here instead of
# committing changes to the top level Makefile
@@ -91,7 +96,9 @@ conc_level = -j$(CONCURRENCY_LEVEL)