Commit Graph

5 Commits

Author SHA1 Message Date
Uwe Zeisberger
216b2f1f71 kbuild: append -dirty for updated but uncommited changes
Compare the working copy with the last commit, instead of the index.

Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Acked-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-17 00:08:17 +02:00
Uwe Zeisberger
29b0c89953 kbuild: append git revision for all untagged commits
adds revision suffix for untagged commits that are reachable from a tag

I'm bisecting and don't get the -g...... suffix.  The reason is, that

	git name-rev --tags HEAD

returns e.g.

	HEAD tags/v2.6.17-rc1^0~1067

which is currently good enough for setlocalversion to skip the suffix.
This introduces a dependecy to grep -E, which should be fine.

Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Acked-By: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-17 00:08:17 +02:00
Ryan Anderson
24d49756aa kbuild: In setlocalversion change -git_dirty to just -dirty
When building Debian packages directly from the git tree, the appended
"git_dirty" is a problem due to the underscore.  In order to cause the
least problems, change that just to "dirty".

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-01-08 18:44:01 +01:00
Rene Scharfe
117a93db1d kbuild: Use git in scripts/setlocalversion
Currently scripts/setlocalversion is a Perl script that tries to figure
out the current git commit ID of a repo without using git.  It also
imports Digest::MD5 without using it and generally is too big for the
small task it does. :]  And it always reports a git ID, even when the
HEAD is tagged -- this is a bug.

This patch replaces it with a Bourne Shell script that uses git
commands to do the same.  I can't come up with a scenario where someone
would use a git repo and refuse to install git core at the same time,
so I think it's reasonable to assume git is available.

The new script also reports uncommitted changes by adding -git_dirty to
the version string.  Obviously you can't see from that _what_ has been
changed from the last commit, so it's more of a reminder that you
forgot to commit something.

The script is easily extensible: simply add a check for Mercurial (or
whatever) below the git check.

Note: the script doesn't print a newline char anymore.  That's only
because it was easier to implement it that way, not a feature (or bug).
'make kernelrelease' doesn't care.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Acked-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-01-06 20:46:21 +01:00
Ryan Anderson
aaebf43320 [PATCH] kbuild: automatically append a short string to the version based upon the git commit
If CONFIG_AUTO_LOCALVERSION is set, the user is using a git-based tree, and the
current HEAD is not referred to by any tags in .git/refs/tags/, append -g and
the first 8 characters of the commit to the version string.  This makes it
easier to use git-bisect, and/or to do a daily build, without trampling on your
older, working builds, or accidentally setting up conflicting sets of modules.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-08-10 21:11:23 +02:00