source: chapter06/mktemp.xml@ 0f1998e

Last change on this file since 0f1998e was 2256873, checked in by Gerard Beekmans <gerard@…>, 20 years ago

Last edit round.

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

  • Property mode set to 100644
File size: 2.9 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
[752f4e5]6<sect1 id="ch-system-mktemp" role="wrap">
[673b0d8]7<title>Mktemp-&mktemp-version;</title>
8<?dbhtml filename="mktemp.html"?>
9
10<indexterm zone="ch-system-mktemp"><primary sortas="a-Mktemp">Mktemp</primary></indexterm>
11
[a001133]12<sect2 role="package"><title/>
[673b0d8]13<para>The Mktemp package contains programs used to create secure temporary
14files in shell scripts.</para>
15
[a001133]16<segmentedlist>
17<segtitle>&buildtime;</segtitle>
18<segtitle>&diskspace;</segtitle>
19<seglistitem><seg>0.1 SBU</seg><seg>317 KB</seg></seglistitem>
20</segmentedlist>
[673b0d8]21
[ef13657]22<segmentedlist>
23<segtitle>Mktemp installation depends on</segtitle>
[69993f4]24<seglistitem><seg>Coreutils, Make, and Patch</seg></seglistitem>
[ef13657]25</segmentedlist>
[a001133]26</sect2>
[673b0d8]27
[a001133]28<sect2 role="installation">
[673b0d8]29<title>Installation of Mktemp</title>
30
[ef13657]31<para>Many scripts still use the deprecated
32<command>tempfile</command> program, which has functionality similar
33to <command>mktemp</command>. Patch Mktemp to include a
34<command>tempfile</command> wrapper:</para>
[673b0d8]35
[71bbe67]36<screen><userinput>patch -Np1 -i ../mktemp-&mktemp-version;-add_tempfile-1.patch</userinput></screen>
[673b0d8]37
[ef13657]38<para>Prepare Mktemp for compilation:</para>
[673b0d8]39
40<screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
41
42<para>The meaning of the configure option:</para>
43
[df8334f]44<variablelist>
45<varlistentry>
[ef57e3b]46<term><parameter>--with-libc</parameter></term>
[df8334f]47<listitem><para>This causes the <command>mktemp</command> program to
48use the <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
49functions from the system C library.</para></listitem>
50</varlistentry>
51</variablelist>
[673b0d8]52
[2256873]53<beginpage/>
54
[673b0d8]55<para>Compile the package:</para>
56
57<screen><userinput>make</userinput></screen>
58
[ef13657]59<para>Install the package:</para>
[673b0d8]60
[ef57e3b]61<screen><userinput>make install
62make install-tempfile</userinput></screen>
[673b0d8]63
64</sect2>
65
66
[c6cb3aa]67<sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
[673b0d8]68
[c6cb3aa]69<segmentedlist>
70<segtitle>Installed programs</segtitle>
[69993f4]71<seglistitem><seg>mktemp and tempfile</seg></seglistitem>
[c6cb3aa]72</segmentedlist>
[673b0d8]73
[2256873]74<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
[3ed279f]75<?dbfo list-presentation="list"?>
[673b0d8]76
[b8a819f]77<varlistentry id="mktemp">
78<term><command>mktemp</command></term>
[c6cb3aa]79<listitem>
[2256873]80<para>Creates temporary files in a secure manner; it is used in scripts</para>
[3ed279f]81<indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
[c6cb3aa]82</listitem>
83</varlistentry>
[673b0d8]84
[b8a819f]85<varlistentry id="tempfile">
86<term><command>tempfile</command></term>
[c6cb3aa]87<listitem>
[2256873]88<para>Creates temporary files in a less secure manner than
89<command>mktemp</command>; it is installed for backwards-compatibility</para>
[3ed279f]90<indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
[c6cb3aa]91</listitem>
92</varlistentry>
93</variablelist>
[673b0d8]94
95</sect2>
96
97</sect1>
[ef13657]98
Note: See TracBrowser for help on using the repository browser.