source: BOOK/final-system/common/mktemp.xml@ 93aa336

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 93aa336 was 3373dd11, checked in by Jim Gifford <clfs@…>, 19 years ago

r668@server (orig r666): manuel | 2005-11-08 15:25:13 -0800
Removing SBUs and DUs. Chapter final-system, round 6.

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[3f8be484]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 <!ENTITY % patches-entities SYSTEM "../../patches.ent">
6 %general-entities;
7 %patches-entities;
8]>
9
10<sect1 id="ch-system-mktemp" role="wrap">
11 <?dbhtml filename="mktemp.html"?>
12
13 <title>Mktemp-&mktemp-version;</title>
14
15 <indexterm zone="ch-system-mktemp">
16 <primary sortas="a-Mktemp">Mktemp</primary>
17 </indexterm>
18
19 <sect2 role="package">
20 <title/>
21
22 <para>The Mktemp package contains programs used to create secure
23 temporary files in shell scripts.</para>
24
25 <segmentedlist>
26 <segtitle>&dependencies;</segtitle>
27
28 <seglistitem>
29 <seg>Coreutils, Make, and Patch</seg>
30 </seglistitem>
31 </segmentedlist>
32
33 </sect2>
34
35 <sect2 role="installation">
36 <title>Installation of Mktemp</title>
37
38 <para os="a">Many scripts still use the deprecated <command>tempfile</command>
39 program, which has functionality similar to <command>mktemp</command>.
40 Patch Mktemp to include a <command>tempfile</command> wrapper:</para>
41
42<screen os="b"><userinput>patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
43
44 <para os="c">Prepare Mktemp for compilation:</para>
45
46<screen os="c1"><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
47
48 <variablelist os="d">
49 <title>The meaning of the configure option:</title>
50
51 <varlistentry>
52 <term><parameter>--with-libc</parameter></term>
53 <listitem>
54 <para>This causes the <command>mktemp</command> program to use the
55 <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
56 functions from the system C library.</para>
57 </listitem>
58 </varlistentry>
59 </variablelist>
60
61 <para os="e">Compile the package:</para>
62
63<screen os="f"><userinput>make</userinput></screen>
64
65 <para os="g">Install the package:</para>
66
67<screen os="h"><userinput>make install
68make 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>
Note: See TracBrowser for help on using the repository browser.