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