Sync from SUSE:SLFO:Main bash revision 35479b36f28c1204a92c1edb7f3be455
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
@@ -710,7 +711,12 @@ printf_builtin (list)
|
||||
|
||||
p = getfloatmax ();
|
||||
f = mklong (start, "L", 1);
|
||||
f = mklong (start, FLOATMAX_CONV, USE_LONG_DOUBLE);
|
||||
+
|
||||
+ if (lce && lcl) setlocale(LC_NUMERIC, lce);
|
||||
+
|
||||
|
@@ -4,15 +4,16 @@
|
||||
|
||||
--- shell.c
|
||||
+++ shell.c 2018-09-20 08:08:34.242204532 +0000
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -43,6 +43,8 @@
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
+# include <sys/mman.h>
|
||||
+# include <sys/types.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
@@ -1888,6 +1893,28 @@ init_interactive_script ()
|
||||
@@ -1888,6 +1894,28 @@ init_interactive_script ()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -1,15 +0,0 @@
|
||||
---
|
||||
config-top.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- config-top.h
|
||||
+++ config-top.h 2018-09-20 08:15:45.026318359 +0000
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
/* Define to 0 if you want the checkwinsize option off by default, 1 if you
|
||||
want it on. */
|
||||
-#define CHECKWINSIZE_DEFAULT 0
|
||||
+#define CHECKWINSIZE_DEFAULT 1
|
||||
|
||||
/* Define to 1 if you want to optimize for sequential array assignment when
|
||||
using indexed arrays, 0 if you want bash-4.2 behavior, which favors
|
16
bash-5.2-gcc14.patch
Normal file
16
bash-5.2-gcc14.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
aclocal.m4 | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- aclocal.m4
|
||||
+++ aclocal.m4 2024-02-28 13:50:24.552597535 +0000
|
||||
@@ -238,6 +238,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
+#ifdef HAVE_UNISTD_H
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
int
|
||||
main()
|
||||
{
|
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.
25
bash-5.2.dif
25
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;
|
||||
@@ -140,15 +151,15 @@
|
||||
static int
|
||||
--- shell.c
|
||||
+++ shell.c 2022-04-28 11:56:12.623015117 +0000
|
||||
@@ -45,6 +45,7 @@
|
||||
#if defined (HAVE_UNISTD_H)
|
||||
@@ -46,6 +46,7 @@
|
||||
# include <sys/mman.h>
|
||||
# include <sys/types.h>
|
||||
# include <unistd.h>
|
||||
+# include <grp.h>
|
||||
#endif
|
||||
|
||||
#include "bashintl.h"
|
||||
@@ -511,7 +512,7 @@ main (argc, argv, env)
|
||||
@@ -512,7 +513,7 @@ main (argc, argv, env)
|
||||
read_but_dont_execute = 1;
|
||||
#endif
|
||||
|
||||
@@ -157,7 +168,7 @@
|
||||
disable_priv_mode ();
|
||||
|
||||
/* Need to get the argument to a -c option processed in the
|
||||
@@ -1341,6 +1342,9 @@ disable_priv_mode ()
|
||||
@@ -1342,6 +1343,9 @@ disable_priv_mode ()
|
||||
{
|
||||
int e;
|
||||
|
||||
|
139
bash.changes
139
bash.changes
@@ -1,3 +1,142 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 24 12:09:40 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- As in bash-sh there is only a symbolic link avoid to require a version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 28 20:38:43 UTC 2024 - Heitor Moreira da Silva <heitor@opensuse.org>
|
||||
|
||||
- Move (/etc/skel/.bashrc) and (/etc/skel/.profile) to (/usr/etc/skel/).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 16 12:47:07 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Remove bash-4.3-winch.dif as this is the (current) default
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 25 06:33:29 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add upstream patches
|
||||
* bash52-037
|
||||
Fix the case where text to be completed from the line buffer (quoted) is
|
||||
compared to the common prefix of the possible matches (unquoted) and the
|
||||
quoting makes the former appear to be longer than the latter. Readline
|
||||
assumes the match doesn't add any characters to the word and doesn't display
|
||||
multiple matches.
|
||||
* bash52-036
|
||||
When readline is accumulating bytes until it reads a complete multibyte
|
||||
character, reading a byte that makes the multibyte character invalid can
|
||||
result in discarding the bytes in the partial character.
|
||||
* bash52-035
|
||||
There are systems that supply one of select or pselect, but not both.
|
||||
* bash52-034
|
||||
If we parse a compound assignment during an alias expansion, it's possible
|
||||
to have the current input string popped out from underneath the parse. In
|
||||
this case, we should not restore the input we were using when we began to
|
||||
parse the compound assignment.
|
||||
* bash52-033
|
||||
A typo in the autoconf test for strtold causes false negatives for strtold
|
||||
being available and working when compiled with gcc-14.
|
||||
- Port patch bash-3.2-printf.patch to fit change in bash52-033
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 19 08:57:30 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add upstream patches
|
||||
* bash52-027
|
||||
The configure test for the presence of strtoimax(3) is inverted.
|
||||
* bash52-028
|
||||
A DEBUG trap in an asynchronous process can steal the controlling terminal
|
||||
away from the calling shell, causing it to exit.
|
||||
* bash52-030
|
||||
`wait -n' can fail to return some jobs if they exit due to signals the shell
|
||||
does not report to the user.
|
||||
* bash52-031
|
||||
There is a memory leak in the code that implements the optimized $(<file)
|
||||
expansion for some code paths.
|
||||
* bash52-032
|
||||
When printing functions containing coprocesses, the displayed coproc command
|
||||
has the word COPROC inserted unconditionally, resulting in function bodies
|
||||
that cannot be re-read as input.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 25 14:20:17 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Help dependcy resolver to identify package split done with bash-sh
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 28 13:52:24 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Harden bash to be compiled with gcc 14 (boo#1220564)
|
||||
* Modify patch bash-4.2-nscdunmap.dif to include <sys/mman.h>
|
||||
* Port bash-5.2.dif to the former change
|
||||
* Add patch bash-5.2-gcc14.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 16 08:49:57 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add upstream patches
|
||||
* bash52-022
|
||||
It's possible for readline to try to zero out a line that's not
|
||||
null-terminated, leading to a memory fault.
|
||||
* bash52-023
|
||||
Running `local -' multiple times in a shell function would
|
||||
overwrite the original saved set of options.
|
||||
* bash52-024
|
||||
Fix bug where associative array compound assignment would not
|
||||
expand tildes in values.
|
||||
* bash52-025
|
||||
Make sure a subshell checks for and handles any terminating
|
||||
signals before exiting (which might have arrived after the
|
||||
command completed) so the parent and any EXIT trap will see
|
||||
the correct value for $?.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
83
bash.spec
83
bash.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package bash
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -75,8 +75,6 @@ Patch13: bash-4.2-nscdunmap.dif
|
||||
Patch14: bash-4.3-sigrestart.patch
|
||||
# PATCH-FIX-UPSTREAM bnc#382214 -- disabled due bnc#806628 by -DBNC382214=0
|
||||
Patch16: bash-4.0-setlocale.dif
|
||||
# PATCH-EXTEND-SUSE bnc#828877 -- xterm resizing does not pass to all sub clients
|
||||
Patch18: bash-4.3-winch.dif
|
||||
Patch40: bash-4.1-bash.bashrc.dif
|
||||
# PATCH-FIX-SUSE For bsc#1065158 add support for broken Japanese locale Shift JIS
|
||||
Patch42: bash-4.3-SJIS.patch
|
||||
@@ -88,7 +86,10 @@ Patch48: bash-4.3-extra-import-func.patch
|
||||
Patch49: bash-4.3-pathtemp.patch
|
||||
# PATCH-FIX-SUSE
|
||||
Patch50: quotes-man2html.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch51: bash-5.2-gcc14.patch
|
||||
BuildRequires: autoconf
|
||||
# latest bash uses with patch 18 the tag YYEOF
|
||||
BuildRequires: bison
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: glibc-locale
|
||||
@@ -104,13 +105,13 @@ BuildRequires: update-alternatives
|
||||
BuildRequires: pkgconfig(audit)
|
||||
BuildRequires: pkgconfig(ncurses)
|
||||
# This has to be always the same version as included in the bash its self
|
||||
BuildRequires: pkgconfig(readline) = 8.2
|
||||
BuildRequires: pkgconfig(readline) >= %{rl_version}
|
||||
%if %{with alternatives}
|
||||
Requires(post): update-alternatives
|
||||
Requires(post): libreadline%{rl_major} = %{rl_version}
|
||||
Requires(preun):update-alternatives
|
||||
Requires(post): libreadline%{rl_major} >= %{rl_version}
|
||||
Requires(preun): update-alternatives
|
||||
%endif
|
||||
Requires: libreadline%{rl_major} = %{rl_version}
|
||||
Requires: libreadline%{rl_major} >= %{rl_version}
|
||||
Suggests: bash-doc = %{version}
|
||||
Suggests: command-not-found
|
||||
Provides: /bin/bash
|
||||
@@ -146,7 +147,8 @@ Summary: Handle behaviour of /bin/sh
|
||||
Group: System/Shells
|
||||
Provides: alternative(sh)
|
||||
Conflicts: alternative(sh)
|
||||
PreReq: bash = %{version}
|
||||
Provides: bash:%{_bindir}/sh
|
||||
PreReq: bash
|
||||
BuildArch: noarch
|
||||
|
||||
%description sh
|
||||
@@ -236,7 +238,12 @@ Legacy usrmove helper files for the build system. Do not install.
|
||||
%if %{with sjis}
|
||||
%{warn:Shift JIS support is enabled}
|
||||
%else
|
||||
%{echo:Shift JIS support disabled}
|
||||
%{echo:Shift JIS support is DISABLED}
|
||||
%endif
|
||||
%if %{with alternatives}
|
||||
%{echo:alternatives is enabled}
|
||||
%else
|
||||
%{echo:alternatives is DISABLED}
|
||||
%endif
|
||||
%setup -q -n bash-%{bversion}%{bextend} -b1
|
||||
typeset -i level
|
||||
@@ -256,31 +263,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 -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 -P51 -b .gcc14
|
||||
%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 +489,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 +512,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
|
||||
@@ -557,11 +567,9 @@ set in %{_sysconfdir}/inputrc or $HOME/.inputrc avoids this
|
||||
but disables multi byte handling.
|
||||
EOF
|
||||
# remove unpackaged files
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/skel
|
||||
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.bashrc
|
||||
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/skel/.profile
|
||||
touch -t 199605181720.50 %{buildroot}%{_sysconfdir}/skel/.bash_history
|
||||
chmod 600 %{buildroot}%{_sysconfdir}/skel/.bash_history
|
||||
mkdir -p %{buildroot}%{_prefix}%{_sysconfdir}/skel
|
||||
install -m 640 %{SOURCE5} %{buildroot}%{_prefix}%{_sysconfdir}/skel/.bashrc
|
||||
install -m 640 %{SOURCE6} %{buildroot}%{_prefix}%{_sysconfdir}/skel/.profile
|
||||
%find_lang bash
|
||||
%fdupes -s %{buildroot}%{_datadir}/bash/helpfiles
|
||||
sed -ri '1{ s@/bin/sh@/bin/bash@ }' %{buildroot}%{_bindir}/bashbug
|
||||
@@ -579,9 +587,8 @@ fi
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%config %attr(600,root,root) %{_sysconfdir}/skel/.bash_history
|
||||
%config %attr(644,root,root) %{_sysconfdir}/skel/.bashrc
|
||||
%config %attr(644,root,root) %{_sysconfdir}/skel/.profile
|
||||
%{_prefix}%{_sysconfdir}/skel/.bashrc
|
||||
%{_prefix}%{_sysconfdir}/skel/.profile
|
||||
%if %{with alternatives}
|
||||
%ghost %config %{_sysconfdir}/alternatives/sh
|
||||
%endif
|
||||
|
@@ -13,4 +13,5 @@ OFS="$IFS"
|
||||
IFS=-
|
||||
last=($(tar --wildcards -tf ${sourcedir}/bash-${version}-patches.tar.bz2 '*/bash[0-9][0-9]-*[0-9]' | sed -r 's@\.patch$@@'| sort -t '-' -k 3,3 -n | tail -n 1))
|
||||
IFS="$OFS"
|
||||
echo ${last[3]/*0/}
|
||||
shopt -s extglob
|
||||
echo ${last[3]##+(0)}
|
||||
|
Reference in New Issue
Block a user