2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2005-01-30 18:06:48 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2005-02-19 22:16:42 +00:00
|
|
|
<sect1 id="ch-system-mktemp" role="wrap">
|
2004-05-03 11:59:46 +01:00
|
|
|
<title>Mktemp-&mktemp-version;</title>
|
|
|
|
<?dbhtml filename="mktemp.html"?>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-mktemp"><primary sortas="a-Mktemp">Mktemp</primary></indexterm>
|
|
|
|
|
2004-05-16 01:08:42 +01:00
|
|
|
<sect2 role="package"><title/>
|
2005-02-19 22:16:42 +00:00
|
|
|
<para>The Mktemp package contains programs used to create secure temporary
|
|
|
|
files in shell scripts.</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2004-05-16 01:08:42 +01:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2005-06-14 23:56:57 +01:00
|
|
|
<seglistitem><seg>0.1 SBU</seg><seg>436 KB</seg></seglistitem>
|
2004-05-16 01:08:42 +01:00
|
|
|
</segmentedlist>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<segmentedlist>
|
2005-02-24 22:26:46 +00:00
|
|
|
<segtitle>&dependencies;</segtitle>
|
2005-02-19 22:16:42 +00:00
|
|
|
<seglistitem><seg>Coreutils, Make, and Patch</seg></seglistitem>
|
|
|
|
</segmentedlist>
|
2004-05-16 01:08:42 +01:00
|
|
|
</sect2>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2004-05-16 01:08:42 +01:00
|
|
|
<sect2 role="installation">
|
2004-05-03 11:59:46 +01:00
|
|
|
<title>Installation of Mktemp</title>
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<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>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2004-06-07 19:52:47 +01:00
|
|
|
<screen><userinput>patch -Np1 -i ../mktemp-&mktemp-version;-add_tempfile-1.patch</userinput></screen>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<para>Prepare Mktemp for compilation:</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
<screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<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>
|
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
<para>Compile the package:</para>
|
|
|
|
|
|
|
|
<screen><userinput>make</userinput></screen>
|
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<para>Install the package:</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2004-06-19 13:04:20 +01:00
|
|
|
<screen><userinput>make install
|
|
|
|
make install-tempfile</userinput></screen>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
|
2004-05-17 22:55:01 +01:00
|
|
|
<sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed programs</segtitle>
|
|
|
|
<seglistitem><seg>mktemp and tempfile</seg></seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
2005-02-24 18:32:19 +00:00
|
|
|
<?dbhtml list-presentation="table"?>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
|
|
|
<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>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|
2005-02-19 22:16:42 +00:00
|
|
|
|