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@xxxxxx> > --- > 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-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html