~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# Copyright 2009 Canonical Ltd.  This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).

# Buildd Slave tool to mount a chroot

# Expects build id as arg 1, makes build-id to contain the build

# Needs SUDO to be set to a sudo instance for passwordless access

SUDO=/usr/bin/sudo
BUILDID="$1"

set -e

exec 2>&1

echo "Mounting chroot for build $BUILDID"

$SUDO mount -t proc none "$HOME/build-$BUILDID/chroot-autobuild/proc"
$SUDO mount -t devpts none "$HOME/build-$BUILDID/chroot-autobuild/dev/pts"
$SUDO mount -t sysfs none "$HOME/build-$BUILDID/chroot-autobuild/sys"
$SUDO mount -t tmpfs none "$HOME/build-$BUILDID/chroot-autobuild/dev/shm"
$SUDO cp /etc/hosts /etc/hostname /etc/resolv.conf $HOME/build-$BUILDID/chroot-autobuild/etc/