SHA256
6
0
forked from pool/bash

24 Commits

Author SHA256 Message Date
33941c88ba Accepting request 1296985 from Base:System
- Take refreshed source tar ball with uptodate (g)po files
- Refresh (g)po files as well due our patches

- 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.

- The package bash-loadables supplements a specific bash version

-  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.

OBS-URL: https://build.opensuse.org/request/show/1296985
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=200
2025-08-13 14:23:38 +00:00
ee4a955a1b Take refreshed upstream source tar ball
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=409
2025-08-01 08:01:16 +00:00
0fcc03b90e Refresh (g)po file
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=408
2025-08-01 06:02:25 +00:00
d1ee8de64e Add upstream patches bash53-001, bash53-002, and bash53-003
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=407
2025-07-28 11:10:08 +00:00
3dfda705d0 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=406
2025-07-17 10:39:18 +00:00
1ff9bfb719 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=405
2025-07-17 09:33:29 +00:00
345055046f .
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=404
2025-07-17 09:28:51 +00:00
6f04a8d61d Update to bash-5.3
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=403
2025-07-17 09:15:35 +00:00
16f158c508 Accepting request 1271572 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1271572
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=199
2025-04-23 15:26:42 +00:00
24f7263a79 add -std=gnu17 to CFLAGS to fix gcc15 compile time error
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=401
2025-04-22 09:53:11 +00:00
9b0583936c Accepting request 1267821 from Base:System
- Make it build even on s390 with profiling

