Putting cross compilers into Fedora

Mark Salter msalter at redhat.com
Wed Sep 1 20:11:45 UTC 2010

On Wed, 2010-09-01 at 21:50 +0300, Panu Matilainen wrote:
> On Wed, 1 Sep 2010, Ralf Corsepius wrote:
> >
> > b) To equippe the rpm/yum/mock etc. infrastructure with a mechanism to
> > pull-in "foreign binaries" into a sys-root (E.g. to install Fedora
> > *.ppc.rpm rpms into /usr/ppc-redhat/sys-root). So far, such mechanism
> > doesn't exist.
> You should be able to force rpm to lay down the files, given enough 
> override-switches. Something like
> # rpm -Uvh --root /usr/ppc-redhat/sys-root --ignorearch --noscripts *.rpm
> (or alternatively --relocate with --badrelocate instead of --root, if you 
> want the packages showing in system rpmdb instead of alternate root, and 
> then you'd /really/ need arch-specific buildrequires which in turn is 
> another can of worms etc)
> ...but the resulting pile of files is likely to be fairly useless since 
> no scripts are executed. Having some way of executing scriptlets in an 
> emulator (eg qemu) might be an interesting experiment actually ;)
>  	- Panu -

Speaking of crazy experiments, I came up with the attached rpm patch
last year when I was bootstrapping another arch. In short, to run
scripts without having to write a simulator, it bind mounts native
binary (/bin, /lib, etc) directories into the target sysroot before
running a script and unmounts them afterward. As crazy as that is, it
worked surprisingly well for a core set of F-10 rpms. Of course, it
doesn't work for scripts that try writing to the binary directories,
but it did help me compose a cross rootfs based on a kickstart file.
Something simulator based would definitely have been better.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpm-4.7.1-cross.patch
Type: text/x-patch
Size: 14013 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20100901/7a748078/attachment.bin 

More information about the devel mailing list