From 059ca6dbce361403e52dade0eae2e6a55dc1d6c8 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Wed, 21 Oct 2015 12:23:00 -0700 Subject: [PATCH 1/3] Make debian bootstrapper more agnostic about venv packaging Closes: #1061 --- bootstrap/_deb_common.sh | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/bootstrap/_deb_common.sh b/bootstrap/_deb_common.sh index 687f30d09..f6467cf99 100755 --- a/bootstrap/_deb_common.sh +++ b/bootstrap/_deb_common.sh @@ -12,46 +12,33 @@ # - Raspbian: # - 7.8 (armhf) +apt-get update # virtualenv binary can be found in different packages depending on # distro version (#346) -newer () { - apt-get install -y lsb-release --no-install-recommends - distro=$(lsb_release -si) - # 6.0.10 => 60, 14.04 => 1404 - # TODO: in sid version==unstable - version=$(lsb_release -sr | awk -F '.' '{print $1 $2}') - if [ "$distro" = "Ubuntu" -a "$version" -ge 1410 ] - then - return 0; - elif [ "$distro" = "Debian" -a "$version" -ge 80 ] - then - return 0; - else - return 1; - fi -} -apt-get update - -# you can force newer if lsb_release is not available (e.g. Docker -# debian:jessie base image) -if [ "$1" = "newer" ] || newer -then +virtualenv= +if apt-cache show virtualenv > /dev/null ; then virtualenv="virtualenv" -else - virtualenv="python-virtualenv" fi +if apt-cache show python-virtualenv > /dev/null ; then + virtualenv="$virualenv python-virtualenv" +fi apt-get install -y --no-install-recommends \ git-core \ python \ python-dev \ - "$virtualenv" \ + $virtualenv \ gcc \ dialog \ libaugeas0 \ libssl-dev \ libffi-dev \ ca-certificates \ + +if ! which virtualenv > /dev/null ; then + echo Failed to install a working \"virtualenv\" command, exiting + exit 1 +fi From 41a59c0e15a05b14c3b6df6db966b148c13a2a79 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Wed, 21 Oct 2015 12:27:22 -0700 Subject: [PATCH 2/3] typo --- bootstrap/_deb_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/_deb_common.sh b/bootstrap/_deb_common.sh index f6467cf99..ae34dea37 100755 --- a/bootstrap/_deb_common.sh +++ b/bootstrap/_deb_common.sh @@ -23,7 +23,7 @@ if apt-cache show virtualenv > /dev/null ; then fi if apt-cache show python-virtualenv > /dev/null ; then - virtualenv="$virualenv python-virtualenv" + virtualenv="$virtualenv python-virtualenv" fi apt-get install -y --no-install-recommends \ From 6382b184f073337f16d4e68480d5a800beea9179 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Wed, 21 Oct 2015 15:57:37 -0700 Subject: [PATCH 3/3] Update documentation of tested platforms --- bootstrap/_deb_common.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/bootstrap/_deb_common.sh b/bootstrap/_deb_common.sh index ae34dea37..2f44c4e91 100755 --- a/bootstrap/_deb_common.sh +++ b/bootstrap/_deb_common.sh @@ -1,16 +1,22 @@ #!/bin/sh -# Tested with: -# - Ubuntu: -# - 12.04 (x64, Travis) -# - 14.04 (x64, Vagrant) -# - 14.10 (x64) -# - Debian: -# - 6.0.10 "squeeze" (x64) -# - 7.8 "wheezy" (x64) -# - 8.0 "jessie" (x64) -# - Raspbian: -# - 7.8 (armhf) +# Current version tested with: +# +# - Ubuntu +# - 14.04 (x64) +# - 15.04 (x64) +# - Debian +# - 7.9 "wheezy" (x64) +# - sid (2015-10-21) (x64) + +# Past versions tested with: +# +# - Debian 8.0 "jessie" (x64) +# - Raspbian 7.8 (armhf) + +# Believed not to work: +# +# - Debian 6.0.10 "squeeze" (x64) apt-get update