Accepting request 1126551 from Base:System
- Declare token YYEOF to be able to support older bison versions as well - Be sure to have a usable bison installed at build time - Add upstream patches * bash52-021 There is an off-by-one error that causes command substitutions to fail when they appear in a word expansion inside a here-document. * bash52-020 The parser did not allow `time' to appear as the first reserved word in a command substitution. * bash52-019 There are some cases where the shell reaped a background (asynchronous) job and would incorrectly try to set the terminal's process group back to the shell's. In these cases it never set the terminal process group to that jobs's process group initially, so resetting it is incorrect. * bash52-018 There are two problems with returning tokens to yyparse() when the shell encounters a syntax error or when it reads EOF. When reading a WORD token, the parser has to return the correct value to yyparse. Previous versions returned a value < 0, which the bash parser translated into YYERRCODE for bison, and in newer versions of bison, the appropriate reset actions didn't happen. We should return YYUNDEF, which bison uses for `invalid token'. Since we can return a token < 0 for both invalid tokens and EOF, the bash tokenizer needs to differentiate between those two cases. * bash52-017 In certain cases, using the `.' builtin in a subshell would optimize away the rest of the commands in the subshell. OBS-URL: https://build.opensuse.org/request/show/1126551 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=188
This commit is contained in:
commit
3dda9bc1a4
@ -13,7 +13,7 @@
|
||||
/* Let's see if we can keep SIGWINCH from interrupting interruptible system
|
||||
calls, like open(2)/read(2)/write(2) */
|
||||
#if defined (SIGWINCH)
|
||||
@@ -826,6 +826,10 @@ set_signal_handler (sig, handler)
|
||||
@@ -824,6 +826,10 @@ set_signal_handler (sig, handler)
|
||||
it to be as close to SIG_IGN as possible. */
|
||||
if (sig == SIGTERM && handler == sigterm_sighandler)
|
||||
act.sa_flags |= SA_RESTART; /* XXX */
|
||||
|
BIN
bash-5.2-patches.tar.bz2
(Stored with Git LFS)
BIN
bash-5.2-patches.tar.bz2
(Stored with Git LFS)
Binary file not shown.
17
bash-5.2.dif
17
bash-5.2.dif
@ -4,7 +4,7 @@
|
||||
doc/Makefile.in | 2 +-
|
||||
doc/bash.1 | 7 +++++--
|
||||
general.h | 3 +++
|
||||
parse.y | 2 +-
|
||||
parse.y | 6 +++++-
|
||||
shell.c | 6 +++++-
|
||||
support/man2html.c | 1 +
|
||||
support/rlvers.sh | 6 +++---
|
||||
@ -12,7 +12,7 @@
|
||||
tests/glob.tests | 4 ++--
|
||||
tests/run-intl | 2 +-
|
||||
tests/run-read | 2 +-
|
||||
13 files changed, 37 insertions(+), 21 deletions(-)
|
||||
13 files changed, 41 insertions(+), 21 deletions(-)
|
||||
|
||||
--- Makefile.in
|
||||
+++ Makefile.in 2022-06-22 06:38:20.511747259 +0000
|
||||
@ -129,7 +129,18 @@
|
||||
# if defined (HAVE_SYS_TIME_H)
|
||||
--- parse.y
|
||||
+++ parse.y 2022-04-28 11:53:04.334380153 +0000
|
||||
@@ -1498,7 +1498,7 @@ input_file_descriptor ()
|
||||
@@ -366,6 +366,10 @@ static FILE *yyerrstream;
|
||||
/* Special; never created by yylex; only set by parse_comsub and xparse_dolparen */
|
||||
%token DOLPAREN
|
||||
|
||||
+/* Declare token YYEOF as older bison version fails
|
||||
+ with not defined as a token and has no rules */
|
||||
+%token YYEOF
|
||||
+
|
||||
/* The types that the various syntactical units return. */
|
||||
|
||||
%type <command> inputunit command pipeline pipeline_command
|
||||
@@ -1513,7 +1513,7 @@ input_file_descriptor ()
|
||||
|
||||
#if defined (READLINE)
|
||||
char *current_readline_prompt = (char *)NULL;
|
||||
|
46
bash.changes
46
bash.changes
@ -1,3 +1,49 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 15 09:08:33 UTC 2023 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Declare token YYEOF to be able to support older bison versions
|
||||
as well
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 15 07:36:32 UTC 2023 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Be sure to have a usable bison installed at build time
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 14 16:40:23 UTC 2023 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add upstream patches
|
||||
* bash52-021
|
||||
There is an off-by-one error that causes command substitutions to fail when
|
||||
they appear in a word expansion inside a here-document.
|
||||
* bash52-020
|
||||
The parser did not allow `time' to appear as the first reserved word in a
|
||||
command substitution.
|
||||
* bash52-019
|
||||
There are some cases where the shell reaped a background (asynchronous) job
|
||||
and would incorrectly try to set the terminal's process group back to the
|
||||
shell's. In these cases it never set the terminal process group to that
|
||||
jobs's process group initially, so resetting it is incorrect.
|
||||
* bash52-018
|
||||
There are two problems with returning tokens to yyparse() when the shell
|
||||
encounters a syntax error or when it reads EOF.
|
||||
When reading a WORD token, the parser has to return the correct value to
|
||||
yyparse. Previous versions returned a value < 0, which the bash parser
|
||||
translated into YYERRCODE for bison, and in newer versions of bison, the
|
||||
appropriate reset actions didn't happen. We should return YYUNDEF, which
|
||||
bison uses for `invalid token'. Since we can return a token < 0 for both
|
||||
invalid tokens and EOF, the bash tokenizer needs to differentiate between
|
||||
those two cases.
|
||||
* bash52-017
|
||||
In certain cases, using the `.' builtin in a subshell would optimize away
|
||||
the rest of the commands in the subshell.
|
||||
* bash52-016
|
||||
If an expression in an arithmetic for loop expands to NULL, the shell
|
||||
would crash.
|
||||
- Correct offsets of patches
|
||||
* bash-4.3-sigrestart.patch
|
||||
* bash-5.2.dif
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 27 10:23:00 UTC 2022 - Ludwig Nussel <lnussel@suse.com>
|
||||
|
||||
|
46
bash.spec
46
bash.spec
@ -89,6 +89,7 @@ Patch49: bash-4.3-pathtemp.patch
|
||||
# PATCH-FIX-SUSE
|
||||
Patch50: quotes-man2html.patch
|
||||
BuildRequires: autoconf
|
||||
# latest bash uses with patch 18 the tag YYEOF
|
||||
BuildRequires: bison
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: glibc-locale
|
||||
@ -256,31 +257,31 @@ for patch in ../bash-%{bversion}-patches/*-*[0-9]; do
|
||||
patch -s -p$level < $patch
|
||||
done
|
||||
set -x
|
||||
%patch1 -b .manual
|
||||
%patch3 -b .2.4.4
|
||||
%patch4 -b .evalexp
|
||||
%patch5 -b .warnlc
|
||||
%patch7 -b .decl
|
||||
%patch9 -b .unistd
|
||||
%patch10 -b .printf
|
||||
%patch11 -b .plugins
|
||||
%patch12 -b .completion
|
||||
%patch13 -b .nscdunmap
|
||||
%patch14 -b .sigrestart
|
||||
%patch16 -b .setlocale
|
||||
#%patch18 -p0 -b .winch
|
||||
%patch40 -b .bashrc
|
||||
%patch -P1 -b .manual
|
||||
%patch -P3 -b .2.4.4
|
||||
%patch -P4 -b .evalexp
|
||||
%patch -P5 -b .warnlc
|
||||
%patch -P7 -b .decl
|
||||
%patch -P9 -b .unistd
|
||||
%patch -P10 -b .printf
|
||||
%patch -P11 -b .plugins
|
||||
%patch -P12 -b .completion
|
||||
%patch -P13 -b .nscdunmap
|
||||
%patch -P14 -b .sigrestart
|
||||
%patch -P16 -b .setlocale
|
||||
#%patch -P18 -p0 -b .winch
|
||||
%patch -P40 -b .bashrc
|
||||
%if %{with sjis}
|
||||
%patch42 -b .sjis
|
||||
%patch -P42 -b .sjis
|
||||
%endif
|
||||
%patch46 -b .notimestamp
|
||||
%patch47 -b .perl522
|
||||
%patch -P46 -b .notimestamp
|
||||
%patch -P47 -b .perl522
|
||||
%if %{with import_function}
|
||||
%patch48 -b .eif
|
||||
%patch -P48 -b .eif
|
||||
%endif
|
||||
%patch49 -b .pthtmp
|
||||
%patch50 -b .qd
|
||||
%patch0
|
||||
%patch -P49 -b .pthtmp
|
||||
%patch -P50 -b .qd
|
||||
%patch -P0 -b .p0
|
||||
|
||||
# This has to be always the same version as included in the bash its self
|
||||
rl1=($(sed -rn '/RL_READLINE_VERSION/p' lib/readline/readline.h))
|
||||
@ -482,6 +483,8 @@ echo exit 0 > tests/read7.sub
|
||||
%if 0%{?do_profiling}
|
||||
profilecflags=CFLAGS="$CFLAGS %{cflags_profile_generate}"
|
||||
%endif
|
||||
ulimit -Hv unlimited
|
||||
ulimit -v unlimited
|
||||
makeopts="Machine=${HOSTTYPE} OS=${OSTYPE} VENDOR=${VENDOR} MACHTYPE=${MACHTYPE}"
|
||||
%make_build $makeopts "$profilecflags" \
|
||||
all printenv recho zecho xcase
|
||||
@ -503,6 +506,7 @@ echo exit 0 > tests/read7.sub
|
||||
grep -F '$'\' doc/bash.html %{nil:test for boo#1203091}
|
||||
|
||||
%check
|
||||
rm -vf tests/*.p0
|
||||
%make_build -j1 check
|
||||
|
||||
%install
|
||||
|
Loading…
Reference in New Issue
Block a user