[tor-commits] [ooni-probe/master] Add required packages and case for lucid

art at torproject.org art at torproject.org
Mon May 19 17:27:56 UTC 2014


commit 76e47c1f836fd47eccb14ae6e1a52796c2d5f6ba
Author: anadahz <kojgelo at inbox.com>
Date:   Fri May 16 21:16:40 2014 +0300

    Add required packages and case for lucid
    
    * Add pygeoip package
    * Add service-identity package
    * Add lucid distro case
---
 setup-dependencies.sh |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/setup-dependencies.sh b/setup-dependencies.sh
index fecca04..632d347 100755
--- a/setup-dependencies.sh
+++ b/setup-dependencies.sh
@@ -867,7 +867,7 @@ install_virtualenv_securely() {
 }
 
 case $DISTRO_VERSION in
-  natty|wheezy|squeeze|precise|n/a|raring|saucy|trusty)
+  lucid|natty|wheezy|squeeze|precise|n/a|raring|saucy|trusty)
 
   # Create the build directories
   DO "mkdir -p ${BUILD_DIR}" "0"
@@ -893,8 +893,13 @@ case $DISTRO_VERSION in
   fi
 
   if [[ $DISTRO_VERSION == "lucid" ]]; then
-    echo "[+] Installing Ubuntu universe repository...";
-    DO "sudo add-apt-repository "deb http://archive.ubuntu.com $DISTRO_VERSION universe"" "0"
+    HAVE_UNIVERSE_REPO="`grep -x 'deb http://archive.ubuntu.com/ubuntu lucid universe' /etc/apt/sources.list /etc/apt/sources.list.d/ 2>&1|grep universe|head -n 1`";
+    if [ -z "$HAVE_UNIVERSE_REPO" ]; then
+      echo "[-] It appears that you do not have the Ubuntu universe repository; installing it...";
+      sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $DISTRO_VERSION universe"
+    else
+      echo "[.] It appears that you have the Ubuntu universe repository installed!";
+    fi
   fi
 
   # Install the basic packages to get pip ready to roll
@@ -933,9 +938,16 @@ case $DISTRO_VERSION in
       # pip 1.5 needs this
       DO "sudo pip install setuptools --no-use-wheel --upgrade"
   fi
+  
 
   # Install all of the out of package manager dependencies
   DO "pip install -v --timeout 60 -r ${REPO_ROOT}/requirements.txt" "0"
+  
+  # Install lucid required pip dependencies
+  if [[ $DISTRO_VERSION == "lucid" ]]; then
+       DO "pip install -v --timeout 60 pygeoip service-identity" "0"
+  fi
+
   if [ $? != 0 ]; then
       echo "[+] It appears that pip is having issues installing our Python dependency requirements, we'll try again!";
       DO "pip install -v --timeout 60 -r ${REPO_ROOT}/requirements.txt" "0"





More information about the tor-commits mailing list