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

Revision 8436, 16.4 KB checked in by daisuke, 10 years ago (diff)

bash: update to 4.3.11

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