[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DD2D703.4030908@suse.cz>
Date: Tue, 17 May 2011 22:13:55 +0200
From: Michal Marek <mmarek@...e.cz>
To: Arun Sharma <asharma@...com>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists