From b6fcb37fbd05cdfc86856170f9d4e94a2c3b5b99e197f7840f1c35a838550530 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 15 Nov 2023 09:09:46 +0000 Subject: [PATCH] support also older bison versions OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=376 --- bash-5.2.dif | 15 +++++++++++++-- bash.changes | 6 ++++++ bash.spec | 5 +++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/bash-5.2.dif b/bash-5.2.dif index d0454b9..bcab90f 100644 --- a/bash-5.2.dif +++ b/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,6 +129,17 @@ # if defined (HAVE_SYS_TIME_H) --- parse.y +++ parse.y 2022-04-28 11:53:04.334380153 +0000 +@@ -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 inputunit command pipeline pipeline_command @@ -1513,7 +1513,7 @@ input_file_descriptor () #if defined (READLINE) diff --git a/bash.changes b/bash.changes index 27732b6..9371631 100644 --- a/bash.changes +++ b/bash.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 15 09:08:33 UTC 2023 - Dr. Werner Fink + +- Declare token YYEOF to be able to support older bison versions + as well + ------------------------------------------------------------------- Wed Nov 15 07:36:32 UTC 2023 - Dr. Werner Fink diff --git a/bash.spec b/bash.spec index 0943421..80e08fc 100644 --- a/bash.spec +++ b/bash.spec @@ -90,7 +90,7 @@ Patch49: bash-4.3-pathtemp.patch Patch50: quotes-man2html.patch BuildRequires: autoconf # latest bash uses with patch 18 the tag YYEOF -BuildRequires: bison >= 3.8.1 +BuildRequires: bison BuildRequires: fdupes BuildRequires: glibc-locale BuildRequires: glibc-locale-base @@ -281,7 +281,7 @@ set -x %endif %patch -P49 -b .pthtmp %patch -P50 -b .qd -%patch -P0 +%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)) @@ -506,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