From 557299b2bafee350e4d60a334990563c931fcf6a Mon Sep 17 00:00:00 2001 From: Giacomo Lorenzetti Date: Fri, 14 Nov 2025 17:37:12 +0100 Subject: IMPORTANT: version updates and improved portability Summary: this commit involves a major version update of many basic software and Gnuastro's major dependencies. So it may affect your configuration and analysis. Until now, the most recent software updates weren't properly tested on MacOS, causing the software configuration step to fail. In particular, the 'prep-source.sh' (that corrects any hard-coded '/bin/sh' within the unpacked tarballs of all software) as well as some issues in the 'tar', 'util-linux' and 'ghostscript' programs. These portability issues were found and fixed by Raul Infante-Sainz and Giacomo Lorenzetti. With this commit, those portability issues have been addressed while updating the following software. Also see notes below the list. High-level software: CFITSIO 4.5.0 --> 4.6.3 Ghostscript 10.04.0 --> 10.06.0 Gnuastro 0.23 --> 0.24 Util-linux 2.40.4 --> 2.41.3 WCSLIB 8.4 --> 8.5 Basic software: cURL 8.11.1 --> 8.17.0 GNU Bash 5.2.37 --> 5.3.9 GNU Binutils 2.43.1 --> 2.45.1 GNU Coreutils 9.6 --> 9.9 GNU Diffutils 3.10 --> 3.12 GNU AWK 5.3.1 --> 5.3.2 GNU GCC 14.2.0 --> 15.2.0 GNU Gettext 0.23.1 --> 0.26 GNU Grep 3.11 --> 3.12 GNU Gzip 1.13 --> 1.14 GNU Libunistring 1.3 --> 1.4.1 GNU M4 1.4.19 --> 1.4.20 GNU MPFR 4.2.1 --> 4.2.2 GNU Nano 8.3 --> 8.7 GNU Readline 8.2.13 --> 8.3.3 Git 2.48.1 --> 2.52.0 Less 668 --> 685 Libxml2 2.13.1 --> 2.15.1 OpenSSL 3.4.0 --> 3.6.0 Perl 5.40.1 --> 5.42.0 The latest versions of Bash and M4 were prepared for the new default C standard of GCC 15.*, so the '-std=gnu17' was removed for them. Also, while a new version of Dash was available, it would cause an issue when building in Apptainer, so it has been described in 'versions.conf' to be aware in the future updates. Libgit2 has been removed as a dependency of Gnuastro. The reason is fully described in the comment on top of Gnuastro's build rule in 'high-level.mk'. --- reproduce/software/shell/prep-source.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'reproduce/software/shell/prep-source.sh') diff --git a/reproduce/software/shell/prep-source.sh b/reproduce/software/shell/prep-source.sh index dcdc472..2545460 100755 --- a/reproduce/software/shell/prep-source.sh +++ b/reproduce/software/shell/prep-source.sh @@ -77,6 +77,20 @@ fi if [ -f "$bindir/bash" ]; then shpath="$bindir"/bash else shpath="$bindir"/dash fi + +# On MacOS the syntax for 'stat' is a bit different, so if we are using the +# system one on mac we need a specific syntax. The one installed by maneage +# instead uses the ordinary Linux syntax. +if [ -f "$bindir/stat" ] || [ x"$on_mac_os" = xno ]; then + format="--format %a" +else + format="-f %OLp" +fi + +# On MacOS 'touch' wants the time expressed according to ISO8601 with a +# precision up to the seconds. We then use 'sed' to remove the information +# regarding the timezone, as the format is not accepted by 'touch'. +# LCTYPE and LANG are also required on macos systems by sed. grep -I -r -e'/bin/sh' $(pwd)/* \ | sed -e's|:|\t|' \ | awk 'BEGIN{FS="\t"}{print $1}' \ @@ -84,8 +98,10 @@ grep -I -r -e'/bin/sh' $(pwd)/* \ | uniq \ | while read filename; do \ tmp="$filename".tmp; \ - origtime="$(date -R -r "$filename")"; \ - origperm=$(stat -c '%a' "$filename"); \ + origtimex="$(date -Iseconds -r "$filename")"; \ + origtime=$(echo $origtimex | sed 's/.\{6\}$//'); \ + origperm=$(stat $format "$filename"); \ + LC_CTYPE=C; LANG=C; \ sed -e's|/bin/sh|'"$shpath"'|g' "$filename" > "$tmp"; \ mv "$tmp" "$filename"; \ chmod $origperm "$filename"; \ -- cgit v1.2.1