ed.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-ed" xreflabel="Ed">
  7. <title>Ed-&ed-version;</title>
  8. <?dbhtml filename="ed.html"?>
  9. <indexterm zone="ch-system-ed"><primary sortas="a-Ed">Ed</primary></indexterm>
  10. <para>The Ed package contains a spartan line editor.</para>
  11. <screen>&buildtime; 0.1 SBU
  12. &diskspace; 3.1 MB</screen>
  13. <para>Ed installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC,
  14. Glibc, Grep, Make, Sed.</para>
  15. <sect2>
  16. <title>Installation of Ed</title>
  17. <note><para>Ed isn't something which many people use. It's installed here
  18. because it can be used by the patch program if you encounter an ed-based patch
  19. file. This happens rarely because diff-based patches are preferred these
  20. days.</para></note>
  21. <para>Ed normally uses the <emphasis>mktemp</emphasis> function to create
  22. temporary files in <filename class="directory">/tmp</filename>, but this
  23. function contains a vulnerability (see the section on Temporary Files in <ulink
  24. url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). Apply
  25. the following patch to make Ed use <emphasis>mkstemp</emphasis> instead, a
  26. secure way to create temporary files:</para>
  27. <screen><userinput>patch -Np1 -i ../ed-&ed-version;-mkstemp.patch</userinput></screen>
  28. <para>Now prepare Ed for compilation:</para>
  29. <screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
  30. <para>The meaning of the configure option:</para>
  31. <itemizedlist>
  32. <listitem><para><userinput>--exec-prefix=""</userinput>: This forces the
  33. programs to be installed into the <filename>/bin</filename> directory. Having
  34. the programs available there is useful in the event of the
  35. <filename>/usr</filename> partition being unavailable.</para></listitem>
  36. </itemizedlist>
  37. <para>Compile the package:</para>
  38. <screen><userinput>make</userinput></screen>
  39. <para>To test the results, issue:
  40. <userinput>make check</userinput>.</para>
  41. <para>Install the package:</para>
  42. <screen><userinput>make install</userinput></screen>
  43. </sect2>
  44. <sect2 id="contents-ed"><title>Contents of Ed</title>
  45. <para><emphasis>Installed programs</emphasis>: ed and red (link to ed)</para>
  46. </sect2>
  47. <sect2><title>Short descriptions</title>
  48. <indexterm zone="ch-system-ed ed"><primary sortas="b-ed">ed</primary></indexterm>
  49. <para id="ed"><command>ed</command> is a line-oriented text editor. It can be used
  50. to create, display, modify and otherwise manipulate text files.</para>
  51. <indexterm zone="ch-system-ed red"><primary sortas="b-red">red</primary></indexterm>
  52. <para id="red"><command>red</command> is a restricted ed -- it can only edit files
  53. in the current directory and cannot execute shell commands.</para>
  54. </sect2>
  55. </sect1>