ed.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <sect1 id="ch-system-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 <emphasis>mktemp</emphasis> function to create
  17. temporary files in <filename class="directory">/tmp</filename>, but this
  18. function contains a vulnerability (see the section on Temporary Files in <ulink
  19. url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). Apply
  20. the following patch to make Ed use <emphasis>mkstemp</emphasis> instead, a
  21. secure way to create temporary files:</para>
  22. <screen><userinput>patch -Np1 -i ../&ed-patch;</userinput></screen>
  23. <para>Now prepare Ed for compilation:</para>
  24. <screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
  25. <para>The meaning of the configure option:</para>
  26. <itemizedlist>
  27. <listitem><para><userinput>--exec-prefix=""</userinput>: This forces the
  28. programs to be installed into the <filename>/bin</filename> directory. Having
  29. the programs available there is useful in the event of the
  30. <filename>/usr</filename> partition being unavailable.</para></listitem>
  31. </itemizedlist>
  32. <para>Compile the package:</para>
  33. <screen><userinput>make</userinput></screen>
  34. <para>To have the results tested, issue:
  35. <userinput>make check</userinput>.</para>
  36. <para>Install the package:</para>
  37. <screen><userinput>make install</userinput></screen>
  38. </sect2>
  39. &aa-ed-shortdesc;
  40. &aa-ed-desc;
  41. </sect1>