diff --git a/arch.sh b/arch.sh index 0ccc45b3..77332d09 100755 --- a/arch.sh +++ b/arch.sh @@ -1,8 +1,8 @@ #!/bin/bash APP=pybitmessage -PREV_VERSION=0.3.5 -VERSION=0.3.5 +PREV_VERSION=0.3.4 +VERSION=0.3.4 RELEASE=1 ARCH_TYPE=`uname -m` CURRDIR=`pwd` diff --git a/archpackage/PKGBUILD b/archpackage/PKGBUILD index efbf33e2..e36c1a11 100644 --- a/archpackage/PKGBUILD +++ b/archpackage/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Bob Mottram (4096 bits) pkgname=pybitmessage -pkgver=0.3.5 +pkgver=0.3.4 pkgrel=1 pkgdesc="Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide "non-content" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." arch=('i686' 'x86_64') diff --git a/debian.sh b/debian.sh old mode 100755 new mode 100644 index a4d6882e..2d924251 --- a/debian.sh +++ b/debian.sh @@ -2,7 +2,7 @@ APP=pybitmessage PREV_VERSION=0.3.4 -VERSION=0.3.5 +VERSION=0.3.4 RELEASE=1 ARCH_TYPE=`uname -m` DIR=${APP}-${VERSION} diff --git a/debian/changelog b/debian/changelog index 711f6488..b6e8adbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,31 +1,3 @@ -pybitmessage (0.3.5-1) raring; urgency=low - - * Inbox message retrieval API functions now also returns read status - * Added right-click option to mark a message as unread - * Prompt user to connect at first startup - * Install into /usr/local by default - * Add a missing rm -f to the uninstall task. - * Use system text color for enabled addresses instead of black - * Added support for Chans - * Start storing msgid in sent table - * Optionally play sounds on connection/disconnection or when messages arrive - * Adding configuration option to listen for connections when using SOCKS - * Added packaging for multiple distros (Arch, Puppy, Slack, etc.) - * Added Russian translation - * Added search support in the UI - * Added 'make uninstall' - * To improve OSX support, use PKCS5_PBKDF2_HMAC_SHA1 if PKCS5_PBKDF2_HMAC is unavailable - * Added better warnings for OSX users who are using old versions of Python - * Repaired debian packaging - * Altered Makefile to avoid needing to chase changes - * Added logger module - * Added bgWorker class for background tasks - * Added use of gevent module - * On not-Windows: Fix insecure keyfile permissions - * Fix 100% CPU usage issue - - -- Bob Mottram (4096 bits) Mon, 29 July 2013 22:11:00 +0100 - pybitmessage (0.3.4-1) raring; urgency=low * Switched addr, msg, broadcast, and getpubkey message types diff --git a/debian/rules b/debian/rules old mode 100755 new mode 100644 diff --git a/ebuild.sh b/ebuild.sh index ed7f1903..1a3d16e0 100755 --- a/ebuild.sh +++ b/ebuild.sh @@ -1,8 +1,8 @@ #!/bin/bash APP=pybitmessage -PREV_VERSION=0.3.5 -VERSION=0.3.5 +PREV_VERSION=0.3.4 +VERSION=0.3.4 RELEASE=1 SOURCEDIR=. ARCH_TYPE=`uname -m` diff --git a/ebuildpackage/pybitmessage-0.3.5-1.ebuild b/ebuildpackage/pybitmessage-0.3.4-1.ebuild similarity index 100% rename from ebuildpackage/pybitmessage-0.3.5-1.ebuild rename to ebuildpackage/pybitmessage-0.3.4-1.ebuild diff --git a/generate.sh b/generate.sh index d21f4d83..173e3c79 100755 --- a/generate.sh +++ b/generate.sh @@ -4,4 +4,4 @@ rm -f Makefile rpmpackage/*.spec -packagemonkey -n "PyBitmessage" --version "0.3.5" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, gst123" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs, gst123" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip, gst123" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl, gst123" --suggestsarch "python2-gevent" --pythonversion 2 --dependsebuild "dev-libs/openssl, dev-python/PyQt4[${PYTHON_USEDEP}]" --buildebuild "\${PYTHON_DEPS}" --pythonreq "sqlite" --repository "https://github.com/Bitmessage/PyBitmessage.git" +packagemonkey -n "PyBitmessage" --version "0.3.4" --dir "." -l "mit" -e "Bob Mottram (4096 bits) " --brief "Send encrypted messages" --desc "Bitmessage is a P2P communications protocol used to send encrypted messages to another person or to many subscribers. It is decentralized and trustless, meaning that you need-not inherently trust any entities like root certificate authorities. It uses strong authentication which means that the sender of a message cannot be spoofed, and it aims to hide \"non-content\" data, like the sender and receiver of messages, from passive eavesdroppers like those running warrantless wiretapping programs." --homepage "https://github.com/Bitmessage/PyBitmessage" --section "mail" --categories "Office/Email" --dependsdeb "python (>= 2.7.0), openssl, python-qt4, libqt4-dev (>= 4.8.0), python-qt4-dev, sqlite3, libsqlite3-dev, gst123" --dependsrpm "python, PyQt4, openssl-compat-bitcoin-libs, gst123" --mainscript "bitmessagemain.py" --librarypath "/opt/openssl-compat-bitcoin/lib/" --suggestsdeb "libmessaging-menu-dev" --dependspuppy "openssl, python-qt4, sqlite3, sqlite3-dev, python-openssl, python-sip, gst123" --dependsarch "python2, qt4, python2-pyqt4, sqlite, openssl, gst123" --suggestsarch "python2-gevent" --pythonversion 2 --dependsebuild "dev-libs/openssl, dev-python/PyQt4[${PYTHON_USEDEP}]" --buildebuild "\${PYTHON_DEPS}" --pythonreq "sqlite" --repository "https://github.com/Bitmessage/PyBitmessage.git" diff --git a/puppy.sh b/puppy.sh index 5f2fcae0..efe1d7da 100755 --- a/puppy.sh +++ b/puppy.sh @@ -1,8 +1,8 @@ #!/bin/bash APP=pybitmessage -PREV_VERSION=0.3.5 -VERSION=0.3.5 +PREV_VERSION=0.3.4 +VERSION=0.3.4 RELEASE=1 BUILDDIR=~/petbuild CURRDIR=`pwd` diff --git a/puppypackage/pybitmessage-0.3.4.pet.specs b/puppypackage/pybitmessage-0.3.4.pet.specs new file mode 100644 index 00000000..aac180a9 --- /dev/null +++ b/puppypackage/pybitmessage-0.3.4.pet.specs @@ -0,0 +1 @@ +pybitmessage-0.3.4-1|PyBitmessage|0.3.4|1|Internet;mailnews;|5.8M||pybitmessage-0.3.4-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| diff --git a/puppypackage/pybitmessage-0.3.5.pet.specs b/puppypackage/pybitmessage-0.3.5.pet.specs deleted file mode 100644 index 939294e4..00000000 --- a/puppypackage/pybitmessage-0.3.5.pet.specs +++ /dev/null @@ -1 +0,0 @@ -pybitmessage-0.3.5-1|PyBitmessage|0.3.5|1|Internet;mailnews;|7.2M||pybitmessage-0.3.5-1.pet|+openssl,+python-qt4,+sqlite3,+sqlite3-dev,+python-openssl,+python-sip,+gst123|Send encrypted messages|ubuntu|precise|5| diff --git a/rpm.sh b/rpm.sh index 09064280..8269ed9c 100755 --- a/rpm.sh +++ b/rpm.sh @@ -1,8 +1,8 @@ #!/bin/bash APP=pybitmessage -PREV_VERSION=0.3.5 -VERSION=0.3.5 +PREV_VERSION=0.3.4 +VERSION=0.3.4 RELEASE=1 SOURCEDIR=. ARCH_TYPE=`uname -m` diff --git a/rpmpackage/pybitmessage.spec b/rpmpackage/pybitmessage.spec index b15bd586..9c12661a 100644 --- a/rpmpackage/pybitmessage.spec +++ b/rpmpackage/pybitmessage.spec @@ -1,5 +1,5 @@ Name: pybitmessage -Version: 0.3.5 +Version: 0.3.4 Release: 1%{?dist} Summary: Send encrypted messages License: MIT @@ -68,31 +68,6 @@ make install -B DESTDIR=%{buildroot} PREFIX=/usr %attr(644,root,root) /usr/share/icons/hicolor/24x24/apps/%{name}.png %changelog -* Mon Jul 29 2013 Bob Mottram (4096 bits) - 0.3.5-1 -- Inbox message retrieval API functions now also returns read status -- Added right-click option to mark a message as unread -- Prompt user to connect at first startup -- Install into /usr/local by default -- Add a missing rm -f to the uninstall task. -- Use system text color for enabled addresses instead of black -- Added support for Chans -- Start storing msgid in sent table -- Optionally play sounds on connection/disconnection or when messages arrive -- Adding configuration option to listen for connections when using SOCKS -- Added packaging for multiple distros (Arch, Puppy, Slack, etc.) -- Added Russian translation -- Added search support in the UI -- Added 'make uninstall' -- To improve OSX support, use PKCS5_PBKDF2_HMAC_SHA1 if PKCS5_PBKDF2_HMAC is unavailable -- Added better warnings for OSX users who are using old versions of Python -- Repaired debian packaging -- Altered Makefile to avoid needing to chase changes -- Added logger module -- Added bgWorker class for background tasks -- Added use of gevent module -- On not-Windows: Fix insecure keyfile permissions -- Fix 100% CPU usage issue - * Sun Jun 30 2013 Bob Mottram (4096 bits) - 0.3.4-1 - Switched addr, msg, broadcast, and getpubkey message types to 8 byte time. Last remaining type is pubkey. diff --git a/slack.sh b/slack.sh index 112488c0..5d826e0b 100755 --- a/slack.sh +++ b/slack.sh @@ -1,8 +1,8 @@ #!/bin/bash APP=pybitmessage -PREV_VERSION=0.3.5 -VERSION=0.3.5 +PREV_VERSION=0.3.4 +VERSION=0.3.4 RELEASE=1 ARCH_TYPE=`uname -m` BUILDDIR=~/slackbuild diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 51b9a82d..add370a0 100644 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -677,6 +677,23 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): shared.UISignalQueue.put(('rerenderInboxFromLabels', '')) shared.UISignalQueue.put(('rerenderSubscriptions', '')) return 'Deleted subscription if it existed.' + elif method == 'listSubscriptions': + if len(params) != 0: + return "API Error 0000: I don't accept parameters!" + shared.sqlLock.acquire() + shared.sqlSubmitQueue.put('''SELECT label, address, enabled FROM subscriptions''') + shared.sqlSubmitQueue.put('') + queryreturn = shared.sqlReturnQueue.get() + shared.sqlLock.release() + data = '{"subscriptions":[' + for row in queryreturn: + label, address, enabled = row + label = shared.fixPotentiallyInvalidUTF8Data(label) + if len(data) > 20: + data += ',' + data += json.dumps({'label':label.encode('base64'), 'address': address, 'enabled': enabled == 1}, indent=4, separators=(',',': ')) + data += ']}' + return data elif method == 'clientStatus': return '{ "networkConnections" : "%s" }' % str(len(shared.connectedHostsList)) else: diff --git a/src/build_osx.py b/src/build_osx.py index 901d1ca6..dd3d7259 100644 --- a/src/build_osx.py +++ b/src/build_osx.py @@ -1,16 +1,80 @@ -from setuptools import setup +""" +py2app/py2exe build script for Bitmessage + +Usage (Mac OS X): + python setup.py py2app + +Usage (Windows): + python setup.py py2exe +""" + +import sys, os, shutil, re +from setuptools import setup # @UnresolvedImport + name = "Bitmessage" -version = "0.3.4" -mainscript = ["bitmessagemain.py"] +mainscript = 'bitmessagemain.py' +version = "0.3.5" + +if sys.platform == 'darwin': + extra_options = dict( + setup_requires=['py2app'], + app=[mainscript], + options=dict(py2app=dict(argv_emulation=True, + includes = ['PyQt4.QtCore','PyQt4.QtGui', 'sip', 'sqlite3'], + packages = ['bitmessageqt'], + frameworks = ['/usr/local/opt/openssl/lib/libcrypto.dylib'], + iconfile='images/bitmessage.icns', + resources=["images"])), + ) +elif sys.platform == 'win32': + extra_options = dict( + setup_requires=['py2exe'], + app=[mainscript], + ) +else: + extra_options = dict( + # Normally unix-like platforms will use "setup.py install" + # and install the main script as such + scripts=[mainscript], + ) setup( - name = name, - version = version, - app = mainscript, - setup_requires = ["py2app"], - options = dict(py2app=dict( - resources = ["images"], - iconfile = "images/bitmessage.icns" - )) + name = name, + version = version, + **extra_options ) +from distutils import dir_util +import glob + +if sys.platform == 'darwin': + resource = "dist/" + name + ".app/Contents/Resources/" + framework = "dist/" + name + ".app/Contents/Frameworks/" + + # The pyElliptive module only works with hardcoded libcrypto paths so rename it so it can actually find it. + libs = glob.glob(framework + "libcrypto*.dylib") + for lib in libs: + os.rename(lib, framework + "libcrypto.dylib") + break + + # Try to locate qt_menu + # Let's try the port version first! + if os.path.isfile("/opt/local/lib/Resources/qt_menu.nib"): + qt_menu_location = "/opt/local/lib/Resources/qt_menu.nib" + else: + # No dice? Then let's try the brew version + qt_menu_location = os.popen("find /usr/local/Cellar -name qt_menu.nib | tail -n 1").read() + qt_menu_location = re.sub('\n','', qt_menu_location) + + if(len(qt_menu_location) == 0): + print "Sorry couldn't find your qt_menu.nib this probably won't work" + else: + print "Found your qib: " + qt_menu_location + + # Need to include a copy of qt_menu.nib + shutil.copytree(qt_menu_location, resource + "qt_menu.nib") + # Need to touch qt.conf to avoid loading 2 sets of Qt libraries + fname = resource + "qt.conf" + with file(fname, 'a'): + os.utime(fname, None) +