[Fusionforge-commits] FusionForge branch master updated. 9c1d9595f4728e7ec20eb010a907ed85bf93409f

Sylvain Beucler beuc-inria at fusionforge.org
Fri Nov 28 17:58:48 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  9c1d9595f4728e7ec20eb010a907ed85bf93409f (commit)
       via  69be680409d4d6b1cd0fc4caeaab0eb638d8dc70 (commit)
       via  ab68e308da8b23dbf63f0477e66e4aa43e9145dd (commit)
       via  64ca2aefa13f7b84e374770c4c01622854daad01 (commit)
       via  17145ce85d427e94c047ba8391feb01cc3d4b3fd (commit)
       via  ac306673955a81988bb3de7fb8ae1351d5666fba (commit)
      from  ac3bf89c2b3a3eaaabcd0955cdc7a67ed689b7f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9c1d9595f4728e7ec20eb010a907ed85bf93409f
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Fri Nov 28 17:57:24 2014 +0100

    testsuite: update documentation

diff --git a/tests/buildbot/README b/tests/buildbot/README
new file mode 100644
index 0000000..f84b61c
--- /dev/null
+++ b/tests/buildbot/README
@@ -0,0 +1 @@
+Cf. https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Tools/BuildBot
diff --git a/tests/buildbot/lxc/README b/tests/buildbot/lxc/README
deleted file mode 100644
index 304ced8..0000000
--- a/tests/buildbot/lxc/README
+++ /dev/null
@@ -1,226 +0,0 @@
-See https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/LXC#Network_Bridging_Setup
-
-== Introduction ==
-
-The goal of this small document is to explain how to install LXC and how to create templates on top of Debian Squeeze. One show how to create typical templates that supports static IP or DHCP as debian 6 or centos 5 linux container.
-
-== Install Debian ==
-
-Choose your install mode from: [http://www.debian.org/CD/ Debian Web Site] and install debian Squeeze version or a more recent one.
-
-== Install LXC ==
- apt-get install lxc bridge-utils resolvconf cgroup-bin netmask rinse dpkg-dev sudo
-
-optionnally you may like to 
- apt-get install subversion bzr git 
-
-if you use this for continuous integration 
-
-=== Debian  ===
-You may need to create cgroup directory:
- mkdir /cgroup
-
-Modify /etc/fstab and add the following:
- none  /cgroup  cgroup  defaults  0  0
-
-but it looks like on squeeze the cgroup mount is handled by some start scripts 
-that mount cgroup on /mnt/cgroup (see  /etc/cgconfig.conf)
-
-=== Ubuntu 11.04 / Natty ===
-
-On Natty you don't need to mount cgroup virtual filesystem manually, it's already done by default. However, lxc package has some [https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/784093 configuration bug]. You can either:
-* Install oneiric package (not tested) or
-* Modify  /etc/cgconfig.conf to (see [https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/784093/comments/1 comment]):
- mount {
-   cpu = /sys/fs//cgroup/cpu;
-   cpuacct = /sys/fs/cgroup/cpu;
-   devices = /sys/fs/cgroup/cpu;
-   memory = /sys/fs/cgroup/cpu;
- }
-
-== Network Bridging Setup ==
-Edit /etc/network/interfaces
-
-In the following, we distinguish the two cases : your server/desktop runs Static IP or DHCP.
-
-=== If you use static IP ===
-You may use the following template example, replacing values with your network parameters:
- auto lo 
- iface lo inet loopback
- auto br0
- iface br0 inet static
-        bridge_ports eth0
-        bridge_fd 0
-        address 10.194.10.35
-        netmask 255.255.255.0
-        gateway 10.194.10.1
-        dns-nameservers 10.194.11.20 10.194.11.21
-        dns-search fusionforge.org
-
-=== If you use DHCP ===
- auto lo 
- iface lo inet loopback
- auto br0
- iface br0 inet dhcp
-        bridge_ports eth0
-        bridge_fd 0
-
-You may now reboot your server/desktop and see if everything is ok
-you may run mount :
- root at g-virtual05:~# mount
- /dev/sda1 on / type ext3 (rw,errors=remount-ro)
- tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) 
- proc on /proc type proc (rw,noexec,nosuid,nodev)
- sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
- udev on /dev type tmpfs (rw,mode=0755)
- tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
- devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
- cgroup on /cgroup type cgroup (rw)
- fusectl on /sys/fs/fuse/connections type fusectl (rw)
- binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
-
-you must have a cgroup line in the list.
-
-== Bridge with a local network ==
-This one is nice if you don't want to modify your main interface and have a local isolated network
-Here is a working sample
-
- # This file describes the network interfaces available on your system
- # and how to activate them. For more information, see interfaces(5).
- #
- # The loopback network interface
- auto lo
- iface lo inet loopback
- 
- # The primary network interface 
- allow-hotplug eth0
- iface eth0 inet static
- 	address 10.0.2.25
- 	netmask 255.255.0.0
- 	network 10.0.0.0
- 	broadcast 10.0.255.255
- 	gateway 10.0.2.1
- 	# dns-* options are implemented by the resolvconf package, if installed
- 	dns-nameservers 88.191.254.60 88.191.254.70
- 	dns-search local
- 
- # The following is a bit complex but allow not to touch eth0
- # this requires uml-utilities 
- # usermod -G uml-net jenkins
- auto tap0
- iface tap0 inet manual
-        tunctl_user jenkins
-        pre-up tunctl -u jenkins -t tap0
-        up ifconfig tap0 up
-        down ifconfig tap0 down
-        post-down tunctl -d tap0
- 
- auto br0
- iface br0 inet static
-        bridge_ports tap0
-        bridge_stp off
-        bridge_maxwait 5
-        address 172.16.0.1
-        netmask 255.255.0.0
-        network 172.16.0.0
-        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
-        post-up iptables -t nat -A POSTROUTING -s '172.16.0.1/16' -o eth0 -j MASQUERADE
-        post-up service isc-dhcp-server restart
-        post-down iptables -t nat -D POSTROUTING -s '172.16.0.1/16' -o eth0 -j MASQUERADE
-
-Then you may install a dhcp server, with the file /etc/default/isc-dhcp-server set like this :
- # Defaults for dhcp initscript
- # sourced by /etc/init.d/dhcp
- # installed at /etc/default/isc-dhcp-server by the maintainer scripts
- 
- #
- # This is a POSIX shell fragment
- #
- 
- # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
- #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
- INTERFACES="br0"
-
-And in the default  /etc/dhcp/dhcpd.conf file I added at the end:
-
- subnet 172.16.0.0 netmask 255.255.0.0 {
-        range 172.16.0.10 172.16.0.50;
-        option routers 172.16.0.1;
-        option domain-name "local";
-        option domain-name-servers 88.191.254.60, 88.191.254.70;
- }
-
-For the name resolution I install avahi in the lxc virtual machines and in lxc host server. then vhosts are available with their <servername>.local name.
-
-== Create your first Debian container ==
-=== Create a config file ===
-Edit config.debian6  with the following content
- lxc.network.type = veth
- lxc.network.flags = up
- lxc.network.link = br0
-
-=== Templates ===
-Debian squeeze provides a set of predefined templates you can find in /usr/lib/lxc/templates/ directory, the syntax 
-is lxc-<Template Name>, as the time I write busybox, debian, fedora, sshd, ubuntu.
-You can find extra templates to copy in this dir in fusionforge svn repository, get them using
- apt-get install subversion
- svn checkout svn://scm.fusionforge.org/svn/fusionforge/trunk/tests/lxc
-
-=== Create the container ===
-As root user or using sudo
- sudo apt-get install debootstrap
- sudo /usr/bin/lxc-create -n debian6.local -f config.debian6 -t debian6
-
-where : 
-* debian6.local is the hostname
-* config.debian6 is the config file
-* debian6  (after -t) is the template name
-
-lxc-create calls /usr/lib/lxc/templates/lxc-debian6 script (lxc-template_name).
-this script copie the files cached in /var/cache/lxc/debian/rootfs-squeeze-amd64/ (rootfs-distro-arch)
-to /var/lib/lxc/debian6.local 
-
-If the cache does not exist it will be created using deboostrap
-
-when you update the script, run
- rm -rf /var/cache/lxc/debian/rootfs-squeeze-amd64
-if you want your changes to be taken in account
-
-tip for curious people
- diff  /usr/lib/lxc/templates/lxc-debian  /usr/lib/lxc/templates/lxc-debian6
-
-=== Extra Config ===
-Some extra config is embedded in the lxc-* scripts,
-such as dhcp, hostname, caching host keys, caching mac address.
-Config file can be completed like this.
-
- lxc.network.type = veth
- lxc.network.flags = up
- lxc.network.link = br0
- #lxc.pubkey = /var/lib/jenkins/.ssh/id_rsa.pub
- lxc.network.ipv4 =  192.168.50.1/24
- lxc.network.hwaddr = 00:16:3e:37:54:4d
- 
-lxc.pubkey must be commented, since it's not an lxc known parameter, it's taken in account by my modified scripts.
-
-=== Start the container ===
- sudo /usr/bin/lxc-start -n debian6.local -d
-
-=== Enter the container ===
- lxc-console -n debian6.local
-
-you can exit typing <ctrl-a> q
-
-=== Stop the container ===
- lxc-stop -n debian6.local
-
-=== Destroy the container ===
- lxc-destroy -n debian6.local
-
-== Create your first centos container ==
-It works like the debian container, just replace debian, with centos
-
-You will need for recent version of Centos: to install:
-* rinse >= 1.8 (not available on debian stable at time of writting, you can download 1.9 from unstable on http://www.debian.org/distrib/packages with wget & install with dpkg -i)
-* netmask dpkg-dev (req. for dpkg-architecture)
-

commit 69be680409d4d6b1cd0fc4caeaab0eb638d8dc70
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Fri Nov 28 17:53:16 2014 +0100

    testsuite: remove duplicate lxc scripts

diff --git a/tests/buildbot/lxc/destroy b/tests/buildbot/lxc/destroy
deleted file mode 100755
index b5d2435..0000000
--- a/tests/buildbot/lxc/destroy
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/sh
-echo "==== DESTROY $HOST ===="
-echo "VMENGINE=$VMENGINE VMTEMPLATE=$VMTEMPLATE CIDR=$CIDR IPGW=$IPGW"
-
-lxcdir=`dirname $0`
-export TEMPLATE=$VMTEMPLATE
-
-sudo /usr/bin/lxc-stop -n $HOST
-sudo /usr/bin/lxc-destroy -n $HOST || true
diff --git a/tests/buildbot/lxc/start b/tests/buildbot/lxc/start
deleted file mode 100755
index 07f3582..0000000
--- a/tests/buildbot/lxc/start
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-
-echo "==== START $HOST ===="
-echo "VMENGINE=$VMENGINE VMTEMPLATE=$VMTEMPLATE CIDR=$CIDR IPGW=$IPGW"
-
-sudo /usr/local/sbin/lxc-wrapper start $(basename $HOST .local)
diff --git a/tests/buildbot/lxc/stop b/tests/buildbot/lxc/stop
deleted file mode 100755
index d82240d..0000000
--- a/tests/buildbot/lxc/stop
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-echo "==== STOP $HOST ===="
-echo "VMENGINE=$VMENGINE VMTEMPLATE=$VMTEMPLATE CIDR=$CIDR IPGW=$IPGW"
-
-sudo /usr/local/sbin/lxc-wrapper stop $(basename $HOST .local)

commit ab68e308da8b23dbf63f0477e66e4aa43e9145dd
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Fri Nov 28 17:45:26 2014 +0100

    testsuite: ./start and ./stop are LXC-only so let's ditch openvz while we're at it

diff --git a/tests/buildbot/openvz/Makefile b/tests/buildbot/openvz/Makefile
deleted file mode 100644
index 021d38f..0000000
--- a/tests/buildbot/openvz/Makefile
+++ /dev/null
@@ -1,196 +0,0 @@
-
-DEBMIRROR=http://ftp.fr.debian.org/debian
-RINSECONF=/etc/rinse/rinse.conf
-RINSEBPI=
-RINSEPOSTINST=--after-post-install $(CURDIR)/local.rinse.api
-VEIDDEBTEMP=242
-VEIDCOSTEMP=243
-ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-EXTRADEBPACKAGE=--include=ssh,less,htop,zsh,vim,debconf-utils
-EXTRACOSPACKAGE=openssh-server,man,zsh,bind-utils,openssh-clients,php,wget
-VZCTL=/usr/sbin/vzctl
-DEBOOTSTRAP=/usr/sbin/debootstrap
-RINSE=extrapackage="$(EXTRACOSPACKAGE)" /usr/sbin/rinse
-
-# Default config
-include ../config/default
-
-# Optional local change
--include ../config/$(shell hostname)
-
-# Local customization can be done using a local.<hostname> file
-# This is convenient if you use local mirror
--include local.$(shell hostname)
-
-default: 
-	@echo "Run make <target>"
-	@echo "Available targets are:"
-	@echo " make net : this will setup a /etc/vz/vznet.conf to register new virtual host to vmbr0 bridge"
-	@echo "  See interfaces.sample to know how to setup a bridge"
-	@echo " make builddebiantemplate : build an openvz debian template (uses VEIDDEBTEMP=$(VEIDDEBTEMP))"
-	@echo " make buildcentostemplate : build an openvz centos template (uses VEIDCOSTEMP=$(VEIDCOSTEMP))"
-	@echo ""
-	@echo " make createdeb   : build a debian openvz vm with ID=$(VEIDDEB) from the debian template"
-	@echo " make netdhcpdeb  : set dhcp network for debian openvz vm with ID=$(VEIDDEB)"
-	@echo " make netstaticdeb: set static network for debian openvz vm with ID=$(VEIDDEB)"
-	@echo ""
-	@echo " make createcentos   : build a centos openvz vm with ID=$(VEIDCOS) from the centos template"
-	@echo " make netdhcpcentos  : set dhcp network for centos openvz vm with ID=$(VEIDCOS)"
-	@echo " make netstaticcentos: set static network for centos openvz vm with ID=$(VEIDCOS)"
-	@echo ""
-	@echo "Read Makefile for other targets"
-
-builddebiantemplate: beroot builddebianvm
-	$(VZCTL) set $(VEIDDEBTEMP) --ostemplate debian-$(DEBVERS) --applyconfig basic --save
-	# remove host keys
-	#rm $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/ssh/ssh_host_*
-	# Disable getty in /etc/inittab as openvz do not have that.
-	[ ! -f $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/inittab ] || (grep -q getty $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/inittab || \
-		sed -i -e '/getty/d' $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/inittab)
-	# Link /etc/mtab to /proc/mtab to make mount work as expected.
-	rm -f $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/mtab
-	ln -s /proc/mounts $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/mtab
-	# LocalTime
-	#ln -sf /usr/share/zoneinfo/Europe/Paris $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/localtime
-	# Remove hostname
-	[ ! -f $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/hostname ] || rm $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/hostname
-	## NOW uses vzctl set $(VEIDDEBTEMP) --hostname command
-	##grep -q debian6.local $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/hosts || \
-	##	sed -i -e 's/localhost/debian6.local localhost/' $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/hosts
-	##echo "debian6.local" > $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/hostname
-	#
-	[ -c $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/dev/ptmx ] || chroot $(VZPRIVATEDIR)/$(VEIDDEBTEMP) /bin/mknod /dev/ptmx c 5 2
-	[ -d $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/root/.ssh ] || mkdir -p $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/root/.ssh
-	cp $(SSHPUBKEY) $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/root/.ssh/authorized_keys
-	cp ssh/ssh_host_* $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/etc/ssh/
-	cd $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/ ; tar --numeric-owner -zcf $(VZTEMPLATEDIR)/cache/debian-$(DEBVERS)-$(ARCH)-minimal.tar.gz .
-
-buildcentostemplate: beroot buildcentosvm
-	$(VZCTL) set $(VEIDCOSTEMP) --ostemplate centos-$(COSVERS) --applyconfig basic --save
-	#rm $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/ssh/ssh_host_*
-	# Disable getty in /etc/inittab as openvz do not have that.
-	[ ! -f $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/inittab ] || (grep -q getty $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/inittab || \
-		sed -i -e '/getty/d' $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/inittab)
-	# Don't start_udev
-	sed -i -e '/start_udev/d' $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/rc.d/rc.sysinit
-	# Link /etc/mtab to /proc/mtab to make mount work as expected.
-	rm -f $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/mtab
-	ln -s /proc/mounts $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/mtab
-	# LocalTime
-	#ln -sf /usr/share/zoneinfo/Europe/Paris $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/localtime
-	# Remove hostname
-	[ ! -f $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/hostname ] || rm $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/hostname
-	## NOW uses vzctl set $(VEIDCOSTEMP) --hostname command
-	##echo "127.0.0.1 centos5.local localhost.localdomain localhost" > $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/hosts
-	##echo "centos5.local" > $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/hostname
-	##echo "HOSTNAME=centos5.local" >> $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/sysconfig/network
-	#
-	[ -c $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/ptmx ]     || chroot $(VZPRIVATEDIR)/$(VEIDCOSTEMP) /bin/mknod /dev/ptmx c 5 2
-	[ -d $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/pts ]      || chroot $(VZPRIVATEDIR)/$(VEIDCOSTEMP) /bin/mkdir /dev/pts
-	[ -c $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/vz/private/50/dev/ttyp ] || chroot $(VZPRIVATEDIR)/$(VEIDCOSTEMP) /sbin/MAKEDEV -d /vz/private/50/dev ttyp ptyp
-	-rm -f $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/null
-	[ -c $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/null ]     || chroot $(VZPRIVATEDIR)/$(VEIDCOSTEMP) /bin/mknod /dev/null c 1 3
-	chmod ugo+w $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/null
-	[ -c $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/random ]   || chroot $(VZPRIVATEDIR)/$(VEIDCOSTEMP) /bin/mknod -m 644 /dev/random c 1 8
-	-rm -f $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/urandom 
-	[ -c $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/urandom ]  || chroot $(VZPRIVATEDIR)/$(VEIDCOSTEMP) /bin/mknod /dev/urandom c 1 9 
-	chmod ugo+w $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/dev/urandom
-	[ -d $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/var/lock/rpm ] || chroot $(VZPRIVATEDIR)/$(VEIDCOSTEMP) /bin/mkdir /var/lock/rpm	
-	touch $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/fstab
-	grep -q devpts $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/fstab || \
-		echo "none /dev/pts devpts mode=0620 0 0" >> $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/fstab
-	[ -d $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/root/.ssh ] || mkdir $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/root/.ssh
-	cp $(SSHPUBKEY) $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/root/.ssh/authorized_keys
-	cp ssh/ssh_host_* $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/etc/ssh/
-	cd $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/ ; tar --numeric-owner -zcf $(VZTEMPLATEDIR)/cache/centos-$(COSVERS)-$(ARCH)-minimal.tar.gz .
-
-builddebianvm: beroot $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/tmp/vzdebvm
-
-$(VZPRIVATEDIR)/$(VEIDDEBTEMP)/tmp/vzdebvm:
-	[ -d $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/tmp/vzdebvm ] || ($(DEBOOTSTRAP) --arch $(ARCH) $(EXTRADEBPACKAGE) $(DIST) $(VZPRIVATEDIR)/$(VEIDDEBTEMP) $(DEBMIRROR) && touch $(VZPRIVATEDIR)/$(VEIDDEBTEMP)/tmp/vzdebvm)
-
-buildcentosvm: beroot $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/tmp/vzcentvm
-
-$(VZPRIVATEDIR)/$(VEIDCOSTEMP)/tmp/vzcentvm:
-	[ -d $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/tmp/vzcentvm ] || ($(RINSE) $(RINSEBPI) $(RINSEPOSTINST) --config $(RINSECONF) --arch $(ARCH) --distribution centos-5 --directory $(VZPRIVATEDIR)/$(VEIDCOSTEMP) && touch $(VZPRIVATEDIR)/$(VEIDCOSTEMP)/tmp/vzcentvm)
-
-cleanvz:
-	[ ! -d $(VZPRIVATEDIR)/$(VEID) ] || $(VZCTL) stop $(VEID)
-	[ ! -d $(VZPRIVATEDIR)/$(VEID) ] || $(VZCTL) destroy $(VEID)
-	-rm -f /etc/vz/conf/$(VEID).conf.destroyed
-
-cleancentos: beroot
-	make cleanvz VEID=$(VEIDCOS)
-	
-cleandeb: beroot
-	make cleanvz VEID=$(VEIDDEB)
-
-netdhcpdeb: beroot
-	# Add eth0 interface
-	$(VZCTL) set $(VEIDDEB) --netif_add eth0 --save
-	# Setup dhcp
-	grep -q "auto lo" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces || \
-		echo "auto lo" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces
-	grep -q "iface lo inet loopback" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces || \
-		echo "iface lo inet loopback" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces
-	grep -q "auto eth0" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces || \
-		echo "auto eth0" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces
-	grep -q "iface eth0 inet dhcp" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces || \
-		echo "iface eth0 inet dhcp" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/network/interfaces
-	# Setup dhclient extra
-	grep -q "^send host-name" $(VZPRIVATEDIR)/$(VEIDDEB)/etc/dhcp/dhclient.conf || \
-		echo "send host-name \"`hostname`-$(VEIDDEB)\";" >> $(VZPRIVATEDIR)/$(VEIDDEB)/etc/dhcp/dhclient.conf
-
-netstaticdeb: beroot
-	$(VZCTL) set $(VEIDDEB) --hostname `hostname`-$(VEIDDEB) --save
-	$(VZCTL) set $(VEIDDEB) --ipadd $(IPDEBBASE).$(VEIDDEB) --save
-	$(VZCTL) set $(VEIDDEB) --nameserver $(IPDEBDNS) --save
-
-netdhcpcentos: beroot
-	# Add eth0 interface
-	$(VZCTL) set $(VEIDCOS) --netif_add eth0 --save
-	# Setup dhcp
-	echo "DEVICE=eth0" > $(VZPRIVATEDIR)/$(VEIDCOS)/etc/sysconfig/network-scripts/ifcfg-eth0
-	echo "BOOTPROTO=dhcp" >> $(VZPRIVATEDIR)/$(VEIDCOS)/etc/sysconfig/network-scripts/ifcfg-eth0
-	echo "ONBOOT=yes" >> $(VZPRIVATEDIR)/$(VEIDCOS)/etc/sysconfig/network-scripts/ifcfg-eth0
-	# Setup dhclient extra
-	[ -f $(VZPRIVATEDIR)/$(VEIDCOS)/etc/dhclient.conf ] || \
-		echo "send host-name \"`hostname`-$(VEIDCOS)\";" > $(VZPRIVATEDIR)/$(VEIDCOS)/etc/dhclient.conf
-	
-netstaticcentos: beroot
-	$(VZCTL) set $(VEIDCOS) --hostname `hostname`-$(VEIDCOS)  --save
-	$(VZCTL) set $(VEIDCOS) --ipadd $(IPCOSBASE).$(VEIDCOS) --save
-	$(VZCTL) set $(VEIDCOS) --nameserver $(IPCOSDNS) --save
-
-netctl:
-	sysctl -w net.ipv4.ip_forward=1
-	sysctl -w net.ipv4.conf.default.forwarding=1
-	sysctl -w net.ipv4.conf.default.proxy_arp=0
-	sysctl -w net.ipv4.conf.all.rp_filter=1
-	sysctl -w kernel.sysrq=1
-
-net: /etc/vz/vznet.conf
-
-/etc/vz/vznet.conf:
-	echo '#!/bin/bash' > /etc/vz/vznet.conf
-	echo 'EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"' >> /etc/vz/vznet.conf
-
-addbridge:
-	# Prefered method is to change /etc/network/interfaces
-	#sudo brctl addbr vmbr0
-	#sudo ifconfig vmbr0 0
-	#sudo brctl addif vmbr0 eth0
-
-createdeb: beroot cleandeb
-	$(VZCTL) create $(VEIDDEB) --private $(VZPRIVATEDIR)/$(VEIDDEB) --ostemplate debian-$(DEBVERS)-$(ARCH)-minimal
-	make netstaticdeb
-	
-createcentos: beroot cleancentos
-	$(VZCTL) create $(VEIDCOS) --private $(VZPRIVATEDIR)/$(VEIDCOS) --ostemplate centos-$(COSVERS)-$(ARCH)-minimal
-	make netstaticcentos
-	
-beroot:
-	@[ $(shell id -u) = "0" ] || (echo "you should be root to run this" ; exit 1)
-
-start:
-	sudo $(VZCTL) start $(VEID)
diff --git a/tests/buildbot/openvz/README b/tests/buildbot/openvz/README
deleted file mode 100644
index cde72dc..0000000
--- a/tests/buildbot/openvz/README
+++ /dev/null
@@ -1,75 +0,0 @@
-This is a file to explain how to setup your own openvz virtual hosts
-
-At the moment the setup is tested using static internet addresses,
-this should not be too difficult to make it work with dhcp network config
-but I experienced some instable behaviour trying to do like this.
-
-For static (simpler):
-============
-you have to setup your network configuration, for this there is a config.default file
-you can overload by
- cp config.default config.<your hostname>
-
-For dhcp:
-=========
-So, first you need to have a working dhcp server, which I'll suppose you already have.
-second you need to setup a bridge, for this you should edit /etc/network/interfaces file
-see the exemple in interfaces.sample
-The exemple is using static ip, but you can also make this work if you server is using dclient
-to get addresses.
-
-This would look like:
----------------------------------
-# This file describes the network interfaces available on your system
-# and how to activate them. For more information, see interfaces(5).
-
-# The loopback network interface
-auto lo
-iface lo inet loopback
-
-# The primary network interface
-#allow-hotplug eth0
-#iface eth0 inet dhcp
-auto vmbr0
-iface vmbr0 inet dhcp
-	bridge_ports eth0
-	bridge_fd 9
-	bridge_hello 2
-	bridge_maxage 12
-	bridge_stp off
----------------------------------
-
-=========== COMMON SETUP ====================
-Your server must be openvz capable, you can do so with
-
-> apt-get install vzctl
-
-and an openvz kernel you can get for exemple on an amd64 server with
-
-> apt-get install linux-image-2.6-openvz-amd64
-
-A list of available kernel can be found with
-
-> apt-cache search linux-image openvz
-
-Then you have to reboot and you should be ready to build you Virtual servers
-
-> make net (only usefull for dhcp) 
-will setup a /etc/vz/vznet.conf to register new virtual host to vmbr0 bridge (for dhcp setup)
-
-then you can build template
- make builddebiantemplate : build an openvz debian template
- make buildcentostemplate : build an openvz centos template
-
-and create vm
- make createdeb : build a debian openvz vm with ID=105 from the debian template
- make createcentos : build a centos openvz vm with ID=110 from the centos template
-
-choose kind of network
- make netdhcpdeb
- make netstaticdeb
- make netdhcpcentos
- make netstaticcentos
-
-You may also need to make some special config because you are behind a firewall
-for this I provide some exemple of local.`hostname` files
diff --git a/tests/buildbot/openvz/destroy b/tests/buildbot/openvz/destroy
deleted file mode 100755
index c2d82e1..0000000
--- a/tests/buildbot/openvz/destroy
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-echo "==== DESTROY $HOST ===="
-echo "VMENGINE=$VMENGINE VMTEMPLATE=$VMTEMPLATE CIDR=$CIDR IPGW=$IPGW"
diff --git a/tests/buildbot/openvz/interfaces.sample b/tests/buildbot/openvz/interfaces.sample
deleted file mode 100644
index 5f6d355..0000000
--- a/tests/buildbot/openvz/interfaces.sample
+++ /dev/null
@@ -1,22 +0,0 @@
-# This file describes the network interfaces available on your system
-# and how to activate them. For more information, see interfaces(5).
-
-# The loopback network interface
-auto lo
-iface lo inet loopback
-
-# The primary network interface
-#allow-hotplug eth0
-#iface eth0 inet dhcp
-auto vmbr0
-iface vmbr0 inet static
-	address 10.194.10.35
-	netmask 255.255.255.0
-	gateway 10.194.10.1
-	dns-nameservers 10.194.11.20 10.194.11.21
-	dns-search rd.francetelecom.fr
-	bridge_ports eth0
-	bridge_fd 9
-	bridge_hello 2
-	bridge_maxage 12
-	bridge_stp off
diff --git a/tests/buildbot/openvz/local.christian b/tests/buildbot/openvz/local.christian
deleted file mode 100644
index 9eb863c..0000000
--- a/tests/buildbot/openvz/local.christian
+++ /dev/null
@@ -1,3 +0,0 @@
-DEBMIRROR=http://christian.bayle.eu/debian
-RINSECONF=local.christian.rinse.conf
-RINSEBPI=--before-post-install $(CURDIR)/local.christian.rinse.bpi
diff --git a/tests/buildbot/openvz/local.christian.rinse.bpi b/tests/buildbot/openvz/local.christian.rinse.bpi
deleted file mode 100755
index 8908aec..0000000
--- a/tests/buildbot/openvz/local.christian.rinse.bpi
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh
-# This file change the default mirror in centos
-# It comments mirrorlist in etc/yum.repos.d/CentOS-Base.repo
-# It adds baseurl=http://$server so $server is used as a mirror
-echo "========================================="
-echo $1
-case $dist in
-	centos-5)
-		echo $mirror
-		server=`echo $mirror | cut -d/ -f3`
-		echo "Disable mirrorlists"
-		sed -i -e "s/^mirrorlist=/#mirrorlist=/" $1/etc/yum.repos.d/CentOS-Base.repo
-		echo "Setup baseurl on server $server"
-		sed -i -e "s!#baseurl=http://mirror.centos.org!baseurl=http://$server!" $1/etc/yum.repos.d/CentOS-Base.repo
-		rm -f $1/etc/mtab
-		ln -s /proc/mounts $1/etc/mtab
-	;;
-esac
-echo "========================================="
diff --git a/tests/buildbot/openvz/local.christian.rinse.conf b/tests/buildbot/openvz/local.christian.rinse.conf
deleted file mode 100644
index 1341da9..0000000
--- a/tests/buildbot/openvz/local.christian.rinse.conf
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-#  /etc/rinse/rinse.conf
-#
-#  Contains the list of servers to download our initial collection of
-# packages from.
-#
-# Steve
-# --
-#
-
-
-
-[centos-4]
-mirror       = http://mirror.bytemark.co.uk/centos/4/os/i386/CentOS/RPMS/
-mirror.amd64 = http://mirror.bytemark.co.uk/centos/4/os/x86_64/CentOS/RPMS/
-
-
-[centos-5]
-mirror = http://christian.bayle.eu/centos/5.4/os/i386/CentOS/
-mirror.amd64 = http://christian.bayle.eu/centos/5.4/os/x86_64/CentOS/
-#mirror       = http://mirror.bytemark.co.uk/centos/5/os/i386/CentOS/
-#mirror.amd64 = http://mirror.bytemark.co.uk/centos/5/os/x86_64/CentOS/
-
-
-[fedora-core-4]
-mirror       = http://ftp.heanet.ie/pub/fedora/linux/core/4/i386/os/Fedora/RPMS/
-mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/4/x86_64/os/Fedora/RPMS/
-
-
-[fedora-core-5]
-mirror       = http://ftp.heanet.ie/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/
-mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/5/x86_64/os/Fedora/RPMS/
-
-
-[fedora-core-6]
-mirror       = http://ftp.heanet.ie/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/
-mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/
-
-
-[fedora-core-7]
-mirror       = http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/i386/os/Fedora/
-mirror.amd64 = http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/
-
-
-[fedora-core-8]
-mirror       = http://mirror.bytemark.co.uk/fedora/linux/releases/8/Fedora/i386/os/Packages/
-mirror.amd64 = http://mirror.bytemark.co.uk/fedora/linux/releases/8/Fedora/x86_64/os/Packages/
-
-
-
-[fedora-core-9]
-mirror       = http://mirror.bytemark.co.uk/fedora/linux/releases/9/Fedora/i386/os/Packages/
-mirror.amd64 = http://mirror.bytemark.co.uk/fedora/linux/releases/9/Fedora/x86_64/os/Packages/
-
-
-[fedora-core-10]
-mirror       = http://mirrors.vexs.net/pub/fedora/linux/releases/10/Fedora/i386/os/Packages/
-mirror.amd64 = http://mirrors.vexs.net/pub/fedora/linux/releases/10/Fedora/x86_64/os/Packages/
-
-
-[opensuse-10.1]
-mirror       = http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/SL-10.1/inst-source/suse/i686/
-mirror.amd64 = http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/SL-10.1/inst-source/suse/x86_64/
-
-
-[opensuse-10.2]
-mirror       = http://download.opensuse.org/distribution/10.2/repo/oss/suse/i686/
-mirror.amd64 = http://download.opensuse.org/distribution/10.2/repo/oss/suse/x86_64/
-
-
-[opensuse-10.3]
-mirror       = http://download.opensuse.org/distribution/10.3/repo/oss/suse/i686/
-mirror.amd64 = http://download.opensuse.org/distribution/10.3/repo/oss/suse/x86_64/
-
-
-[opensuse-11.0]
-mirror       = http://download.opensuse.org/distribution/11.0/repo/oss/suse/i686/
-mirror.amd64 = http://download.opensuse.org/distribution/11.0/repo/oss/suse/x86_64/
-
-
-[opensuse-11.1]
-mirror       = http://download.opensuse.org/distribution/11.1/repo/oss/suse/i686/
-mirror.amd64 = http://download.opensuse.org/distribution/11.1/repo/oss/suse/x86_64/
-
diff --git a/tests/buildbot/openvz/local.g-dellm65-1 b/tests/buildbot/openvz/local.g-dellm65-1
deleted file mode 100644
index 91b137a..0000000
--- a/tests/buildbot/openvz/local.g-dellm65-1
+++ /dev/null
@@ -1,3 +0,0 @@
-DEBMIRROR=http://10.194.10.128/debian
-RINSECONF=local.g-virtual05.rinse.conf
-RINSEBPI=--before-post-install $(CURDIR)/local.g-virtual05.rinse.bpi
diff --git a/tests/buildbot/openvz/local.g-t3500-cb b/tests/buildbot/openvz/local.g-t3500-cb
deleted file mode 100644
index 621e995..0000000
--- a/tests/buildbot/openvz/local.g-t3500-cb
+++ /dev/null
@@ -1,3 +0,0 @@
-DEBMIRROR=http://g-rub.rd.francetelecom.fr:3142/debian
-RINSECONF=local.g-virtual05.rinse.conf
-RINSEBPI=--before-post-install $(CURDIR)/local.g-virtual05.rinse.bpi
diff --git a/tests/buildbot/openvz/local.g-virtual05 b/tests/buildbot/openvz/local.g-virtual05
deleted file mode 100644
index 621e995..0000000
--- a/tests/buildbot/openvz/local.g-virtual05
+++ /dev/null
@@ -1,3 +0,0 @@
-DEBMIRROR=http://g-rub.rd.francetelecom.fr:3142/debian
-RINSECONF=local.g-virtual05.rinse.conf
-RINSEBPI=--before-post-install $(CURDIR)/local.g-virtual05.rinse.bpi
diff --git a/tests/buildbot/openvz/local.g-virtual05.rinse.bpi b/tests/buildbot/openvz/local.g-virtual05.rinse.bpi
deleted file mode 100755
index 8908aec..0000000
--- a/tests/buildbot/openvz/local.g-virtual05.rinse.bpi
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh
-# This file change the default mirror in centos
-# It comments mirrorlist in etc/yum.repos.d/CentOS-Base.repo
-# It adds baseurl=http://$server so $server is used as a mirror
-echo "========================================="
-echo $1
-case $dist in
-	centos-5)
-		echo $mirror
-		server=`echo $mirror | cut -d/ -f3`
-		echo "Disable mirrorlists"
-		sed -i -e "s/^mirrorlist=/#mirrorlist=/" $1/etc/yum.repos.d/CentOS-Base.repo
-		echo "Setup baseurl on server $server"
-		sed -i -e "s!#baseurl=http://mirror.centos.org!baseurl=http://$server!" $1/etc/yum.repos.d/CentOS-Base.repo
-		rm -f $1/etc/mtab
-		ln -s /proc/mounts $1/etc/mtab
-	;;
-esac
-echo "========================================="
diff --git a/tests/buildbot/openvz/local.g-virtual05.rinse.conf b/tests/buildbot/openvz/local.g-virtual05.rinse.conf
deleted file mode 100644
index b69d1c9..0000000
--- a/tests/buildbot/openvz/local.g-virtual05.rinse.conf
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-#  /etc/rinse/rinse.conf
-#
-#  Contains the list of servers to download our initial collection of
-# packages from.
-#
-# Steve
-# --
-#
-
-
-
-[centos-4]
-mirror       = http://mirror.bytemark.co.uk/centos/4/os/i386/CentOS/RPMS/
-mirror.amd64 = http://mirror.bytemark.co.uk/centos/4/os/x86_64/CentOS/RPMS/
-
-
-[centos-5]
-mirror = http://g-virtual02.rd.francetelecom.fr/centos/5.5/os/i386/CentOS/
-mirror.amd64 = http://g-virtual02.rd.francetelecom.fr/centos/5.5/os/x86_64/CentOS/
-#mirror       = http://mirror.bytemark.co.uk/centos/5/os/i386/CentOS/
-#mirror.amd64 = http://mirror.bytemark.co.uk/centos/5/os/x86_64/CentOS/
-
-
-[fedora-core-4]
-mirror       = http://ftp.heanet.ie/pub/fedora/linux/core/4/i386/os/Fedora/RPMS/
-mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/4/x86_64/os/Fedora/RPMS/
-
-
-[fedora-core-5]
-mirror       = http://ftp.heanet.ie/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/
-mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/5/x86_64/os/Fedora/RPMS/
-
-
-[fedora-core-6]
-mirror       = http://ftp.heanet.ie/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/
-mirror.amd64 = http://ftp.heanet.ie/pub/fedora/linux/core/6/x86_64/os/Fedora/RPMS/
-
-
-[fedora-core-7]
-mirror       = http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/i386/os/Fedora/
-mirror.amd64 = http://mirror.bytemark.co.uk/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/
-
-
-[fedora-core-8]
-mirror       = http://mirror.bytemark.co.uk/fedora/linux/releases/8/Fedora/i386/os/Packages/
-mirror.amd64 = http://mirror.bytemark.co.uk/fedora/linux/releases/8/Fedora/x86_64/os/Packages/
-
-
-
-[fedora-core-9]
-mirror       = http://mirror.bytemark.co.uk/fedora/linux/releases/9/Fedora/i386/os/Packages/
-mirror.amd64 = http://mirror.bytemark.co.uk/fedora/linux/releases/9/Fedora/x86_64/os/Packages/
-
-
-[fedora-core-10]
-mirror       = http://mirrors.vexs.net/pub/fedora/linux/releases/10/Fedora/i386/os/Packages/
-mirror.amd64 = http://mirrors.vexs.net/pub/fedora/linux/releases/10/Fedora/x86_64/os/Packages/
-
-
-[opensuse-10.1]
-mirror       = http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/SL-10.1/inst-source/suse/i686/
-mirror.amd64 = http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/SL-10.1/inst-source/suse/x86_64/
-
-
-[opensuse-10.2]
-mirror       = http://download.opensuse.org/distribution/10.2/repo/oss/suse/i686/
-mirror.amd64 = http://download.opensuse.org/distribution/10.2/repo/oss/suse/x86_64/
-
-
-[opensuse-10.3]
-mirror       = http://download.opensuse.org/distribution/10.3/repo/oss/suse/i686/
-mirror.amd64 = http://download.opensuse.org/distribution/10.3/repo/oss/suse/x86_64/
-
-
-[opensuse-11.0]
-mirror       = http://download.opensuse.org/distribution/11.0/repo/oss/suse/i686/
-mirror.amd64 = http://download.opensuse.org/distribution/11.0/repo/oss/suse/x86_64/
-
-
-[opensuse-11.1]
-mirror       = http://download.opensuse.org/distribution/11.1/repo/oss/suse/i686/
-mirror.amd64 = http://download.opensuse.org/distribution/11.1/repo/oss/suse/x86_64/
-
diff --git a/tests/buildbot/openvz/local.rinse.api b/tests/buildbot/openvz/local.rinse.api
deleted file mode 100755
index 36b83b5..0000000
--- a/tests/buildbot/openvz/local.rinse.api
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-echo "========================================="
-echo $1
-case $dist in
-	centos-5)
-		chroot $1 /bin/mount proc /proc -t proc
-		pkglist="`echo $extrapackage|sed 's/,/ /g'`"
-		chroot $1 /usr/bin/yum -y install $pkglist
-		chroot $1 /bin/umount /proc
-	;;
-esac
-echo "========================================="
diff --git a/tests/buildbot/openvz/start b/tests/buildbot/openvz/start
deleted file mode 100755
index 1852e73..0000000
--- a/tests/buildbot/openvz/start
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-echo "==== START $HOST ===="
-echo "VMENGINE=$VMENGINE VMTEMPLATE=$VMTEMPLATE CIDR=$CIDR IPGW=$IPGW"
-
-sudo /root/start_vz.sh $VMTEMPLATE $HOST
-
-ssh -o 'StrictHostKeyChecking=no' root@$HOST uname -a
-ret=$?
-
-if [ $ret -ne 0 ];then
-	sleep 10;
-	ssh -o 'StrictHostKeyChecking=no' root@$HOST uname -a
-fi
-
-sleep 1
diff --git a/tests/buildbot/openvz/stop b/tests/buildbot/openvz/stop
deleted file mode 100755
index bdea64c..0000000
--- a/tests/buildbot/openvz/stop
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-echo "==== STOP $HOST ===="
-echo "VMENGINE=$VMENGINE VMTEMPLATE=$VMTEMPLATE CIDR=$CIDR IPGW=$IPGW"
-
-sudo /root/stop_vz.sh $HOST

