mktemp.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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">
  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. <para>The Mktemp package contains programs used to create secure temporary
  11. files in shell scripts.</para>
  12. <screen>&buildtime; 0.1 SBU
  13. &diskspace; 317 KB</screen>
  14. <para>The installation dependencies for Mktemp haven't been checked yet.</para>
  15. <sect2>
  16. <title>Installation of Mktemp</title>
  17. <para>Many scripts still use the deprecated <command>tempfile</command>
  18. program, which has functionality much the same as <command>mktemp</command>.
  19. Patch mktemp to include a <command>tempfile</command> wrapper:</para>
  20. <screen><userinput>patch -Np1 -i ../mktemp-&mktemp-version;-add-tempfile.patch</userinput></screen>
  21. <para>Now prepare Mktemp for compilation:</para>
  22. <screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
  23. <para>The meaning of the configure option:</para>
  24. <itemizedlist>
  25. <listitem><para><userinput>--with-libc</userinput>: This causes the
  26. <command>mktemp</command> program to use the <emphasis>mkstemp</emphasis>
  27. and <emphasis>mkdtemp</emphasis> functions from the system C
  28. library.</para></listitem>
  29. </itemizedlist>
  30. <para>Compile the package:</para>
  31. <screen><userinput>make</userinput></screen>
  32. <para>Now install it:</para>
  33. <screen><userinput>make install</userinput></screen>
  34. </sect2>
  35. <sect2 id="contents-mktemp"><title>Contents of Mktemp</title>
  36. <para><emphasis>Installed programs</emphasis>: mktemp, tempfile</para>
  37. </sect2>
  38. <sect2><title>Short descriptions</title>
  39. <indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
  40. <para id="mktemp"><command>mktemp</command> creates temporary files in a secure manner.
  41. It is used in scripts.</para>
  42. <indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
  43. <para id="tempfile"><command>tempfile</command> creates temporary files in a less secure
  44. manner than <command>mktemp</command>. It is installed for
  45. backwards-compatibility.</para>
  46. </sect2>
  47. </sect1>