On Thu, 13 Jan 2011, Matthew Dawkins wrote:
The question I have for both Jeff and Per, is flattening initial rpms
packages to get these needed pieces in place before and actual chroot
install begins and super unacceptable hack?
I have no idea what a 'super unacceptable hack' is as a goal
goodness metric
The goal is to build 'complete' chroots here, for later
use either as an install image, or a build environment, right?
1. Make up a MANIFEST of all the packages (ir if binaries,
the holding package in tour distribution of choice) that HAVE
to be in the final chroot
2. Do some minimal prep of the chroot -- on items we know RPM
is doing to look at ./etc/mtab ./etc/fstab ./var/lib/rpm/, a
minimally populated ./etc/passwd setup, --bind mounts, etc
3. Copy the rpms (and such dependencies as are revealed in a
moment) into a staging area inside the chroot
./var/spool/staging/ or such
4. foreach ELEMENT in MANIFEST, walk a
rpm -ivh --root=(chroot) --noscripts (ELEMENT)
and identify anything missing, re-order seqecnce to cut noise
if it offends, and tweak steps 2 and 3 above
5. When happy, re-run it
rpm -Uvh --force --root=(chroot) (ELEMENT)
Build environments less picky than install images as to
bootloader fixup; extra points for adding SElinux pass at the
end of all that
As I recall, yum intentionally does not expose some of those
options; differing DB environments inside and out side the
chroot require a fixup of one want to execure rpm transactions
inside the chroot
Automate steps 1, 2, 3 and 4 to taste. Eventualy, you'll be
satisfied. There is not s single general solution, no 'one
ring to rule them all' because one may or may not stub one's
toes on a given sub-issue.
If that is a 'super unacceptible hack' so be it
-- Russ herrold
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List rpm-devel@rpm5.org