mktemp.xml 3.5 KB

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