ed.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <sect1 id="ch06-ed">
  2. <title>Installing Ed-&ed-version;</title>
  3. <?dbhtml filename="ed.html" dir="chapter06"?>
  4. <screen>Estimated build time: &ed-time;
  5. Estimated required disk space: &ed-compsize;</screen>
  6. &aa-ed-shortdesc;
  7. &aa-ed-dep;
  8. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  9. <sect2>
  10. <title>Installation of Ed</title>
  11. <note><para>Ed isn't something which many people use. It's installed here
  12. because it can be used by the patch program if you encounter an ed-based patch
  13. file. This happens rarely because diff-based patches are preferred these
  14. days.</para></note>
  15. <para>Ed normally uses the mktemp function to create temporary files in
  16. <filename class="directory">/tmp</filename>, but this function contains a
  17. vulnerability (see the section on Temporary Files in <ulink
  18. url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). The
  19. following patch makes Ed use mkstemp instead, which is the recommended way to
  20. create temporary files.</para>
  21. <para>Apply the patch:</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</userinput></screen>
  25. <para>Compile the package:</para>
  26. <screen><userinput>make</userinput></screen>
  27. <para>This package has a test suite available which can perform a number of
  28. checks to ensure it built correctly. Should you choose to run it, the
  29. following command will do so:</para>
  30. <screen><userinput>make check</userinput></screen>
  31. <para>Install the package:</para>
  32. <screen><userinput>make install</userinput></screen>
  33. <para>And move the programs to the <filename>/bin</filename> directory, so
  34. they can be used in the event that the <filename>/usr</filename> partition is
  35. unavailable.</para>
  36. <screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen>
  37. </sect2>
  38. </sect1>