Cpio: Difference between revisions
I reformatted the "Contents" section to to use tables. |
No edit summary |
||
| Line 2: | Line 2: | ||
|-valign="top" | |-valign="top" | ||
!Download Source: | !Download Source: | ||
| ftp://ftp.gnu.org/pub/gnu/cpio/cpio- | | ftp://ftp.gnu.org/pub/gnu/cpio/cpio-{{Cpio-Version}}.tar.bz2 | ||
|-valign="top" | |-valign="top" | ||
!Download Patch: | !Download Patch: | ||
| http://www.linuxfromscratch.org/patches/blfs/svn/cpio- | | http://www.linuxfromscratch.org/patches/blfs/svn/cpio-{{Cpio-Version}}-security_fixes-1.patch | ||
|} | |} | ||
| Line 21: | Line 21: | ||
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c && | sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c && | ||
patch -Np1 -i ../cpio- | patch -Np1 -i ../cpio-{{Cpio-Version}}-security_fixes-1.patch && | ||
./configure CPIO_MT_PROG=mt --prefix=/usr \ | ./configure CPIO_MT_PROG=mt --prefix=/usr \ | ||
--bindir=/bin --libexecdir=/tmp \ | --bindir=/bin --libexecdir=/tmp \ | ||
| Line 55: | Line 55: | ||
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c && | sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c && | ||
patch -Np1 -i ../cpio- | patch -Np1 -i ../cpio-{{Cpio-Version}}-security_fixes-1.patch && | ||
CC="gcc ${BUILD32}" ./configure CPIO_MT_PROG=mt --prefix=/usr \ | CC="gcc ${BUILD32}" ./configure CPIO_MT_PROG=mt --prefix=/usr \ | ||
--bindir=/bin --libexecdir=/tmp \ | --bindir=/bin --libexecdir=/tmp \ | ||
| Line 70: | Line 70: | ||
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c && | sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c && | ||
patch -Np1 -i ../cpio- | patch -Np1 -i ../cpio-{{Cpio-Version}}-security_fixes-1.patch && | ||
CC="gcc ${BUILDN32}" ./configure CPIO_MT_PROG=mt --prefix=/usr --libdir=/usr/lib32 \ | CC="gcc ${BUILDN32}" ./configure CPIO_MT_PROG=mt --prefix=/usr --libdir=/usr/lib32 \ | ||
--bindir=/bin --libexecdir=/tmp \ | --bindir=/bin --libexecdir=/tmp \ | ||
| Line 87: | Line 87: | ||
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c && | sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c && | ||
patch -Np1 -i ../cpio- | patch -Np1 -i ../cpio-{{Cpio-Version}}-security_fixes-1.patch && | ||
CC="gcc ${BUILD64}" ./configure CPIO_MT_PROG=mt --prefix=/usr --libdir=/usr/lib64 \ | CC="gcc ${BUILD64}" ./configure CPIO_MT_PROG=mt --prefix=/usr --libdir=/usr/lib64 \ | ||
--bindir=/bin --libexecdir=/tmp \ | --bindir=/bin --libexecdir=/tmp \ | ||
Revision as of 14:17, 17 December 2006
| Download Source: | ftp://ftp.gnu.org/pub/gnu/cpio/cpio-2.9.90.tar.bz2 |
|---|---|
| Download Patch: | http://www.linuxfromscratch.org/patches/blfs/svn/cpio-2.9.90-security_fixes-1.patch |
Introduction to Cpio
The cpio package contains tools for archiving.
Dependencies
Non-Multilib
Compile the package:
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c &&
patch -Np1 -i ../cpio-2.9.90-security_fixes-1.patch &&
./configure CPIO_MT_PROG=mt --prefix=/usr \
--bindir=/bin --libexecdir=/tmp \
--with-rmt=/usr/sbin/rmt &&
echo "#define HAVE_SETLOCALE 1" >> config.h &&
echo "#define HAVE_LSTAT 1" >> config.h &&
make
Install the package
make install
Command Explanations
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c: This fixes a problem with the build of mt.
CPIO_MT_PROG=mt: This causes mt to be included in the build.
--bindir=/bin: This makes it so that cpio is put in /bin instead of /usr/bin. This is done to match the FHS.
--libexecdir=/tmp: This prevents the creation of /usr/libexec.
--with-rmt=/usr/sbin/rmt: This parameter prevents rmt from being built. It was already installed with the Tar package.
echo "#define HAVE_SETLOCALE 1" >> config.h: This command specifies that the system Libc implements the setlocale function because it is not detected by configure.
echo "#define HAVE_LSTAT 1" >> config.h: This fixes a bug that causes cpio to convert symlinks into regular files during archive creation.
Multilib
This package does not provide any libraries so only one installation is needed.
32Bit
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c &&
patch -Np1 -i ../cpio-2.9.90-security_fixes-1.patch &&
CC="gcc ${BUILD32}" ./configure CPIO_MT_PROG=mt --prefix=/usr \
--bindir=/bin --libexecdir=/tmp \
--with-rmt=/usr/sbin/rmt &&
echo "#define HAVE_SETLOCALE 1" >> config.h &&
echo "#define HAVE_LSTAT 1" >> config.h &&
make
Install the package:
make install
N32
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c &&
patch -Np1 -i ../cpio-2.9.90-security_fixes-1.patch &&
CC="gcc ${BUILDN32}" ./configure CPIO_MT_PROG=mt --prefix=/usr --libdir=/usr/lib32 \
--bindir=/bin --libexecdir=/tmp \
--with-rmt=/usr/sbin/rmt &&
echo "#define HAVE_SETLOCALE 1" >> config.h &&
echo "#define HAVE_LSTAT 1" >> config.h &&
make
Install the package:
make install
64Bit
Compile the package:
sed -i "s/invalid_arg/argmatch_invalid/" src/mt.c &&
patch -Np1 -i ../cpio-2.9.90-security_fixes-1.patch &&
CC="gcc ${BUILD64}" ./configure CPIO_MT_PROG=mt --prefix=/usr --libdir=/usr/lib64 \
--bindir=/bin --libexecdir=/tmp \
--with-rmt=/usr/sbin/rmt &&
echo "#define HAVE_SETLOCALE 1" >> config.h &&
echo "#define HAVE_LSTAT 1" >> config.h &&
make
Install the package:
make install
Contents
| Installed Programs: | cpio and mt |
|---|---|
| Installed Libraries: | None |
| Installed Directories: | None |
Short Descriptions
| cpio | copies files to and from archives. |
|---|---|
| mt | controls magnetic tape drive operations. |