aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/mktemp.xml
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2005-02-19 22:16:42 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2005-02-19 22:16:42 +0000
commit81fd230419b0cfd052b08fc1ed352bb7d49975df (patch)
tree24c98d2876e5b457dcb88d39e7cca4905f58691a /chapter06/mktemp.xml
parent2f9131f8390243dbc350fe2eeb9e1d58f0264888 (diff)
Trunk is now identical to Testing
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06/mktemp.xml')
-rw-r--r--chapter06/mktemp.xml55
1 files changed, 50 insertions, 5 deletions
diff --git a/chapter06/mktemp.xml b/chapter06/mktemp.xml
index b71176dfb..d478ab874 100644
--- a/chapter06/mktemp.xml
+++ b/chapter06/mktemp.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-mktemp" xreflabel="Mktemp" role="wrap">
+<sect1 id="ch-system-mktemp" role="wrap">
<title>Mktemp-&mktemp-version;</title>
<?dbhtml filename="mktemp.html"?>
<indexterm zone="ch-system-mktemp"><primary sortas="a-Mktemp">Mktemp</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Mktemp package contains programs used to create secure temporary
+files in shell scripts.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,24 +19,42 @@
<seglistitem><seg>0.1 SBU</seg><seg>317 KB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Mktemp installation depends on</segtitle>
+<seglistitem><seg>Coreutils, Make, and Patch</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Mktemp</title>
-<para>Apply a patch:</para>
+<para>Many scripts still use the deprecated
+<command>tempfile</command> program, which has functionality similar
+to <command>mktemp</command>. Patch Mktemp to include a
+<command>tempfile</command> wrapper:</para>
<screen><userinput>patch -Np1 -i ../mktemp-&mktemp-version;-add_tempfile-1.patch</userinput></screen>
-<para>Now prepare Mktemp for compilation:</para>
+<para>Prepare Mktemp for compilation:</para>
<screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
+<para>The meaning of the configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--with-libc</parameter></term>
+<listitem><para>This causes the <command>mktemp</command> program to
+use the <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
+functions from the system C library.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install
make install-tempfile</userinput></screen>
@@ -44,8 +64,33 @@ make install-tempfile</userinput></screen>
<sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>mktemp and tempfile</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="mktemp">
+<term><command>mktemp</command></term>
+<listitem>
+<para>Creates temporary files in a secure manner; it is used in scripts</para>
+<indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tempfile">
+<term><command>tempfile</command></term>
+<listitem>
+<para>Creates temporary files in a less secure manner than
+<command>mktemp</command>; it is installed for backwards-compatibility</para>
+<indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+