mktemp.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-mktemp" role="wrap">
  8. <?dbhtml filename="mktemp.html"?>
  9. <sect1info condition="script">
  10. <productname>mktemp</productname>
  11. <productnumber>&mktemp-version;</productnumber>
  12. <address>&mktemp-url;</address>
  13. </sect1info>
  14. <title>Mktemp-&mktemp-version;</title>
  15. <indexterm zone="ch-system-mktemp">
  16. <primary sortas="a-Mktemp">Mktemp</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Mktemp package contains programs used to create secure temporary
  21. files in shell scripts.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&mktemp-ch6-sbu;</seg>
  27. <seg>&mktemp-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Mktemp</title>
  33. <para>Many scripts still use the deprecated
  34. <command>tempfile</command> program, which has functionality similar
  35. to <command>mktemp</command>. Patch Mktemp to include a
  36. <command>tempfile</command> wrapper:</para>
  37. <screen><userinput remap="pre">patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
  38. <para>Prepare Mktemp for compilation:</para>
  39. <screen><userinput remap="configure">./configure --prefix=/usr --with-libc</userinput></screen>
  40. <variablelist>
  41. <title>The meaning of the configure options:</title>
  42. <varlistentry>
  43. <term><parameter>--with-libc</parameter></term>
  44. <listitem>
  45. <para>This causes the <command>mktemp</command> program to use the
  46. <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
  47. functions from the system C library instead of its own implementation
  48. of them. </para>
  49. </listitem>
  50. </varlistentry>
  51. </variablelist>
  52. <para>Compile the package:</para>
  53. <screen><userinput remap="make">make</userinput></screen>
  54. <para>This package does not come with a test suite.</para>
  55. <para>Install the package:</para>
  56. <screen><userinput remap="install">make install
  57. make install-tempfile</userinput></screen>
  58. </sect2>
  59. <sect2 id="contents-mktemp" role="content">
  60. <title>Contents of Mktemp</title>
  61. <segmentedlist>
  62. <segtitle>Installed programs</segtitle>
  63. <seglistitem>
  64. <seg>mktemp and tempfile</seg>
  65. </seglistitem>
  66. </segmentedlist>
  67. <variablelist>
  68. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  69. <?dbfo list-presentation="list"?>
  70. <?dbhtml list-presentation="table"?>
  71. <varlistentry id="mktemp">
  72. <term><command>mktemp</command></term>
  73. <listitem>
  74. <para>Creates temporary files in a secure manner; it is used in
  75. scripts</para>
  76. <indexterm zone="ch-system-mktemp mktemp">
  77. <primary sortas="b-mktemp">mktemp</primary>
  78. </indexterm>
  79. </listitem>
  80. </varlistentry>
  81. <varlistentry id="tempfile">
  82. <term><command>tempfile</command></term>
  83. <listitem>
  84. <para>Creates temporary files in a less secure manner than
  85. <command>mktemp</command>; it is installed for
  86. backwards-compatibility</para>
  87. <indexterm zone="ch-system-mktemp tempfile">
  88. <primary sortas="b-tempfile">tempfile</primary>
  89. </indexterm>
  90. </listitem>
  91. </varlistentry>
  92. </variablelist>
  93. </sect2>
  94. </sect1>