Try supermin 5, which has chroot support. How to use it is documented on this page (search for "chroot"). supermin 5 is widely available in Linux distros.
I was seriously involved only in debian packaging, so could someone tell me - how did RH do consistent package building without this tool? I constantly see people making silly mistakes when they package without pbuilder.
Does this utility require you to actually install the base system (with yum and all) to the target, or can you install only the requested packages with their dependencies? This is fairly important distinction when making minimal containers.
No, you don't need to install Yum, it's just defined in default suites. You'll
also need to disable fix_rpmdb.py postinstall script, which is necessary to
make Yum runnable from inside chroot.
On the other hand, almost anything you would want to install will pull glibc,
which is big package. But I suppose you could prepare trimmed down alternative
and put it in additional repository. Seems doable.
16 comments
[ 2.6 ms ] story [ 37.8 ms ] thread* Allows multiple Yum repositories to be specified and used during bootstrapping.
* RPM signatures checking.
* Doesn't depend on repository mirror to list directory contents, so it makes less work with the mirror setup.
* RPM spec already included, so yumbootstrap installs under Red Hat/CentOS.
Nicely done, I'll have to try it.
It is still alive and well, under new maintainers:
http://collab-maint.alioth.debian.org/rinse/
http://rwmj.wordpress.com/2014/03/08/supermin-version-5/#con...
https://fedoraproject.org/wiki/Projects/Mock
Koji, mentioned in the sibling comment, is built on top of it.
On the other hand, almost anything you would want to install will pull glibc, which is big package. But I suppose you could prepare trimmed down alternative and put it in additional repository. Seems doable.
I stopped maintaining it myself, along with xen-tools, a couple of years ago, but both projects have new owners and are active.
https://plus.google.com/+LennartPoetteringTheOneAndOnly/post...
http://rwmj.wordpress.com/2009/03/05/fedora-equivalent-of-de...