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