#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 11. General Utilities

- Prev

  shared-mime-info-2.4

- Next

  tidy-html5-5.8.0

- Up
- Home

# Sharutils-4.15.2

## Introduction to Sharutils

The Sharutils package contains utilities that can create 'shell' archives.

This package is known to build and work properly using an LFS 12.3 platform.

### Package Information

- Download (HTTP): https://ftp.gnu.org/gnu/sharutils/sharutils-4.15.2.tar.xz

- Download MD5 sum: 5975ce21da36491d7aa6dc2b0d9788e0

- Download size: 1.1 MB

- Estimated disk space required: 22 MB (with the test suite)

- Estimated build time: 0.4 SBU (with the test suite)

## Installation of Sharutils

Fix a heap buffer overflow, and an issue exposed by GCC-10:

    sed -i 's/BUFSIZ/rw_base_size/' src/unshar.c &&
    sed -i '/program_name/s/^/extern /' src/*opts.h

Install Sharutils by running the following commands:

    sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c        &&
    echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h &&

    ./configure --prefix=/usr &&
    make

To test the results, issue make check.

Now, as the `root` user:

    make install

## Contents

Installed Programs: shar, unshar, uudecode and uuencode
Installed Libraries: None
Installed Directories: None

### Short Descriptions

shar | creates "shell archives" (or shar files) which are in text format and can be mailed
unshar | unpacks a shar file
uudecode | reads a file (or by default the standard input) and writes an encoded version to the standard output. The encoding uses only printing ASCII characters
uuencode | reads a file (or by default the standard input) and decodes the uuencoded version to the standard output

- Prev

  shared-mime-info-2.4

- Next

  tidy-html5-5.8.0

- Up
- Home