1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY ed-download-http "http://ftp.gnu.org/pub/gnu/ed/ed-&ed-version;.tar.gz">
|
---|
8 | <!ENTITY ed-download-ftp "ftp://ftp.gnu.org/pub/gnu/ed/ed-&ed-version;.tar.gz">
|
---|
9 | <!ENTITY ed-size "182 KB">
|
---|
10 | <!ENTITY ed-buildsize "3.1 MB">
|
---|
11 | <!ENTITY ed-time "0.10 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <sect1 id="ed" xreflabel="Ed-&ed-version;">
|
---|
15 | <?dbhtml filename="ed.html"?>
|
---|
16 | <title>Ed-&ed-version;</title>
|
---|
17 |
|
---|
18 | <sect2>
|
---|
19 | <title>Introduction to <application>Ed</application></title>
|
---|
20 |
|
---|
21 | <para><application>Ed</application> is a line-oriented text editor. It
|
---|
22 | is used to create, display, modify and otherwise manipulate text files,
|
---|
23 | both interactively and via shell scripts. Ed isn't something which many
|
---|
24 | people use. It's described here because it can be used by the patch
|
---|
25 | program if you encounter an ed-based patch file. This happens rarely
|
---|
26 | because diff-based patches are preferred these days.</para>
|
---|
27 |
|
---|
28 | <sect3><title>Package information</title>
|
---|
29 | <itemizedlist spacing="compact">
|
---|
30 | <listitem><para>Download (HTTP): <ulink url="&ed-download-http;"/></para></listitem>
|
---|
31 | <listitem><para>Download (FTP): <ulink url="&ed-download-ftp;"/></para></listitem>
|
---|
32 | <listitem><para>Download size: &ed-size;</para></listitem>
|
---|
33 | <listitem><para>Estimated Disk space required: &ed-buildsize;</para></listitem>
|
---|
34 | <listitem><para>Estimated build time: &ed-time;</para></listitem></itemizedlist>
|
---|
35 | </sect3>
|
---|
36 |
|
---|
37 | <sect3><title>Additional downloads</title>
|
---|
38 | <itemizedlist spacing="compact">
|
---|
39 | <listitem><para>Required Patch: <ulink
|
---|
40 | url="&patch-root;/ed-&ed-version;-mkstemp.patch"/></para></listitem>
|
---|
41 | </itemizedlist></sect3>
|
---|
42 |
|
---|
43 | </sect2>
|
---|
44 |
|
---|
45 | <sect2>
|
---|
46 | <title>Installation of <application>Ed</application></title>
|
---|
47 |
|
---|
48 | <para><application>Ed</application> normally uses the
|
---|
49 | <emphasis>mktemp</emphasis> function to create temporary files in
|
---|
50 | <filename class="directory">/tmp</filename>, but this function contains
|
---|
51 | a vulnerability (see the section on Temporary Files at
|
---|
52 | <ulink url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>).
|
---|
53 | Apply the following patch to make <application>Ed</application> use
|
---|
54 | <emphasis>mkstemp</emphasis> instead, a secure way to create temporary
|
---|
55 | files:</para>
|
---|
56 |
|
---|
57 | <screen><userinput><command>patch -Np1 -i ../ed-&ed-version;-mkstemp.patch</command></userinput></screen>
|
---|
58 |
|
---|
59 | <para>Now prepare <application>Ed</application> for compilation:</para>
|
---|
60 |
|
---|
61 | <screen><userinput><command>./configure --prefix=/usr --exec-prefix=""</command></userinput></screen>
|
---|
62 |
|
---|
63 | <para>Compile the package:</para>
|
---|
64 |
|
---|
65 | <screen><userinput><command>make</command></userinput></screen>
|
---|
66 |
|
---|
67 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
68 |
|
---|
69 | <para>Install the package:</para>
|
---|
70 |
|
---|
71 | <screen><userinput><command>make install</command></userinput></screen>
|
---|
72 |
|
---|
73 | </sect2>
|
---|
74 |
|
---|
75 | <sect2>
|
---|
76 | <title>Command explanations</title>
|
---|
77 |
|
---|
78 | <para><parameter>--exec-prefix=""</parameter>: This forces the programs
|
---|
79 | to be installed into the <filename class="directory">/bin</filename>
|
---|
80 | directory. Having the programs available there is useful in the event of
|
---|
81 | the <filename class="directory">/usr</filename> partition being
|
---|
82 | unavailable.</para>
|
---|
83 |
|
---|
84 | </sect2>
|
---|
85 |
|
---|
86 | <sect2>
|
---|
87 | <title>Contents</title>
|
---|
88 |
|
---|
89 | <para>The <application>Ed</application> package contains
|
---|
90 | <command>ed</command> and
|
---|
91 | <command>red</command> (link to <command>ed</command>).</para>
|
---|
92 |
|
---|
93 | </sect2>
|
---|
94 |
|
---|
95 | <sect2><title>Description</title>
|
---|
96 |
|
---|
97 | <sect3><title>ed</title>
|
---|
98 | <para><command>ed</command>
|
---|
99 | is a line-oriented text editor.
|
---|
100 | </para></sect3>
|
---|
101 |
|
---|
102 | <sect3><title>red</title>
|
---|
103 | <para><command>red</command>
|
---|
104 | is a restricted ed—it can only edit files in the current directory
|
---|
105 | and cannot execute shell commands.
|
---|
106 | </para></sect3>
|
---|
107 |
|
---|
108 | </sect2>
|
---|
109 |
|
---|
110 | </sect1>
|
---|