Commit 20a52d4f authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  nconfig: Fix segfault when help contains special characters
  kbuild: Fix make rpm
  kbuild: Make the setlocalversion script POSIX-compliant
parents 339a2afc 58f915a3
......@@ -226,7 +226,7 @@ void fill_window(WINDOW *win, const char *text)
int len = get_line_length(line);
strncpy(tmp, line, min(len, x));
tmp[len] = '\0';
mvwprintw(win, i, 0, tmp);
mvwprintw(win, i, 0, "%s", tmp);
}
}
......
......@@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE
fi
$(MAKE) clean
$(PREV) ln -sf $(srctree) $(KERNELPATH)
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion
$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
$(PREV) rm $(KERNELPATH)
rm -f $(objtree)/.scmversion
......
......@@ -10,13 +10,13 @@
#
usage() {
echo "Usage: $0 [--scm-only] [srctree]" >&2
echo "Usage: $0 [--save-scmversion] [srctree]" >&2
exit 1
}
scm_only=false
srctree=.
if test "$1" = "--scm-only"; then
if test "$1" = "--save-scmversion"; then
scm_only=true
shift
fi
......@@ -30,11 +30,12 @@ fi
scm_version()
{
local short=false
local short
short=false
cd "$srctree"
if test -e .scmversion; then
cat "$_"
cat .scmversion
return
fi
if test "$1" = "--short"; then
......@@ -131,12 +132,15 @@ collect_files()
}
if $scm_only; then
scm_version
if test ! -e .scmversion; then
res=$(scm_version)
echo "$res" >.scmversion
fi
exit
fi
if test -e include/config/auto.conf; then
source "$_"
. include/config/auto.conf
else
echo "Error: kernelrelease not valid - run 'make prepare' to update it"
exit 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment