Bug 207600 - install using --installroot and RPM macros
install using --installroot and RPM macros
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Depends On:
  Show dependency treegraph
Reported: 2006-09-21 15:44 EDT by David Zeuthen
Modified: 2014-01-21 17:55 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-25 14:19:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Zeuthen 2006-09-21 15:44:41 EDT
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.

Comment 1 Jeremy Katz 2006-09-22 00:45:53 EDT
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.
Comment 2 Paul Nasrat 2006-09-22 10:31:51 EDT
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). 
Comment 3 Jeff Johnson 2006-11-13 09:03:13 EST
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 /.
Comment 4 Jeremy Katz 2007-04-25 14:19:46 EDT
The macro can be set easily and with the livecd creator importing yum now, we
can trivially implement it.

Note You need to log in before you can comment on or make changes to this bug.