source: projects/specs/trunk/b/bash/bash-vl.spec @ 8543

Revision 8543, 17.1 KB checked in by daisuke, 10 years ago (diff)

bash: update to 4.3.18

Line 
1%define bashversion 4.3
2%define patchlevel 18
3
4Summary:      The GNU Bourne Again shell (bash).
5Summary(ja):  GNU Bourne Again シェル (bash).
6
7Name:         bash
8Version:      %{bashversion}.%{patchlevel}
9Release:      1%{?_dist_release}
10
11Group:        System Environment/Shells
12License:      GPLv3+
13
14Vendor:       Project Vine
15Distribution: Vine Linux
16Packager:     daisuke
17
18Source0:      ftp://ftp.gnu.org/pub/gnu/bash/bash-%{bashversion}.tar.gz
19Source10:     bashrc-vine
20
21# Official upstream patches
22Patch1: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-001
23Patch2: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-002
24Patch3: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-003
25Patch4: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-004
26Patch5: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-005
27Patch6: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-006
28Patch7: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-007
29Patch8: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-008
30Patch9: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-009
31Patch10: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-010
32Patch11: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-011
33Patch12: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-012
34Patch13: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-013
35Patch14: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-014
36Patch15: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-015
37Patch16: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-016
38Patch17: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-017
39Patch18: ftp://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-018
40
41# Other patches
42Patch101: bash-2.02-security.patch
43Patch102: bash-2.03-paths.patch
44Patch103: bash-2.03-profile.patch
45Patch104: bash-2.05a-interpreter.patch
46Patch105: bash-2.05b-debuginfo.patch
47Patch106: bash-2.05b-manso.patch
48Patch107: bash-2.05b-pgrp_sync.patch
49Patch108: bash-2.05b-readline-oom.patch
50Patch109: bash-2.05b-xcc.patch
51Patch110: bash-3.2-audit.patch
52Patch111: bash-3.2-ssh_source_bash.patch
53Patch112: bash-bashbug.patch
54Patch113: bash-infotags.patch
55Patch114: bash-requires.patch
56Patch115: bash-setlocale.patch
57Patch116: bash-tty-tests.patch
58
59# 484809, check if interp section is NOBITS
60Patch117: bash-4.0-nobits.patch
61
62# Do the same CFLAGS in generated Makefile in examples
63Patch118: bash-4.1-examples.patch
64
65# Builtins like echo and printf won't report errors
66# when output does not succeed due to EPIPE
67Patch119: bash-4.1-broken_pipe.patch
68
69# Enable system-wide .bash_logout for login shells
70Patch120: bash-4.2-rc2-logout.patch
71
72# Static analyzis shows some issues in bash-2.05a-interpreter.patch
73Patch121: bash-4.2-coverity.patch
74
75# Don't call malloc in signal handler
76Patch122: bash-4.1-defer-sigchld-trap.patch
77
78# 799958, updated info about trap
79Patch123: bash-4.2-manpage_trap.patch
80
81# https://www.securecoding.cert.org/confluence/display/seccode/INT32-C.+Ensure+that+operations+on+signed+integers+do+not+result+in+overflow
82Patch125: bash-4.2-size_type.patch
83
84Buildroot:    %{_tmppath}/%{name}-%{version}-root
85BuildRequires: texinfo, bison, ncurses-devel, autoconf, gettext
86Obsoletes:    bash <= 1.14.7
87Obsoletes:    bash2
88
89
90%description
91Bash is a GNU project sh-compatible shell or command language
92interpreter. Bash (Bourne Again shell) incorporates useful features
93from the Korn shell (ksh) and the C shell (csh). Most sh scripts
94can be run by bash without modification.
95
96Bash offers several improvements over sh, including command line
97editing, unlimited size command history, job control, shell
98functions and aliases, indexed arrays of unlimited size and
99integer arithmetic in any base from two to 64. Bash is ultimately
100intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and
101Tools standard.
102
103
104%package doc
105Summary:  Documentation for the GNU Bourne Again shell (bash).
106Summary:  GNU Bourne Again シェル向けドキュメント
107Group:    Applications/Documentation
108Requires: %{name} = %{version}-%{release}
109
110Obsoletes: bash2-doc
111
112%description doc
113This is a separate documentation package for the GNU Bourne
114Again shell.
115
116
117%prep
118%setup -q -n %{name}-%{bashversion}
119
120# Official upstream patches
121%patch1 -p0 -b .001
122%patch2 -p0 -b .002
123%patch3 -p0 -b .003
124%patch4 -p0 -b .004
125%patch5 -p0 -b .005
126%patch6 -p0 -b .006
127%patch7 -p0 -b .007
128%patch8 -p0 -b .008
129%patch9 -p0 -b .009
130%patch10 -p0 -b .010
131%patch11 -p0 -b .011
132%patch12 -p0 -b .012
133%patch13 -p0 -b .013
134%patch14 -p0 -b .014
135%patch15 -p0 -b .015
136%patch16 -p0 -b .016
137%patch17 -p0 -b .017
138%patch18 -p0 -b .018
139
140# Other patches
141%patch101 -p1 -b .security
142%patch102 -p1 -b .paths
143%patch103 -p1 -b .profile
144%patch104 -p1 -b .interpreter
145%patch105 -p1 -b .debuginfo
146%patch106 -p1 -b .manso
147%patch107 -p1 -b .pgrp_sync
148%patch108 -p1 -b .readline_oom
149%patch109 -p1 -b .xcc
150%patch110 -p1 -b .audit
151%patch111 -p1 -b .ssh_source_bash
152%patch112 -p1 -b .bashbug
153%patch113 -p1 -b .infotags
154%patch114 -p1 -b .requires
155%patch115 -p1 -b .setlocale
156%patch116 -p1 -b .tty_tests
157%patch117 -p1 -b .nobits
158%patch118 -p1 -b .examples
159%patch119 -p1 -b .broken_pipe
160%patch120 -p1 -b .logout
161%patch121 -p1 -b .coverity
162%patch122 -p1 -b .defer_sigchld_trap
163%patch123 -p1
164%patch125 -p1 -b .size_type
165
166echo %{version} > _distribution
167echo %{release} |sed 's/vl.*//' > _patchlevel
168
169
170%build
171%configure --with-bash-malloc=no
172make CPPFLAGS="-D_GNU_SOURCE -DRECYCLES_PIDS `getconf LFS_CFLAGS`"
173
174%install
175rm -rf %{buildroot}
176
177# Fix bug #83776
178perl -pi -e 's,bashref\.info,bash.info,' doc/bashref.info
179
180make DESTDIR=$RPM_BUILD_ROOT install
181
182pushd $RPM_BUILD_ROOT
183 mkdir ./bin
184 mv ./usr/bin/bash ./bin/bash
185 ln -s bash ./bin/sh
186 rm -f .%{_infodir}/dir
187popd
188
189ln -s bash.1 %{buildroot}%{_mandir}/man1/sh.1
190
191# make manpages for bash builtins as per suggestion in DOC/README
192pushd doc
193sed -e '
194/^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{
195/^\.SH NAME/d
196s/^bash, //
197s/\\- bash built-in commands, see \\fBbash\\fR(1)$//
198s/,//g
199b
200}
201d
202' builtins.1 > man.pages
203for i in echo pwd test kill; do
204  perl -pi -e "s,$i,,g" man.pages
205  perl -pi -e "s,  , ,g" man.pages
206done
207
208install -c -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
209
210for i in `cat man.pages` ; do
211  echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1
212  chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man1/$i.1
213done
214
215mkdir -p $RPM_BUILD_ROOT/etc/profile.d/
216install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/etc/bashrc
217
218# Not for printf, false and true (conflict with coreutils)
219rm -f $RPM_BUILD_ROOT%{_mandir}/man1/printf.1
220rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/true.1
221rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/false.1
222
223popd
224
225%find_lang %{name}
226
227rm -rf $RPM_BUILD_ROOT/%{_docdir}/bash
228
229%clean
230rm -rf %{buildroot}
231
232# ***** bash doesn't use install-info. It's always listed in %{_infodir}/dir
233# to prevent prereq loops
234
235# post is in lua so that we can run it without any external deps.  Helps
236# for bootstrapping a new install.
237# Jesse Keating 2009-01-29 (code from Ignacio Vazquez-Abrams)
238%post -p <lua>
239bashfound = false;
240shfound = false;
241 
242f = io.open("/etc/shells", "r");
243if f == nil
244then
245  f = io.open("/etc/shells", "w");
246else
247  repeat
248    t = f:read();
249    if t == "/bin/bash"
250    then
251      bashfound = true;
252    end
253    if t == "/bin/sh"
254    then
255      shfound = true;
256    end
257  until t == nil;
258end
259f:close()
260 
261f = io.open("/etc/shells", "a");
262if not bashfound
263then
264  f:write("/bin/bash\n")
265end
266if not shfound
267then
268  f:write("/bin/sh\n")
269end
270f:close()
271
272%files -f %{name}.lang
273%defattr(-,root,root)
274%doc CHANGES COPYING
275%doc examples
276%config(noreplace) /etc/bashrc
277/bin/bash
278/bin/sh
279%{_infodir}/bash.info*
280%{_mandir}/*/*
281%{_mandir}/*/..1*
282%{_bindir}/bashbug
283
284
285%files doc
286%defattr(-,root,root)
287%doc COMPAT NEWS NOTES POSIX RBASH
288%doc examples/functions/ examples/misc/
289%doc examples/scripts.noah/ examples/scripts.v2/ examples/scripts/
290%doc examples/startup-files/ examples/complete/ examples/loadables/
291%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
292%doc doc/FAQ doc/INTRO doc/article.ms doc/README
293
294
295%changelog
296* Tue Jun 10 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 4.3.18-1
297- update to 4.3 patch level 18
298
299* Wed May 14 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 4.3.11-1
300- update to 4.3 patch level 11
301
302* Mon Mar 18 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.45-1
303- update to 4.2 patch level 45
304- import some patch from fedora package (122-127)
305  - patch122: Don't call malloc in signal handler
306  - patch123: #799958, updated info about trap
307  - patch124: #695656, block the signal and unblock it after the
308    new handler is installed
309  - patch125: Use unsigned type for size
310    https://www.securecoding.cert.org/confluence/display/seccode/INT32-C.+Ensure+that+operations+on+signed+integers+do+not+result+in+overflow
311  - patch126: #903833, Fix missing close(), fixes fd leaks
312
313* Sat Oct  6 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.2.37-2
314- remove postun lua script because bash will be never uninstalled
315
316* Mon Sep 17 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.37-1
317- update to 4.2 patch level 37
318
319* Fri Feb 17 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.20-1
320- update to 4.2 patch level 20
321
322* Tue Apr 12 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 4.2.8-1
323- update to 4.2 patch level 8
324- use lua script in post/postun
325- update patches from fedora
326
327* Fri Sep 03 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 4.1-1
328- update to 4.1 patch level 7
329
330* Fri Mar  5 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.2-9
331- check if /bin/grep exists on %%post script
332
333* Fri Feb 12 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.2-8
334- rebuilt with gcc-4.4.3-3 on ppc
335
336* Tue Feb  2 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.2-7
337- rebuilt with new toolchain
338
339* Fri Dec  4 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.2-6
340- revert changes on 3.2-5 (avoid a nasty dependency loop on bootstrapping)
341
342* Fri Dec  4 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.2-5
343- add Requires(post): grep
344
345* Sat Oct 24 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.2-4
346- remove obsolete /bin/bash2 entry from /etc/shells
347
348* Mon Apr 27 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2-3
349- add Requires(post): ncurses (should be added by find-requires..)
350
351* Sun Mar 29 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2-2
352- add upstream patch (from 040 to 048)
353- build against ncurses-devel (libtinfo)
354- spec in utf-8
355
356* Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.2-1vl5
357- added upstream patch (from 026 to 039)
358- added Japanese summary
359- applied new versioning policy
360
361* Fri Jan 18 2008 Shu KONNO <owa@bg.wakwak.com> 3.2-0vl2
362- rebuilt with libtermcap-devel
363
364* Fri Oct 26 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2-0vl1
365- new upstream release
366- add upstream patch (from 001 to 025)
367- remove Provides: bash2
368
369* Wed May 09 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.05b-0vl4
370- rebuilt with new toolchain
371
372* Mon Sep 11 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.05b-0vl3
373- change doc Group to Applications/Documentation. <BTS:VineLinux:163>
374- quote CPPFLAGS to avoid configure error. <BTS:VineLinux:173>
375
376* Mon Jun 28 2004 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 2.05b-0vl2
377- Don't read /etc/profile.d/*.sh in /etc/bashrc; done in /etc/profile
378
379* Wed Mar 10 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.05b-0vl1
380- update to 2.05b
381- rebuild with new toolchains
382- add make check
383- add %postun script based on Fedora development
384- README file moved doc package
385- update Patch5 and Patch8 from Fedora development
386- change Patch6
387- remove Patch2 and Patch100 (bash-2.05b supports multibyte string)
388- add Patch11--39 from Fedora development 2.05b-36
389  * Tim Waugh <twaugh@redhat.com>
390  - Fix parameter expansion in multibyte locales (bug #112657).
391  - Speed up UTF-8 command-line redrawing in the common case (bug #102353,
392    bug #110777).
393  - Apply upstream patches (bug #109269 among others).
394  - Fix bash.info (bug #83776).
395  - Add bash205b-007 patch to fix bug #106876.
396  - Avoid crashing on multibyte input when locale is set incorrectly
397    (bug #74266).
398  - LFS support (bug #103627).
399  - Fix completion display when multibyte or control characters are to be
400    shown (bug #90201).
401  - Fix a warning message (bug #79629).
402  - Don't build with AFS support (bug #86514).
403  - Don't explicitly strip binaries (bug #85995).
404  - Really fix bug #83331 for good.
405  - Fix builtins.1.
406  - Actually apply the patch (bug #83331).
407  - Fix history/UTF-8 bug (bug #83331).
408  - More tab-completion fixing (bug #72512).
409  - Force pgrp synchronization (bug #81653).
410  - Prevent prompt overwriting output (bug #74383).
411  - Fix '-rbash' (bug #78455).
412  - Add readline-init patch (bug #74925).
413  - Add the (4) patches from ftp.gnu.org (bug #75888, bug #72512).
414  - Ship '.' man page, which doesn't get picked up by glob.
415  - Locale shell variables fix (bug #74701).
416  * Elliot Lee <sopwith@redhat.com>
417  - (patch26) Don't call 'size' in makefile. Pointless, and interferes with
418    cross compiles.
419
420* Wed Oct  9 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 2.05-0vl1
421- update to 2.05
422- add README.jpatch to %doc
423- remove patch4 (bash2): revert command name in man pages to "bash"
424  - fix perl command to remove man pages conflict with sh-utils
425- remove section of config.h.in from patch0 to prevent remake of configure
426- change patch9: define in config-top.h to avoid conflict with patch100
427- remove patches 7, 10 & 101
428
429* Mon Apr  8 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp> 2.04-1vl14
430- made a link for man sh
431
432* Thu Nov 15 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.04-1vl13
433- added missing %%post and %%triggerpostun section
434
435* Sun Jul 15 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
436- 2.04-1vl12
437- now bash2 is finally bash
438
439* Sun Jul 15 2001 Daisuke SUZUKI <daisuke@linux.or.jp> 2.04-1vl11
440- build for Playstation2
441
442* Mon Jun 11 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
443- 2.04-1vl10
444- Provides: bash = %%{version}
445
446* Thu Jun 07 2001 Satoshi MACHINO  <machino@vinelinux.org> 2.04-1vl9
447- added Provides: bash
448
449* Thu Jun 07 2001 Satoshi MACHINO  <machino@vinelinux.org> 2.04-1vl8
450- Obsoletes: bash
451- changed Copyright to License
452
453* Fri Dec 29 2000 Lisa Sagami <czs14350@mb.infoweb.ne.jp>
454- 2.04-1vl7
455- deleted: /etc/profile.d/alias.sh (which we have in /etc/skel/.bashrc)
456- corrected: bashrc-vine -> bashrc
457
458* Sat Dec 16 2000 Satoshi MACHINO  <machino@vinelinux.org> 2.04-1vl6
459- combined bash-1.x and bash-2.x packages
460- added some patches from bash-2.04-13mdk
461
462* Sun Dec 10 2000 Jun Nishii <jun@vinelinux.org> 2.04-1vl5
463- fix spec macros
464- added tests
465
466* Sun Nov 19 2000 Satoshi MACHINO <machino@vinelinux.org> 2.04-1vl5
467- build with gcc-2.95.3
468- partially used rpmmacros
469
470* Fri Sep  8 2000 Jun Nishii <jun@vinelinux.org>
471- minor bug fix in spec file
472
473* Sun Aug 27 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
474- 2.04-1vl3
475- modified %install and %files section to handle compressed man page(s)
476
477* Thu Mar 23 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
478- added pcomplete patch to fix complete if the candidate list is NULL.
479
480* Wed Mar 22 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
481- updated to 2.04
482
483* Tue Sep 14 1999 Dale Lovelace <dale@redhat.com>
484- Remove annoying ^H's from documentation
485
486* Fri Jul 16 1999 Ken Estes <kestes@staff.mail.com>
487- patch to detect what executables are required by a script.
488
489* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
490- auto rebuild in the new build environment (release 4)
491
492* Fri Mar 19 1999 Jeff Johnson <jbj@redhat.com>
493- strip binaries.
494- include bash-doc correctly.
495
496* Thu Mar 18 1999 Preston Brown <pbrown@redhat.com>
497- fixed post/postun /etc/shells work.
498
499* Thu Mar 18 1999 Cristian Gafton <gafton@redhat.com>
500- updated again text in the spec file
501
502* Mon Feb 22 1999 Jeff Johnson <jbj@redhat.com>
503- updated text in spec file.
504- update to 2.03.
505
506* Fri Feb 12 1999 Cristian Gafton <gafton@redhat.com>
507- build it as bash2 instead of bash
508
509* Tue Feb  9 1999 Bill Nottingham <notting@redhat.com>
510- set 'NON_INTERACTIVE_LOGIN_SHELLS' so profile gets read
511
512* Thu Jan 14 1999 Jeff Johnson <jbj@redhat.com>
513- rename man pages in bash-doc to avoid packaging conflicts (#606).
514
515* Wed Dec 02 1998 Cristian Gafton <gafton@redhat.com>
516- patch for the arm
517- use $RPM_ARCH-redhat-linux as the build target
518
519* Tue Oct  6 1998 Bill Nottingham <notting@redhat.com>
520- rewrite %pre, axe %postun (to avoid prereq loops)
521
522* Wed Aug 19 1998 Jeff Johnson <jbj@redhat.com>
523- resurrect for RH 6.0.
524
525* Sun Jul 26 1998 Jeff Johnson <jbj@redhat.com>
526- update to 2.02.1
527
528* Thu Jun 11 1998 Jeff Johnson <jbj@redhat.com>
529- Package for 5.2.
530
531* Mon Apr 20 1998 Ian Macdonald <ianmacd@xs4all.nl>
532- added POSIX.NOTES doc file
533- some extraneous doc files removed
534- minor .spec file changes
535
536* Sun Apr 19 1998 Ian Macdonald <ianmacd@xs4all.nl>
537- upgraded to version 2.02
538- Alpha, MIPS & Sparc patches removed due to lack of test platforms
539- glibc & signal patches no longer required
540- added documentation subpackage (doc)
541
542* Fri Nov 07 1997 Donnie Barnes <djb@redhat.com>
543- added signal handling patch from Dean Gaudet <dgaudet@arctic.org> that
544  is based on a change made in bash 2.0.  Should fix some early exit
545  problems with suspends and fg.
546
547* Mon Oct 20 1997 Donnie Barnes <djb@redhat.com>
548- added %clean
549
550* Mon Oct 20 1997 Erik Troan <ewt@redhat.com>
551- added comment explaining why install-info isn't used
552- added mips patch
553
554* Fri Oct 17 1997 Donnie Barnes <djb@redhat.com>
555- added BuildRoot
556
557* Tue Jun 03 1997 Erik Troan <ewt@redhat.com>
558- built against glibc
Note: See TracBrowser for help on using the repository browser.