source: clfs-sysroot/BOOK/final-system/common/mktemp.xml@ 4c1e84e

Last change on this file since 4c1e84e was cee2ca2, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Went through and made sure that every package in the final system that needs both --build and --host has them.

  • Property mode set to 100644
File size: 3.4 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
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.in{,.orig}
38sed -e 's/-s $(PROG)/$(PROG)/' Makefile.in.orig &gt; Makefile.in</userinput></screen>
39
40 <para os="c">Prepare Mktemp for compilation:</para>
41
42<screen os="d"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
43 --prefix=/usr --with-libc</userinput></screen>
44
45 <variablelist os="e">
46 <title>The meaning of the configure option:</title>
47
48 <varlistentry>
49 <term><parameter>--with-libc</parameter></term>
50 <listitem>
51 <para>This causes the <command>mktemp</command> program to use the
52 <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
53 functions from the system C library.</para>
54 </listitem>
55 </varlistentry>
56 </variablelist>
57
58 <para os="f">Compile the package:</para>
59
60<screen os="g"><userinput>make</userinput></screen>
61
62 <para os="h">Install the package:</para>
63
64<screen os="i"><userinput>make prefix=${CLFS}/usr install
65make prefix=${CLFS}/usr install-tempfile</userinput></screen>
66
67 </sect2>
68
69 <sect2 id="contents-mktemp" role="content">
70 <title>Contents of Mktemp</title>
71
72 <segmentedlist>
73 <segtitle>Installed programs</segtitle>
74
75 <seglistitem>
76 <seg>mktemp and tempfile</seg>
77 </seglistitem>
78 </segmentedlist>
79
80 <variablelist>
81 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
82 <?dbfo list-presentation="list"?>
83 <?dbhtml list-presentation="table"?>
84
85 <varlistentry id="mktemp">
86 <term><command>mktemp</command></term>
87 <listitem>
88 <para>Creates temporary files in a secure manner; it is used in
89 scripts</para>
90 <indexterm zone="ch-system-mktemp mktemp">
91 <primary sortas="b-mktemp">mktemp</primary>
92 </indexterm>
93 </listitem>
94 </varlistentry>
95
96 <varlistentry id="tempfile">
97 <term><command>tempfile</command></term>
98 <listitem>
99 <para>Creates temporary files in a less secure manner than
100 <command>mktemp</command>; it is installed for
101 backwards-compatibility</para>
102 <indexterm zone="ch-system-mktemp tempfile">
103 <primary sortas="b-tempfile">tempfile</primary>
104 </indexterm>
105 </listitem>
106 </varlistentry>
107
108 </variablelist>
109
110 </sect2>
111
112</sect1>
Note: See TracBrowser for help on using the repository browser.