From d9248186a54c29574c418e10318ed746a592586a Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 22 Oct 2023 15:21:13 -0600 Subject: [PATCH 1/4] Bump zlib to 1.3 and mpfr to 4.2.1 --- package-versions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-versions.sh b/package-versions.sh index d5fca806..15bb9338 100644 --- a/package-versions.sh +++ b/package-versions.sh @@ -2,7 +2,7 @@ BINUTILS_VERSION=2.41 GCC_VERSION=13.2.0 FLEX_VERSION=2.6.4 -ZLIB_VERSION=1.2.13 +ZLIB_VERSION=1.3 BZIP2_VERSION=1.0.8 BASH_VERSION=5.2.15 COREUTILS_VERSION=9.1 @@ -16,7 +16,7 @@ GRUB_VERSION=2.06 SHADOW_VERSION=4.6 SED_VERSION=4.9 GMP_VERSION=6.2.1 -MPFR_VERSION=4.2.0 +MPFR_VERSION=4.2.1 MPC_VERSION=1.3.1 NCURSES_VERSION=6.4 # 8.1: checking what tgetent() returns for an unknown terminal... configure: error: failed to compile test program. From 412ae12a3f46cbba145680b77528f81c4f8a4376 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 22 Oct 2023 15:22:32 -0600 Subject: [PATCH 2/4] Wrap branch argument in download_from_git in double quotes In GNU bash, version 5.1.16(1)-release from Ubuntu, [ -n ] evaluates to true. [ -n "" ] is false, however. This prevents the --branch argument from being added erroneously to git downloads from a fresh clone. --- download-funcs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download-funcs.sh b/download-funcs.sh index 9043abaa..45d815f1 100644 --- a/download-funcs.sh +++ b/download-funcs.sh @@ -61,7 +61,7 @@ download_from_git () { repo=$2 branch=$3 add_branch="" - if [ -n $branch ]; then + if [ -n "$branch" ]; then add_branch="--branch $branch" fi if [ -d $dir ]; then From b7bc89fcdc707ad32ae7ec73e557902fe92a16a0 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 22 Oct 2023 16:06:33 -0600 Subject: [PATCH 3/4] Add patch for grep on x86_64 https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=acb36717d8dd76b5cb755edc53aa5cea7f24db01 Delete the Changelog hunk from the patch, as it does not apply cleanly on non-master branches. --- download-funcs.sh | 3 ++ patches/grep/gnulib-hurd-x86_64.patch | 50 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 patches/grep/gnulib-hurd-x86_64.patch diff --git a/download-funcs.sh b/download-funcs.sh index 45d815f1..2faafb6b 100644 --- a/download-funcs.sh +++ b/download-funcs.sh @@ -212,6 +212,9 @@ download_grep () { return 0 fi unpack xf $GREP_PKG $GREP_SRC + pushd $GREP_SRC && + apply_patch $SCRIPT_DIR/patches/grep/gnulib-hurd-x86_64.patch 1 && + popd } download_gawk () { diff --git a/patches/grep/gnulib-hurd-x86_64.patch b/patches/grep/gnulib-hurd-x86_64.patch new file mode 100644 index 00000000..c5ffd1ff --- /dev/null +++ b/patches/grep/gnulib-hurd-x86_64.patch @@ -0,0 +1,50 @@ +From acb36717d8dd76b5cb755edc53aa5cea7f24db01 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Fri, 12 May 2023 21:28:47 +0200 +Subject: sigsegv: Add tentative support for Hurd/x86_64. + +Reported by Samuel Thibault . + +* lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386.h. +--- + ChangeLog | 6 ++++++ + lib/sigsegv.c | 20 +++++++++++++++++--- + 2 files changed, 23 insertions(+), 3 deletions(-) + +diff --git a/lib/sigsegv.c b/lib/sigsegv.c +index 5e943e4..aadba4e 100644 +--- a/lib/sigsegv.c ++++ b/lib/sigsegv.c +@@ -365,12 +365,26 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; + # define SIGSEGV_FAULT_ADDRESS (unsigned long) code + # define SIGSEGV_FAULT_CONTEXT scp + +-# if defined __i386__ ++# if defined __x86_64__ ++/* 64 bit registers */ ++ ++/* scp points to a 'struct sigcontext' (defined in ++ glibc/sysdeps/mach/hurd/x86_64/bits/sigcontext.h). ++ The registers, at the moment the signal occurred, get pushed on the stack ++ through gnumach/x86_64/locore.S:alltraps and then copied into the struct ++ through glibc/sysdeps/mach/hurd/x86/trampoline.c. */ ++/* sc_rsp is unused (not set by gnumach/x86_64/locore.S:alltraps). We need ++ to use sc_ursp. */ ++# define SIGSEGV_FAULT_STACKPOINTER scp->sc_ursp ++ ++# elif defined __i386__ ++/* 32 bit registers */ + + /* scp points to a 'struct sigcontext' (defined in + glibc/sysdeps/mach/hurd/i386/bits/sigcontext.h). +- The registers of this struct get pushed on the stack through +- gnumach/i386/i386/locore.S:trapall. */ ++ The registers, at the moment the signal occurred, get pushed on the stack ++ through gnumach/i386/i386/locore.S:alltraps and then copied into the struct ++ through glibc/sysdeps/mach/hurd/x86/trampoline.c. */ + /* Both sc_esp and sc_uesp appear to have the same value. + It appears more reliable to use sc_uesp because it is labelled as + "old esp, if trapped from user". */ +-- +cgit v1.1 + From 8351ba8eee30368c5e93af5bef295e87f8ac225b Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 22 Oct 2023 16:07:30 -0600 Subject: [PATCH 4/4] Bump grep to 3.11 --- package-versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-versions.sh b/package-versions.sh index 15bb9338..385ed880 100644 --- a/package-versions.sh +++ b/package-versions.sh @@ -25,7 +25,7 @@ VIM_VERSION=9.0 GPG_ERROR_VERSION=1.46 GCRYPT_VERSION=1.10.1 MAKE_VERSION=4.3 -GREP_VERSION=3.10 +GREP_VERSION=3.11 GAWK_VERSION=5.2.1 DASH_VERSION=0.5.12 LIBPCIACCESS_VERSION=0.17