source: chapter08/expect.xml@ 4d7ccf4

xry111/clfs-ng
Last change on this file since 4d7ccf4 was 4d7ccf4, checked in by Xi Ruoyao <xry111@…>, 5 months ago

cross-ng: Remove phrases specifically for chroot from PTY test

  • Property mode set to 100644
File size: 5.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-expect" role="wrap">
9 <?dbhtml filename="expect.html"?>
10
11 <sect1info condition="script">
12 <productname>expect</productname>
13 <productnumber>&expect-version;</productnumber>
14 <address>&expect-url;</address>
15 </sect1info>
16
17 <title>Expect-&expect-version;</title>
18
19 <indexterm zone="ch-system-expect">
20 <primary sortas="a-Expect">Expect</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The <application>Expect</application> package contains tools for
27 automating, via scripted dialogues, interactive applications such as
28 <command>telnet</command>, <command>ftp</command>,
29 <command>passwd</command>, <command>fsck</command>,
30 <command>rlogin</command>, and <command>tip</command>.
31 <application>Expect</application> is also useful for testing these same
32 applications as well as easing all sorts of tasks that are prohibitively
33 difficult with anything else. The <application>DejaGnu</application>
34 framework is written in <application>Expect</application>.</para>
35
36 <segmentedlist>
37 <segtitle>&buildtime;</segtitle>
38 <segtitle>&diskspace;</segtitle>
39
40 <seglistitem>
41 <seg>&expect-tmp-sbu;</seg>
42 <seg>&expect-tmp-du;</seg>
43 </seglistitem>
44 </segmentedlist>
45
46 </sect2>
47
48 <sect2 role="installation">
49 <title>Installation of Expect</title>
50
51 <para>Expect needs PTYs to work. Verify that the PTYs are working
52 properly inside the chroot environment by performing a simple
53 test:</para>
54
55<screen><userinput remap="test">python3 -c 'from pty import spawn; spawn(["echo", "ok"])'</userinput></screen>
56
57 <para>This command should output <computeroutput>ok</computeroutput>.
58 If, instead, the output includes <computeroutput>OSError: out of pty
59 devices</computeroutput>, then the environment is not set up for proper
60 PTY operation. You need to read
61 <xref linkend='ch-tools-kernfs'/> again, and ensure the
62 <systemitem class="filesystem">devpts</systemitem> file system (and
63 other virtual kernel file systems) mounted correctly.
64 This issue needs to be resolved before continuing, or the test suites
65 requring Expect (for example the test suites of Bash, Binutils, GCC,
66 GDBM, and of course Expect itself) will fail catastrophically, and other
67 subtle breakages may also happen.</para>
68
69 <para>Prepare Expect for compilation:</para>
70
71<screen><userinput remap="configure">./configure --prefix=/usr \
72 --with-tcl=/usr/lib \
73 --enable-shared \
74 --mandir=/usr/share/man \
75 --with-tclinclude=/usr/include</userinput></screen>
76
77 <variablelist>
78 <title>The meaning of the configure options:</title>
79
80 <varlistentry>
81 <term><parameter>--with-tcl=/usr/lib</parameter></term>
82 <listitem>
83 <para>This parameter is needed to tell
84 <command>configure</command> where the
85 <command>tclConfig.sh</command> script is located.</para>
86 </listitem>
87 </varlistentry>
88
89 <varlistentry>
90 <term><parameter>--with-tclinclude=/usr/include</parameter></term>
91 <listitem>
92 <para>This explicitly tells Expect where to find Tcl's internal
93 headers.</para>
94 </listitem>
95 </varlistentry>
96
97 </variablelist>
98
99 <para>Build the package:</para>
100
101<screen><userinput remap="make">make</userinput></screen>
102
103 <para>To test the results, issue:</para>
104
105<screen><userinput remap="test">make test</userinput></screen>
106
107 <para>Install the package:</para>
108
109<screen><userinput remap="install">make install
110ln -svf expect&expect-version;/libexpect&expect-version;.so /usr/lib</userinput></screen>
111
112 </sect2>
113
114 <sect2 id="contents-expect" role="content">
115 <title>Contents of Expect</title>
116
117 <segmentedlist>
118 <segtitle>Installed program</segtitle>
119 <segtitle>Installed library</segtitle>
120
121 <seglistitem>
122 <seg>expect</seg>
123 <seg>libexpect&expect-version;.so</seg>
124 </seglistitem>
125 </segmentedlist>
126
127 <variablelist>
128 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
129 <?dbfo list-presentation="list"?>
130 <?dbhtml list-presentation="table"?>
131
132 <varlistentry id="expect">
133 <term><command>expect</command></term>
134 <listitem>
135 <para>Communicates with other interactive programs according
136 to a script</para>
137 <indexterm zone="ch-system-expect expect">
138 <primary sortas="b-expect">expect</primary>
139 </indexterm>
140 </listitem>
141 </varlistentry>
142
143 <varlistentry id="libexpect">
144 <term><filename class="libraryfile">libexpect-&expect-version;.so</filename></term>
145 <listitem>
146 <para>Contains functions that allow Expect to be used as a Tcl
147 extension or to be used directly from C or C++ (without Tcl)</para>
148 <indexterm zone="ch-system-expect libexpect">
149 <primary sortas="c-libexpect-&expect-version;">libexpect-&expect-version;</primary>
150 </indexterm>
151 </listitem>
152 </varlistentry>
153
154 </variablelist>
155
156 </sect2>
157
158</sect1>
Note: See TracBrowser for help on using the repository browser.