From 84da2a677a7133426829a05954af64dd533bf7a5 Mon Sep 17 00:00:00 2001 From: Magnus Kroken Date: Sun, 15 Jan 2017 02:21:41 +0100 Subject: busybox: update to 1.26.2 Refresh patches, delete patches that have been applied upstream. Signed-off-by: Magnus Kroken Tested-by: Koen Vandeputte Signed-off-by: Felix Fietkau [fix defaults] --- package/utils/busybox/config/shell/Config.in | 234 ++++++++++++++------------- 1 file changed, 119 insertions(+), 115 deletions(-) (limited to 'package/utils/busybox/config/shell') diff --git a/package/utils/busybox/config/shell/Config.in b/package/utils/busybox/config/shell/Config.in index 69ecf145e1..4193c18806 100644 --- a/package/utils/busybox/config/shell/Config.in +++ b/package/utils/busybox/config/shell/Config.in @@ -6,6 +6,57 @@ menu "Shells" + +choice + prompt "Choose which shell is aliased to 'sh' name" + default BUSYBOX_CONFIG_SH_IS_ASH + help + Choose which shell you want to be executed by 'sh' alias. + The ash shell is the most bash compatible and full featured one. + +# note: cannot use "select ASH" here, it breaks "make allnoconfig" +config BUSYBOX_CONFIG_SH_IS_ASH + depends on !BUSYBOX_CONFIG_NOMMU + bool "ash" + +config BUSYBOX_CONFIG_SH_IS_HUSH + bool "hush" + +config BUSYBOX_CONFIG_SH_IS_NONE + bool "none" + +endchoice + +choice + prompt "Choose which shell is aliased to 'bash' name" + default BUSYBOX_CONFIG_BASH_IS_NONE + help + Choose which shell you want to be executed by 'bash' alias. + The ash shell is the most bash compatible and full featured one. + + Note that selecting this option does not switch on any bash + compatibility code. It merely makes it possible to install + /bin/bash (sym)link and run scripts which start with + #!/bin/bash line. + + Many systems use it in scripts which use bash-specific features, + even simple ones like $RANDOM. Without this option, busybox + can't be used for running them because it won't recongnize + "bash" as a supported applet name. + +config BUSYBOX_CONFIG_BASH_IS_ASH + depends on !BUSYBOX_CONFIG_NOMMU + bool "ash" + +config BUSYBOX_CONFIG_BASH_IS_HUSH + bool "hush" + +config BUSYBOX_CONFIG_BASH_IS_NONE + bool "none" + +endchoice + + config BUSYBOX_CONFIG_ASH bool "ash" default BUSYBOX_DEFAULT_ASH @@ -17,73 +68,109 @@ config BUSYBOX_CONFIG_ASH shell (by Herbert Xu), which was created by porting the 'ash' shell (written by Kenneth Almquist) from NetBSD. +config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE + bool "Optimize for size instead of speed" + default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + help + Compile ash for reduced size at the price of speed. + +config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB + bool "Use internal glob() implementation" + default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB # Y is bigger, but because of uclibc glob() bug, let Y be default for now + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + help + Do not use glob() function from libc, use internal implementation. + Use this if you are getting "glob.h: No such file or directory" + or similar build errors. + +config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT + bool "Pseudorandom generator and $RANDOM variable" + default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + help + Enable pseudorandom generator and dynamic variable "$RANDOM". + Each read of "$RANDOM" will generate a new pseudorandom value. + You can reset the generator by using a specified start value. + After "unset RANDOM" the generator will switch off and this + variable will no longer have special treatment. + +config BUSYBOX_CONFIG_ASH_EXPAND_PRMT + bool "Expand prompt string" + default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + help + "PS#" may contain volatile content, such as backquote commands. + This option recreates the prompt string from the environment + variable each time it is displayed. + config BUSYBOX_CONFIG_ASH_BASH_COMPAT bool "bash-compatible extensions" default BUSYBOX_DEFAULT_ASH_BASH_COMPAT - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable bash-compatible extensions. config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT bool "Idle timeout variable" default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enables bash-like auto-logout after $TMOUT seconds of idle time. config BUSYBOX_CONFIG_ASH_JOB_CONTROL bool "Job control" default BUSYBOX_DEFAULT_ASH_JOB_CONTROL - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable job control in the ash shell. config BUSYBOX_CONFIG_ASH_ALIAS bool "Alias support" default BUSYBOX_DEFAULT_ASH_ALIAS - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable alias support in the ash shell. config BUSYBOX_CONFIG_ASH_GETOPTS bool "Builtin getopt to parse positional parameters" default BUSYBOX_DEFAULT_ASH_GETOPTS - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable support for getopts builtin in ash. config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO bool "Builtin version of 'echo'" default BUSYBOX_DEFAULT_ASH_BUILTIN_ECHO - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable support for echo builtin in ash. config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF bool "Builtin version of 'printf'" default BUSYBOX_DEFAULT_ASH_BUILTIN_PRINTF - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable support for printf builtin in ash. config BUSYBOX_CONFIG_ASH_BUILTIN_TEST bool "Builtin version of 'test'" default BUSYBOX_DEFAULT_ASH_BUILTIN_TEST - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable support for test builtin in ash. config BUSYBOX_CONFIG_ASH_HELP bool "help builtin" default BUSYBOX_DEFAULT_ASH_HELP - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable help builtin in ash. config BUSYBOX_CONFIG_ASH_CMDCMD bool "'command' command to override shell builtins" default BUSYBOX_DEFAULT_ASH_CMDCMD - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable support for the ash 'command' builtin, which allows you to run the specified command with the specified arguments, @@ -92,37 +179,9 @@ config BUSYBOX_CONFIG_ASH_CMDCMD config BUSYBOX_CONFIG_ASH_MAIL bool "Check for new mail on interactive shells" default BUSYBOX_DEFAULT_ASH_MAIL - depends on BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH help Enable "check for new mail" function in the ash shell. - -config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE - bool "Optimize for size instead of speed" - default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE - depends on BUSYBOX_CONFIG_ASH - help - Compile ash for reduced size at the price of speed. - -config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT - bool "Pseudorandom generator and $RANDOM variable" - default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT - depends on BUSYBOX_CONFIG_ASH - help - Enable pseudorandom generator and dynamic variable "$RANDOM". - Each read of "$RANDOM" will generate a new pseudorandom value. - You can reset the generator by using a specified start value. - After "unset RANDOM" the generator will switch off and this - variable will no longer have special treatment. - -config BUSYBOX_CONFIG_ASH_EXPAND_PRMT - bool "Expand prompt string" - default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT - depends on BUSYBOX_CONFIG_ASH - help - "PS#" may contain volatile content, such as backquote commands. - This option recreates the prompt string from the environment - variable each time it is displayed. - config BUSYBOX_CONFIG_CTTYHACK bool "cttyhack" default BUSYBOX_DEFAULT_CTTYHACK @@ -183,7 +242,7 @@ config BUSYBOX_CONFIG_HUSH config BUSYBOX_CONFIG_HUSH_BASH_COMPAT bool "bash-compatible extensions" default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable bash-compatible extensions. @@ -197,14 +256,14 @@ config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION config BUSYBOX_CONFIG_HUSH_HELP bool "help builtin" default BUSYBOX_DEFAULT_HUSH_HELP - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable help builtin in hush. Code size + ~1 kbyte. config BUSYBOX_CONFIG_HUSH_INTERACTIVE bool "Interactive mode" default BUSYBOX_DEFAULT_HUSH_INTERACTIVE - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable interactive mode (prompt and command editing). Without this, hush simply reads and executes commands @@ -232,35 +291,35 @@ config BUSYBOX_CONFIG_HUSH_JOB config BUSYBOX_CONFIG_HUSH_TICK bool "Process substitution" default BUSYBOX_DEFAULT_HUSH_TICK - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable process substitution `command` and $(command) in hush. config BUSYBOX_CONFIG_HUSH_IF bool "Support if/then/elif/else/fi" default BUSYBOX_DEFAULT_HUSH_IF - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable if/then/elif/else/fi in hush. config BUSYBOX_CONFIG_HUSH_LOOPS bool "Support for, while and until loops" default BUSYBOX_DEFAULT_HUSH_LOOPS - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable for, while and until loops in hush. config BUSYBOX_CONFIG_HUSH_CASE bool "Support case ... esac statement" default BUSYBOX_DEFAULT_HUSH_CASE - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable case ... esac statement in hush. +400 bytes. config BUSYBOX_CONFIG_HUSH_FUNCTIONS bool "Support funcname() { commands; } syntax" default BUSYBOX_DEFAULT_HUSH_FUNCTIONS - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable support for shell functions in hush. +800 bytes. @@ -274,7 +333,7 @@ config BUSYBOX_CONFIG_HUSH_LOCAL config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT bool "Pseudorandom generator and $RANDOM variable" default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable pseudorandom generator and dynamic variable "$RANDOM". Each read of "$RANDOM" will generate a new pseudorandom value. @@ -282,14 +341,14 @@ config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT config BUSYBOX_CONFIG_HUSH_EXPORT_N bool "Support 'export -n' option" default BUSYBOX_DEFAULT_HUSH_EXPORT_N - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help export -n unexports variables. It is a bash extension. config BUSYBOX_CONFIG_HUSH_MODE_X bool "Support 'hush -x' option and 'set -x' command" default BUSYBOX_DEFAULT_HUSH_MODE_X - depends on BUSYBOX_CONFIG_HUSH + depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help This instructs hush to print commands before execution. Adds ~300 bytes. @@ -302,72 +361,17 @@ config BUSYBOX_CONFIG_MSH msh is deprecated and will be removed, please migrate to hush. - -choice - prompt "Choose which shell is aliased to 'sh' name" - default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH - help - Choose which shell you want to be executed by 'sh' alias. - The ash shell is the most bash compatible and full featured one. - -# note: cannot use "select ASH" here, it breaks "make allnoconfig" -config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH - depends on BUSYBOX_CONFIG_ASH - bool "ash" - depends on !BUSYBOX_CONFIG_NOMMU - -config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH - depends on BUSYBOX_CONFIG_HUSH - bool "hush" - -config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE - bool "none" - -endchoice - -choice - prompt "Choose which shell is aliased to 'bash' name" - default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE - help - Choose which shell you want to be executed by 'bash' alias. - The ash shell is the most bash compatible and full featured one. - - Note that selecting this option does not switch on any bash - compatibility code. It merely makes it possible to install - /bin/bash (sym)link and run scripts which start with - #!/bin/bash line. - - Many systems use it in scripts which use bash-specific features, - even simple ones like $RANDOM. Without this option, busybox - can't be used for running them because it won't recongnize - "bash" as a supported applet name. - -config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH - depends on BUSYBOX_CONFIG_ASH - bool "ash" - depends on !BUSYBOX_CONFIG_NOMMU - -config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH - depends on BUSYBOX_CONFIG_HUSH - bool "hush" - -config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE - bool "none" - -endchoice - - -config BUSYBOX_CONFIG_SH_MATH_SUPPORT +config BUSYBOX_CONFIG_FEATURE_SH_MATH bool "POSIX math support" - default BUSYBOX_DEFAULT_SH_MATH_SUPPORT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH + default BUSYBOX_DEFAULT_FEATURE_SH_MATH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Enable math support in the shell via $((...)) syntax. -config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64 +config BUSYBOX_CONFIG_FEATURE_SH_MATH_64 bool "Extend POSIX math support to 64 bit" - default BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64 - depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT + default BUSYBOX_DEFAULT_FEATURE_SH_MATH_64 + depends on BUSYBOX_CONFIG_FEATURE_SH_MATH help Enable 64-bit math support in the shell. This will make the shell slightly larger, but will allow computation with very large numbers. @@ -376,14 +380,14 @@ config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64 config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET bool "Hide message on interactive shell startup" default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help Remove the busybox introduction when starting a shell. config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE bool "Standalone shell" default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE - depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help This option causes busybox shells to use busybox applets in preference to executables in the PATH whenever possible. For @@ -416,7 +420,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE config BUSYBOX_CONFIG_FEATURE_SH_NOFORK bool "Run 'nofork' applets directly" default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK - depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help This option causes busybox shells to not execute typical fork/exec/wait sequence, but call _main directly, @@ -434,7 +438,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_NOFORK config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE bool "Use $HISTFILESIZE" default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH + depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH help This option makes busybox shells to use $HISTFILESIZE variable to set shell history size. Note that its max value is capped -- cgit v1.2.3