Opened 6 years ago

Closed 5 years ago

Last modified 18 months ago

#9052 closed defect (fixed)

ooni: setup.py for v0.0.12 ooni-probe fails to install

Reported by: isis Owned by: hellais
Priority: Immediate Milestone:
Component: Archived/Ooni Version:
Severity: Normal Keywords: ooni, bugreport
Cc: hellais, ioerror, aagbsn, isis Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

At tag v0.0.12, ooni-probe fails to install.

This is not the only problem. The additions of several function to setup.py also enable pip to download dependencies over plaintext HTTP, using "full indexing" behaviour (i.e. pip´s crawler basically just spiders three levels of web pages, without SSL, then looks for the thing with the highest version number -- yes, "Twisted-42.0.0" is valid to pip when it´s running this way -- then pip downloads and installs it.)

In plainer words, you don´t even need to need to MiTM SSL to compromise an install of the current *master* branch. There´s no way, afaik, to get pip to act in a completely sane manner, but this is definitely worse than what ooni-probe´s setup.py was doing before.

Also, the documentation for ooni-probe installation does not follow even remotely the same steps (nor package dependencies) as the current steps taken on Travis-CI. I spent three hours today helping a user because they tried to run the "setup-dependencies.sh" script which is mentioned in the README and it broke their apt on a wheezy box.

a brand new wheezy machine for which the following steps to install a fresh copy of ooniprobe were taken:

sudo apt-get git-core build-essential python python-dev python-setuptools tor tor-geoipdb libyaml libpcap0.8
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
## 83a8472b033e295199254c30eb1e31c8bb0b2135dfd6aa4cef141d743e2ef21e  get-pip.py
sha256sum get-pip.py
sudo python get-pip.py
sudo pip install --upgrade virtualenv virtualenvwrapper
. /usr/local/bin/virtualenvwrapper.sh
git clone https://git.torproject.org/ooni-probe.git
cd ooni-probe
mkvirtualenv -a $PWD -r requirements.txt --unzip-setuptools --setuptools oonip
python setup.py install

the traceback:

