Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932363Ab3DSSna (ORCPT ); Fri, 19 Apr 2013 14:43:30 -0400 Received: from mail.openrapids.net ([64.15.138.104]:57350 "EHLO blackscsi.openrapids.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753041Ab3DSSn3 (ORCPT ); Fri, 19 Apr 2013 14:43:29 -0400 Date: Fri, 19 Apr 2013 14:43:24 -0400 From: Mathieu Desnoyers To: David Howells Cc: Arnd Bergmann , Thomas Gleixner , "Paul E. McKenney" , Dave Jones , Linus Torvalds , linux-kernel@vger.kernel.org Subject: [RFC PATCH] Fix: remove stale include/linux/version.h in toplevel Makefile Message-ID: <20130419184324.GA1108@Krystal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: vi X-Info: http://www.efficios.com User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2099 Lines: 62 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. Signed-off-by: Mathieu Desnoyers CC: David Howells CC: Arnd Bergmann CC: Thomas Gleixner CC: "Paul E. McKenney" CC: Dave Jones CC: Linus Torvalds --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/