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