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 | <sect1info>
|
---|
16 | <othername>$LastChangedBy$</othername>
|
---|
17 | <date>$Date$</date>
|
---|
18 | </sect1info>
|
---|
19 | <?dbhtml filename="ed.html"?>
|
---|
20 | <title>Ed-&ed-version;</title>
|
---|
21 |
|
---|
22 | <sect2>
|
---|
23 | <title>Introduction to <application>Ed</application></title>
|
---|
24 |
|
---|
25 | <para><application>Ed</application> is a line-oriented text editor. It
|
---|
26 | is used to create, display, modify and otherwise manipulate text files,
|
---|
27 | both interactively and via shell scripts. Ed isn't something which many
|
---|
28 | people use. It's described here because it can be used by the patch
|
---|
29 | program if you encounter an ed-based patch file. This happens rarely
|
---|
30 | because diff-based patches are preferred these days.</para>
|
---|
31 |
|
---|
32 | <sect3><title>Package information</title>
|
---|
33 | <itemizedlist spacing="compact">
|
---|
34 | <listitem><para>Download (HTTP): <ulink url="&ed-download-http;"/></para></listitem>
|
---|
35 | <listitem><para>Download (FTP): <ulink url="&ed-download-ftp;"/></para></listitem>
|
---|
36 | <listitem><para>Download size: &ed-size;</para></listitem>
|
---|
37 | <listitem><para>Estimated Disk space required: &ed-buildsize;</para></listitem>
|
---|
38 | <listitem><para>Estimated build time: &ed-time;</para></listitem></itemizedlist>
|
---|
39 | </sect3>
|
---|
40 |
|
---|
41 | <sect3><title>Additional downloads</title>
|
---|
42 | <itemizedlist spacing="compact">
|
---|
43 | <listitem><para>Required Patch: <ulink
|
---|
44 | url="&patch-root;/ed-&ed-version;-mkstemp-1.patch"/></para></listitem>
|
---|
45 | </itemizedlist></sect3>
|
---|
46 |
|
---|
47 | </sect2>
|
---|
48 |
|
---|
49 | <sect2>
|
---|
50 | <title>Installation of <application>Ed</application></title>
|
---|
51 |
|
---|
52 | <para><application>Ed</application> normally uses the
|
---|
53 | <emphasis>mktemp</emphasis> function to create temporary files in
|
---|
54 | <filename class="directory">/tmp</filename>, but this function contains
|
---|
55 | a vulnerability (see the section on Temporary Files at
|
---|
56 | <ulink url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>).
|
---|
57 | Apply the following patch to make <application>Ed</application> use
|
---|
58 | <emphasis>mkstemp</emphasis> instead, a secure way to create temporary
|
---|
59 | files:</para>
|
---|
60 |
|
---|
61 | <screen><userinput><command>patch -Np1 -i ../ed-&ed-version;-mkstemp-1.patch</command></userinput></screen>
|
---|
62 |
|
---|
63 | <para>Install <application>Ed</application> by running the following
|
---|
64 | commands:</para>
|
---|
65 |
|
---|
66 | <screen><userinput><command>./configure --prefix=/usr --exec-prefix="" &&
|
---|
67 | make &&
|
---|
68 | make install</command></userinput></screen>
|
---|
69 |
|
---|
70 | </sect2>
|
---|
71 |
|
---|
72 | <sect2>
|
---|
73 | <title>Command explanations</title>
|
---|
74 |
|
---|
75 | <para><parameter>--exec-prefix=""</parameter>: This forces the programs
|
---|
76 | to be installed into the <filename class="directory">/bin</filename>
|
---|
77 | directory. Having the programs available there is useful in the event of
|
---|
78 | the <filename class="directory">/usr</filename> partition being
|
---|
79 | unavailable.</para>
|
---|
80 |
|
---|
81 | </sect2>
|
---|
82 |
|
---|
83 | <sect2>
|
---|
84 | <title>Contents</title>
|
---|
85 |
|
---|
86 | <para>The <application>Ed</application> package contains
|
---|
87 | <command>ed</command> and
|
---|
88 | <command>red</command>.</para>
|
---|
89 |
|
---|
90 | </sect2>
|
---|
91 |
|
---|
92 | <sect2><title>Description</title>
|
---|
93 |
|
---|
94 | <sect3><title>ed</title>
|
---|
95 | <para><command>ed</command>
|
---|
96 | is a line-oriented text editor.
|
---|
97 | </para></sect3>
|
---|
98 |
|
---|
99 | <sect3><title>red</title>
|
---|
100 | <para><command>red</command>
|
---|
101 | is a restricted ed—it can only edit files in the current directory
|
---|
102 | and cannot execute shell commands.
|
---|
103 | </para></sect3>
|
---|
104 |
|
---|
105 | </sect2>
|
---|
106 |
|
---|
107 | </sect1>
|
---|