Changes

Jump to: navigation, search

Build Server

166 bytes added, 14:12, 22 August 2014
/* Setup */
=== Setup ===
* Create a staging root directory and extract a stage3 or stage4 tarball
* Mount proc, sys and dev (required for portage to control the tty, determine available storage space, etc.)
* Copy {{Path|/etc/resolv.conf}}
* Checkout the versioned portage tree (since you probably won't have git yet in the tree)
* Enter the chroot
|mount --rbind /sys/ "${stagingRoot}/sys/"
|cp -af /etc/resolv.conf "${stagingRoot}/etc/"
|git clone "${PORTAGE_GIT_REPO}" "${stagingRoot}/usr/portage"
|chroot "${stagingRoot}" /usr/bin/env -i HOME{{=}}"/root" TERM{{=}}"${TERM}" /bin/bash --login
|}}
{{Note|We are deliberately using a special command to enter for entering the chroot to avoid leaking environment variables}}
[[Category:Infrastructure]]