mktemp.xml 2.9 KB

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