HTTP/1.1 -1 Read error in cache disk data: SuccessContent-Type: text/plain; charset="utf-8" Last-Modified: Sat, 22 Jan 2022 07:03:27 GMT Content-length: 7356 Connection: Close Proxy-Connection: Close X-Cache: HIT from web1.osuosl.org Server: ProxyTrack 0.5 (HTTrack 3.49.2) This file outlines the steps needed to set up a chroot environment for building Debian/Ubuntu packages for Parrot (so you don't need a full install of the particular distribution to build packages for it, and so you can run Parrot's tests on multiple different distributions easily). The host system used to produce this guide was Ubuntu Edgy, and directions are provided for building chroots for Debian Sid and Ubuntu Intrepid. (Watch out for special characters in the configuration files and command-line examples. Best to view the wiki page in Advanced Edit mode.) == Initial Setup for All == * Install the schroot package. {{{ $ sudo aptitude install schroot }}} * Create a directory for the chroot instances {{{ $ sudo mkdir /var/chroot }}} == Debian Sid == (I tend to use the mirror ftp.osuosl.org instead of ftp.debian.org, pick your favorite.) * Manually download the debootstrap package (or the latest at ) {{{ $ wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.20_all.deb }}} * Manually install it: {{{ $ sudo dpkg --install debootstrap_1.0.11_all.deb }}} * Edit /etc/schroot/schroot.conf and add the following lines: {{{ [sid] description=Debian sid location=/var/chroot/sid priority=3 users= groups=sbuild root-groups=root }}} * Set up a chroot environment using debootstrap: {{{ $ sudo debootstrap sid /var/chroot/sid http://ftp.debian.org/debian/ }}} (to run a 32bit chroot on a 64bit install, add the option "--arch i386") * Copy over some configuration files from the base install to the chroot environment: {{{ $ sudo cp /etc/resolv.conf /var/chroot/sid/etc/resolv.conf }}} * (optional) Add the following lines to /var/chroot/sid/etc/apt/sources.list to expand the list of available packages: {{{ deb http://ftp.debian.org/debian sid contrib }}} * Start up the chroot environment: {{{ $ sudo chroot /var/chroot/sid }}} * Get the latest versions of the package list and some core packages: {{{ # aptitude update # aptitude install dialog # aptitude install locales # for locales # dpkg-reconfigure locales # select your preferred locale # aptitude install build-essential dh-make pbuilder lintian \ wget debconf devscripts sudo patch perl file debootstrap }}} * (optional) Setup text for the command-line prompt, to display when running in chroot: {{{ # echo sid > /etc/debian_chroot }}} * Leave the chroot environment: {{{ # exit }}} * Set up users, groups, gpg, and sudo access in chroot. (Copying the whole files for /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow works between similar distributions. It doesn't work when hosting a Debian chroot on a Ubuntu box, so copy only your username and user group directly.) {{{ $ sudo cp /etc/passwd /var/chroot/sid/etc/ $ sudo sed 's/\([^:]*\):[^:]*:/\1:*:/' /etc/shadow \ | sudo tee /var/chroot/sid/etc/shadow $ sudo cp /etc/group /var/chroot/sid/etc/ $ sudo cp /etc/gshadow /var/chroot/sid/etc/ $ sudo cp /etc/hosts /var/chroot/sid/etc/ $ sudo cp /etc/sudoers /var/chroot/sid/etc/ $ sudo chroot /var/chroot/sid/ # dpkg-reconfigure passwd # passwd # mkdir /home/ # chown /home/ # chgrp /home/ # exit $ cp ~/.bashrc /var/chroot/sid/home//. $ cp -r ~/.gnupg /var/chroot/sid/home//. }}} * Set up the environment for debuild, add the following lines to /var/chroot/sid/home//.devscripts: {{{ DEBUILD_DPKG_BUILDPACKAGE_OPTS="-i -I" DEBUILD_PRESERVE_ENVVARS=DH_ALWAYS_EXCLUDE }}} And in wherever you set environment variables for shell sessions: {{{ export DH_ALWAYS_EXCLUDE='.svn' }}} * Done == Ubuntu Intrepid == * Manually download the debootstrap package for Intrepid (or the latest at ) {{{ $ wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.10ubuntu1~intrepid1_all.deb }}} * Manually install it: {{{ $ sudo dpkg --install debootstrap_1.0.10ubuntu1~intrepid1_all.deb }}} * Edit /etc/schroot/schroot.conf and add the following lines: {{{ [intrepid] description=Ubuntu intrepid location=/var/chroot/intrepid priority=3 users= groups=sbuild root-groups=root }}} * Set up a chroot environment using debootstrap: {{{ $ sudo debootstrap --variant=buildd intrepid /var/chroot/intrepid http://archive.ubuntu.com/ubuntu/ }}} To create a 32bit chroot on a 64bit install, add the option "--arch i386": {{{ $ sudo debootstrap --arch i386 --variant=buildd intrepid /var/chroot/intrepid http://archive.ubuntu.com/ubuntu/ }}} To create an lpia (Ubuntu Mobile) chroot, add the option "--arch lpia", and change the archive URL to 'ports.ubuntu.com': {{{ $ sudo debootstrap --arch lpia --variant=buildd intrepid /var/chroot/intrepid-lpia http://ports.ubuntu.com/ }}} * Copy over some configuration files from the base install to the chroot environment (substituting if your install is a different release): {{{ $ sudo cp /etc/resolv.conf /var/chroot/intrepid/etc/resolv.conf $ sudo cp /etc/apt/sources.list /var/chroot/intrepid/etc/apt/ $ sudo sed -i s//intrepid/g /var/chroot/intrepid/etc/apt/sources.list }}} * Manually mount system directories: {{{ $ sudo mount -t proc proc-chroot /var/chroot/intrepid/proc $ sudo mount -t devpts devpts-chroot /var/chroot/intrepid/dev/pts }}} Or, if you prefer to have them always mounted (I don't), add the following entries to your main /etc/fstab: {{{ proc-chroot /var/chroot/intrepid/proc proc defaults 0 0 devpts-chroot /var/chroot/intrepid/dev/pts devpts defaults 0 0 }}} * Start up the chroot environment: {{{ $ sudo chroot /var/chroot/intrepid }}} * Get the latest versions of the package list and some core packages: {{{ # apt-get update # apt-get install language-pack-en # for locales # apt-get install dialog # apt-get install dh-make automake pbuilder lintian \ wget devscripts sudo dput # apt-get update # apt-get install vim }}} * (optional) Setup text for the command-line prompt, to display when running in chroot: {{{ # echo intrepid > /etc/debian_chroot }}} * Leave the chroot environment: {{{ # exit }}} * (optional) Set up users, groups, and sudo access in chroot: {{{ $ sudo cp /etc/passwd /var/chroot/intrepid/etc/ $ sudo sed 's/\([^:]*\):[^:]*:/\1:*:/' /etc/shadow \ | sudo tee /var/chroot/intrepid/etc/shadow $ sudo cp /etc/group /var/chroot/intrepid/etc/ $ sudo cp /etc/hosts /var/chroot/intrepid/etc/ $ sudo cp /etc/sudoers /var/chroot/intrepid/etc/ $ sudo chroot /var/chroot/intrepid/ # dpkg-reconfigure passwd # passwd # mkdir /home/ # chown /home/ # chgrp /home/ # exit }}} * (optional) Set up the Ubuntu PPA upload configuration in your user's account. Add a file named .dput.cf in your home directory with the following lines: {{{ [parrot-ppa] fqdn = ppa.launchpad.net method = ftp incoming = ~parrot-dev/ubuntu/ login = anonymous allow_unsigned_uploads = 0 }}} * Done urpose resizable array would need these attrs:
  • element_type (int8, int16, int32, int64, int128, float32, float64, float128, string, pmc)
  • allocated_size
  • initialized_size
  • logical_size
  • index_offs