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