public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Arun Sharma <asharma@fb.com>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: make rpm-pkg and version mismatch
Date: Wed, 04 May 2011 23:07:18 +0200	[thread overview]
Message-ID: <4DC1C006.70107@suse.cz> (raw)
In-Reply-To: <20110504204451.GA28259@dev1756.snc6.facebook.com>

Dne 4.5.2011 22:44, Arun Sharma napsal(a):
> On Wed, May 04, 2011 at 10:23:43PM +0200, Michal Marek wrote:
>> Please don't do that. make rpm has to work with the version string
>> set by the kernel, not the other way around.
> 
> Right.  Here's an alternative approach:
> 
> Could we modify the version string provided by the kernel to include
> the version string (which is derived from scripts/mkversion)
> 
> --- a/Makefile
> +++ b/Makefile
> @@ -363,11 +363,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)
>  KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

Again, please don't do that. Most users don't give a damn about make
rpm. If I build a pristine 2.6.39-rc6, I want uname -r report
2.6.39-rc6, not 2.6.39-rc6-1. not 2.6.39-rc6-2 or anything like that. If
I wanted to decorate the release string, I would set
CONFIG_LOCALVERSION, but please do not make that choice for me. make rpm
is a simple tool to allow developers easily copy kernels from their
build machine to another machine where they can test stuff. If you want
something more advanced, use the spec file from your distro.

Michal

      reply	other threads:[~2011-05-04 21:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 21:27 make rpm-pkg and version mismatch Arun Sharma
2011-05-04 20:23 ` Michal Marek
2011-05-04 20:44   ` Arun Sharma
2011-05-04 21:07     ` Michal Marek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DC1C006.70107@suse.cz \
    --to=mmarek@suse.cz \
    --cc=asharma@fb.com \
    --cc=linux-kbuild@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox