lkml.org 
[lkml]   [2011]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/6] kbuild: Append RPM release to $KERNELRELEASE
On 17.5.2011 19:36, Arun Sharma wrote:
> Provide the same consistency as distributor kernels.
> uname -r matches RPM name (includes the release)
>
> Glossary:
>
> KERNELRELEASE = what users see
> ___KERNELRELEASE = KERNELRELEASE without RPM release
> __KERNELRELEASE = ___KERNELRELEASE with s/-/_/g
>
> Signed-off-by: Arun Sharma <asharma@fb.com>
> ---
> Makefile | 9 ++++++---
> scripts/package/Makefile | 2 +-
> scripts/package/mkspec | 2 +-
> 3 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 28820f7..90d45f4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -367,11 +367,14 @@ KBUILD_AFLAGS_MODULE := -DMODULE
> KBUILD_CFLAGS_MODULE := -DMODULE
> KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
>
> -# Read KERNELRELEASE from include/config/kernel.release (if it exists)
> -KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
> +# Read ___KERNELRELEASE from include/config/kernel.release (if it exists)
> +___KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
> +# Append the release version only once.
> +# Note: .version could change during the build.
> +KERNELRELEASE ?= $(___KERNELRELEASE)-$(shell /bin/sh scripts/mkversion)

Please stop decorating the kernel release string for the sake of make
rpm, thanks. If you really want the kernel release string match rpm's
%{version}-%{release}, how about this: Let the user set
CONFIG_LOCALVERSION=-<number> and check in make rpm if $KERNELRELEASE
ends with -<number>. If so, use <number> in the Release: field and the
rest in Version:, otherwise use the same scheme as before. That way, you
won't force a new kernel release numbering scheme on anyone.

Michal


\
 
 \ /
  Last update: 2011-05-17 22:17    [W:0.537 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site