NAME
rpmstrap - bootstrapping a basic RPM-based system
SYNOPSIS
rpmstrap [OPTION]... suite target [mirror]
DESCRIPTION
rpmstrap is a tool for bootstrapping a basic RPM-based system. It is inspired by debootstrap, and allows you to build chroots and basic systems from RPM sources.
At present rpmstrap can build basic Fedora Core 2, Fedora Core 3, Fedora Core 4, Yellowdog 4, CentOS 3, CentOS 4, Mandriva and Scientific Linux systems. It also has support for custom RPM-based systems managed by PDK.
OPTIONS
- --arch arch
-
set the intended architecture (set if uname is not installed on base system) [ --arch x86_64 ]
- --download-only
-
download packages only and store them in the target directory
- --delay delay
-
insert a friendly delay in seconds between each attempt to download an RPM [ --delay .5 ]
- --local-source directory
-
specify a local source directory for RPMS [ --local-source /home/sam/rpm ]
- --pdk-source=A,B
-
specify a PDK workspace and component to pull RPMs from [ --pdk-source=workspace/path/,component.xml ]
- --print-rpms
-
print the packages to be installed, and exit
- --unpack-tarball
-
acquire .rpms from a tarball instead of a remote source
- --strip-path
-
when unpacking from tarball, use the strip path (See the texinfo document for tar)
- --list-suites
-
list the available suites this program knows
- --suite-notes suite
-
show the notes associated with a specific suite
- --suite-details suite
-
show the details of the suite (items to install and order)
- --find-best-mirror
-
find the best mirror (warning VERY slow, may be better to just use a slow mirror ;-)
- --try-mirrors
-
instead of just using the default mirror, try sequentially all of the mirrors in the event of a failure
- --upgrade
-
attempt to upgrade a given RPM-based install to the suite specified
- --force
-
force installation of RPMs even if there are errors
- --ignorearch
-
force installation of RPMs even if they are for different architecture
- --help
-
display this help and exit
- --include=A,B,C
-
adds specified package filenames to be installed after the base set has been installed
- --exclude=A,B,C
-
removes specified packages from the list of packages to be installed
- --pre script
-
runs a script before the installation [ --pre pre-install.sh ]
- --post script
-
runs a script after the installation has completed [ --post post-install.sh ]
- --verbose
-
run in verbose mode
EXAMPLES
If you wish to download the RPMs before hand, then issue the following command
# rpmstrap --download-only centos4 centos4-rpms
This will download the needed RPMs for CentOS 4 and place them into a directory "centos4-rpms" inside the current working directory.
Next, build the chroot.
# rpmstrap --local-source centos4-rpms centos4 centos4-chroot
Copy /etc/resolv.conf into the centos4-chroot.
# cp /etc/resolv.conf centos4-chroot/etc/.
Chroot into the centos4-chroot directory.
# chroot centos4-chroot
Once inside the chroot, mount the proc filesystem.
# mount -t proc proc /proc
Import the CentOS 4 PGP key.
# rpm --import http://mirror.centos.org/centos/4/os/i386/RPM-GPG-KEY-centos4
If you built the chroot on a system which has an incorrect (usually older) RPM, then rebuild the RPM database.
# rpm --rebuilddb
SEE ALSO
AUTHOR
This manpage is written by Piotr Roszatycki <[email protected]> for Debian distribution and can be freely redistributed or modified.