]> git.pld-linux.org Git - packages/bash.git/blob - bash.spec
- rel 2; additional non-upstream hardening (from FC)
[packages/bash.git] / bash.spec
1 #
2 # Conditional build:
3 %bcond_without  static          # don't build static version
4 %bcond_with     bash_history    # build with additional history in /var/log/bash_hist ;)
5 %bcond_without  tests   # do not perform "make test"
6
7 # NOTE: when updating patchleve, do not forget to update 'sources' file!
8 %define         ver             4.3
9 %define         patchlevel      26
10 %define         rel             2
11 Summary:        GNU Bourne Again Shell (bash)
12 Summary(fr.UTF-8):      Le shell Bourne Again de GNU
13 Summary(pl.UTF-8):      Powłoka GNU Bourne Again Shell (bash)
14 Name:           bash
15 Version:        %{ver}%{?patchlevel:.%{patchlevel}}
16 Release:        %{rel}%{?with_bash_history:inv}
17 License:        GPL
18 Group:          Applications/Shells
19 Source0:        http://ftp.gnu.org/gnu/bash/%{name}-%{ver}.tar.gz
20 # Source0-md5:  81348932d5da294953e15d4814c74dd1
21 Source1:        %{name}rc
22 Source2:        %{name}-skel-.bash_logout
23 Source3:        %{name}-skel-.bash_profile
24 Source4:        %{name}-skel-.bashrc
25 Source5:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
26 # Source5-md5:  d2aacf89c4a444c5da648da69afdb01a
27 Patch0:         %{name}-paths.patch
28 Patch1:         %{name}-security.patch
29 Patch2:         %{name}-autoconf.patch
30 Patch3:         %{name}-info.patch
31 Patch4:         %{name}-profile.patch
32 Patch5:         %{name}-requires.patch
33 Patch6:         %{name}-compat.patch
34 Patch8:         %{name}-sighup.patch
35 Patch9:         %{name}-backup_history.patch
36 Patch10:        %{name}-act_like_sh.patch
37 Patch11:        %{name}-elinks_cont.patch
38 Patch12:        %{name}-pl.po-update.patch
39 # http://www.openwall.com/lists/oss-security/2014/09/25/13 ; patches from FC
40 Patch13:        bash-4.2-cve-2014-7169-1.patch
41 Patch14:        bash-4.2-cve-2014-7169-2.patch
42 %patchset_source -f https://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-%03g 1 %{patchlevel}
43 URL:            http://www.gnu.org/software/bash/
44 BuildRequires:  autoconf
45 BuildRequires:  automake
46 BuildRequires:  bison
47 BuildRequires:  ncurses-devel >= 5.2
48 BuildRequires:  readline-devel >= 6.3
49 BuildRequires:  rpmbuild(macros) >= 1.462
50 BuildRequires:  sed >= 4.0
51 BuildRequires:  texinfo
52 %if %{with static}
53 # Require static library only for static build
54 BuildRequires:  glibc-static >= 2.2
55 BuildRequires:  ncurses-static >= 5.2
56 BuildRequires:  readline-static >= 6.3
57 %endif
58 Requires:       readline >= 6.3
59 Requires:       setup >= 2.4.6-2
60 Obsoletes:      bash-doc
61 Obsoletes:      bash2
62 Obsoletes:      bash2-doc
63 Obsoletes:      etcskel
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %description
67 Bash is a GNU project sh-compatible shell or command language
68 interpreter. Bash (Bourne Again shell) incorporates useful features
69 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
70 be run by bash without modification. Bash offers several improvements
71 over sh, including command line editing, unlimited size command
72 history, job control, shell functions and aliases, indexed arrays of
73 unlimited size and integer arithmetic in any base from two to 64. Bash
74 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
75 Shell and Tools standard. Bash is the default shell for Linux
76 Mandrake. You should install bash because of its popularity and power.
77 You'll probably end up using it.
78
79 %description -l es.UTF-8
80 Bash es un interpretador de comandos compatible con sh, que ejecuta
81 comandos leídos de la entrada padrón o de un archivo. Bash también
82 incorpora características útiles de las shells Korn y C (ksh y csh).
83 Bash ha sido desarrollado para ser una adición compatible con la
84 especificación IEEE Posix para shells y herramientas (IEEE Working
85 Group 1003.2).
86
87 %description -l de.UTF-8
88 Bash ist eine sh-kompatible Shell und Kommandosprache aus dem
89 GNU-Projekt. Bash (Bourne Again Shell) vereinigt die nützlichen
90 Features aus der Korn-Shell (ksh) und der C-Shell (csh). Die meisten
91 sh-Skripte laufen ohne Änderungen auf bash. Bash hat viele
92 Erweiterungen im Vergleich zur "normalen" sh, wie z.B.
93 Kommandozeilenbearbeitung, unbeschränkte Größe der command-history,
94 Job-Kontrolle, Shell-Funktionen und -Aliase, unbegrenzt große
95 indizierte Arrays und Integer-Arithmetik in einer Basis von 2 bis 64.
96 Hauptziel von bash ist es, den IEEE POSIX P1003.2/ISO 9945.2 Shell-
97 und Tools-Standard einzuhalten. Bash ist die Standard-Shell für Linux
98 Mandrake.
99
100 %description -l fr.UTF-8
101 Bash est un shell (interpréteur de commande) du projet GNU, compatible
102 avec le shell historique sh. Bash (Bourne Again SHell) comprend de
103 nombreuses fonctionnalités du Korn SHell (ksh) et du C SHell (csh). La
104 plupart des scripts sh sont exécutables sans modifications. Bash
105 comprend nombre d'améliorations par rapport à sh : édition de la ligne
106 de commande, historique illimité, contrôle des processus
107 d'arrière-plan, fonctions de shell, alias, tableaux indexés de taille
108 illimitée et calcul sur des entiers dans n'importe quelle base de 2 à
109 64. Bash est conforme au standard IEEE POSIX P1003.2/ISO 9945.2 Shell
110 and Tools. Bash est le shell par défaut de Mandrake. Vous devriez
111 l'installer du fait de sa puissance et de sa popularité. Vous finirez
112 probablement par l'utiliser.
113
114 %description -l pl.UTF-8
115 Bash (Bourne Again SHell) jest projektem GNU powłoki kompatybilnej z
116 sh oraz interpretera języka poleceń. Posiada użyteczne właściwości
117 powłok Korn (ksh) i C (csh). Większość skryptów sh może być
118 uruchamiana w bashu bez modyfikacji. Oferuje on kilka ulepszeń w
119 stosunku do sh, włączając edycję linii poleceń, nieograniczony rozmiar
120 historii poleceń, funkcje i aliasy, indeksowane tablice
121 nieograniczonych rozmiarów oraz arytmetykę całkowitoliczbową o
122 dowolnej podstawie od 2 do 64. W zamierzeniu ostatecznie ma być zgodny
123 ze standardem IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools.
124
125 %description -l pt_BR.UTF-8
126 Bash é um interpretador de comandos compatível com sh, que executa
127 comandos lidos da entrada padrão ou de um arquivo. Bash também
128 incorpora características úteis das shells Korn e C (ksh e csh). Bash
129 tem sido desenvolvido para ser uma implementação compatível com a
130 especificação IEEE Posix para shells e ferramentas (IEEE Working Group
131 1003.2).
132
133 %description -l ru.UTF-8
134 Bash - это sh-совместимый интерпретатор командного языка (shell),
135 исполняющий команды, поступающие со стандартного ввода или из файла.
136 Bash включает полезные расширения из интерпретаторов Korn и C shell
137 (ksh и csh).
138
139 Bash разрабатывается как реализация, отвечающая IEEE Posix Shell and
140 Tools specification (IEEE Working Group 1003.2).
141
142 %description -l tr.UTF-8
143 Bash standart girişten ya da bir dosyadan komut okuyup çalıştıran sh
144 uyumlu bir komut dili yorumlayıcısıdır. Aynı zamanda Korn ve C
145 kabuklarının (ksh ve csh) kullanışlı özelliklerini de kapsar. Bash,
146 IEEE Posix Kabuk ve Araç ayrıntılarına (IEEE Working Group 1003.2)
147 uyumlu bir uygulama olarak tasarlanmıştır.
148
149 %description -l uk.UTF-8
150 Bash - це sh-сумістний інтерпретатор командної мови (shell),
151 виконуючий команди зі стандартного вводу або з файла. Bash містить
152 користні розширення з інтерпретаторів Korn та C shell (ksh та csh).
153
154 Bash розроблявся як реалізація, що відповідає IEEE Posix Shell and
155 Tools specification (IEEE Working Group 1003.2).
156
157 %package static
158 Summary:        Statically linked GNU Bourne Again Shell (bash)
159 Summary(pl.UTF-8):      Statycznie skonsolidowany GNU Bourne Again Shell (bash)
160 Group:          Applications/Shells
161 Requires:       %{name} = %{version}-%{release}
162
163 %description static
164 Bash is a GNU project sh-compatible shell or command language
165 interpreter. Bash (Bourne Again shell) incorporates useful features
166 from the Korn shell (ksh) and the C shell (csh). Most sh scripts can
167 be run by bash without modification. Bash offers several improvements
168 over sh, including command line editing, unlimited size command
169 history, job control, shell functions and aliases, indexed arrays of
170 unlimited size and integer arithmetic in any base from two to 64. Bash
171 is ultimately intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
172 Shell and Tools standard. Bash is the default shell for Linux
173 Mandrake. You should install bash because of its popularity and power.
174 You'll probably end up using it. This package contains statically
175 linked version of bash.
176
177 %description static -l pl.UTF-8
178 Bash jest zaawansowaną powłoką, która wykonuje komendy czytane ze
179 standardowego wejścia (stdin) lub z pliku. Posiada właściwości powłok
180 Korn i C (ksh i csh). Bash jest również zaimplementowany IEEE Posix
181 Shell oraz jest zgodny ze specyfikacją - IEEE Working Group 1003.2. W
182 tym pakiecie jest wersja basha skonsolidowana statycznie.
183
184 %prep
185 %setup -q -n %{name}-%{ver} -a5
186 # official patches
187 %{?patchlevel:%patchset_patch 1 %{patchlevel}}
188 %patch0 -p1
189 %patch1 -p1
190 %patch2 -p1
191 %patch3 -p1
192 %patch4 -p1
193 %patch5 -p1
194 %patch6 -p1
195 %patch8 -p1
196 %{?with_bash_history:%patch9 -p1}
197 %patch10 -p1
198 %patch11 -p1
199 %patch12 -p1
200 %patch13 -p0
201 %patch14 -p0
202
203 sed -i -e 's#/usr/bin/printf#/bin/printf#g' tests/intl2.sub
204
205 %build
206 cp -f /usr/share/automake/config.* support
207 %{__autoconf}
208 for mode in %{?with_static:static} shared; do
209 %configure \
210         --enable-alias \
211         --enable-help-builtin \
212         --enable-history \
213         --enable-job-control \
214         --enable-restricted \
215         --enable-readline \
216         --with-curses \
217         --enable-extended-glob \
218         --enable-dparen-arithmetic \
219         --enable-separate-helpfiles \
220         --without-bash-malloc \
221         $([ "$mode" = "static" ] && echo "--enable-static-link") \
222         --with-installed-readline
223
224 %{__make} \
225         DEFS="-DHAVE_CONFIG_H -D_GNU_SOURCE"
226
227 [ "$mode" = "static" ] && mv -f bash bash.static
228 done
229
230 %{?with_tests:%{__make} tests}
231
232 %install
233 rm -rf $RPM_BUILD_ROOT
234 install -d $RPM_BUILD_ROOT{/bin,/etc/skel,%{_datadir}/%{name}}
235 %{?with_bash_history:install -d $RPM_BUILD_ROOT/var/log/bash_hist}
236
237 %{__make} install \
238         DESTDIR=$RPM_BUILD_ROOT
239
240 mv -f $RPM_BUILD_ROOT%{_bindir}/bash $RPM_BUILD_ROOT/bin
241 %{?with_static:install bash.static $RPM_BUILD_ROOT/bin}
242
243 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bashrc
244 echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/man1/rbash.1
245
246 for d in es fr it ja ko nl pl ; do
247         install -d $RPM_BUILD_ROOT%{_mandir}/$d/man1
248         install man/$d/* $RPM_BUILD_ROOT%{_mandir}/$d/man1
249         echo .so bash.1 > $RPM_BUILD_ROOT%{_mandir}/$d/man1/rbash.1
250 done
251
252 ln -sf bash $RPM_BUILD_ROOT/bin/rbash
253
254 install %{SOURCE2} $RPM_BUILD_ROOT/etc/skel/.bash_logout
255 install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.bash_profile
256 install %{SOURCE4} $RPM_BUILD_ROOT/etc/skel/.bashrc
257 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
258
259 # use our bugtracker, upstream will ignore reports from this anyway
260 rm -f $RPM_BUILD_ROOT%{_bindir}/bashbug
261
262 %find_lang %{name}
263
264 %clean
265 rm -rf $RPM_BUILD_ROOT
266
267 %post   -p <lua>
268 %lua_add_etc_shells /bin/bash /bin/rbash
269 os.execute("/usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1")
270
271 %preun  -p <lua>
272 if arg[2] == 0 then
273         %lua_remove_etc_shells /bin/bash /bin/rbash
274 end
275
276 %postun -p      /sbin/postshell
277 -/usr/sbin/fix-info-dir -c %{_infodir}
278
279 %post static -p <lua>
280 %lua_add_etc_shells /bin/bash.static
281
282 %preun static -p <lua>
283 if arg[2] == 0 then
284         %lua_remove_etc_shells /bin/bash.static
285 end
286
287 %files -f %{name}.lang
288 %defattr(644,root,root,755)
289 %doc CHANGES NEWS README doc/{FAQ,INTRO}
290
291 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bashrc
292 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_logout
293 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bash_profile
294 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.bashrc
295
296 %attr(755,root,root) /bin/bash
297 %attr(755,root,root) /bin/rbash
298
299 %{?with_bash_history:%attr(1733,root,root) %dir /var/log/bash_hist}
300 %{_infodir}/bash.info*
301 %{_mandir}/man1/*
302 %lang(es) %{_mandir}/es/man1/*
303 %lang(fr) %{_mandir}/fr/man1/*
304 %lang(it) %{_mandir}/it/man1/*
305 %lang(ja) %{_mandir}/ja/man1/*
306 %lang(ko) %{_mandir}/ko/man1/*
307 %lang(nl) %{_mandir}/nl/man1/*
308 %lang(pl) %{_mandir}/pl/man1/*
309 %dir %{_datadir}/%{name}
310 %doc %{_datadir}/%{name}/*
311
312 %if %{with static}
313 %files static
314 %defattr(644,root,root,755)
315 %attr(755,root,root) /bin/bash.static
316 %endif
This page took 0.064002 seconds and 3 git commands to generate.