From 999448066f023e6832eed2902855fe7141ec5078 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 29 Jul 2021 18:14:59 +0100 Subject: [PATCH] Ports: Update bash to 5.1.8 Also switches to using a sha256 signature check. --- Ports/AvailablePorts.md | 2 +- Ports/bash/package.sh | 9 ++---- Ports/bash/patches/config.sub.patch | 10 +++++++ Ports/bash/patches/configure-system.patch | 13 --------- Ports/bash/patches/disable-locale.patch | 29 +++++++++++++++---- Ports/bash/patches/include-stdio.patch | 13 --------- Ports/bash/patches/include-sys-select.patch | 10 +++++++ ...move-conflicting-declaration-in-glob.patch | 11 +++++++ .../remove-duplicate-declarations.patch | 21 -------------- 9 files changed, 58 insertions(+), 60 deletions(-) create mode 100644 Ports/bash/patches/config.sub.patch delete mode 100644 Ports/bash/patches/configure-system.patch delete mode 100644 Ports/bash/patches/include-stdio.patch create mode 100644 Ports/bash/patches/include-sys-select.patch create mode 100644 Ports/bash/patches/remove-conflicting-declaration-in-glob.patch delete mode 100644 Ports/bash/patches/remove-duplicate-declarations.patch diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index f74ff1dfd0..570e948e6c 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -5,7 +5,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^ | Port | Name | Version | Website | |----------------------------------------|-----------------------------------------------------------------|--------------------------|--------------------------------------------------------------------------------| | [`Another-World`](Another-World/) | Another World Bytecode Interpreter | | https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter | -| [`bash`](bash/) | GNU Bash | 5.0 | https://www.gnu.org/software/bash/ | +| [`bash`](bash/) | GNU Bash | 5.1.8 | https://www.gnu.org/software/bash/ | | [`bass`](bass/) | Beneath a Steel Sky | cd-1.2 | https://www.scummvm.org/games | | [`bc`](bc/) | bc | 2.5.1 | https://github.com/gavinhoward/bc | | [`binutils`](binutils/) | GNU Binutils | 2.37 | https://www.gnu.org/software/binutils/ | diff --git a/Ports/bash/package.sh b/Ports/bash/package.sh index 039fb31c4b..b20b9ff685 100755 --- a/Ports/bash/package.sh +++ b/Ports/bash/package.sh @@ -1,13 +1,10 @@ #!/usr/bin/env -S bash ../.port_include.sh port=bash -version=5.0 +version=5.1.8 useconfigure=true configopts="--disable-nls --without-bash-malloc" -files="https://ftpmirror.gnu.org/gnu/bash/bash-${version}.tar.gz bash-${version}.tar.gz -https://ftpmirror.gnu.org/gnu/bash/bash-${version}.tar.gz.sig bash-${version}.tar.gz.sig -https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg" -auth_type="sig" -auth_opts="--keyring ./gnu-keyring.gpg bash-${version}.tar.gz.sig" +files="https://ftpmirror.gnu.org/gnu/bash/bash-${version}.tar.gz bash-${version}.tar.gz 0cfb5c9bb1a29f800a97bd242d19511c997a1013815b805e0fdd32214113d6be" +auth_type="sha256" build() { run_replace_in_file "s/define GETCWD_BROKEN 1/undef GETCWD_BROKEN/" config.h diff --git a/Ports/bash/patches/config.sub.patch b/Ports/bash/patches/config.sub.patch new file mode 100644 index 0000000000..50a254d41e --- /dev/null +++ b/Ports/bash/patches/config.sub.patch @@ -0,0 +1,10 @@ +--- bash-5.1.8/support/config.sub 2020-11-18 19:40:12.000000000 +0000 ++++ bash-5.1.8.serenity/support/config.sub 2021-07-29 15:33:03.347306019 +0100 +@@ -1691,6 +1691,7 @@ + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ ++ | serenity* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ diff --git a/Ports/bash/patches/configure-system.patch b/Ports/bash/patches/configure-system.patch deleted file mode 100644 index 5a642d7816..0000000000 --- a/Ports/bash/patches/configure-system.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/support/config.sub b/support/config.sub -index f208558e..fb8fa19e 100755 ---- a/support/config.sub -+++ b/support/config.sub -@@ -1360,7 +1360,7 @@ case $os in - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ -- | midnightbsd*) -+ | midnightbsd* | serenity*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - qnx*) diff --git a/Ports/bash/patches/disable-locale.patch b/Ports/bash/patches/disable-locale.patch index c231fc5936..eeeaefa67c 100644 --- a/Ports/bash/patches/disable-locale.patch +++ b/Ports/bash/patches/disable-locale.patch @@ -1,18 +1,35 @@ -diff -Nru pristine/bash-5.0/locale.c bash-5.0/locale.c -+++ bash-5.0/locale.c 2019-05-21 02:18:05.843104487 +0200 +--- bash-5.1.8/locale.c 2020-02-24 20:08:43.000000000 +0000 ++++ bash-5.1.8.serenity/locale.c 2021-07-29 15:51:14.523146438 +0100 @@ -76,6 +76,7 @@ void set_default_locale () { -+ return; ++ return; #if defined (HAVE_SETLOCALE) default_locale = setlocale (LC_ALL, ""); if (default_locale) -@@ -95,6 +96,7 @@ +@@ -88,11 +89,11 @@ + + locale_mb_cur_max = MB_CUR_MAX; + locale_utf8locale = locale_isutf8 (default_locale); +-#if defined (HANDLE_MULTIBYTE) +- locale_shiftstates = mblen ((char *)NULL, 0); +-#else +- local_shiftstates = 0; +-#endif ++// #if defined (HANDLE_MULTIBYTE) ++// locale_shiftstates = mblen ((char *)NULL, 0); ++// #else ++// local_shiftstates = 0; ++// #endif + } + + /* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC and +@@ -101,6 +102,7 @@ void set_default_locale_vars () { -+ return; ++ return; char *val; -#if defined (HAVE_SETLOCALE) + #if defined (HAVE_SETLOCALE) diff --git a/Ports/bash/patches/include-stdio.patch b/Ports/bash/patches/include-stdio.patch deleted file mode 100644 index bd06d4b6f8..0000000000 --- a/Ports/bash/patches/include-stdio.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/stdc.h b/include/stdc.h -index c66492f0..5991f4bd 100644 ---- a/include/stdc.h -+++ b/include/stdc.h -@@ -22,6 +22,8 @@ - #if !defined (_STDC_H_) - #define _STDC_H_ - -+#include -+ - /* Adapted from BSD /usr/include/sys/cdefs.h. */ - - /* A function can be defined using prototypes and compile on both ANSI C diff --git a/Ports/bash/patches/include-sys-select.patch b/Ports/bash/patches/include-sys-select.patch new file mode 100644 index 0000000000..2fe892c68b --- /dev/null +++ b/Ports/bash/patches/include-sys-select.patch @@ -0,0 +1,10 @@ +--- bash-5.1.8.serenity/examples/loadables/accept.c 2020-03-18 12:58:36.000000000 +0000 ++++ bash-5.1.8/examples/loadables/accept.c 2021-07-29 17:11:26.258287156 +0100 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #include "loadables.h" + diff --git a/Ports/bash/patches/remove-conflicting-declaration-in-glob.patch b/Ports/bash/patches/remove-conflicting-declaration-in-glob.patch new file mode 100644 index 0000000000..1543a73565 --- /dev/null +++ b/Ports/bash/patches/remove-conflicting-declaration-in-glob.patch @@ -0,0 +1,11 @@ +--- bash-5.1.8.serenity/lib/glob/glob.c 2020-10-30 18:49:00.000000000 +0000 ++++ bash-5.1.8/lib/glob/glob.c 2021-07-29 17:11:22.146328629 +0100 +@@ -122,7 +122,7 @@ + #else + # define dequote_pathname udequote_pathname + #endif +-static void dequote_pathname PARAMS((char *)); ++//static void dequote_pathname PARAMS((char *)); + static int glob_testdir PARAMS((char *, int)); + static char **glob_dir_to_array PARAMS((char *, char **, int)); + diff --git a/Ports/bash/patches/remove-duplicate-declarations.patch b/Ports/bash/patches/remove-duplicate-declarations.patch deleted file mode 100644 index ba9c283b93..0000000000 --- a/Ports/bash/patches/remove-duplicate-declarations.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- bash-5.0/lib/readline/terminal.c.orig 2020-05-18 09:39:55.104000000 +0100 -+++ bash-5.0/lib/readline/terminal.c 2020-05-18 09:40:42.409654415 +0100 -@@ -102,12 +102,12 @@ - - static int tcap_initialized; - --#if !defined (__linux__) && !defined (NCURSES_VERSION) --# if defined (__EMX__) || defined (NEED_EXTERN_PC) --extern --# endif /* __EMX__ || NEED_EXTERN_PC */ --char PC, *BC, *UP; --#endif /* !__linux__ && !NCURSES_VERSION */ -+// #if !defined (__linux__) && !defined (NCURSES_VERSION) -+// # if defined (__EMX__) || defined (NEED_EXTERN_PC) -+// extern -+// # endif /* __EMX__ || NEED_EXTERN_PC */ -+// char PC, *BC, *UP; -+// #endif /* !__linux__ && !NCURSES_VERSION */ - - /* Some strings to control terminal actions. These are output by tputs (). */ - char *_rl_term_clreol;