1 |
pterjan |
229 |
%define i18ndate 20010626 |
2 |
ahmad |
96666 |
%define patchlevel 10 |
3 |
pterjan |
229 |
|
4 |
|
|
Name: bash |
5 |
ahmad |
55906 |
Version: 4.2 |
6 |
ahmad |
96666 |
Release: %mkrel 5 |
7 |
pterjan |
229 |
Summary: The GNU Bourne Again shell (bash) |
8 |
|
|
Group: Shells |
9 |
|
|
License: GPLv2+ |
10 |
|
|
URL: http://www.gnu.org/software/bash/bash.html |
11 |
|
|
Source0: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz |
12 |
ahmad |
64454 |
Source1: ftp://ftp.gnu.org/pub/gnu/bash/%{name}-%{version}.tar.gz.sig |
13 |
pterjan |
229 |
Source2: ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.bz2 |
14 |
|
|
Source3: dot-bashrc |
15 |
|
|
Source4: dot-bash_profile |
16 |
|
|
Source5: dot-bash_logout |
17 |
|
|
Source6: alias.sh |
18 |
|
|
Source7: bashrc |
19 |
|
|
Source8: profile.d-bash |
20 |
|
|
Patch1: bash-2.02-security.patch |
21 |
|
|
# ensure profile is read (Redhat) |
22 |
|
|
Patch3: bash-4.0-profile.patch |
23 |
|
|
Patch4: bash-2.05b-readlinefixes.patch |
24 |
|
|
Patch6: bash-2.04-compat.patch |
25 |
|
|
#https://bugzilla.novell.com/attachment.cgi?id=67684 |
26 |
|
|
Patch100: bash-3.1-extended_quote.patch |
27 |
ahmad |
64454 |
|
28 |
pterjan |
229 |
# Official upstream patches |
29 |
ahmad |
64454 |
# from ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/ |
30 |
ahmad |
72271 |
Patch11: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-001 |
31 |
|
|
Patch12: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-002 |
32 |
|
|
Patch13: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-003 |
33 |
|
|
Patch14: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-004 |
34 |
|
|
Patch15: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-005 |
35 |
|
|
Patch16: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-006 |
36 |
|
|
Patch17: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-007 |
37 |
|
|
Patch18: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-008 |
38 |
ahmad |
96666 |
Patch19: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-009 |
39 |
|
|
Patch20: ftp://ftp.gnu.org/gnu/bash/bash-%{version}-patches/bash42-010 |
40 |
ahmad |
64454 |
|
41 |
pterjan |
229 |
Patch1000: bash-strcoll-bug.diff |
42 |
|
|
Patch1003: bash-2.05b-checkwinsize.patch |
43 |
|
|
Patch1004: bash-3.2-lzma-copmpletion.patch |
44 |
ahmad |
55906 |
# (fc) 3.2-12mdv fix format string |
45 |
pterjan |
229 |
Patch1006: bash-3.2-format-security.patch |
46 |
|
|
BuildRequires: autoconf2.5 |
47 |
|
|
BuildRequires: bison |
48 |
|
|
BuildRequires: groff |
49 |
|
|
BuildRequires: libtermcap-devel |
50 |
|
|
BuildRequires: texinfo |
51 |
|
|
# explicit file provides |
52 |
|
|
Provides: /bin/sh |
53 |
|
|
|
54 |
|
|
%description |
55 |
|
|
Bash is a GNU project sh-compatible shell or command language |
56 |
|
|
interpreter. Bash (Bourne Again shell) incorporates useful features |
57 |
|
|
from the Korn shell (ksh) and the C shell (csh). Most sh scripts |
58 |
|
|
can be run by bash without modification. |
59 |
|
|
|
60 |
|
|
Bash offers several improvements over sh, including command line |
61 |
|
|
editing, unlimited size command history, job control, shell |
62 |
|
|
functions and aliases, indexed arrays of unlimited size and |
63 |
|
|
integer arithmetic in any base from two to 64. Bash is ultimately |
64 |
|
|
intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and |
65 |
|
|
Tools standard. |
66 |
|
|
|
67 |
|
|
%package doc |
68 |
|
|
Summary: Documentation for the GNU Bourne Again shell (bash) |
69 |
|
|
Group: Books/Computer books |
70 |
|
|
Requires: %{name} = %{version}-%{release} |
71 |
|
|
Obsoletes: bash3-doc < 3.2.48 |
72 |
|
|
Provides: bash3-doc |
73 |
|
|
|
74 |
|
|
%description doc |
75 |
|
|
This package provides documentation for GNU Bourne Again shell (bash). |
76 |
|
|
|
77 |
|
|
%prep |
78 |
|
|
%setup -q -a 2 |
79 |
|
|
mv doc/README . |
80 |
|
|
|
81 |
|
|
%patch1 -p1 -b .security |
82 |
|
|
%patch3 -p1 -b .profile |
83 |
|
|
# 20060126 warly obsolete exept maybe for the replacement of @ by kH, this will have to be checked |
84 |
|
|
#%patch4 -p1 -b .readline |
85 |
|
|
%patch6 -p1 -b .compat |
86 |
|
|
%patch1000 -p1 -b .strcoll_bugx |
87 |
|
|
%patch1003 -p1 -b .checkwinsize |
88 |
|
|
%patch1004 -p1 -b .lzma |
89 |
|
|
%patch1006 -p1 -b .format-security |
90 |
|
|
%patch100 -p0 -b .quote |
91 |
|
|
|
92 |
ahmad |
64454 |
%patch11 -p0 |
93 |
|
|
%patch12 -p0 |
94 |
|
|
%patch13 -p0 |
95 |
|
|
%patch14 -p0 |
96 |
|
|
%patch15 -p0 |
97 |
|
|
%patch16 -p0 |
98 |
ahmad |
72271 |
%patch17 -p0 |
99 |
|
|
%patch18 -p0 |
100 |
ahmad |
64454 |
|
101 |
pterjan |
229 |
%build |
102 |
|
|
|
103 |
ahmad |
55906 |
export CFLAGS="%{optflags} -Os" |
104 |
|
|
export CXXFLAGS=$CFLAGS |
105 |
pterjan |
229 |
export DEBUGGER_START_FILE="%{_datadir}/bashdb/bashdb-main.inc" |
106 |
|
|
|
107 |
|
|
%configure2_5x \ |
108 |
ahmad |
55906 |
--enable-command-timing \ |
109 |
pterjan |
229 |
--disable-rpath \ |
110 |
|
|
--enable-history \ |
111 |
|
|
--enable-job-control \ |
112 |
|
|
--enable-multibyte \ |
113 |
|
|
--enable-readline \ |
114 |
|
|
--with-installed-readline \ |
115 |
ahmad |
55906 |
--without-gnu-malloc \ |
116 |
|
|
--without-bash-malloc \ |
117 |
|
|
--disable-strict-posix-default \ |
118 |
|
|
--enable-select \ |
119 |
|
|
--enable-prompt-string-decoding \ |
120 |
|
|
--enable-process-substitution \ |
121 |
|
|
--enable-alias \ |
122 |
|
|
--enable-bang-history \ |
123 |
|
|
--enable-coprocesses \ |
124 |
|
|
--enable-directory-stack \ |
125 |
|
|
--enable-brace-expansion |
126 |
pterjan |
229 |
|
127 |
|
|
%make |
128 |
ahmad |
55906 |
|
129 |
pterjan |
229 |
# all tests must pass |
130 |
|
|
%check |
131 |
|
|
make check |
132 |
|
|
|
133 |
|
|
%install |
134 |
|
|
rm -rf %{buildroot} |
135 |
|
|
|
136 |
|
|
%makeinstall_std |
137 |
|
|
|
138 |
|
|
# beurk |
139 |
|
|
rm -rf %{buildroot}%{_datadir}/locale/en@boldquot/ %{buildroot}%{_datadir}/locale/en@quot/ |
140 |
|
|
|
141 |
|
|
#Sucks |
142 |
|
|
chmod +w doc/texinfo.tex |
143 |
|
|
chmod 755 examples/misc/aliasconv.* |
144 |
|
|
chmod 755 examples/misc/cshtobash |
145 |
|
|
chmod 755 %{buildroot}%{_bindir}/bashbug |
146 |
|
|
|
147 |
|
|
# Take out irritating ^H's from the documentation |
148 |
|
|
mkdir tmp_doc |
149 |
|
|
for i in `/bin/ls doc/` ; \ |
150 |
|
|
do cat doc/$i > tmp_doc/$i ; \ |
151 |
|
|
cat tmp_doc/$i | perl -p -e 's/.//g' > doc/$i ; \ |
152 |
|
|
rm tmp_doc/$i ; \ |
153 |
|
|
done |
154 |
|
|
rmdir tmp_doc |
155 |
|
|
|
156 |
|
|
mkdir -p %{buildroot}/bin |
157 |
|
|
pushd %{buildroot} && mv usr/bin/bash bin/bash && popd |
158 |
|
|
pushd %{buildroot}/bin && ln -s bash sh && popd |
159 |
|
|
pushd %{buildroot}/bin && ln -sf bash bash3 && popd |
160 |
|
|
|
161 |
|
|
# make builtins.1 and rbash.1 with bash.1 in place (fix mdv#51379) |
162 |
|
|
pushd doc |
163 |
|
|
mkdir tmp_fix_so |
164 |
|
|
cd tmp_fix_so |
165 |
|
|
cp ../builtins.1 ../rbash.1 . |
166 |
|
|
sed -e '/^.if \\n(zZ=1 .ig zZ/,/^.zZ/d' ../bash.1 > bash.1 |
167 |
|
|
soelim builtins.1 > ../builtins.1 |
168 |
|
|
sed -e '/^.if \\n(zY=1 .ig zY/,/^.zY/d' ../bash.1 > bash.1 |
169 |
|
|
soelim rbash.1 > ../rbash.1 |
170 |
|
|
popd |
171 |
blino |
249518 |
rm -rf doc/tmp_fix_so |
172 |
pterjan |
229 |
|
173 |
|
|
# make manpages for bash builtins as per suggestion in DOC/README |
174 |
|
|
cd doc |
175 |
|
|
sed -e ' |
176 |
|
|
/^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{ |
177 |
|
|
/^\.SH NAME/d |
178 |
|
|
s/^bash, // |
179 |
|
|
s/\\- bash built-in commands, see \\fBbash\\fR(1)$// |
180 |
|
|
s/,//g |
181 |
|
|
b |
182 |
|
|
} |
183 |
|
|
d |
184 |
|
|
' builtins.1 > man.pages |
185 |
|
|
install -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1 |
186 |
|
|
|
187 |
|
|
install -m 644 rbash.1 %{buildroot}%{_mandir}/man1/rbash.1 |
188 |
|
|
|
189 |
|
|
for i in `cat man.pages` ; do |
190 |
|
|
echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1 |
191 |
|
|
done |
192 |
|
|
|
193 |
|
|
# now turn man.pages into a filelist for the man subpackage |
194 |
|
|
|
195 |
|
|
cat man.pages |tr -s ' ' '\n' |sed ' |
196 |
|
|
1i\ |
197 |
|
|
%defattr(0644,root,root,0755) |
198 |
|
|
s:^:%{_mandir}/man1/: |
199 |
|
|
s/$/.1%{_extension}/ |
200 |
|
|
' > ../man.pages |
201 |
|
|
|
202 |
|
|
perl -p -i -e 's!.*/(printf|export|echo|pwd|test|kill).1%{_extension}!!' ../man.pages |
203 |
|
|
|
204 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/skel |
205 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/profile.d |
206 |
|
|
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.bashrc |
207 |
|
|
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/skel/.bash_profile |
208 |
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.bash_logout |
209 |
|
|
install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/profile.d/60alias.sh |
210 |
|
|
install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/bashrc |
211 |
|
|
install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/profile.d/95bash-extras.sh |
212 |
|
|
|
213 |
|
|
ln -s bash %{buildroot}/bin/rbash |
214 |
|
|
|
215 |
|
|
# These're provided by other packages |
216 |
|
|
rm -f %{buildroot}{%{_infodir}/dir,%{_mandir}/man1/{echo,export,kill,printf,pwd,test}.1} |
217 |
ahmad |
55906 |
|
218 |
pterjan |
229 |
cd .. |
219 |
|
|
|
220 |
|
|
install -m 644 doc/bash.info %{buildroot}%{_infodir}/ |
221 |
|
|
|
222 |
|
|
%find_lang %{name} |
223 |
|
|
|
224 |
|
|
# merges list |
225 |
|
|
cat man.pages %{name}.lang > files.list |
226 |
|
|
|
227 |
|
|
%clean |
228 |
|
|
rm -rf %{buildroot} |
229 |
|
|
|
230 |
|
|
%files -f files.list |
231 |
|
|
%defattr(-,root,root) |
232 |
|
|
%doc README |
233 |
|
|
%config(noreplace) %{_sysconfdir}/skel/.b* |
234 |
|
|
%{_sysconfdir}/profile.d/60alias.sh |
235 |
|
|
%{_sysconfdir}/profile.d/95bash-extras.sh |
236 |
|
|
%config(noreplace) %{_sysconfdir}/bashrc |
237 |
|
|
/bin/rbash |
238 |
|
|
/bin/bash |
239 |
|
|
/bin/bash3 |
240 |
|
|
/bin/sh |
241 |
|
|
%{_infodir}/bash.info* |
242 |
|
|
%{_mandir}/man1/bash.1* |
243 |
|
|
%{_mandir}/man1/rbash.1* |
244 |
|
|
%{_mandir}/man1/builtins.1* |
245 |
|
|
%{_mandir}/man1/bashbug.1* |
246 |
|
|
%{_bindir}/bashbug |
247 |
|
|
|
248 |
|
|
%files doc |
249 |
|
|
%defattr(-,root,root) |
250 |
|
|
%doc COMPAT NEWS NOTES POSIX CHANGES |
251 |
|
|
%doc examples |
252 |
|
|
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt |