mktemp.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. <!ENTITY % patches-entities SYSTEM "../patches.ent">
  5. %general-entities;
  6. %patches-entities;
  7. ]>
  8. <sect1 id="ch-system-mktemp" role="wrap">
  9. <title>Mktemp-&mktemp-version;</title>
  10. <?dbhtml filename="mktemp.html"?>
  11. <indexterm zone="ch-system-mktemp"><primary sortas="a-Mktemp">Mktemp</primary></indexterm>
  12. <sect2 role="package"><title/>
  13. <para>The Mktemp package contains programs used to create secure temporary
  14. files in shell scripts.</para>
  15. <segmentedlist>
  16. <segtitle>&buildtime;</segtitle>
  17. <segtitle>&diskspace;</segtitle>
  18. <seglistitem><seg>0.1 SBU</seg><seg>436 KB</seg></seglistitem>
  19. </segmentedlist>
  20. <segmentedlist>
  21. <segtitle>&dependencies;</segtitle>
  22. <seglistitem><seg>Coreutils, Make, and Patch</seg></seglistitem>
  23. </segmentedlist>
  24. </sect2>
  25. <sect2 role="installation">
  26. <title>Installation of Mktemp</title>
  27. <para>Many scripts still use the deprecated
  28. <command>tempfile</command> program, which has functionality similar
  29. to <command>mktemp</command>. Patch Mktemp to include a
  30. <command>tempfile</command> wrapper:</para>
  31. <screen><userinput>patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
  32. <para>Prepare Mktemp for compilation:</para>
  33. <screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
  34. <para>The meaning of the configure options:</para>
  35. <variablelist>
  36. <varlistentry>
  37. <term><parameter>--with-libc</parameter></term>
  38. <listitem><para>This causes the <command>mktemp</command> program to
  39. use the <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
  40. functions from the system C library.</para></listitem>
  41. </varlistentry>
  42. </variablelist>
  43. <para>Compile the package:</para>
  44. <screen><userinput>make</userinput></screen>
  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>