ksh-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. %global releasedate 2011-06-30
  2. Name: ksh
  3. Summary: The Original ATT Korn Shell
  4. Summary(ja): オリジナルの ATT Korn Shell
  5. URL: http://www.kornshell.com/
  6. Group: System Environment/Shells
  7. License: CPL
  8. Version: 20110630
  9. Release: 1%{?_dist_release}
  10. Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
  11. Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
  12. Source3: kshrc.rhs
  13. Source4: dotkshrc
  14. #expected results of test suite
  15. #Source5: expectedresults.log
  16. #don't use not wanted/needed builtins - Fedora/RHEL specific
  17. Patch1: ksh-20070328-builtins.patch
  18. #fix regression test suite to be usable during packagebuild - Fedora/RHEL specific
  19. Patch2: ksh-20100826-fixregr.patch
  20. # for ksh < 2011-08-03
  21. Patch3: ksh-20110630-ifsfix.patch
  22. # sent upstream, for ksh <= 2011-08-12
  23. Patch4: ksh-20110630-fixkill.patch
  24. Patch5: ksh-20110630-tmoutfix.patch
  25. Patch6: ksh-20110630-joblimit.patch
  26. Patch7: ksh-20110630-dontstop.patch
  27. Patch8: ksh-20110630-ddotfix.patch
  28. Patch9: ksh-20110630-histfix.patch
  29. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  30. Conflicts: pdksh
  31. Requires: coreutils, glibc-common, diffutils
  32. BuildRequires: bison
  33. # regression test suite uses 'ps' from procps
  34. BuildRequires: procps
  35. Requires(post): grep, coreutils
  36. Requires(preun): grep, coreutils
  37. %description
  38. KSH-93 is the most recent version of the KornShell by David Korn of
  39. AT&T Bell Laboratories.
  40. KornShell is a shell programming language, which is upward compatible
  41. with "sh" (the Bourne Shell).
  42. %prep
  43. %setup -q -c
  44. %setup -q -T -D -a 1
  45. %patch1 -p1 -b .builtins
  46. %patch2 -p1 -b .fixregr
  47. %patch3 -p1 -b .ifsfix
  48. %patch4 -p1 -b .fixkill
  49. %patch5 -p1 -b .tmoutfix
  50. %patch6 -p1 -b .joblimit
  51. %patch7 -p1 -b .dontstop
  52. %patch8 -p1 -b .ddotfix
  53. %patch9 -p1 -b .histfix
  54. #/dev/fd test does not work because of mock
  55. sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
  56. %build
  57. ./bin/package
  58. ./bin/package make mamake ||:
  59. ./bin/package make mamake ||:
  60. export CCFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
  61. export CC=gcc
  62. ./bin/package "make"
  63. cp lib/package/LICENSES/cpl LICENSE
  64. %install
  65. rm -rf $RPM_BUILD_ROOT
  66. mkdir -p $RPM_BUILD_ROOT{/bin,%{_bindir},%{_mandir}/man1}
  67. install -c -m 755 arch/*/bin/ksh $RPM_BUILD_ROOT/bin/ksh
  68. install -c -m 755 arch/*/bin/shcomp $RPM_BUILD_ROOT%{_bindir}/shcomp
  69. install -c -m 644 arch/*/man/man1/sh.1 $RPM_BUILD_ROOT%{_mandir}/man1/ksh.1
  70. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/skel
  71. install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.kshrc
  72. install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kshrc
  73. %post
  74. if [ ! -f /etc/shells ]; then
  75. echo "/bin/ksh" > /etc/shells
  76. else
  77. if ! grep -q '^/bin/ksh$' /etc/shells ; then
  78. echo "/bin/ksh" >> /etc/shells
  79. fi
  80. fi
  81. %postun
  82. if [ ! -f /bin/ksh ]; then
  83. sed -i '/^\/bin\/ksh$/ d' /etc/shells
  84. fi
  85. %verifyscript
  86. echo -n "Looking for ksh in /etc/shells... "
  87. if ! grep '^/bin/ksh$' /etc/shells > /dev/null; then
  88. echo "missing"
  89. echo "ksh missing from /etc/shells" >&2
  90. else
  91. echo "found"
  92. fi
  93. %files
  94. %defattr(-, root, root,-)
  95. %doc src/cmd/ksh93/COMPATIBILITY src/cmd/ksh93/RELEASE src/cmd/ksh93/TYPES LICENSE
  96. /bin/ksh
  97. /usr/bin/shcomp
  98. %{_mandir}/man1/*
  99. %config(noreplace) %{_sysconfdir}/skel/.kshrc
  100. %config(noreplace) %{_sysconfdir}/kshrc
  101. %clean
  102. rm -rf $RPM_BUILD_ROOT
  103. %changelog
  104. * Sat Dec 24 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 20110630-1
  105. - initial build for VineSeed
  106. * Wed Dec 07 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-9
  107. - do not crash when browsing through history containing comment (#733813)
  108. * Wed Dec 07 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-8
  109. - do not crash when two subseguent dots are used in variable or command name (#733544)
  110. * Mon Dec 05 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-7
  111. - fix: ksh can prematurely exit without crash or any error
  112. - make spec work in epel
  113. * Thu Nov 10 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-6
  114. - add files to %%doc
  115. * Thu Oct 06 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-5
  116. - ksh sometimes returns wrong exit code when pid numbers are being recycled
  117. * Tue Oct 04 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-4
  118. - restore tty settings after timed out read (#572291)
  119. * Fri Aug 12 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-3
  120. - do not crash when killing last bg job when there is not any
  121. * Wed Aug 03 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-2
  122. - fix: IFS manipulation in a function can cause crash
  123. * Fri Jul 01 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110630-1
  124. - ksh updated to 2011-06-30
  125. * Wed Jun 08 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110505-2
  126. - fix: resume of suspended process using pipes does not work (#708909)
  127. * Mon May 09 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110505-1
  128. - ksh updated to 2011-05-05
  129. * Fri Apr 29 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110428-1
  130. - ksh updated to 2011-04-28
  131. * Mon Apr 18 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110415-1
  132. - ksh updated to 2011-04-15
  133. * Tue Mar 29 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110208-3
  134. - fix array definition being treated as fixed array
  135. - fix suspend crashing ksh
  136. * Mon Mar 07 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110208-2
  137. - fix ( ) compound list altering environment
  138. * Wed Feb 09 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110208-1
  139. - ksh updated to 2011-02-08
  140. * Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20110202-2
  141. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  142. * Fri Feb 04 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110202-1
  143. - ksh updated to 2011-02-02
  144. * Wed Feb 02 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110131-1
  145. - ksh updated to 2011-01-31
  146. * Fri Jan 28 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110127-1
  147. - ksh updated to 2011-01-27
  148. * Thu Jan 20 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110118-1
  149. - ksh updated to 2011-01-18
  150. * Mon Jan 17 2011 Michal Hlavinka <mhlavink@redhat.com> - 20110104-1
  151. - ksh updated to 2011-01-04
  152. * Thu Dec 23 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101212-2.20101122
  153. - found ugly regression, reverting to 2010-11-22 (with io race patch) for now
  154. * Thu Dec 16 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101212-1
  155. - ksh updated to 2010-12-12
  156. * Mon Dec 06 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101201-2
  157. - fix file io race condition when file was created, but still does not exist
  158. * Fri Dec 03 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101201-1
  159. - ksh updated to 2010-12-01
  160. * Tue Nov 23 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101122-1
  161. - ksh updated to 2010-11-22
  162. * Mon Nov 01 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101026-1
  163. - ksh updated to 2010-10-26
  164. * Tue Oct 12 2010 Michal Hlavinka <mhlavink@redhat.com> - 20101010-1
  165. - ksh updated to 2010-10-10
  166. * Fri Oct 08 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100924-2
  167. - disable only known to be broken builtins, let other enabled
  168. - skip regression tests if /dev/fd is missing
  169. * Tue Sep 28 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100924-1
  170. - ksh updated to 2010-09-24
  171. * Mon Aug 30 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100826-1
  172. - ksh updated to 2010-08-26
  173. - make regression test suite usable during package build
  174. * Fri Aug 13 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100811-1
  175. - ksh updated to 2010-08-11
  176. * Thu Jul 08 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100701-1
  177. - updated to 2010-07-01
  178. * Fri Jun 25 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100621-1
  179. - updated to 2010-06-21
  180. * Tue Jun 15 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100527-2
  181. - add shcomp for shell compiling
  182. * Thu Jun 10 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100527-1
  183. - updated to 2010-05-27
  184. * Mon May 31 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-6
  185. - add pathmunge to /etc/kshrc
  186. * Wed May 05 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-5
  187. - fix rare cd builtin crash (#578582)
  188. * Wed May 05 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-4
  189. - fix infinite loop when whence builtin is used with -q option (#587127)
  190. - fix stdin for double command substitution (#584007)
  191. * Mon Mar 29 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-3
  192. - fix typo in last patch
  193. * Fri Mar 26 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-2
  194. - restore tty settings after timed out read for utf-8 locale
  195. * Wed Mar 10 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100309-1
  196. - updated to 2010-03-09
  197. - fix mock building - detection of /dev/fd/X
  198. * Mon Jan 04 2010 Michal Hlavinka <mhlavink@redhat.com> - 20100202-1
  199. - updated to 2010-02-02
  200. * Mon Jan 04 2010 Michal Hlavinka <mhlavink@redhat.com> - 20091224-1
  201. - updated to 2009-12-24
  202. * Mon Dec 07 2009 Michal Hlavinka <mhlavink@redhat.com> - 20091206-1
  203. - updated to 2009-12-06
  204. * Fri Dec 04 2009 Michal Hlavinka <mhlavink@redhat.com> - 20091130-1
  205. - updated to 2009-11-30
  206. * Wed Nov 18 2009 Michal Hlavinka <mhlavink@redhat.com> - 20091021-1
  207. - updated to 2009-10-21
  208. * Thu Aug 27 2009 Michal Hlavinka <mhlavink@redhat.com> - 20090630-1
  209. - updated to 2009-06-30
  210. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20090505-2
  211. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  212. * Mon May 11 2009 Michal Hlavinka <mhalvink@redhat.com> - 20090505-1
  213. - updated to 2009-05-05
  214. * Tue May 05 2009 Michal Hlavinka <mhalvink@redhat.com> - 20090501-1
  215. - updated to 2009-05-01
  216. * Tue Mar 10 2009 Michal Hlavinka <mhlavink@redhat.com> - 20081104-3
  217. - fix typos in spec file
  218. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20081104-2
  219. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  220. * Tue Jan 21 2009 Michal Hlavinka <mhlavink@redhat.com> 20081104-1
  221. - update to 2008-11-04
  222. - ast-ksh-locales are not useable remove them
  223. * Tue Oct 21 2008 Michal Hlavinka <mhlavink@redhat.com> 20080725-4
  224. - fix #467025 - Ksh fails to initialise environment when login from graphic console
  225. * Wed Aug 06 2008 Tomas Smetana <tsmetana@redhat.com> 20080725-3
  226. - fix BuildRequires, rebuild
  227. * Tue Aug 5 2008 Tom "spot" Callaway <tcallawa@redhat.com> 20080725-2
  228. - fix license tag
  229. * Mon Jul 28 2008 Tomas Smetana <tsmetana@redhat.com> 20080725-1
  230. - new upstream version
  231. * Thu Jun 26 2008 Tomas Smetana <tsmetana@redhat.com> 20080624-1
  232. - new upstream version
  233. * Mon Feb 11 2008 Tomas Smetana <tsmetana@redhat.com> 20080202-1
  234. - new upstream version
  235. * Wed Jan 30 2008 Tomas Smetana <tsmetana@redhat.com> 20071105-3
  236. - fix #430602 - ksh segfaults after unsetting OPTIND
  237. * Mon Jan 07 2008 Tomas Smetana <tsmetana@redhat.com> 20071105-2
  238. - fix #405381 - ksh will not handle $(xxx) when typeset -r IFS
  239. - fix #386501 - bad group in spec file
  240. * Wed Nov 07 2007 Tomas Smetana <tsmetana@redhat.com> 20071105-1
  241. - new upstream version
  242. * Wed Aug 22 2007 Tomas Smetana <tsmetana@redhat.com> 20070628-1.1
  243. - rebuild
  244. * Thu Jul 12 2007 Tomas Smetana <tsmetana@redhat.com> 20070628-1
  245. - new upstream version
  246. - fix unaligned access messages (Related: #219420)
  247. * Tue May 22 2007 Tomas Smetana <tsmetana@redhat.com> 20070328-2
  248. - fix wrong exit status of spawned process after SIGSTOP
  249. - fix building of debuginfo package, add %%{?dist} to release
  250. - fix handling of SIGTTOU in non-interactive shell
  251. - remove useless builtins
  252. * Thu Apr 19 2007 Tomas Smetana <tsmetana@redhat.com> 20070328-1
  253. - new upstream source
  254. - fix login shell invocation (#182397)
  255. - fix memory leak
  256. * Wed Feb 21 2007 Karsten Hopp <karsten@redhat.com> 20070111-1
  257. - new upstream version
  258. - fix invalid write in uname function
  259. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 20060214-1.1
  260. - rebuild
  261. * Thu Jun 01 2006 Karsten Hopp <karsten@redhat.de> 20060214-1
  262. - new upstream source
  263. * Mon Feb 27 2006 Karsten Hopp <karsten@redhat.de> 20060124-3
  264. - PreReq grep, coreutils (#182835)
  265. * Tue Feb 14 2006 Karsten Hopp <karsten@redhat.de> 20060124-2
  266. - make it build in chroots (#180561)
  267. * Mon Feb 13 2006 Karsten Hopp <karsten@redhat.de> 20060124-1
  268. - version 20060124
  269. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 20050202-5.1
  270. - bump again for double-long bug on ppc(64)
  271. * Fri Feb 10 2006 Karsten Hopp <karsten@redhat.de> 20050202-5
  272. - rebuild
  273. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 20050202-4.1
  274. - rebuilt for new gcc4.1 snapshot and glibc changes
  275. * Thu Feb 02 2006 Karsten Hopp <karsten@redhat.de> 20050202-4
  276. - fix uname -i output
  277. - fix loop (*-path.patch)
  278. - conflict pdksh instead of obsoleting it
  279. * Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com> 20050202-3.1
  280. - rebuilt for new gcj
  281. * Tue May 10 2005 Karsten Hopp <karsten@redhat.de> 20050202-3
  282. - enable debuginfo
  283. * Tue Mar 15 2005 Karsten Hopp <karsten@redhat.de> 20050202-2
  284. - add /usr/bin/ksh link for compatibility with pdksh scripts (#151134)
  285. * Wed Mar 02 2005 Karsten Hopp <karsten@redhat.de> 20050202-1
  286. - update and rebuild with gcc-4
  287. * Tue Mar 01 2005 Karsten Hopp <karsten@redhat.de> 20041225-2
  288. - fix gcc4 build
  289. * Fri Jan 21 2005 Karsten Hopp <karsten@redhat.de> 20041225-1
  290. - rebuild with new ksh tarball (license change)
  291. * Tue Nov 02 2004 Karsten Hopp <karsten@redhat.de> 20040229-11
  292. - disable ia64 for now
  293. * Fri Oct 15 2004 Karsten Hopp <karsten@redhat.de> 20040229-9
  294. - rebuild
  295. * Thu Sep 02 2004 Nalin Dahyabhai <nalin@redhat.com> 20040229-8
  296. - remove '&' from summary
  297. * Thu Sep 02 2004 Bill Nottingham <notting@redhat.com> 20040229-7
  298. - obsolete pdksh (#131303)
  299. * Mon Aug 02 2004 Karsten Hopp <karsten@redhat.de> 20040229-6
  300. - obsolete ksh93, provide ksh93
  301. * Mon Jul 05 2004 Karsten Hopp <karsten@redhat.de> 20040229-3
  302. - add /bin/ksh to /etc/shells
  303. * Wed Jun 16 2004 Karsten Hopp <karsten@redhat.de> 20040229-2
  304. - add ppc64 patch to avoid ppc64 dot symbol problem
  305. * Fri May 28 2004 Karsten Hopp <karsten@redhat.de> 20040229-1
  306. - initial version