ed-inst.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 uses mktemp to create temporary files in <filename
  9. class="directory">/tmp</filename>, but this function has a security
  10. vulnerability (see section on Temporary Files in <ulink
  11. url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). This
  12. patch makes Ed use mkstemp instead, which is the recommended way to create
  13. 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>Prepare Ed to be compiled:</para>
  17. <para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
  18. <para>Continue with compiling the package:</para>
  19. <para><screen><userinput>make</userinput></screen></para>
  20. <para><screen><userinput>make check</userinput></screen></para>
  21. <para>And finish off installing the package:</para>
  22. <para><screen><userinput>make install</userinput></screen></para>
  23. <para>We need to move the Ed binaries to the <filename
  24. class="directory">/bin</filename> directory so they may be used in the event
  25. that the <filename class="directory">/usr</filename> partition is
  26. unavailable.</para>
  27. <para><screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen></para>
  28. </sect2>