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

Revision 6039, 16.1 KB checked in by daisuke, 12 years ago (diff)

4.2.20

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