commit 64ca2aefa13f7b84e374770c4c01622854daad01
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Fri Nov 28 17:44:59 2014 +0100

    testsuite: remove old configs

diff --git a/tests/buildbot/config/README b/tests/buildbot/config/README
new file mode 100644
index 0000000..5a3c092
--- /dev/null
+++ b/tests/buildbot/config/README
@@ -0,0 +1 @@
+You can add a configuration named after `hostname` here.
diff --git a/tests/buildbot/config/atom330 b/tests/buildbot/config/atom330
deleted file mode 100644
index 7077295..0000000
--- a/tests/buildbot/config/atom330
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# In this file you can find vars that are useable 
-# both as an include in a Makefile or
-# be sourced in a shell
-# So it should only be stuffs like VAR=value
-#
-VMENGINE=lxc
-REMOTESELENIUM=true
-KEEPVM=false
-DNSDOMAIN=local
-DEBMIRROR=http://atom330.bayle.eu/debian/
-DEBMIRRORSEC=http://atom330.bayle.eu/debian-security/
-
-# WIP: NEW WAY TO SET CONFIG (used by new start_vm script)
-
-# The following is for static ip config
-# hostname=vmengine:template:address/mask:gateway
-vzdebian6=vz:debian6:192.168.222.105/24:192.168.222.1
-vzdebian6src=vz:debian6:192.168.222.120/24:192.168.222.1
-vzcentos5=vz:centos5:192.168.222.110/24:192.168.222.1
-vzcentos5src=vz:centos5:192.168.222.115/24:192.168.222.1
-
-debian6=lxc:debian6:192.168.222.105/24:192.168.222.1
-debian6src=lxc:debian6:192.168.222.120/24:192.168.222.1
-centos5=lxc:centos5:192.168.222.110/24:192.168.222.1
-centos5src=lxc:centos5:192.168.222.115/24:192.168.222.1
-
-# For dhcpconfig
-dhdebian6=lxc:debian6::
-dhdebian6src=lxc:debian6::
-dhcentos5=lxc:centos5::
-dhcentos5src=lxc:centos5::
diff --git a/tests/buildbot/config/build b/tests/buildbot/config/build
deleted file mode 100644
index 30f8288..0000000
--- a/tests/buildbot/config/build
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#
-# In this file you can find vars that are useable 
-# both as an include in a Makefile or
-# be sourced in a shell
-# So it should only be stuffs like VAR=value
-#
-VMENGINE=openvz
-REMOTESELENIUM=true
-KEEPVM=true
-
-centos5=openvz:centos-5-x86-test::
-centos6=openvz:centos-6-x86-test::
-centos7=openvz:centos-7-x86-test::
-
-centos5tmpl=openvz:centos-5-x86::
-centos6tmpl=openvz:centos-6-x86::
-centos7tmpl=openvz:centos-7-x86::
diff --git a/tests/buildbot/config/christian b/tests/buildbot/config/christian
deleted file mode 100644
index 74686f5..0000000
--- a/tests/buildbot/config/christian
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# In this file you can find vars that are useable 
-# both as an include in a Makefile or
-# be sourced in a shell
-# So it should only be stuffs like VAR=value
-#
-#DEBMIRROR=http://atom330.bayle.eu/debian
-#DEBMIRRORSEC=http://atom330.bayle.eu/debian-security
-VMENGINE=lxc
-REMOTESELENIUM=true
-KEEPVM=true
-BUILDERDIR=/data/pbuilder
-
-# Debian 3rd-party
-DEB3RD=http://172.16.0.1:8080/job/3rd-party-deb/ws/build/debian/
-
-# Redhat 3rd-party
-RPM3RD=http://172.16.0.1:8080/job/3rd-party-rpm/ws/build/redhat/
diff --git a/tests/buildbot/config/g-dellm65-1 b/tests/buildbot/config/g-dellm65-1
deleted file mode 100644
index b0567f8..0000000
--- a/tests/buildbot/config/g-dellm65-1
+++ /dev/null
@@ -1,27 +0,0 @@
-
-#
-# In this file you can find vars that are useable 
-# both as an include in a Makefile or
-# be sourced in a shell
-# So it should only be stuffs like VAR=value
-#
-
-# Static IP example
-debian6=lxc:debian6:10.194.10.105/24:10.194.10.1
-debian6src=lxc:debian6:10.194.10.120/24:10.194.10.1
-centos5=lxc:centos5:10.194.10.110/24:10.194.10.1
-centos5src=lxc:centos5:10.194.10.115/24:10.194.10.1
-
-# Dynamic IP example
-#debian6=lxc:debian6::
-#debian6src=lxc:debian6::
-#centos5=lxc:centos5::
-#centos5src=lxc:centos5::
-
-SSHPUBKEY=~/.ssh/id_rsa.pub
-VMENGINE=lxc
-KEEPVM=true
-REMOTESELENIUM=true
-
-DEBMIRROR=http://10.194.10.128/debian
-DEBMIRRORSEC=http://10.194.10.128/debian-security
diff --git a/tests/buildbot/config/g-quadri1 b/tests/buildbot/config/g-quadri1
deleted file mode 100644
index 2b786cb..0000000
--- a/tests/buildbot/config/g-quadri1
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# In this file you can find vars that are useable 
-# both as an include in a Makefile or
-# be sourced in a shell
-# So it should only be stuffs like VAR=value
-#
-
-SSHPUBKEY=~/.ssh/id_rsa.pub
-
-DEBMIRROR=http://g-rub.rd.francetelecom.fr:3142/debian
-DEBMIRRORSEC=http://g-rub.rd.francetelecom.fr:3142/debian-security
-DAG_RPMFORGE_REPO=http://g-virtual02.rd.francetelecom.fr/dag/redhat
-EPEL_REPO=http://g-virtual02.rd.francetelecom.fr/epel
-
-VMENGINE=lxc
-REMOTESELENIUM=true
-KEEPVM=true
-DNSDOMAIN=rd.francetelecom.fr
-
-coclicocdd40=lxc:centos5::
-coclicofftrk=lxc:centos5::
-
-ffcos5trksrc=lxc:centos5::
-ffcos5trkrpm=lxc:centos5::
-
-ffdeb6trksrc=lxc:debian6::
-ffdeb6trkdeb=lxc:debian6::
-
diff --git a/tests/buildbot/config/g-virtual05 b/tests/buildbot/config/g-virtual05
deleted file mode 100644
index 2b10aa7..0000000
--- a/tests/buildbot/config/g-virtual05
+++ /dev/null
@@ -1,21 +0,0 @@
-
-#
-# In this file you can find vars that are useable 
-# both as an include in a Makefile or
-# be sourced in a shell
-# So it should only be stuffs like VAR=value
-#
-
-SSHPUBKEY=~/.ssh/id_rsa.pub
-
-DEBMIRROR=http://g-rub.rd.francetelecom.fr:3142/debian
-DEBMIRRORSEC=http://g-rub.rd.francetelecom.fr:3142/debian-security
-DAG_RPMFORGE_REPO=http://g-virtual02.rd.francetelecom.fr/dag/redhat
-EPEL_REPO=http://g-virtual02.rd.francetelecom.fr/epel
-
-VMENGINE=lxc
-REMOTESELENIUM=true
-KEEPVM=true
-DNSDOMAIN=rd.francetelecom.fr
-
-fgcostrksrc=lxc:centos5::
diff --git a/tests/buildbot/config/vladimir b/tests/buildbot/config/vladimir
deleted file mode 100644
index 21bcdb4..0000000
--- a/tests/buildbot/config/vladimir
+++ /dev/null
@@ -1,26 +0,0 @@
-
-#
-# In this file you can find vars that are useable 
-# both as an include in a Makefile or
-# be sourced in a shell
-# So it should only be stuffs like VAR=value
-#
-VMENGINE=lxc
-REMOTESELENIUM=true
-KEEPVM=false
-
-# Proxy
-PROXY=http://miromesnil.gnurandal.net:3128/
-
-# VM for trunk
-fgcostrksrc=lxc:centos5::
-fgcostrk=lxc:centos5::
-fgrpmtrk=lxc:centos5::
-
-fgdebtrksrc=lxc:debian7::
-fgdebtrk=lxc:debian7::
-
-# VM for Branch 5.1
-fgcos51src=lxc:centos5::
-fgcos51=lxc:centos5::
-fgdeb51=lxc:debian6::

