diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-09-25 19:33:39 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-09-28 08:31:11 +0100 |
commit | ad6182343997a405079870a2fe91c4e0c6b94595 (patch) | |
tree | 4aa7483cd0ad7de54338afc8e7971417abe1dd81 /app-shells/bash | |
parent | e8f81810baa21f490d6910e8e2d424546b72a333 (diff) |
gentoo resync : 25.09.2019
Diffstat (limited to 'app-shells/bash')
-rw-r--r-- | app-shells/bash/Manifest | 11 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-afs.patch | 20 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-crash.patch | 46 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-histtimeformat.patch | 56 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-jobs.patch | 56 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-locale.patch | 112 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-manpage.patch | 15 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-multibyteifs.patch | 281 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-pwd.patch | 16 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-subshell.patch | 39 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-ulimit.patch | 186 | ||||
-rw-r--r-- | app-shells/bash/files/bash-3.0-volatile-command.patch | 16 |
12 files changed, 854 insertions, 0 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest index 2b6e9fe31047..21b735cf8381 100644 --- a/app-shells/bash/Manifest +++ b/app-shells/bash/Manifest @@ -7,14 +7,25 @@ AUX bash-2.05b-jobs.patch 813 BLAKE2B fc4818d90298b58a5a9062ed3a5ebe6a7d0ec8970a AUX bash-2.05b-parallel-build.patch 426 BLAKE2B 621b7a0fc43e4dbcabbdd052e0dc4a79082d317dbd0413a980479608e7df6cacf87484d21f63c84119d3532ed5017ec1bdc6b11460bf86481c7026241e748784 SHA512 1ae173412ef3dad6b874cf6461479a0291e8dce2b0f1464450d41cc5a1e833e66860d7c2ed5c14e55fd082a95fdfa6164ae677aff0192fd2e02f1eedafe06992 AUX bash-2.05b-protos.patch 692 BLAKE2B 2b6d4290a6b94d98d2579eaf3f1fac4229321e7032ef34915128d879c2e4bfdaca57e37702cd8665ffac28bc51e4b2eb3d713a77ca600a833269f26fe44e1551 SHA512 77a5d48d629cd127db6f7163fd9ee4e67c22b92007cb5e9fc9f51c83427f809dd74f176a521a7d8e342127419c872c01e29b921f48cea5cb8e788ff5f51faaa1 AUX bash-2.05b-rbash.patch 616 BLAKE2B 9c943a1987a3558735aa9d7edfb74a5a0cf6bc8be956194d6457f9e0dae8ff4050e916eabda834a2f418c03327bec2039e11837229815c1bf200dd3ded1b62f2 SHA512 bc4a6132a36b65794843930e34abd199d9c5df7838c49ec3edf47f92e0f09877a31df051689a8267eaadfbb743934c2f4f25ab8a2ca07d1561dd6ec8c337a53f +AUX bash-3.0-afs.patch 633 BLAKE2B 078765894c95e242feaa2d86f0613989a20b9550f6c29081445107834e60a17be4bd9b048a638bba627763ca0dd239956daef1d167b54193a5e0675b473203d6 SHA512 833515f5b4040ffb7e65b410aa860da73a2bf1d9b4da7ea74ec41581fcb27b0ebafdcbb041abf4c1cebaa3d7b43ee6ea11f7c7ecec5759530ce0184ac6029f3f +AUX bash-3.0-crash.patch 1191 BLAKE2B 32fcfcc8cea44ecbdc3d574a80ec38eba3886ef45983e64529e6be575a63d4f57c5cf6a6c84754b741b7af190f083b5a326c1afc4025e140bd1fd52133bf22bd SHA512 e9fa172d76e1a3924c4795b7bb26a0487ab50f2d0714178076b6b9f85d7712ffeb4165bd591cac97c4c2288e39fa2bdf3794f29a7f2fd28e2d971041d16ff0a5 AUX bash-3.0-darwin-conn.patch 969 BLAKE2B 0a2dd39b1a1df5888cf03bc1cf59e17a7b0fc09334a13125ec385849ba21be45638e25c9d375e48db7aff3bba3c1844eae54925e75c937789e88128c39c0fc7a SHA512 cc85dbf39df3289e40ba33626d2a0ad511145ea3cc8dcbed136ad128181022bd70c3a4f7f8e3146bcd027d7999deefefe8496d5eb70ff1a70235950a01f9376f +AUX bash-3.0-histtimeformat.patch 1784 BLAKE2B 10c9bae29f06832474dbfe038bae5e4b99dce795c7c04360a2813cba2962d86f44af53599d7b4ab3687c0378c9f9d910f4659444caea828c063a368caa9e4a29 SHA512 36ce1afa92707a4c43f212119fb2562fee0f1283bee94d892869611de1f34869b1dcf737746ac1887c1ee8165079bdb4ae6cb353a3cbefdf1cbbffb8b43a23e6 +AUX bash-3.0-jobs.patch 1438 BLAKE2B 1107d79b268df413c6ae03e4522f804f32bda4b9c98199e47eb45a1a4af69e1d31fd043b686cb048b310a3e9e36db46db5eee1574fbb649fe06b9395409f19c0 SHA512 d52b64f989e82f45c0305233333d2b004afb3ceda232a2144a56a21310b91749009d89639e323b4b63dcf92aff27c29d425af7e62ff9de9b164072669693ded0 +AUX bash-3.0-locale.patch 3492 BLAKE2B cec73c4f807172da52406a21cbdbd630449709aab4d51ea5a969065595eb339576cbb456dc62b6c0aae92a888498810c349e88c4abbeebfa355b401c397eeb7a SHA512 c216b5877eb87660f5f3309280b9852917dad50936261d22611fa7a0f5e26a2efb7383fc13884105fd0798c6576f203396f185e8441a14f03067d5aed6e3f6b3 +AUX bash-3.0-manpage.patch 498 BLAKE2B 6e1d4b03fc3f62e6021b0a79ed0955ea268d8fdf384a7211869f6806b891e5516bceabb13f3c044edaf182141bcbaccbdd3e3717bc0ca961023e8b7fa4ef937c SHA512 2492344828ad51d52dc4591b0df9e45e38904f5fc1bc6408b14815cf8809641b218c030cca0d830ddf3b18776bbc99e76aa0035b15e6e966ff1aa0a7914121fd +AUX bash-3.0-multibyteifs.patch 6099 BLAKE2B 377cfffa517f316ba866e7adcf986dd92b8ef859a6f46a622b97f92694b3e1d5061bf2039c061c0878555f10144fb6e4c81e06b9045697c1587d1e3e5fe2f5ce SHA512 3c0a5e565dc1f0b38172d6417eded435b1d5482eb8d33beb850b53178130e7d08e1cd6051a08aa93c845902c0ad5d688f8a74671222eb269cae6bddf33a99342 AUX bash-3.0-pgrp-pipe-fix.patch 462 BLAKE2B f9c13a14cbd5d34ca2bfc7838d64df21757527569088c419ee9d123e9338f4f0564d63810d224b133a15e2bddf48709297324fb728e9b0c08d4b694238d1c026 SHA512 9d5e647407fd66a8c285568d6af8a171a8cc327b22c08ed903eb783b8a3978e5117ff1a0f4798550a0e4d519347d7068b548377fb60bcf5eff16dfb92aa11d67 AUX bash-3.0-protos.patch 1618 BLAKE2B a11aea928e0ec54e239834959714c96c0e3746ad9d8a2941f42bc12b7e257e8077be22e42ed744253871e19a21b2cd4e5ec8008b4e0599f19b2300142f2cd672 SHA512 b129beb6d0e8df83bcd1a2f8a4e56f60fa1d7566355a7ba73cbb4c267f074ce5aa8f5abd5da8bc45529b6101dd3111e3b427d49abe6d64b370704e9608ace099 +AUX bash-3.0-pwd.patch 717 BLAKE2B a834beb35b89f7b058d80fa06710ceb78bdf64214ea5a2a903e7afb6d05cfcd5b4b71f0cc3f3e4e2b9a1b13d10511bf6fd9eb1eaa1c45d224dbe9766dd3598ba SHA512 3766c9efab53754292227c21074e0fa176924956664eaa5d33ef562d14e864ac0c06fe0f03a565b0ade0bcbc0c97ec8a532ee7a31567dcca34cf84978f7ab805 AUX bash-3.0-rbash.patch 405 BLAKE2B 0e35d1aa7a674c4def64c6dedecfb402fe6842c742f4df77312d4057959b7864e3c79f242bbc15108908e99077c34ed1e3cd63509a814e8f1ddcd31d306d473d SHA512 b247afab23cef742ec48c19012b79da52c1f1386cdc256a237742cc04f9ce64835a42f833b67ac5ed60424672484e6ffb262d5c80e253290062e21ce39357348 AUX bash-3.0-read-builtin-pipe.patch 689 BLAKE2B 2189d76b5470feb845482e6598b78e78f23f2212f33286ad6dd27d00d687828702b2290bc3941294a1bb312aaab6d409b317064ce7e319ece5f6c529fc7766dc SHA512 f89717f0b33311a491c3e2e80ac75000a7b92f78febf986324a351107b71dafdeda8bdd3d5c292fb82798355fc21d5d562305ea759815a32bc0e7b1772f8c4d3 AUX bash-3.0-read-memleak.patch 416 BLAKE2B 4fc13e44b5dcc7a3a76dcdfcc3e2d17904ce9ebc46c88a21b3b7142b1301bdf9518582a81256e582adf468caf0c4d68aa77d5e6e6d66d39b3d152a34512fa1cf SHA512 97361f9e14e2547a67da475a0bfd20c1be70534d745845d4918e98665d4182da231923c8365f881561db63b90d5e40def1f1b7f0bc98016c8d8c2e8aeb4e4407 AUX bash-3.0-strnlen.patch 4976 BLAKE2B 9cde9d95df2b815071ea7aaafc9f59a98577b1302c76bc643a56d23bcae75e3f75083acfa043bbbd8abbce97b08ed6ae00f7f069c4ec495a966369388984f407 SHA512 390845441ad608d0938ca8ed5f9f06f28e6fe45462864072c19b3af302cc6cdb0a7f4fa9f0ee4dadc3ed19a73e06457044be47ad9c327a81f3de4ed7bb70aaf3 +AUX bash-3.0-subshell.patch 1219 BLAKE2B 2171bb8885dc2a5070cc7138e0999e615fd4982f0fa4a390acc8ef6877cd3ab896d676dfe0c2fc78d0436fa41b6765e159baa2953874257b01523b50d300e8ac SHA512 ede172d08b8220f44ba12f803285192b82a505d4d2549914ef563c66d6f19c3a14acd5af3f30fe096dc6c360e9aef71b89f23c468e55c06e61be19d6ce17a68f AUX bash-3.0-trap-fg-signals.patch 641 BLAKE2B d713ee86241c8c2ddd5eb704f6ecbb2dbb0bd43e3eee3520e4749aebf1507438866507f5d68864d30117ed2ccc5e6b42f673e7e0b35f267e4f43f69536c1a9df SHA512 5644591aaaf6a2f5e5fa4d41aa4e26c5d53e2efe6ad5838729a2da709e04c539a4a83325f707269d59b5aa0609130dc888ada0b9ec96fe85536800218de8ad6d +AUX bash-3.0-ulimit.patch 5226 BLAKE2B 23ce5aee0854df8b19d885d8b51df828dd7d40ba6f67956ada76de6abb590d166e79977f0ce1bdda32937358a0626b21dd37df7c96ef95b064b866829fa8ccca SHA512 1cbf210ceb840a959530506777dc4ffb34862ec6f1bc4b65a68c77c8b1b3ce02168d7283dad8d64e218169125d041a25c4e604c3a4327ceee53f806d77067011 +AUX bash-3.0-volatile-command.patch 512 BLAKE2B 6817f943f165a40c032a31aa3e57b40f3db250baf00349376c9238a252908c86976beea9841e3d5dd09839e5881cbf2d164fba9a2b3365f825560e388f2aad2c SHA512 55511691ed6880d58b54e2ce24d5fe14be2dc1ab8cc3d8ed25068dd8f831202958b7f470b361a294a05c3f202e5df6304cf54978c04dc71e915a959fad218223 AUX bash-3.1-dev-fd-buffer-overflow.patch 557 BLAKE2B ef7874e23012e051673b695a96f8be714834e43f2e282f5591e1b6b50e99edaebce585e784623a8b74a018301fdee3a5bcf425c4c480767d550b2c793c3388fb SHA512 3db03dc6e8c5fd9542788cb84854a0849a0f87ff07e95adf57aaee21c7edcb1293ae47ad8b83e0e0513431ba9826fcb45b847ccd9d87efb32b91ac7fc0cb415e AUX bash-3.1-dev-fd-test-as-user.patch 437 BLAKE2B 1a235dc6192e3f9de5779768151b6dba34e57d0eb0875db36001943023d7813facb4cf46916105fca2d64bcba3c3ef325fc265771aad5093b2f048563d03bca5 SHA512 eb9907741b68513c53128221c240a1325735c1ceec2a4ac0df74ed85126404c3347a3d97181ada5b28686e17600653de9dfadfa9985812049de45741c81876b7 AUX bash-3.1-fix-dash-login-shell.patch 1749 BLAKE2B ae26669a67196265fc301f0372b050bf74386288a128469647c31731aded2e7607c20dc41c1dbe404b423b1f464e646756d770ff7f9bd5974dca75d5f288e29c SHA512 f1ec4e9e6c119cba8d7df35d3cdb53b8bcf990b8577d0488a750dfdbd6781413981d2939ff3995977706ed927284aa0049ce36f64a126d6375fbed1210affb7d diff --git a/app-shells/bash/files/bash-3.0-afs.patch b/app-shells/bash/files/bash-3.0-afs.patch new file mode 100644 index 000000000000..f07371c39eb4 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-afs.patch @@ -0,0 +1,20 @@ +Ripped from Fedora + +- Fixed AFS support for output redirection, so that the correct errors + are reported for other filesystems (bug #155373). + +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155373 + +--- bash-3.0/redir.c.afs 2005-04-20 09:16:15.000000000 +0100 ++++ bash-3.0/redir.c 2005-04-20 09:16:58.000000000 +0100 +@@ -596,7 +596,9 @@ + fd = open (filename, flags, mode); + #if defined (AFS) + if ((fd < 0) && (errno == EACCES)) +- fd = open (filename, flags & ~O_CREAT, mode); ++ if ((fd = open (filename, flags & ~O_CREAT, mode)) < 0) ++ /* Restore previous errno. */ ++ errno = EACCES; + #endif /* AFS */ + } + diff --git a/app-shells/bash/files/bash-3.0-crash.patch b/app-shells/bash/files/bash-3.0-crash.patch new file mode 100644 index 000000000000..984e85d82ed3 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-crash.patch @@ -0,0 +1,46 @@ +> Machine Type: i686-pc-linux-gnu +> +> Bash Version: 3.0 +> Patch Level: 0 +> Release Status: release +> +> Description: +> GNU bash, version 3.00.0(1)-release (i686-pc-linux-gnu) +> (and +> GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu) +> +> dumps a core because of a null pointer "in make_bare_word +> at make_cmd.c:90" (see gdb output below) + +Thanks for the report. Here's a quick fix: + +*** arrayfunc.c~ Sat Nov 6 15:08:29 2004 +--- arrayfunc.c Mon Jan 31 11:56:21 2005 +*************** +*** 709,713 **** + return ((char *)NULL); + } +! else if (var == 0) + return ((char *)NULL); + else if (array_p (var) == 0) +--- 709,713 ---- + return ((char *)NULL); + } +! else if (var == 0 || value_cell (var) == 0) + return ((char *)NULL); + else if (array_p (var) == 0) + + +Chet + +-- +``The lyf so short, the craft so long to lerne.'' - Chaucer +( ``Discere est Dolere'' -- chet ) + Live...Laugh...Love +Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/ + + +_______________________________________________ +Bug-bash mailing list +Bug-bash@gnu.org +http://lists.gnu.org/mailman/listinfo/bug-bash diff --git a/app-shells/bash/files/bash-3.0-histtimeformat.patch b/app-shells/bash/files/bash-3.0-histtimeformat.patch new file mode 100644 index 000000000000..b910600fd896 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-histtimeformat.patch @@ -0,0 +1,56 @@ +Ripped from Debian + +http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00008.html + +From: Enrique Perez-Terron <enrio@online.no> +To: bug-bash@gnu.org +Subject: When using HISTTIMEFORMAT, the date and the command are run + together. +Date: Sun, 01 Aug 2004 18:36:45 +0200 + +Configuration Information [Automatically generated, do not change]: +Machine: i586 +OS: linux-gnu +Compiler: gcc +Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' +-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu' +-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' +-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib +-g -O2 +uname output: Linux arabia.home.lan 2.6.6-1.435.2.3 #1 Thu Jul 1 +09:11:28 EDT 2004 i586 i586 i386 GNU/Linux +Machine Type: i586-pc-linux-gnu + +# DP: Add space separating the time and the command in the +# DP: output from the history builtin command. + +Bash Version: 3.0 +Patch Level: 0 +Release Status: release + +Description: + There is no space separating the time and the command in the + output from the history builtin command. + +Repeat-By: + $ export HISTTIMEFORMAT=_A_format_string_ + $ history 3 + 997 _A_format_string_echo $BASH_VERSION + 998 _A_format_string_export HISTTIMEFORMAT=_A_format_string_ + 999 _A_format_string_history 3 + +Fix: +--- ./builtins/history.def.orig 2003-12-20 00:02:09.000000000 +0100 ++++ ./builtins/history.def 2004-08-01 18:18:02.652720102 +0200 +@@ -287,9 +287,10 @@ + QUIT; + + timestr = (histtimefmt && *histtimefmt) ? histtime (hlist[i], histtimefmt) : (char *)NULL; +- printf ("%5d%c %s%s\n", i + history_base, ++ printf ("%5d%c %s%s%s\n", i + history_base, + histdata(i) ? '*' : ' ', + ((timestr && *timestr) ? timestr : ""), ++ ((timestr && *timestr) ? " " : ""), + histline(i)); + i++; + } diff --git a/app-shells/bash/files/bash-3.0-jobs.patch b/app-shells/bash/files/bash-3.0-jobs.patch new file mode 100644 index 000000000000..72c149c71cf5 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-jobs.patch @@ -0,0 +1,56 @@ +Ripped from Fedora + +* Wed Sep 8 2004 Tim Waugh <twaugh@redhat.com> 3.0-13 +- Check for EINVAL from waitpid() and avoid WCONTINUED in that case. +- Fixed jobs4 test. + +From: Tim Waugh +Subject: [patch] bash-3.0: avoid WCONTINUED if invalid +Date: Wed, 8 Sep 2004 16:52:38 +0100 +User-agent: Mutt/1.4.1i + +Hi, + +GNU libc defines WCONTINUED, but (at least on Linux 2.4.x kernels) +waitpid() returns -1 with errno set to EINVAL if WCONTINUED is +supplied in options. + +Here is a patch to retry without WCONTINUED set in that case. + +Tim. + +--- bash-3.0/tests/jobs4.sub ++++ bash-3.0/tests/jobs4.sub +@@ -18,5 +18,5 @@ + + wait + +-cat & ++sleep 100 & + kill -1 %% && echo i killed it || echo could not kill it +--- bash-3.0/jobs.c ++++ bash-3.0/jobs.c +@@ -2475,6 +2475,7 @@ + PROCESS *child; + pid_t pid; + int call_set_current, last_stopped_job, job, children_exited, waitpid_flags; ++ static int wcontinued_not_supported = 0; + + call_set_current = children_exited = 0; + last_stopped_job = NO_JOB; +@@ -2488,7 +2489,15 @@ + : 0; + if (sigchld || block == 0) + waitpid_flags |= WNOHANG; ++ retry: ++ if (wcontinued_not_supported) ++ waitpid_flags &= ~WCONTINUED; + pid = WAITPID (-1, &status, waitpid_flags); ++ if (pid == -1 && errno == EINVAL) ++ { ++ wcontinued_not_supported = 1; ++ goto retry; ++ } + + /* The check for WNOHANG is to make sure we decrement sigchld only + if it was non-zero before we called waitpid. */ diff --git a/app-shells/bash/files/bash-3.0-locale.patch b/app-shells/bash/files/bash-3.0-locale.patch new file mode 100644 index 000000000000..ea1ef3deae36 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-locale.patch @@ -0,0 +1,112 @@ +Ripped from SuSe + +http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00005.html + +From: schwab@suse.de +To: bug-bash@gnu.org +Subject: HISTTIMEFORMAT doesn't track locale changes +Date: Sun, 1 Aug 2004 11:14:00 +0200 (CEST) + +Configuration Information [Automatically generated, do not change]: +Machine: ia64 +OS: linux-gnu +Compiler: gcc +Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='ia64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash-3.0 -I../bash-3.0/include -I../bash-3.0/lib -O2 -g +uname output: Linux sykes 2.6.5-22-default #1 SMP Fri Jul 2 13:43:23 UTC 2004 ia64 ia64 ia64 GNU/Linux +Machine Type: ia64-unknown-linux-gnu + +Bash Version: 3.0 +Patch Level: 0 +Release Status: release + +Description: +Bash doesn't use the current locale when formatting HISTTIMEFORMAT. + +Repeat-By: +sykes:/tmp/bash/Build/:[0]$ locale +LANG=de_DE.UTF-8 +LC_CTYPE="de_DE.UTF-8" +LC_NUMERIC=POSIX +LC_TIME=POSIX +LC_COLLATE=POSIX +LC_MONETARY="de_DE.UTF-8" +LC_MESSAGES=en_US.UTF-8 +LC_PAPER="de_DE.UTF-8" +LC_NAME="de_DE.UTF-8" +LC_ADDRESS="de_DE.UTF-8" +LC_TELEPHONE="de_DE.UTF-8" +LC_MEASUREMENT="de_DE.UTF-8" +LC_IDENTIFICATION="de_DE.UTF-8" +LC_ALL= +sykes:/tmp/bash/Build/:[0]$ history 1 + 1502 history 1 +sykes:/tmp/bash/Build/:[0]$ HISTTIMEFORMAT=%c +sykes:/tmp/bash/Build/:[0]$ history 1 + 1504 Sun Aug 1 10:56:59 2004history 1 +sykes:/tmp/bash/Build/:[0]$ export LC_TIME=$LANG +sykes:/tmp/bash/Build/:[0]$ history 1 + 1506 Sun Aug 1 10:57:24 2004history 1 + +--- bash-3.0/locale.c ++++ bash-3.0/locale.c +@@ -71,9 +71,10 @@ set_default_locale () + textdomain (PACKAGE); + } + +-/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES and LC_NUMERIC +- if they are not specified in the environment, but LC_ALL is. This +- should be called from main() after parsing the environment. */ ++/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC ++ and LC_TIME if they are not specified in the environment, but LC_ALL ++ is. This should be called from main() after parsing the ++ environment. */ + void + set_default_locale_vars () + { +@@ -109,6 +110,12 @@ set_default_locale_vars () + setlocale (LC_NUMERIC, lc_all); + # endif /* LC_NUMERIC */ + ++# if defined (LC_TIME) ++ val = get_string_value ("LC_TIME"); ++ if (val == 0 && lc_all && *lc_all) ++ setlocale (LC_TIME, lc_all); ++# endif /* LC_TIME */ ++ + #endif /* HAVE_SETLOCALE */ + + val = get_string_value ("TEXTDOMAIN"); +@@ -213,6 +220,13 @@ set_locale_var (var, value) + return (setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")) != 0); + # endif /* LC_NUMERIC */ + } ++ else if (var[3] == 'T' && var[4] == 'I') /* LC_TIME */ ++ { ++# if defined (LC_TIME) ++ if (lc_all == 0 || *lc_all == '\0') ++ return (setlocale (LC_TIME, get_locale_var ("LC_TIME")) != 0); ++# endif /* LC_TIME */ ++ } + #endif /* HAVE_SETLOCALE */ + + return (0); +@@ -285,6 +299,9 @@ reset_locale_vars () + # if defined (LC_NUMERIC) + setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC")); + # endif ++# if defined (LC_TIME) ++ setlocale (LC_TIME, get_locale_var ("LC_TIME")); ++# endif + + locale_setblanks (); + +--- bash-3.0/variables.c ++++ bash-3.0/variables.c +@@ -3646,6 +3646,7 @@ static struct name_and_function special_ + { "LC_CTYPE", sv_locale }, + { "LC_MESSAGES", sv_locale }, + { "LC_NUMERIC", sv_locale }, ++ { "LC_TIME", sv_locale }, + + { "MAIL", sv_mail }, + { "MAILCHECK", sv_mail }, diff --git a/app-shells/bash/files/bash-3.0-manpage.patch b/app-shells/bash/files/bash-3.0-manpage.patch new file mode 100644 index 000000000000..08e3143e5422 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-manpage.patch @@ -0,0 +1,15 @@ +Ripped from Fedora + +fix obvious display bug + +--- bash-3.0/doc/bash.1 ++++ bash-3.0/doc/bash.1 +@@ -3929,7 +3929,7 @@ + .B SIGHUP + to all jobs when an interactive login shell exits. + .PP +-If \Bbash\fP is waiting for a command to complete and receives a signal ++If \fBbash\fP is waiting for a command to complete and receives a signal + for which a trap has been set, the trap will not be executed until + the command completes. + When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP diff --git a/app-shells/bash/files/bash-3.0-multibyteifs.patch b/app-shells/bash/files/bash-3.0-multibyteifs.patch new file mode 100644 index 000000000000..1e74832b638a --- /dev/null +++ b/app-shells/bash/files/bash-3.0-multibyteifs.patch @@ -0,0 +1,281 @@ +From: Tim Waugh <twaugh@redhat.com> +To: bug-bash@gnu.org +Subject: [patch] multibyte IFS values +Date: Tue, 24 Aug 2004 13:34:59 +0100 + +Hi, + +Here is a patch to address these problems: + +http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00294.html +http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00296.html + +It works well for me at least. + +Tim. + +--- bash-3.0/subst.c.multibyteifs 2004-08-20 15:22:48.366497771 +0100 ++++ bash-3.0/subst.c 2004-08-20 18:13:30.833624616 +0100 +@@ -124,7 +124,12 @@ + SHELL_VAR *ifs_var; + char *ifs_value; + unsigned char ifs_cmap[UCHAR_MAX + 1]; ++#if defined (HANDLE_MULTIBYTE) ++unsigned char ifs_firstc[MB_LEN_MAX]; ++size_t ifs_firstc_len; ++#else + unsigned char ifs_firstc; ++#endif + + /* Extern functions and variables from different files. */ + extern int last_command_exit_value, last_command_exit_signal; +@@ -862,8 +867,14 @@ + char *charlist; + { + register int i = *sindex; ++ size_t slen; ++#if defined (HANDLE_MULTIBYTE) ++ size_t clen; ++ wchar_t *wcharlist = NULL; ++#endif + int c; + char *temp; ++ DECLARE_MBSTATE; + + if (charlist[0] == '\'' && charlist[1] == '\0') + { +@@ -872,18 +883,65 @@ + return temp; + } + +- for (i = *sindex; c = string[i]; i++) ++ slen = strlen (string + *sindex) + *sindex; ++ i = *sindex; ++#if defined (HANDLE_MULTIBYTE) ++ clen = strlen (charlist); ++#endif ++ while ((c = string[i])) + { ++#if defined (HANDLE_MULTIBYTE) ++ size_t mblength; ++#endif ++ + if (c == CTLESC) + { +- i++; ++ i += 2; + continue; + } + ++#if defined (HANDLE_MULTIBYTE) ++ mblength = mblen (string + i, slen - i); ++ if (mblength > 1) ++ { ++ wchar_t wc; ++ size_t mblength = mbtowc (&wc, string + i, slen - i); ++ if (MB_INVALIDCH (mblength)) ++ { ++ if (MEMBER (c, charlist)) ++ break; ++ } ++ else ++ { ++ if (!wcharlist) ++ { ++ size_t len = mbstowcs (wcharlist, charlist, 0); ++ if (len == -1) ++ len = 0; ++ wcharlist = xmalloc (sizeof (wchar_t) * (len + 1)); ++ mbstowcs (wcharlist, charlist, 1 + len); ++ } ++ ++ if (wcschr (wcharlist, wc)) ++ { ++ break; ++ } ++ } ++ } ++ else ++#endif ++ + if (MEMBER (c, charlist)) + break; ++ ++ ADVANCE_CHAR (string, slen, i); + } + ++#if defined (HANDLE_MULTIBYTE) ++ if (wcharlist) ++ free (wcharlist); ++#endif ++ + temp = substring (string, *sindex, i); + *sindex = i; + +@@ -1456,11 +1514,36 @@ + d2 = 0; + if (delims) + { +- d2 = (char *)xmalloc (strlen (delims) + 1); +- for (i = ts = 0; delims[i]; i++) ++ size_t slength = strlen (delims); ++#if defined (HANDLE_MULTIBYTE) ++ size_t mblength = 1; ++ DECLARE_MBSTATE; ++#endif ++ ++ d2 = (char *)xmalloc (slength + 1); ++ i = ts = 0; ++ while (delims[i]) + { ++#if defined (HANDLE_MULTIBYTE) ++ mbstate_t state_bak = state; ++ mblength = mbrlen (delims + i, slength, &state); ++ ++ if (MB_INVALIDCH (mblength)) ++ state = state_bak; ++ else if (mblength != 1) ++ { ++ memcpy (d2 + ts, delims + i, mblength); ++ ts += mblength; ++ i += mblength; ++ slength -= mblength; ++ continue; ++ } ++#endif ++ + if (whitespace(delims[i]) == 0) + d2[ts++] = delims[i]; ++ i++; ++ slength--; + } + d2[ts] = '\0'; + } +@@ -1654,10 +1737,19 @@ + string_list_dollar_star (list) + WORD_LIST *list; + { ++#if defined (HANDLE_MULTIBYTE) ++ char sep[MB_CUR_MAX + 1]; ++#else + char sep[2]; ++#endif + ++#if defined (HANDLE_MULTIBYTE) ++ memcpy (sep, ifs_firstc, ifs_firstc_len); ++ sep[ifs_firstc_len] = '\0'; ++#else + sep[0] = ifs_firstc; + sep[1] = '\0'; ++#endif + + return (string_list_internal (list, sep)); + } +@@ -1676,14 +1768,41 @@ + WORD_LIST *list; + int quoted; + { +- char *ifs, sep[2]; ++ char *ifs; ++#if defined (HANDLE_MULTIBYTE) ++ char sep[MB_CUR_MAX + 1]; ++#else ++ char sep[2]; ++#endif + WORD_LIST *tlist; + + /* XXX this could just be ifs = ifs_value; */ + ifs = ifs_var ? value_cell (ifs_var) : (char *)0; + ++#if defined (HANDLE_MULTIBYTE) ++ if (ifs && *ifs) ++ { ++ size_t mblength = mblen (ifs, strnlen (ifs, MB_CUR_MAX)); ++ if (MB_INVALIDCH (mblength)) ++ { ++ sep[0] = *ifs; ++ sep[1] = '\0'; ++ } ++ else ++ { ++ memcpy (sep, ifs, mblength); ++ sep[mblength] = '\0'; ++ } ++ } ++ else ++ { ++ sep[0] = ' '; ++ sep[1] = '\0'; ++ } ++#else + sep[0] = (ifs == 0 || *ifs == 0) ? ' ' : *ifs; + sep[1] = '\0'; ++#endif + + tlist = ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (ifs && *ifs == 0)) + ? quote_list (list) +@@ -1732,6 +1851,7 @@ + WORD_DESC *t; + char *current_word, *s; + int sindex, sh_style_split, whitesep; ++ size_t slen = 0; + + if (!string || !*string) + return ((WORD_LIST *)NULL); +@@ -1805,7 +1925,12 @@ + + /* Move past the current separator character. */ + if (string[sindex]) +- sindex++; ++ { ++ DECLARE_MBSTATE; ++ if (!slen) ++ slen = strlen (string); ++ ADVANCE_CHAR (string, slen, sindex); ++ } + + /* Now skip sequences of space, tab, or newline characters if they are + in the list of separators. */ +@@ -6796,7 +6921,27 @@ + ifs_cmap[uc] = 1; + } + ++#if defined (HANDLE_MULTIBYTE) ++ if (!ifs_value) ++ { ++ ifs_firstc[0] = '\0'; ++ ifs_firstc_len = 1; ++ } ++ else ++ { ++ size_t ifs_len = strnlen (ifs_value, MB_CUR_MAX); ++ ifs_firstc_len = mblen (ifs_value, ifs_len); ++ if (MB_INVALIDCH (ifs_firstc_len)) ++ { ++ ifs_firstc[0] = '\0'; ++ ifs_firstc_len = 1; ++ } ++ else ++ memcpy (ifs_firstc, ifs_value, ifs_firstc_len); ++ } ++#else + ifs_firstc = ifs_value ? *ifs_value : 0; ++#endif + } + + char * +--- bash-3.0/subst.h.multibyteifs 2004-08-20 15:51:08.301074583 +0100 ++++ bash-3.0/subst.h 2004-08-20 15:51:39.070206473 +0100 +@@ -231,7 +231,12 @@ + extern SHELL_VAR *ifs_var; + extern char *ifs_value; + extern unsigned char ifs_cmap[]; ++#if defined (HANDLE_MULTIBYTE) ++extern unsigned char ifs_firstc[]; ++extern size_t ifs_firstc_len; ++#else + extern unsigned char ifs_firstc; ++#endif + + /* Evaluates to 1 if C is a character in $IFS. */ + #define isifs(c) (ifs_cmap[(unsigned char)(c)] != 0) diff --git a/app-shells/bash/files/bash-3.0-pwd.patch b/app-shells/bash/files/bash-3.0-pwd.patch new file mode 100644 index 000000000000..77f0918fb4d8 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-pwd.patch @@ -0,0 +1,16 @@ +Ripped from Fedora + +* Tue Mar 15 2005 Tim Waugh <twaugh@redhat.com> 3.0-30 +- Fix PS1 expansion crash when PWD is unset (bg #151116). + +--- bash-3.0/parse.y.pwd 2005-03-15 14:22:36.000000000 +0000 ++++ bash-3.0/parse.y 2005-03-15 14:22:37.000000000 +0000 +@@ -4103,7 +4103,7 @@ + #define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0) + #define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0) + /* Abbreviate \W as ~ if $PWD == $HOME */ +- if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0)) ++ if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0)) + { + if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0) + { diff --git a/app-shells/bash/files/bash-3.0-subshell.patch b/app-shells/bash/files/bash-3.0-subshell.patch new file mode 100644 index 000000000000..a1d7dfe7d342 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-subshell.patch @@ -0,0 +1,39 @@ +Ripped from Fedora which took this from upstream + +* Tue Nov 22 2005 Tim Waugh <twaugh@redhat.com> 3.0-37 +- Applied patch from upstream to fix parsing problem (bug #146638). + +http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=146638 + +--- bash-3.0/parse.y.subshell 2005-11-22 13:19:11.000000000 +0000 ++++ bash-3.0/parse.y 2005-11-22 13:19:24.000000000 +0000 +@@ -2055,14 +2055,6 @@ + if (uc) + shell_input_line_index++; + +- if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n') +- { +- if (SHOULD_PROMPT ()) +- prompt_again (); +- line_number++; +- goto restart_read; +- } +- + #if defined (ALIAS) || defined (DPAREN_ARITHMETIC) + /* If UC is NULL, we have reached the end of the current input string. If + pushed_string_list is non-empty, it's time to pop to the previous string +@@ -2078,6 +2070,14 @@ + } + #endif /* ALIAS || DPAREN_ARITHMETIC */ + ++ if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n') ++ { ++ if (SHOULD_PROMPT ()) ++ prompt_again (); ++ line_number++; ++ goto restart_read; ++ } ++ + if (!uc && shell_input_line_terminator == EOF) + return ((shell_input_line_index != 0) ? '\n' : EOF); + diff --git a/app-shells/bash/files/bash-3.0-ulimit.patch b/app-shells/bash/files/bash-3.0-ulimit.patch new file mode 100644 index 000000000000..8202b95d2769 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-ulimit.patch @@ -0,0 +1,186 @@ +Ripped from Fedora + +--- bash-3.0/builtins/ulimit.def ++++ bash-3.0/builtins/ulimit.def +@@ -34,15 +34,20 @@ + -a all current limits are reported + -c the maximum size of core files created + -d the maximum size of a process's data segment ++ -e the maximum scheduling priority (`nice') + -f the maximum size of files created by the shell ++ -i the maximum number of pending signals + -l the maximum size a process may lock into memory + -m the maximum resident set size + -n the maximum number of open file descriptors + -p the pipe buffer size ++ -q the maximum number of bytes in POSIX message queues ++ -r the maximum rt priority + -s the maximum stack size + -t the maximum amount of cpu time in seconds + -u the maximum number of user processes + -v the size of virtual memory ++ -x the maximum number of file locks + + If LIMIT is given, it is the new value of the specified resource; + the special LIMIT values `soft', `hard', and `unlimited' stand for +@@ -199,7 +204,13 @@ + #ifdef RLIMIT_DATA + { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" }, + #endif ++#ifdef RLIMIT_NICE ++ { 'e', RLIMIT_NICE, 1, "max nice", (char *)NULL}, ++#endif /* RLIMIT_NICE */ + { 'f', RLIMIT_FILESIZE, 1024, "file size", "blocks" }, ++#ifdef RLIMIT_SIGPENDING ++ { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL}, ++#endif + #ifdef RLIMIT_MEMLOCK + { 'l', RLIMIT_MEMLOCK, 1024, "max locked memory", "kbytes" }, + #endif +@@ -208,6 +219,12 @@ + #endif /* RLIMIT_RSS */ + { 'n', RLIMIT_OPENFILES, 1, "open files", (char *)NULL}, + { 'p', RLIMIT_PIPESIZE, 512, "pipe size", "512 bytes" }, ++#ifdef RLIMIT_MSGQUEUE ++ { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" }, ++#endif ++#ifdef RLIMIT_RTPRIO ++ { 'r', RLIMIT_RTPRIO, 1, "max rt priority", (char *)NULL}, ++#endif /* RLIMIT_RTPRIO */ + #ifdef RLIMIT_STACK + { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" }, + #endif +@@ -221,6 +238,9 @@ + #ifdef RLIMIT_SWAP + { 'w', RLIMIT_SWAP, 1024, "swap size", "kbytes" }, + #endif ++#ifdef RLIMIT_LOCKS ++ { 'x', RLIMIT_LOCKS, 1, "file locks", (char *)NULL}, ++#endif + { -1, -1, -1, (char *)NULL, (char *)NULL } + }; + #define NCMDS (sizeof(limits) / sizeof(limits[0])) +@@ -647,11 +667,11 @@ + + for (i = 0; limits[i].option > 0; i++) + { +- if (get_limit (i, &softlim, &hardlim) < 0) ++ if (get_limit (i, &softlim, &hardlim) == 0) ++ printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1); ++ else if (errno != EINVAL) + builtin_error ("%s: cannot get limit: %s", limits[i].description, + strerror (errno)); +- else +- printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1); + } + } + +@@ -670,7 +690,7 @@ + else + sprintf (unitstr, "(-%c) ", limits[limind].option); + +- printf ("%-18s %16s", limits[limind].description, unitstr); ++ printf ("%-20s %16s", limits[limind].description, unitstr); + } + if (curlim == RLIM_INFINITY) + puts ("unlimited"); +--- bash-3.0/doc/bashref.texi ++++ bash-3.0/doc/bashref.texi +@@ -3793,7 +3793,7 @@ + @item ulimit + @btindex ulimit + @example +-ulimit [-acdflmnpstuvSH] [@var{limit}] ++ulimit [-acdeflmnpqrstuvxSH] [@var{limit}] + @end example + @code{ulimit} provides control over the resources available to processes + started by the shell, on systems that allow such control. If an +@@ -3814,9 +3814,15 @@ + @item -d + The maximum size of a process's data segment. + ++@item -e ++The maximum scheduling priority. ++ + @item -f + The maximum size of files created by the shell. + ++@item -i ++The maximum number of pending signals. ++ + @item -l + The maximum size that may be locked into memory. + +@@ -3829,6 +3835,12 @@ + @item -p + The pipe buffer size. + ++@item -q ++The maximum number of bytes in POSIX message queues. ++ ++@item -r ++The maximum RT priority. ++ + @item -s + The maximum stack size. + +@@ -3841,6 +3853,9 @@ + @item -v + The maximum amount of virtual memory available to the process. + ++@item -x ++The maximum amount of file locks. ++ + @end table + + If @var{limit} is given, it is the new value of the specified resource; +--- bash-3.0/doc/bash.1 ++++ bash-3.0/doc/bash.1 +@@ -8362,7 +8362,7 @@ + returns true if any of the arguments are found, false if + none are found. + .TP +-\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]] ++\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]] + Provides control over the resources available to the shell and to + processes started by it, on systems that allow such control. + The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is +@@ -8398,9 +8398,15 @@ + .B \-d + The maximum size of a process's data segment + .TP ++.B \-e ++The maximum scheduling priority (`nice') ++.TP + .B \-f + The maximum size of files created by the shell + .TP ++.B \-i ++The maximum number of pending signals ++.TP + .B \-l + The maximum size that may be locked into memory + .TP +@@ -8414,6 +8420,12 @@ + .B \-p + The pipe size in 512-byte blocks (this may not be set) + .TP ++.B \-q ++The maximum number of bytes in POSIX message queues ++.TP ++.B \-r ++The maximum rt priority ++.TP + .B \-s + The maximum stack size + .TP +@@ -8425,6 +8437,9 @@ + .TP + .B \-v + The maximum amount of virtual memory available to the shell ++.TP ++.B \-x ++The maximum number of file locks + .PD + .PP + If diff --git a/app-shells/bash/files/bash-3.0-volatile-command.patch b/app-shells/bash/files/bash-3.0-volatile-command.patch new file mode 100644 index 000000000000..8b89b35914b1 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-volatile-command.patch @@ -0,0 +1,16 @@ +Ripped from Debian + +# DP: current_command must be declared volatile to prevent assignments from +# being optimized away as dead code. In reality, the use of setjmp/longjmp +# makes it not dead code at all. + +--- eval.old 2003-12-18 23:44:15.000000000 -0500 ++++ eval.c 2005-10-03 01:59:31.000000000 -0400 +@@ -63,7 +63,7 @@ + reader_loop () + { + int our_indirection_level; +- COMMAND *current_command = (COMMAND *)NULL; ++ COMMAND * volatile current_command = (COMMAND *)NULL; + + USE_VAR(current_command); |