Bootstrapping chroots with Smart

Anders F Björklund afb at algonet.se
Wed Mar 10 03:50:54 PST 2010


It seems that there are a lot of people using Smart
in order to bootstrap basic chroot environments...

I think this is something that could take advantage
of a common tool, and then just supply the "suite"
as a configuration parameter. For RPM it is usually
just a package manifest, for DEB it's an entire script.

There's an old abandoned project called "rpmstrap",
which used to do this with shell and lists of rpms.
This can be rewritten in python and by using smart,
some partially implemented code exists as "smartstrap".

I've converted the basic surrounding code for it now,
it's at http://www.algonet.se/~afb/smart/smartstrap.py


I think it will make a nice addition to the various
package transaction tests to improve the depsolver,
and to the --build command for the source packages
(after first install the "build-dep" in the chroot).

And importing the Smart API (using Python) is more
flexible than trying to invoke it from a bash script,
and more generic than looking at the RPM BuildRequires.
You don't actually need Smart/Python inside the chroot.

--anders


PS. The scripts for dpkg typically looks something like:
http://svn.debian.org/viewsvn/d-i/trunk/packages/debootstrap/scripts/




More information about the Smart mailing list