[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[1770019] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[673b0d8] | 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
[3e36a78] | 4 | <!ENTITY % patches-entities SYSTEM "../patches.ent">
|
---|
[673b0d8] | 5 | %general-entities;
|
---|
[3e36a78] | 6 | %patches-entities;
|
---|
[673b0d8] | 7 | ]>
|
---|
[81fd230] | 8 | <sect1 id="ch-system-mktemp" role="wrap">
|
---|
[673b0d8] | 9 | <title>Mktemp-&mktemp-version;</title>
|
---|
| 10 | <?dbhtml filename="mktemp.html"?>
|
---|
| 11 |
|
---|
| 12 | <indexterm zone="ch-system-mktemp"><primary sortas="a-Mktemp">Mktemp</primary></indexterm>
|
---|
| 13 |
|
---|
[a001133] | 14 | <sect2 role="package"><title/>
|
---|
[81fd230] | 15 | <para>The Mktemp package contains programs used to create secure temporary
|
---|
| 16 | files in shell scripts.</para>
|
---|
[673b0d8] | 17 |
|
---|
[a001133] | 18 | <segmentedlist>
|
---|
| 19 | <segtitle>&buildtime;</segtitle>
|
---|
| 20 | <segtitle>&diskspace;</segtitle>
|
---|
[eb6d9eb] | 21 | <seglistitem><seg>0.1 SBU</seg><seg>436 KB</seg></seglistitem>
|
---|
[a001133] | 22 | </segmentedlist>
|
---|
[673b0d8] | 23 |
|
---|
[81fd230] | 24 | <segmentedlist>
|
---|
[45992ae] | 25 | <segtitle>&dependencies;</segtitle>
|
---|
[81fd230] | 26 | <seglistitem><seg>Coreutils, Make, and Patch</seg></seglistitem>
|
---|
| 27 | </segmentedlist>
|
---|
[a001133] | 28 | </sect2>
|
---|
[673b0d8] | 29 |
|
---|
[a001133] | 30 | <sect2 role="installation">
|
---|
[673b0d8] | 31 | <title>Installation of Mktemp</title>
|
---|
| 32 |
|
---|
[81fd230] | 33 | <para>Many scripts still use the deprecated
|
---|
| 34 | <command>tempfile</command> program, which has functionality similar
|
---|
| 35 | to <command>mktemp</command>. Patch Mktemp to include a
|
---|
| 36 | <command>tempfile</command> wrapper:</para>
|
---|
[673b0d8] | 37 |
|
---|
[3e36a78] | 38 | <screen><userinput>patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
|
---|
[673b0d8] | 39 |
|
---|
[81fd230] | 40 | <para>Prepare Mktemp for compilation:</para>
|
---|
[673b0d8] | 41 |
|
---|
| 42 | <screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
|
---|
| 43 |
|
---|
[fc298480] | 44 | <para>The meaning of the configure options:</para>
|
---|
[81fd230] | 45 |
|
---|
| 46 | <variablelist>
|
---|
| 47 | <varlistentry>
|
---|
| 48 | <term><parameter>--with-libc</parameter></term>
|
---|
| 49 | <listitem><para>This causes the <command>mktemp</command> program to
|
---|
| 50 | use the <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
|
---|
| 51 | functions from the system C library.</para></listitem>
|
---|
| 52 | </varlistentry>
|
---|
| 53 | </variablelist>
|
---|
| 54 |
|
---|
[673b0d8] | 55 | <para>Compile the package:</para>
|
---|
| 56 |
|
---|
| 57 | <screen><userinput>make</userinput></screen>
|
---|
| 58 |
|
---|
[81fd230] | 59 | <para>Install the package:</para>
|
---|
[673b0d8] | 60 |
|
---|
[ef57e3b] | 61 | <screen><userinput>make install
|
---|
| 62 | make install-tempfile</userinput></screen>
|
---|
[673b0d8] | 63 |
|
---|
| 64 | </sect2>
|
---|
| 65 |
|
---|
| 66 |
|
---|
[c6cb3aa] | 67 | <sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
|
---|
[673b0d8] | 68 |
|
---|
[81fd230] | 69 | <segmentedlist>
|
---|
| 70 | <segtitle>Installed programs</segtitle>
|
---|
| 71 | <seglistitem><seg>mktemp and tempfile</seg></seglistitem>
|
---|
| 72 | </segmentedlist>
|
---|
| 73 |
|
---|
| 74 | <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 75 | <?dbfo list-presentation="list"?>
|
---|
[8f97096] | 76 | <?dbhtml list-presentation="table"?>
|
---|
[81fd230] | 77 |
|
---|
| 78 | <varlistentry id="mktemp">
|
---|
| 79 | <term><command>mktemp</command></term>
|
---|
| 80 | <listitem>
|
---|
| 81 | <para>Creates temporary files in a secure manner; it is used in scripts</para>
|
---|
| 82 | <indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
|
---|
| 83 | </listitem>
|
---|
| 84 | </varlistentry>
|
---|
| 85 |
|
---|
| 86 | <varlistentry id="tempfile">
|
---|
| 87 | <term><command>tempfile</command></term>
|
---|
| 88 | <listitem>
|
---|
| 89 | <para>Creates temporary files in a less secure manner than
|
---|
| 90 | <command>mktemp</command>; it is installed for backwards-compatibility</para>
|
---|
| 91 | <indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
|
---|
| 92 | </listitem>
|
---|
| 93 | </varlistentry>
|
---|
| 94 | </variablelist>
|
---|
[673b0d8] | 95 |
|
---|
| 96 | </sect2>
|
---|
| 97 |
|
---|
| 98 | </sect1>
|
---|
[81fd230] | 99 |
|
---|