Tagging 1.99.1
[linux_from_scratch.git] / newxml / chapter06 / ed.xml
blobda35c8ba60af92fb7aad2eea146b4266159870cf
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3CR2//EN" "http://www.docbook.org/xml/4.3CR2/docbookx.dtd" [
3   <!ENTITY % ed-entities SYSTEM "../ent/ed.ent">
4   %ed-entities;
5 ]>
6 <sect1 id="ch06-ed">
7 <title>Installing Ed-&ed-version;</title>
8 <?dbhtml filename="ed.html"?>
10 <screen>Estimated build time:           0.1 SBU
11 Estimated required disk space:  3.1 MB</screen>
13 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../appendixa/ed-contents.xml"/>
17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../appendixa/ed-deps.xml"/>
21 <sect2>
22 <title>Installation of Ed</title>
24 <note><para>Ed isn't something which many people use. It's installed here
25 because it can be used by the patch program if you encounter an ed-based patch
26 file. This happens rarely because diff-based patches are preferred these
27 days.</para></note>
29 <para>Ed normally uses the mktemp function to create temporary files in
30 <filename class="directory">/tmp</filename>, but this function contains a
31 vulnerability (see the section on Temporary Files in <ulink url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). The
32 following patch makes Ed use mkstemp instead, which is the recommended way to
33 create temporary files.</para>
35 <para>Apply the patch:</para>
37 <screen><userinput>patch -Np1 -i ../ed-&ed-version;-mkstemp.patch</userinput></screen>
39 <para>Now prepare Ed for compilation:</para>
41 <screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
43 <para>The meaning of the configure option:</para>
45 <itemizedlist>
46 <listitem><para><userinput>--exec-prefix=""</userinput>: This forces the
47 programs to be installed into the <filename>/bin</filename> directory. Having
48 the programs available there is useful in the event of the
49 <filename>/usr</filename> partition being unavailable.</para></listitem>
50 </itemizedlist>
52 <para>Compile the package:</para>
54 <screen><userinput>make</userinput></screen>
56 <para>This package has a test suite available which can perform a number of
57 checks to ensure it built correctly.  Should you choose to run it, the 
58 following command will do so:</para>
60 <screen><userinput>make check</userinput></screen>
62 <para>Install the package:</para>
64 <screen><userinput>make install</userinput></screen>
66 </sect2>
68 </sect1>