Red Hat Bugzilla – Bug 207600
install using --installroot and RPM macros
Last modified: 2014-01-21 17:55:24 EST
Description of problem:
When doing livecd builds, as descibed here
I want to have control over the locales / whatever installed. To do this I write
out an RPM macro using %_install_langs. Turns out that I need to put this in
I would expect that yum/rpm would look _only_ in the path
$INSTALL_ROOT/etc/rpm/* where INSTALL_ROOT is the --installroot passed to yum.
Without this the host OS may pollute what yum ends up installing in my
If this is solved by setting an environment variable or something please advise.
This affects OLPC builds too.
The problem is that there are some things which have to be figured out prior to
chroot'ing... this whole area of rpm is a little funky at times. Paul -- any
I haven't looked closely at pilgrim yet (on my todo list, probably a task for
this weekend; which is why I haven't responded to any of the mail on the livecd
list either), but you can programatically set macros and that's probably the
better approach in general.
Yeah in/out chroot is pretty fiddly as the rpmrc sets the macrofiles up. You
can easily use a yum plugin to set the macro for you (we do this in anaconda's
class of yum) - basically you can do rpm.addMacro(key, val).
Adding a method for rpmReadConfigFiles() invoked from site-packages/rpm/__init__.py rather than
compiling into _rpmmodle.so init_rpm() goes a long way towards extracting rpm configuration from
within a chroot rather than from /.
The macro can be set easily and with the livecd creator importing yum now, we
can trivially implement it.