diff mbox

[1/1] UBUNTU: custom binaries need VERSION_SIGNATURE updated during prepare

Message ID 1307558583-32276-2-git-send-email-apw@canonical.com
State New
Headers show

Commit Message

Andy Whitcroft June 8, 2011, 6:43 p.m. UTC
BugLink: http://bugs.launchpad.net/bugs/794698

When preparing the custom binary trees we build a configuration.  Part
of this should involve setting VERSION_SIGNATURE for that build.  This
is missed for custom binaries which leads to the confusing situation
that a -xen flavour will report as below:

    $ uname -a && cat /proc/version_signature
    Linux ip-10-36-7-174 2.6.24-29-xen #1 SMP
			Thu Apr 21 20:44:30 UTC 2011 i686 GNU/Linux
    Ubuntu 2.6.24-4.6-generic

This renders /proc/version_signature worthless.  Ensure we fill this
in when we build the config.

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

Comments

Stefan Bader June 8, 2011, 6:50 p.m. UTC | #1
On 08.06.2011 20:43, Andy Whitcroft wrote:
> BugLink: http://bugs.launchpad.net/bugs/794698
> 
> When preparing the custom binary trees we build a configuration.  Part
> of this should involve setting VERSION_SIGNATURE for that build.  This
> is missed for custom binaries which leads to the confusing situation
> that a -xen flavour will report as below:
> 
>     $ uname -a && cat /proc/version_signature
>     Linux ip-10-36-7-174 2.6.24-29-xen #1 SMP
> 			Thu Apr 21 20:44:30 UTC 2011 i686 GNU/Linux
>     Ubuntu 2.6.24-4.6-generic
> 
> This renders /proc/version_signature worthless.  Ensure we fill this
> in when we build the config.
> 
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
> ---
>  debian/rules.d/6-binary-custom.mk |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/debian/rules.d/6-binary-custom.mk b/debian/rules.d/6-binary-custom.mk
> index ec34480..908d162 100644
> --- a/debian/rules.d/6-binary-custom.mk
> +++ b/debian/rules.d/6-binary-custom.mk
> @@ -23,7 +23,8 @@ $(stampdir)/stamp-custom-prepare-%: debian/binary-custom.d/%/config.$(arch) \
>  		echo $$patch; \
>  		patch -p1 -d $(origsrc) < $$patch ;\
>  	done
> -	cat $< > $(srcdir)/.config
> +	cat $< | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$*"/' > $(srcdir)/.config
> +
>  	$(kmake) -C $(origsrc) O=$(srcdir) silentoldconfig prepare scripts
>  	touch $@
>  

Looks good to me

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Tim Gardner June 8, 2011, 6:51 p.m. UTC | #2
On 06/08/2011 12:43 PM, Andy Whitcroft wrote:
> BugLink: http://bugs.launchpad.net/bugs/794698
>
> When preparing the custom binary trees we build a configuration.  Part
> of this should involve setting VERSION_SIGNATURE for that build.  This
> is missed for custom binaries which leads to the confusing situation
> that a -xen flavour will report as below:
>
>      $ uname -a&&  cat /proc/version_signature
>      Linux ip-10-36-7-174 2.6.24-29-xen #1 SMP
> 			Thu Apr 21 20:44:30 UTC 2011 i686 GNU/Linux
>      Ubuntu 2.6.24-4.6-generic
>
> This renders /proc/version_signature worthless.  Ensure we fill this
> in when we build the config.
>
> Signed-off-by: Andy Whitcroft<apw@canonical.com>
> ---
>   debian/rules.d/6-binary-custom.mk |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/debian/rules.d/6-binary-custom.mk b/debian/rules.d/6-binary-custom.mk
> index ec34480..908d162 100644
> --- a/debian/rules.d/6-binary-custom.mk
> +++ b/debian/rules.d/6-binary-custom.mk
> @@ -23,7 +23,8 @@ $(stampdir)/stamp-custom-prepare-%: debian/binary-custom.d/%/config.$(arch) \
>   		echo $$patch; \
>   		patch -p1 -d $(origsrc)<  $$patch ;\
>   	done
> -	cat $<  >  $(srcdir)/.config
> +	cat $<  | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$*"/'>  $(srcdir)/.config
> +
>   	$(kmake) -C $(origsrc) O=$(srcdir) silentoldconfig prepare scripts
>   	touch $@
>

Acked-by: Tim Gardner <tim.gardner@canonical.com>
diff mbox

Patch

diff --git a/debian/rules.d/6-binary-custom.mk b/debian/rules.d/6-binary-custom.mk
index ec34480..908d162 100644
--- a/debian/rules.d/6-binary-custom.mk
+++ b/debian/rules.d/6-binary-custom.mk
@@ -23,7 +23,8 @@  $(stampdir)/stamp-custom-prepare-%: debian/binary-custom.d/%/config.$(arch) \
 		echo $$patch; \
 		patch -p1 -d $(origsrc) < $$patch ;\
 	done
-	cat $< > $(srcdir)/.config
+	cat $< | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$*"/' > $(srcdir)/.config
+
 	$(kmake) -C $(origsrc) O=$(srcdir) silentoldconfig prepare scripts
 	touch $@