rpmbootstrap man page


rpmbootstrap - creates a chrooted RPM based distribution a la debootstrap, aka Virtual Environment (VE)


rpmbootstrap creates a chroot environment (Virtual Environment or VE) with a minimal distribution in it, suited for building packages for example. It's very much like debootstrap but for RPM based distribution. It aims at supporting all distributions supported by project-builder.org (RHEL, RH, Fedora, OpeSUSE, SLES, Mandriva, ...)

It is inspired by work done by Steve Kemp for rinse (http://www.steve.org.uk/), and similar to mock or febootstrap, but fully integrated with project-builder.org (which also supports rinse and mock). Contrary to these, rpmbootstrap creates an environment where the packages commands are usable after build, as described hereafter.

rpmbootstrap works in 2 phases. The first one is used to download all the required packages to have a working package management system in the chroot working. This list of packages is stored in /etc/pb/pb.conf under the rbsmindep parameter (aka rpmbootstrap minimal dependencies). Once the packages have been downloaded from the mirror, they are extracted with rpm2cpio. At that point you should be able to use yum on Fedora, urpmi on Mandriva/Mageia and zypper on OpenSuSE. The second phase uses exactly the previous mentioned tools to install exactly the same package list to have a coherent RPM db at the end.

rpmbootstrap has additional options to execute a post-install script (-s) or to add packages (-a). Then pb can use the chroot to perform even more actions in it.


rpmbootstrap [-vhmqpdk][-s script][-i image][-a pkg1[,pkg2,...]] distribution-version-arch [target-dir] [mirror [script]]

rpmbootstrap [--verbose][--help][--man][--quiet][--print-rpms][--download-only] [--keep][--script script][--image image][--add pkg1,[pkg2,...]] distribution-version-arch [target-dir] [mirror [script]]



Print a brief help message and exits.


Print a brief help message and exits.


Prints the manual page and exits.


Do not print any output.


Print the packages to be installed, and exit. Note that a target directory must be specified so rpmbootstrap can determine which packages should be installed, and to resolve dependencies. The target directory will be deleted.


Download packages, but don't perform installation.


Keep packages in the cache dir for later reuse. By default remove them.

-s|--script script

Name of the script you want to execute on the related VEs after the installation. It is executed in host environment. You can use the chroot command to execute actions in the VE.

-i|--image image

Name of the ISO image or the docker image of the distribution you want to install on the related VE.

-a|--add pkg1[,pkg2,...]

Additional packages to add from the distribution you want to install on the related VE at the end of the chroot build.


Continue through errors with best effort.



Full name of the distribution that needs to be installed in the VE. E.g. fedora-11-x86_64.


This is the target directory under which the VE will be created. Created on the fly if needed. If none is given use the default directory hosting VE for project-builder.org (Cf: vepath parameter in $HOME/.pbrc)


To setup a Fedora 12 distribution with an i386 architecture issue:

rpmbootstrap fedora-12-i386 /tmp/fedora/12/i386


The main Web site of the project is available at http://www.project-builder.org/. Bug reports should be filled using the trac instance of the project at http://trac.project-builder.org/.


Cf: http://www.mondorescue.org/sympa/info/pb-announce for announces and http://www.mondorescue.org/sympa/info/pb-devel for the development of the pb project.


Uses Project-Builder.org configuration file (/etc/pb/pb.conf or /usr/local/etc/pb/pb.conf)


The Project-Builder.org team http://trac.project-builder.org/ lead by Bruno Cornec mailto:bruno@project-builder.org.


Project-Builder.org is distributed under the GPL v2.0 license described in the file COPYING included with the distribution.

 rpmbootstrap man page