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-1.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-1.patch</command></userinput></screen>
|
---|
58 |
|
---|
59 | <para>Install <application>Ed</application> by running the following
|
---|
60 | commands:</para>
|
---|
61 |
|
---|
62 | <screen><userinput><command>./configure --prefix=/usr --exec-prefix="" &&
|
---|
63 | make &&
|
---|
64 | make install</command></userinput></screen>
|
---|
65 |
|
---|
66 | </sect2>
|
---|
67 |
|
---|
68 | <sect2>
|
---|
69 | <title>Command explanations</title>
|
---|
70 |
|
---|
71 | <para><parameter>--exec-prefix=""</parameter>: This forces the programs
|
---|
72 | to be installed into the <filename class="directory">/bin</filename>
|
---|
73 | directory. Having the programs available there is useful in the event of
|
---|
74 | the <filename class="directory">/usr</filename> partition being
|
---|
75 | unavailable.</para>
|
---|
76 |
|
---|
77 | </sect2>
|
---|
78 |
|
---|
79 | <sect2>
|
---|
80 | <title>Contents</title>
|
---|
81 |
|
---|
82 | <para>The <application>Ed</application> package contains
|
---|
83 | <command>ed</command> and
|
---|
84 | <command>red</command>.</para>
|
---|
85 |
|
---|
86 | </sect2>
|
---|
87 |
|
---|
88 | <sect2><title>Description</title>
|
---|
89 |
|
---|
90 | <sect3><title>ed</title>
|
---|
91 | <para><command>ed</command>
|
---|
92 | is a line-oriented text editor.
|
---|
93 | </para></sect3>
|
---|
94 |
|
---|
95 | <sect3><title>red</title>
|
---|
96 | <para><command>red</command>
|
---|
97 | is a restricted ed—it can only edit files in the current directory
|
---|
98 | and cannot execute shell commands.
|
---|
99 | </para></sect3>
|
---|
100 |
|
---|
101 | </sect2>
|
---|
102 |
|
---|
103 | </sect1>
|
---|