| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | <sect1 id="ch06-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>Estimated build time:           &ed-time;Estimated required disk space:  &ed-compsize;</screen>&aa-ed-down;&aa-ed-dep;<sect2><title> </title><para> </para></sect2><sect2><title>Installation of Ed</title><note><para>Ed isn't something which many people use. It's installed herebecause it can be used by the patch program if you encounter an ed-based patchfile. This happens rarely because diff-based patches are preferred thesedays.</para></note><para>Ed normally uses the mktemp function to create temporary files in<filename class="directory">/tmp</filename>, but this function contains avulnerability (see the section on Temporary Files in <ulinkurl="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). Thefollowing patch makes Ed use mkstemp instead, which is the recommended way tocreate temporary files.</para><para>Apply the patch:</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 theprograms to be installed into the <filename>/bin</filename> directory. Havingthe 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>This package has a test suite available which can perform a number ofchecks to ensure it built correctly.  Should you choose to run it, the following command will do so:</para><screen><userinput>make check</userinput></screen><para>Install the package:</para><screen><userinput>make install</userinput></screen></sect2>&aa-ed-shortdesc;&aa-ed-desc;</sect1>
 |