mktemp.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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-1.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. <variablelist>
  30. <varlistentry>
  31. <term><parameter>--with-libc</parameter></term>
  32. <listitem><para>This causes the <command>mktemp</command> program to
  33. use the <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
  34. functions from the system C library.</para></listitem>
  35. </varlistentry>
  36. </variablelist>
  37. <para>Compile the package:</para>
  38. <screen><userinput>make</userinput></screen>
  39. <para>Now install it:</para>
  40. <screen><userinput>make install
  41. make install-tempfile</userinput></screen>
  42. </sect2>
  43. <sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
  44. <segmentedlist>
  45. <segtitle>Installed programs</segtitle>
  46. <seglistitem><seg>mktemp, tempfile</seg></seglistitem>
  47. </segmentedlist>
  48. <variablelist><title>Short descriptions</title>
  49. <varlistentry id="mktemp">
  50. <term><command>mktemp</command></term>
  51. <listitem>
  52. <indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
  53. <para>creates temporary files in a secure manner. It is used in scripts.</para>
  54. </listitem>
  55. </varlistentry>
  56. <varlistentry id="tempfile">
  57. <term><command>tempfile</command></term>
  58. <listitem>
  59. <indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
  60. <para>creates temporary files in a less secure manner than
  61. <command>mktemp</command>. It is installed for backwards-compatibility.</para>
  62. </listitem>
  63. </varlistentry>
  64. </variablelist>
  65. </sect2>
  66. </sect1>