ed-inst.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2>
  3. <title>Installation of Ed</title>
  4. <note><para>Ed isn't something which many people use. It's installed here
  5. because it can be used by the patch program if you encounter an ed-based patch
  6. file. This happens rarely because diff-based patches are preferred these
  7. days.</para></note>
  8. <para>Ed normally uses the mktemp function to create temporary files in
  9. <filename class="directory">/tmp</filename>, but this function contains a
  10. vulnerability (see the section on Temporary Files in <ulink
  11. url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). The
  12. following patch makes Ed use mkstemp instead, which is the recommended way to
  13. create temporary files.</para>
  14. <para>Apply the patch:</para>
  15. <para><screen><userinput>patch -Np1 -i ../ed-&ed-patch-version;.patch</userinput></screen></para>
  16. <para>Now prepare Ed for compilation:</para>
  17. <para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
  18. <para>Compile the package:</para>
  19. <para><screen><userinput>make</userinput></screen></para>
  20. <para>Test the results:</para>
  21. <para><screen><userinput>make check</userinput></screen></para>
  22. <para>Install the package:</para>
  23. <para><screen><userinput>make install</userinput></screen></para>
  24. <para>And move the programs to the <filename>/bin</filename> directory, so
  25. they can be used in the event that the <filename>/usr</filename> partition is
  26. unavailable.</para>
  27. <para><screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen></para>
  28. </sect2>