Sometimes, trove image builds fail because of package authentication issues. This is often times related to the inability to get to a key server, and not indicative of anything more serious than that. The (strongly discouraged in production use cases) workaround for this is to pass the --allow-unauthenticated option to apt-get install. I say 'Closes-Bug' below but I realize that this is a white lie. What it fixes is only the Trove elements. The image build process uses elements from other places (triple-o, for example). These can still fail for the same reason. There is a much bigger hammer that we can use if we need it, and that is to throw the line 'APT::Get::AllowUnauthenticated "true";' into a conf file in /etc/apt/apt.conf.d/. If this hammer isn't big enough, we can revist later. Change-Id: I009697332bb2a8e1e60b17c10944faed5c311da3 Closes-Bug:#1646856
32 lines
973 B
Bash
Executable File
32 lines
973 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# CONTEXT: GUEST during CONSTRUCTION as ROOT
|
|
# PURPOSE: Install trove guest python dependencies - see trovestack functions_qemu
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get --allow-unauthenticated -y install python-dev libxml2-dev libxslt1-dev python-setuptools \
|
|
python-pip python-sqlalchemy python-lxml \
|
|
python-routes python-eventlet python-webob \
|
|
python-pastedeploy python-paste python-netaddr \
|
|
python-httplib2 python-iso8601 python-pexpect python-mysqldb python-migrate
|
|
|
|
|
|
# pick up the requirements file left for us by
|
|
# extra-data.d/15-reddwarf-dep
|
|
|
|
TMP_HOOKS_DIR="/tmp/in_target.d"
|
|
|
|
UPPER_CONSTRAINTS=
|
|
if [ -f ${TMP_HOOKS_DIR}/upper-constraints.txt ]; then
|
|
UPPER_CONSTRAINTS=" -c ${TMP_HOOKS_DIR}/upper-constraints.txt"
|
|
fi
|
|
|
|
pip2 install -q --upgrade -r ${TMP_HOOKS_DIR}/requirements.txt ${UPPER_CONSTRAINTS}
|
|
|
|
echo "diagnostic pip freeze output follows"
|
|
pip2 freeze
|
|
echo "diagnostic pip freeze output above"
|