mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

430 lines
12 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/bash/bash2/official-upto-007.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. Official patches from ftp://ftp.gnu.org/pub/gnu/bash/bash-2.05b-patches/.
  20. BASH PATCH REPORT
  21. =================
  22. Bash-Release: 2.05b
  23. Patch-ID: bash205b-001
  24. Bug-Reported-by: taviso@sdf.lonestar.org
  25. Bug-Reference-ID: <200208021107.g72B723d021352@darkstar.example.net>
  26. Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-August/004980.html
  27. Bug-Description:
  28. Bash goes into an infinite loop and eventually crashes with a SIGSEGV
  29. when some keys on the numeric keypad are pressed, possibly in combination
  30. with the shift key.
  31. Patch:
  32. *** ./lib/readline/bind.c Thu Jan 24 11:15:52 2002
  33. --- ./lib/readline/bind.c Wed Jul 31 09:11:18 2002
  34. ***************
  35. *** 312,316 ****
  36. and the function bound to `a' to be executed when the user
  37. types `abx', leaving `bx' in the input queue. */
  38. ! if (k.function /* && k.type == ISFUNC */)
  39. {
  40. map[ANYOTHERKEY] = k;
  41. --- 312,316 ----
  42. and the function bound to `a' to be executed when the user
  43. types `abx', leaving `bx' in the input queue. */
  44. ! if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
  45. {
  46. map[ANYOTHERKEY] = k;
  47. BASH PATCH REPORT
  48. =================
  49. Bash-Release: 2.05b
  50. Patch-ID: bash205b-002
  51. Bug-Reported-by: rwhron@earthlink.net
  52. Bug-Reference-ID: <20020724000454.GA15210@rushmore> (bug-bash)
  53. Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-July/004856.html
  54. Bug-Description:
  55. Repeating an edit in vi-mode with `.' does not work.
  56. Patch:
  57. *** ./lib/readline/readline.c Wed Mar 13 17:10:46 2002
  58. --- ./lib/readline/readline.c Tue Jul 30 17:46:44 2002
  59. ***************
  60. *** 685,688 ****
  61. --- 685,689 ----
  62. #if defined (VI_MODE)
  63. if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
  64. + key != ANYOTHERKEY &&
  65. _rl_vi_textmod_command (key))
  66. _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
  67. BASH PATCH REPORT
  68. =================
  69. Bash-Release: 2.05b
  70. Patch-ID: bash205b-003
  71. Bug-Reported-by: jan.q.bruun-andersen@posten.se
  72. Bug-Reference-ID: <BE156C6450189B4ABAF7381F0AD4724A0165674F@002exmbs002.ad.posten.se>
  73. Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-July/004789.html
  74. Bug-Description:
  75. In certain cases, Bash appends a space instead of a slash to a directory
  76. name relative to the current directory when performing command name
  77. completion. This affects partial completion of intermediate directory
  78. names.
  79. Patch:
  80. *** ./bashline.c Tue May 7 15:52:42 2002
  81. --- ./bashline.c Sat Aug 3 11:40:16 2002
  82. ***************
  83. *** 1045,1049 ****
  84. --- 1045,1052 ----
  85. else
  86. {
  87. + #define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x))
  88. +
  89. matches = rl_completion_matches (text, command_word_completion_function);
  90. +
  91. /* If we are attempting command completion and nothing matches, we
  92. do not want readline to perform filename completion for us. We
  93. ***************
  94. *** 1053,1057 ****
  95. if (matches == (char **)NULL)
  96. rl_ignore_some_completions_function = bash_ignore_filenames;
  97. ! else if (matches[1] == 0 && *matches[0] != '/')
  98. /* Turn off rl_filename_completion_desired so readline doesn't
  99. append a slash if there is a directory with the same name
  100. --- 1056,1060 ----
  101. if (matches == (char **)NULL)
  102. rl_ignore_some_completions_function = bash_ignore_filenames;
  103. ! else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
  104. /* Turn off rl_filename_completion_desired so readline doesn't
  105. append a slash if there is a directory with the same name
  106. ***************
  107. *** 1062,1066 ****
  108. conflict. */
  109. rl_filename_completion_desired = 0;
  110. ! else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && *matches[0] != '/')
  111. /* There are multiple instances of the same match (duplicate
  112. completions haven't yet been removed). In this case, all of
  113. --- 1065,1069 ----
  114. conflict. */
  115. rl_filename_completion_desired = 0;
  116. ! else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
  117. /* There are multiple instances of the same match (duplicate
  118. completions haven't yet been removed). In this case, all of
  119. BASH PATCH REPORT
  120. =================
  121. Bash-Release: 2.05b
  122. Patch-ID: bash205b-004
  123. Bug-Reported-by: c.f.a.johnson@rogers.com
  124. Bug-Reference-ID: <aji8sb$1aa9bi$2@ID-136730.news.dfncis.de>
  125. Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-bash/2002-August/005074.html
  126. Bug-Description:
  127. A bug in the bash variable expansion code causes leading blanks in a
  128. variable's value to be ignored when computing its length.
  129. Patch:
  130. *** ./subst.c Mon Jun 24 07:59:45 2002
  131. --- ./subst.c Sat Aug 17 17:28:46 2002
  132. ***************
  133. *** 1639,1647 ****
  134. /* This performs word splitting and quoted null character removal on
  135. STRING. */
  136. ! #if 0
  137. ! #define issep(c) ((separators)[1] ? (member ((c), separators)) : (c) == (separators)[0])
  138. ! #else
  139. ! #define issep(c) ((separators)[1] ? isifs(c) : (c) == (separators)[0])
  140. ! #endif
  141. WORD_LIST *
  142. --- 1639,1646 ----
  143. /* This performs word splitting and quoted null character removal on
  144. STRING. */
  145. ! #define issep(c) \
  146. ! (((separators)[0]) ? ((separators)[1] ? isifs(c) \
  147. ! : (c) == (separators)[0]) \
  148. ! : 0)
  149. WORD_LIST *
  150. BASH PATCH REPORT
  151. =================
  152. Bash-Release: 2.05b
  153. Patch-ID: bash205b-005
  154. Bug-Reported-by: Jim Meyering <jim@meyering.net>
  155. Bug-Reference-ID: <87bs6v8iib.fsf@pixie.eng.ascend.com>
  156. Bug-Reference-URL: http://mail.gnu.org/archive/html/bug-bash/2002-09/msg00047.html
  157. Bug-Description:
  158. When in a locale with multibyte characters, the readline display updater
  159. will occasionally cause a segmentation fault when attempting to compute
  160. the length of the first multibyte character on the line.
  161. Patch:
  162. *** ./lib/readline/mbutil.c Tue Jun 4 11:54:29 2002
  163. --- ./lib/readline/mbutil.c Mon Aug 5 11:20:39 2002
  164. ***************
  165. *** 206,210 ****
  166. {
  167. /* shorted to compose multibyte char */
  168. ! memset (ps, 0, sizeof(mbstate_t));
  169. return -2;
  170. }
  171. --- 206,211 ----
  172. {
  173. /* shorted to compose multibyte char */
  174. ! if (ps)
  175. ! memset (ps, 0, sizeof(mbstate_t));
  176. return -2;
  177. }
  178. ***************
  179. *** 213,217 ****
  180. /* invalid to compose multibyte char */
  181. /* initialize the conversion state */
  182. ! memset (ps, 0, sizeof(mbstate_t));
  183. return -1;
  184. }
  185. --- 214,219 ----
  186. /* invalid to compose multibyte char */
  187. /* initialize the conversion state */
  188. ! if (ps)
  189. ! memset (ps, 0, sizeof(mbstate_t));
  190. return -1;
  191. }
  192. ***************
  193. *** 226,232 ****
  194. int
  195. _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
  196. ! char *buf1, *buf2;
  197. ! mbstate_t *ps1, *ps2;
  198. ! int pos1, pos2;
  199. {
  200. int i, w1, w2;
  201. --- 228,237 ----
  202. int
  203. _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
  204. ! char *buf1;
  205. ! int pos1;
  206. ! mbstate_t *ps1;
  207. ! char *buf2;
  208. ! int pos2;
  209. ! mbstate_t *ps2;
  210. {
  211. int i, w1, w2;
  212. ***************
  213. *** 277,282 ****
  214. /* clear the state of the byte sequence, because
  215. in this case effect of mbstate is undefined */
  216. ! memset (ps, 0, sizeof (mbstate_t));
  217. }
  218. else
  219. pos += tmp;
  220. --- 282,290 ----
  221. /* clear the state of the byte sequence, because
  222. in this case effect of mbstate is undefined */
  223. ! if (ps)
  224. ! memset (ps, 0, sizeof (mbstate_t));
  225. }
  226. + else if (tmp == 0)
  227. + pos++;
  228. else
  229. pos += tmp;
  230. BASH PATCH REPORT
  231. =================
  232. Bash-Release: 2.05b
  233. Patch-ID: bash205b-006
  234. Bug-Reported-by: clowenst@ucsd.edu
  235. Bug-Reference-ID: <156388ec.0212021151.51a48df1@posting.google.com>
  236. Bug-Reference-URL:
  237. Bug-Description:
  238. When running in a locale with multibyte characters, the readline display
  239. updater will use carriage returns when drawing the line, overwriting any
  240. partial output already on the screen and not terminated by a newline.
  241. Patch:
  242. *** ./lib/readline/display.c Tue Jun 4 10:54:47 2002
  243. --- ./lib/readline/display.c Fri Sep 13 16:22:57 2002
  244. ***************
  245. *** 71,75 ****
  246. #if defined (HANDLE_MULTIBYTE)
  247. ! static int _rl_col_width PARAMS((char *, int, int));
  248. static int *_rl_wrapped_line;
  249. #else
  250. --- 71,75 ----
  251. #if defined (HANDLE_MULTIBYTE)
  252. ! static int _rl_col_width PARAMS((const char *, int, int));
  253. static int *_rl_wrapped_line;
  254. #else
  255. ***************
  256. *** 1349,1355 ****
  257. _rl_output_some_chars (nfd + lendiff, temp - lendiff);
  258. #if 0
  259. - _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff;
  260. - #else
  261. _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
  262. #endif
  263. }
  264. --- 1349,1355 ----
  265. _rl_output_some_chars (nfd + lendiff, temp - lendiff);
  266. #if 0
  267. _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
  268. + #else
  269. + _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
  270. #endif
  271. }
  272. ***************
  273. *** 1511,1516 ****
  274. /* If we have multibyte characters, NEW is indexed by the buffer point in
  275. a multibyte string, but _rl_last_c_pos is the display position. In
  276. ! this case, NEW's display position is not obvious. */
  277. ! if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return;
  278. #else
  279. if (_rl_last_c_pos == new) return;
  280. --- 1511,1523 ----
  281. /* If we have multibyte characters, NEW is indexed by the buffer point in
  282. a multibyte string, but _rl_last_c_pos is the display position. In
  283. ! this case, NEW's display position is not obvious and must be
  284. ! calculated. */
  285. ! if (MB_CUR_MAX == 1 || rl_byte_oriented)
  286. ! {
  287. ! if (_rl_last_c_pos == new)
  288. ! return;
  289. ! }
  290. ! else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
  291. ! return;
  292. #else
  293. if (_rl_last_c_pos == new) return;
  294. ***************
  295. *** 1595,1603 ****
  296. {
  297. if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
  298. ! {
  299. ! tputs (_rl_term_cr, 1, _rl_output_character_function);
  300. ! for (i = 0; i < new; i++)
  301. ! putc (data[i], rl_outstream);
  302. ! }
  303. else
  304. _rl_backspace (_rl_last_c_pos - new);
  305. --- 1602,1606 ----
  306. {
  307. if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
  308. ! _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
  309. else
  310. _rl_backspace (_rl_last_c_pos - new);
  311. ***************
  312. *** 2118,2122 ****
  313. static int
  314. _rl_col_width (str, start, end)
  315. ! char *str;
  316. int start, end;
  317. {
  318. --- 2121,2125 ----
  319. static int
  320. _rl_col_width (str, start, end)
  321. ! const char *str;
  322. int start, end;
  323. {
  324. ***************
  325. *** 2194,2196 ****
  326. }
  327. #endif /* HANDLE_MULTIBYTE */
  328. -
  329. --- 2197,2198 ----
  330. BASH PATCH REPORT
  331. =================
  332. Bash-Release: 2.05b
  333. Patch-ID: bash205b-007
  334. Bug-Reported-by: dman@dman.ddts.net
  335. Bug-Reference-ID: <15893.26358.129589.503364@gargle.gargle.HOWL>
  336. Bug-Reference-URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=175127
  337. Bug-Description:
  338. Using the vi editing mode's case-changing commands in a locale with
  339. multibyte characters will cause garbage characters to be inserted into
  340. the editing buffer.
  341. Patch:
  342. *** ./lib/readline/vi_mode.c Thu May 23 13:27:58 2002
  343. --- ./lib/readline/vi_mode.c Tue Feb 4 15:11:07 2003
  344. ***************
  345. *** 681,685 ****
  346. {
  347. wchar_t wc;
  348. ! char mb[MB_LEN_MAX];
  349. mbstate_t ps;
  350. --- 681,686 ----
  351. {
  352. wchar_t wc;
  353. ! char mb[MB_LEN_MAX+1];
  354. ! int mblen;
  355. mbstate_t ps;
  356. ***************
  357. *** 704,708 ****
  358. if (wc)
  359. {
  360. ! wctomb (mb, wc);
  361. rl_begin_undo_group ();
  362. rl_delete (1, 0);
  363. --- 705,711 ----
  364. if (wc)
  365. {
  366. ! mblen = wctomb (mb, wc);
  367. ! if (mblen >= 0)
  368. ! mb[mblen] = '\0';
  369. rl_begin_undo_group ();
  370. rl_delete (1, 0);