From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: David Howells <dhowells@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Thomas Gleixner <tglx@linutronix.de>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Dave Jones <davej@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH] Fix: remove stale include/linux/version.h in toplevel Makefile
Date: Thu, 25 Apr 2013 10:24:58 -0400 [thread overview]
Message-ID: <20130425142458.GA5869@Krystal> (raw)
With a kernel tree that contains a generated include/linux/version.h, if
someone just does a git pull to update to a newer kernel version that
includes
commit 10b63956fce7f369cc37fd4d994f09bd5203efe4
"UAPI: Plumb the UAPI Kbuilds into the user header installation and
checking"
and
commit d183e6f570f3c0c23d253fd262c90244e72d7ffd
"UAPI: Move linux/version.h"
Any newer build will fail to overwrite or remove the stale version.h
file. The new include/generated/uapi/linux/version.h is indeed
generated, but the stale file in include/linux has precedence.
This leads to very unfortunate consequences for any user relying on
version.h to expose the kernel version accurately, since the old "stale"
kernel version will be seen by the build.
Ensure that stale include/linux/version.h is removed whenever the new
version.h is generated.
This patch should be backported to 3.7 and 3.8 stable branches after it
gets into mainline.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: David Howells <dhowells@redhat.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
CC: Dave Jones <davej@redhat.com>
CC: Linus Torvalds <torvalds@linux-foundation.org>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
Index: linux/Makefile
===================================================================
--- linux.orig/Makefile
+++ linux/Makefile
@@ -823,8 +823,10 @@ endif
# prepare2 creates a makefile if using a separate output directory
prepare2: prepare3 outputmakefile asm-generic
+# Includes removal of stale version.h from earlier kernel versions.
prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
include/config/auto.conf
+ $(Q)rm -f include/linux/version.h
$(cmd_crmodverdir)
archprepare: archheaders archscripts prepare1 scripts_basic
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
reply other threads:[~2013-04-25 14:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20130425142458.GA5869@Krystal \
--to=mathieu.desnoyers@efficios.com \
--cc=arnd@arndb.de \
--cc=davej@redhat.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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