From 241ad11f2d2542723136ffa81cd5db61d590156c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 5 Jul 2009 20:17:34 +0200 Subject: kbuild, deb-pkg: fix install scripts for posix sh bash versus dash and posh disagree on expanding $@ within double quotes: export x="$@" see http://bugs.debian.org/381091 for details just use the arglist with $*. dpkg: error processing linux-image-2.6.31-rc1_2.6.31-rc1-18_i386.deb (--install): subprocess pre-installation script returned error exit status 2 export: 6: 2.6.31-rc1-18: bad variable name fixes http://bugzilla.kernel.org/show_bug.cgi?id=13567 seen on Ubuntu as there dash is the default sh, versus bash on Debian. Reported-by: Pauli Cc: Frans Pop Signed-off-by: maximilian attems Acked-By: Andres Salomon --- scripts/package/builddeb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/package/builddeb b/scripts/package/builddeb index b19f1f4962e..8b357b0bd25 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -89,7 +89,7 @@ for script in postinst postrm preinst prerm ; do set -e # Pass maintainer script parameters to hook scripts -export DEB_MAINT_PARAMS="\$@" +export DEB_MAINT_PARAMS="\$*" test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d exit 0 -- cgit v1.2.3 From 668cdedfdb2eb00d8efe127618bead4d46d9e942 Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Mon, 6 Jul 2009 00:07:14 -0400 Subject: kconfig: variable argument lists needs `stdarg.h' Fix build on non GNU based platforms. Cc: Roman Zippel Signed-off-by: Sam Ravnborg --- scripts/kconfig/lxdialog/util.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c index 86d95cca46a..f2375ad7ebc 100644 --- a/scripts/kconfig/lxdialog/util.c +++ b/scripts/kconfig/lxdialog/util.c @@ -19,6 +19,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include + #include "dialog.h" struct dialog_info dlg; -- cgit v1.2.3 From d0e1e09568507ac771072d97f0781af82c935b3e Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Mon, 6 Jul 2009 00:07:28 -0400 Subject: kconfig: initialize the screen before using curses(3) functions This is needed on non ncurses based implementation to get a properly initialized `stdscr' in main(). Cc: Roman Zippel Signed-off-by: Sam Ravnborg --- scripts/kconfig/mconf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 3bcacb4bfd3..25b60bc117f 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -888,6 +888,8 @@ int main(int ac, char **av) single_menu_mode = 1; } + initscr(); + getyx(stdscr, saved_y, saved_x); if (init_dialog(NULL)) { fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); -- cgit v1.2.3 From 51fbb4bab6c8710eb897ab3fb06efbbc921f3a8d Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Wed, 29 Jul 2009 15:02:03 -0700 Subject: markup_oops: fix it with 32-bit userspace on a 64-bit kernel A 32-bit perl can't handle 64-bit addresses without using the BigInt package. Signed-off-by: Matthew Wilcox Acked-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/markup_oops.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl index 528492bcba5..89774011965 100644 --- a/scripts/markup_oops.pl +++ b/scripts/markup_oops.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use File::Basename; +use Math::BigInt; # Copyright 2008, Intel Corporation # @@ -172,8 +173,8 @@ while () { parse_x86_regs($line); } -my $decodestart = hex($target) - hex($func_offset); -my $decodestop = hex($target) + 8192; +my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset"); +my $decodestop = Math::BigInt->from_hex("0x$target") + 8192; if ($target eq "0") { print "No oops found!\n"; print "Usage: \n"; -- cgit v1.2.3 From 870020f93af2323a81f179091a0780dc1d5b916b Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 29 Jul 2009 15:04:28 -0700 Subject: scripts/get_maintainer.pl: Add -f directory use Don't require a specific file in a directory to be tested. Also Arnd Bergmann pointed out that the MAINTAINERS pattern requirement that directory patterns have a trailing slash was unnecessary and was likely to be error prone. Removed that requirement. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 3e733146cd5..7fc09fc91e8 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -13,7 +13,7 @@ use strict; my $P = $0; -my $V = '0.16'; +my $V = '0.17'; use Getopt::Long qw(:config no_auto_abbrev); @@ -132,6 +132,10 @@ while () { $value =~ s@\.@\\\.@g; ##Convert . to \. $value =~ s/\*/\.\*/g; ##Convert * to .* $value =~ s/\?/\./g; ##Convert ? to . + ##if pattern is a directory and it lacks a trailing slash, add one + if ((-d $value)) { + $value =~ s@([^/])$@$1/@; + } } push(@typevalue, "$type:$value"); } elsif (!/^(\s)*$/) { @@ -146,8 +150,10 @@ close(MAINT); my @files = (); foreach my $file (@ARGV) { - next if ((-d $file)); - if (!(-f $file)) { + ##if $file is a directory and it lacks a trailing slash, add one + if ((-d $file)) { + $file =~ s@([^/])$@$1/@; + } elsif (!(-f $file)) { die "$P: file '${file}' not found\n"; } if ($from_filename) { @@ -292,7 +298,7 @@ sub file_match_pattern { sub usage { print < show version --help => show this help information +Notes: + Using "-f directory" may give unexpected results: + + Used with "--git", git signators for _all_ files in and below + directory are examined as git recurses directories. + Any specified X: (exclude) pattern matches are _not_ ignored. + Used with "--nogit", directory is used as a pattern match, + no individual file within the directory or subdirectory + is matched. EOT } -- cgit v1.2.3 From afa81ee13033de791c41c1d9333853504653939b Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 29 Jul 2009 15:04:28 -0700 Subject: get_maintainer.pl: Add git-min-percent option Allow an option to control the minimum percentage of sign-offs required before being considered a maintainer. git-min-percent has a default value of 5 Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 7fc09fc91e8..61ef27564ed 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -27,6 +27,7 @@ my $email_git = 1; my $email_git_penguin_chiefs = 0; my $email_git_min_signatures = 1; my $email_git_max_maintainers = 5; +my $email_git_min_percent = 5; my $email_git_since = "1-year-ago"; my $output_multiline = 1; my $output_separator = ", "; @@ -65,6 +66,7 @@ if (!GetOptions( 'git-chief-penguins!' => \$email_git_penguin_chiefs, 'git-min-signatures=i' => \$email_git_min_signatures, 'git-max-maintainers=i' => \$email_git_max_maintainers, + 'git-min-percent=i' => \$email_git_min_percent, 'git-since=s' => \$email_git_since, 'm!' => \$email_maintainer, 'n!' => \$email_usename, @@ -307,6 +309,7 @@ MAINTAINER field selection options: --git-chief-penguins => include ${penguin_chiefs} --git-min-signatures => number of signatures required (default: 1) --git-max-maintainers => maximum maintainers to add (default: 5) + --git-min-percent => minimum percentage of commits required (default: 0) --git-since => git history to use (default: 1-year-ago) --m => include maintainer(s) if any --n => include name 'Full Name ' @@ -497,6 +500,7 @@ sub recent_git_signoffs { my $output = ""; my $count = 0; my @lines = (); + my $total_sign_offs; if (which("git") eq "") { warn("$P: git not found. Add --nogit to options?\n"); @@ -520,17 +524,26 @@ sub recent_git_signoffs { $output =~ s/^\s*//gm; @lines = split("\n", $output); + + $total_sign_offs = 0; + foreach my $line (@lines) { + if ($line =~ m/([0-9]+)\s+(.*)/) { + $total_sign_offs += $1; + } else { + die("$P: Unexpected git output: ${line}\n"); + } + } + foreach my $line (@lines) { if ($line =~ m/([0-9]+)\s+(.*)/) { my $sign_offs = $1; $line = $2; $count++; if ($sign_offs < $email_git_min_signatures || - $count > $email_git_max_maintainers) { + $count > $email_git_max_maintainers || + $sign_offs * 100 / $total_sign_offs < $email_git_min_percent) { last; } - } else { - die("$P: Unexpected git output: ${line}\n"); } if ($line =~ m/(.+)<(.+)>/) { my $git_name = $1; -- cgit v1.2.3 From 3d202aeb7b7b33d5a5b2040ee5af5b309782941c Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 29 Jul 2009 15:04:29 -0700 Subject: get_maintainerpl-add-git-min-percent-option-fix Allow an option to control the minimum percentage of sign-offs required before being considered a maintainer. git-min-percent has a default value of 5 Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 61ef27564ed..278a45bd45a 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -309,7 +309,7 @@ MAINTAINER field selection options: --git-chief-penguins => include ${penguin_chiefs} --git-min-signatures => number of signatures required (default: 1) --git-max-maintainers => maximum maintainers to add (default: 5) - --git-min-percent => minimum percentage of commits required (default: 0) + --git-min-percent => minimum percentage of commits required (default: 5) --git-since => git history to use (default: 1-year-ago) --m => include maintainer(s) if any --n => include name 'Full Name ' -- cgit v1.2.3