FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

LinkBack Thread Tools
Old 03-15-2010, 09:48 AM
Andy Whitcroft
Default UBUNTU: expose the kernel EXTRAVERSION in dmesg and /proc/version_signature

Our versioning has always overridden the kernel EXTRAVERSION such that
where we are based on an -rcN release candidate or have stable updates
applied that information was lost. We now also have the issue that we
have a major drm backport in the kernel which will take stable updates
from a different source on a different release schedule and it is hard
to know which version is in the kernel.

This patch adds the kernel EXTRAVERSION to /proc/version_signature and
though that also to the kernel version banner. This allows us to know
the exact original kernel version we are based on. This also allows us to
augment the version information by adding additional versions to the
EXTRAVERSION. For example the following EXTRAVERSION:

EXTRAVERSION = .9+drm33.0

Generates the following version strings:

$ cat /proc/version_signature
Ubuntu 2.6.32-16.26-generic
$ dmesg | grep Linux version
[ 0.000000] Linux version 2.6.32-16-generic (root@chloe)
(gcc version 4.4.3 (Ubuntu 4.4.3-3ubuntu1) ) #26-Ubuntu SMP
Fri Mar 12 18:02:3 (Ubuntu 2.6.32-16.26-generic

Signed-off-by: Andy Whitcroft <apw@canonical.com>
debian/rules.d/0-common-vars.mk | 3 +++
debian/rules.d/2-binary-arch.mk | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index 0909dc7..d069cad 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -49,6 +49,9 @@ ifneq ($(PRINTSHAS),)
ubuntu_log_opts += --print-shas

+# Get the kernels own extra version to be added to the release signature.
+extraversion=$(shell awk '/EXTRAVERSION =/ { print $$3 }' <Makefile)
# The debug packages are ginormous, so you probably want to skip
# building them (as a developer).
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 9d36928..4caf3bd 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -21,7 +21,7 @@ $(stampdir)/stamp-prepare-tree-%: $(commonconfdir)/config.common.$(family) $(arc
touch $(builddir)/build-$*/ubuntu-build
[ "$(do_full_source)" != 'true' ] && true ||
rsync -a --exclude debian --exclude debian.master --exclude $(DEBIAN) * $(builddir)/build-$*
- cat $^ | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$*"/' > $(builddir)/build-$*/.config
+ cat $^ | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(release)$(extraversion)"/' > $(builddir)/build-$*/.config
find $(builddir)/build-$* -name "*.ko" | xargs rm -f
$(build_cd) $(kmake) $(build_O) silentoldconfig prepare scripts
ifeq ($(do_tools),true)

kernel-team mailing list

Thread Tools

All times are GMT. The time now is 01:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org