Bug 207600 - install using --installroot and RPM macros
Summary: install using --installroot and RPM macros
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-21 19:44 UTC by David Zeuthen
Modified: 2014-01-21 22:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-25 18:19:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Zeuthen 2006-09-21 19:44:41 UTC
Description of problem:

When doing livecd builds, as descibed here

 https://www.redhat.com/archives/fedora-livecd-list/2006-September/msg00079.html

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
/etc/rpm/

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
--installroot.

If this is solved by setting an environment variable or something please advise. 

This affects OLPC builds too.

Thanks.

Comment 1 Jeremy Katz 2006-09-22 04:45:53 UTC
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
thoughts?

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 14:31:51 UTC
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 14:03:13 UTC
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 18:19:46 UTC
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.