source: patches/bash-3.2-fixes-10.patch@ b854065

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since b854065 was d849dd4, checked in by Jim Gifford <clfs@…>, 16 years ago

Changed Patches to Bash

  • Property mode set to 100644
File size: 6.7 KB
RevLine 
[d849dd4]1Submitted By: Jim Gifford (jim at cross-lfs dot org)
2Date: 01-08-2009
3Initial Package Version: 3.2
4Origin: Various
5Upstream Status: Applied
6Description: Contains all Fixes from Various Sources
7 Fedora:
8 http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-2.02-security.patch
9 http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-2.03-paths.patch
10 http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-2.05b-readline-oom.patch
11 http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-3.2-190350.patch
12 http://cvs.fedoraproject.org/viewvc/rpms/bash/F-10/bash-3.2-comp_wordbreaks.patch
13
14 All have been validated to be issues in CLFS.
15
16diff -Naur bash-3.2.orig/config.h.in bash-3.2/config.h.in
17--- bash-3.2.orig/config.h.in 2009-01-08 15:56:12.000000000 -0800
18+++ bash-3.2/config.h.in 2009-01-08 16:05:44.000000000 -0800
19@@ -201,7 +201,7 @@
20
21 /* System paths */
22
23-#define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail"
24+#define DEFAULT_MAIL_DIRECTORY "/var/spool/mail"
25
26 /* Characteristics of the system's header files and libraries that affect
27 the compilation environment. */
28diff -Naur bash-3.2.orig/config-top.h bash-3.2/config-top.h
29--- bash-3.2.orig/config-top.h 2005-04-29 13:36:34.000000000 -0700
30+++ bash-3.2/config-top.h 2009-01-08 16:05:44.000000000 -0800
31@@ -52,14 +52,14 @@
32 /* The default value of the PATH variable. */
33 #ifndef DEFAULT_PATH_VALUE
34 #define DEFAULT_PATH_VALUE \
35- "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
36+ "/usr/local/bin:/bin:/usr/bin"
37 #endif
38
39 /* The value for PATH when invoking `command -p'. This is only used when
40 the Posix.2 confstr () function, or CS_PATH define are not present. */
41 #ifndef STANDARD_UTILS_PATH
42 #define STANDARD_UTILS_PATH \
43- "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
44+ "/bin:/usr/bin:/usr/sbin:/sbin"
45 #endif
46
47 /* Default primary and secondary prompt strings. */
48diff -Naur bash-3.2.orig/lib/readline/misc.c bash-3.2/lib/readline/misc.c
49--- bash-3.2.orig/lib/readline/misc.c 2009-01-08 15:56:23.000000000 -0800
50+++ bash-3.2/lib/readline/misc.c 2009-01-08 16:06:59.000000000 -0800
51@@ -560,7 +560,7 @@
52 #if defined (VI_MODE)
53 _rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */
54 rl_editing_mode = vi_mode;
55- rl_vi_insertion_mode (1, key);
56+ rl_vi_insert_mode (1, key);
57 #endif /* VI_MODE */
58
59 return 0;
60diff -Naur bash-3.2.orig/lib/readline/readline.c bash-3.2/lib/readline/readline.c
61--- bash-3.2.orig/lib/readline/readline.c 2009-01-08 15:56:23.000000000 -0800
62+++ bash-3.2/lib/readline/readline.c 2009-01-08 16:06:59.000000000 -0800
63@@ -370,7 +370,7 @@
64
65 #if defined (VI_MODE)
66 if (rl_editing_mode == vi_mode)
67- rl_vi_insertion_mode (1, 'i');
68+ rl_vi_insert_mode (1, 'i');
69 #endif /* VI_MODE */
70
71 if (rl_pre_input_hook)
72@@ -733,7 +733,7 @@
73 {
74 /* Special case rl_do_lowercase_version (). */
75 if (func == rl_do_lowercase_version)
76- return (_rl_dispatch (_rl_to_lower (key), map));
77+ return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map));
78
79 rl_executing_keymap = map;
80
81diff -Naur bash-3.2.orig/lib/readline/readline.h bash-3.2/lib/readline/readline.h
82--- bash-3.2.orig/lib/readline/readline.h 2006-08-16 12:16:59.000000000 -0700
83+++ bash-3.2/lib/readline/readline.h 2009-01-08 16:06:59.000000000 -0800
84@@ -230,6 +230,7 @@
85 extern int rl_vi_end_word PARAMS((int, int));
86 extern int rl_vi_insert_beg PARAMS((int, int));
87 extern int rl_vi_append_mode PARAMS((int, int));
88+extern int rl_vi_insert_mode PARAMS((int, int));
89 extern int rl_vi_append_eol PARAMS((int, int));
90 extern int rl_vi_eof_maybe PARAMS((int, int));
91 extern int rl_vi_insertion_mode PARAMS((int, int));
92diff -Naur bash-3.2.orig/lib/readline/vi_keymap.c bash-3.2/lib/readline/vi_keymap.c
93--- bash-3.2.orig/lib/readline/vi_keymap.c 2005-03-25 16:22:57.000000000 -0800
94+++ bash-3.2/lib/readline/vi_keymap.c 2009-01-08 16:06:59.000000000 -0800
95@@ -151,7 +151,7 @@
96 { ISFUNC, rl_vi_char_search }, /* f */
97 { ISFUNC, (rl_command_func_t *)0x0 }, /* g */
98 { ISFUNC, rl_backward_char }, /* h */
99- { ISFUNC, rl_vi_insertion_mode }, /* i */
100+ { ISFUNC, rl_vi_insert_mode }, /* i */
101 { ISFUNC, rl_get_next_history }, /* j */
102 { ISFUNC, rl_get_previous_history }, /* k */
103 { ISFUNC, rl_forward_char }, /* l */
104diff -Naur bash-3.2.orig/lib/readline/vi_mode.c bash-3.2/lib/readline/vi_mode.c
105--- bash-3.2.orig/lib/readline/vi_mode.c 2009-01-08 15:56:23.000000000 -0800
106+++ bash-3.2/lib/readline/vi_mode.c 2009-01-08 16:06:59.000000000 -0800
107@@ -220,6 +220,15 @@
108 if (rl_point > 0)
109 _rl_vi_backup ();
110 }
111+ /* Ditto for redoing an insert with `I', but move to the beginning of line
112+ like the `I' command does. */
113+ else if (_rl_vi_last_command == 'I' && vi_insert_buffer && *vi_insert_buffer)
114+ {
115+ rl_beg_of_line (1, 'I');
116+ _rl_vi_stuff_insert (count);
117+ if (rl_point > 0)
118+ _rl_vi_backup ();
119+ }
120 else
121 r = _rl_dispatch (_rl_vi_last_command, _rl_keymap);
122 vi_redoing = 0;
123@@ -584,7 +593,7 @@
124 int count, key;
125 {
126 rl_beg_of_line (1, key);
127- rl_vi_insertion_mode (1, key);
128+ rl_vi_insert_mode (1, key);
129 return (0);
130 }
131
132@@ -618,6 +627,14 @@
133 }
134
135 int
136+rl_vi_insert_mode (count, key)
137+ int count, key;
138+{
139+ rl_vi_start_inserting (key, 1, rl_arg_sign);
140+ return (0);
141+}
142+
143+int
144 rl_vi_append_eol (count, key)
145 int count, key;
146 {
147@@ -690,7 +707,7 @@
148 }
149 else
150 {
151- if ((_rl_vi_last_key_before_insert == 'i' || _rl_vi_last_key_before_insert == 'a') && rl_undo_list)
152+ if ((_rl_vi_last_key_before_insert == 'i' || _rl_vi_last_key_before_insert == 'a' || _rl_vi_last_key_before_insert == 'I') && rl_undo_list)
153 _rl_vi_save_insert (rl_undo_list);
154 /* XXX - Other keys probably need to be checked. */
155 else if (_rl_vi_last_key_before_insert == 'C')
156diff -Naur bash-3.2.orig/parse.y bash-3.2/parse.y
157--- bash-3.2.orig/parse.y 2009-01-08 15:56:51.000000000 -0800
158+++ bash-3.2/parse.y 2009-01-08 16:04:59.000000000 -0800
159@@ -1182,7 +1182,7 @@
160
161 #if defined (READLINE)
162 char *current_readline_prompt = (char *)NULL;
163-char *current_readline_line = (char *)NULL;
164+unsigned char *current_readline_line = (unsigned char *)NULL;
165 int current_readline_line_index = 0;
166
167 static int
168diff -Naur bash-3.2.orig/shell.c bash-3.2/shell.c
169--- bash-3.2.orig/shell.c 2006-05-17 05:46:54.000000000 -0700
170+++ bash-3.2/shell.c 2009-01-08 16:07:33.000000000 -0800
171@@ -71,6 +71,10 @@
172 # include <readline/history.h>
173 #endif
174
175+#if defined (READLINE)
176+#include "bashline.h"
177+#endif
178+
179 #include <tilde/tilde.h>
180 #include <glob/strmatch.h>
181
182@@ -1719,6 +1723,11 @@
183 delete_all_contexts (shell_variables);
184 delete_all_variables (shell_functions);
185
186+#if defined (READLINE)
187+ sv_comp_wordbreaks ("COMP_WORDBREAKS");
188+ bash_readline_initialized = 0;
189+#endif /* READLINE */
190+
191 shell_reinitialized = 1;
192 }
193
Note: See TracBrowser for help on using the repository browser.