Requirements:
  - a vserver capable kernel
  - util-vserver >= 0.26.190 (alpha branch); do not trust in the
    numbers, version 0.27 and 0.28 will be probably not sufficient

    util-vserver can be found found at savannah:
         http://savannah.nongnu.org/projects/util-vserver/
  - the fedora.us-build package-set
  - 200 MB space for the build-master
  - 200 MB space for the build-slave image (LVM partition or loopback)
  - >= 1GB space for the working area (may be lower for tests, and
    much higher for real usage)
  - apt repositories for the used distribution of the master and slave
    vservers
  - a slightly patched 'mach' which calls djinni instead of mount/umount;
    see http://www.tu-chemnitz.de/~ensc/fedora.us-build/mach for the
    patches

Preparations:
  - compile vserver-djinni; this will require util-vserver-devel
  - when using the alpha util-vserver build-method:
    - create local repository with mach, util-vserver and vserver-djinni
      packages
    - add this repository to /etc/vservers/.distributions/<dist>/apt/sources.list
      (<dist> is the distribution used for the master and slave server, e.g. fc1)


Installation:
  - optional: create DNS entries for bmaster and each slave

  The host...
    - install fedora.us-build-host

  The master...
    - create new build-master vserver; e.g. with alpha util-vserver:
      | # vserver bmaster build --netdev eth0 --interface <master-ip>/24 --interface <slave-1-ip>/24 \
                  --netbcast <broadcast> -m apt-rpm --hostname <bmaster-hostname> -- -d fc1
    - install additional tools in the master vserver
      | # vapt-get bmaster -- install fedora.us-build-master
    - create in entries for the pseudo-slaves:
      | # cd /vservers/bmaster
      | # mkdir -p etc/vservers/bslave-1 mnt/slaves
      | # ln -s /mnt/slaves/bslave-1/root etc/vservers/bslave-1/vdir
          (this creates a dead symlink in the moment, but this does not matter)
      repeat this for every slave
    - enable the djinni keep-alive service
      | # vserver bmaster chkconfig djinni-rub on
    - optional (when read-only operation of bmaster): add
      | none    /mnt/slaves     tmpfs   size=4k,mode=0700       0 0
      to /etc/vservers/bmaster/fstab of the host

  The slave...
    - create a chroot-environment for the slave; to make things easier,
      this can be an inactive vserver:
      | # vserver bslave build -m apt-rpm -- -d fc1
    - install djinni-aware 'mach' in the slave + needed tools
      | # vapt-get bslave -- install fedora.us-build-slave
    - configure mach
    - create a copy of current /var (should be not more than 100KiB):
      | # cd /vservers/bslave && tar cf /var/lib/fedora.us-build/var.tar var
    - now, either:
      (1) copy the slave-image to an own LVM partition, or
      (2) copy the slave-image into a loop-back device, or
      (3) export the slave-image read-only via NFS

  The working area...
    - take an area of your disk which has very much space
    - create subdirectories for every slave in it

  The djinni-daemon...
    - install vserver-djinni-server on the host and start it
      | # apt-get install vserver-djinni-server
      | # service djinnid start
    - install djinni configuration and adapt it
      | XXX TODO XXX


Operation:
  - create the network-interfaces for the slaves
    | # /sbin/ip addr add <ip>/<prefix>
  - start djinni-process for the 'bmaster' vserver
    | # djinni new_bmaster bmaster
  - start the 'bmaster' vserver
    | # vserver bmaster start
  - enter the 'bmaster' (ssh, 'vserver ... enter'...)
  - start the build...
    | # start-build <slave-name>

    Currently, it spawns a shell in the slave vserver only; you can
    type there e.g.
    | # mach -r rh9u rebuild foobar...src.rpm





==========================

TODO:
  - tests
