source: chapter06/mktemp.xml@ bdb61fa

Last change on this file since bdb61fa was bdb61fa, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Ported r7357 and r7358 from trunk to udev_update branch.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/udev_update/BOOK@7359 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 3.5 KB
Line 
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 temporary
21 files in shell scripts.</para>
22
23 <segmentedlist>
24 <segtitle>&buildtime;</segtitle>
25 <segtitle>&diskspace;</segtitle>
26
27 <seglistitem>
28 <seg>0.1 SBU</seg>
29 <seg>436 KB</seg>
30 </seglistitem>
31 </segmentedlist>
32
33 <segmentedlist>
34 <segtitle>&dependencies;</segtitle>
35
36 <seglistitem>
37 <seg>Coreutils, Make, and Patch</seg>
38 </seglistitem>
39 </segmentedlist>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of Mktemp</title>
45
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>
50
51<screen><userinput>patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
52
53 <para>Prepare Mktemp for compilation:</para>
54
55<screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
56
57 <variablelist>
58 <title>The meaning of the configure options:</title>
59
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>
69
70 </variablelist>
71
72 <para>Compile the package:</para>
73
74<screen><userinput>make</userinput></screen>
75
76 <para>This package does not come with a test suite.</para>
77
78 <para>Install the package:</para>
79
80<screen><userinput>make install
81make install-tempfile</userinput></screen>
82
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>
127
128</sect1>
Note: See TracBrowser for help on using the repository browser.