commit 17145ce85d427e94c047ba8391feb01cc3d4b3fd
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Fri Nov 28 17:33:51 2014 +0100

    testsuite: honor KEEP_VM

diff --git a/tests/buildbot/fusionforge-build-and-test.sh b/tests/buildbot/fusionforge-build-and-test.sh
index c91342e..57e2b52 100755
--- a/tests/buildbot/fusionforge-build-and-test.sh
+++ b/tests/buildbot/fusionforge-build-and-test.sh
@@ -45,8 +45,8 @@ esac
 INSTALL_METHOD=$2
 if [ -z "$INSTALL_METHOD" ]; then INSTALL_METHOD='src'; fi
 
-$(dirname $0)/destroy_vm $HOST
-$(dirname $0)/start_vm $HOST
+destroy_vm_if_not_kept $HOST
+start_vm_if_not_kept $HOST
 
 # LXC post-install...
 if [ $INSTALL_OS == "debian" ]; then
@@ -76,5 +76,5 @@ ssh root@$HOST "/usr/src/fusionforge/autoinstall/vnc-run-testsuite.sh /usr/src/f
 
 rsync -av root@$HOST:/var/log/ $WORKSPACE/reports/
 
-$(dirname $0)/stop_vm $HOST
+stop_vm_if_not_kept $HOST
 exit $retcode

commit ac306673955a81988bb3de7fb8ae1351d5666fba
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Fri Nov 28 17:27:44 2014 +0100

    testsuite: update scripts and remove obsolete code

diff --git a/tests/buildbot/lxc/Makefile b/tests/buildbot/lxc/Makefile
index fd4c428..bc7d707 100644
--- a/tests/buildbot/lxc/Makefile
+++ b/tests/buildbot/lxc/Makefile
@@ -1,29 +1,15 @@
 -include ../config/default
 -include ../config/$(shell hostname)
 
-# Guess where lxc data is and default to /usr/share/lxc
-LXC_DATA:=$(shell [ -d /usr/share/lxc ] && echo /usr/share/lxc || ([ -d /usr/lib/lxc ] && echo /usr/lib/lxc))
-LXC_DATA:=$(shell [ -z "$(LXC_DATA)" ] && echo /usr/share/lxc || echo "$(LXC_DATA)")
-TEMPLATELIST:=$(LXC_DATA)/templates/lxc-debian6 $(LXC_DATA)/templates/lxc-debian7 $(LXC_DATA)/templates/lxc-debian8 $(LXC_DATA)/templates/lxc-centos5 $(LXC_DATA)/templates/lxc-centos6 $(LXC_DATA)/templates/lxc-centos7
-
 default: checkdepends installtemplate
 
 help: 
 	@echo "read the Makefile to see available targets"
 
