1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/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-md5sum "ddd57463774cae9b50e70cd51221281b">
|
---|
10 | <!ENTITY ed-size "182 KB">
|
---|
11 | <!ENTITY ed-buildsize "2.9 MB">
|
---|
12 | <!ENTITY ed-time "0.02 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="ed" xreflabel="Ed-&ed-version;">
|
---|
16 | <?dbhtml filename="ed.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>Ed-&ed-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="ed">
|
---|
26 | <primary sortas="a-Ed">Ed</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to Ed</title>
|
---|
31 |
|
---|
32 | <para><application>Ed</application> is a line-oriented text editor. It
|
---|
33 | is used to create, display, modify and otherwise manipulate text files,
|
---|
34 | both interactively and via shell scripts. Ed isn't something which many
|
---|
35 | people use. It's described here because it can be used by the patch
|
---|
36 | program if you encounter an ed-based patch file. This happens rarely
|
---|
37 | because diff-based patches are preferred these days.</para>
|
---|
38 |
|
---|
39 | <caution>
|
---|
40 | <para><application>Ed</application> determines character boundaries
|
---|
41 | incorrectly in multibyte locales. See the
|
---|
42 | <xref linkend="locale-wrong-multibyte-characters"/>
|
---|
43 | section of the <xref linkend="locale-issues"/> page for a more
|
---|
44 | general discussion of this problem. Use of <application>Ed</application>
|
---|
45 | in installation instructions for BLFS packages such as
|
---|
46 | <xref linkend="tetex"/> is not a problem, as BLFS instructions never
|
---|
47 | use <application>Ed</application> to modify a file containing
|
---|
48 | non-ASCII characters.</para>
|
---|
49 | </caution>
|
---|
50 |
|
---|
51 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
52 | <itemizedlist spacing="compact">
|
---|
53 | <listitem>
|
---|
54 | <para>Download (HTTP): <ulink url="&ed-download-http;"/></para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>Download (FTP): <ulink url="&ed-download-ftp;"/></para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>Download MD5 sum: &ed-md5sum;</para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>Download size: &ed-size;</para>
|
---|
64 | </listitem>
|
---|
65 | <listitem>
|
---|
66 | <para>Estimated disk space required: &ed-buildsize;</para>
|
---|
67 | </listitem>
|
---|
68 | <listitem>
|
---|
69 | <para>Estimated build time: &ed-time;</para>
|
---|
70 | </listitem>
|
---|
71 | </itemizedlist>
|
---|
72 |
|
---|
73 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
74 | <itemizedlist spacing="compact">
|
---|
75 | <listitem>
|
---|
76 | <para>Required Patch: <ulink
|
---|
77 | url="&patch-root;/ed-&ed-version;-mkstemp-2.patch"/></para>
|
---|
78 | </listitem>
|
---|
79 | </itemizedlist>
|
---|
80 |
|
---|
81 | <para condition="html" role="usernotes">User Notes:
|
---|
82 | <ulink url="&blfs-wiki;/ed"/></para>
|
---|
83 |
|
---|
84 | </sect2>
|
---|
85 |
|
---|
86 | <sect2 role="installation">
|
---|
87 | <title>Installation of Ed</title>
|
---|
88 |
|
---|
89 | <para><application>Ed</application> normally uses the
|
---|
90 | <function>mktemp</function> function to create temporary files in
|
---|
91 | <filename class="directory">/tmp</filename>, but this function contains
|
---|
92 | a vulnerability (see the section on Temporary Files at
|
---|
93 | <ulink url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>).
|
---|
94 | Apply the following patch to make <application>Ed</application> use
|
---|
95 | <function>mkstemp</function> instead, a secure way to create temporary
|
---|
96 | files:</para>
|
---|
97 |
|
---|
98 | <screen><userinput>patch -Np1 -i ../ed-&ed-version;-mkstemp-2.patch</userinput></screen>
|
---|
99 |
|
---|
100 | <para>Install <application>Ed</application> by running the following
|
---|
101 | commands:</para>
|
---|
102 |
|
---|
103 | <screen><userinput>./configure --prefix=/usr --exec-prefix="" &&
|
---|
104 | make</userinput></screen>
|
---|
105 |
|
---|
106 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
107 |
|
---|
108 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
109 |
|
---|
110 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
111 |
|
---|
112 | </sect2>
|
---|
113 |
|
---|
114 | <sect2 role="commands">
|
---|
115 | <title>Command Explanations</title>
|
---|
116 |
|
---|
117 | <para><parameter>--exec-prefix=""</parameter>: This forces the programs
|
---|
118 | to be installed into the <filename class="directory">/bin</filename>
|
---|
119 | directory. Having the programs available there is useful in the event of
|
---|
120 | the <filename class="directory">/usr</filename> partition being
|
---|
121 | unavailable.</para>
|
---|
122 |
|
---|
123 | </sect2>
|
---|
124 |
|
---|
125 | <sect2 role="content">
|
---|
126 | <title>Contents</title>
|
---|
127 |
|
---|
128 | <segmentedlist>
|
---|
129 | <segtitle>Installed Programs</segtitle>
|
---|
130 | <segtitle>Installed Libraries</segtitle>
|
---|
131 | <segtitle>Installed Directories</segtitle>
|
---|
132 |
|
---|
133 | <seglistitem>
|
---|
134 | <seg>ed and red</seg>
|
---|
135 | <seg>None</seg>
|
---|
136 | <seg>None</seg>
|
---|
137 | </seglistitem>
|
---|
138 | </segmentedlist>
|
---|
139 |
|
---|
140 | <variablelist>
|
---|
141 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
142 | <?dbfo list-presentation="list"?>
|
---|
143 | <?dbhtml list-presentation="table"?>
|
---|
144 |
|
---|
145 | <varlistentry id="ed-prog">
|
---|
146 | <term><command>ed</command></term>
|
---|
147 | <listitem>
|
---|
148 | <para>is a line-oriented text editor.</para>
|
---|
149 | <indexterm zone="ed ed-prog">
|
---|
150 | <primary sortas="b-ed">ed</primary>
|
---|
151 | </indexterm>
|
---|
152 | </listitem>
|
---|
153 | </varlistentry>
|
---|
154 |
|
---|
155 | <varlistentry id="red">
|
---|
156 | <term><command>red</command></term>
|
---|
157 | <listitem>
|
---|
158 | <para>is a restricted <command>ed</command>—it can only edit
|
---|
159 | files in the current directory and cannot execute shell
|
---|
160 | commands.</para>
|
---|
161 | <indexterm zone="ed red">
|
---|
162 | <primary sortas="b-red">red</primary>
|
---|
163 | </indexterm>
|
---|
164 | </listitem>
|
---|
165 | </varlistentry>
|
---|
166 |
|
---|
167 | </variablelist>
|
---|
168 |
|
---|
169 | </sect2>
|
---|
170 |
|
---|
171 | </sect1>
|
---|