kbuild: Use git in scripts/setlocalversion
Rene Scharfe authored

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: default avatarRene Scharfe <rene.scharfe@lsrfire.ath.cx>
Acked-by: default avatarRyan Anderson <ryan@michonline.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
117a93db
Name Last commit Last update
..
basic kbuild: escape '#' in .target.cmd files
genksyms gitignore: misc files
kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
ksymoops Linux-2.6.12-rc2
mod Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
package kbuild: tar-pkg with out-out-tree building
.gitignore gitignore: ignore more generated files
Kbuild.include kbuild: add objectify
Lindent [PATCH] Lindent: ignore .indent.pro
Makefile kconfig: move lxdialog to scripts/kconfig/lxdialog
Makefile.build kbuild: fix building external modules
Makefile.clean kbuild: fix building external modules
Makefile.host [PATCH] kbuild: obey HOSTLOADLIBES_programname for single-file compilation
Makefile.lib kbuild: set correct KBUILD_MODNAME when using well known kernel symbols as module names
Makefile.modinst kbuild: introduce Kbuild.include
Makefile.modpost kbuild: introduce Kbuild.include
bin2c.c Linux-2.6.12-rc2
binoffset.c update the email address of Randy Dunlap
checkconfig.pl Linux-2.6.12-rc2
checkincludes.pl Linux-2.6.12-rc2
checkstack.pl Linux-2.6.12-rc2
checkversion.pl update the email address of Randy Dunlap
conmakehash.c [PATCH] kbuild: signed char fixes for scripts
extract-ikconfig Linux-2.6.12-rc2
gcc-version.sh Linux-2.6.12-rc2
gen_initramfs_list.sh
kallsyms.c
kernel-doc
makelst
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
mkversion
namespace.pl
patch-kernel
pnmtologo.c
reference_discarded.pl
reference_init.pl
setlocalversion
show_delta
ver_linux