mktemp.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 instead of its own implementation of them.
  39. </para></listitem>
  40. </varlistentry>
  41. </variablelist>
  42. <para>Compile the package:</para>
  43. <screen><userinput>make</userinput></screen>
  44. <para>This package does not come with a test suite.</para>
  45. <para>Install the package:</para>
  46. <screen><userinput>make install
  47. make install-tempfile</userinput></screen>
  48. </sect2>
  49. <sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
  50. <segmentedlist>
  51. <segtitle>Installed programs</segtitle>
  52. <seglistitem><seg>mktemp and tempfile</seg></seglistitem>
  53. </segmentedlist>
  54. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  55. <?dbfo list-presentation="list"?>
  56. <?dbhtml list-presentation="table"?>
  57. <varlistentry id="mktemp">
  58. <term><command>mktemp</command></term>
  59. <listitem>
  60. <para>Creates temporary files in a secure manner; it is used in scripts</para>
  61. <indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
  62. </listitem>
  63. </varlistentry>
  64. <varlistentry id="tempfile">
  65. <term><command>tempfile</command></term>
  66. <listitem>
  67. <para>Creates temporary files in a less secure manner than
  68. <command>mktemp</command>; it is installed for backwards-compatibility</para>
  69. <indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
  70. </listitem>
  71. </varlistentry>
  72. </variablelist>
  73. </sect2>
  74. </sect1>