[0590c1b6] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[0590c1b6] | 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">
|
---|
[d4afab2] | 9 | <!ENTITY ed-md5sum "ddd57463774cae9b50e70cd51221281b">
|
---|
[0590c1b6] | 10 | <!ENTITY ed-size "182 KB">
|
---|
[cf068ee1] | 11 | <!ENTITY ed-buildsize "2.9 MB">
|
---|
| 12 | <!ENTITY ed-time "0.02 SBU">
|
---|
[0590c1b6] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="ed" xreflabel="Ed-&ed-version;">
|
---|
[13c7e881] | 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"><primary
|
---|
| 26 | sortas="a-Ed">Ed</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="installation">
|
---|
| 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 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>Download (HTTP): <ulink url="&ed-download-http;"/></para>
|
---|
| 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download (FTP): <ulink url="&ed-download-ftp;"/></para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download MD5 sum: &ed-md5sum;</para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Download size: &ed-size;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Estimated disk space required: &ed-buildsize;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Estimated build time: &ed-time;</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | </itemizedlist>
|
---|
| 60 |
|
---|
| 61 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 62 | <itemizedlist spacing="compact">
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Required Patch: <ulink
|
---|
| 65 | url="&patch-root;/ed-&ed-version;-mkstemp-1.patch"/></para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </itemizedlist>
|
---|
| 68 |
|
---|
| 69 | </sect2>
|
---|
| 70 |
|
---|
| 71 | <sect2 role="installation">
|
---|
| 72 | <title>Installation of Ed</title>
|
---|
| 73 |
|
---|
| 74 | <para><application>Ed</application> normally uses the
|
---|
| 75 | <function>mktemp</function> function to create temporary files in
|
---|
| 76 | <filename class="directory">/tmp</filename>, but this function contains
|
---|
| 77 | a vulnerability (see the section on Temporary Files at
|
---|
| 78 | <ulink url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>).
|
---|
| 79 | Apply the following patch to make <application>Ed</application> use
|
---|
| 80 | <function>mkstemp</function> instead, a secure way to create temporary
|
---|
| 81 | files:</para>
|
---|
| 82 |
|
---|
| 83 | <screen><userinput>patch -Np1 -i ../ed-&ed-version;-mkstemp-1.patch</userinput></screen>
|
---|
| 84 |
|
---|
| 85 | <para>Install <application>Ed</application> by running the following
|
---|
| 86 | commands:</para>
|
---|
| 87 |
|
---|
| 88 | <screen><userinput>./configure --prefix=/usr --exec-prefix="" &&
|
---|
| 89 | make</userinput></screen>
|
---|
| 90 |
|
---|
| 91 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 92 |
|
---|
| 93 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 94 |
|
---|
| 95 | </sect2>
|
---|
| 96 |
|
---|
| 97 | <sect2 role="commands">
|
---|
| 98 | <title>Command Explanations</title>
|
---|
| 99 |
|
---|
| 100 | <para><parameter>--exec-prefix=""</parameter>: This forces the programs
|
---|
| 101 | to be installed into the <filename class="directory">/bin</filename>
|
---|
| 102 | directory. Having the programs available there is useful in the event of
|
---|
| 103 | the <filename class="directory">/usr</filename> partition being
|
---|
| 104 | unavailable.</para>
|
---|
| 105 |
|
---|
| 106 | </sect2>
|
---|
| 107 |
|
---|
| 108 | <sect2 role="content">
|
---|
| 109 | <title>Contents</title>
|
---|
| 110 |
|
---|
| 111 | <segmentedlist>
|
---|
| 112 | <segtitle>Installed Programs</segtitle>
|
---|
| 113 | <segtitle>Installed Libraries</segtitle>
|
---|
| 114 | <segtitle>Installed Directories</segtitle>
|
---|
| 115 |
|
---|
| 116 | <seglistitem>
|
---|
| 117 | <seg>ed and red</seg>
|
---|
| 118 | <seg>None</seg>
|
---|
| 119 | <seg>None</seg>
|
---|
| 120 | </seglistitem>
|
---|
| 121 | </segmentedlist>
|
---|
| 122 |
|
---|
| 123 | <variablelist>
|
---|
| 124 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 125 | <?dbfo list-presentation="list"?>
|
---|
| 126 | <?dbhtml list-presentation="table"?>
|
---|
| 127 |
|
---|
| 128 | <varlistentry id="ed-prog">
|
---|
| 129 | <term><command>ed</command></term>
|
---|
| 130 | <listitem>
|
---|
| 131 | <para>is a line-oriented text editor.</para>
|
---|
| 132 | <indexterm zone="ed ed-prog">
|
---|
| 133 | <primary sortas="b-ed">ed</primary>
|
---|
| 134 | </indexterm>
|
---|
| 135 | </listitem>
|
---|
| 136 | </varlistentry>
|
---|
| 137 |
|
---|
| 138 | <varlistentry id="red">
|
---|
| 139 | <term><command>red</command></term>
|
---|
| 140 | <listitem>
|
---|
[13679edb] | 141 | <para>is a restricted <command>ed</command>—it can only edit
|
---|
| 142 | files in the current directory and cannot execute shell
|
---|
| 143 | commands.</para>
|
---|
[13c7e881] | 144 | <indexterm zone="ed red">
|
---|
| 145 | <primary sortas="b-red">red</primary>
|
---|
| 146 | </indexterm>
|
---|
| 147 | </listitem>
|
---|
| 148 | </varlistentry>
|
---|
| 149 |
|
---|
| 150 | </variablelist>
|
---|
| 151 |
|
---|
| 152 | </sect2>
|
---|
[0590c1b6] | 153 |
|
---|
| 154 | </sect1>
|
---|