-/cgroup:
-	[ -d /cgroup ] || ( if [ $(shell id -u) != "0" ] then; echo "you should be root to run this" ; else; mkdir /cgroup; fi
-
-checkmount: checkfstab /cgroup
-	grep -q 0 /cgroup/cpuset.cpus || mount /cgroup
-
-checkfstab:
-	@grep ^cgroup /etc/fstab || (echo "You need to add cgroup entry to fstab 'cgroup /cgroup cgroup defaults 0 0'" && false)
+checkdepends: /usr/bin/lxc-start /lib/bridge-utils /usr/bin/netmask /usr/sbin/rinse /usr/sbin/tunctl
 
-checkdepends: $(LXC_DATA) /lib/bridge-utils /usr/bin/netmask /usr/sbin/rinse /usr/sbin/tunctl
-
-$(LXC_DATA):
-	@[ -d $@ ] || sudo apt-get install lxc
+/usr/bin/lxc-start:
+	@[ -f $@ ] || sudo apt-get install lxc
 
 /lib/bridge-utils:
 	@[ -d $@ ] || sudo apt-get install bridge-utils
@@ -37,77 +23,10 @@ $(LXC_DATA):
 /usr/sbin/tunctl:
 	@[ -f $@ ] || sudo apt-get install uml-utilities
 
-bridging:
-	@grep -q '^iface br0 inet' /etc/network/interfaces || (echo "Please setup network bridging" && false)
-
-ssh:
-	[ -e ssh ] || (echo "You need a ssh dir containing host keys like /etc/ssh_host_*" && false)
-
-setname: beroot
-	echo "debian7.local" > $(VMROOT)/rootfs/etc/hostname
-	grep -q debian7.local $(VMROOT)/rootfs/etc/hosts || echo "$(IPDEBBASE).$(VEIDDEB)	debian7.local debian7" >> $(VMROOT)/rootfs/etc/hosts
+installtemplate: /usr/local/sbin/lxc-wrapper
 
-beroot:
-	@[ $(shell id -u) = "0" ] || (echo "you should be root to run this" ; exit 1)
-
-addrights: beroot
-	lxc-setcap
-
-delrights: beroot
-	lxc-setcap -d
-
-installtemplate: $(TEMPLATELIST)
+/usr/local/sbin/lxc-wrapper: lxc-wrapper
+	install -m 00755 lxc-wrapper /usr/local/sbin/
 
 removetemplate:
-	rm -f $(TEMPLATELIST)
-
-$(LXC_DATA)/templates/lxc-debian6: lxc-debian6 $(LXC_DATA) Makefile
-	cat lxc-debian6 | sed 's!http://cdn.debian.net/debian/!$(DEBMIRROR)!' > $(LXC_DATA)/templates/lxc-debian6
-	chmod 755 $(LXC_DATA)/templates/lxc-debian6
-
-$(LXC_DATA)/templates/lxc-debian7: lxc-debian7 $(LXC_DATA) Makefile
-	cat lxc-debian7 | sed 's!http://cdn.debian.net/debian/!$(DEBMIRROR)!' > $(LXC_DATA)/templates/lxc-debian7
-	chmod 755 $(LXC_DATA)/templates/lxc-debian7
-
-$(LXC_DATA)/templates/lxc-debian8: lxc-debian8 $(LXC_DATA) Makefile
-	cat lxc-debian8 | sed 's!http://cdn.debian.net/debian/!$(DEBMIRROR)!' > $(LXC_DATA)/templates/lxc-debian8
-	chmod 755 $(LXC_DATA)/templates/lxc-debian8
-
-$(LXC_DATA)/templates/lxc-centos5: lxc-centos5 $(LXC_DATA) Makefile
-	cp lxc-centos5 $(LXC_DATA)/templates/
-
-$(LXC_DATA)/templates/lxc-centos6: lxc-centos6 $(LXC_DATA) Makefile
-	cp lxc-centos6 $(LXC_DATA)/templates/
-
-$(LXC_DATA)/templates/lxc-centos7: lxc-centos7 $(LXC_DATA) Makefile
-	cp lxc-centos7 $(LXC_DATA)/templates/
-
-createdeb:
-	sudo /usr/bin/lxc-create -n dhdebian6.local -f config.debian6 -t debian6
-	sudo /usr/bin/lxc-create -n dhdebian7.local -f config.debian7 -t debian7
-
-createcos: /usr/bin/netmask /usr/bin/rinse
-	sudo /usr/bin/lxc-create -n dhcentos5.local -f config.centos5 -t centos5
-	sudo /usr/bin/lxc-create -n dhcentos6.local -f config.centos6 -t centos6
-	sudo /usr/bin/lxc-create -n dhcentos7.local -f config.centos7 -t centos7
-
-startdeb: checkmount
-	sudo LANG=C /usr/bin/lxc-start -n dhdebian7.local -d
-
-stopdeb:
-	sudo LANG=C /usr/bin/lxc-stop -n dhdebian7.local
-
-startcos: checkmount
-	sudo LANG=C /usr/bin/lxc-start -n dhcentos5.local -d
-
-stopcos:
-	sudo LANG=C /usr/bin/lxc-stop -n dhcentos5.local
-
-destroydeb:
-	sudo LANG=C /usr/bin/lxc-stop -n dhdebian7.local
-	sudo LANG=C /usr/bin/lxc-destroy -n dhdebian7.local
-
-destroycos:
-	sudo LANG=C /usr/bin/lxc-stop -n dhcentos5.local
-	sudo LANG=C /usr/bin/lxc-destroy -n dhcentos5.local
-
+	rm -f /usr/local/sbin/lxc-wrapper
diff --git a/tests/buildbot/config/init-jenkins.sh b/tests/buildbot/lxc/init-jenkins.sh
similarity index 81%
rename from tests/buildbot/config/init-jenkins.sh
rename to tests/buildbot/lxc/init-jenkins.sh
index b65468d..1c11fb2 100755
--- a/tests/buildbot/config/init-jenkins.sh
+++ b/tests/buildbot/lxc/init-jenkins.sh
@@ -4,11 +4,10 @@ EMAIL="buildbot@$HOST"
 
 # Setup sudo command needed by jenkins
 echo "Setup sudoers"
-if [ ! -f /etc/sudoers.d/jenkins ]
+if [ ! -f /etc/sudoers.d/ci ]
 then
-cat > /etc/sudoers.d/jenkins <<-EOF
-jenkins ALL = NOPASSWD: /usr/bin/apt-get,/usr/bin/lxc-create,/usr/bin/lxc-start,/usr/bin/lxc-stop,/usr/bin/lxc-destroy, /usr/bin/lxc-console
-jenkins ALL = NOPASSWD:SETENV: /usr/sbin/cowbuilder
+cat > /etc/sudoers.d/ci <<-EOF
+jenkins ALL = NOPASSWD: /usr/bin/lxc-wrapper
 EOF
 fi
 
diff --git a/tests/buildbot/lxc/lxc-centos5 b/tests/buildbot/lxc/lxc-centos5
deleted file mode 100755
index f4d5de1..0000000
--- a/tests/buildbot/lxc/lxc-centos5
+++ /dev/null
@@ -1,634 +0,0 @@
-#!/bin/bash
-
-#
-# template script for generating centos container for LXC
-#
-
-#
-# lxc: linux Container library
-
-# Authors:
-# Daniel Lezcano <daniel.lezcano at free.fr>
-
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-DISTRO=centos-5
-
-configure_centos()
-{
-    path=$1
-    rootfs=$2
-    hostname=$3
-
-    # disable selinux in centos
-    mkdir -p $rootfs/selinux
-    echo 0 > $rootfs/selinux/enforce
-
-    # configure localhost
-    touch $rootfs/etc/hosts
-    if ! grep -q "^127.0.0.1" $rootfs/etc/hosts
-    then
-	cat <<EOF >> $rootfs/etc/hosts
-# Do not remove the following line, or various programs
-# that require network functionality will fail.
-127.0.0.1       localhost.localdomain localhost
-::1             localhost6.localdomain6 localhost6
-EOF
-    fi
-    if ! grep -q "^::1" $rootfs/etc/hosts
-    then
-	cat <<EOF >> $rootfs/etc/hosts
-::1             localhost6.localdomain6 localhost6
-EOF
-    fi
-
-    if grep -q ^lxc.network.ipv4 $path/config
-    then
-        # configure static network
-        lxc_network_ipv4=`grep ^lxc.network.ipv4 $path/config | cut -d= -f2`
-        address=`echo $lxc_network_ipv4 | cut -d/ -f1`
-	netmask=`netmask -s $lxc_network_ipv4 | cut -d/ -f2`
-        if [ -e $rootfs/etc/sysconfig/network-scripts ]
-        then
-                cat <<EOF > $rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
-DEVICE=eth0
-IPADDR=$address
-NETMASK=$netmask
-#NETWORK=
-#BROADCAST=
-ONBOOT=yes
-BOOTPROTO=none
-USERCTL=no
-EOF
-                cat <<EOF > $rootfs/etc/sysconfig/network
-NETWORKING=yes
-FORWARD_IPV4=yes
-HOSTNAME=$hostname
-#GATEWAY=
-GATEWAYDEV=eth0
-EOF
-                cat <<EOF >> $rootfs/etc/hosts
-$address        $hostname
-EOF
-                echo "Network configured with static ip"
-        else
-                exit 2
-        fi
-        
-    else
-        # configure the network using the dhcp
-        if [ -e $rootfs/etc/sysconfig/network-scripts ]
-        then
-                cat <<EOF > $rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
-DEVICE=eth0
-ONBOOT=yes
-BOOTPROTO=dhcp
-USERCTL=no
-EOF
-                cat <<EOF > $rootfs/etc/sysconfig/network
-NETWORKING=yes
-FORWARD_IPV4=yes
-HOSTNAME=$hostname
-GATEWAYDEV=eth0
-EOF
-                cat <<EOF >> $rootfs/etc/hosts
-127.0.1.1       $hostname
-EOF
-                echo "Network configured with dhcp"
-        else
-                exit 3
-        fi
-        # When domain is not local, avahi completed by send hostname
-        hostnamebase=`echo $hostname | cut -d. -f1`
-        if [ "$hostnamebase.local" != "$hostname" ]
-        then
-                cat <<EOF > $rootfs/etc/dhclient.conf
-send host-name "$hostnamebase";
-EOF
-        fi
-    fi
-
-    # provide the lxc service
-#    cat <<EOF > $rootfs/etc/init/lxc.conf
-## fake some events needed for correct startup other services
-#
-#description     "Container Upstart"
-#
-#start on startup
-#
-#script
-#        rm -rf /var/run/*.pid
-#        rm -rf /var/run/network/*
-#        /sbin/initctl emit stopped JOB=udevtrigger --no-wait
-#        /sbin/initctl emit started JOB=udev --no-wait
-#end script
-#EOF
-
-#    cat <<EOF > $rootfs/etc/init/console.conf
-## console - getty
-##
-## This service maintains a console on tty1 from the point the system is
-## started until it is shut down again.
-#
-#start on stopped rc RUNLEVEL=[2345]
-#stop on runlevel [!2345]
-#
-#respawn
-#exec /sbin/getty -8 38400 /dev/console
-#EOF
-#sed -i -e '/getty/d' $rootfs/etc/inittab
-# Disable tty5 and tty6
-sed -i -e '/^5:/d' $rootfs/etc/inittab
-sed -i -e '/^6:/d' $rootfs/etc/inittab
-# Enable console
-cat <<EOF >> $rootfs/etc/inittab
-0:2345:respawn:/sbin/mingetty console
-EOF
-
-#    cat <<EOF > $rootfs/lib/init/fstab
-## /lib/init/fstab: lxc system fstab
-#none            /spu                      spufs           gid=spu,optional                  0 0
-#none            /tmp                      none            defaults                          0 0
-#none            /var/lock                 tmpfs           nodev,noexec,nosuid,showthrough   0 0
-#none            /lib/init/rw              tmpfs           mode=0755,nosuid,optional         0 0
-#EOF
-cat <<EOF > $rootfs/etc/fstab
-# NOT MOUNTING IN LXC
-#none /dev/pts devpts defaults 0 0
-#none /proc    proc   defaults 0 0
-#none /sys     sysfs  defaults 0 0
-#none /dev/shm tmpfs  defaults 0 0
-EOF
-
-    # reconfigure some services
-    if [ -z "$LANG" ]; then
-	#chroot $rootfs locale-gen en_US.UTF-8
-	#chroot $rootfs update-locale LANG=en_US.UTF-8
-	cat > $rootfs/etc/sysconfig/i18n <<-FIN
-LANG="en_US.UTF-8"
-SYSFONT="latarcyrheb-sun16"
-FIN
-    else
-	#chroot $rootfs locale-gen $LANG
-	#chroot $rootfs update-locale LANG=$LANG
-	cat > $rootfs/etc/sysconfig/i18n <<-FIN
-LANG="$LANG"
-SYSFONT="latarcyrheb-sun16"
-FIN
-    fi
-
-    # remove pointless services in a container
-#    chroot $rootfs /usr/sbin/update-rc.d -f ondemand remove
-
-#    chroot $rootfs /bin/bash -c 'cd /etc/init; for f in $(ls u*.conf); do mv $f $f.orig; done'
-#    chroot $rootfs /bin/bash -c 'cd /etc/init; for f in $(ls tty[2-9].conf); do mv $f $f.orig; done'
-#    chroot $rootfs /bin/bash -c 'cd /etc/init; for f in $(ls plymouth*.conf); do mv $f $f.orig; done'
-#    chroot $rootfs /bin/bash -c 'cd /etc/init; for f in $(ls hwclock*.conf); do mv $f $f.orig; done'
-#    chroot $rootfs /bin/bash -c 'cd /etc/init; for f in $(ls module*.conf); do mv $f $f.orig; done'
-mv $rootfs/sbin/hwclock $rootfs/sbin/hwclock.removed_by_lxc
-
-    echo "Please change root-password !"
-    echo "root:root" | chroot $rootfs chpasswd
-
-sed -i -e '/start_udev/d' $rootfs/etc/rc.d/rc.sysinit
-
-    # fix avahi
-    if [ -f $rootfs/etc/init.d/avahi-daemon ]
-    then
-	echo 'Fix avahi'
-        sed -i -e "s!-D!-D --no-rlimits!" $rootfs/etc/init.d/avahi-daemon
-    fi
-
-mv $rootfs/dev $rootfs/dev.old
-mkdir -p $rootfs/dev
-test -e $rootfs/dev/null    || mknod -m 666 $rootfs/dev/null c 1 3
-test -e $rootfs/dev/zero    || mknod -m 666 $rootfs/dev/zero c 1 5
-test -e $rootfs/dev/random  || mknod -m 666 $rootfs/dev/random c 1 8
-test -e $rootfs/dev/urandom || mknod -m 666 $rootfs/dev/urandom c 1 9
-test -e $rootfs/dev/pts     || mkdir -m 755 $rootfs/dev/pts
-test -e $rootfs/dev/shm     || mkdir -m 1777 $rootfs/dev/shm
-test -e $rootfs/dev/tty     || mknod -m 666 $rootfs/dev/tty c 5 0
-test -e $rootfs/dev/console || mknod -m 600 $rootfs/dev/console c 5 1
-test -e $rootfs/dev/tty0    || mknod -m 666 $rootfs/dev/tty0 c 4 0
-test -e $rootfs/dev/full    || mknod -m 666 $rootfs/dev/full c 1 7
-test -e $rootfs/dev/initctl || mknod -m 600 $rootfs/dev/initctl p
-test -e $rootfs/dev/ptmx    || mknod -m 666 $rootfs/dev/ptmx c 5 2
-
-test -e $rootfs/dev/tty1 || mknod -m 666 $rootfs/dev/tty1 c 4 1
-test -e $rootfs/dev/tty2 || mknod -m 666 $rootfs/dev/tty2 c 4 2
-test -e $rootfs/dev/tty3 || mknod -m 666 $rootfs/dev/tty3 c 4 3
-test -e $rootfs/dev/tty4 || mknod -m 666 $rootfs/dev/tty4 c 4 4
-test -e $rootfs/dev/tty5 || mknod -m 666 $rootfs/dev/tty5 c 4 5
-test -e $rootfs/dev/tty6 || mknod -m 666 $rootfs/dev/tty6 c 4 6
-
-    return 0
-}
-
-configure_pubkey(){
-	path=$1
-	rootfs=$2
-        if grep -q ^\#lxc.pubkey $path/config
-        then
-		pubkey=`grep ^\#lxc.pubkey $path/config | cut -d= -f2`
-	fi
-	if [ ! -e $rootfs/root/.ssh ]
-	then
-		mkdir $rootfs/root/.ssh
-	fi
-	if [ ! -z "$pubkey" ]
-	then
-		echo "Copying $pubkey -> $rootfs/root/.ssh/authorized_keys"
-		cp $pubkey $rootfs/root/.ssh/authorized_keys
-	fi
-}
-
-configure_hostkeydir(){
-	rootfs=$1
-	hostkeydir=$2
-	name=$3
-	if [ $# -ne 3 ]
-	then
-		exit 1
-	else
-		[ -d $rootfs/etc/ssh ] || mkdir -p $rootfs/etc/ssh
-		if [ -e $hostkeydir ]
-		then 
-			if [ ! -d $hostkeydir/$name ]
-			then
-				mkdir $hostkeydir/$name
-				echo "Creating SSH2 RSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_rsa_key -N '' -t rsa
-				echo "Creating SSH2 DSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_dsa_key -N '' -t dsa
-			fi
-			cp $hostkeydir/$name/ssh_host_* $rootfs/etc/ssh/
-		fi
-	fi
-}
-
-download_centos()
-{
-    cache=$1
-    arch=$2
-
-    # check the mini centos was not already downloaded
-    mkdir -p "$cache/partial-$arch"
-    if [ $? -ne 0 ]; then
-	echo "Failed to create '$cache/partial-$arch' directory"
-	return 1
-    fi
-
-    # download a mini centos into a cache
-    echo "Downloading centos minimal ..."
-    #febootstrap $DISTRO $cache/partial-$arch
-    rinsearch=`dpkg-architecture -qDEB_BUILD_ARCH`
-    pkglist="openssh-server man zsh bind-utils openssh-clients php wget rsync avahi php-pear php-dom java-1.6.0-openjdk xorg-x11-xauth firefox make rpm-build createrepo vnc-server"
-
-    cat <<EOF > /var/cache/rinse/$DISTRO-$arch.before_post_install
-echo "Rinse defines mirror=\$mirror in config"
-server=\`echo \$mirror | cut -d/ -f3\`
-echo "Disable mirrorlists"
-sed -i -e "s/^mirrorlist=/#mirrorlist=/" $cache/partial-$arch/etc/yum.repos.d/CentOS-Base.repo
-echo "Setup baseurl on server \$server"
-sed -i -e "s!#baseurl=http://mirror.centos.org!baseurl=http://\$server!" $cache/partial-$arch/etc/yum.repos.d/CentOS-Base.repo
-rm -f $cache/partial-$arch/etc/mtab
-ln -s /proc/mounts $cache/partial-$arch/etc/mtab
-
-mkdir -p $cache/partial-$arch/dev
-test -e $cache/partial-$arch/dev/null    || mknod -m 666 $cache/partial-$arch/dev/null c 1 3
-test -e $cache/partial-$arch/dev/zero    || mknod -m 666 $cache/partial-$arch/dev/zero c 1 5
-test -e $cache/partial-$arch/dev/random  || mknod -m 666 $cache/partial-$arch/dev/random c 1 8
-test -e $cache/partial-$arch/dev/urandom || mknod -m 666 $cache/partial-$arch/dev/urandom c 1 9
-test -e $cache/partial-$arch/dev/pts     || mkdir -m 755 $cache/partial-$arch/dev/pts
-test -e $cache/partial-$arch/dev/shm     || mkdir -m 1777 $cache/partial-$arch/dev/shm
-test -e $cache/partial-$arch/dev/tty     || mknod -m 666 $cache/partial-$arch/dev/tty c 5 0
-test -e $cache/partial-$arch/dev/console || mknod -m 600 $cache/partial-$arch/dev/console c 5 1
-test -e $cache/partial-$arch/dev/tty0    || mknod -m 666 $cache/partial-$arch/dev/tty0 c 4 0
-test -e $cache/partial-$arch/dev/full    || mknod -m 666 $cache/partial-$arch/dev/full c 1 7
-test -e $cache/partial-$arch/dev/initctl || mknod -m 600 $cache/partial-$arch/dev/initctl p
-test -e $cache/partial-$arch/dev/ptmx    || mknod -m 666 $cache/partial-$arch/dev/ptmx c 5 2
-EOF
-    chmod 755 /var/cache/rinse/$DISTRO-$arch.before_post_install
-
-    cat <<EOF > /var/cache/rinse/$DISTRO-$arch.after_post_install
-# MOUNT PROC
-echo "Mount /proc"
-chroot $cache/partial-$arch /bin/mount proc /proc -t proc
-# INSTALL PACKAGES
-echo "Install $pkglist"
-chroot $cache/partial-$arch /usr/bin/yum -y install $pkglist
-EOF
-
-if grep -q  ^http_proxy /etc/wgetrc
-then
-	PROXY=`grep ^http_proxy /etc/wgetrc | tail -1 | sed -e 's!.*http://!!' -e 's!/!!'`
-	export PROXY
-
-    cat <<EOF >> /var/cache/rinse/$DISTRO-$arch.after_post_install
-# PROXY CONF FROM WGET
-echo "Set up proxy $PROXY for pear"
-chroot $cache/partial-$arch /usr/bin/pear config-set http_proxy $PROXY
-EOF
-fi
-
-    cat <<EOF >> /var/cache/rinse/$DISTRO-$arch.after_post_install
-# INSTALL PHPUNIT
-# phpunit install, requires: php-pear php-dom
-echo "Updating pear.php.net pear channel"
-chroot $cache/partial-$arch /usr/bin/pear channel-update pear.php.net
-#optional?# chroot $cache/partial-$arch /usr/bin/pear channel-discover components.ez.no
-echo "Discovering pear.phpunit.de pear channel"
-chroot $cache/partial-$arch /usr/bin/pear channel-discover pear.phpunit.de
-echo "Discovering pear.symfony-project.com pear channel"
-chroot $cache/partial-$arch /usr/bin/pear channel-discover pear.symfony-project.com
-echo "Upgrading pear"
-chroot $cache/partial-$arch /usr/bin/pear upgrade-all
-chroot $cache/partial-$arch /usr/bin/pear upgrade --force PEAR
-echo "Installing phpunit/PHPUnit"
-chroot $cache/partial-$arch /usr/bin/pear install --alldeps phpunit/PHPUnit
-# UMOUNT PROC
-echo "Umount /proc"
-chroot $cache/partial-$arch /bin/umount /proc
-EOF
-    chmod 755 /var/cache/rinse/$DISTRO-$arch.after_post_install
-
-    rinse --config /etc/rinse/rinse.conf \
-	--arch $rinsearch \
-	--distribution $DISTRO \
-	--before-post-install /var/cache/rinse/$DISTRO-$arch.before_post_install  \
-	--after-post-install /var/cache/rinse/$DISTRO-$arch.after_post_install \
-	--directory $cache/partial-$arch
-    
-    if [ $? -ne 0 ]; then
-	echo "Failed to download the rootfs, aborting."
-	return 1
-    fi
-
-    mv "$1/partial-$arch" "$1/rootfs-$arch"
-    echo "Download complete."
-
-    return 0
-}
-
-copy_centos()
-{
-    cache=$1
-    arch=$2
-    rootfs=$3
-
-    # make a local copy of the minicentos
-    echo -n "Copying rootfs to $rootfs ..."
-    [ -d $rootfs ] && rmdir $rootfs
-    cp --reflink=auto -a $cache/rootfs-$arch $rootfs || return 1
-    return 0
-}
-
-install_centos()
-{
-    cache="/var/cache/lxc/$DISTRO"
-    rootfs=$1
-    mkdir -p /var/lock/subsys/
-    (
-	flock -n -x 200
-	if [ $? -ne 0 ]; then
-	    echo "Cache repository is busy."
-	    return 1
-	fi
-
-	arch=$(arch)
-
-	echo "Checking cache download in $cache/rootfs-$arch ... "
-	if [ ! -e "$cache/rootfs-$arch" ]; then
-	    download_centos $cache $arch
-	    if [ $? -ne 0 ]; then
-		echo "Failed to download 'centos base'"
-		return 1
-	    fi
-	fi
-
-	echo "Copy $cache/rootfs-$arch to $rootfs ... "
-	copy_centos $cache $arch $rootfs
-	if [ $? -ne 0 ]; then
-	    echo "Failed to copy rootfs"
-	    return 1
-	fi
-
-	return 0
-
-	) 200>/var/lock/subsys/lxc
-
-    return $?
-}
-
-gen_mac()
-{
-	dd if=/dev/urandom bs=1 count=3 2>/dev/null | od -tx1 | head -1 | cut -d' ' -f2- | awk '{ print "00:16:3e:"$1":"$2":"$3 }'
-}
-
-copy_configuration()
-{
-    path=$1
-    rootfs=$2
-    name=$3
-    macdir=$4
-    
-    if [ ! -e "$macdir/$name" ]
-    then
-	gen_mac > $macdir/$name
-    fi
-    macaddr=`cat $macdir/$name`
-
-    cat <<EOF >> $path/config
-lxc.network.hwaddr = $macaddr
-# lxc.utsname = $name
-
-lxc.tty = 4
-lxc.pts = 1024
-lxc.rootfs = $rootfs
-# lxc.mount  = $path/fstab
-
-# lxc.console = /dev/console
-
-lxc.cgroup.devices.deny = a
-# /dev/null and zero
-lxc.cgroup.devices.allow = c 1:3 rwm
-lxc.cgroup.devices.allow = c 1:5 rwm
-# /dev/full
-lxc.cgroup.devices.allow = c 1:7 rwm
-# consoles
-lxc.cgroup.devices.allow = c 5:1 rwm
-lxc.cgroup.devices.allow = c 5:0 rwm
-lxc.cgroup.devices.allow = c 4:0 rwm
-lxc.cgroup.devices.allow = c 4:1 rwm
-# /dev/{,u}random
-lxc.cgroup.devices.allow = c 1:9 rwm
-lxc.cgroup.devices.allow = c 1:8 rwm
-lxc.cgroup.devices.allow = c 136:* rwm
-lxc.cgroup.devices.allow = c 5:2 rwm
-# rtc
-lxc.cgroup.devices.allow = c 254:0 rwm
-
-# mounts point
-lxc.mount.entry=proc $rootfs/proc proc nodev,noexec,nosuid 0 0
-lxc.mount.entry=devpts $rootfs/dev/pts devpts defaults 0 0
-lxc.mount.entry=sysfs $rootfs/sys sysfs defaults  0 0
-EOF
-
-#    cat <<EOF > $path/fstab
-#proc            $rootfs/proc         proc    nodev,noexec,nosuid 0 0
-#devpts          $rootfs/dev/pts      devpts defaults 0 0
-##sysfs           $rootfs/sys          sysfs defaults  0 0
-#tmpfs           $rootfs/dev/shm      tmpfs defaults 0 0
-#EOF
-
-    if [ $? -ne 0 ]; then
-	echo "Failed to add configuration"
-	return 1
-    fi
-
-    return 0
-}
-
-clean()
-{
-    cache="/var/cache/lxc/$DISTRO"
-
-    if [ ! -e $cache ]; then
-	exit 0
-    fi
-
-    # lock, so we won't purge while someone is creating a repository
-    (
-	flock -n -x 200
-	if [ $? != 0 ]; then
-	    echo "Cache repository is busy."
-	    exit 1
-	fi
-
-	echo -n "Purging the download cache..."
-	rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1
-	exit 0
-
-    ) 200>/var/lock/subsys/lxc
-}
-
-usage()
-{
-    cat <<EOF
-$1 -h|--help -p|--path=<path> --clean
-EOF
-    return 0
-}
-
-options=$(getopt -o hp:n:c -l help,path:,rootfs:,name:,clean -- "$@")
-if [ $? -ne 0 ]; then
-    usage $(basename $0)
-    exit 1
-fi
-eval set -- "$options"
-
-while true
-do
-    case "$1" in
-	-h|--help)      usage $0 && exit 0;;
-	-p|--path)      path=$2; shift 2;;
-	-n|--name)      name=$2; shift 2;;
-	-c|--clean)     clean=$2; shift 2;;
-	--)             shift 1; break ;;
-        *)              break ;;
-    esac
-done
-
-if [ ! -z "$clean" -a -z "$path" ]; then
-    clean || exit 1
-    exit 0
-fi
-
-type netmask
-if [ $? -ne 0 ]; then
-    echo "'netmask' command is missing"
-    exit 1
-fi
-
-type rinse
-if [ $? -ne 0 ]; then
-    echo "'rinse' command is missing"
-    exit 1
-fi
-
-if [ -z "$path" ]; then
-    echo "'path' parameter is required"
-    exit 1
-fi
-
-if [ "$(id -u)" != "0" ]; then
-    echo "This script should be run as 'root'"
-    exit 1
-fi
-
-rootfs=$path/rootfs
-oldhostkeydir=/var/lib/lxc/ssh
-hostkeydir=/var/cache/lxc/ssh
-macdir=/var/cache/lxc/mac
-if [ -e $oldhostkeydir ]
-then
-    if [ ! -e $hostkeydir ]
-    then
-        mv $oldhostkeydir $hostkeydir
-    fi
-fi
-if [ ! -e $hostkeydir ]
-then
-    mkdir -p $hostkeydir
-fi
-if [ ! -e $macdir ]
-then
-    mkdir -p $macdir
-fi
-
-install_centos $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to install centos"
-    exit 1
-fi
-
-configure_centos $path $rootfs $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure centos for a container"
-    exit 1
-fi
-
-copy_configuration $path $rootfs $name $macdir
-if [ $? -ne 0 ]; then
-    echo "failed write configuration file"
-    exit 1
-fi
-
-configure_pubkey $path $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to configure pubkey"
-    exit 1
-fi
-
-configure_hostkeydir $rootfs $hostkeydir $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure hostkeydir"
-    exit 1
-fi
-
-if [ ! -z $clean ]; then
-    clean || exit 1
-    exit 0
-fi
diff --git a/tests/buildbot/lxc/lxc-centos6 b/tests/buildbot/lxc/lxc-centos6
deleted file mode 100755
index 41bf800..0000000
--- a/tests/buildbot/lxc/lxc-centos6
+++ /dev/null
@@ -1,569 +0,0 @@
-#!/bin/bash
-
-#
-# template script for generating centos container for LXC
-#
-
-#
-# lxc: linux Container library
-
-# Authors:
-# Daniel Lezcano <daniel.lezcano at free.fr>
-# Christian Bayle <bayle at debian.org>
-
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-DISTRO=centos-6
-
-configure_centos()
-{
-    path=$1
-    rootfs=$2
-    hostname=$3
-
-    # disable selinux in centos
-    mkdir -p $rootfs/selinux
-    echo 0 > $rootfs/selinux/enforce
-
-    # configure localhost
-    if ! grep -q "^127.0.0.1" $rootfs/etc/hosts
-    then
-	cat <<EOF >> $rootfs/etc/hosts
-# Do not remove the following line, or various programs
-# that require network functionality will fail.
-127.0.0.1       localhost.localdomain localhost
-::1             localhost6.localdomain6 localhost6
-EOF
-    fi
-    if ! grep -q "^::1" $rootfs/etc/hosts
-    then
-	cat <<EOF >> $rootfs/etc/hosts
-::1             localhost6.localdomain6 localhost6
-EOF
-    fi
-
-    if grep -q ^lxc.network.ipv4 $path/config
-    then
-        # configure static network
-        lxc_network_ipv4=`grep ^lxc.network.ipv4 $path/config | cut -d= -f2`
-        address=`echo $lxc_network_ipv4 | cut -d/ -f1`
-	netmask=`netmask -s $lxc_network_ipv4 | cut -d/ -f2`
-        if [ -e $rootfs/etc/sysconfig/network-scripts ]
-        then
-                cat <<EOF > $rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
-DEVICE=eth0
-IPADDR=$address
-NETMASK=$netmask
-#NETWORK=
-#BROADCAST=
-ONBOOT=yes
-BOOTPROTO=none
-USERCTL=no
-EOF
-                cat <<EOF > $rootfs/etc/sysconfig/network
-NETWORKING=yes
-FORWARD_IPV4=yes
-HOSTNAME=$hostname
-#GATEWAY=
-GATEWAYDEV=eth0
-EOF
-                cat <<EOF >> $rootfs/etc/hosts
-$address        $hostname
-EOF
-                echo "Network configured with static ip"
-        else
-                exit 2
-        fi
-        
-    else
-        # configure the network using the dhcp
-        if [ -e $rootfs/etc/sysconfig/network-scripts ]
-        then
-                cat <<EOF > $rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
-DEVICE=eth0
-ONBOOT=yes
-BOOTPROTO=dhcp
-USERCTL=no
-EOF
-                cat <<EOF > $rootfs/etc/sysconfig/network
-NETWORKING=yes
-FORWARD_IPV4=yes
-HOSTNAME=$hostname
-GATEWAYDEV=eth0
-EOF
-                cat <<EOF >> $rootfs/etc/hosts
-127.0.1.1       $hostname
-EOF
-                echo "Network configured with dhcp"
-        else
-                exit 3
-        fi
-        # When domain is not local, avahi completed by send hostname
-        hostnamebase=`echo $hostname | cut -d. -f1`
-        if [ "$hostnamebase.local" != "$hostname" ]
-        then
-                cat <<EOF > $rootfs/etc/dhclient.conf
-send host-name "$hostnamebase";
-EOF
-        fi
-    fi
-
-    cat <<EOF > $rootfs/etc/init/console.conf
-# console - getty
-#
-# This service maintains a console on tty1 from the point the system is
-# started until it is shut down again.
-
-start on stopped rc RUNLEVEL=[2345]
-stop on runlevel [!2345]
-
-initctl start tty TTY=console
-EOF
-
-cat <<EOF > $rootfs/etc/fstab
-# NOT MOUNTING IN LXC
-#none /dev/pts devpts defaults 0 0
-#none /proc    proc   nodev,noexec,nosuid 0 0
-#none /sys     sysfs  defaults 0 0
-#none /dev/shm tmpfs  defaults 0 0
-EOF
-
-[ ! -f $rootfs/etc/init/kexec-disable.conf ] || mv $rootfs/etc/init/kexec-disable.conf $rootfs/etc/init/kexec-disable.conf.orig
-
-    echo "Please change root-password !"
-    echo "root:root" | chroot $rootfs chpasswd
-
-sed -i -e 's:/sbin/start_udev:#/sbin/start_udev:' $rootfs/etc/rc.d/rc.sysinit
-#CB# remove lines acting on /dev/pts
-sed -i -e 's:\(.*/dev/pts.*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-#CB# remove lines acting on /dev/shm
-sed -i -e 's:\(.*/dev/shm*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-#CB# remove / proc and sys mounts
-sed -i -e 's:\(.*mount -f /.*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-sed -i -e 's:\(.*mount -f /proc.*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-sed -i -e 's:\(.*mount -f /sys*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-
-    # fix avahi
-    if [ -f $rootfs/etc/init.d/avahi-daemon ]
-    then
-	echo 'Fix avahi'
-        sed -i -e "s!-D!-D --no-rlimits!" $rootfs/etc/init.d/avahi-daemon
-    fi
-
-mv $rootfs/dev $rootfs/dev.old
-mkdir -p $rootfs/dev
-test -e $rootfs/dev/null    || mknod -m 666 $rootfs/dev/null c 1 3
-test -e $rootfs/dev/zero    || mknod -m 666 $rootfs/dev/zero c 1 5
-test -e $rootfs/dev/random  || mknod -m 666 $rootfs/dev/random c 1 8
-test -e $rootfs/dev/urandom || mknod -m 666 $rootfs/dev/urandom c 1 9
-test -e $rootfs/dev/pts     || mkdir -m 755 $rootfs/dev/pts
-test -e $rootfs/dev/shm     || mkdir -m 1777 $rootfs/dev/shm
-test -e $rootfs/dev/tty     || mknod -m 666 $rootfs/dev/tty c 5 0
-test -e $rootfs/dev/console || mknod -m 600 $rootfs/dev/console c 5 1
-test -e $rootfs/dev/tty0    || mknod -m 666 $rootfs/dev/tty0 c 4 0
-test -e $rootfs/dev/full    || mknod -m 666 $rootfs/dev/full c 1 7
-test -e $rootfs/dev/initctl || mknod -m 600 $rootfs/dev/initctl p
-test -e $rootfs/dev/ptmx    || mknod -m 666 $rootfs/dev/ptmx c 5 2
-
-test -e $rootfs/dev/tty1 || mknod -m 666 $rootfs/dev/tty1 c 4 1
-test -e $rootfs/dev/tty2 || mknod -m 666 $rootfs/dev/tty2 c 4 2
-test -e $rootfs/dev/tty3 || mknod -m 666 $rootfs/dev/tty3 c 4 3
-test -e $rootfs/dev/tty4 || mknod -m 666 $rootfs/dev/tty4 c 4 4
-test -e $rootfs/dev/tty5 || mknod -m 666 $rootfs/dev/tty5 c 4 5
-test -e $rootfs/dev/tty6 || mknod -m 666 $rootfs/dev/tty6 c 4 6
-
-    return 0
-}
-
-configure_pubkey(){
-	path=$1
-	rootfs=$2
-        if grep -q ^\#lxc.pubkey $path/config
-        then
-		pubkey=`grep ^\#lxc.pubkey $path/config | cut -d= -f2`
-	fi
-	if [ ! -e $rootfs/root/.ssh ]
-	then
-		mkdir $rootfs/root/.ssh
-	fi
-	if [ ! -z "$pubkey" ]
-	then
-		echo "Copying $pubkey -> $rootfs/root/.ssh/authorized_keys"
-		cp $pubkey $rootfs/root/.ssh/authorized_keys
-	fi
-}
-
-configure_hostkeydir(){
-	rootfs=$1
-	hostkeydir=$2
-	name=$3
-	if [ $# -ne 3 ]
-	then
-		exit 1
-	else
-		[ -d $rootfs/etc/ssh ] || mkdir -p $rootfs/etc/ssh
-		if [ -e $hostkeydir ]
-		then 
-			if [ ! -d $hostkeydir/$name ]
-			then
-				mkdir $hostkeydir/$name
-				echo "Creating SSH2 RSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_rsa_key -N '' -t rsa
-				echo "Creating SSH2 DSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_dsa_key -N '' -t dsa
-			fi
-			cp $hostkeydir/$name/ssh_host_* $rootfs/etc/ssh/
-		fi
-	fi
-}
-
-download_centos()
-{
-    cache=$1
-    arch=$2
-
-    # check the mini centos was not already downloaded
-    mkdir -p "$cache/partial-$arch"
-    if [ $? -ne 0 ]; then
-	echo "Failed to create '$cache/partial-$arch' directory"
-	return 1
-    fi
-
-    # download a mini centos into a cache
-    echo "Downloading centos minimal ..."
-    #febootstrap $DISTRO $cache/partial-$arch
-    rinsearch=`dpkg-architecture -qDEB_BUILD_ARCH`
-    pkglist="plymouth policycoreutils openssh-server man zsh bind-utils openssh-clients php wget rsync avahi php-pear php-dom java-1.6.0-openjdk xorg-x11-xauth firefox make rpm-build createrepo tigervnc-server crypto-utils"
-
-    cat <<EOF > /var/cache/rinse/$DISTRO-$arch.before_post_install
-echo "Rinse defines mirror=\$mirror in config"
-server=\`echo \$mirror | cut -d/ -f3\`
-echo "Disable mirrorlists"
-sed -i -e "s/^mirrorlist=/#mirrorlist=/" $cache/partial-$arch/etc/yum.repos.d/CentOS-Base.repo
-echo "Setup baseurl on server \$server"
-sed -i -e "s!#baseurl=http://mirror.centos.org!baseurl=http://\$server!" $cache/partial-$arch/etc/yum.repos.d/CentOS-Base.repo
-rm -f $cache/partial-$arch/etc/mtab
-ln -s /proc/mounts $cache/partial-$arch/etc/mtab
-
-mkdir -p $cache/partial-$arch/dev
-test -e $cache/partial-$arch/dev/null    || mknod -m 666 $cache/partial-$arch/dev/null c 1 3
-test -e $cache/partial-$arch/dev/zero    || mknod -m 666 $cache/partial-$arch/dev/zero c 1 5
-test -e $cache/partial-$arch/dev/random  || mknod -m 666 $cache/partial-$arch/dev/random c 1 8
-test -e $cache/partial-$arch/dev/urandom || mknod -m 666 $cache/partial-$arch/dev/urandom c 1 9
-test -e $cache/partial-$arch/dev/pts     || mkdir -m 755 $cache/partial-$arch/dev/pts
-test -e $cache/partial-$arch/dev/shm     || mkdir -m 1777 $cache/partial-$arch/dev/shm
-test -e $cache/partial-$arch/dev/tty     || mknod -m 666 $cache/partial-$arch/dev/tty c 5 0
-test -e $cache/partial-$arch/dev/console || mknod -m 600 $cache/partial-$arch/dev/console c 5 1
-test -e $cache/partial-$arch/dev/tty0    || mknod -m 666 $cache/partial-$arch/dev/tty0 c 4 0
-test -e $cache/partial-$arch/dev/full    || mknod -m 666 $cache/partial-$arch/dev/full c 1 7
-test -e $cache/partial-$arch/dev/initctl || mknod -m 600 $cache/partial-$arch/dev/initctl p
-test -e $cache/partial-$arch/dev/ptmx    || mknod -m 666 $cache/partial-$arch/dev/ptmx c 5 2
-
-test -e $cache/partial-$arch/dev/tty1    || mknod -m 666 $cache/partial-$arch/dev/tty1 c 4 1
-test -e $cache/partial-$arch/dev/tty2    || mknod -m 666 $cache/partial-$arch/dev/tty2 c 4 2
-test -e $cache/partial-$arch/dev/tty3    || mknod -m 666 $cache/partial-$arch/dev/tty3 c 4 3
-test -e $cache/partial-$arch/dev/tty4    || mknod -m 666 $cache/partial-$arch/dev/tty4 c 4 4
-test -e $cache/partial-$arch/dev/tty5    || mknod -m 666 $cache/partial-$arch/dev/tty5 c 4 5
-test -e $cache/partial-$arch/dev/tty6    || mknod -m 666 $cache/partial-$arch/dev/tty6 c 4 6
-EOF
-    chmod 755 /var/cache/rinse/$DISTRO-$arch.before_post_install
-
-    cat <<EOF > /var/cache/rinse/$DISTRO-$arch.after_post_install
-# CREATE FSTAB IF NOT EXISTS
-touch /etc/fstab
-# MOUNT PROC
-echo "Mount /proc"
-chroot $cache/partial-$arch /bin/mount proc /proc -t proc
-# INSTALL PACKAGES
-echo "Install $pkglist"
-chroot $cache/partial-$arch /usr/bin/yum -y install $pkglist
-EOF
-
-    cat <<EOF >> /var/cache/rinse/$DISTRO-$arch.after_post_install
-# UMOUNT PROC
-echo "Umount /proc"
-chroot $cache/partial-$arch /bin/umount /proc
-EOF
-    chmod 755 /var/cache/rinse/$DISTRO-$arch.after_post_install
-
-    rinse --config /etc/rinse/rinse.conf \
-	--arch $rinsearch \
-	--distribution $DISTRO \
-	--before-post-install /var/cache/rinse/$DISTRO-$arch.before_post_install  \
-	--after-post-install /var/cache/rinse/$DISTRO-$arch.after_post_install \
-	--directory $cache/partial-$arch
-    
-    if [ $? -ne 0 ]; then
-	echo "Failed to download the rootfs, aborting."
-	return 1
-    fi
-
-    mv "$1/partial-$arch" "$1/rootfs-$arch"
-    echo "Download complete."
-
-    return 0
-}
-
-copy_centos()
-{
-    cache=$1
-    arch=$2
-    rootfs=$3
-
-    # make a local copy of the minicentos
-    echo -n "Copying rootfs to $rootfs ..."
-    [ -d $rootfs ] && rmdir $rootfs
-    cp --reflink=auto -a $cache/rootfs-$arch $rootfs || return 1
-    return 0
-}
-
-install_centos()
-{
-    cache="/var/cache/lxc/$DISTRO"
-    rootfs=$1
-    mkdir -p /var/lock/subsys/
-    (
-	flock -n -x 200
-	if [ $? -ne 0 ]; then
-	    echo "Cache repository is busy."
-	    return 1
-	fi
-
-	arch=$(arch)
-
-	echo "Checking cache download in $cache/rootfs-$arch ... "
-	if [ ! -e "$cache/rootfs-$arch" ]; then
-	    download_centos $cache $arch
-	    if [ $? -ne 0 ]; then
-		echo "Failed to download 'centos base'"
-		return 1
-	    fi
-	fi
-
-	echo "Copy $cache/rootfs-$arch to $rootfs ... "
-	copy_centos $cache $arch $rootfs
-	if [ $? -ne 0 ]; then
-	    echo "Failed to copy rootfs"
-	    return 1
-	fi
-
-	return 0
-
-	) 200>/var/lock/subsys/lxc
-
-    return $?
-}
-
-gen_mac()
-{
-	dd if=/dev/urandom bs=1 count=3 2>/dev/null | od -tx1 | head -1 | cut -d' ' -f2- | awk '{ print "00:16:3e:"$1":"$2":"$3 }'
-}
-
-copy_configuration()
-{
-    path=$1
-    rootfs=$2
-    name=$3
-    macdir=$4
-    
-    if [ ! -e "$macdir/$name" ]
-    then
-	gen_mac > $macdir/$name
-    fi
-    macaddr=`cat $macdir/$name`
-
-    cat <<EOF >> $path/config
-lxc.network.hwaddr = $macaddr
-# lxc.utsname = $name
-
-lxc.tty = 6
-lxc.pts = 1024
-lxc.rootfs = $rootfs
-lxc.cgroup.devices.deny = a
-# /dev/null and zero
-lxc.cgroup.devices.allow = c 1:3 rwm
-lxc.cgroup.devices.allow = c 1:5 rwm
-# /dev/full
-lxc.cgroup.devices.allow = c 1:7 rwm
-# consoles
-lxc.cgroup.devices.allow = c 5:1 rwm
-lxc.cgroup.devices.allow = c 5:0 rwm
-lxc.cgroup.devices.allow = c 4:0 rwm
-lxc.cgroup.devices.allow = c 4:1 rwm
-lxc.cgroup.devices.allow = c 4:2 rwm
-lxc.cgroup.devices.allow = c 4:3 rwm
-lxc.cgroup.devices.allow = c 4:4 rwm
-lxc.cgroup.devices.allow = c 4:5 rwm
-lxc.cgroup.devices.allow = c 4:6 rwm
-# /dev/{,u}random
-lxc.cgroup.devices.allow = c 1:9 rwm
-lxc.cgroup.devices.allow = c 1:8 rwm
-lxc.cgroup.devices.allow = c 136:* rwm
-lxc.cgroup.devices.allow = c 5:2 rwm
-# rtc
-lxc.cgroup.devices.allow = c 254:0 rwm
-
-# mounts point
-lxc.mount.entry=proc $rootfs/proc proc nodev,noexec,nosuid 0 0
-lxc.mount.entry=devpts $rootfs/dev/pts devpts defaults 0 0
-lxc.mount.entry=sysfs $rootfs/sys sysfs defaults  0 0
-EOF
-
-    cat <<EOF > $path/fstab
-#proc            $rootfs/proc         proc    nodev,noexec,nosuid 0 0
-#devpts          $rootfs/dev/pts      devpts defaults 0 0
-#sysfs           $rootfs/sys          sysfs defaults  0 0
-#tmpfs           $rootfs/dev/shm      tmpfs defaults 0 0
-EOF
-
-    if [ $? -ne 0 ]; then
-	echo "Failed to add configuration"
-	return 1
-    fi
-
-    return 0
-}
-
-clean()
-{
-    cache="/var/cache/lxc/$DISTRO"
-
-    if [ ! -e $cache ]; then
-	exit 0
-    fi
-
-    # lock, so we won't purge while someone is creating a repository
-    (
-	flock -n -x 200
-	if [ $? != 0 ]; then
-	    echo "Cache repository is busy."
-	    exit 1
-	fi
-
-	echo -n "Purging the download cache..."
-	rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1
-	exit 0
-
-    ) 200>/var/lock/subsys/lxc
-}
-
-usage()
-{
-    cat <<EOF
-$1 -h|--help -p|--path=<path> --clean
-EOF
-    return 0
-}
-
-options=$(getopt -o hp:n:c -l help,path:,rootfs:,name:,clean -- "$@")
-if [ $? -ne 0 ]; then
-    usage $(basename $0)
-    exit 1
-fi
-eval set -- "$options"
-
-while true
-do
-    case "$1" in
-	-h|--help)      usage $0 && exit 0;;
-	-p|--path)      path=$2; shift 2;;
-	-n|--name)      name=$2; shift 2;;
-	-c|--clean)     clean=$2; shift 2;;
-	--)             shift 1; break ;;
-        *)              break ;;
-    esac
-done
-
-if [ ! -z "$clean" -a -z "$path" ]; then
-    clean || exit 1
-    exit 0
-fi
-
-type netmask
-if [ $? -ne 0 ]; then
-    echo "'netmask' command is missing"
-    exit 1
-fi
-
-type rinse
-if [ $? -ne 0 ]; then
-    echo "'rinse' command is missing"
-    exit 1
-fi
-
-if [ -z "$path" ]; then
-    echo "'path' parameter is required"
-    exit 1
-fi
-
-if [ "$(id -u)" != "0" ]; then
-    echo "This script should be run as 'root'"
-    exit 1
-fi
-
-rootfs=$path/rootfs
-oldhostkeydir=/var/lib/lxc/ssh
-hostkeydir=/var/cache/lxc/ssh
-macdir=/var/cache/lxc/mac
-if [ -e $oldhostkeydir ]
-then
-    if [ ! -e $hostkeydir ]
-    then
-        mv $oldhostkeydir $hostkeydir
-    fi
-fi
-if [ ! -e $hostkeydir ]
-then
-    mkdir -p $hostkeydir
-fi
-if [ ! -e $macdir ]
-then
-    mkdir -p $macdir
-fi
-
-install_centos $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to install centos"
-    exit 1
-fi
-
-configure_centos $path $rootfs $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure centos for a container"
-    exit 1
-fi
-
-copy_configuration $path $rootfs $name $macdir
-if [ $? -ne 0 ]; then
-    echo "failed write configuration file"
-    exit 1
-fi
-
-configure_pubkey $path $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to configure pubkey"
-    exit 1
-fi
-
-configure_hostkeydir $rootfs $hostkeydir $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure hostkeydir"
-    exit 1
-fi
-
-if [ ! -z $clean ]; then
-    clean || exit 1
-    exit 0
-fi
diff --git a/tests/buildbot/lxc/lxc-centos7 b/tests/buildbot/lxc/lxc-centos7
deleted file mode 100644
index 003d428..0000000
--- a/tests/buildbot/lxc/lxc-centos7
+++ /dev/null
@@ -1,571 +0,0 @@
-#!/bin/bash
-
-#
-# template script for generating centos container for LXC
-#
-
-#
-# lxc: linux Container library
-
-# Authors:
-# Daniel Lezcano <daniel.lezcano at free.fr>
-# Christian Bayle <bayle at debian.org>
-
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-DISTRO=centos-7
-
-configure_centos()
-{
-    path=$1
-    rootfs=$2
-    hostname=$3
-
-    # disable selinux in centos
-    mkdir -p $rootfs/selinux
-    echo 0 > $rootfs/selinux/enforce
-
-    # configure localhost
-    if ! grep -q "^127.0.0.1" $rootfs/etc/hosts
-    then
-	cat <<EOF >> $rootfs/etc/hosts
-# Do not remove the following line, or various programs
-# that require network functionality will fail.
-127.0.0.1       localhost.localdomain localhost
-::1             localhost6.localdomain6 localhost6
-EOF
-    fi
-    if ! grep -q "^::1" $rootfs/etc/hosts
-    then
-	cat <<EOF >> $rootfs/etc/hosts
-::1             localhost6.localdomain6 localhost6
-EOF
-    fi
-
-    if grep -q ^lxc.network.ipv4 $path/config
-    then
-        # configure static network
-        lxc_network_ipv4=`grep ^lxc.network.ipv4 $path/config | cut -d= -f2`
-        address=`echo $lxc_network_ipv4 | cut -d/ -f1`
-	netmask=`netmask -s $lxc_network_ipv4 | cut -d/ -f2`
-        if [ -e $rootfs/etc/sysconfig/network-scripts ]
-        then
-                cat <<EOF > $rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
-DEVICE=eth0
-IPADDR=$address
-NETMASK=$netmask
-#NETWORK=
-#BROADCAST=
-ONBOOT=yes
-BOOTPROTO=none
-USERCTL=no
-EOF
-                cat <<EOF > $rootfs/etc/sysconfig/network
-NETWORKING=yes
-FORWARD_IPV4=yes
-HOSTNAME=$hostname
-#GATEWAY=
-GATEWAYDEV=eth0
-EOF
-                cat <<EOF >> $rootfs/etc/hosts
-$address        $hostname
-EOF
-                echo "Network configured with static ip"
-        else
-                exit 2
-        fi
-        
-    else
-        # configure the network using the dhcp
-        if [ -e $rootfs/etc/sysconfig/network-scripts ]
-        then
-                cat <<EOF > $rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
-DEVICE=eth0
-ONBOOT=yes
-BOOTPROTO=dhcp
-USERCTL=no
-EOF
-                cat <<EOF > $rootfs/etc/sysconfig/network
-NETWORKING=yes
-FORWARD_IPV4=yes
-HOSTNAME=$hostname
-GATEWAYDEV=eth0
-EOF
-                cat <<EOF >> $rootfs/etc/hosts
-127.0.1.1       $hostname
-EOF
-                echo "Network configured with dhcp"
-        else
-                exit 3
-        fi
-        # When domain is not local, avahi completed by send hostname
-        hostnamebase=`echo $hostname | cut -d. -f1`
-        if [ "$hostnamebase.local" != "$hostname" ]
-        then
-                cat <<EOF > $rootfs/etc/dhclient.conf
-send host-name "$hostnamebase";
-EOF
-        fi
-    fi
-
-    cat <<EOF > $rootfs/etc/init/console.conf
-# console - getty
-#
-# This service maintains a console on tty1 from the point the system is
-# started until it is shut down again.
-
-start on stopped rc RUNLEVEL=[2345]
-stop on runlevel [!2345]
-
-initctl start tty TTY=console
-EOF
-
-cat <<EOF > $rootfs/etc/fstab
-# NOT MOUNTING IN LXC
-#none /dev/pts devpts defaults 0 0
-#none /proc    proc   nodev,noexec,nosuid 0 0
-#none /sys     sysfs  defaults 0 0
-#none /dev/shm tmpfs  defaults 0 0
-EOF
-
-[ ! -f $rootfs/etc/init/kexec-disable.conf ] || mv $rootfs/etc/init/kexec-disable.conf $rootfs/etc/init/kexec-disable.conf.orig
-
-    echo "Please change root-password !"
-    echo "root:root" | chroot $rootfs chpasswd
-
-sed -i -e 's:/sbin/start_udev:#/sbin/start_udev:' $rootfs/etc/rc.d/rc.sysinit
-#CB# remove lines acting on /dev/pts
-sed -i -e 's:\(.*/dev/pts.*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-#CB# remove lines acting on /dev/shm
-sed -i -e 's:\(.*/dev/shm*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-#CB# remove / proc and sys mounts
-sed -i -e 's:\(.*mount -f /.*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-sed -i -e 's:\(.*mount -f /proc.*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-sed -i -e 's:\(.*mount -f /sys*\):#\1:' $rootfs/etc/rc.d/rc.sysinit 
-
-    # fix avahi
-    if [ -f $rootfs/etc/init.d/avahi-daemon ]
-    then
-	echo 'Fix avahi'
-        sed -i -e "s!-D!-D --no-rlimits!" $rootfs/etc/init.d/avahi-daemon
-    fi
-
-mv $rootfs/dev $rootfs/dev.old
-mkdir -p $rootfs/dev
-test -e $rootfs/dev/null    || mknod -m 666 $rootfs/dev/null c 1 3
-test -e $rootfs/dev/zero    || mknod -m 666 $rootfs/dev/zero c 1 5
-test -e $rootfs/dev/random  || mknod -m 666 $rootfs/dev/random c 1 8
-test -e $rootfs/dev/urandom || mknod -m 666 $rootfs/dev/urandom c 1 9
-test -e $rootfs/dev/pts     || mkdir -m 755 $rootfs/dev/pts
-test -e $rootfs/dev/shm     || mkdir -m 1777 $rootfs/dev/shm
-test -e $rootfs/dev/tty     || mknod -m 666 $rootfs/dev/tty c 5 0
-test -e $rootfs/dev/console || mknod -m 600 $rootfs/dev/console c 5 1
-test -e $rootfs/dev/tty0    || mknod -m 666 $rootfs/dev/tty0 c 4 0
-test -e $rootfs/dev/full    || mknod -m 666 $rootfs/dev/full c 1 7
-test -e $rootfs/dev/initctl || mknod -m 600 $rootfs/dev/initctl p
-test -e $rootfs/dev/ptmx    || mknod -m 666 $rootfs/dev/ptmx c 5 2
-
-test -e $rootfs/dev/tty1 || mknod -m 666 $rootfs/dev/tty1 c 4 1
-test -e $rootfs/dev/tty2 || mknod -m 666 $rootfs/dev/tty2 c 4 2
-test -e $rootfs/dev/tty3 || mknod -m 666 $rootfs/dev/tty3 c 4 3
-test -e $rootfs/dev/tty4 || mknod -m 666 $rootfs/dev/tty4 c 4 4
-test -e $rootfs/dev/tty5 || mknod -m 666 $rootfs/dev/tty5 c 4 5
-test -e $rootfs/dev/tty6 || mknod -m 666 $rootfs/dev/tty6 c 4 6
-
-    return 0
-}
-
-configure_pubkey(){
-	path=$1
-	rootfs=$2
-        if grep -q ^\#lxc.pubkey $path/config
-        then
-		pubkey=`grep ^\#lxc.pubkey $path/config | cut -d= -f2`
-	fi
-	if [ ! -e $rootfs/root/.ssh ]
-	then
-		mkdir $rootfs/root/.ssh
-	fi
-	if [ ! -z "$pubkey" ]
-	then
-		echo "Copying $pubkey -> $rootfs/root/.ssh/authorized_keys"
-		cp $pubkey $rootfs/root/.ssh/authorized_keys
-	fi
-}
-
-configure_hostkeydir(){
-	rootfs=$1
-	hostkeydir=$2
-	name=$3
-	if [ $# -ne 3 ]
-	then
-		exit 1
-	else
-		[ -d $rootfs/etc/ssh ] || mkdir -p $rootfs/etc/ssh
-		if [ -e $hostkeydir ]
-		then 
-			if [ ! -d $hostkeydir/$name ]
-			then
-				mkdir $hostkeydir/$name
-				echo "Creating SSH2 RSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_rsa_key -N '' -t rsa
-				echo "Creating SSH2 DSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_dsa_key -N '' -t dsa
-			fi
-			cp $hostkeydir/$name/ssh_host_* $rootfs/etc/ssh/
-		fi
-	fi
-}
-
-download_centos()
-{
-    cache=$1
-    arch=$2
-
-    # check the mini centos was not already downloaded
-    mkdir -p "$cache/partial-$arch"
-    if [ $? -ne 0 ]; then
-	echo "Failed to create '$cache/partial-$arch' directory"
-	return 1
-    fi
-
-    # download a mini centos into a cache
-    echo "Downloading centos minimal ..."
-    #febootstrap $DISTRO $cache/partial-$arch
-    rinsearch=`dpkg-architecture -qDEB_BUILD_ARCH`
-    pkglist="plymouth policycoreutils openssh-server man zsh bind-utils openssh-clients php wget rsync avahi php-pear php-dom java-1.6.0-openjdk xorg-x11-xauth firefox make rpm-build createrepo tigervnc-server crypto-utils"
-
-    cat <<EOF > /var/cache/rinse/$DISTRO-$arch.before_post_install
-echo "Rinse defines mirror=\$mirror in config"
-server=\`echo \$mirror | cut -d/ -f3\`
-echo "Disable mirrorlists"
-sed -i -e "s/^mirrorlist=/#mirrorlist=/" $cache/partial-$arch/etc/yum.repos.d/CentOS-Base.repo
-echo "Setup baseurl on server \$server"
-sed -i -e "s!#baseurl=http://mirror.centos.org!baseurl=http://\$server!" $cache/partial-$arch/etc/yum.repos.d/CentOS-Base.repo
-rm -f $cache/partial-$arch/etc/mtab
-ln -s /proc/mounts $cache/partial-$arch/etc/mtab
-
-mkdir -p $cache/partial-$arch/dev
-test -e $cache/partial-$arch/dev/null    || mknod -m 666 $cache/partial-$arch/dev/null c 1 3
-test -e $cache/partial-$arch/dev/zero    || mknod -m 666 $cache/partial-$arch/dev/zero c 1 5
-test -e $cache/partial-$arch/dev/random  || mknod -m 666 $cache/partial-$arch/dev/random c 1 8
-test -e $cache/partial-$arch/dev/urandom || mknod -m 666 $cache/partial-$arch/dev/urandom c 1 9
-test -e $cache/partial-$arch/dev/pts     || mkdir -m 755 $cache/partial-$arch/dev/pts
-test -e $cache/partial-$arch/dev/shm     || mkdir -m 1777 $cache/partial-$arch/dev/shm
-test -e $cache/partial-$arch/dev/tty     || mknod -m 666 $cache/partial-$arch/dev/tty c 5 0
-test -e $cache/partial-$arch/dev/console || mknod -m 600 $cache/partial-$arch/dev/console c 5 1
-test -e $cache/partial-$arch/dev/tty0    || mknod -m 666 $cache/partial-$arch/dev/tty0 c 4 0
-test -e $cache/partial-$arch/dev/full    || mknod -m 666 $cache/partial-$arch/dev/full c 1 7
-test -e $cache/partial-$arch/dev/initctl || mknod -m 600 $cache/partial-$arch/dev/initctl p
-test -e $cache/partial-$arch/dev/ptmx    || mknod -m 666 $cache/partial-$arch/dev/ptmx c 5 2
-
-test -e $cache/partial-$arch/dev/tty1    || mknod -m 666 $cache/partial-$arch/dev/tty1 c 4 1
-test -e $cache/partial-$arch/dev/tty2    || mknod -m 666 $cache/partial-$arch/dev/tty2 c 4 2
-test -e $cache/partial-$arch/dev/tty3    || mknod -m 666 $cache/partial-$arch/dev/tty3 c 4 3
-test -e $cache/partial-$arch/dev/tty4    || mknod -m 666 $cache/partial-$arch/dev/tty4 c 4 4
-test -e $cache/partial-$arch/dev/tty5    || mknod -m 666 $cache/partial-$arch/dev/tty5 c 4 5
-test -e $cache/partial-$arch/dev/tty6    || mknod -m 666 $cache/partial-$arch/dev/tty6 c 4 6
-EOF
-    chmod 755 /var/cache/rinse/$DISTRO-$arch.before_post_install
-
-    cat <<EOF > /var/cache/rinse/$DISTRO-$arch.after_post_install
-# CREATE FSTAB IF NOT EXISTS
-touch /etc/fstab
-# MOUNT PROC
-echo "Mount /proc"
-mount --bind /proc $cache/partial-$arch/proc
-# INSTALL PACKAGES
-echo "Install $pkglist"
-chroot $cache/partial-$arch /usr/bin/yum -y install $pkglist
-EOF
-
-    cat <<EOF >> /var/cache/rinse/$DISTRO-$arch.after_post_install
-# UMOUNT PROC
-echo "Umount /proc"
-umount $cache/partial-$arch/proc
-EOF
-    chmod 755 /var/cache/rinse/$DISTRO-$arch.after_post_install
-
-    rinse --config /etc/rinse/rinse.conf \
-	--arch $rinsearch \
-	--distribution $DISTRO \
-	--before-post-install /var/cache/rinse/$DISTRO-$arch.before_post_install  \
-	--after-post-install /var/cache/rinse/$DISTRO-$arch.after_post_install \
-	--directory $cache/partial-$arch
-    
-    if [ $? -ne 0 ]; then
-	echo "Failed to download the rootfs, aborting."
-	return 1
-    fi
-
-    mv "$1/partial-$arch" "$1/rootfs-$arch"
-    echo "Download complete."
-
-    return 0
-}
-
-copy_centos()
-{
-    cache=$1
-    arch=$2
-    rootfs=$3
-
-    # make a local copy of the minicentos
-    echo -n "Copying rootfs to $rootfs ..."
-    [ -d $rootfs ] && rmdir $rootfs
-    umount $cache/rootfs-$arch/proc || true
-    umount $cache/rootfs-$arch/sys || true
-    cp --reflink=auto -a $cache/rootfs-$arch $rootfs || return 1
-    return 0
-}
-
-install_centos()
-{
-    cache="/var/cache/lxc/$DISTRO"
-    rootfs=$1
-    mkdir -p /var/lock/subsys/
-    (
-	flock -n -x 200
-	if [ $? -ne 0 ]; then
-	    echo "Cache repository is busy."
-	    return 1
-	fi
-
-	arch=$(arch)
-
-	echo "Checking cache download in $cache/rootfs-$arch ... "
-	if [ ! -e "$cache/rootfs-$arch" ]; then
-	    download_centos $cache $arch
-	    if [ $? -ne 0 ]; then
-		echo "Failed to download 'centos base'"
-		return 1
-	    fi
-	fi
-
-	echo "Copy $cache/rootfs-$arch to $rootfs ... "
-	copy_centos $cache $arch $rootfs
-	if [ $? -ne 0 ]; then
-	    echo "Failed to copy rootfs"
-	    return 1
-	fi
-
-	return 0
-
-	) 200>/var/lock/subsys/lxc
-
-    return $?
-}
-
-gen_mac()
-{
-	dd if=/dev/urandom bs=1 count=3 2>/dev/null | od -tx1 | head -1 | cut -d' ' -f2- | awk '{ print "00:16:3e:"$1":"$2":"$3 }'
-}
-
-copy_configuration()
-{
-    path=$1
-    rootfs=$2
-    name=$3
-    macdir=$4
-    
-    if [ ! -e "$macdir/$name" ]
-    then
-	gen_mac > $macdir/$name
-    fi
-    macaddr=`cat $macdir/$name`
-
-    cat <<EOF >> $path/config
-lxc.network.hwaddr = $macaddr
-# lxc.utsname = $name
-
-lxc.tty = 6
-lxc.pts = 1024
-lxc.rootfs = $rootfs
-lxc.cgroup.devices.deny = a
-# /dev/null and zero
-lxc.cgroup.devices.allow = c 1:3 rwm
-lxc.cgroup.devices.allow = c 1:5 rwm
-# /dev/full
-lxc.cgroup.devices.allow = c 1:7 rwm
-# consoles
-lxc.cgroup.devices.allow = c 5:1 rwm
-lxc.cgroup.devices.allow = c 5:0 rwm
-lxc.cgroup.devices.allow = c 4:0 rwm
-lxc.cgroup.devices.allow = c 4:1 rwm
-lxc.cgroup.devices.allow = c 4:2 rwm
-lxc.cgroup.devices.allow = c 4:3 rwm
-lxc.cgroup.devices.allow = c 4:4 rwm
-lxc.cgroup.devices.allow = c 4:5 rwm
-lxc.cgroup.devices.allow = c 4:6 rwm
-# /dev/{,u}random
-lxc.cgroup.devices.allow = c 1:9 rwm
-lxc.cgroup.devices.allow = c 1:8 rwm
-lxc.cgroup.devices.allow = c 136:* rwm
-lxc.cgroup.devices.allow = c 5:2 rwm
-# rtc
-lxc.cgroup.devices.allow = c 254:0 rwm
-
-# mounts point
-lxc.mount.entry=proc $rootfs/proc proc nodev,noexec,nosuid 0 0
-lxc.mount.entry=devpts $rootfs/dev/pts devpts defaults 0 0
-lxc.mount.entry=sysfs $rootfs/sys sysfs defaults  0 0
-EOF
-
-    cat <<EOF > $path/fstab
-#proc            $rootfs/proc         proc    nodev,noexec,nosuid 0 0
-#devpts          $rootfs/dev/pts      devpts defaults 0 0
-#sysfs           $rootfs/sys          sysfs defaults  0 0
-#tmpfs           $rootfs/dev/shm      tmpfs defaults 0 0
-EOF
-
-    if [ $? -ne 0 ]; then
-	echo "Failed to add configuration"
-	return 1
-    fi
-
-    return 0
-}
-
-clean()
-{
-    cache="/var/cache/lxc/$DISTRO"
-
-    if [ ! -e $cache ]; then
-	exit 0
-    fi
-
-    # lock, so we won't purge while someone is creating a repository
-    (
-	flock -n -x 200
-	if [ $? != 0 ]; then
-	    echo "Cache repository is busy."
-	    exit 1
-	fi
-
-	echo -n "Purging the download cache..."
-	rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1
-	exit 0
-
-    ) 200>/var/lock/subsys/lxc
-}
-
-usage()
-{
-    cat <<EOF
-$1 -h|--help -p|--path=<path> --clean
-EOF
-    return 0
-}
-
-options=$(getopt -o hp:n:c -l help,path:,rootfs:,name:,clean -- "$@")
-if [ $? -ne 0 ]; then
-    usage $(basename $0)
-    exit 1
-fi
-eval set -- "$options"
-
-while true
-do
-    case "$1" in
-	-h|--help)      usage $0 && exit 0;;
-	-p|--path)      path=$2; shift 2;;
-	-n|--name)      name=$2; shift 2;;
-	-c|--clean)     clean=$2; shift 2;;
-	--)             shift 1; break ;;
-        *)              break ;;
-    esac
-done
-
-if [ ! -z "$clean" -a -z "$path" ]; then
-    clean || exit 1
-    exit 0
-fi
-
-type netmask
-if [ $? -ne 0 ]; then
-    echo "'netmask' command is missing"
-    exit 1
-fi
-
-type rinse
-if [ $? -ne 0 ]; then
-    echo "'rinse' command is missing"
-    exit 1
-fi
-
-if [ -z "$path" ]; then
-    echo "'path' parameter is required"
-    exit 1
-fi
-
-if [ "$(id -u)" != "0" ]; then
-    echo "This script should be run as 'root'"
-    exit 1
-fi
-
-rootfs=$path/rootfs
-oldhostkeydir=/var/lib/lxc/ssh
-hostkeydir=/var/cache/lxc/ssh
-macdir=/var/cache/lxc/mac
-if [ -e $oldhostkeydir ]
-then
-    if [ ! -e $hostkeydir ]
-    then
-        mv $oldhostkeydir $hostkeydir
-    fi
-fi
-if [ ! -e $hostkeydir ]
-then
-    mkdir -p $hostkeydir
-fi
-if [ ! -e $macdir ]
-then
-    mkdir -p $macdir
-fi
-
-install_centos $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to install centos"
-    exit 1
-fi
-
-configure_centos $path $rootfs $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure centos for a container"
-    exit 1
-fi
-
-copy_configuration $path $rootfs $name $macdir
-if [ $? -ne 0 ]; then
-    echo "failed write configuration file"
-    exit 1
-fi
-
-configure_pubkey $path $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to configure pubkey"
-    exit 1
-fi
-
-configure_hostkeydir $rootfs $hostkeydir $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure hostkeydir"
-    exit 1
-fi
-
-if [ ! -z $clean ]; then
-    clean || exit 1
-    exit 0
-fi
diff --git a/tests/buildbot/lxc/lxc-debian6 b/tests/buildbot/lxc/lxc-debian6
deleted file mode 100755
index 851c55e..0000000
--- a/tests/buildbot/lxc/lxc-debian6
+++ /dev/null
@@ -1,484 +0,0 @@
-#!/bin/bash
-
-#
-# lxc: linux Container library
-
-# Authors:
-# Daniel Lezcano <daniel.lezcano at free.fr>
-
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-LANG=C
-SUITE=${SUITE:-squeeze}
-MIRROR=${MIRROR:-"http://cdn.debian.net/debian/"}
-
-configure_debian()
-{
-    rootfs=$1
-    hostname=$2
-
-    # Squeeze only has /dev/tty and /dev/tty0 by default,
-    # therefore creating missing device nodes for tty1-4.
-    test -e $rootfs/dev/tty1 || mknod $rootfs/dev/tty1 c 4 1
-    test -e $rootfs/dev/tty2 || mknod $rootfs/dev/tty2 c 4 2
-    test -e $rootfs/dev/tty3 || mknod $rootfs/dev/tty3 c 4 3
-    test -e $rootfs/dev/tty4 || mknod $rootfs/dev/tty4 c 4 4
-
-    # configure the inittab
-    cat <<EOF > $rootfs/etc/inittab
-id:3:initdefault:
-si::sysinit:/etc/init.d/rcS
-l0:0:wait:/etc/init.d/rc 0
-l1:1:wait:/etc/init.d/rc 1
-l2:2:wait:/etc/init.d/rc 2
-l3:3:wait:/etc/init.d/rc 3
-l4:4:wait:/etc/init.d/rc 4
-l5:5:wait:/etc/init.d/rc 5
-l6:6:wait:/etc/init.d/rc 6
-# Normally not reached, but fallthrough in case of emergency.
-z6:6:respawn:/sbin/sulogin
-1:2345:respawn:/sbin/getty 38400 console
-c1:12345:respawn:/sbin/getty 38400 tty1 linux
-c2:12345:respawn:/sbin/getty 38400 tty2 linux
-c3:12345:respawn:/sbin/getty 38400 tty3 linux
-c4:12345:respawn:/sbin/getty 38400 tty4 linux
-EOF
-
-    # disable selinux in debian
-    mkdir -p $rootfs/selinux
-    echo 0 > $rootfs/selinux/enforce
-
-    if grep -q ^lxc.network.ipv4 $path/config
-    then
-        # configure static network
-        lxc_network_ipv4=`grep ^lxc.network.ipv4 $path/config | cut -d= -f2`
-        address=`echo $lxc_network_ipv4 | cut -d/ -f1`
-        netmask=`netmask -s $lxc_network_ipv4 | cut -d/ -f2`
-	gateway=`grep ^\#lxc.network.ipv4.gw $path/config | cut -d= -f2`
-	if [ -e $rootfs/etc/network/interfaces ]
-	then
-		cat <<EOF > $rootfs/etc/network/interfaces
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet static
-	address $address
-	netmask $netmask
-EOF
-		if [ !  -z "$gateway" ]
-		then
-			cat <<EOF >> $rootfs/etc/network/interfaces
-	gateway $gateway
-EOF
-		fi
-		cat <<EOF >> $rootfs/etc/hosts
-$address	$hostname
-EOF
-		echo "Network configured with static ip"
-	else
-		exit 2
-	fi
-    else
-        # configure the network using the dhcp
-	if [ -e $rootfs/etc/network/interfaces ]
-	then
-                cat <<EOF > $rootfs/etc/network/interfaces
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet dhcp
-EOF
-		cat <<EOF >> $rootfs/etc/hosts
-127.0.1.1	$hostname
-EOF
-		echo "Network configured with dhcp"
-	else
-		exit 3
-	fi
-    fi
-    # When domain is not local, avahi completed by send hostname
-    hostnamebase=`echo $hostname | cut -d. -f1`
-    if [ "$hostnamebase.local" != "$hostname" ]
-        then
-            cat <<EOF >> $rootfs/etc/dhcp/dhclient.conf
-send host-name "$hostnamebase";
-EOF
-    fi
-
-    # set the hostname
-    cat <<EOF > $rootfs/etc/hostname
-$hostname
-EOF
-
-    # reconfigure some services
-    if [ -z "$LANG" ]; then
-	chroot $rootfs locale-gen en_US.UTF-8
-	chroot $rootfs update-locale LANG=en_US.UTF-8
-    else
-	chroot $rootfs locale-gen $LANG
-	chroot $rootfs update-locale LANG=$LANG
-    fi
-
-    # remove pointless services in a container
-    chroot $rootfs /usr/sbin/update-rc.d -f checkroot remove
-    chroot $rootfs /usr/sbin/update-rc.d -f umountfs remove
-    chroot $rootfs /usr/sbin/update-rc.d -f hwclock.sh remove
-    chroot $rootfs /usr/sbin/update-rc.d -f hwclockfirst.sh remove
-
-    # fix avahi
-    if [ -f $rootfs/etc/init.d/avahi-daemon ]
-    then
-	echo 'Fix avahi'
-	sed -i -e "s!-D!-D --no-rlimits!" $rootfs/etc/init.d/avahi-daemon 
-    fi
-
-    echo "root:root" | chroot $rootfs chpasswd
-    echo "Root password is 'root', please change !"
-
-    return 0
-}
-
-configure_pubkey(){
-	path=$1
-	rootfs=$2
-        if grep -q ^\#lxc.pubkey $path/config
-        then
-		pubkey=`grep ^\#lxc.pubkey $path/config | cut -d= -f2`
-	fi
-	if [ ! -e $rootfs/root/.ssh ]
-	then
-		mkdir $rootfs/root/.ssh
-	fi
-	if [ ! -z "$pubkey" ]
-	then
-		echo "Copying $pubkey -> $rootfs/root/.ssh/authorized_keys"
-		cp $pubkey $rootfs/root/.ssh/authorized_keys
-	fi
-}
-
-configure_hostkeydir(){
-	rootfs=$1
-	hostkeydir=$2
-	name=$3
-	if [ $# -ne 3 ]
-	then
-		exit 1
-	else
-		[ -d $rootfs/etc/ssh ] || mkdir -p $rootfs/etc/ssh
-		if [ -e $hostkeydir ]
-		then 
-			if [ ! -d $hostkeydir/$name ]
-			then
-				mkdir $hostkeydir/$name
-				echo "Creating SSH2 RSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_rsa_key -N '' -t rsa
-				echo "Creating SSH2 DSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_dsa_key -N '' -t dsa
-			fi
-			cp $hostkeydir/$name/ssh_host_* $rootfs/etc/ssh/
-		fi
-	fi
-}
-
-download_debian()
-{
-    packages=\
-ifupdown,\
-locales,\
-libui-dialog-perl,\
-dialog,\
-dhcp3-client,\
-netbase,\
-net-tools,\
-iproute,\
-iputils-ping,\
-vim,\
-less,\
-rsync,\
-htop,\
-zsh,\
-debconf-utils,\
-avahi-utils,\
-openssh-server,\
-xbase-clients,\
-phpunit,\
-openjdk-6-jre,\
-iceweasel,\
-xfonts-base,\
-vnc4server
-
-    cache=$1
-    arch=$2
-
-    # check the mini debian was not already downloaded
-    mkdir -p "$cache/partial-$SUITE-$arch"
-    if [ $? -ne 0 ]; then
-	echo "Failed to create '$cache/partial-$SUITE-$arch' directory"
-	return 1
-    fi
-
-    # download a mini debian into a cache
-    echo "Downloading debian minimal ..."
-    debootstrap --verbose --variant=minbase --arch=$arch \
-	--include $packages \
-	"$SUITE" "$cache/partial-$SUITE-$arch" $MIRROR
-    if [ $? -ne 0 ]; then
-	echo "Failed to download the rootfs, aborting."
-	return 1
-    fi
-
-    mv "$1/partial-$SUITE-$arch" "$1/rootfs-$SUITE-$arch"
-    echo "Download complete."
-
-    return 0
-}
-
-copy_debian()
-{
-    cache=$1
-    arch=$2
-    rootfs=$3
-
-    # make a local copy of the minidebian
-    echo -n "Copying rootfs to $rootfs..."
-    [ -d $rootfs ] && rmdir $rootfs
-    cp --reflink=auto -a "$cache/rootfs-$SUITE-$arch" $rootfs || return 1
-    return 0
-}
-
-install_debian()
-{
-    cache="/var/cache/lxc/debian-6"
-    rootfs=$1
-    mkdir -p /var/lock/subsys/
-    (
-	flock -n -x 200
-	if [ $? -ne 0 ]; then
-	    echo "Cache repository is busy."
-	    return 1
-	fi
-
-	arch=$(arch)
-	if [ "$arch" == "x86_64" ]; then
-	    arch=amd64
-	fi
-
-	if [ "$arch" == "i686" ]; then
-	    arch=i386
-	fi
-
-	echo "Checking cache download in $cache/rootfs-$SUITE-$arch ... "
-	if [ ! -e "$cache/rootfs-$SUITE-$arch" ]; then
-	    download_debian $cache $arch
-	    if [ $? -ne 0 ]; then
-		echo "Failed to download 'debian base'"
-		return 1
-	    fi
-	fi
-
-	copy_debian $cache $arch $rootfs
-	if [ $? -ne 0 ]; then
-	    echo "Failed to copy rootfs"
-	    return 1
-	fi
-
-	return 0
-
-	) 200>/var/lock/subsys/lxc
-
-    return $?
-}
-
-gen_mac()
-{
-	dd if=/dev/urandom bs=1 count=3 2>/dev/null | od -tx1 | head -1 | cut -d' ' -f2- | awk '{ print "00:16:3e:"$1":"$2":"$3 }'
-}
-
-copy_configuration()
-{
-    path=$1
-    rootfs=$2
-    name=$3
-    macdir=$4
-
-    if [ ! -e "$macdir/$name" ]
-    then
-        gen_mac > $macdir/$name
-    fi
-    macaddr=`cat $macdir/$name`
-
-    cat <<EOF >> $path/config
-lxc.network.hwaddr = $macaddr
-lxc.tty = 4
-lxc.pts = 1024
-lxc.rootfs = $rootfs
-lxc.cgroup.devices.deny = a
-# /dev/null and zero
-lxc.cgroup.devices.allow = c 1:3 rwm
-lxc.cgroup.devices.allow = c 1:5 rwm
-# consoles
-lxc.cgroup.devices.allow = c 5:1 rwm
-lxc.cgroup.devices.allow = c 5:0 rwm
-lxc.cgroup.devices.allow = c 4:0 rwm
-lxc.cgroup.devices.allow = c 4:1 rwm
-# /dev/{,u}random
-lxc.cgroup.devices.allow = c 1:9 rwm
-lxc.cgroup.devices.allow = c 1:8 rwm
-lxc.cgroup.devices.allow = c 136:* rwm
-lxc.cgroup.devices.allow = c 5:2 rwm
-# rtc
-lxc.cgroup.devices.allow = c 254:0 rwm
-
-# mounts point
-lxc.mount.entry=proc $rootfs/proc proc nodev,noexec,nosuid 0 0
-lxc.mount.entry=devpts $rootfs/dev/pts devpts defaults 0 0
-lxc.mount.entry=sysfs $rootfs/sys sysfs defaults  0 0
-EOF
-
-    if [ $? -ne 0 ]; then
-	echo "Failed to add configuration"
-	return 1
-    fi
-
-    return 0
-}
-
-clean()
-{
-    cache="/var/cache/lxc/debian-6"
-
-    if [ ! -e $cache ]; then
-	exit 0
-    fi
-
-    # lock, so we won't purge while someone is creating a repository
-    (
-	flock -n -x 200
-	if [ $? != 0 ]; then
-	    echo "Cache repository is busy."
-	    exit 1
-	fi
-
-	echo -n "Purging the download cache..."
-	rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1
-	exit 0
-
-    ) 200>/var/lock/subsys/lxc
-}
-
-usage()
-{
-    cat <<EOF
-$1 -h|--help -p|--path=<path> --clean
-EOF
-    return 0
-}
-
-options=$(getopt -o hp:n:c -l help,path:,name:,clean -- "$@")
-if [ $? -ne 0 ]; then
-        usage $(basename $0)
-	exit 1
-fi
-eval set -- "$options"
-
-while true
-do
-    case "$1" in
-        -h|--help)      usage $0 && exit 0;;
-        -p|--path)      path=$2; shift 2;;
-	-n|--name)      name=$2; shift 2;;
-	-c|--clean)     clean=$2; shift 2;;
-        --)             shift 1; break ;;
-        *)              break ;;
-    esac
-done
-
-if [ ! -z "$clean" -a -z "$path" ]; then
-    clean || exit 1
-    exit 0
-fi
-
-type debootstrap
-if [ $? -ne 0 ]; then
-    echo "'debootstrap' command is missing"
-    exit 1
-fi
-
-if [ -z "$path" ]; then
-    echo "'path' parameter is required"
-    exit 1
-fi
-
-if [ "$(id -u)" != "0" ]; then
-    echo "This script should be run as 'root'"
-    exit 1
-fi
-
-rootfs=$path/rootfs
-oldhostkeydir=/var/lib/lxc/ssh
-hostkeydir=/var/cache/lxc/ssh
-macdir=/var/cache/lxc/mac
-if [ -e $oldhostkeydir ]
-then
-    if [ ! -e $hostkeydir ]
-    then
-        mv $oldhostkeydir $hostkeydir
-    fi
-fi
-if [ ! -e $hostkeydir ]
-then
-    mkdir -p $hostkeydir
-fi
-if [ ! -e $macdir ]
-then
-    mkdir -p $macdir
-fi
-
-install_debian $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to install debian"
-    exit 1
-fi
-
-configure_debian $rootfs $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure debian for a container"
-    exit 1
-fi
-
-copy_configuration $path $rootfs $name $macdir
-if [ $? -ne 0 ]; then
-    echo "failed write configuration file"
-    exit 1
-fi
-
-configure_pubkey $path $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to configure pubkey"
-    exit 1
-fi
-
-configure_hostkeydir $rootfs $hostkeydir $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure hostkeydir"
-    exit 1
-fi
-
-if [ ! -z $clean ]; then
-    clean || exit 1
-    exit 0
-fi
diff --git a/tests/buildbot/lxc/lxc-debian7 b/tests/buildbot/lxc/lxc-debian7
deleted file mode 100644
index c0d4aee..0000000
--- a/tests/buildbot/lxc/lxc-debian7
+++ /dev/null
@@ -1,485 +0,0 @@
-#!/bin/bash
-
-#
-# lxc: linux Container library
-
-# Authors:
-# Daniel Lezcano <daniel.lezcano at free.fr>
-
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-LANG=C
-SUITE=${SUITE:-wheezy}
-MIRROR=${MIRROR:-"http://cdn.debian.net/debian/"}
-
-configure_debian()
-{
-    rootfs=$1
-    hostname=$2
-
-    # Squeeze only has /dev/tty and /dev/tty0 by default,
-    # therefore creating missing device nodes for tty1-4.
-    test -e $rootfs/dev/tty1 || mknod $rootfs/dev/tty1 c 4 1
-    test -e $rootfs/dev/tty2 || mknod $rootfs/dev/tty2 c 4 2
-    test -e $rootfs/dev/tty3 || mknod $rootfs/dev/tty3 c 4 3
-    test -e $rootfs/dev/tty4 || mknod $rootfs/dev/tty4 c 4 4
-
-    # configure the inittab
-    cat <<EOF > $rootfs/etc/inittab
-id:3:initdefault:
-si::sysinit:/etc/init.d/rcS
-l0:0:wait:/etc/init.d/rc 0
-l1:1:wait:/etc/init.d/rc 1
-l2:2:wait:/etc/init.d/rc 2
-l3:3:wait:/etc/init.d/rc 3
-l4:4:wait:/etc/init.d/rc 4
-l5:5:wait:/etc/init.d/rc 5
-l6:6:wait:/etc/init.d/rc 6
-# Normally not reached, but fallthrough in case of emergency.
-z6:6:respawn:/sbin/sulogin
-1:2345:respawn:/sbin/getty 38400 console
-c1:12345:respawn:/sbin/getty 38400 tty1 linux
-c2:12345:respawn:/sbin/getty 38400 tty2 linux
-c3:12345:respawn:/sbin/getty 38400 tty3 linux
-c4:12345:respawn:/sbin/getty 38400 tty4 linux
-EOF
-
-    # disable selinux in debian
-    mkdir -p $rootfs/selinux
-    echo 0 > $rootfs/selinux/enforce
-
-    if grep -q ^lxc.network.ipv4 $path/config
-    then
-        # configure static network
-        lxc_network_ipv4=`grep ^lxc.network.ipv4 $path/config | cut -d= -f2`
-        address=`echo $lxc_network_ipv4 | cut -d/ -f1`
-        netmask=`netmask -s $lxc_network_ipv4 | cut -d/ -f2`
-	gateway=`grep ^\#lxc.network.ipv4.gw $path/config | cut -d= -f2`
-	if [ -e $rootfs/etc/network/interfaces ]
-	then
-		cat <<EOF > $rootfs/etc/network/interfaces
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet static
-	address $address
-	netmask $netmask
-EOF
-		if [ !  -z "$gateway" ]
-		then
-			cat <<EOF >> $rootfs/etc/network/interfaces
-	gateway $gateway
-EOF
-		fi
-		cat <<EOF >> $rootfs/etc/hosts
-$address	$hostname
-EOF
-		echo "Network configured with static ip"
-	else
-		exit 2
-	fi
-    else
-        # configure the network using the dhcp
-	if [ -e $rootfs/etc/network/interfaces ]
-	then
-                cat <<EOF > $rootfs/etc/network/interfaces
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet dhcp
-EOF
-		cat <<EOF >> $rootfs/etc/hosts
-127.0.1.1	$hostname
-EOF
-		echo "Network configured with dhcp"
-	else
-		exit 3
-	fi
-    fi
-    # When domain is not local, avahi completed by send hostname
-    hostnamebase=`echo $hostname | cut -d. -f1`
-    if [ "$hostnamebase.local" != "$hostname" ]
-        then
-            cat <<EOF >> $rootfs/etc/dhcp/dhclient.conf
-send host-name "$hostnamebase";
-EOF
-    fi
-
-    # set the hostname
-    cat <<EOF > $rootfs/etc/hostname
-$hostname
-EOF
-
-    # reconfigure some services
-    if [ -z "$LANG" ]; then
-	chroot $rootfs locale-gen en_US.UTF-8
-	chroot $rootfs update-locale LANG=en_US.UTF-8
-    else
-	chroot $rootfs locale-gen $LANG
-	chroot $rootfs update-locale LANG=$LANG
-    fi
-
-    # remove pointless services in a container
-    chroot $rootfs /usr/sbin/update-rc.d -f checkroot remove
-    chroot $rootfs /usr/sbin/update-rc.d -f umountfs remove
-    chroot $rootfs /usr/sbin/update-rc.d -f hwclock.sh remove
-    chroot $rootfs /usr/sbin/update-rc.d -f hwclockfirst.sh remove
-
-    # fix avahi
-    if [ -f $rootfs/etc/init.d/avahi-daemon ]
-    then
-	echo 'Fix avahi'
-	sed -i -e "s!-D!-D --no-rlimits!" $rootfs/etc/init.d/avahi-daemon 
-    fi
-
-    echo "root:root" | chroot $rootfs chpasswd
-    echo "Root password is 'root', please change !"
-
-    return 0
-}
-
-configure_pubkey(){
-	path=$1
-	rootfs=$2
-        if grep -q ^\#lxc.pubkey $path/config
-        then
-		pubkey=`grep ^\#lxc.pubkey $path/config | cut -d= -f2`
-	fi
-	if [ ! -e $rootfs/root/.ssh ]
-	then
-		mkdir $rootfs/root/.ssh
-	fi
-	if [ ! -z "$pubkey" ]
-	then
-		echo "Copying $pubkey -> $rootfs/root/.ssh/authorized_keys"
-		cp $pubkey $rootfs/root/.ssh/authorized_keys
-	fi
-}
-
-configure_hostkeydir(){
-	rootfs=$1
-	hostkeydir=$2
-	name=$3
-	if [ $# -ne 3 ]
-	then
-		exit 1
-	else
-		[ -d $rootfs/etc/ssh ] || mkdir -p $rootfs/etc/ssh
-		if [ -e $hostkeydir ]
-		then 
-			if [ ! -d $hostkeydir/$name ]
-			then
-				mkdir $hostkeydir/$name
-				echo "Creating SSH2 RSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_rsa_key -N '' -t rsa
-				echo "Creating SSH2 DSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_dsa_key -N '' -t dsa
-			fi
-			cp $hostkeydir/$name/ssh_host_* $rootfs/etc/ssh/
-		fi
-	fi
-}
-
-download_debian()
-{
-    packages=\
-ifupdown,\
-locales,\
-libui-dialog-perl,\
-dialog,\
-isc-dhcp-client,\
-netbase,\
-net-tools,\
-iproute,\
-iputils-ping,\
-vim,\
-less,\
-rsync,\
-htop,\
-zsh,\
-debconf-utils,\
-avahi-utils,\
-openssh-server,\
-xbase-clients,\
-phpunit,\
-phpunit-selenium,\
-openjdk-6-jre,\
-iceweasel,\
-xfonts-base,\
-vnc4server
-
-    cache=$1
-    arch=$2
-
-    # check the mini debian was not already downloaded
-    mkdir -p "$cache/partial-$SUITE-$arch"
-    if [ $? -ne 0 ]; then
-	echo "Failed to create '$cache/partial-$SUITE-$arch' directory"
-	return 1
-    fi
-
-    # download a mini debian into a cache
-    echo "Downloading debian minimal ..."
-    debootstrap --verbose --variant=minbase --arch=$arch \
-	--include $packages \
-	"$SUITE" "$cache/partial-$SUITE-$arch" $MIRROR
-    if [ $? -ne 0 ]; then
-	echo "Failed to download the rootfs, aborting."
-	return 1
-    fi
-
-    mv "$1/partial-$SUITE-$arch" "$1/rootfs-$SUITE-$arch"
-    echo "Download complete."
-
-    return 0
-}
-
-copy_debian()
-{
-    cache=$1
-    arch=$2
-    rootfs=$3
-
-    # make a local copy of the minidebian
-    echo -n "Copying rootfs to $rootfs..."
-    [ -d $rootfs ] && rmdir $rootfs
-    cp --reflink=auto -a "$cache/rootfs-$SUITE-$arch" $rootfs || return 1
-    return 0
-}
-
-install_debian()
-{
-    cache="/var/cache/lxc/debian-7"
-    rootfs=$1
-    mkdir -p /var/lock/subsys/
-    (
-	flock -n -x 200
-	if [ $? -ne 0 ]; then
-	    echo "Cache repository is busy."
-	    return 1
-	fi
-
-	arch=$(arch)
-	if [ "$arch" == "x86_64" ]; then
-	    arch=amd64
-	fi
-
-	if [ "$arch" == "i686" ]; then
-	    arch=i386
-	fi
-
-	echo "Checking cache download in $cache/rootfs-$SUITE-$arch ... "
-	if [ ! -e "$cache/rootfs-$SUITE-$arch" ]; then
-	    download_debian $cache $arch
-	    if [ $? -ne 0 ]; then
-		echo "Failed to download 'debian base'"
-		return 1
-	    fi
-	fi
-
-	copy_debian $cache $arch $rootfs
-	if [ $? -ne 0 ]; then
-	    echo "Failed to copy rootfs"
-	    return 1
-	fi
-
-	return 0
-
-	) 200>/var/lock/subsys/lxc
-
-    return $?
-}
-
-gen_mac()
-{
-	dd if=/dev/urandom bs=1 count=3 2>/dev/null | od -tx1 | head -1 | cut -d' ' -f2- | awk '{ print "00:16:3e:"$1":"$2":"$3 }'
-}
-
-copy_configuration()
-{
-    path=$1
-    rootfs=$2
-    name=$3
-    macdir=$4
-
-    if [ ! -e "$macdir/$name" ]
-    then
-        gen_mac > $macdir/$name
-    fi
-    macaddr=`cat $macdir/$name`
-
-    cat <<EOF >> $path/config
-lxc.network.hwaddr = $macaddr
-lxc.tty = 4
-lxc.pts = 1024
-lxc.rootfs = $rootfs
-lxc.cgroup.devices.deny = a
-# /dev/null and zero
-lxc.cgroup.devices.allow = c 1:3 rwm
-lxc.cgroup.devices.allow = c 1:5 rwm
-# consoles
-lxc.cgroup.devices.allow = c 5:1 rwm
-lxc.cgroup.devices.allow = c 5:0 rwm
-lxc.cgroup.devices.allow = c 4:0 rwm
-lxc.cgroup.devices.allow = c 4:1 rwm
-# /dev/{,u}random
-lxc.cgroup.devices.allow = c 1:9 rwm
-lxc.cgroup.devices.allow = c 1:8 rwm
-lxc.cgroup.devices.allow = c 136:* rwm
-lxc.cgroup.devices.allow = c 5:2 rwm
-# rtc
-lxc.cgroup.devices.allow = c 254:0 rwm
-
-# mounts point
-lxc.mount.entry=proc $rootfs/proc proc nodev,noexec,nosuid 0 0
-lxc.mount.entry=devpts $rootfs/dev/pts devpts defaults 0 0
-lxc.mount.entry=sysfs $rootfs/sys sysfs defaults  0 0
-EOF
-
-    if [ $? -ne 0 ]; then
-	echo "Failed to add configuration"
-	return 1
-    fi
-
-    return 0
-}
-
-clean()
-{
-    cache="/var/cache/lxc/debian-7"
-
-    if [ ! -e $cache ]; then
-	exit 0
-    fi
-
-    # lock, so we won't purge while someone is creating a repository
-    (
-	flock -n -x 200
-	if [ $? != 0 ]; then
-	    echo "Cache repository is busy."
-	    exit 1
-	fi
-
-	echo -n "Purging the download cache..."
-	rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1
-	exit 0
-
-    ) 200>/var/lock/subsys/lxc
-}
-
-usage()
-{
-    cat <<EOF
-$1 -h|--help -p|--path=<path> --clean
-EOF
-    return 0
-}
-
-options=$(getopt -o hp:n:c -l help,path:,rootfs:,name:,clean -- "$@")
-if [ $? -ne 0 ]; then
-        usage $(basename $0)
-	exit 1
-fi
-eval set -- "$options"
-
-while true
-do
-    case "$1" in
-        -h|--help)      usage $0 && exit 0;;
-        -p|--path)      path=$2; shift 2;;
-	-n|--name)      name=$2; shift 2;;
-	-c|--clean)     clean=$2; shift 2;;
-        --)             shift 1; break ;;
-        *)              break ;;
-    esac
-done
-
-if [ ! -z "$clean" -a -z "$path" ]; then
-    clean || exit 1
-    exit 0
-fi
-
-type debootstrap
-if [ $? -ne 0 ]; then
-    echo "'debootstrap' command is missing"
-    exit 1
-fi
-
-if [ -z "$path" ]; then
-    echo "'path' parameter is required"
-    exit 1
-fi
-
-if [ "$(id -u)" != "0" ]; then
-    echo "This script should be run as 'root'"
-    exit 1
-fi
-
-rootfs=$path/rootfs
-oldhostkeydir=/var/lib/lxc/ssh
-hostkeydir=/var/cache/lxc/ssh
-macdir=/var/cache/lxc/mac
-if [ -e $oldhostkeydir ]
-then
-    if [ ! -e $hostkeydir ]
-    then
-        mv $oldhostkeydir $hostkeydir
-    fi
-fi
-if [ ! -e $hostkeydir ]
-then
-    mkdir -p $hostkeydir
-fi
-if [ ! -e $macdir ]
-then
-    mkdir -p $macdir
-fi
-
-install_debian $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to install debian"
-    exit 1
-fi
-
-configure_debian $rootfs $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure debian for a container"
-    exit 1
-fi
-
-copy_configuration $path $rootfs $name $macdir
-if [ $? -ne 0 ]; then
-    echo "failed write configuration file"
-    exit 1
-fi
-
-configure_pubkey $path $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to configure pubkey"
-    exit 1
-fi
-
-configure_hostkeydir $rootfs $hostkeydir $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure hostkeydir"
-    exit 1
-fi
-
-if [ ! -z $clean ]; then
-    clean || exit 1
-    exit 0
-fi
diff --git a/tests/buildbot/lxc/lxc-debian8 b/tests/buildbot/lxc/lxc-debian8
deleted file mode 100644
index b436a2b..0000000
--- a/tests/buildbot/lxc/lxc-debian8
+++ /dev/null
@@ -1,486 +0,0 @@
-#!/bin/bash
-
-#
-# lxc: linux Container library
-
-# Authors:
-# Daniel Lezcano <daniel.lezcano at free.fr>
-
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-LANG=C
-SUITE=${SUITE:-jessie}
-MIRROR=${MIRROR:-"http://cdn.debian.net/debian/"}
-
-configure_debian()
-{
-    rootfs=$1
-    hostname=$2
-
-    # Squeeze only has /dev/tty and /dev/tty0 by default,
-    # therefore creating missing device nodes for tty1-4.
-    test -e $rootfs/dev/tty1 || mknod $rootfs/dev/tty1 c 4 1
-    test -e $rootfs/dev/tty2 || mknod $rootfs/dev/tty2 c 4 2
-    test -e $rootfs/dev/tty3 || mknod $rootfs/dev/tty3 c 4 3
-    test -e $rootfs/dev/tty4 || mknod $rootfs/dev/tty4 c 4 4
-
-    # configure the inittab
-    cat <<EOF > $rootfs/etc/inittab
-id:3:initdefault:
-si::sysinit:/etc/init.d/rcS
-l0:0:wait:/etc/init.d/rc 0
-l1:1:wait:/etc/init.d/rc 1
-l2:2:wait:/etc/init.d/rc 2
-l3:3:wait:/etc/init.d/rc 3
-l4:4:wait:/etc/init.d/rc 4
-l5:5:wait:/etc/init.d/rc 5
-l6:6:wait:/etc/init.d/rc 6
-# Normally not reached, but fallthrough in case of emergency.
-z6:6:respawn:/sbin/sulogin
-1:2345:respawn:/sbin/getty 38400 console
-c1:12345:respawn:/sbin/getty 38400 tty1 linux
-c2:12345:respawn:/sbin/getty 38400 tty2 linux
-c3:12345:respawn:/sbin/getty 38400 tty3 linux
-c4:12345:respawn:/sbin/getty 38400 tty4 linux
-EOF
-
-    # disable selinux in debian
-    mkdir -p $rootfs/selinux
-    echo 0 > $rootfs/selinux/enforce
-
-    if grep -q ^lxc.network.ipv4 $path/config
-    then
-        # configure static network
-        lxc_network_ipv4=`grep ^lxc.network.ipv4 $path/config | cut -d= -f2`
-        address=`echo $lxc_network_ipv4 | cut -d/ -f1`
-        netmask=`netmask -s $lxc_network_ipv4 | cut -d/ -f2`
-	gateway=`grep ^\#lxc.network.ipv4.gw $path/config | cut -d= -f2`
-	if [ -e $rootfs/etc/network/interfaces ]
-	then
-		cat <<EOF > $rootfs/etc/network/interfaces
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet static
-	address $address
-	netmask $netmask
-EOF
-		if [ !  -z "$gateway" ]
-		then
-			cat <<EOF >> $rootfs/etc/network/interfaces
-	gateway $gateway
-EOF
-		fi
-		cat <<EOF >> $rootfs/etc/hosts
-$address	$hostname
-EOF
-		echo "Network configured with static ip"
-	else
-		exit 2
-	fi
-    else
-        # configure the network using the dhcp
-	if [ -e $rootfs/etc/network/interfaces ]
-	then
-                cat <<EOF > $rootfs/etc/network/interfaces
-auto lo
-iface lo inet loopback
-
-auto eth0
-iface eth0 inet dhcp
-EOF
-		cat <<EOF >> $rootfs/etc/hosts
-127.0.1.1	$hostname
-EOF
-		echo "Network configured with dhcp"
-	else
-		exit 3
-	fi
-    fi
-    # When domain is not local, avahi completed by send hostname
-    hostnamebase=`echo $hostname | cut -d. -f1`
-    if [ "$hostnamebase.local" != "$hostname" ]
-        then
-            cat <<EOF >> $rootfs/etc/dhcp/dhclient.conf
-send host-name "$hostnamebase";
-EOF
-    fi
-
-    # set the hostname
-    cat <<EOF > $rootfs/etc/hostname
-$hostname
-EOF
-
-    # reconfigure some services
-    if [ -z "$LANG" ]; then
-	chroot $rootfs locale-gen en_US.UTF-8
-	chroot $rootfs update-locale LANG=en_US.UTF-8
-    else
-	chroot $rootfs locale-gen $LANG
-	chroot $rootfs update-locale LANG=$LANG
-    fi
-
-    # remove pointless services in a container
-    chroot $rootfs /usr/sbin/update-rc.d -f checkroot remove
-    chroot $rootfs /usr/sbin/update-rc.d -f umountfs remove
-    chroot $rootfs /usr/sbin/update-rc.d -f hwclock.sh remove
-    chroot $rootfs /usr/sbin/update-rc.d -f hwclockfirst.sh remove
-
-    # fix avahi
-    if [ -f $rootfs/etc/init.d/avahi-daemon ]
-    then
-	echo 'Fix avahi'
-	sed -i -e "s!-D!-D --no-rlimits!" $rootfs/etc/init.d/avahi-daemon 
-    fi
-
-    echo "root:root" | chroot $rootfs chpasswd
-    echo "Root password is 'root', please change !"
-
-    return 0
-}
-
-configure_pubkey(){
-	path=$1
-	rootfs=$2
-        if grep -q ^\#lxc.pubkey $path/config
-        then
-		pubkey=`grep ^\#lxc.pubkey $path/config | cut -d= -f2`
-	fi
-	if [ ! -e $rootfs/root/.ssh ]
-	then
-		mkdir $rootfs/root/.ssh
-	fi
-	if [ ! -z "$pubkey" ]
-	then
-		echo "Copying $pubkey -> $rootfs/root/.ssh/authorized_keys"
-		cp $pubkey $rootfs/root/.ssh/authorized_keys
-	fi
-}
-
-configure_hostkeydir(){
-	rootfs=$1
-	hostkeydir=$2
-	name=$3
-	if [ $# -ne 3 ]
-	then
-		exit 1
-	else
-		[ -d $rootfs/etc/ssh ] || mkdir -p $rootfs/etc/ssh
-		if [ -e $hostkeydir ]
-		then 
-			if [ ! -d $hostkeydir/$name ]
-			then
-				mkdir $hostkeydir/$name
-				echo "Creating SSH2 RSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_rsa_key -N '' -t rsa
-				echo "Creating SSH2 DSA key; this may take some time ..."
-				ssh-keygen -q -f $hostkeydir/$name/ssh_host_dsa_key -N '' -t dsa
-			fi
-			cp $hostkeydir/$name/ssh_host_* $rootfs/etc/ssh/
-		fi
-	fi
-}
-
-download_debian()
-{
-    packages=\
-ifupdown,\
-locales,\
-libui-dialog-perl,\
-dialog,\
-isc-dhcp-client,\
-netbase,\
-net-tools,\
-iproute,\
-iputils-ping,\
-vim,\
-less,\
-rsync,\
-htop,\
-zsh,\
-debconf-utils,\
-avahi-utils,\
-openssh-server,\
-xbase-clients,\
-openjdk-6-jre,\
-iceweasel,\
-xfonts-base,\
-vnc4server
-#pear-channels,\
-#phpunit,\
-#phpunit-selenium,\
-
-    cache=$1
-    arch=$2
-
-    # check the mini debian was not already downloaded
-    mkdir -p "$cache/partial-$SUITE-$arch"
-    if [ $? -ne 0 ]; then
-	echo "Failed to create '$cache/partial-$SUITE-$arch' directory"
-	return 1
-    fi
-
-    # download a mini debian into a cache
-    echo "Downloading debian minimal ..."
-    debootstrap --verbose --variant=minbase --arch=$arch \
-	--include $packages \
-	"$SUITE" "$cache/partial-$SUITE-$arch" $MIRROR
-    if [ $? -ne 0 ]; then
-	echo "Failed to download the rootfs, aborting."
-	return 1
-    fi
-
-    mv "$1/partial-$SUITE-$arch" "$1/rootfs-$SUITE-$arch"
-    echo "Download complete."
-
-    return 0
-}
-
-copy_debian()
-{
-    cache=$1
-    arch=$2
-    rootfs=$3
-
-    # make a local copy of the minidebian
-    echo -n "Copying rootfs to $rootfs..."
-    [ -d $rootfs ] && rmdir $rootfs
-    cp --reflink=auto -a "$cache/rootfs-$SUITE-$arch" $rootfs || return 1
-    return 0
-}
-
-install_debian()
-{
-    cache="/var/cache/lxc/debian-8"
-    rootfs=$1
-    mkdir -p /var/lock/subsys/
-    (
-	flock -n -x 200
-	if [ $? -ne 0 ]; then
-	    echo "Cache repository is busy."
-	    return 1
-	fi
-
-	arch=$(arch)
-	if [ "$arch" == "x86_64" ]; then
-	    arch=amd64
-	fi
-
-	if [ "$arch" == "i686" ]; then
-	    arch=i386
-	fi
-
-	echo "Checking cache download in $cache/rootfs-$SUITE-$arch ... "
-	if [ ! -e "$cache/rootfs-$SUITE-$arch" ]; then
-	    download_debian $cache $arch
-	    if [ $? -ne 0 ]; then
-		echo "Failed to download 'debian base'"
-		return 1
-	    fi
-	fi
-
-	copy_debian $cache $arch $rootfs
-	if [ $? -ne 0 ]; then
-	    echo "Failed to copy rootfs"
-	    return 1
-	fi
-
-	return 0
-
-	) 200>/var/lock/subsys/lxc
-
-    return $?
-}
-
-gen_mac()
-{
-	dd if=/dev/urandom bs=1 count=3 2>/dev/null | od -tx1 | head -1 | cut -d' ' -f2- | awk '{ print "00:16:3e:"$1":"$2":"$3 }'
-}
-
-copy_configuration()
-{
-    path=$1
-    rootfs=$2
-    name=$3
-    macdir=$4
-
-    if [ ! -e "$macdir/$name" ]
-    then
-        gen_mac > $macdir/$name
-    fi
-    macaddr=`cat $macdir/$name`
-
-    cat <<EOF >> $path/config
-lxc.network.hwaddr = $macaddr
-lxc.tty = 4
-lxc.pts = 1024
-lxc.rootfs = $rootfs
-lxc.cgroup.devices.deny = a
-# /dev/null and zero
-lxc.cgroup.devices.allow = c 1:3 rwm
-lxc.cgroup.devices.allow = c 1:5 rwm
-# consoles
-lxc.cgroup.devices.allow = c 5:1 rwm
-lxc.cgroup.devices.allow = c 5:0 rwm
-lxc.cgroup.devices.allow = c 4:0 rwm
-lxc.cgroup.devices.allow = c 4:1 rwm
-# /dev/{,u}random
-lxc.cgroup.devices.allow = c 1:9 rwm
-lxc.cgroup.devices.allow = c 1:8 rwm
-lxc.cgroup.devices.allow = c 136:* rwm
-lxc.cgroup.devices.allow = c 5:2 rwm
-# rtc
-lxc.cgroup.devices.allow = c 254:0 rwm
-
-# mounts point
-lxc.mount.entry=proc $rootfs/proc proc nodev,noexec,nosuid 0 0
-lxc.mount.entry=devpts $rootfs/dev/pts devpts defaults 0 0
-lxc.mount.entry=sysfs $rootfs/sys sysfs defaults  0 0
-EOF
-
-    if [ $? -ne 0 ]; then
-	echo "Failed to add configuration"
-	return 1
-    fi
-
-    return 0
-}
-
-clean()
-{
-    cache="/var/cache/lxc/debian-8"
-
-    if [ ! -e $cache ]; then
-	exit 0
-    fi
-
-    # lock, so we won't purge while someone is creating a repository
-    (
-	flock -n -x 200
-	if [ $? != 0 ]; then
-	    echo "Cache repository is busy."
-	    exit 1
-	fi
-
-	echo -n "Purging the download cache..."
-	rm --preserve-root --one-file-system -rf $cache && echo "Done." || exit 1
-	exit 0
-
-    ) 200>/var/lock/subsys/lxc
-}
-
-usage()
-{
-    cat <<EOF
-$1 -h|--help -p|--path=<path> --clean
-EOF
-    return 0
-}
-
-options=$(getopt -o hp:n:c -l help,path:,name:,clean -- "$@")
-if [ $? -ne 0 ]; then
-        usage $(basename $0)
-	exit 1
-fi
-eval set -- "$options"
-
-while true
-do
-    case "$1" in
-        -h|--help)      usage $0 && exit 0;;
-        -p|--path)      path=$2; shift 2;;
-	-n|--name)      name=$2; shift 2;;
-	-c|--clean)     clean=$2; shift 2;;
-        --)             shift 1; break ;;
-        *)              break ;;
-    esac
-done
-
-if [ ! -z "$clean" -a -z "$path" ]; then
-    clean || exit 1
-    exit 0
-fi
-
-type debootstrap
-if [ $? -ne 0 ]; then
-    echo "'debootstrap' command is missing"
-    exit 1
-fi
-
-if [ -z "$path" ]; then
-    echo "'path' parameter is required"
-    exit 1
-fi
-
-if [ "$(id -u)" != "0" ]; then
-    echo "This script should be run as 'root'"
-    exit 1
-fi
-
-rootfs=$path/rootfs
-oldhostkeydir=/var/lib/lxc/ssh
-hostkeydir=/var/cache/lxc/ssh
-macdir=/var/cache/lxc/mac
-if [ -e $oldhostkeydir ]
-then
-    if [ ! -e $hostkeydir ]
-    then
-        mv $oldhostkeydir $hostkeydir
-    fi
-fi
-if [ ! -e $hostkeydir ]
-then
-    mkdir -p $hostkeydir
-fi
-if [ ! -e $macdir ]
-then
-    mkdir -p $macdir
-fi
-
-install_debian $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to install debian"
-    exit 1
-fi
-
-configure_debian $rootfs $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure debian for a container"
-    exit 1
-fi
-
-copy_configuration $path $rootfs $name $macdir
-if [ $? -ne 0 ]; then
-    echo "failed write configuration file"
-    exit 1
-fi
-
-configure_pubkey $path $rootfs
-if [ $? -ne 0 ]; then
-    echo "failed to configure pubkey"
-    exit 1
-fi
-
-configure_hostkeydir $rootfs $hostkeydir $name
-if [ $? -ne 0 ]; then
-    echo "failed to configure hostkeydir"
-    exit 1
-fi
-
-if [ ! -z $clean ]; then
-    clean || exit 1
-    exit 0
-fi

