mktemp.xml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. <title>Mktemp-&mktemp-version;</title>
  10. <indexterm zone="ch-system-mktemp">
  11. <primary sortas="a-Mktemp">Mktemp</primary>
  12. </indexterm>
  13. <sect2 role="package">
  14. <title/>
  15. <para>The Mktemp package contains programs used to create secure temporary
  16. files in shell scripts.</para>
  17. <segmentedlist>
  18. <segtitle>&buildtime;</segtitle>
  19. <segtitle>&diskspace;</segtitle>
  20. <seglistitem>
  21. <seg>&mktemp-ch6-sbu;</seg>
  22. <seg>&mktemp-ch6-du;</seg>
  23. </seglistitem>
  24. </segmentedlist>
  25. </sect2>
  26. <sect2 role="installation">
  27. <title>Installation of Mktemp</title>
  28. <para>Many scripts still use the deprecated
  29. <command>tempfile</command> program, which has functionality similar
  30. to <command>mktemp</command>. Patch Mktemp to include a
  31. <command>tempfile</command> wrapper:</para>
  32. <screen><userinput>patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
  33. <para>Prepare Mktemp for compilation:</para>
  34. <screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
  35. <variablelist>
  36. <title>The meaning of the configure options:</title>
  37. <varlistentry>
  38. <term><parameter>--with-libc</parameter></term>
  39. <listitem>
  40. <para>This causes the <command>mktemp</command> program to use the
  41. <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
  42. functions from the system C library instead of its own implementation
  43. of them. </para>
  44. </listitem>
  45. </varlistentry>
  46. </variablelist>
  47. <para>Compile the package:</para>
  48. <screen><userinput>make</userinput></screen>
  49. <para>This package does not come with a test suite.</para>
  50. <para>Install the package:</para>
  51. <screen><userinput>make install
  52. make install-tempfile</userinput></screen>
  53. </sect2>
  54. <sect2 id="contents-mktemp" role="content">
  55. <title>Contents of Mktemp</title>
  56. <segmentedlist>
  57. <segtitle>Installed programs</segtitle>
  58. <seglistitem>
  59. <seg>mktemp and tempfile</seg>
  60. </seglistitem>
  61. </segmentedlist>
  62. <variablelist>
  63. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  64. <?dbfo list-presentation="list"?>
  65. <?dbhtml list-presentation="table"?>
  66. <varlistentry id="mktemp">
  67. <term><command>mktemp</command></term>
  68. <listitem>
  69. <para>Creates temporary files in a secure manner; it is used in
  70. scripts</para>
  71. <indexterm zone="ch-system-mktemp mktemp">
  72. <primary sortas="b-mktemp">mktemp</primary>
  73. </indexterm>
  74. </listitem>
  75. </varlistentry>
  76. <varlistentry id="tempfile">
  77. <term><command>tempfile</command></term>
  78. <listitem>
  79. <para>Creates temporary files in a less secure manner than
  80. <command>mktemp</command>; it is installed for
  81. backwards-compatibility</para>
  82. <indexterm zone="ch-system-mktemp tempfile">
  83. <primary sortas="b-tempfile">tempfile</primary>
  84. </indexterm>
  85. </listitem>
  86. </varlistentry>
  87. </variablelist>
  88. </sect2>
  89. </sect1>