%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}} Name: expect Epoch: 1 Version: 5.45.4 Release: 6 Summary: A tool for automating interactive applications License: Public Domain URL: https://core.tcl.tk/expect/index Source0: http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz Buildrequires: gcc git tcl-devel autoconf automake chrpath Provides: expectk Obsoletes: expectk # Patch0: fixes change log file permissions Patch0: expect-5.43.0-log_file.patch # Patch1: fixes install location, change pkgIndex Patch1: expect-5.43.0-pkgpath.patch # Patch2: fixes minor man page formatting issue Patch2: expect-5.45-man-page.patch # Patch3: fixes segmentation fault during matching characters Patch3: expect-5.45-match-gt-numchars-segfault.patch # Patch4: fixes memory leak when using -re, http://sourceforge.net/p/expect/patches/13/ Patch4: expect-5.45-re-memleak.patch # Patch5: use vsnprintf instead of vsprintf to avoid buffer overflow Patch5: expect-5.45-exp-log-buf-overflow.patch # Patch6: fixes segfaults if Tcl is built with stubs and Expect is used directly # from C program rhbz#1091060 Patch6: expect-5.45-segfault-with-stubs.patch # Patch7: fixes leaked fd, patch by Matej Mužila, rhbz#1001220 Patch7: expect-5.45-fd-leak.patch # examples patches # Patch100: changes random function Patch100: expect-5.32.2-random.patch # Patch101: fixes bz674184 - mkpasswd fails randomly Patch101: expect-5.45-mkpasswd-dash.patch # Patch103: use full path to 'su', it's safer Patch103: expect-5.45-passmass-su-full-path.patch # Patch104: rhbz 963889, fixes inaccuracy in mkpasswd man page Patch104: expect-5.45-mkpasswd-man.patch # Patch105: Fix error with -Werror=format-security Patch105: expect-5.45-format-security.patch %description Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect is also useful for testing these same applications. This package contains expect utility. %package devel Summary: Header files for expect library Requires: %{name} = %{epoch}:%{version}-%{release} %description devel Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect is also useful for testing these same applications. This package contains header files for the expect library. %package help Summary: Man pages and other related documents for expect BuildArch: noarch %description help Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect is also useful for testing these same applications. This package contains man pages and other related documents for expect. %prep %autosetup -n %{name}%{version} -p1 %build %configure \ --with-tcl=%{_libdir} \ --with-tk=%{_libdir} --enable-shared \ --with-tclinclude=%{_includedir}/tcl-private/generic %make_build %check make test %install %make_install # move mv "$RPM_BUILD_ROOT"%{tcl_sitearch}/expect%{version}/libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir} # for linking with -lexpect ln -s libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}/libexpect.so # remove cryptdir/decryptdir, as Linux has no crypt command (bug 6668). rm -f "$RPM_BUILD_ROOT"%{_bindir}/{cryptdir,decryptdir,autopasswd} rm -f "$RPM_BUILD_ROOT"%{_mandir}/man1/{cryptdir,decryptdir}.1* # remove rpath chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libexpect%{version}.so %files %doc ChangeLog FAQ HISTORY NEWS README %{_bindir}/* %dir %{tcl_sitearch}/expect%{version} %{tcl_sitearch}/expect%{version}/pkgIndex.tcl %{_libdir}/libexpect*.so %files devel %{_includedir}/* %files help %{_mandir}/man1/* %{_mandir}/man3/libexpect.3* %changelog * Thu Sep 9 2021 wangchen - 1:5.45.4-6 - Delete -S git from %autosetup * Tue Jun 22 2021 panxiaohe - 1:5.45.4-5 - Delete the telnet patch to remove the dependency on telnet * Mon Apr 20 2020 openEuler Buildteam - 1:5.45.4-4 - Type:bugfix - ID:NA - SUG:NA - DESC:fix ln error due to missing definition of majorver * Thu Nov 21 2019 chengquan - 1:5.45.4-3 - Type:bugfix - ID:NA - SUG:NA - DESC:add buildrequire of git * Fri Sep 20 2019 openEuler Buildteam - 1:5.45.4-2 - Delete redundant information * Thu Aug 29 2019 openEuler Buildteam - 1:5.45.4-1 - Package init