lfs/chapter06/ed.xml
Alex Gronenwoud c76accc624 Miscellaneous adjustments.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3244 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
2004-02-09 22:44:26 +00:00

63 lines
1.9 KiB
XML

<sect1 id="ch-system-ed" xreflabel="Ed">
<title>Installing Ed-&ed-version;</title>
<?dbhtml filename="ed.html" dir="chapter06"?>
<para>The Ed package contains a spartan line editor.</para>
<screen>&buildtime; &ed-time;
&diskspace; &ed-compsize;</screen>
&aa-ed-down;
&aa-ed-dep;
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Ed</title>
<note><para>Ed isn't something which many people use. It's installed here
because it can be used by the patch program if you encounter an ed-based patch
file. This happens rarely because diff-based patches are preferred these
days.</para></note>
<para>Ed normally uses the <emphasis>mktemp</emphasis> function to create
temporary files in <filename class="directory">/tmp</filename>, but this
function contains a vulnerability (see the section on Temporary Files in <ulink
url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). Apply
the following patch to make Ed use <emphasis>mkstemp</emphasis> instead, a
secure way to create temporary files:</para>
<screen><userinput>patch -Np1 -i ../&ed-patch;</userinput></screen>
<para>Now prepare Ed for compilation:</para>
<screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
<para>The meaning of the configure option:</para>
<itemizedlist>
<listitem><para><userinput>--exec-prefix=""</userinput>: This forces the
programs to be installed into the <filename>/bin</filename> directory. Having
the programs available there is useful in the event of the
<filename>/usr</filename> partition being unavailable.</para></listitem>
</itemizedlist>
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
<para>To have the results tested, issue:
<userinput>make check</userinput>.</para>
<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
&aa-ed-shortdesc;
&aa-ed-desc;
</sect1>