1 |
pterjan |
229 |
%define i18ndate 20010626 |
2 |
tmb |
737737 |
%define patchlevel 53 |
3 |
luigiwalser |
725620 |
%define rel 1 |
4 |
pterjan |
229 |
|
5 |
|
|
Name: bash |
6 |
ahmad |
55906 |
Version: 4.2 |
7 |
blino |
249521 |
Release: %mkrel %{patchlevel}.%{rel} |
8 |
pterjan |
229 |
Summary: The GNU Bourne Again shell (bash) |
9 |
|
|
Group: Shells |
10 |
|
|
License: GPLv2+ |
11 |
|
|
URL: http://www.gnu.org/software/bash/bash.html |
12 |
|
|
Source0: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz |
13 |
ahmad |
64454 |
Source1: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz.sig |
14 |
pterjan |
229 |
Source2: ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.bz2 |
15 |
|
|
Source3: dot-bashrc |
16 |
|
|
Source4: dot-bash_profile |
17 |
|
|
Source5: dot-bash_logout |
18 |
|
|
Source6: alias.sh |
19 |
|
|
Source7: bashrc |
20 |
|
|
Source8: profile.d-bash |
21 |
ahmad |
64454 |
|
22 |
pterjan |
229 |
# Official upstream patches |
23 |
ahmad |
64454 |
# from ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/ |
24 |
blino |
249520 |
Patch01: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-001 |
25 |
|
|
Patch02: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-002 |
26 |
|
|
Patch03: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-003 |
27 |
|
|
Patch04: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-004 |
28 |
|
|
Patch05: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-005 |
29 |
|
|
Patch06: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-006 |
30 |
|
|
Patch07: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-007 |
31 |
|
|
Patch08: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-008 |
32 |
|
|
Patch09: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-009 |
33 |
|
|
Patch10: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-010 |
34 |
blino |
249522 |
Patch11: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-011 |
35 |
|
|
Patch12: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-012 |
36 |
|
|
Patch13: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-013 |
37 |
|
|
Patch14: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-014 |
38 |
|
|
Patch15: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-015 |
39 |
|
|
Patch16: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-016 |
40 |
|
|
Patch17: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-017 |
41 |
|
|
Patch18: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-018 |
42 |
|
|
Patch19: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-019 |
43 |
|
|
Patch20: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-020 |
44 |
|
|
Patch21: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-021 |
45 |
|
|
Patch22: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-022 |
46 |
|
|
Patch23: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-023 |
47 |
|
|
Patch24: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-024 |
48 |
|
|
Patch25: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-025 |
49 |
|
|
Patch26: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-026 |
50 |
|
|
Patch27: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-027 |
51 |
|
|
Patch28: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-028 |
52 |
blino |
273738 |
Patch29: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-029 |
53 |
|
|
Patch30: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-030 |
54 |
|
|
Patch31: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-031 |
55 |
|
|
Patch32: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-032 |
56 |
|
|
Patch33: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-033 |
57 |
|
|
Patch34: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-034 |
58 |
|
|
Patch35: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-035 |
59 |
|
|
Patch36: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-036 |
60 |
|
|
Patch37: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-037 |
61 |
luigiwalser |
724272 |
Patch38: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-038 |
62 |
|
|
Patch39: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-039 |
63 |
|
|
Patch40: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-040 |
64 |
|
|
Patch41: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-041 |
65 |
|
|
Patch42: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-042 |
66 |
|
|
Patch43: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-043 |
67 |
|
|
Patch44: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-044 |
68 |
|
|
Patch45: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-045 |
69 |
|
|
Patch46: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-046 |
70 |
|
|
Patch47: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-047 |
71 |
|
|
Patch48: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-048 |
72 |
luigiwalser |
725619 |
Patch49: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-049 |
73 |
tmb |
737737 |
Patch50: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-050 |
74 |
|
|
Patch51: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-051 |
75 |
|
|
Patch52: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-052 |
76 |
|
|
Patch53: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-053 |
77 |
ahmad |
64454 |
|
78 |
blino |
249520 |
# Mageia/Mandriva patches |
79 |
|
|
Patch1001: bash-2.02-security.patch |
80 |
|
|
# ensure profile is read (Redhat) |
81 |
|
|
Patch1003: bash-4.0-profile.patch |
82 |
|
|
Patch1004: bash-2.05b-readlinefixes.patch |
83 |
|
|
Patch1006: bash-2.04-compat.patch |
84 |
|
|
#https://bugzilla.novell.com/attachment.cgi?id=67684 |
85 |
|
|
Patch1010: bash-3.1-extended_quote.patch |
86 |
|
|
Patch1020: bash-strcoll-bug.diff |
87 |
|
|
Patch1023: bash-2.05b-checkwinsize.patch |
88 |
|
|
Patch1024: bash-3.2-lzma-copmpletion.patch |
89 |
ahmad |
55906 |
# (fc) 3.2-12mdv fix format string |
90 |
blino |
249520 |
Patch1026: bash-3.2-format-security.patch |
91 |
|
|
|
92 |
pterjan |
229 |
BuildRequires: autoconf2.5 |
93 |
|
|
BuildRequires: bison |
94 |
|
|
BuildRequires: groff |
95 |
|
|
BuildRequires: libtermcap-devel |
96 |
|
|
BuildRequires: texinfo |
97 |
|
|
# explicit file provides |
98 |
|
|
Provides: /bin/sh |
99 |
|
|
|
100 |
|
|
%description |
101 |
|
|
Bash is a GNU project sh-compatible shell or command language |
102 |
|
|
interpreter. Bash (Bourne Again shell) incorporates useful features |
103 |
|
|
from the Korn shell (ksh) and the C shell (csh). Most sh scripts |
104 |
|
|
can be run by bash without modification. |
105 |
|
|
|
106 |
|
|
Bash offers several improvements over sh, including command line |
107 |
|
|
editing, unlimited size command history, job control, shell |
108 |
shlomif |
304269 |
functions and aliases, indexed arrays of unlimited size and |
109 |
pterjan |
229 |
integer arithmetic in any base from two to 64. Bash is ultimately |
110 |
|
|
intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and |
111 |
|
|
Tools standard. |
112 |
|
|
|
113 |
|
|
%package doc |
114 |
|
|
Summary: Documentation for the GNU Bourne Again shell (bash) |
115 |
pterjan |
731560 |
Group: Books/Computer books |
116 |
pterjan |
229 |
Requires: %{name} = %{version}-%{release} |
117 |
|
|
Obsoletes: bash3-doc < 3.2.48 |
118 |
|
|
Provides: bash3-doc |
119 |
|
|
|
120 |
|
|
%description doc |
121 |
|
|
This package provides documentation for GNU Bourne Again shell (bash). |
122 |
|
|
|
123 |
|
|
%prep |
124 |
|
|
%setup -q -a 2 |
125 |
|
|
mv doc/README . |
126 |
|
|
|
127 |
blino |
249520 |
%patch1 -p0 |
128 |
|
|
%patch2 -p0 |
129 |
|
|
%patch3 -p0 |
130 |
|
|
%patch4 -p0 |
131 |
|
|
%patch5 -p0 |
132 |
|
|
%patch6 -p0 |
133 |
|
|
%patch7 -p0 |
134 |
|
|
%patch8 -p0 |
135 |
|
|
%patch9 -p0 |
136 |
|
|
%patch10 -p0 |
137 |
blino |
249522 |
%patch11 -p0 |
138 |
|
|
%patch12 -p0 |
139 |
|
|
%patch13 -p0 |
140 |
|
|
%patch14 -p0 |
141 |
|
|
%patch15 -p0 |
142 |
|
|
%patch16 -p0 |
143 |
|
|
%patch17 -p0 |
144 |
|
|
%patch18 -p0 |
145 |
|
|
%patch19 -p0 |
146 |
|
|
%patch20 -p0 |
147 |
|
|
%patch21 -p0 |
148 |
|
|
%patch22 -p0 |
149 |
|
|
%patch23 -p0 |
150 |
|
|
%patch24 -p0 |
151 |
|
|
%patch25 -p0 |
152 |
|
|
%patch26 -p0 |
153 |
|
|
%patch27 -p0 |
154 |
|
|
%patch28 -p0 |
155 |
blino |
273738 |
%patch29 -p0 |
156 |
|
|
%patch30 -p0 |
157 |
|
|
%patch31 -p0 |
158 |
|
|
%patch32 -p0 |
159 |
|
|
%patch33 -p0 |
160 |
|
|
%patch34 -p0 |
161 |
|
|
%patch35 -p0 |
162 |
|
|
%patch36 -p0 |
163 |
|
|
%patch37 -p0 |
164 |
luigiwalser |
724272 |
%patch38 -p0 |
165 |
|
|
%patch39 -p0 |
166 |
|
|
%patch40 -p0 |
167 |
|
|
%patch41 -p0 |
168 |
|
|
%patch42 -p0 |
169 |
|
|
%patch43 -p0 |
170 |
|
|
%patch44 -p0 |
171 |
|
|
%patch45 -p0 |
172 |
|
|
%patch46 -p0 |
173 |
|
|
%patch47 -p0 |
174 |
|
|
%patch48 -p0 |
175 |
luigiwalser |
725619 |
%patch49 -p0 |
176 |
tmb |
737737 |
%patch50 -p0 |
177 |
|
|
%patch51 -p0 |
178 |
|
|
%patch52 -p0 |
179 |
|
|
%patch53 -p0 |
180 |
blino |
249520 |
|
181 |
|
|
%patch1001 -p1 -b .security |
182 |
|
|
%patch1003 -p1 -b .profile |
183 |
pterjan |
229 |
# 20060126 warly obsolete exept maybe for the replacement of @ by kH, this will have to be checked |
184 |
blino |
249520 |
#%patch1004 -p1 -b .readline |
185 |
|
|
%patch1006 -p1 -b .compat |
186 |
|
|
%patch1010 -p0 -b .quote |
187 |
|
|
%patch1020 -p1 -b .strcoll_bugx |
188 |
|
|
%patch1023 -p1 -b .checkwinsize |
189 |
|
|
%patch1024 -p1 -b .lzma |
190 |
|
|
%patch1026 -p1 -b .format-security |
191 |
pterjan |
229 |
|
192 |
|
|
%build |
193 |
|
|
|
194 |
ahmad |
55906 |
export CFLAGS="%{optflags} -Os" |
195 |
|
|
export CXXFLAGS=$CFLAGS |
196 |
pterjan |
229 |
export DEBUGGER_START_FILE="%{_datadir}/bashdb/bashdb-main.inc" |
197 |
|
|
|
198 |
|
|
%configure2_5x \ |
199 |
ahmad |
55906 |
--enable-command-timing \ |
200 |
pterjan |
229 |
--disable-rpath \ |
201 |
|
|
--enable-history \ |
202 |
|
|
--enable-job-control \ |
203 |
|
|
--enable-multibyte \ |
204 |
|
|
--enable-readline \ |
205 |
|
|
--with-installed-readline \ |
206 |
ahmad |
55906 |
--without-gnu-malloc \ |
207 |
|
|
--without-bash-malloc \ |
208 |
|
|
--disable-strict-posix-default \ |
209 |
|
|
--enable-select \ |
210 |
|
|
--enable-prompt-string-decoding \ |
211 |
|
|
--enable-process-substitution \ |
212 |
|
|
--enable-alias \ |
213 |
|
|
--enable-bang-history \ |
214 |
|
|
--enable-coprocesses \ |
215 |
|
|
--enable-directory-stack \ |
216 |
|
|
--enable-brace-expansion |
217 |
pterjan |
229 |
|
218 |
|
|
%make |
219 |
ahmad |
55906 |
|
220 |
pterjan |
229 |
# all tests must pass |
221 |
|
|
%check |
222 |
|
|
make check |
223 |
|
|
|
224 |
|
|
%install |
225 |
|
|
rm -rf %{buildroot} |
226 |
|
|
|
227 |
|
|
%makeinstall_std |
228 |
|
|
|
229 |
|
|
# beurk |
230 |
|
|
rm -rf %{buildroot}%{_datadir}/locale/en@boldquot/ %{buildroot}%{_datadir}/locale/en@quot/ |
231 |
|
|
|
232 |
|
|
#Sucks |
233 |
|
|
chmod +w doc/texinfo.tex |
234 |
|
|
chmod 755 examples/misc/aliasconv.* |
235 |
|
|
chmod 755 examples/misc/cshtobash |
236 |
|
|
chmod 755 %{buildroot}%{_bindir}/bashbug |
237 |
|
|
|
238 |
|
|
# Take out irritating ^H's from the documentation |
239 |
|
|
mkdir tmp_doc |
240 |
|
|
for i in `/bin/ls doc/` ; \ |
241 |
|
|
do cat doc/$i > tmp_doc/$i ; \ |
242 |
|
|
cat tmp_doc/$i | perl -p -e 's/.//g' > doc/$i ; \ |
243 |
|
|
rm tmp_doc/$i ; \ |
244 |
|
|
done |
245 |
|
|
rmdir tmp_doc |
246 |
|
|
|
247 |
|
|
mkdir -p %{buildroot}/bin |
248 |
|
|
pushd %{buildroot} && mv usr/bin/bash bin/bash && popd |
249 |
|
|
pushd %{buildroot}/bin && ln -s bash sh && popd |
250 |
|
|
pushd %{buildroot}/bin && ln -sf bash bash3 && popd |
251 |
|
|
|
252 |
|
|
# make builtins.1 and rbash.1 with bash.1 in place (fix mdv#51379) |
253 |
|
|
pushd doc |
254 |
|
|
mkdir tmp_fix_so |
255 |
|
|
cd tmp_fix_so |
256 |
|
|
cp ../builtins.1 ../rbash.1 . |
257 |
|
|
sed -e '/^.if \\n(zZ=1 .ig zZ/,/^.zZ/d' ../bash.1 > bash.1 |
258 |
|
|
soelim builtins.1 > ../builtins.1 |
259 |
|
|
sed -e '/^.if \\n(zY=1 .ig zY/,/^.zY/d' ../bash.1 > bash.1 |
260 |
|
|
soelim rbash.1 > ../rbash.1 |
261 |
|
|
popd |
262 |
blino |
249518 |
rm -rf doc/tmp_fix_so |
263 |
pterjan |
229 |
|
264 |
|
|
# make manpages for bash builtins as per suggestion in DOC/README |
265 |
|
|
cd doc |
266 |
|
|
sed -e ' |
267 |
|
|
/^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{ |
268 |
|
|
/^\.SH NAME/d |
269 |
|
|
s/^bash, // |
270 |
|
|
s/\\- bash built-in commands, see \\fBbash\\fR(1)$// |
271 |
|
|
s/,//g |
272 |
|
|
b |
273 |
|
|
} |
274 |
|
|
d |
275 |
|
|
' builtins.1 > man.pages |
276 |
|
|
install -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1 |
277 |
|
|
|
278 |
|
|
install -m 644 rbash.1 %{buildroot}%{_mandir}/man1/rbash.1 |
279 |
|
|
|
280 |
|
|
for i in `cat man.pages` ; do |
281 |
|
|
echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1 |
282 |
|
|
done |
283 |
|
|
|
284 |
|
|
# now turn man.pages into a filelist for the man subpackage |
285 |
|
|
|
286 |
|
|
cat man.pages |tr -s ' ' '\n' |sed ' |
287 |
|
|
1i\ |
288 |
|
|
%defattr(0644,root,root,0755) |
289 |
|
|
s:^:%{_mandir}/man1/: |
290 |
|
|
s/$/.1%{_extension}/ |
291 |
|
|
' > ../man.pages |
292 |
|
|
|
293 |
|
|
perl -p -i -e 's!.*/(printf|export|echo|pwd|test|kill).1%{_extension}!!' ../man.pages |
294 |
|
|
|
295 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/skel |
296 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/profile.d |
297 |
|
|
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.bashrc |
298 |
|
|
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/skel/.bash_profile |
299 |
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.bash_logout |
300 |
|
|
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/profile.d/60alias.sh |
301 |
|
|
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/bashrc |
302 |
|
|
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/profile.d/95bash-extras.sh |
303 |
|
|
|
304 |
|
|
ln -s bash %{buildroot}/bin/rbash |
305 |
|
|
|
306 |
|
|
# These're provided by other packages |
307 |
|
|
rm -f %{buildroot}{%{_infodir}/dir,%{_mandir}/man1/{echo,export,kill,printf,pwd,test}.1} |
308 |
ahmad |
55906 |
|
309 |
pterjan |
229 |
cd .. |
310 |
|
|
|
311 |
|
|
install -m 644 doc/bash.info %{buildroot}%{_infodir}/ |
312 |
|
|
|
313 |
|
|
%find_lang %{name} |
314 |
|
|
|
315 |
|
|
# merges list |
316 |
|
|
cat man.pages %{name}.lang > files.list |
317 |
|
|
|
318 |
|
|
%clean |
319 |
|
|
rm -rf %{buildroot} |
320 |
|
|
|
321 |
|
|
%files -f files.list |
322 |
|
|
%defattr(-,root,root) |
323 |
shlomif |
304269 |
%doc README |
324 |
pterjan |
229 |
%config(noreplace) %{_sysconfdir}/skel/.b* |
325 |
|
|
%{_sysconfdir}/profile.d/60alias.sh |
326 |
|
|
%{_sysconfdir}/profile.d/95bash-extras.sh |
327 |
|
|
%config(noreplace) %{_sysconfdir}/bashrc |
328 |
|
|
/bin/rbash |
329 |
|
|
/bin/bash |
330 |
|
|
/bin/bash3 |
331 |
|
|
/bin/sh |
332 |
|
|
%{_infodir}/bash.info* |
333 |
|
|
%{_mandir}/man1/bash.1* |
334 |
|
|
%{_mandir}/man1/rbash.1* |
335 |
|
|
%{_mandir}/man1/builtins.1* |
336 |
|
|
%{_mandir}/man1/bashbug.1* |
337 |
|
|
%{_bindir}/bashbug |
338 |
|
|
|
339 |
|
|
%files doc |
340 |
|
|
%defattr(-,root,root) |
341 |
|
|
%doc COMPAT NEWS NOTES POSIX CHANGES |
342 |
|
|
%doc examples |
343 |
|
|
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt |