2017-01-24 23:15:13 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-03-20 18:35:59 +01:00
|
|
|
set -e
|
|
|
|
|
2017-01-24 23:15:13 +01:00
|
|
|
${TAMARIN_ACBUILD} environment add DEBIAN_FRONTEND noninteractive
|
2017-01-25 14:49:30 +01:00
|
|
|
|
2017-02-09 21:53:24 +01:00
|
|
|
if [ "${TAMARIN_ACBUILD_ENGINE}" == 'chroot' ]; then
|
2017-01-25 14:49:30 +01:00
|
|
|
# Ugly fix for Python installation in chrooted environment (require /dev/urandom)
|
|
|
|
head -c 65536 /dev/urandom > ./urandom
|
|
|
|
${TAMARIN_ACBUILD} copy ./urandom /dev/urandom
|
|
|
|
fi
|
|
|
|
|
|
|
|
sudo -E /usr/bin/env bash - <<EOF
|
|
|
|
export PATH=${PATH}
|
2017-02-09 21:53:24 +01:00
|
|
|
${TAMARIN_ACBUILD} run --engine "${TAMARIN_ACBUILD_ENGINE}" -- apt-get update
|
|
|
|
${TAMARIN_ACBUILD} run --engine "${TAMARIN_ACBUILD_ENGINE}" -- apt-get install --yes --no-install-recommends build-essential devscripts equivs python3
|
2017-01-25 14:49:30 +01:00
|
|
|
EOF
|
|
|
|
|
2017-02-09 21:53:24 +01:00
|
|
|
if [ "${TAMARIN_ACBUILD_ENGINE}" == 'chroot' ]; then
|
2017-01-25 14:49:30 +01:00
|
|
|
# Clean up Python fix (see above)
|
|
|
|
sudo -E /usr/bin/env bash - <<EOF
|
|
|
|
export PATH=${PATH}
|
2017-02-09 21:53:24 +01:00
|
|
|
${TAMARIN_ACBUILD} run --engine "${TAMARIN_ACBUILD_ENGINE}" -- rm -f /dev/urandom
|
2017-01-25 14:49:30 +01:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
2017-01-24 23:15:13 +01:00
|
|
|
${TAMARIN_ACBUILD} environment remove DEBIAN_FRONTEND
|