bash-vl.spec 15 KB

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