expect-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. %{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
  2. %{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
  3. %define tcl_major 8.6
  4. %define majorver 5.45
  5. Summary: A Tcl/Tk development environment: expect
  6. Summary(ja): Tcl/Tk 開発環境: expect
  7. Name: expect
  8. Version: %{majorver}.4
  9. Release: 1%{?_dist_release}
  10. License: Public Domain
  11. Group: Development/Languages
  12. # URL: probably more useful is http://sourceforge.net/projects/expect/
  13. URL: https://core.tcl-lang.org/expect/index
  14. Source: https://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
  15. # Patch0: fixes change log file permissions
  16. Patch0: expect-5.43.0-log_file.patch
  17. # Patch1: fixes install location, change pkgIndex
  18. Patch1: expect-5.43.0-pkgpath.patch
  19. # Patch2: fixes minor man page formatting issue
  20. Patch2: expect-5.45-man-page.patch
  21. # Patch3: fixes segmentation fault during matching characters
  22. Patch3: expect-5.45-match-gt-numchars-segfault.patch
  23. # Patch4: fixes memory leak when using -re, http://sourceforge.net/p/expect/patches/13/
  24. Patch4: expect-5.45-re-memleak.patch
  25. # Patch5: use vsnprintf instead of vsprintf to avoid buffer overflow
  26. Patch5: expect-5.45-exp-log-buf-overflow.patch
  27. # Patch6: fixes segfaults if Tcl is built with stubs and Expect is used directly
  28. # from C program rhbz#1091060
  29. Patch6: expect-5.45-segfault-with-stubs.patch
  30. # Patch7: fixes leaked fd, patch by Matej Mužila, rhbz#1001220
  31. Patch7: expect-5.45-fd-leak.patch
  32. # Patch8: unificates usage message of expect binary and man page, adds -h flag
  33. Patch8: expect-5.45.4-unification-of-usage-and-man-page.patch
  34. # Patch9: fixes issues detected by static analysis
  35. Patch9: expect-5.45.4-covscan-fixes.patch
  36. # examples patches
  37. # Patch100: changes random function
  38. Patch100: expect-5.32.2-random.patch
  39. # Patch101: fixes bz674184 - mkpasswd fails randomly
  40. Patch101: expect-5.45-mkpasswd-dash.patch
  41. # Patch102: fixes bz703702 - let user know that telnet is needed for
  42. # running some examples
  43. Patch102: expect-5.45-check-telnet.patch
  44. # Patch103: use full path to 'su', it's safer
  45. Patch103: expect-5.45-passmass-su-full-path.patch
  46. # Patch104: rhbz 963889, fixes inaccuracy in mkpasswd man page
  47. Patch104: expect-5.45-mkpasswd-man.patch
  48. # Patch105: Fix error with -Werror=format-security
  49. Patch105: expect-5.45-format-security.patch
  50. Buildroot: %{_tmppath}/%{name}-%{version}-root
  51. BuildRequires: tk-devel >= %{tcl_major}
  52. BuildRequires: autoconf
  53. BuildRequires: chrpath
  54. BuildRequires: libX11-devel
  55. BuildRequires: libXft-devel
  56. Vendor: Project Vine
  57. Distribution: Vine Linux
  58. %description -n expect
  59. Expect is a tcl extension for automating interactive applications such
  60. as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect is also useful
  61. for testing the named applications. Expect makes it easy for a script
  62. to control another program and interact with it.
  63. Install the expect package if you'd like to develop scripts which interact
  64. with interactive applications. You'll also need to install the tcl
  65. package.
  66. %package devel
  67. Summary: Development files for expect library.
  68. Summary(ja): expect ライブラリの開発用ファイル
  69. Group: Development/Libraries
  70. Requires: expect = %{version}-%{release}
  71. Obsoletes: expect <= 5.43-0vl4
  72. %description devel
  73. This package contains development files for the expect library.
  74. %package -n expectk
  75. Summary: A program-script interaction and testing utility
  76. Group: Development/Tools
  77. Requires: expect = %{version}-%{release}
  78. Obsoletes: expect <= 5.43-0vl4
  79. %description -n expectk
  80. This package originally contained expectk and some scripts
  81. that used it. As expectk was removed from upstream tarball
  82. in expect-5.45, now the package contains just these scripts.
  83. Please use tclsh with package require Tk and Expect instead
  84. of expectk.
  85. %prep
  86. %setup -q -n expect%{version}
  87. %patch0 -p1 -b .log_file
  88. %patch1 -p1 -b .pkgpath
  89. %patch2 -p1 -b .man-page
  90. %patch3 -p1 -b .match-gt-numchars-segfault
  91. %patch4 -p1 -b .re-memleak
  92. %patch5 -p1 -b .exp-log-buf-overflow
  93. %patch6 -p1 -b .segfault-with-stubs
  94. %patch7 -p1 -b .fd-leak
  95. %patch8 -p1 -b .unification-of-usage-and-man-page
  96. %patch9 -p1 -b .covscan-fixes
  97. # examples fixes
  98. %patch100 -p1 -b .random
  99. %patch101 -p1 -b .mkpasswd-dash
  100. %patch102 -p1 -b .check-telnet
  101. %patch103 -p1 -b .passmass-su-full-path
  102. %patch104 -p1 -b .mkpasswd-man
  103. %patch105 -p0 -b .format-security
  104. # -pkgpath.patch touch configure.in
  105. aclocal
  106. autoconf
  107. ( cd testsuite
  108. autoconf -I.. )
  109. %build
  110. %configure --with-tcl=%{_libdir} --with-tk=%{_libdir} --enable-shared \
  111. --with-tclinclude=%{_includedir}/tcl-private/generic
  112. make %{?_smp_mflags}
  113. %check
  114. make test
  115. %install
  116. rm -rf ${RPM_BUILD_ROOT}
  117. make install DESTDIR="$RPM_BUILD_ROOT"
  118. # move
  119. mv "$RPM_BUILD_ROOT"%{tcl_sitearch}/expect%{version}/libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}
  120. # for linking with -lexpect
  121. ln -s libexpect%{majorver}.so "$RPM_BUILD_ROOT"%{_libdir}/libexpect.so
  122. # remove cryptdir/decryptdir, as Linux has no crypt command (bug 6668).
  123. rm -f "$RPM_BUILD_ROOT"%{_bindir}/{cryptdir,decryptdir}
  124. rm -f "$RPM_BUILD_ROOT"%{_mandir}/man1/{cryptdir,decryptdir}.1*
  125. rm -f "$RPM_BUILD_ROOT"%{_bindir}/autopasswd
  126. # remove rpath
  127. chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libexpect%{version}.so
  128. %post -p /sbin/ldconfig -n expect
  129. %postun -p /sbin/ldconfig -n expect
  130. %clean
  131. rm -rf $RPM_BUILD_ROOT
  132. %files
  133. %%defattr(-,root,root)
  134. %doc FAQ HISTORY NEWS README
  135. %{_bindir}/expect
  136. %{_bindir}/autoexpect
  137. %{_bindir}/dislocate
  138. %{_bindir}/ftp-rfc
  139. %{_bindir}/kibitz
  140. %{_bindir}/lpunlock
  141. %{_bindir}/mkpasswd
  142. %{_bindir}/passmass
  143. %{_bindir}/rftp
  144. %{_bindir}/rlogin-cwd
  145. %{_bindir}/timed-read
  146. %{_bindir}/timed-run
  147. %{_bindir}/unbuffer
  148. %{_bindir}/weather
  149. %{_bindir}/xkibitz
  150. %dir %{tcl_sitearch}/expect%{version}
  151. %{tcl_sitearch}/expect%{version}/pkgIndex.tcl
  152. %{_libdir}/libexpect%{version}.so
  153. %{_mandir}/man1/autoexpect.1.gz
  154. %{_mandir}/man1/dislocate.1.gz
  155. %{_mandir}/man1/expect.1.gz
  156. %{_mandir}/man1/kibitz.1.gz
  157. %{_mandir}/man1/mkpasswd.1.gz
  158. %{_mandir}/man1/passmass.1.gz
  159. %{_mandir}/man1/tknewsbiff.1.gz
  160. %{_mandir}/man1/unbuffer.1.gz
  161. %{_mandir}/man1/xkibitz.1.gz
  162. %files devel
  163. %defattr(-,root,root,-)
  164. %{_libdir}/libexpect.so
  165. %{_mandir}/man3/libexpect.3*
  166. %{_includedir}/*
  167. %files -n expectk
  168. %defattr(-,root,root,-)
  169. %{_bindir}/multixterm
  170. %{_bindir}/tknewsbiff
  171. %{_bindir}/tkpasswd
  172. %{_bindir}/xpstat
  173. %{_mandir}/man1/multixterm.1*
  174. %{_mandir}/man1/tknewsbiff.1*
  175. %changelog
  176. * Fri Oct 04 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.45.4-1
  177. - new upstream release.
  178. - built with tcl/tk-8.6.9.
  179. - updated patches.
  180. - imported Patch8, 9 and 105 from rawhide.
  181. * Sat Dec 5 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.45-2
  182. - fixed a symlink.
  183. - fixed BR:.
  184. * Wed Dec 31 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.45-1
  185. - updated to 5.45
  186. - rebuilt with tcl/tk 8.5.15
  187. * Fri Jan 4 2013 IWAI, Masaharu <iwai@alib.jp> 5.44.1.15-1
  188. - update to 5.44.1.15:sync ed Hat Enterprise Linux 6 expect-5.44.1.15-4.el6
  189. - add BuildRequires: tk, chrpath
  190. - update License: Public Domain
  191. - drop obsolete patches
  192. - random patch (Patch0)
  193. - spawn-43310 patch (Patch6)
  194. - setpgrp patch (Patch8)
  195. - lib spec patch (Patch10)
  196. - libdir patch (Patch11)
  197. - add some patches from RHEL expect-5.44.1.15-4.el6
  198. - fixes log file permissions patch (Patch500)
  199. - fixes install location patch (Patch501)
  200. - tk init patch (Patch502)
  201. - match gt numchars segfault patch (Patch503)
  202. - man page patch (Patch504)
  203. - random patch (Patch600)
  204. - unbuffer exit code patch (Patch601)
  205. - passmass su full path Patch (Patch602)
  206. - update build and install section: sync RHEL expect-5.44.1.15-4.el6
  207. - add Vendor and Distribution tags
  208. * Tue Apr 19 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 5.43-5
  209. - add missing BuildRequires: libX11-devel
  210. * Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 5.43-4
  211. - rebuilt with rpm-4.8.1-3
  212. * Tue Jun 29 2010 Shu KONNO <owa@bg.wakwak.com> 5.43-3
  213. - rebuilt with tcl/tk-8.4.19-2
  214. * Tue May 18 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.43-2
  215. - rebuilt with new toolchain
  216. - changed devel Group to Development/Libraries
  217. * Sun Jul 27 2008 Shu KONNO <owa@bg.wakwak.com> 5.43-1vl5
  218. - applied new versioning policy and spec in utf-8
  219. * Sun Feb 17 2008 Shu KONNO <owa@bg.wakwak.com> 5.43-0vl6
  220. - rebuilt with tcl/tk-8.4.18
  221. * Fri Nov 09 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 5.43-0vl5
  222. - split to expect-devel and expectk sub package.
  223. - add libexpect.so to expect-devel (<BTS:wishes:0136>)
  224. * Tue Oct 09 2007 Shu KONNO <owa@bg.wakwak.com> 5.43-0vl4
  225. - rebuilt with tcl/tk-8.4.16
  226. * Wed Jun 13 2007 Shu KONNO <owa@bg.wakwak.com> 5.43-0vl3
  227. - rebuilt with new toolchain
  228. * Sun Jan 29 2006 Shu KONNO <owa@bg.wakwak.com> 5.43-0vl2
  229. - rebuild for tcl/tk-8.4.12
  230. - added --enable-64bit to configure's option
  231. * Fri Sep 09 2005 Shu KONNO <owa@bg.wakwak.com> 5.43-0vl1
  232. - updated expect to 5.43.0
  233. - dropped expect-5.39.0-64bit-82547.patch (for fixed)
  234. - dropped expect-5.32.2-kibitz.patch (for fixed)
  235. - dropped expect-5.38.0-autopasswd-9917.patch (for fixed)
  236. - rebuilt with tcl/tk 8.4.11
  237. * Wed Jun 30 2004 Shu KONNO <owa@bg.wakwak.com> 5.39-95vl2
  238. - rebuild for tcl/tk-8.4.6
  239. * Mon Jan 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 5.39-95vl1
  240. - update based on fedora
  241. * Mon Mar 31 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 8.4.2-0vl1
  242. - update based on BitWalk's tcltk-8.4.2-83bw and RawHide tcltk-8.3.5-89
  243. * Thu Nov 15 2001 Kazuhusa TAKEI <takei@linux.or.jp> 8.0.5_jp-10vl3
  244. - splite source package
  245. - add include files
  246. * Sun Jul 15 2001 Daisuke SUZUKI <daisuke@linux.or.jp> 8.0.5_jp-10vl2
  247. - expand some macros.. (FIXME)
  248. * Sat Jul 14 2001 Daisuke SUZUKI <daisuke@linux.or.jp> 8.0.5_jp-10vl1
  249. - use %configure macros
  250. - add Patch 47,50
  251. * Thu May 31 2001 <sagami@vinelinux.org>
  252. - 8.0.5_jp-10
  253. - unexpand old %%{configure}, new one causes build failure
  254. - fixed missing libtkx.so libtclx.so symlink in /usr/lib
  255. - install manpages into %%{_mandir} and mode 644
  256. * Wed Jul 19 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  257. - 8.0.5_jp-9
  258. - modified %install section to handle compressed man pages
  259. - fixed /usr/lib/tk8.0jp/demos.jp/images symlink
  260. * Sun Jul 2 2000 Daisuke SUZUKI <daisuke@linux.or.jp>
  261. - changed default fonts
  262. * Tue Jan 25 2000 Jun Nishii <jun@vinelinux.org>
  263. - added defattr
  264. * Mon Jan 24 2000 Jun Nishii <jun@vinelinux.org>
  265. - added some symlinks, such as libtcl8.0.so.
  266. - obsoletes version number using _jp, now 8.0.5-31vl1
  267. * Wed Jan 5 2000 Norihito Ohmori <nono@vinelinux.org>
  268. - Apply Tcl/Tk 8.0 Japanese Patch 1.7
  269. * Tue Nov 30 1999 Jakub Jelinek <jakub@redhat.com>
  270. - fix tclX symlinks.
  271. - compile on systems where SIGPWR == SIGLOST.
  272. * Sat May 1 1999 Jeff Johnson <jbj@redhat.com>
  273. - update tcl/tk to 8.0.5.
  274. - avoid "containing" in Tix (#2332).
  275. * Thu Apr 8 1999 Jeff Johnson <jbj@redhat.com>
  276. - use /usr/bin/write in kibitz (#1320).
  277. - use cirrus.sprl.umich.edu in weather (#1926).
  278. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  279. - auto rebuild in the new build environment (release 28)
  280. * Mon Mar 08 1999 Preston Brown <pbrown@redhat.com>
  281. - whoops, exec-prefix for itcl was set to '/foo', changed to '/usr'.
  282. * Tue Feb 16 1999 Jeff Johnson <jbj@redhat.com>
  283. - expect does unaligned access on alpha (#989)
  284. - upgrade tcl/tk/tclX to 8.0.4
  285. - upgrade expect to 5.28.
  286. - add itcl 3.0.1
  287. * Tue Jan 12 1999 Cristian Gafton <gafton@redhat.com>
  288. - call libtoolize to allow building on the arm
  289. - build for glibc 2.1
  290. - strip binaries
  291. * Thu Sep 10 1998 Jeff Johnson <jbj@redhat.com>
  292. - update tcl/tk/tclX to 8.0.3, expect is updated also.
  293. * Mon Jun 29 1998 Jeff Johnson <jbj@redhat.com>
  294. - expect: mkpasswd needs delay before sending password (problem #576)
  295. * Thu May 07 1998 Prospector System <bugs@redhat.com>
  296. - translations modified for de, fr, tr
  297. * Sat May 02 1998 Cristian Gafton <gafton@redhat.com>
  298. - fixed expect binaries exec permissions
  299. * Thu Apr 09 1998 Erik Troan <ewt@redhat.com>
  300. - updated to Tix 4.1.0.006
  301. - updated version numbers of tcl/tk to relflect includsion of p2
  302. * Wed Mar 25 1998 Cristian Gafton <gafton@redhat.com>
  303. - updated tcl/tk to patch level 2
  304. - updated tclX to 8.0.2
  305. * Thu Oct 30 1997 Otto Hammersmith <otto@redhat.com>
  306. - fixed filelist for tix... replacing path to the expect binary in scripts
  307. was leaving junk files around.
  308. * Wed Oct 22 1997 Otto Hammersmith <otto@redhat.com>
  309. - added patch to remove libieee test in configure.in for tcl and tk.
  310. Shoudln't be needed anymore for glibc systems, but this isn't the "proper"
  311. solution for all systems
  312. - fixed src urls
  313. * Mon Oct 06 1997 Erik Troan <ewt@redhat.com>
  314. - removed version numbers from descriptions
  315. * Mon Sep 22 1997 Erik Troan <ewt@redhat.com>
  316. - updated to tcl/tk 8.0 and related versions of packages
  317. * Tue Jun 17 1997 Erik Troan <ewt@redhat.com>
  318. - built against glibc
  319. - fixed dangling tclx/tkx symlinks