From: Chet Ramey Date: Tue, 8 Jul 2025 13:59:39 +0000 (-0400) Subject: update formatted documentation; fix typo in bashline.c; update system-dependent tests X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12ea4bfec3e9f06fea2930a55f49c4c2ccf08071;p=thirdparty%2Fbash.git update formatted documentation; fix typo in bashline.c; update system-dependent tests --- diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index a868dc5c..3f25c008 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -11288,3 +11288,10 @@ general.c parse.y - read_token_word: set dollar_present if we see <( or >), backing out change from 2/4/2023 + +[bash-5.3 frozen] + + 7/2 + --- +tests/printf7.sub,tests/exec3.sub + - changes to compensate for some system differences (macos/Linux/BSD) diff --git a/bashline.c b/bashline.c index 2b4da758..c6039844 100644 --- a/bashline.c +++ b/bashline.c @@ -4142,7 +4142,7 @@ vi_advance_point (void) } } #else - rl_point++: + rl_point++; #endif return point; } diff --git a/builtins/printf.def b/builtins/printf.def index 7d7f8c26..142c5bdf 100644 --- a/builtins/printf.def +++ b/builtins/printf.def @@ -914,7 +914,11 @@ printstr (char *fmt, char *string, size_t len, int fieldwidth, int precision) pr = decodeint (&fmt, 1, -1); /* pr < precision means we adjusted precision in printf_builtin for the quoted string length (%Q), so we use the adjusted value */ +#if 0 /*TAG:bash-5.4 20250702 */ + if (pr >= 0 && pr < precision) +#else if (pr < precision) +#endif pr = precision; } else diff --git a/doc/bash.1 b/doc/bash.1 index 5af3492f..3ad39fac 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -5400,7 +5400,7 @@ when it is referenced, or when a variable which has been given the \fIinteger\fP attribute using \fBdeclare \-i\fP is assigned a value. A null value evaluates to 0. A shell variable need not have its \fIinteger\fP attribute -turned on to be used in an expression. +enabled to be used in an expression. .PP Integer constants follow the C language definition, without suffixes or character constants. diff --git a/doc/bashbug.0 b/doc/bashbug.0 index 58f08de2..0047e370 100644 --- a/doc/bashbug.0 +++ b/doc/bashbug.0 @@ -1,6 +1,4 @@ -BASHBUG(1) General Commands Manual BASHBUG(1) - - +_B_A_S_H_B_U_G(1) General Commands Manual _B_A_S_H_B_U_G(1) NNAAMMEE bashbug - report a bug in bash @@ -32,7 +30,7 @@ EENNVVIIRROONNMMEENNTT eemmaaccss. If bbaasshhbbuugg cannot locate any of the alternative editors, it attempts to execute vvii. - HHOOMMEE Directory in which the failed bug report is saved if the mail + HHOOMMEE Directory in which the failed bug report is saved if the mail fails. TTMMPPDDIIRR Directory in which to create temporary files and directories. @@ -47,6 +45,4 @@ AAUUTTHHOORRSS Chet Ramey, Case Western Reserve University chet@po.cwru.edu - - -GNU Bash 5.2 2020 August 1 BASHBUG(1) +GNU Bash 5.3 2020 August 1 _B_A_S_H_B_U_G(1) diff --git a/doc/bashbug.1 b/doc/bashbug.1 index abcaf482..c98405ac 100644 --- a/doc/bashbug.1 +++ b/doc/bashbug.1 @@ -7,7 +7,7 @@ .\" .\" Last Change: Sun Aug 2 15:39:07 EDT 2020 .\" -.TH BASHBUG 1 "2020 August 1" "GNU Bash 5.1" +.TH BASHBUG 1 "2020 August 1" "GNU Bash 5.3" .SH NAME bashbug \- report a bug in bash .SH SYNOPSIS diff --git a/doc/bashref.texi b/doc/bashref.texi index 138a0f9b..22221df6 100644 --- a/doc/bashref.texi +++ b/doc/bashref.texi @@ -8505,7 +8505,7 @@ The value of a variable is evaluated as an arithmetic expression when it is referenced, or when a variable which has been given the @code{integer} attribute using @samp{declare -i} is assigned a value. A null value evaluates to 0. -A shell variable need not have its @code{integer} attribute turned on +A shell variable need not have its @code{integer} attribute enabled to be used in an expression. Integer constants follow the C language definition, without suffixes or diff --git a/doc/builtins.0 b/doc/builtins.0 index 9136232b..112f4410 100644 --- a/doc/builtins.0 +++ b/doc/builtins.0 @@ -2325,4 +2325,4 @@ SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE SSEEEE AALLSSOO bash(1), sh(1) -GNU Bash 5.2 2023 January 27 _B_A_S_H___B_U_I_L_T_I_N_S(1) +GNU Bash 5.3 2023 January 27 _B_A_S_H___B_U_I_L_T_I_N_S(1) diff --git a/doc/builtins.1 b/doc/builtins.1 index dad2dc9b..5c9245e8 100644 --- a/doc/builtins.1 +++ b/doc/builtins.1 @@ -7,7 +7,7 @@ .de FN \fI\|\\$1\|\fP .. -.TH BASH_BUILTINS 1 "2023 January 27" "GNU Bash 5.2" +.TH BASH_BUILTINS 1 "2023 January 27" "GNU Bash 5.3" .SH NAME :, ., [, alias, bg, bind, break, builtin, caller, cd, command, compgen, complete, compopt, diff --git a/doc/builtins.pdf b/doc/builtins.pdf index 9a8f2884..a73377c6 100644 Binary files a/doc/builtins.pdf and b/doc/builtins.pdf differ diff --git a/doc/rbash.0 b/doc/rbash.0 index 2eeae366..0ea451e4 100644 --- a/doc/rbash.0 +++ b/doc/rbash.0 @@ -60,4 +60,4 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL SSEEEE AALLSSOO bash(1) -Bash-5.2 2021 November 22 _R_B_A_S_H(1) +Bash-5.3 2021 November 22 _R_B_A_S_H(1) diff --git a/doc/rbash.1 b/doc/rbash.1 index 39309b4c..1733297d 100644 --- a/doc/rbash.1 +++ b/doc/rbash.1 @@ -1,4 +1,4 @@ -.TH RBASH 1 "2021 November 22" "Bash-5.2" +.TH RBASH 1 "2021 November 22" "Bash-5.3" .SH NAME rbash \- restricted bash, see \fBbash\fR(1) .SH RESTRICTED SHELL diff --git a/doc/rbash.pdf b/doc/rbash.pdf index 76ea9a0b..ca2474c0 100644 Binary files a/doc/rbash.pdf and b/doc/rbash.pdf differ diff --git a/tests/exec.right b/tests/exec.right index 0116f202..bc30e5fc 100644 --- a/tests/exec.right +++ b/tests/exec.right @@ -25,16 +25,16 @@ posix-bash: line 1: exec: .: cannot execute: Is a directory 126 0 this is bashenv -trap -- 'echo EXIT' EXIT trap -- '' SIGTERM trap -- 'echo USR1' SIGUSR1 +trap -- 'rm -f x.sh x.output ; echo EXIT' EXIT USR1 -./exec3.sub: line 38: /tmp/bash-notthere: No such file or directory +./exec3.sub: line 45: /tmp/bash-notthere: No such file or directory ./exec3.sub: ENOENT: after failed exec: 127 -./exec3.sub: line 43: exec: bash-notthere: not found -trap -- 'echo EXIT' EXIT +./exec3.sub: line 50: exec: bash-notthere: not found trap -- '' SIGTERM trap -- 'echo USR1' SIGUSR1 +trap -- 'rm -f x.sh x.output ; echo EXIT' EXIT USR1 EXIT ./execscript: line 103: notthere: command not found diff --git a/tests/exec3.sub b/tests/exec3.sub index 089edf41..25851113 100644 --- a/tests/exec3.sub +++ b/tests/exec3.sub @@ -25,10 +25,17 @@ cd $TDIR || exit 1 shopt -s execfail -trap 'echo EXIT' EXIT +trapsort() +{ + trap > x.output + sort x.output && rm -f x.output +} + +trap 'rm -f x.sh x.output ; echo EXIT' EXIT trap 'echo USR1' USR1 trap '' TERM -trap + +trapsort kill -s USR1 $$ # should run the trap @@ -94,7 +101,7 @@ case $string in esac rm -f x.sh x.output -trap +trapsort kill -s USR1 $$ # should run the trap kill -s TERM $$ # should still be ignored diff --git a/tests/printf7.sub b/tests/printf7.sub index 888e9d90..50bcf98f 100644 --- a/tests/printf7.sub +++ b/tests/printf7.sub @@ -85,7 +85,5 @@ unset -v VAR # can't test %s, too many varying implementations #printf "%.${TOOBIG}s\n" XY -printf -v VAR "%.${TOOBIG}s\n" XY -echo $VAR -unset -v VAR +printf_overflow $LINENO "%.${TOOBIG}b\n" XY printf_overflow $LINENO "%.${TOOBIG}Q\n" XY diff --git a/tests/run-execscript b/tests/run-execscript index c3ed53e6..4581a649 100644 --- a/tests/run-execscript +++ b/tests/run-execscript @@ -14,9 +14,6 @@ echo "warning: the text of a system error message may vary between systems and" >&2 echo "warning: produce diff output." >&2 -echo "warning: UNIX versions number signals differently." >&2 -echo "warning: If output differing only in line numbers is produced, please" >&2 -echo "warning: do not consider this a test failure." >&2 echo "warning: if the text of the error messages concerning \`notthere' or" >&2 echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory" >&2 echo "warning: produce diff output, please do not consider this a test failure" >&2