ed.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <sect1 id="ch06-ed" xreflabel="Ed">
  2. <title>Installing Ed-&ed-version;</title>
  3. <?dbhtml filename="ed.html" dir="chapter06"?>
  4. <para>The Ed package contains a spartan line editor.</para>
  5. <screen>&buildtime; &ed-time;
  6. &diskspace; &ed-compsize;</screen>
  7. &aa-ed-down;
  8. &aa-ed-dep;
  9. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  10. <sect2>
  11. <title>Installation of Ed</title>
  12. <note><para>Ed isn't something which many people use. It's installed here
  13. because it can be used by the patch program if you encounter an ed-based patch
  14. file. This happens rarely because diff-based patches are preferred these
  15. days.</para></note>
  16. <para>Ed normally uses the mktemp function to create temporary files in
  17. <filename class="directory">/tmp</filename>, but this function contains a
  18. vulnerability (see the section on Temporary Files in <ulink
  19. url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). The
  20. following patch makes Ed use mkstemp instead, which is the recommended way to
  21. create temporary files.</para>
  22. <para>Apply the patch:</para>
  23. <screen><userinput>patch -Np1 -i ../&ed-patch;</userinput></screen>
  24. <para>Now prepare Ed for compilation:</para>
  25. <screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
  26. <para>The meaning of the configure option:</para>
  27. <itemizedlist>
  28. <listitem><para><userinput>--exec-prefix=""</userinput>: This forces the
  29. programs to be installed into the <filename>/bin</filename> directory. Having
  30. the programs available there is useful in the event of the
  31. <filename>/usr</filename> partition being unavailable.</para></listitem>
  32. </itemizedlist>
  33. <para>Compile the package:</para>
  34. <screen><userinput>make</userinput></screen>
  35. <para>This package has a test suite available which can perform a number of
  36. checks to ensure it built correctly. Should you choose to run it, the
  37. following command will do so:</para>
  38. <screen><userinput>make check</userinput></screen>
  39. <para>Install the package:</para>
  40. <screen><userinput>make install</userinput></screen>
  41. </sect2>
  42. &aa-ed-shortdesc;
  43. &aa-ed-desc;
  44. </sect1>