mktemp.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-mktemp" xreflabel="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>317 KB</seg></seglistitem>
  17. </segmentedlist>
  18. <para>The installation dependencies for Mktemp haven't been checked yet.</para>
  19. </sect2>
  20. <sect2 role="installation">
  21. <title>Installation of Mktemp</title>
  22. <para>Many scripts still use the deprecated <command>tempfile</command>
  23. program, which has functionality much the same as <command>mktemp</command>.
  24. Patch mktemp to include a <command>tempfile</command> wrapper:</para>
  25. <screen><userinput>patch -Np1 -i ../mktemp-&mktemp-version;-add-tempfile.patch</userinput></screen>
  26. <para>Now prepare Mktemp for compilation:</para>
  27. <screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
  28. <para>The meaning of the configure option:</para>
  29. <itemizedlist>
  30. <listitem><para><userinput>--with-libc</userinput>: This causes the
  31. <command>mktemp</command> program to use the <emphasis>mkstemp</emphasis>
  32. and <emphasis>mkdtemp</emphasis> functions from the system C
  33. library.</para></listitem>
  34. </itemizedlist>
  35. <para>Compile the package:</para>
  36. <screen><userinput>make</userinput></screen>
  37. <para>Now install it:</para>
  38. <screen><userinput>make install</userinput></screen>
  39. </sect2>
  40. <sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
  41. <segmentedlist>
  42. <segtitle>Installed programs</segtitle>
  43. <seglistitem><seg>mktemp, tempfile</seg></seglistitem>
  44. </segmentedlist>
  45. <variablelist><title>Short descriptions</title>
  46. <varlistentry>
  47. <term id="mktemp"><command>mktemp</command></term>
  48. <listitem>
  49. <indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
  50. <para>creates temporary files in a secure manner. It is used in scripts.</para>
  51. </listitem>
  52. </varlistentry>
  53. <varlistentry>
  54. <term id="tempfile"><command>tempfile</command></term>
  55. <listitem>
  56. <indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
  57. <para>creates temporary files in a less secure manner than
  58. <command>mktemp</command>. It is installed for backwards-compatibility.</para>
  59. </listitem>
  60. </varlistentry>
  61. </variablelist>
  62. </sect2>
  63. </sect1>