6.49. Tar-1.22

The Tar package contains an archiving program.

6.49.1. Environment Settings

This package requires compiler variables to be set for the target in the environment.

export CC="${CLFS_TARGET}-gcc"
export CXX="${CLFS_TARGET}-g++"
export AR="${CLFS_TARGET}-ar"
export AS="${CLFS_TARGET}-as"
export RANLIB="${CLFS_TARGET}-ranlib"
export LD="${CLFS_TARGET}-ld"
export STRIP="${CLFS_TARGET}-strip"

6.49.2. Installation of Tar

The following patch adds a man page for tar:

patch -Np1 -i ../tar-1.22-man_page-1.patch

The following patch will add support for new compressors like XZ Utils:

patch -Np1 -i ../tar-1.22-new_compressors-1.patch

Configure can not properly determine the results of a few tests. Set them manually:

cat > config.cache << EOF
gl_cv_func_wcwidth_works=yes
gl_cv_func_btowc_eof=yes
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes
gl_cv_func_mbrtowc_incomplete_state=yes
gl_cv_func_mbrtowc_nul_retval=yes
gl_cv_func_mbrtowc_null_arg=yes
gl_cv_func_mbrtowc_retval=yes
gl_cv_func_wcrtomb_retval=yes
EOF

Prepare Tar for compilation:

./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --prefix=/usr --bindir=/bin --libexecdir=/usr/sbin \
    --cache-file=config.cache

Compile the package:

make

Install the package:

make DESTDIR=${CLFS} install

6.49.3. Contents of Tar

Installed programs: rmt and tar

Short Descriptions

rmt

Remotely manipulates a magnetic tape drive through an interprocess communication connection

tar

Creates, extracts files from, and lists the contents of archives, also known as tarballs