source: projects/specs/branches/6/b/bash/bash-vl.spec @ 3421

Revision 3421, 15.0 KB checked in by daisuke, 13 years ago (diff)

bash:

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