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 | </sect2>
|
---|
24 |
|
---|
25 | <sect2 role="installation">
|
---|
26 | <title>Installation of Mktemp</title>
|
---|
27 |
|
---|
28 | <para os="a">Many scripts still use the deprecated <command>tempfile</command>
|
---|
29 | program, which has functionality similar to <command>mktemp</command>.
|
---|
30 | Patch Mktemp to include a <command>tempfile</command> wrapper:</para>
|
---|
31 |
|
---|
32 | <screen os="b"><userinput>patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
|
---|
33 |
|
---|
34 | <para os="s1">The following sed removes -s from the install command which
|
---|
35 | will try to strip the installed files:</para>
|
---|
36 |
|
---|
37 | <screen os="s2"><userinput>cp Makefile{,.orig}
|
---|
38 | sed -e 's/-s $(PROG)/$(PROG)/' Makefile.orig > Makefile</userinput></screen>
|
---|
39 |
|
---|
40 | <para os="c">Prepare Mktemp for compilation:</para>
|
---|
41 |
|
---|
42 | <screen os="d"><userinput>./configure --prefix=/usr --with-libc --host=${LFS_TARGET}</userinput></screen>
|
---|
43 |
|
---|
44 | <variablelist os="e">
|
---|
45 | <title>The meaning of the configure option:</title>
|
---|
46 |
|
---|
47 | <varlistentry>
|
---|
48 | <term><parameter>--with-libc</parameter></term>
|
---|
49 | <listitem>
|
---|
50 | <para>This causes the <command>mktemp</command> program to use the
|
---|
51 | <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
|
---|
52 | functions from the system C library.</para>
|
---|
53 | </listitem>
|
---|
54 | </varlistentry>
|
---|
55 | </variablelist>
|
---|
56 |
|
---|
57 | <para os="f">Compile the package:</para>
|
---|
58 |
|
---|
59 | <screen os="g"><userinput>make</userinput></screen>
|
---|
60 |
|
---|
61 | <para os="h">Install the package:</para>
|
---|
62 |
|
---|
63 | <screen os="i"><userinput>make prefix=${LFS} install
|
---|
64 | make prefix=${LFS} install-tempfile</userinput></screen>
|
---|
65 |
|
---|
66 | </sect2>
|
---|
67 |
|
---|
68 | <sect2 id="contents-mktemp" role="content">
|
---|
69 | <title>Contents of Mktemp</title>
|
---|
70 |
|
---|
71 | <segmentedlist>
|
---|
72 | <segtitle>Installed programs</segtitle>
|
---|
73 |
|
---|
74 | <seglistitem>
|
---|
75 | <seg>mktemp and tempfile</seg>
|
---|
76 | </seglistitem>
|
---|
77 | </segmentedlist>
|
---|
78 |
|
---|
79 | <variablelist>
|
---|
80 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
81 | <?dbfo list-presentation="list"?>
|
---|
82 | <?dbhtml list-presentation="table"?>
|
---|
83 |
|
---|
84 | <varlistentry id="mktemp">
|
---|
85 | <term><command>mktemp</command></term>
|
---|
86 | <listitem>
|
---|
87 | <para>Creates temporary files in a secure manner; it is used in
|
---|
88 | scripts</para>
|
---|
89 | <indexterm zone="ch-system-mktemp mktemp">
|
---|
90 | <primary sortas="b-mktemp">mktemp</primary>
|
---|
91 | </indexterm>
|
---|
92 | </listitem>
|
---|
93 | </varlistentry>
|
---|
94 |
|
---|
95 | <varlistentry id="tempfile">
|
---|
96 | <term><command>tempfile</command></term>
|
---|
97 | <listitem>
|
---|
98 | <para>Creates temporary files in a less secure manner than
|
---|
99 | <command>mktemp</command>; it is installed for
|
---|
100 | backwards-compatibility</para>
|
---|
101 | <indexterm zone="ch-system-mktemp tempfile">
|
---|
102 | <primary sortas="b-tempfile">tempfile</primary>
|
---|
103 | </indexterm>
|
---|
104 | </listitem>
|
---|
105 | </varlistentry>
|
---|
106 |
|
---|
107 | </variablelist>
|
---|
108 |
|
---|
109 | </sect2>
|
---|
110 |
|
---|
111 | </sect1>
|
---|