(oonip)∃!isisⒶsemiotexte:~/code/ooni-probe ∴ python setup.py install
running install
running bdist_egg
running egg_info
creating ooni_probe.egg-info
writing requirements to ooni_probe.egg-info/requires.txt
writing ooni_probe.egg-info/PKG-INFO
writing top-level names to ooni_probe.egg-info/top_level.txt
writing dependency_links to ooni_probe.egg-info/dependency_links.txt
writing manifest file 'ooni_probe.egg-info/SOURCES.txt'
reading manifest file 'ooni_probe.egg-info/SOURCES.txt'
writing manifest file 'ooni_probe.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/ooni
copying ooni/__init__.py -> build/lib.linux-i686-2.7/ooni
copying ooni/config.py -> build/lib.linux-i686-2.7/ooni
copying ooni/director.py -> build/lib.linux-i686-2.7/ooni
copying ooni/errors.py -> build/lib.linux-i686-2.7/ooni
copying ooni/geoip.py -> build/lib.linux-i686-2.7/ooni
copying ooni/managers.py -> build/lib.linux-i686-2.7/ooni
copying ooni/nettest.py -> build/lib.linux-i686-2.7/ooni
copying ooni/oonicli.py -> build/lib.linux-i686-2.7/ooni
copying ooni/otime.py -> build/lib.linux-i686-2.7/ooni
copying ooni/ratelimiting.py -> build/lib.linux-i686-2.7/ooni
copying ooni/reporter.py -> build/lib.linux-i686-2.7/ooni
copying ooni/tasks.py -> build/lib.linux-i686-2.7/ooni
creating build/lib.linux-i686-2.7/ooni/templates
copying ooni/templates/__init__.py -> build/lib.linux-i686-2.7/ooni/templates
copying ooni/templates/dnst.py -> build/lib.linux-i686-2.7/ooni/templates
copying ooni/templates/httpt.py -> build/lib.linux-i686-2.7/ooni/templates
copying ooni/templates/scapyt.py -> build/lib.linux-i686-2.7/ooni/templates
copying ooni/templates/tcpt.py -> build/lib.linux-i686-2.7/ooni/templates
creating build/lib.linux-i686-2.7/ooni/utils
copying ooni/utils/__init__.py -> build/lib.linux-i686-2.7/ooni/utils
copying ooni/utils/hacks.py -> build/lib.linux-i686-2.7/ooni/utils
copying ooni/utils/log.py -> build/lib.linux-i686-2.7/ooni/utils
copying ooni/utils/logo.py -> build/lib.linux-i686-2.7/ooni/utils
copying ooni/utils/net.py -> build/lib.linux-i686-2.7/ooni/utils
copying ooni/utils/onion.py -> build/lib.linux-i686-2.7/ooni/utils
copying ooni/utils/txagentwithsocks.py -> build/lib.linux-i686-2.7/ooni/utils
copying ooni/utils/txscapy.py -> build/lib.linux-i686-2.7/ooni/utils
creating build/bdist.linux-i686
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/__init__.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/config.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/director.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/errors.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/geoip.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/managers.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/nettest.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/oonicli.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/otime.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/ratelimiting.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/reporter.py -> build/bdist.linux-i686/egg/ooni
copying build/lib.linux-i686-2.7/ooni/tasks.py -> build/bdist.linux-i686/egg/ooni
creating build/bdist.linux-i686/egg/ooni/templates
copying build/lib.linux-i686-2.7/ooni/templates/__init__.py -> build/bdist.linux-i686/egg/ooni/templates
copying build/lib.linux-i686-2.7/ooni/templates/dnst.py -> build/bdist.linux-i686/egg/ooni/templates
copying build/lib.linux-i686-2.7/ooni/templates/httpt.py -> build/bdist.linux-i686/egg/ooni/templates
copying build/lib.linux-i686-2.7/ooni/templates/scapyt.py -> build/bdist.linux-i686/egg/ooni/templates
copying build/lib.linux-i686-2.7/ooni/templates/tcpt.py -> build/bdist.linux-i686/egg/ooni/templates
creating build/bdist.linux-i686/egg/ooni/utils
copying build/lib.linux-i686-2.7/ooni/utils/__init__.py -> build/bdist.linux-i686/egg/ooni/utils
copying build/lib.linux-i686-2.7/ooni/utils/hacks.py -> build/bdist.linux-i686/egg/ooni/utils
copying build/lib.linux-i686-2.7/ooni/utils/log.py -> build/bdist.linux-i686/egg/ooni/utils
copying build/lib.linux-i686-2.7/ooni/utils/logo.py -> build/bdist.linux-i686/egg/ooni/utils
copying build/lib.linux-i686-2.7/ooni/utils/net.py -> build/bdist.linux-i686/egg/ooni/utils
copying build/lib.linux-i686-2.7/ooni/utils/onion.py -> build/bdist.linux-i686/egg/ooni/utils
copying build/lib.linux-i686-2.7/ooni/utils/txagentwithsocks.py -> build/bdist.linux-i686/egg/ooni/utils
copying build/lib.linux-i686-2.7/ooni/utils/txscapy.py -> build/bdist.linux-i686/egg/ooni/utils
byte-compiling build/bdist.linux-i686/egg/ooni/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/config.py to config.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/director.py to director.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/errors.py to errors.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/geoip.py to geoip.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/managers.py to managers.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/nettest.py to nettest.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/oonicli.py to oonicli.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/otime.py to otime.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/ratelimiting.py to ratelimiting.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/reporter.py to reporter.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/tasks.py to tasks.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/templates/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/templates/dnst.py to dnst.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/templates/httpt.py to httpt.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/templates/scapyt.py to scapyt.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/templates/tcpt.py to tcpt.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/utils/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/utils/hacks.py to hacks.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/utils/log.py to log.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/utils/logo.py to logo.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/utils/net.py to net.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/utils/onion.py to onion.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/utils/txagentwithsocks.py to txagentwithsocks.pyc
byte-compiling build/bdist.linux-i686/egg/ooni/utils/txscapy.py to txscapy.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
installing scripts to build/bdist.linux-i686/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/scripts-2.7
copying and adjusting bin/ooniprobe -> build/scripts-2.7
changing mode of build/scripts-2.7/ooniprobe from 644 to 755
creating build/bdist.linux-i686/egg/EGG-INFO/scripts
copying build/scripts-2.7/ooniprobe -> build/bdist.linux-i686/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-i686/egg/EGG-INFO/scripts/ooniprobe to 755
copying ooni_probe.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying ooni_probe.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying ooni_probe.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying ooni_probe.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying ooni_probe.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
ooni.config: module references __file__
creating dist
creating 'dist/ooni_probe-0.0.12-py2.7.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing ooni_probe-0.0.12-py2.7.egg
creating /home/isis/.virtualenvs/oonip/lib/python2.7/site-packages/ooni_probe-0.0.12-py2.7.egg
Extracting ooni_probe-0.0.12-py2.7.egg to /home/isis/.virtualenvs/oonip/lib/python2.7/site-packages
Adding ooni-probe 0.0.12 to easy-install.pth file
Installing ooniprobe script to /home/isis/.virtualenvs/oonip/bin

Installed /home/isis/.virtualenvs/oonip/lib/python2.7/site-packages/ooni_probe-0.0.12-py2.7.egg
Processing dependencies for ooni-probe==0.0.12
Searching for scapy>=2.2.0
Reading https://people.torproject.org/~ioerror/src/mirrors/ooniprobe
Reading http://pypi.python.org/simple/scapy/
Reading http://www.cartel-securite.fr/pbiondi/scapy.html
Page at http://pypi.python.org/simple/scapy/ links to .py file(s) without version info; an index scan is required.
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Reading http://www.cartel-securite.fr/pbiondi/python/scapy.py
No local packages or download links found for scapy>=2.2.0
error: Could not find suitable distribution for Requirement.parse('scapy>=2.2.0')

Note: ooni-probe *runs* presently on this box (well, sort of, there are still problems with the backend reporter), but it only runs because I did "-r requirements.txt" when setting up the virtualenv. Technically, as you can see, the ooni-probe==0.0.12 package *does* install, but the way the dependencies are requested in setup.py fails.

I can´t package a thing which does not install. :/

Child Tickets

Change History (2)

comment:1 Changed 5 years ago by hellais

Resolution: fixed
Status: newclosed

This has been fixed in the latest release.

comment:2 Changed 18 months ago by teor

Severity: Normal

Set all tickets without a severity to "Normal"

Note: See TracTickets for help on using tickets.