2018-06-15 19:17:32 +00:00
|
|
|
#!/bin/bash -e
|
2018-06-15 18:21:33 +00:00
|
|
|
|
2018-06-15 19:14:55 +00:00
|
|
|
PROJECT=$1
|
|
|
|
shift
|
|
|
|
|
2018-06-15 19:40:50 +00:00
|
|
|
EXTRA_PACKAGES=$1
|
|
|
|
shift
|
|
|
|
|
2018-06-15 18:21:33 +00:00
|
|
|
# Avoid the /nonexistent home directory in nobody's /etc/passwd entry.
|
|
|
|
usermod --home /tmp/nobody nobody
|
|
|
|
|
|
|
|
# Grant read access to nobody, the user which will eventually try to test this
|
|
|
|
# checkout.
|
2018-06-15 19:14:55 +00:00
|
|
|
mv "${PROJECT}" /tmp/project
|
2018-06-15 18:21:33 +00:00
|
|
|
|
|
|
|
# Python build/install toolchain wants to write to the source checkout, too.
|
|
|
|
chown --recursive nobody:nogroup /tmp/project
|
|
|
|
|
|
|
|
apt-get --quiet --yes install \
|
|
|
|
sudo \
|
|
|
|
build-essential \
|
|
|
|
python2.7 \
|
|
|
|
python2.7-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libyaml-dev \
|
|
|
|
${EXTRA_PACKAGES}
|