1 Commits

Author SHA256 Message Date
Adam Majer
c99b706fb6 adjusting testing 2025-06-24 00:10:27 +02:00
29 changed files with 275 additions and 403 deletions

View File

@@ -4,5 +4,3 @@ targettype x86 package bash
+^/bin/bash$ +^/bin/bash$
+^/bin/sh$ +^/bin/sh$
prereq -glibc-x86 prereq -glibc-x86
bash
prereq readline-devel = 8.3

View File

@@ -5,8 +5,8 @@
3 files changed, 18 insertions(+), 2 deletions(-) 3 files changed, 18 insertions(+), 2 deletions(-)
--- doc/bash.1 --- doc/bash.1
+++ doc/bash.1 2025-02-03 10:57:09.568975363 +0000 +++ doc/bash.1 2018-11-29 08:09:41.735675837 +0000
@@ -159,6 +159,12 @@ This option allows the positional parame @@ -122,6 +122,12 @@ This option allows the positional parame
when invoking an interactive shell or when reading input when invoking an interactive shell or when reading input
through a pipe. through a pipe.
.TP .TP
@@ -17,9 +17,9 @@
+Print commands and their arguments as they are executed. +Print commands and their arguments as they are executed.
+.TP +.TP
.B \-D .B \-D
Print a list of all double-quoted strings preceded by \fB$\fP A list of all double-quoted strings preceded by \fB$\fP
on the standard output. is printed on the standard output.
@@ -8948,6 +8954,11 @@ modifier once to each word in the event @@ -7667,6 +7673,11 @@ Apply the following `\fBs\fP' modifier o
.SH "SHELL BUILTIN COMMANDS" .SH "SHELL BUILTIN COMMANDS"
.\" start of bash_builtins .\" start of bash_builtins
.zZ .zZ
@@ -31,7 +31,7 @@
.PP .PP
Unless otherwise noted, each builtin command documented in this Unless otherwise noted, each builtin command documented in this
section as accepting options preceded by section as accepting options preceded by
@@ -13266,6 +13277,11 @@ the arguments as key sequences to bind. @@ -11543,6 +11554,11 @@ process or job waited for.
.SH "RESTRICTED SHELL" .SH "RESTRICTED SHELL"
.\" rbash.1 .\" rbash.1
.zY .zY
@@ -44,7 +44,7 @@
If If
.B bash .B bash
--- doc/builtins.1 --- doc/builtins.1
+++ doc/builtins.1 2025-02-03 10:56:04.910169130 +0000 +++ doc/builtins.1 2018-11-29 08:09:41.735675837 +0000
@@ -19,6 +19,6 @@ shift, shopt, source, suspend, test, tim @@ -19,6 +19,6 @@ shift, shopt, source, suspend, test, tim
ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1) ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1)
.SH BASH BUILTIN COMMANDS .SH BASH BUILTIN COMMANDS
@@ -54,7 +54,7 @@
.SH SEE ALSO .SH SEE ALSO
bash(1), sh(1) bash(1), sh(1)
--- doc/rbash.1 --- doc/rbash.1
+++ doc/rbash.1 2025-02-03 10:56:04.910169130 +0000 +++ doc/rbash.1 2018-11-29 08:09:41.735675837 +0000
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
rbash \- restricted bash, see \fBbash\fR(1) rbash \- restricted bash, see \fBbash\fR(1)
.SH RESTRICTED SHELL .SH RESTRICTED SHELL

View File

@@ -4,7 +4,7 @@
--- expr.c --- expr.c
+++ expr.c 2018-11-29 08:10:59.542212175 +0000 +++ expr.c 2018-11-29 08:10:59.542212175 +0000
@@ -520,8 +520,8 @@ expassign () @@ -514,8 +514,8 @@ expassign ()
value = expcond (); value = expcond ();
if (curtok == EQ || curtok == OP_ASSIGN) if (curtok == EQ || curtok == OP_ASSIGN)
{ {

View File

@@ -3,7 +3,7 @@
1 file changed, 13 insertions(+) 1 file changed, 13 insertions(+)
--- locale.c --- locale.c
+++ locale.c 2025-01-31 13:23:16.647340079 +0000 +++ locale.c 2018-09-20 08:06:23.732593807 +0000
@@ -33,6 +33,10 @@ @@ -33,6 +33,10 @@
#include "bashintl.h" #include "bashintl.h"
#include "bashansi.h" #include "bashansi.h"
@@ -15,13 +15,13 @@
#include "chartypes.h" #include "chartypes.h"
#include <errno.h> #include <errno.h>
@@ -85,6 +89,15 @@ void @@ -79,6 +83,15 @@ void
set_default_locale (void) set_default_locale ()
{ {
#if defined (HAVE_SETLOCALE) #if defined (HAVE_SETLOCALE)
+ struct stat st; + struct stat st;
+ if (stat("/usr/lib/locale/locale-archive", &st) == 0 && st.st_size == 0) +
+ { + if (stat("/usr/lib/locale/locale-archive", &st) == 0 && st.st_size == 0) {
+ errno = EINVAL; + errno = EINVAL;
+ sys_error("set_default_locale: broken locale"); + sys_error("set_default_locale: broken locale");
+ fprintf (stderr, "%s: Please remove /usr/lib/locale/locale-archive\n", + fprintf (stderr, "%s: Please remove /usr/lib/locale/locale-archive\n",

View File

@@ -3,7 +3,7 @@
1 file changed, 12 insertions(+), 1 deletion(-) 1 file changed, 12 insertions(+), 1 deletion(-)
--- builtins/printf.def --- builtins/printf.def
+++ builtins/printf.def 2025-01-31 13:35:58.961286087 +0000 +++ builtins/printf.def 2022-06-22 06:26:14.069158235 +0000
@@ -56,6 +56,7 @@ error occurs. @@ -56,6 +56,7 @@ error occurs.
$END $END
@@ -12,7 +12,7 @@
#include "../bashtypes.h" #include "../bashtypes.h"
@@ -783,7 +784,7 @@ printf_builtin (WORD_LIST *list) @@ -702,7 +703,7 @@ printf_builtin (list)
case 'A': case 'A':
#endif #endif
{ {
@@ -21,10 +21,10 @@
if (use_Lmod || posixly_correct == 0) if (use_Lmod || posixly_correct == 0)
{ {
@@ -791,7 +792,12 @@ printf_builtin (WORD_LIST *list) @@ -710,7 +711,12 @@ printf_builtin (list)
p = getfloatmax (); p = getfloatmax ();
f = mklong (start, FLOATMAX_CONV, FLOATMAX_CONVLEN); f = mklong (start, FLOATMAX_CONV, USE_LONG_DOUBLE);
+ +
+ if (lce && lcl) setlocale(LC_NUMERIC, lce); + if (lce && lcl) setlocale(LC_NUMERIC, lce);
+ +
@@ -34,7 +34,7 @@
} }
else /* posixly_correct */ else /* posixly_correct */
{ {
@@ -799,7 +805,12 @@ printf_builtin (WORD_LIST *list) @@ -718,7 +724,12 @@ printf_builtin (list)
p = getdouble (); p = getdouble ();
f = mklong (start, "", 0); f = mklong (start, "", 0);

View File

@@ -4,7 +4,7 @@
--- locale.c --- locale.c
+++ locale.c 2018-09-20 08:14:41.307485537 +0000 +++ locale.c 2018-09-20 08:14:41.307485537 +0000
@@ -63,6 +63,7 @@ extern int dump_translatable_strings, du @@ -57,6 +57,7 @@ extern int dump_translatable_strings, du
/* The current locale when the program begins */ /* The current locale when the program begins */
static char *default_locale; static char *default_locale;
@@ -12,7 +12,7 @@
/* The current domain for textdomain(3). */ /* The current domain for textdomain(3). */
static char *default_domain; static char *default_domain;
@@ -366,11 +367,21 @@ get_locale_var (var) @@ -361,11 +362,21 @@ get_locale_var (var)
if (locale == 0 || *locale == 0) if (locale == 0 || *locale == 0)
locale = lang; locale = lang;
if (locale == 0 || *locale == 0) if (locale == 0 || *locale == 0)

View File

@@ -16,12 +16,12 @@
|other files as well even if the bash does not. |other files as well even if the bash does not.
| |
--- ---
doc/bash.1 | 22 +++++++++++++++++++--- doc/bash.1 | 16 ++++++++++++----
1 file changed, 19 insertions(+), 3 deletions(-) 1 file changed, 12 insertions(+), 4 deletions(-)
--- doc/bash.1 --- doc/bash.1
+++ doc/bash.1 2025-01-31 14:07:19.026636616 +0000 +++ doc/bash.1 2022-06-22 06:31:11.283670836 +0000
@@ -372,6 +372,8 @@ and executes commands from the first one @@ -330,6 +330,8 @@ and executes commands from the first one
The The
.B \-\-noprofile .B \-\-noprofile
option may be used when the shell is started to inhibit this behavior. option may be used when the shell is started to inhibit this behavior.
@@ -30,45 +30,36 @@
.PP .PP
When an interactive login shell exits, When an interactive login shell exits,
or a non-interactive login shell executes the \fBexit\fP builtin command, or a non-interactive login shell executes the \fBexit\fP builtin command,
@@ -383,8 +385,10 @@ if it exists. @@ -339,13 +341,19 @@ exists.
.PP
When an interactive shell that is not a login shell is started, When an interactive shell that is not a login shell is started,
.B bash .B bash
reads and executes commands from -reads and executes commands from \fI~/.bashrc\fP, if that file exists.
-.FN \*~/.bashrc , -This may be inhibited by using the
-if that file exists. +reads and executes commands from \fI/etc/bash.bashrc\fP then \fI~/.bashrc\fP
+.FN /etc/bash.bashrc +when those files exist and are readable. This may be inhibited by using the
+then
+.FN \*~/.bashrc
+when those files exist and are readable.
The
.B \-\-norc .B \-\-norc
option inhibits this behavior. option.
@@ -392,6 +396,16 @@ The \fB\-\-rcfile\fP \fIfile\fP option c The \fB\-\-rcfile\fP \fIfile\fP option will force
.B bash .B bash
to use \fIfile\fP instead of to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP.
.FN \*~/.bashrc . +Please note that the file \fI/etc/bash.bashrc\fP includes an autodetection shell
+Please note that the file
+.FN /etc/bash.bashrc
+includes an autodetection shell
+code wether it is used for by a remote OpenSSH SSH client like +code wether it is used for by a remote OpenSSH SSH client like
+.BR ssh (1) +.BR ssh (1)
+or +or
+.BR slogin (1) +.BR slogin (1)
+to source the local +to source the local \fI/etc/profile\fP if not already done.
+.FN /etc/profile
+if not already done.
.PP .PP
When When
.B bash .B bash
@@ -481,8 +495,10 @@ If @@ -432,8 +440,8 @@ or the secure shell daemon \fIsshd\fP.
If
.B bash .B bash
determines it is being run non-interactively in this fashion, determines it is being run non-interactively in this fashion,
it reads and executes commands from -it reads and executes commands from \fI~/.bashrc\fP,
+.FN /etc/bash.bashrc
+then
.FN \*~/.bashrc ,
-if that file exists and is readable. -if that file exists and is readable.
+when those file exists and is readable. +it reads and executes commands from \fI/etc/bash.bashrc\fP then
.B Bash +\fI~/.bashrc\fP, when those files exists and are readable.
does not read this file if invoked as \fBsh\fP. It will not do this if invoked as \fBsh\fP.
The The
.B \-\-norc

View File

@@ -1,11 +1,11 @@
--- ---
bashline.c | 6 ++++++ bashline.c | 7 +++++++
1 file changed, 6 insertions(+) 1 file changed, 7 insertions(+)
--- bashline.c --- bashline.c
+++ bashline.c 2025-01-31 13:50:00.705768344 +0000 +++ bashline.c 2018-11-29 08:12:25.876588305 +0000
@@ -2259,6 +2259,13 @@ globword: @@ -2206,6 +2206,13 @@ globword:
} return ((char *)NULL);
} }
+ if (GLOB_FAILED (glob_matches) || glob_matches == 0) + if (GLOB_FAILED (glob_matches) || glob_matches == 0)

View File

@@ -1,9 +1,9 @@
--- ---
shell.c | 25 +++++++++++++++++++++++++ shell.c | 24 ++++++++++++++++++++++++
1 file changed, 25 insertions(+) 1 file changed, 24 insertions(+)
--- shell.c --- shell.c
+++ shell.c 2025-01-31 13:53:05.110369836 +0000 +++ shell.c 2018-09-20 08:08:34.242204532 +0000
@@ -43,6 +43,8 @@ @@ -43,6 +43,8 @@
#endif #endif
@@ -13,7 +13,7 @@
# include <unistd.h> # include <unistd.h>
#endif #endif
@@ -1873,6 +1875,28 @@ init_interactive_script (void) @@ -1888,6 +1894,28 @@ init_interactive_script ()
#endif #endif
} }
@@ -40,9 +40,9 @@
+} +}
+ +
void void
get_current_user_info (void) get_current_user_info ()
{ {
@@ -1904,6 +1928,7 @@ get_current_user_info (void) @@ -1919,6 +1946,7 @@ get_current_user_info ()
#if defined (HAVE_GETPWENT) #if defined (HAVE_GETPWENT)
endpwent (); endpwent ();
#endif #endif

View File

@@ -2,16 +2,16 @@
array.c | 2 +- array.c | 2 +-
examples/loadables/tee.c | 3 ++- examples/loadables/tee.c | 3 ++-
hashlib.c | 4 ++-- hashlib.c | 4 ++--
jobs.c | 8 ++++++++ jobs.c | 9 +++++++++
sig.c | 4 ++-- sig.c | 4 ++--
sig.h | 4 ++-- sig.h | 4 ++--
trap.c | 2 +- trap.c | 2 +-
trap.h | 2 +- trap.h | 2 +-
8 files changed, 19 insertions(+), 10 deletions(-) 8 files changed, 20 insertions(+), 10 deletions(-)
--- array.c --- array.c
+++ array.c 2025-01-31 13:09:34.626496209 +0000 +++ array.c 2020-10-12 16:00:37.207185803 +0000
@@ -1031,7 +1031,7 @@ array_from_string(char *s, char *sep) @@ -1095,7 +1095,7 @@ char *s, *sep;
* To make a running version, compile -DTEST_ARRAY and link with: * To make a running version, compile -DTEST_ARRAY and link with:
* xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a * xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a
*/ */
@@ -19,9 +19,9 @@
+volatile sig_atomic_t interrupt_immediately = 0; +volatile sig_atomic_t interrupt_immediately = 0;
int int
signal_is_trapped(int s) signal_is_trapped(s)
--- examples/loadables/tee.c --- examples/loadables/tee.c
+++ examples/loadables/tee.c 2025-01-31 13:10:07.849883770 +0000 +++ examples/loadables/tee.c 2020-10-12 16:00:37.267184666 +0000
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
#include "bashansi.h" #include "bashansi.h"
@@ -37,11 +37,11 @@
-extern int interrupt_immediately; -extern int interrupt_immediately;
+extern volatile sig_atomic_t interrupt_immediately; +extern volatile sig_atomic_t interrupt_immediately;
extern char *strerror (int); extern char *strerror ();
--- hashlib.c --- hashlib.c
+++ hashlib.c 2025-01-31 13:10:56.584985412 +0000 +++ hashlib.c 2020-10-12 16:02:31.677016331 +0000
@@ -449,8 +449,8 @@ hash_pstats (HASH_TABLE *table, char *na @@ -473,8 +473,8 @@ hash_pstats (table, name)
HASH_TABLE *table, *ntable; HASH_TABLE *table, *ntable;
@@ -51,13 +51,14 @@
+volatile sig_atomic_t running_trap = 0; +volatile sig_atomic_t running_trap = 0;
int int
signal_is_trapped (int s) signal_is_trapped (s)
--- jobs.c --- jobs.c
+++ jobs.c 2025-01-31 13:12:14.623546948 +0000 +++ jobs.c 2020-10-12 16:00:37.267184666 +0000
@@ -2354,6 +2354,14 @@ make_child (char *command, int flags) @@ -2212,6 +2212,15 @@ make_child (command, flags)
child process, go back and change callers who free `command' in
the child process when this returns. */ the child process when this returns. */
mypid = getpid (); mypid = getpid ();
+
+ if (interrupt_state) + if (interrupt_state)
+ { + {
+ struct timeval tv; + struct timeval tv;
@@ -66,12 +67,12 @@
+ (void) getrusage(RUSAGE_SELF, &rx); + (void) getrusage(RUSAGE_SELF, &rx);
+ } + }
+ +
#if defined (BUFFERED_INPUT)
/* Close default_buffered_input if it's > 0. We don't close it if it's /* Close default_buffered_input if it's > 0. We don't close it if it's
0 because that's the file descriptor used when redirecting input, 0 because that's the file descriptor used when redirecting input,
and it's wrong to close the file in that case. */
--- sig.c --- sig.c
+++ sig.c 2025-01-31 12:58:40.154563470 +0000 +++ sig.c 2020-10-12 16:00:37.267184666 +0000
@@ -86,10 +86,10 @@ sigset_t top_level_mask; @@ -84,10 +84,10 @@ sigset_t top_level_mask;
#endif /* JOB_CONTROL */ #endif /* JOB_CONTROL */
/* When non-zero, we throw_to_top_level (). */ /* When non-zero, we throw_to_top_level (). */
@@ -85,7 +86,7 @@
#if defined (SIGWINCH) #if defined (SIGWINCH)
static SigHandler *old_winch = (SigHandler *)SIG_DFL; static SigHandler *old_winch = (SigHandler *)SIG_DFL;
--- sig.h --- sig.h
+++ sig.h 2025-01-31 13:12:50.922877875 +0000 +++ sig.h 2020-10-12 16:03:44.403637781 +0000
@@ -105,8 +105,8 @@ do { \ @@ -105,8 +105,8 @@ do { \
extern volatile sig_atomic_t sigwinch_received; extern volatile sig_atomic_t sigwinch_received;
extern volatile sig_atomic_t sigterm_received; extern volatile sig_atomic_t sigterm_received;
@@ -95,27 +96,27 @@
+extern volatile sig_atomic_t interrupt_immediately; /* no longer used */ +extern volatile sig_atomic_t interrupt_immediately; /* no longer used */
+extern volatile sig_atomic_t terminate_immediately; +extern volatile sig_atomic_t terminate_immediately;
extern volatile int builtin_catch_sigpipe; /* not used yet */ /* Functions from sig.c. */
extern sighandler termsig_sighandler PARAMS((int));
--- trap.c --- trap.c
+++ trap.c 2025-01-31 13:13:24.578257547 +0000 +++ trap.c 2020-10-12 16:08:10.102600477 +0000
@@ -112,7 +112,7 @@ int pending_traps[NSIG]; @@ -111,7 +111,7 @@ int pending_traps[NSIG];
Used in execute_cmd.c and builtins/common.c to clean up when Used in execute_cmd.c and builtins/common.c to clean up when
parse_and_execute does not return normally after executing the parse_and_execute does not return normally after executing the
trap command (e.g., when `return' is executed in the trap command). */ trap command (e.g., when `return' is executed in the trap command). */
-int running_trap; -int running_trap;
+volatile sig_atomic_t running_trap; +volatile sig_atomic_t running_trap;
/* The execution context (function/source execution level) when we began /* Set to last_command_exit_value before running a trap. */
running this trap command. This is used to determine whether we have int trap_saved_exit_value;
--- trap.h --- trap.h
+++ trap.h 2025-01-31 13:13:58.405634062 +0000 +++ trap.h 2020-10-12 16:05:57.105122164 +0000
@@ -62,7 +62,7 @@ extern char *trap_list[]; @@ -62,7 +62,7 @@ extern char *trap_list[];
extern int trapped_signal_received; extern int trapped_signal_received;
extern int wait_signal_received; extern int wait_signal_received;
-extern int running_trap; -extern int running_trap;
+extern volatile sig_atomic_t running_trap; +extern volatile sig_atomic_t running_trap;
extern int trap_return_context;
extern int trap_saved_exit_value; extern int trap_saved_exit_value;
extern int suppress_debug_trap_verbose; extern int suppress_debug_trap_verbose;

14
bash-4.3-decl.patch Normal file
View File

@@ -0,0 +1,14 @@
---
support/printenv.c | 1 +
1 file changed, 1 insertion(+)
--- support/printenv.c
+++ support/printenv.c 2014-04-17 09:46:25.874236036 +0000
@@ -31,6 +31,7 @@
#include "bashansi.h"
#include <stdio.h> /* puts */
+#include <string.h>
extern char **environ;
int

View File

@@ -2,15 +2,16 @@
examples/loadables/finfo.c | 3 +-- examples/loadables/finfo.c | 3 +--
examples/loadables/head.c | 2 -- examples/loadables/head.c | 2 --
examples/loadables/id.c | 2 -- examples/loadables/id.c | 2 --
examples/loadables/mkdir.c | 2 +-
examples/loadables/pathchk.c | 2 -- examples/loadables/pathchk.c | 2 --
examples/loadables/print.c | 2 +- examples/loadables/print.c | 2 +-
examples/loadables/tee.c | 2 -- examples/loadables/tee.c | 2 --
6 files changed, 2 insertions(+), 11 deletions(-) 7 files changed, 3 insertions(+), 12 deletions(-)
--- examples/loadables/finfo.c --- examples/loadables/finfo.c
+++ examples/loadables/finfo.c 2025-01-31 13:39:12.821711490 +0000 +++ examples/loadables/finfo.c 2018-09-20 08:07:43.739129083 +0000
@@ -98,7 +98,7 @@ static int @@ -108,7 +108,7 @@ int argc;
finfo_main(int argc, char **argv) char **argv;
{ {
register int i; register int i;
- int mode, flags, opt; - int mode, flags, opt;
@@ -18,7 +19,7 @@
sh_optind = 0; /* XXX */ sh_optind = 0; /* XXX */
prog = base_pathname(argv[0]); prog = base_pathname(argv[0]);
@@ -388,7 +388,6 @@ finfo_builtin(WORD_LIST *list) @@ -396,7 +396,6 @@ finfo_builtin(list)
{ {
int c, r; int c, r;
char **v; char **v;
@@ -27,8 +28,8 @@
v = make_builtin_argv (list, &c); v = make_builtin_argv (list, &c);
r = finfo_main (c, v); r = finfo_main (c, v);
--- examples/loadables/head.c --- examples/loadables/head.c
+++ examples/loadables/head.c 2025-01-31 13:37:22.031754291 +0000 +++ examples/loadables/head.c 2018-09-20 08:07:43.739129083 +0000
@@ -97,8 +97,6 @@ head_builtin (WORD_LIST *list) @@ -101,8 +101,6 @@ head_builtin (list)
WORD_LIST *l; WORD_LIST *l;
FILE *fp; FILE *fp;
@@ -38,19 +39,30 @@
reset_internal_getopt (); reset_internal_getopt ();
--- examples/loadables/id.c --- examples/loadables/id.c
+++ examples/loadables/id.c 2025-01-31 13:39:49.329038382 +0000 +++ examples/loadables/id.c 2018-09-20 08:07:43.739129083 +0000
@@ -64,8 +64,6 @@ static int id_flags; @@ -64,8 +64,6 @@ static int id_flags;
static uid_t ruid, euid; static uid_t ruid, euid;
static gid_t rgid, egid; static gid_t rgid, egid;
-static char *id_user; -static char *id_user;
- -
static int inituser (char *); static int inituser ();
static int id_pruser (int); static int id_pruser ();
--- examples/loadables/mkdir.c
+++ examples/loadables/mkdir.c 2018-09-20 08:07:43.739129083 +0000
@@ -170,7 +170,7 @@ make_path (path, nmode, parent_mode)
while (*p == '/')
p++;
- while (p = strchr (p, '/'))
+ while ((p = strchr (p, '/')))
{
*p = '\0';
if (stat (npath, &sb) != 0)
--- examples/loadables/pathchk.c --- examples/loadables/pathchk.c
+++ examples/loadables/pathchk.c 2025-01-31 13:37:22.031754291 +0000 +++ examples/loadables/pathchk.c 2018-09-20 08:07:43.739129083 +0000
@@ -284,10 +284,8 @@ validate_path (char *path, int portabili @@ -292,10 +292,8 @@ validate_path (path, portability)
if (*path == '\0') if (*path == '\0')
return 0; return 0;
@@ -62,8 +74,8 @@
/* Figure out the parent of the first element in PATH. */ /* Figure out the parent of the first element in PATH. */
parent = xstrdup (*path == '/' ? "/" : "."); parent = xstrdup (*path == '/' ? "/" : ".");
--- examples/loadables/print.c --- examples/loadables/print.c
+++ examples/loadables/print.c 2025-01-31 13:37:22.031754291 +0000 +++ examples/loadables/print.c 2018-09-20 08:07:43.739129083 +0000
@@ -76,7 +76,7 @@ print_builtin (WORD_LIST *list) @@ -77,7 +77,7 @@ print_builtin (list)
{ {
int c, r, nflag, raw, ofd, sflag; int c, r, nflag, raw, ofd, sflag;
intmax_t lfd; intmax_t lfd;
@@ -73,8 +85,8 @@
nflag = raw = sflag = 0; nflag = raw = sflag = 0;
--- examples/loadables/tee.c --- examples/loadables/tee.c
+++ examples/loadables/tee.c 2025-01-31 13:37:22.031754291 +0000 +++ examples/loadables/tee.c 2018-09-20 08:07:43.739129083 +0000
@@ -69,8 +69,6 @@ tee_builtin (WORD_LIST *list) @@ -70,8 +70,6 @@ tee_builtin (list)
FLIST *fl; FLIST *fl;
char *buf, *bp; char *buf, *bp;

View File

@@ -1,9 +1,9 @@
--- ---
lib/sh/tmpfile.c | 42 ++++++++++++++++++++++++++++++++++++++++++ lib/sh/tmpfile.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+) 1 file changed, 48 insertions(+), 1 deletion(-)
--- lib/sh/tmpfile.c --- lib/sh/tmpfile.c
+++ lib/sh/tmpfile.c 2025-01-31 14:26:40.473201839 +0000 +++ lib/sh/tmpfile.c 2018-01-24 12:38:42.410481352 +0000
@@ -36,6 +36,14 @@ @@ -36,6 +36,14 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
@@ -19,16 +19,16 @@
#include <shell.h> #include <shell.h>
#ifndef errno #ifndef errno
@@ -71,6 +79,8 @@ static unsigned long filenum = 1L; @@ -65,6 +73,8 @@ static unsigned long filenum = 1L;
static char * static char *
get_sys_tmpdir (void) get_sys_tmpdir ()
{ {
+ static int doshm; + static int doshm;
+ +
if (sys_tmpdir) if (sys_tmpdir)
return sys_tmpdir; return sys_tmpdir;
@@ -97,6 +107,31 @@ get_sys_tmpdir (void) @@ -91,6 +101,31 @@ get_sys_tmpdir ()
return sys_tmpdir; return sys_tmpdir;
} }
@@ -58,17 +58,19 @@
+#endif +#endif
+ +
static char * static char *
get_tmpdir (int flags) get_tmpdir (flags)
int flags;
@@ -194,7 +229,8 @@ sh_mktmpfd (nameroot, flags, namep)
{ {
@@ -214,6 +249,7 @@ sh_mktmpfd (const char *nameroot, int fl char *filename, *tdir, *lroot;
const char *lroot;
int fd, tdlen; int fd, tdlen;
-
+
+enospace: +enospace:
filename = (char *)xmalloc (PATH_MAX + 1); filename = (char *)xmalloc (PATH_MAX + 1);
tdir = get_tmpdir (flags); tdir = get_tmpdir (flags);
tdlen = strlen (tdir); tdlen = strlen (tdir);
@@ -243,6 +279,10 @@ sh_mktmpfd (const char *nameroot, int fl @@ -217,6 +253,10 @@ sh_mktmpfd (nameroot, flags, namep)
free (filename); free (filename);
filename = NULL; filename = NULL;
} }
@@ -78,13 +80,18 @@
+ +
if (namep) if (namep)
*namep = filename; *namep = filename;
return fd;
@@ -282,6 +322,8 @@ sh_mktmpfd (const char *nameroot, int fl @@ -235,6 +275,13 @@ sh_mktmpfd (nameroot, flags, namep)
free (filename);
filename = NULL;
} }
+ if (fd < 0 && errno == ENOSPC && emergency_sys_tmpdir()) while (fd < 0 && errno == EEXIST);
+ goto enospace;
+ if (fd < 0 && errno == ENOSPC && emergency_sys_tmpdir())
+ {
+ free (filename);
+ filename = NULL;
+ goto enospace;
+ }
+
if (namep) if (namep)
*namep = filename; *namep = filename;
else

31
bash-4.3-perl522.patch Normal file
View File

@@ -0,0 +1,31 @@
From: coolo@suse.com
perl 5.22 makes the long deprecated defined(@array) an hard
error
---
support/texi2html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- support/texi2html
+++ support/texi2html 2016-03-08 11:49:40.596622296 +0000
@@ -4855,9 +4855,9 @@ sub update_sec_num {
my $ret;
$level--; # here we start at 0
- if ($name =~ /^appendix/ || defined(@appendix_sec_num)) {
+ if ($name =~ /^appendix/ || @appendix_sec_num) {
# appendix style
- if (defined(@appendix_sec_num)) {
+ if (@appendix_sec_num) {
&incr_sec_num($level, @appendix_sec_num);
} else {
@appendix_sec_num = ('A', 0, 0, 0);
@@ -4865,7 +4865,7 @@ sub update_sec_num {
$ret = join('.', @appendix_sec_num[0..$level]);
} else {
# normal style
- if (defined(@normal_sec_num))
+ if (@normal_sec_num)
{
&incr_sec_num($level, @normal_sec_num);
}

View File

@@ -4,7 +4,7 @@
--- sig.c --- sig.c
+++ sig.c 2018-11-29 08:13:00.103944580 +0000 +++ sig.c 2018-11-29 08:13:00.103944580 +0000
@@ -838,6 +838,8 @@ set_signal_handler (sig, handler) @@ -814,6 +814,8 @@ set_signal_handler (sig, handler)
if (sig == SIGCHLD) if (sig == SIGCHLD)
act.sa_flags |= SA_RESTART; /* XXX */ act.sa_flags |= SA_RESTART; /* XXX */
#endif #endif
@@ -13,7 +13,7 @@
/* Let's see if we can keep SIGWINCH from interrupting interruptible system /* Let's see if we can keep SIGWINCH from interrupting interruptible system
calls, like open(2)/read(2)/write(2) */ calls, like open(2)/read(2)/write(2) */
#if defined (SIGWINCH) #if defined (SIGWINCH)
@@ -848,6 +850,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. */ it to be as close to SIG_IGN as possible. */
if (sig == SIGTERM && handler == sigterm_sighandler) if (sig == SIGTERM && handler == sigterm_sighandler)
act.sa_flags |= SA_RESTART; /* XXX */ act.sa_flags |= SA_RESTART; /* XXX */

16
bash-5.2-gcc14.patch Normal file
View 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) Normal file

Binary file not shown.

View File

@@ -2,7 +2,7 @@
Makefile.in | 2 +- Makefile.in | 2 +-
config-top.h | 16 ++++++++++------ config-top.h | 16 ++++++++++------
doc/Makefile.in | 2 +- doc/Makefile.in | 2 +-
doc/bash.1 | 7 +++++++ doc/bash.1 | 7 +++++--
general.h | 3 +++ general.h | 3 +++
parse.y | 6 +++++- parse.y | 6 +++++-
shell.c | 6 +++++- shell.c | 6 +++++-
@@ -12,11 +12,11 @@
tests/glob.tests | 4 ++-- tests/glob.tests | 4 ++--
tests/run-intl | 2 +- tests/run-intl | 2 +-
tests/run-read | 2 +- tests/run-read | 2 +-
13 files changed, 43 insertions(+), 19 deletions(-) 13 files changed, 41 insertions(+), 21 deletions(-)
--- Makefile.in --- Makefile.in
+++ Makefile.in 2025-01-31 14:34:48.840202425 +0000 +++ Makefile.in 2022-06-22 06:38:20.511747259 +0000
@@ -500,7 +500,7 @@ SOURCES = $(CSOURCES) $(HSOURCES) $(BUI @@ -466,7 +466,7 @@ SOURCES = $(CSOURCES) $(HSOURCES) $(BUI
# headers in top-level source directory that get installed by install-headers # headers in top-level source directory that get installed by install-headers
INSTALLED_HEADERS = shell.h bashjmp.h command.h syntax.h general.h error.h \ INSTALLED_HEADERS = shell.h bashjmp.h command.h syntax.h general.h error.h \
variables.h array.h assoc.h arrayfunc.h quit.h dispose_cmd.h \ variables.h array.h assoc.h arrayfunc.h quit.h dispose_cmd.h \
@@ -26,8 +26,8 @@
bashintl.h bashansi.h bashjmp.h alias.h hashlib.h \ bashintl.h bashansi.h bashjmp.h alias.h hashlib.h \
conftypes.h unwind_prot.h jobs.h siglist.h \ conftypes.h unwind_prot.h jobs.h siglist.h \
--- config-top.h --- config-top.h
+++ config-top.h 2025-01-31 14:35:51.119054831 +0000 +++ config-top.h 2022-04-28 11:55:03.660248012 +0000
@@ -55,10 +55,14 @@ @@ -60,10 +60,14 @@
due to EPIPE. */ due to EPIPE. */
/* #define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS */ /* #define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS */
@@ -43,16 +43,16 @@
#endif #endif
/* If you want to unconditionally set a value for PATH in every restricted /* If you want to unconditionally set a value for PATH in every restricted
@@ -69,7 +73,7 @@ @@ -74,7 +78,7 @@
the Posix.2 confstr () function, or CS_PATH define are not present. */ the Posix.2 confstr () function, or CS_PATH define are not present. */
#ifndef STANDARD_UTILS_PATH #ifndef STANDARD_UTILS_PATH
#define STANDARD_UTILS_PATH \ #define STANDARD_UTILS_PATH \
- "/bin:/usr/bin:/sbin:/usr/sbin" - "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
+ _PATH_STDPATH + _PATH_STDPATH
#endif #endif
/* The default path for enable -f */ /* The default path for enable -f */
@@ -92,20 +96,20 @@ @@ -97,20 +101,20 @@
#define DEFAULT_BASHRC "~/.bashrc" #define DEFAULT_BASHRC "~/.bashrc"
/* System-wide .bashrc file for interactive shells. */ /* System-wide .bashrc file for interactive shells. */
@@ -78,32 +78,32 @@
/* Define if you want the case-toggling operators (~[~]) and the /* Define if you want the case-toggling operators (~[~]) and the
`capcase' variable attribute (declare -c). */ `capcase' variable attribute (declare -c). */
--- doc/Makefile.in --- doc/Makefile.in
+++ doc/Makefile.in 2025-01-31 14:36:39.222168456 +0000 +++ doc/Makefile.in 2022-04-28 11:53:04.334380153 +0000
@@ -153,7 +153,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $ @@ -153,7 +153,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $
# $(RM) $@ # $(RM) $@
# -${TEXI2PDF} $< # -${TEXI2PDF} $<
-all: info dvi text html pdf $(MAN2HTML) -all: ps info dvi text html $(MAN2HTML)
+all: info html $(MAN2HTML) +all: info html $(MAN2HTML)
nodvi: ps info text html nodvi: ps info text html
everything: all ps everything: all pdf
--- doc/bash.1 --- doc/bash.1
+++ doc/bash.1 2025-01-31 14:39:44.682751126 +0000 +++ doc/bash.1 2022-06-22 06:37:14.908958305 +0000
@@ -2800,6 +2800,10 @@ startup file, overriding the default of @@ -5745,8 +5745,8 @@ file (the \fIinputrc\fP file).
The name of this file is taken from the value of the
.SM .SM
.B READLINE .B INPUTRC
below). -variable. If that variable is unset, the default is
+If that variable is unset, readline will read both -.IR ~/.inputrc .
+.FN /etc/inputrc +environment variable. If that variable is unset, readline will read both
+and +.IR /etc/inputrc " and " ~/.inputrc .
+.FN \*~/.inputrc . If that file does not exist or cannot be read, the ultimate default is
.IR /etc/inputrc .
When a program which uses the readline library starts up, the
@@ -11706,6 +11706,9 @@ command history
.TP .TP
.B INSIDE_EMACS .FN ~/.inputrc
If this variable appears in the environment when the shell starts,
@@ -13443,6 +13447,9 @@ command history
.TP
.FN \*~/.inputrc
Individual \fIreadline\fP initialization file Individual \fIreadline\fP initialization file
+.TP +.TP
+.FN /etc/inputrc +.FN /etc/inputrc
@@ -112,7 +112,7 @@
.SH AUTHORS .SH AUTHORS
Brian Fox, Free Software Foundation Brian Fox, Free Software Foundation
--- general.h --- general.h
+++ general.h 2025-01-31 14:34:48.844202351 +0000 +++ general.h 2022-04-28 11:53:04.334380153 +0000
@@ -21,10 +21,13 @@ @@ -21,10 +21,13 @@
#if !defined (_GENERAL_H_) #if !defined (_GENERAL_H_)
#define _GENERAL_H_ #define _GENERAL_H_
@@ -128,10 +128,10 @@
#if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE) #if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE)
# if defined (HAVE_SYS_TIME_H) # if defined (HAVE_SYS_TIME_H)
--- parse.y --- parse.y
+++ parse.y 2025-01-31 14:40:55.673443061 +0000 +++ parse.y 2022-04-28 11:53:04.334380153 +0000
@@ -405,6 +405,10 @@ static FILE *yyerrstream; @@ -366,6 +366,10 @@ static FILE *yyerrstream;
/* Special; never created by yylex; only set by parse_matched_pair/parse_comsub/xparse_dolparen */ /* Special; never created by yylex; only set by parse_comsub and xparse_dolparen */
%token DOLBRACE %token DOLPAREN
+/* Declare token YYEOF as older bison version fails +/* Declare token YYEOF as older bison version fails
+ with not defined as a token and has no rules */ + with not defined as a token and has no rules */
@@ -140,7 +140,7 @@
/* The types that the various syntactical units return. */ /* The types that the various syntactical units return. */
%type <command> inputunit command pipeline pipeline_command %type <command> inputunit command pipeline pipeline_command
@@ -1649,7 +1653,7 @@ input_file_descriptor (void) @@ -1513,7 +1513,7 @@ input_file_descriptor ()
#if defined (READLINE) #if defined (READLINE)
char *current_readline_prompt = (char *)NULL; char *current_readline_prompt = (char *)NULL;
@@ -150,7 +150,7 @@
static int static int
--- shell.c --- shell.c
+++ shell.c 2025-01-31 14:42:34.851615639 +0000 +++ shell.c 2022-04-28 11:56:12.623015117 +0000
@@ -46,6 +46,7 @@ @@ -46,6 +46,7 @@
# include <sys/mman.h> # include <sys/mman.h>
# include <sys/types.h> # include <sys/types.h>
@@ -159,7 +159,7 @@
#endif #endif
#include "bashintl.h" #include "bashintl.h"
@@ -512,7 +513,7 @@ main (int argc, char **argv, char **env) @@ -512,7 +513,7 @@ main (argc, argv, env)
read_but_dont_execute = 1; read_but_dont_execute = 1;
#endif #endif
@@ -168,18 +168,18 @@
disable_priv_mode (); disable_priv_mode ();
/* Need to get the argument to a -c option processed in the /* Need to get the argument to a -c option processed in the
@@ -1343,6 +1344,9 @@ disable_priv_mode (void) @@ -1342,6 +1343,9 @@ disable_priv_mode ()
int e, r; {
int e;
r = 0;
+ if (!current_user.user_name) + if (!current_user.user_name)
+ get_current_user_info(); + get_current_user_info();
+ r = initgroups (current_user.user_name, current_user.gid); + initgroups (current_user.user_name, current_user.gid);
#if HAVE_SETRESUID #if HAVE_SETRESUID
if (current_user.euid != current_user.uid || current_user.saveuid != current_user.uid) if (setresuid (current_user.uid, current_user.uid, current_user.uid) < 0)
r = setresuid (current_user.uid, current_user.uid, current_user.uid) ; #else
--- support/man2html.c --- support/man2html.c
+++ support/man2html.c 2025-01-31 14:34:48.848202278 +0000 +++ support/man2html.c 2022-04-28 11:53:04.338380081 +0000
@@ -78,6 +78,7 @@ @@ -78,6 +78,7 @@
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
@@ -189,7 +189,7 @@
#define NULL_TERMINATED(n) ((n) + 1) #define NULL_TERMINATED(n) ((n) + 1)
--- support/rlvers.sh --- support/rlvers.sh
+++ support/rlvers.sh 2025-01-31 14:34:48.848202278 +0000 +++ support/rlvers.sh 2022-04-28 11:53:04.338380081 +0000
@@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers @@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers
# defaults # defaults
@@ -205,7 +205,7 @@
# cannot rely on the presence of getopts # cannot rely on the presence of getopts
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
--- support/shobj-conf --- support/shobj-conf
+++ support/shobj-conf 2025-01-31 14:34:48.848202278 +0000 +++ support/shobj-conf 2022-04-28 11:57:29.117647038 +0000
@@ -126,10 +126,11 @@ sunos5*|solaris2*) @@ -126,10 +126,11 @@ sunos5*|solaris2*)
linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*) linux*-*|gnu*-*|k*bsd*-gnu-*|midnightbsd*|freebsd*|dragonfly*)
SHOBJ_CFLAGS=-fPIC SHOBJ_CFLAGS=-fPIC
@@ -221,8 +221,8 @@
# Darwin/MacOS X # Darwin/MacOS X
--- tests/glob.tests --- tests/glob.tests
+++ tests/glob.tests 2025-01-31 14:34:48.848202278 +0000 +++ tests/glob.tests 2022-04-28 11:53:04.338380081 +0000
@@ -35,8 +35,8 @@ ${THIS_SH} ./glob11.sub @@ -34,8 +34,8 @@ ${THIS_SH} ./glob10.sub
MYDIR=$PWD # save where we are MYDIR=$PWD # save where we are
@@ -234,7 +234,7 @@
rm -rf * rm -rf *
--- tests/run-intl --- tests/run-intl
+++ tests/run-intl 2025-01-31 14:34:48.848202278 +0000 +++ tests/run-intl 2022-04-28 11:58:22.140698412 +0000
@@ -2,4 +2,4 @@ @@ -2,4 +2,4 @@
( diff -a ./intl.right ./intl.right >/dev/null 2>&1 ) && AFLAG=-a ( diff -a ./intl.right ./intl.right >/dev/null 2>&1 ) && AFLAG=-a
@@ -242,30 +242,10 @@
-diff $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT} -diff $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT}
+diff -w $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT} +diff -w $AFLAG ${BASH_TSTOUT} intl.right && rm -f ${BASH_TSTOUT}
--- tests/run-read --- tests/run-read
+++ tests/run-read 2025-01-31 14:34:48.848202278 +0000 +++ tests/run-read 2022-04-28 11:53:04.338380081 +0000
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
echo "warning: please do not consider output differing only in the amount of" >&2 echo "warning: please do not consider output differing only in the amount of" >&2
echo "warning: white space to be an error." >&2 echo "warning: white space to be an error." >&2
${THIS_SH} ./read.tests > ${BASH_TSTOUT} 2>&1 ${THIS_SH} ./read.tests > ${BASH_TSTOUT} 2>&1
-diff ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT} -diff ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT}
+diff -w ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT} +diff -w ${BASH_TSTOUT} read.right && rm -f ${BASH_TSTOUT}
--- configure
+++ configure 2025-07-22 11:44:32.379750615 +0000
@@ -12749,7 +12749,6 @@ else case e in #(
# defined sleep(n) _sleep ((n) * 1000)
#endif
#include <fcntl.h>
- GL_MDA_DEFINES
#ifndef O_NOATIME
#define O_NOATIME 0
#endif
--- m4/fcntl-o.m4
+++ m4/fcntl-o.m4 2025-07-22 11:54:23.317130679 +0000
@@ -32,7 +32,6 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
# defined sleep(n) _sleep ((n) * 1000)
#endif
#include <fcntl.h>
- ]GL_MDA_DEFINES[
#ifndef O_NOATIME
#define O_NOATIME 0
#endif

BIN
bash-5.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
bash-5.2.tar.gz.sig Normal file

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2c681145bb110de76d34ea81f7de8e5cbc37c663008fcd57197ce51540a4746b
size 3445

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba
size 11355854

Binary file not shown.

View File

@@ -1,2 +1,5 @@
addFilter(".*shared-library-without-dependency-information.*")
addFilter(".*zero-length.*/etc/skel/\..*")
addFilter(".*call-to-mktemp.*/usr/bin/bash.*") addFilter(".*call-to-mktemp.*/usr/bin/bash.*")
addFilter(".*W:.hidden-file-or-dir.*/usr/etc/skel/\..*") addFilter(".*W:.*patch-not-applied.*Patch.*:.*bash-4\.3-winch\.dif.*")
addFilter(".*W:.*macro-in-comment.*%patch.*")

View File

@@ -1,145 +1,4 @@
------------------------------------------------------------------- Adjusting changes
Fri Aug 1 06:00:45 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- Take refreshed source tar ball with uptodate (g)po files
- Refresh (g)po files as well due our patches
-------------------------------------------------------------------
Mon Jul 28 10:41:49 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- Add upstream patches
* bash53-001
In posix mode, `wait -n' with pid arguments does not restrict the set of
processes it considers to those arguments.
* bash53-002
There are too many differences in the various implementations of shm_open(2)
to rely on it for bash's use.
* bash53-003
Bash leaves internal quoting in place when expanding array subscripts
that appear inside array subscripts in an arithmetic context, causing
expansion failures.
-------------------------------------------------------------------
Fri Jul 18 07:39:27 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- The package bash-loadables supplements a specific bash version
-------------------------------------------------------------------
Thu Jul 17 08:52:25 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- Update to bash 5.3
a. When checking whether a script file argument is a binary file, check the
first two lines of a script if the first line begins with `#!'.
b. Bash does a better job of preserving user-supplied quotes around a word
completion, instead of requoting it.
c. Bash reports the starting line number in an error message about an
unterminated compound command like `if' without a `fi'.
d. Implement the POSIX requirement that running the `jobs' builtin removes
jobs from the jobs list.
f. Call bash signal handlers while executing programmable completion commands,
instead of readline's.
g. Print an error message if a regular expression used with [[ fails to compile.
h. The `umask' builtin now has additional features for full POSIX conformance.
i. `type -a -P' reports both hashed pathnames and the result of a $PATH search.
j. `trap' has a new -P option that prints the trap action associated with each
signal argument.
k. The `command' builtin preceding a declaration builtin (e.g., `declare')
preserves the special asisgnment statement parsing for the declaration
builtin. This is a new POSIX requirement.
l. `printf' uses the `alternate form' for %q and %Q to force single quoting.
m. `printf' now interprets %ls (%S) and %lc (%C) as referring to wide strings
and characters, respectively, when in a multibyte locale.
n. The shell can be compiled with a different default value for the
patsub_replacement option.
o. Check for window size changes during trap commands, `bind -x' commands,
and programmable completion.
p. Treat a NULL value for $PATH as equivalent to ".".
p. New loadable builtins: kv, strptime
q. GLOBSORT: new variable to specify how to sort the results of pathname
expansion (name, size, blocks, mtime, atime, ctime, numeric, none) in
ascending or descending order.
r. `compgen' has a new option: -V varname. If supplied, it stores the generated
completions into VARNAME instead of printing them on stdout.
s. New form of command substitution: ${ command; } or ${|command;} to capture
the output of COMMAND without forking a child process and using pipes.
t. array_expand_once: new shopt option, replaces assoc_expand_once
u. complete/compopt new option: fullquote; sets rl_full_quoting_desired so all
possible completions are quoted as if they were filenames.
v. Command timing now allows precisions up to 6 digits instead of 3 in
$TIMEFORMAT.
w. BASH_MONOSECONDS: new dynamic variable that returns the value of the
system's monotonic clock, if one is available.
x. BASH_TRAPSIG: new variable, set to the numeric signal number of the trap
being executed while it's running.
y. The checkwinsize option can be used in subshell commands started from
interactive shells.
z. In posix mode, the test command < and > binary primaries compare strings
using the current locale.
aa. bind -x allows new key binding syntax: separate the key sequence and the
command string with whitespace, but require the command string to be
double-quoted if this is used. This allows different quoting options for
the command string.
bb. Print commands bound to key sequences using `bind -x' with the new key
binding syntax it allows.
cc. `read' has a new `-E' option to use readline but with the default bash
completion (including programmable completion).
dd. New bindable readline command name: `bash-vi-complete'.
ee. New test builtin behavior when parsing a parenthesized subexpression and
test was given more than 4 arguments: scan forward for a closing paren and
call posixtest() if there are 4 or fewer arguments between the parentheses.
Added for compatibility with coreutils test, dependent on the shell
compatibility level. Such expressions remain ambiguous.
ff. MULTIPLE_COPROCS is now enabled by default.
gg. The `bind' builtin interprets additional non-option arguments after -p or
-P as bindable command names and restricts output to the bindings for
those names.
hh. Bash now uses the login shell for $BASH if the shell is named `su' or `-su'.
ii. Bash now prints job notifications if an interactive shell is running a trap,
even though the shell is not interactive at that moment.
jj. Programmable completion allows a new compspec loaded after a completion
function returns 124 to be used in more cases.
kk. ./source has a new -p PATH option, which makes it use the PATH argument
instead of $PATH to look for the file.
ll. Documentation has been significantly updated.
mm. `wait -n' can now return terminated process substitutions, jobs about
which the user has already been notified (like `wait' without options),
nn. `wait -n' removes jobs from the jobs table or list of terminated children
when in posix mode.
oo. Changed the `wait' builtin behavior regarding process substitutions to
match the documentation.
pp. There is a new `bash_source_fullpath' shopt option, which makes bash put
full pathnames into BASH_SOURCE, and a way to set a default value for it
at configure time.
qq. Posix mode now forces job notifications to occur when the new edition of
POSIX specifies (since it now specifies them).
rr. Interactive shells don't print job notifications while sourcing scripts.
ss. The parser prints more information about the command it's trying to parse
when it encounters EOF before completing the command.
tt. Posix mode no longer requires function names to be valid shell identifiers.
uu. If `exit' is run in a trap and not supplied an exit status argument, it
uses the value of $? from before the trap only if it's run at the trap's
`top level' and would cause the trap to end (that is, not in a subshell).
This is from Posix interp 1602.
vv. There is a new `fltexpr' loadable builtin to perform floating-point
arithmetic similarly to `let'.
ww. The `install-strip' and `strip' Makefile targets now deal with cross-
compiling.
- This update includes the upstream solution for bsc#1245199
- Drop -std=gnu17 in CFLAGS as not required anymore
- Port patches
* bash-2.03-manual.patch
* bash-3.0-evalexp.patch
* bash-3.2-printf.patch
* bash-4.1-bash.bashrc.dif
* bash-4.1-completion.dif
* bash-4.2-nscdunmap.dif
* bash-4.3-sigrestart.patch
* bash-5.3.dif
- Port patch bash-5.2.dif and rename it to bash-5.3.dif
- Drop patches upstream now or not supported anymore (perl version)
* bash-4.3-decl.patch
* bash-4.3-perl522.patch
* bash-5.2-gcc14.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Apr 20 20:27:08 UTC 2025 - Friedrich Haubensak <hsk17@mail.de> Sun Apr 20 20:27:08 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>

View File

@@ -25,10 +25,10 @@
# Unicode tests do alloc to much memory # Unicode tests do alloc to much memory
%bcond_with altarray %bcond_with altarray
%define rl_major 8 %define rl_major 8
%define rl_version 8.3 %define rl_version 8.2
%define bextend %{nil} %define bextend %{nil}
%define bversion 5.3 %define bversion 5.2
%define bpatchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir}) %define bpatchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir})
%global _incdir %{_includedir} %global _incdir %{_includedir}
%global _ldldir %{_libdir}/bash %global _ldldir %{_libdir}/bash
@@ -62,12 +62,12 @@ Source9: bash-4.2-history-myown.dif.bz2
Source10: https://ftp.gnu.org/gnu/bash/bash-%{bversion}%{bextend}.tar.gz.sig Source10: https://ftp.gnu.org/gnu/bash/bash-%{bversion}%{bextend}.tar.gz.sig
# GPG key 7C0135FB088AAF6C66C650B9BB5869F064EA74AB Chet Ramey # GPG key 7C0135FB088AAF6C66C650B9BB5869F064EA74AB Chet Ramey
Source11: bash.keyring Source11: bash.keyring
Source99: bash.changes
Patch0: bash-%{bversion}.dif Patch0: bash-%{bversion}.dif
Patch1: bash-2.03-manual.patch Patch1: bash-2.03-manual.patch
Patch3: bash-4.3-2.4.4.patch Patch3: bash-4.3-2.4.4.patch
Patch4: bash-3.0-evalexp.patch Patch4: bash-3.0-evalexp.patch
Patch5: bash-3.0-warn-locale.patch Patch5: bash-3.0-warn-locale.patch
Patch7: bash-4.3-decl.patch
Patch9: bash-4.3-include-unistd.dif Patch9: bash-4.3-include-unistd.dif
Patch10: bash-3.2-printf.patch Patch10: bash-3.2-printf.patch
Patch11: bash-4.3-loadables.dif Patch11: bash-4.3-loadables.dif
@@ -80,12 +80,15 @@ Patch40: bash-4.1-bash.bashrc.dif
# PATCH-FIX-SUSE For bsc#1065158 add support for broken Japanese locale Shift JIS # PATCH-FIX-SUSE For bsc#1065158 add support for broken Japanese locale Shift JIS
Patch42: bash-4.3-SJIS.patch Patch42: bash-4.3-SJIS.patch
Patch46: man2html-no-timestamp.patch Patch46: man2html-no-timestamp.patch
Patch47: bash-4.3-perl522.patch
# PATCH-FIX-SUSE # PATCH-FIX-SUSE
Patch48: bash-4.3-extra-import-func.patch Patch48: bash-4.3-extra-import-func.patch
# PATCH-EXTEND-SUSE Allow root to clean file system if filled up # PATCH-EXTEND-SUSE Allow root to clean file system if filled up
Patch49: bash-4.3-pathtemp.patch Patch49: bash-4.3-pathtemp.patch
# PATCH-FIX-SUSE # PATCH-FIX-SUSE
Patch50: quotes-man2html.patch Patch50: quotes-man2html.patch
# PATCH-FIX-UPSTREAM
Patch51: bash-5.2-gcc14.patch
BuildRequires: autoconf BuildRequires: autoconf
# latest bash uses with patch 18 the tag YYEOF # latest bash uses with patch 18 the tag YYEOF
BuildRequires: bison BuildRequires: bison
@@ -165,7 +168,6 @@ builtins for the interpreter Bash. Use the output of the command
%package loadables %package loadables
Summary: Loadable bash builtins Summary: Loadable bash builtins
Group: System/Shells Group: System/Shells
Supplements: %{name} = %{version}
%description loadables %description loadables
This package contains the examples for the ready-to-dynamic-load This package contains the examples for the ready-to-dynamic-load
@@ -266,6 +268,7 @@ set -x
%patch -P3 -b .2.4.4 %patch -P3 -b .2.4.4
%patch -P4 -b .evalexp %patch -P4 -b .evalexp
%patch -P5 -b .warnlc %patch -P5 -b .warnlc
%patch -P7 -b .decl
%patch -P9 -b .unistd %patch -P9 -b .unistd
%patch -P10 -b .printf %patch -P10 -b .printf
%patch -P11 -b .plugins %patch -P11 -b .plugins
@@ -278,11 +281,13 @@ set -x
%patch -P42 -b .sjis %patch -P42 -b .sjis
%endif %endif
%patch -P46 -b .notimestamp %patch -P46 -b .notimestamp
%patch -P47 -b .perl522
%if %{with import_function} %if %{with import_function}
%patch -P48 -b .eif %patch -P48 -b .eif
%endif %endif
%patch -P49 -b .pthtmp %patch -P49 -b .pthtmp
%patch -P50 -b .qd %patch -P50 -b .qd
%patch -P51 -b .gcc14
%patch -P0 -b .p0 %patch -P0 -b .p0
# This has to be always the same version as included in the bash its self # This has to be always the same version as included in the bash its self
@@ -303,12 +308,6 @@ echo exit 0 > tests/read7.sub
%endif %endif
%build %build
SOURCE_DATE_EPOCH="$(sed -n '/^----/n;s/ - .*$//;p;q' %{SOURCE99} | date -u -f - +%%s)"
TZ=UTC0
LANG=POSIX
LC_ALL=C.UTF-8
export SOURCE_DATE_EPOCH TZ LANG LC_ALL
touch -d "@${SOURCE_DATE_EPOCH}" .source_date_epoch
LANG=POSIX LANG=POSIX
LC_ALL=$LANG LC_ALL=$LANG
unset LC_CTYPE unset LC_CTYPE
@@ -361,7 +360,8 @@ echo exit 0 > tests/read7.sub
set +o noclobber set +o noclobber
} }
LARGEFILE="$(getconf LFS_CFLAGS)" LARGEFILE="$(getconf LFS_CFLAGS)"
CFLAGS="%{optflags} $LARGEFILE -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g" # add -std=gnu17 to build w/ gcc-15; not needed for bash-5.3
CFLAGS="%{optflags} $LARGEFILE -D_GNU_SOURCE -DRECYCLES_PIDS -Wall -g -std=gnu17"
LDFLAGS="" LDFLAGS=""
# #
# Never ever put -DMUST_UNBLOCK_CHLD herein as this breaks bash # Never ever put -DMUST_UNBLOCK_CHLD herein as this breaks bash
@@ -510,49 +510,14 @@ echo exit 0 > tests/read7.sub
%endif %endif
%make_build $makeopts "$profilecflags" all %make_build $makeopts "$profilecflags" all
%make_build $makeopts -C examples/loadables/ %make_build $makeopts -C examples/loadables/
%make_build $makeopts -C po/ update-po
%make_build $makeopts documentation %make_build $makeopts documentation
grep -F '$'\' doc/bash.html %{nil:test for boo#1203091} grep -F '$'\' doc/bash.html %{nil:test for boo#1203091}
%check %check
SOURCE_DATE_EPOCH="$(date -u -r .source_date_epoch +%%s)"
TZ=UTC0
LANG=POSIX
LC_ALL=C.UTF-8
export SOURCE_DATE_EPOCH TZ LANG LC_ALL
rm -vf tests/*.p0 rm -vf tests/*.p0
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXXXXXX) || exit 1 %make_build -j1 check
SCREENRC=${SCREENDIR}/tcsh
TMPDIR=$(mktemp -d /tmp/bash.XXXXXXXXXX) || exit 1
export SCREENRC SCREENDIR TMPDIR
exec 0< /dev/null
SCREENLOG=${SCREENDIR}/log
cat > $SCREENRC<<-EOF
deflogin off
deflog on
logfile $SCREENLOG
logfile flush 1
logtstamp off
log on
setsid on
scrollback 0
silence on
utf8 on
EOF
> $SCREENLOG
tail -q -s 0.5 -f $SCREENLOG & pid=$!
env -i HOME=$HOME TERM=$TERM TMPDIR=$TMPDIR PATH=$PATH \
SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \
screen -D -m %make_build -j1 check
sleep 1
kill -TERM $pid
%install %install
SOURCE_DATE_EPOCH="$(date -u -r .source_date_epoch +%%s)"
TZ=UTC0
LANG=POSIX
LC_ALL=C.UTF-8
export SOURCE_DATE_EPOCH TZ LANG LC_ALL
%make_install %make_install
make -C examples/loadables/ install-supported DESTDIR=%{buildroot} libdir=%{_libdir} make -C examples/loadables/ install-supported DESTDIR=%{buildroot} libdir=%{_libdir}
mv -vf %{buildroot}%{_ldldir}/*.h %{buildroot}%{_includedir}/bash/ mv -vf %{buildroot}%{_ldldir}/*.h %{buildroot}%{_includedir}/bash/
@@ -624,10 +589,6 @@ fi
%files %files
%license COPYING %license COPYING
%if 0%{?suse_version} < 1550
%dir %{_prefix}%{_sysconfdir}/
%dir %{_prefix}%{_sysconfdir}/skel/
%endif
%{_prefix}%{_sysconfdir}/skel/.bashrc %{_prefix}%{_sysconfdir}/skel/.bashrc
%{_prefix}%{_sysconfdir}/skel/.profile %{_prefix}%{_sysconfdir}/skel/.profile
%if %{with alternatives} %if %{with alternatives}

View File

@@ -5,11 +5,10 @@ sourcedir=$1
test -n "${sourcedir}" || sourcedir=$PWD test -n "${sourcedir}" || sourcedir=$PWD
test -e ${sourcedir}/bash.spec || exit 1 test -e ${sourcedir}/bash.spec || exit 1
version=$(sed -rn '/^%define[[:space:]]+bversion/{s/^%define[[:space:]]+bversion[[:space:]]+([0-9]+\.[0-9]+)(\.[^\.]+)?/\1/p}' ${sourcedir}/bash.spec) || exit 1 version=$(sed -rn '/^%define[[:space:]]+bversion/{s/^%define[[:space:]]+bversion[[:space:]]+([0-9]+\.[0-9]+)(\.[^\.]+)?/\1/p}' ${sourcedir}/bash.spec) || exit 1
beta=$(sed -rn '/^%define[[:space:]]+bextend/{s/^%define[[:space:]]+bextend[[:space:]]+([^[:space:]])?/\1/p}' ${sourcedir}/bash.spec) || exit 1
test "$beta" = "%{nil}" && beta="" || version=${version}${beta}
test -e ${sourcedir}/bash-${version}.tar.gz || exit 1 test -e ${sourcedir}/bash-${version}.tar.gz || exit 1
last=($(tar Oxf ${sourcedir}/bash-${version}.tar.gz bash-${version}/configure.ac | sed -rn '/^define.bashvers/{s/^define\(bashvers,[[:space:]]([0-9\.]+)\)/\1/p}')) || exit 1 last=($(tar Oxf ${sourcedir}/bash-${version}.tar.gz bash-${version}/configure.ac | sed -rn '/^define.bashvers/{s/^define\(bashvers,[[:space:]]([0-9\.]+)\)/\1/p}')) || exit 1
tar --wildcards -tf ${sourcedir}/bash-${version}-patches.tar.bz2 '*/bash[0-9][0-9]-*[0-9]' &> /dev/null || { echo 0 ; exit; } test -e ${sourcedir}/bash-${version}-patches.tar.bz2 || echo ${last[0]}
tar --wildcards -tf ${sourcedir}/bash-${version}-patches.tar.bz2 '*/bash[0-9][0-9]-*[0-9]' &> /dev/null || echo ${last[0]}
OFS="$IFS" OFS="$IFS"
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)) 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))

View File

@@ -4,7 +4,7 @@
--- support/man2html.c --- support/man2html.c
+++ support/man2html.c 2010-09-03 20:49:56.288632000 +0000 +++ support/man2html.c 2010-09-03 20:49:56.288632000 +0000
@@ -4085,7 +4085,7 @@ main(int argc, char **argv) @@ -4076,7 +4076,7 @@ main(int argc, char **argv)
if (subs) if (subs)
fputs("</DL>\n", stdout); fputs("</DL>\n", stdout);
fputs("</DL>\n", stdout); fputs("</DL>\n", stdout);

View File

@@ -6,7 +6,7 @@ boo#1203091
--- support/man2html.c --- support/man2html.c
+++ support/man2html.c 2022-09-12 08:27:06.352648345 +0000 +++ support/man2html.c 2022-09-12 08:27:06.352648345 +0000
@@ -485,6 +485,18 @@ expand_char(int nr) @@ -476,6 +476,18 @@ expand_char(int nr)
charb[0] = nr / 256; charb[0] = nr / 256;
charb[1] = nr % 256; charb[1] = nr % 256;
charb[2] = '\0'; charb[2] = '\0';