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">
6 <sect1 id="ch-system-ed" xreflabel="Ed">
7 <title>Ed-&ed-version;</title>
8 <?dbhtml filename="ed.html"?>
10 <indexterm zone="ch-system-ed"><primary sortas="a-Ed">Ed</primary></indexterm>
12 <para>The Ed package contains a spartan line editor.</para>
14 <screen>&buildtime; 0.1 SBU
15 &diskspace; 3.1 MB</screen>
17 <para>Ed installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC,
18 Glibc, Grep, Make, Sed.</para>
23 <title>Installation of Ed</title>
25 <note><para>Ed isn't something which many people use. It's installed here
26 because it can be used by the patch program if you encounter an ed-based patch
27 file. This happens rarely because diff-based patches are preferred these
30 <para>Ed normally uses the <emphasis>mktemp</emphasis> function to create
31 temporary files in <filename class="directory">/tmp</filename>, but this
32 function contains a vulnerability (see the section on Temporary Files in <ulink
33 url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). Apply
34 the following patch to make Ed use <emphasis>mkstemp</emphasis> instead, a
35 secure way to create temporary files:</para>
37 <screen><userinput>patch -Np1 -i ../ed-&ed-version;-mkstemp.patch</userinput></screen>
39 <para>Now prepare Ed for compilation:</para>
41 <screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
43 <para>The meaning of the configure option:</para>
46 <listitem><para><userinput>--exec-prefix=""</userinput>: This forces the
47 programs to be installed into the <filename>/bin</filename> directory. Having
48 the programs available there is useful in the event of the
49 <filename>/usr</filename> partition being unavailable.</para></listitem>
52 <para>Compile the package:</para>
54 <screen><userinput>make</userinput></screen>
56 <para>To test the results, issue:
57 <userinput>make check</userinput>.</para>
59 <para>Install the package:</para>
61 <screen><userinput>make install</userinput></screen>
66 <sect2 id="contents-ed"><title>Contents of Ed</title>
68 <para><emphasis>Installed programs</emphasis>: ed and red (link to ed)</para>
73 <sect2><title>Short descriptions</title>
75 <indexterm zone="ch-system-ed ed"><primary sortas="b-ed">ed</primary></indexterm>
76 <para id="ed"><command>ed</command> is a line-oriented text editor. It can be used
77 to create, display, modify and otherwise manipulate text files.</para>
79 <indexterm zone="ch-system-ed red"><primary sortas="b-red">red</primary></indexterm>
80 <para id="red"><command>red</command> is a restricted ed -- it can only edit files
81 in the current directory and cannot execute shell commands.</para>