From 4e4350e0481a9e4953e28ffa067f26bb7ebc498f Mon Sep 17 00:00:00 2001 From: termux-pacman-bot Date: Thu, 13 Nov 2025 07:06:43 +0000 Subject: [PATCH] fix(main/fish): prepend `@TERMUX_PREFIX@` to `/bin/sh` in two files - Fixes https://github.com/termux/termux-packages/issues/27210 - I searched through the code and did some calculations, and as far as I can tell, these two instances of `/bin/sh` seem to be the only ones that are highly likely to produce the error on affected devices. --- .../fish/0010-fix-some-absolute-paths.patch | 22 +++++++++++++++++++ packages/fish/build.sh | 1 + 2 files changed, 23 insertions(+) create mode 100644 packages/fish/0010-fix-some-absolute-paths.patch diff --git a/packages/fish/0010-fix-some-absolute-paths.patch b/packages/fish/0010-fix-some-absolute-paths.patch new file mode 100644 index 0000000000..6a1c9a18d6 --- /dev/null +++ b/packages/fish/0010-fix-some-absolute-paths.patch @@ -0,0 +1,22 @@ +--- a/share/functions/fish_update_completions.fish ++++ b/share/functions/fish_update_completions.fish +@@ -26,7 +26,7 @@ function fish_update_completions --description "Update man-page based completion + # Orphan the job so that it continues to run in case of an early exit (#6269) + # Note that some distros split the manpage completion script out (#7183). + # In that case, we silence Python's failure. +- /bin/sh -c ' ++ @TERMUX_PREFIX@/bin/sh -c ' + c=$(cat) + ( printf %s "$c" | "$@" ) >/dev/null 2>&1 & + ' -- $update_argv $argv +--- a/share/functions/help.fish ++++ b/share/functions/help.fish +@@ -228,7 +228,7 @@ chromium-browser + # The space before the /c is to prevent msys2 from expanding it to a path + $fish_browser " /c" start $page_url + else if contains -- $fish_browser[1] $graphical_browsers +- /bin/sh -c '( "$@" ) &' -- $fish_browser $page_url ++ @TERMUX_PREFIX@/bin/sh -c '( "$@" ) &' -- $fish_browser $page_url + else + $fish_browser $page_url + end diff --git a/packages/fish/build.sh b/packages/fish/build.sh index 2005d920d2..944c20a062 100644 --- a/packages/fish/build.sh +++ b/packages/fish/build.sh @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="The user-friendly command line shell" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="4.2.0" +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=6c43be5a9274963c06ba4cd55a109dfcc4d5d3a8054ed0e0a3666388581ec252 TERMUX_PKG_AUTO_UPDATE=true