Browse Source

provide documentation how to use chroots for building non-Debian stuff

Michael Prokop 10 years ago
1 changed files with 33 additions and 0 deletions
  1. +33

+ 33
- 0 View File

@@ -41,3 +41,36 @@ apt-get install python-stdeb
python --command-packages=stdeb.command bdist_deb
sudo dpkg -i deb_dist/python-*deb

** Use chroot for building non-Debian stuff

Goal: Do not build stuff on Jenkins Master/Slaves but use a dedicated chroot instead.

Background: Whereas jenkins-debian-glue uses cowbuilder/pbuilder and its separate chroots for building you might want to also build
e.g. documentation without abusing your main build host(s). Using dedicated chroots as slave nodes inside Jenkins provides that.

Set up a basic chroot (e.g. Debian/squeeze):

debootstrap squeeze /srv/chroot_documentation_builder
wget -O ./make_chroot_jail
bash ./make_chroot_jail chroot-docs /bin/chroot-shell /srv/chroot_documentation_builder

Test the login via SSH running:

: ssh chroot-docs@localhost

Finally install Java (required for Jenkins) and build-essential (and optionally whatever you might also need):

chroot /srv/chroot_documentation_builder
mount -t proc none /proc
apt-get install openjdk-6-jre
mkdir /var/lib/jenkins
chown chroot-docs /var/lib/jenkins/
apt-get install build-essential

Then configure a new Slave node in Jenkins using /var/lib/jenkins as $HOME directory and user chroot-docs as login.