When cross-building a root filesystem, you need to bootstrap something
we call a "sysroot", which is essentially a software development
environment for the target system (headers and libraries mostly). The
way we do that is we create an empty "root" and as we build RPMS
(starting with GLIBC), we install the -devel packages into that target
root (the sysroot). Our cross toolchains know how to access the sysroot,
so when you compile hello.c, it gets the correct headers and libraries.
To be able to install rpms into the sysroot (which lives in the mock
chroot) I've added a chroot command to my local copy of mock (patch
Anyone object to committing this?
RCS file: /cvs/fedora/mock/mock.py,v
retrieving revision 1.36
diff -u -r1.36 mock.py
--- mock.py 24 Feb 2006 19:31:57 -0000 1.36
+++ mock.py 2 Mar 2006 15:48:01 -0000
@@ -781,6 +781,12 @@
print 'Finished initializing root'
+ elif args == 'chroot':
+ config_opts['clean'] = False
+ my= Root(config_opts)
+ my.do_chroot(' '.join(args[1:]), True)
+ print 'Finished chroot command'
if args == 'rebuild':
if len(args) > 1:
Clark Williams <williams(a)redhat.com>
Show replies by date