OBS-URL: https://build.opensuse.org/request/show/1267821
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=198
2025-04-14 10:55:10 +00:00
f898c87e56 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=399
2025-04-08 06:08:21 +00:00
a943772ba0 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=398
2025-04-04 14:24:31 +00:00
09051f4fdc Accepting request 1251754 from Base:System
Skip PGO with %want_reproducible_builds (boo#1040589) (forwarded request 1251745 from bmwiedemann)

OBS-URL: https://build.opensuse.org/request/show/1251754
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=197
2025-03-12 14:19:57 +00:00
84fb95b1c6 Skip PGO with %want_reproducible_builds (boo#1040589)
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=396
2025-03-10 10:35:22 +00:00
4067fbfe71 Accepting request 1248296 from Base:System
- Explicitly specify that the build recipe needs bash (forwarded request 1248227 from jengelh)

OBS-URL: https://build.opensuse.org/request/show/1248296
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=196
2025-02-27 13:48:57 +00:00
76976d061a - Explicitly specify that the build recipe needs bash
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=394
2025-02-25 08:09:14 +00:00
9f72dc4ce8 Accepting request 1240150 from Base:System
- As in bash-sh there is only a symbolic link avoid to require a version

- Move (/etc/skel/.bashrc) and (/etc/skel/.profile) to (/usr/etc/skel/).

OBS-URL: https://build.opensuse.org/request/show/1240150
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=195
2025-01-25 18:10:09 +00:00
f5f7eccbf4 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=392
2025-01-24 12:10:46 +00:00
6fd380aa66 - Move (/etc/skel/.bashrc) and (/etc/skel/.profile) to (/usr/etc/skel/).
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=391
2025-01-24 12:08:52 +00:00
6f5213578a Accepting request 1233142 from Base:System
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1233142
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=194
2024-12-24 15:25:28 +00:00
62053e37b8 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=389
2024-12-16 12:47:42 +00:00
df7b276f8f Accepting request 1203319 from Base:System
- 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

OBS-URL: https://build.opensuse.org/request/show/1203319
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=193
2024-09-25 19:51:33 +00:00
28a8c60032 Update to bash-5.2 patch level 37
OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=387
2024-09-25 07:21:27 +00:00
30 changed files with 481 additions and 304 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,31 +0,0 @@
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 2018-11-29 08:13:00.103944580 +0000
@@ -814,6 +814,8 @@ set_signal_handler (sig, handler)
@@ -838,6 +838,8 @@ set_signal_handler (sig, handler)
if (sig == SIGCHLD)
act.sa_flags |= SA_RESTART; /* XXX */
#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)
@@ -824,6 +826,10 @@ set_signal_handler (sig, handler)
@@ -848,6 +850,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 */

View File

@@ -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

View File

@@ -1,16 +0,0 @@
---
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()
{

View File

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

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

Binary file not shown.

Binary file not shown.

3
bash-5.3-patches.tar.bz2 Normal file
View File

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

View File

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

3
bash-5.3.tar.gz Normal file
View File

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

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

Binary file not shown.

View File

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

View File

@@ -1,3 +1,207 @@
-------------------------------------------------------------------
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>
- add -std=gnu17 to CFLAGS to fix gcc15 compile time error
-------------------------------------------------------------------
Tue Apr 8 06:07:24 UTC 2025 - Dr. Werner Fink <werner@suse.de>
- Make it build even on s390 with profiling
-------------------------------------------------------------------
Mon Mar 10 09:38:26 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>
- Skip PGO with %want_reproducible_builds (boo#1040589)
-------------------------------------------------------------------
Mon Feb 24 18:21:33 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Explicitly specify that the build recipe needs bash
-------------------------------------------------------------------
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>

View File

@@ -1,7 +1,7 @@
#
# spec file for package bash
#
# Copyright (c) 2024 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
@@ -16,6 +16,7 @@
#
%define _buildshell /bin/bash
%if 0%{?suse_version} > 1500
%bcond_with alternatives
%else
@@ -24,10 +25,10 @@
# Unicode tests do alloc to much memory
%bcond_with altarray
%define rl_major 8
%define rl_version 8.2
%define rl_version 8.3
%define bextend %{nil}
%define bversion 5.2
%define bversion 5.3
%define bpatchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir})
%global _incdir %{_includedir}
%global _ldldir %{_libdir}/bash
@@ -61,12 +62,12 @@ Source9: bash-4.2-history-myown.dif.bz2
Source10: https://ftp.gnu.org/gnu/bash/bash-%{bversion}%{bextend}.tar.gz.sig
# GPG key 7C0135FB088AAF6C66C650B9BB5869F064EA74AB Chet Ramey
Source11: bash.keyring
Source99: bash.changes
Patch0: bash-%{bversion}.dif
Patch1: bash-2.03-manual.patch
Patch3: bash-4.3-2.4.4.patch
Patch4: bash-3.0-evalexp.patch
Patch5: bash-3.0-warn-locale.patch
Patch7: bash-4.3-decl.patch
Patch9: bash-4.3-include-unistd.dif
Patch10: bash-3.2-printf.patch
Patch11: bash-4.3-loadables.dif
@@ -75,21 +76,16 @@ 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
Patch46: man2html-no-timestamp.patch
Patch47: bash-4.3-perl522.patch
# PATCH-FIX-SUSE
Patch48: bash-4.3-extra-import-func.patch
# PATCH-EXTEND-SUSE Allow root to clean file system if filled up
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
@@ -111,7 +107,7 @@ BuildRequires: pkgconfig(readline) >= %{rl_version}
%if %{with alternatives}
Requires(post): update-alternatives
Requires(post): libreadline%{rl_major} >= %{rl_version}
Requires(preun):update-alternatives
Requires(preun): update-alternatives
%endif
Requires: libreadline%{rl_major} >= %{rl_version}
Suggests: bash-doc = %{version}
@@ -150,7 +146,7 @@ Group: System/Shells
Provides: alternative(sh)
Conflicts: alternative(sh)
Provides: bash:%{_bindir}/sh
PreReq: bash = %{version}
PreReq: bash
BuildArch: noarch
%description sh
@@ -169,6 +165,7 @@ builtins for the interpreter Bash. Use the output of the command
%package loadables
Summary: Loadable bash builtins
Group: System/Shells
Supplements: %{name} = %{version}
%description loadables
This package contains the examples for the ready-to-dynamic-load
@@ -240,7 +237,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
@@ -264,7 +266,6 @@ set -x
%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
@@ -272,19 +273,16 @@ set -x
%patch -P13 -b .nscdunmap
%patch -P14 -b .sigrestart
%patch -P16 -b .setlocale
#%patch -P18 -p0 -b .winch
%patch -P40 -b .bashrc
%if %{with sjis}
%patch -P42 -b .sjis
%endif
%patch -P46 -b .notimestamp
%patch -P47 -b .perl522
%if %{with import_function}
%patch -P48 -b .eif
%endif
%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
@@ -305,6 +303,12 @@ echo exit 0 > tests/read7.sub
%endif
%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
LC_ALL=$LANG
unset LC_CTYPE
@@ -484,7 +488,7 @@ echo exit 0 > tests/read7.sub
$READLINE
sed -rn '/Configuration feature settings controllable by autoconf/,/End of configuration settings controllable by autoconf/p' < config.h
profilecflags=CFLAGS="$CFLAGS"
%if 0%{?do_profiling}
%if 0%{?do_profiling} && !0%{?want_reproducible_builds}
profilecflags=CFLAGS="$CFLAGS %{cflags_profile_generate}"
%endif
ulimit -Hv unlimited
@@ -499,21 +503,56 @@ echo exit 0 > tests/read7.sub
SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \
screen -D -m %make_build -j1 TESTSCRIPT=%{SOURCE4} check
kill -TERM $pid
%if 0%{?do_profiling}
%if 0%{?do_profiling} && !0%{?want_reproducible_builds}
rm -f jobs.gcda
profilecflags=CFLAGS="$CFLAGS %{cflags_profile_feedback} -fprofile-correction"
%make_build $makeopts "$profilecflags" clean
%endif
%make_build $makeopts "$profilecflags" all
%make_build $makeopts -C examples/loadables/
%make_build $makeopts -C po/ update-po
%make_build $makeopts documentation
grep -F '$'\' doc/bash.html %{nil:test for boo#1203091}
%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
%make_build -j1 check
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXXXXXX) || exit 1
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
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 -C examples/loadables/ install-supported DESTDIR=%{buildroot} libdir=%{_libdir}
mv -vf %{buildroot}%{_ldldir}/*.h %{buildroot}%{_includedir}/bash/
@@ -565,11 +604,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
@@ -587,9 +624,12 @@ 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
%if 0%{?suse_version} < 1550
%dir %{_prefix}%{_sysconfdir}/
%dir %{_prefix}%{_sysconfdir}/skel/
%endif
%{_prefix}%{_sysconfdir}/skel/.bashrc
%{_prefix}%{_sysconfdir}/skel/.profile
%if %{with alternatives}
%ghost %config %{_sysconfdir}/alternatives/sh
%endif

View File

@@ -5,10 +5,11 @@ sourcedir=$1
test -n "${sourcedir}" || sourcedir=$PWD
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
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
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
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]}
tar --wildcards -tf ${sourcedir}/bash-${version}-patches.tar.bz2 '*/bash[0-9][0-9]-*[0-9]' &> /dev/null || { echo 0 ; exit; }
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))

View File

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

View File

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