public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: zippel@linux-m68k.org, mingo@elte.hu, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, geert@linux-m68k.org,
	elendil@planet.nl, cloos@jhcloos.com
Subject: [PATCH 0/2] v4 kconfig: place git SHA1 in .config output if in SCM
Date: Fri, 5 Mar 2010 11:43:05 -0800	[thread overview]
Message-ID: <20100305194305.GA23009@linux.vnet.ibm.com> (raw)

This patch appends the localversion string to the Linux kernel version.
For example, in a git tree with uncommitted changes, the .config file
might start as follows (but with leading hash marks):

	Automatically generated make config: don't edit
	Linux kernel version: 2.6.33-01836-g90a6501-dirty
	Mon Mar  1 17:05:59 2010

The "-01836-g90a6501-dirty" string is added by this patch.

The KBUILD_CONFIG_NO_CHECK_DIRTY environment variable controls the
git "-dirty" check.  If this variable is either empty or undefined,
then a "-dirty" check is performed (the default), otherwise, this
check is omitted.

Differences from v3 (http://lkml.org/lkml/2010/3/4/520):

o	Print errors to stderr, using gcc error format so that scripts
	that pull errors from build output will find them.

o	Make error strings placed in .config file more comprehensible.

o	Make parent warn of child error return (via wait() system call).

Differences from v2 (http://lkml.org/lkml/2010/3/2/570):

o	Replace popen() with the equivalent fork-exec series
	to prevent security vulnerabilities due to shell metacharacter
	interpretation.

o	Added the KBUILD_CONFIG_NO_CHECK_DIRTY environment variable,
	and modified scripts/setlocalversion to check it, as suggested
	by James Cloos.

Differences from v1 (http://lkml.org/lkml/2010/2/28/191):

o	Incorporates feedback from Geert Uytterhoeven, Linus Torvalds,
	Frans Pop, and James Cloos.

o	Fixed to work correctly with the "O=" Makefile argument and
	the KBUILD_OUTPUT environment variable, so that .config files
	created in directories outside of the source tree are tagged
	correctly.

o	Uses scripts/setlocalversion, which handles not only git, but
	also mercurial and svn.

o	Make the new behavior default-off, as scripts/setlocalversion
	has significant latency.  A new environment variable named
	"KBUILD_CONFIG_LOCALVERSION" must be set to enable the
	"-01836-g90a6501-dirty" style of string.

	This is intended to address James Cloos's concern that this
	feature will slow down casual kernel builds.

It has been suggested that this string be output at boot and oops time.
If there is general agreement, this will be the subject of a separate
patch.

 kconfig/confdata.c |   69 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 setlocalversion    |   18 +++++++------
 2 files changed, 76 insertions(+), 11 deletions(-)

             reply	other threads:[~2010-03-05 19:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 19:43 Paul E. McKenney [this message]
2010-03-05 19:44 ` [PATCH tip/core/rcu 1/2] kconfig: place localversion string in .config output Paul E. McKenney
2010-03-05 19:44   ` [PATCH tip/core/rcu 2/2] kconfig: make setlocalversion -dirty check optional Paul E. McKenney
2010-03-08 15:01 ` [PATCH 0/2] v4 kconfig: place git SHA1 in .config output if in SCM Michal Marek
2010-03-11  2:59   ` Paul E. McKenney

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=20100305194305.GA23009@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=cloos@jhcloos.com \
    --cc=elendil@planet.nl \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=zippel@linux-m68k.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