FAQ:Creating a Packaging chroot
From rPath Wiki
| FAQ | ||
| Question: How can I create a chroot to use for Conary packaging? | ||
Answer: Sometimes packagers find it useful to create a chroot for packaging or for testing out a set of packages without actually installing them on the root system. This can be helpful, for example, when using an x86_64 (64-bit) box and testing an x86 (32-bit) chroot. It is also useful to create a full development environment for a software appliance or distribution different from the that of the main system, especially when testing resolving dependencies against a complete system image.
| This should not be a replacement for rMake. Review rMake's capabilities to see if it this meets your needs before going through the manual steps detailed on this page. |
Steps
Use the following steps to create a chroot to use for Conary packaging when rMake is not applicable:
- Select a group that defines a reasonable base system, and install it with the --root option. One choice may be group-machine-root on conary.rpath.com@rpl:1 which contains a base system with enough packages to build some very basic troves. The command should resemble the following:
conary update group-machine-root=conary.rpath.com@rpl:1 --root /tmp/testroot
- While running as root on the system, change root (chroot) to the newly created root. The command should resemble the following:
/usr/sbin/chroot /tmp/testroot
- Make the necessary device nodes needed to run Conary:
MAKEDEV /dev/urandom
- Mount the necessary special devices. This can be done within the chroot as well:
mount -tproc /proc /proc mount -tdevpts /dev/pts /dev/pts
Troubleshooting
If Conary does not run, ensure you have created /dev/urandom, which is expected by several Conary components.
