6.46. Mktemp-1.5

The Mktemp package contains programs used to create secure temporary files in shell scripts.

Approximate build time: less than 0.1 SBU
Required disk space: 0.4 MB

6.46.1. Installation of Mktemp

Many scripts still use the deprecated tempfile program, which has functionality similar to mktemp. Patch Mktemp to include a tempfile wrapper:

patch -Np1 -i ../mktemp-1.5-add_tempfile-3.patch

Prepare Mktemp for compilation:

./configure --prefix=/usr --with-libc

The meaning of the configure options:

--with-libc

This causes the mktemp program to use the mkstemp and mkdtemp functions from the system C library instead of its own implementation of them.

Compile the package:

make

This package does not come with a test suite.

Install the package:

make install
make install-tempfile

6.46.2. Contents of Mktemp

Installed programs: mktemp and tempfile

Short Descriptions

mktemp

Creates temporary files in a secure manner; it is used in scripts

tempfile

Creates temporary files in a less secure manner than mktemp; it is installed for backwards-compatibility