From 67176eaf018d9aa89b2a4e8a3a979a6b32138e23 Mon Sep 17 00:00:00 2001 From: Six-Pack Date: Sun, 9 Aug 2015 22:47:00 +0000 Subject: [PATCH] Add Tails docs, Fix pyinstaller cipher error, swap PIL for pillow --- README.TAILS | 36 ++++++++++++++++++++++++++++++++++++ axismundi_pyinst.spec | 10 +++++----- client.py | 17 +++++++---------- requirements.txt | 2 +- 4 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 README.TAILS diff --git a/README.TAILS b/README.TAILS new file mode 100644 index 0000000..16b1a4c --- /dev/null +++ b/README.TAILS @@ -0,0 +1,36 @@ +Instructions for Tails users + +Using the binary version of Axis Mundi is easier than running from source code because of the stripped down nature of Tails. +However if you wish to build from source then follow these step by step instructions. It is assumed that you are using a fresh, unmodified version of Tails. + +Firstly you must start Tails and login using the additional settings option. Set an administrative password. + +Then the following steps are necessary + +1) Open a terminal and enter the following commands, entering your administrative password when prompted: + sudo apt-get update + sudo apt-get install build-essential python-wxtools python-pip python-dev libjpeg-dev zlib1g-dev + sudo pip uninstall PIL + git clone https://github.com/six-pack/axis-mundi + cd axis-mundi + sudo torsocks pip install -r requirements.txt + +2) Tails uses very restrictive file-permissions when installing the python modules and they end up being inaccessible to anyone other than root. To fix this you must run the following command in the terminal: + sudo chmod -R o+r,o+X /usr/local/lib/python2.7/dist-packages + +3) Axis Mundi is now ready, however you must configure Tails firewall to permit access as follows: + sudo iptables -I OUTPUT 2 -p tcp -s 127.0.0.1 -d 127.0.0.1 -m owner --uid-owner amnesia -j ACCEPT + +4) Finally, Torbrowser needs a proxy exception for localhost as by default there isn't one. To make this change from inside Tor Browser: + Click Preferences > Advanced Tab > Click Network sub-tab + Now click 'settings' button + Add '127.0.0.1' to the list in the 'No proxy for' box. + Click OK + +5) You can now start axismundi. + +If you wish to create an Axis Mundi binary from source then simply execute the following command from your Axis Mundi directory: + pyinstaller axismundi-pyinst.spec + +The binary will be built and placed into the dist directory. Keep a copy of it on a persistent volume for easy use and is self-contained. + diff --git a/axismundi_pyinst.spec b/axismundi_pyinst.spec index 5a5fbd4..8fceb5a 100644 --- a/axismundi_pyinst.spec +++ b/axismundi_pyinst.spec @@ -8,8 +8,9 @@ a = Analysis(['client.py'], hiddenimports=[], hookspath=None, runtime_hooks=None, - excludes=None, - cipher=block_cipher) + excludes=None) +# cipher=block_cipher) + ##### include mydir in distribution ####### def extra_datas(mydir): def rec_glob(p, files): @@ -35,8 +36,7 @@ a.datas += extra_datas('templates') print a.datas -pyz = PYZ(a.pure, - cipher=block_cipher) +pyz = PYZ(a.pure) # , cipher=block_cipher) exe = EXE(pyz, a.scripts, a.binaries, @@ -44,7 +44,7 @@ exe = EXE(pyz, a.datas, name='axismundi', debug=False, - strip=True, + strip=False, upx=True, console=True, icon='icon.ico') diff --git a/client.py b/client.py index 81fe9fa..4083386 100755 --- a/client.py +++ b/client.py @@ -584,10 +584,7 @@ def createidentity(): # This is a flash("Error creating identity - secret file not created",category="error") return redirect(url_for('install')) # Now generate initial Bitcoin keys - if get_os() == 'Windows': - wordlist_path = app.bin_path + '\words.txt' # todo: make windows compatible - else: - wordlist_path = app.bin_path +'/words.txt' # todo: make windows compatible + wordlist_path = resource_path('words.txt') wallet_seed = generate_seed(wordlist_path,words=18) # todo: ensure wordcount reflects size of wordlist # Our published stealth address will be derived from a child key (index 1) which will be generated on the fly ## Now create & populate DB with initial values @@ -602,7 +599,7 @@ def createidentity(): # This is a flash('There was a problem creating the initial configuration in the storage database '+ 'storage.db',category="error") #return False session.commit() - sleep(0.1) + sleep(0.2) # Now set the proxy settings specified on the install page socks_proxy = session.query(app.roStorageDB.Config).filter(app.roStorageDB.Config.name == "proxy").first() socks_proxy_port = session.query(app.roStorageDB.Config).filter(app.roStorageDB.Config.name == "proxy_port").first() @@ -1009,14 +1006,14 @@ def run(self): option_nobrowser = False # By default try to start the status gui in the system tray if not option_nogui: -# try: + try: gui = wx.App() frame = wx.Frame(None) # empty frame trayicon_gui.TaskBarIcon() -# except: # If that fails assume nogui mode -# print "No display detected, disabling status gui" -# option_nogui = True -# option_nobrowser = True + except: # If that fails assume nogui mode + print "No display detected, disabling status gui" + option_nogui = True + option_nobrowser = True # Start the front end thread of the client front_end = Process(target=run) front_end.start() diff --git a/requirements.txt b/requirements.txt index 09948ba..46e2e1b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ python-gnupg>=0.3.7 pysocks>=1.5.4 paho-mqtt pybitcointools -pil +pillow wxPython \ No newline at end of file