summaryrefslogtreecommitdiff
path: root/app-shells/bash/files/bash-5.3-read-sys.patch
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-07-19 07:23:50 +0100
committerSam James <sam@gentoo.org>2025-07-19 07:25:11 +0100
commit13f99b290375495333323b9a91c615c01fbf334f (patch)
tree5519a41453abe7fc67b50c477e12f04b5a8fffd1 /app-shells/bash/files/bash-5.3-read-sys.patch
parent85ae6ca6e0f56fc8762a84efaf0a47d7824e1076 (diff)
downloadgentoo-13f99b290375495333323b9a91c615c01fbf334f.tar.gz
gentoo-13f99b290375495333323b9a91c615c01fbf334f.tar.bz2
gentoo-13f99b290375495333323b9a91c615c01fbf334f.zip
app-shells/bash: fix two issues in 5.3
* Fix sourcing files from /sys (which affects sys-kernel/ugrd) I pulled this one out of a 'devel' push. Note https://lists.gnu.org/archive/html/bug-readline/2025-07/msg00001.html wrt Chet not discouraging such cherry-picking. Thanks to zen_desu for confirming it fixes the ugrd issue too. * Fix crash w/ empty PROMPT_COMMAND Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-shells/bash/files/bash-5.3-read-sys.patch')
-rw-r--r--app-shells/bash/files/bash-5.3-read-sys.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-5.3-read-sys.patch b/app-shells/bash/files/bash-5.3-read-sys.patch
new file mode 100644
index 000000000000..9491d727cced
--- /dev/null
+++ b/app-shells/bash/files/bash-5.3-read-sys.patch
@@ -0,0 +1,19 @@
+Extracted from https://cgit.git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=01070d43248fb97f3b2a08d780ae5a392573ce34
+(note https://lists.gnu.org/archive/html/bug-readline/2025-07/msg00001.html wrt Chet not discouraging
+such cherry-picking)
+
+https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00031.html
+https://github.com/desultory/ugrd/pull/328
+--- builtins/evalfile.c
++++ builtins/evalfile.c
+@@ -160,8 +160,10 @@ file_error_and_exit:
+ nr = read (fd, string, file_size);
+ if (nr >= 0)
+ string[nr] = '\0';
++#if 0
+ if (nr != file_size)
+ nr = -1; /* XXX - didn't get the whole file */
++#endif
+ }
+ else
+ nr = zmapfd (fd, &string, 0);