The Expect package contains tools for automating, via scripted dialogues, interactive applications such as telnet, ftp, passwd, fsck, rlogin, and tip. Expect is also useful for testing these same applications as well as easing all sorts of tasks that are prohibitively difficult with anything else. The DejaGnu framework is written in Expect.
Prepare Expect for compilation:
./configure --prefix=/usr \
--with-tcl=/usr/lib \
--enable-shared \
--mandir=/usr/share/man \
--with-tclinclude=/usr/include
The meaning of the configure options:
--with-tcl=/usr/lib
This parameter is needed to tell configure where the tclConfig.sh script is located.
--with-tclinclude=/usr/include
This explicitly tells Expect where to find Tcl's internal headers.
Build the package:
make
The test suite for Expect is considered critical. Do not skip it under any circumstances.
To test the results, issue:
make test
If any test fails with the message “The
system has no more ptys. Ask your system administrator to create
more”, it indicates you've not mounted the
devpts file system correctly. You
need to exit from the chroot environment, read Section 7.3,
“Preparing Virtual Kernel File Systems” again, and ensure the
devpts file system (and other
virtual kernel file systems) mounted correctly. Then reenter the
chroot environment following Section 7.4,
“Entering the Chroot Environment”. This issue needs to be
resolved before continuing.
Install the package:
make install ln -svf expect5.45.4/libexpect5.45.4.so /usr/lib