-----------------------------------------------------------------------

Summary of changes:
 tests/buildbot/README                              |    1 +
 tests/buildbot/config/README                       |    1 +
 tests/buildbot/config/atom330                      |   32 -
 tests/buildbot/config/build                        |   18 -
 tests/buildbot/config/christian                    |   18 -
 tests/buildbot/config/g-dellm65-1                  |   27 -
 tests/buildbot/config/g-quadri1                    |   28 -
 tests/buildbot/config/g-virtual05                  |   21 -
 tests/buildbot/config/vladimir                     |   26 -
 tests/buildbot/fusionforge-build-and-test.sh       |    6 +-
 tests/buildbot/lxc/Makefile                        |   95 +--
 tests/buildbot/lxc/README                          |  226 -------
 tests/buildbot/lxc/destroy                         |    9 -
 tests/buildbot/{config => lxc}/init-jenkins.sh     |    7 +-
 tests/buildbot/lxc/lxc-centos5                     |  634 --------------------
 tests/buildbot/lxc/lxc-centos6                     |  569 ------------------
 tests/buildbot/lxc/lxc-centos7                     |  571 ------------------
 tests/buildbot/lxc/lxc-debian6                     |  484 ---------------
 tests/buildbot/lxc/lxc-debian7                     |  485 ---------------
 tests/buildbot/lxc/lxc-debian8                     |  486 ---------------
 tests/buildbot/lxc/start                           |    6 -
 tests/buildbot/lxc/stop                            |    5 -
 tests/buildbot/openvz/Makefile                     |  196 ------
 tests/buildbot/openvz/README                       |   75 ---
 tests/buildbot/openvz/destroy                      |    3 -
 tests/buildbot/openvz/interfaces.sample            |   22 -
 tests/buildbot/openvz/local.christian              |    3 -
 tests/buildbot/openvz/local.christian.rinse.bpi    |   19 -
 tests/buildbot/openvz/local.christian.rinse.conf   |   84 ---
 tests/buildbot/openvz/local.g-dellm65-1            |    3 -
 tests/buildbot/openvz/local.g-t3500-cb             |    3 -
 tests/buildbot/openvz/local.g-virtual05            |    3 -
 tests/buildbot/openvz/local.g-virtual05.rinse.bpi  |   19 -
 tests/buildbot/openvz/local.g-virtual05.rinse.conf |   84 ---
 tests/buildbot/openvz/local.rinse.api              |   12 -
 tests/buildbot/openvz/start                        |   15 -
 tests/buildbot/openvz/stop                         |    5 -
 37 files changed, 15 insertions(+), 4286 deletions(-)
 create mode 100644 tests/buildbot/README
 create mode 100644 tests/buildbot/config/README
 delete mode 100644 tests/buildbot/config/atom330
 delete mode 100644 tests/buildbot/config/build
 delete mode 100644 tests/buildbot/config/christian
 delete mode 100644 tests/buildbot/config/g-dellm65-1
 delete mode 100644 tests/buildbot/config/g-quadri1
 delete mode 100644 tests/buildbot/config/g-virtual05
 delete mode 100644 tests/buildbot/config/vladimir
 delete mode 100644 tests/buildbot/lxc/README
 delete mode 100755 tests/buildbot/lxc/destroy
 rename tests/buildbot/{config => lxc}/init-jenkins.sh (81%)
 delete mode 100755 tests/buildbot/lxc/lxc-centos5
 delete mode 100755 tests/buildbot/lxc/lxc-centos6
 delete mode 100644 tests/buildbot/lxc/lxc-centos7
 delete mode 100755 tests/buildbot/lxc/lxc-debian6
 delete mode 100644 tests/buildbot/lxc/lxc-debian7
 delete mode 100644 tests/buildbot/lxc/lxc-debian8
 delete mode 100755 tests/buildbot/lxc/start
 delete mode 100755 tests/buildbot/lxc/stop
 delete mode 100644 tests/buildbot/openvz/Makefile
 delete mode 100644 tests/buildbot/openvz/README
 delete mode 100755 tests/buildbot/openvz/destroy
 delete mode 100644 tests/buildbot/openvz/interfaces.sample
 delete mode 100644 tests/buildbot/openvz/local.christian
 delete mode 100755 tests/buildbot/openvz/local.christian.rinse.bpi
 delete mode 100644 tests/buildbot/openvz/local.christian.rinse.conf
 delete mode 100644 tests/buildbot/openvz/local.g-dellm65-1
 delete mode 100644 tests/buildbot/openvz/local.g-t3500-cb
 delete mode 100644 tests/buildbot/openvz/local.g-virtual05
 delete mode 100755 tests/buildbot/openvz/local.g-virtual05.rinse.bpi
 delete mode 100644 tests/buildbot/openvz/local.g-virtual05.rinse.conf
 delete mode 100755 tests/buildbot/openvz/local.rinse.api
 delete mode 100755 tests/buildbot/openvz/start
 delete mode 100755 tests/buildbot/openvz/stop


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list