From 3e079787be48e8b7e5f120bfe0008839c10fe9c8 Mon Sep 17 00:00:00 2001 From: fuzzgun Date: Sun, 30 Jun 2013 11:17:49 +0100 Subject: [PATCH 1/3] Altered Makefile to avoid needing to chase changes --- Makefile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ac602a3f..d6ef4f33 100755 --- a/Makefile +++ b/Makefile @@ -27,16 +27,7 @@ install: mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24 mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24/apps - install -m 644 src/*.ui $(DEST_APP) - install -m 644 src/*.py $(DEST_APP) - install -m 644 src/*.qrc $(DEST_APP) - - install -m 644 src/images/*.png $(DEST_APP)/images - install -m 644 src/images/*.ico $(DEST_APP)/images - install -m 644 src/pyelliptic/*.py $(DEST_APP)/pyelliptic - install -m 644 src/socks/*.py $(DEST_APP)/socks - install -m 644 src/bitmessageqt/*.py $(DEST_APP)/bitmessageqt - install -m 644 src/translations/*.qm $(DEST_APP)/translations + cp -r src/* $(DEST_APP) install -m 755 debian/pybm $(DESTDIR)/usr/bin/$(APP) install -m 644 desktop/$(APP).desktop $(DEST_SHARE)/applications/$(APP).desktop From b038edf2b2ae498eedd25059abd58214ba58175d Mon Sep 17 00:00:00 2001 From: fuzzgun Date: Sun, 30 Jun 2013 16:16:41 +0100 Subject: [PATCH 2/3] Repairing debian packaging --- Makefile | 52 +++++++++++++++++++-------------------- debian.sh | 3 ++- debian/changelog | 30 +++++++++++++++++++++++ debian/rules | 64 ++++++++++++++++++++++-------------------------- 4 files changed, 87 insertions(+), 62 deletions(-) diff --git a/Makefile b/Makefile index d6ef4f33..afb6744e 100755 --- a/Makefile +++ b/Makefile @@ -1,43 +1,43 @@ APP=pybitmessage VERSION=0.3.4 -DEST_SHARE=$(DESTDIR)/usr/share -DEST_APP=$(DEST_SHARE)/$(APP) +DEST_SHARE=${DESTDIR}/usr/share +DEST_APP=${DEST_SHARE}/${APP} all: debug: source: - tar -cvzf ../$(APP)_$(VERSION).orig.tar.gz ../$(APP)-$(VERSION) --exclude-vcs + tar -cvzf ../${APP}_${VERSION}.orig.tar.gz ../${APP}-${VERSION} --exclude-vcs install: - mkdir -m 755 -p $(DESTDIR)/usr/bin - mkdir -m 755 -p $(DEST_APP) - mkdir -m 755 -p $(DEST_SHARE)/applications - mkdir -m 755 -p $(DEST_APP)/images - mkdir -m 755 -p $(DEST_APP)/pyelliptic - mkdir -m 755 -p $(DEST_APP)/socks - mkdir -m 755 -p $(DEST_APP)/bitmessageqt - mkdir -m 755 -p $(DEST_APP)/translations - mkdir -m 755 -p $(DEST_SHARE)/pixmaps - mkdir -m 755 -p $(DEST_SHARE)/icons - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/scalable - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/scalable/apps - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24 - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24/apps + mkdir -m 755 -p ${DESTDIR}/usr/bin + mkdir -m 755 -p ${DEST_APP} + mkdir -m 755 -p ${DEST_SHARE}/applications + mkdir -m 755 -p ${DEST_APP}/images + mkdir -m 755 -p ${DEST_APP}/pyelliptic + mkdir -m 755 -p ${DEST_APP}/socks + mkdir -m 755 -p ${DEST_APP}/bitmessageqt + mkdir -m 755 -p ${DEST_APP}/translations + mkdir -m 755 -p ${DEST_SHARE}/pixmaps + mkdir -m 755 -p ${DEST_SHARE}/icons + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable/apps + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24 + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24/apps - cp -r src/* $(DEST_APP) - install -m 755 debian/pybm $(DESTDIR)/usr/bin/$(APP) + cp -r src/* ${DEST_APP} + install -m 755 debian/pybm ${DESTDIR}/usr/bin/${APP} - install -m 644 desktop/$(APP).desktop $(DEST_SHARE)/applications/$(APP).desktop - install -m 644 src/images/can-icon-24px.png $(DEST_SHARE)/icons/hicolor/24x24/apps/$(APP).png - install -m 644 desktop/can-icon.svg $(DEST_SHARE)/icons/hicolor/scalable/apps/$(APP).svg - install -m 644 desktop/can-icon.svg $(DEST_SHARE)/pixmaps/$(APP).svg + install -m 644 desktop/${APP}.desktop ${DEST_SHARE}/applications/${APP}.desktop + install -m 644 src/images/can-icon-24px.png ${DEST_SHARE}/icons/hicolor/24x24/apps/${APP}.png + install -m 644 desktop/can-icon.svg ${DEST_SHARE}/icons/hicolor/scalable/apps/${APP}.svg + install -m 644 desktop/can-icon.svg ${DEST_SHARE}/pixmaps/${APP}.svg clean: - rm -rf debian/$(APP) - rm -f ../$(APP)_*.deb ../$(APP)_*.asc ../$(APP)_*.dsc ../$(APP)*.changes + rm -rf debian/${APP} + rm -f ../${APP}_*.deb ../${APP}_*.asc ../${APP}_*.dsc ../${APP}*.changes rm -f *.sh~ src/*.pyc src/socks/*.pyc src/pyelliptic/*.pyc rm -f *.deb \#* \.#* debian/*.log debian/*.substvars rm -f Makefile~ diff --git a/debian.sh b/debian.sh index 4b9410ed..ac26380e 100755 --- a/debian.sh +++ b/debian.sh @@ -9,6 +9,7 @@ APP=pybitmessage PREV_VERSION=0.3.3 VERSION=0.3.4 +RELEASE=1 ARCH_TYPE=all #update version numbers automatically - so you don't have to @@ -27,5 +28,5 @@ dpkg-buildpackage -A # change the directory name back mv ../${APP}-${VERSION} ../PyBitmessage -gpg -ba ../${APP}_${VERSION}-1_${ARCH_TYPE}.deb +gpg -ba ../${APP}_${VERSION}-${RELEASE}_${ARCH_TYPE}.deb gpg -ba ../${APP}_${VERSION}.orig.tar.gz diff --git a/debian/changelog b/debian/changelog index 8c78203e..1d822cd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,33 @@ +pybitmessage (0.3.4-1) raring; urgency=low + + * Switched addr, msg, broadcast, and getpubkey message types + to 8 byte time. Last remaining type is pubkey. + * Added tooltips to show the full subject of messages + * Added Maximum Acceptable Difficulty fields in the settings + * Send out pubkey immediately after generating deterministic + addresses rather than waiting for a request + + -- Bob Mottram (4096 bits) Sun, 30 June 2013 11:23:00 +0100 + +pybitmessage (0.3.3-1) raring; urgency=low + + * Remove inbox item from GUI when using API command trashMessage + * Add missing trailing semicolons to pybitmessage.desktop + * Ensure $(DESTDIR)/usr/bin exists + * Update Makefile to correct sandbox violations when built + via Portage (Gentoo) + * Fix message authentication bug + + -- Bob Mottram (4096 bits) Sun, 30 June 2013 11:23:00 +0100 + +pybitmessage (0.3.211-1) raring; urgency=low + + * Removed multi-core proof of work + as the multiprocessing module does not work well with + pyinstaller's --onefile option. + + -- Bob Mottram (4096 bits) Sun, 30 June 2013 11:23:00 +0100 + pybitmessage (0.3.2-1) raring; urgency=low * Bugfix: Remove remaining references to the old myapp.trayIcon diff --git a/debian/rules b/debian/rules index 0f873425..2a7767b6 100755 --- a/debian/rules +++ b/debian/rules @@ -1,12 +1,13 @@ #!/usr/bin/make -f APP=pybitmessage - -DEST_MAIN=$(CURDIR)/debian/$(APP)/usr/bin -DEST_SHARE=$(CURDIR)/debian/$(APP)/usr/share -DEST_APP=$(DEST_SHARE)/$(APP) +DESTDIR=${CURDIR}/debian/${APP} +DEST_SHARE=${DESTDIR}/usr/share +DEST_APP=${DEST_SHARE}/${APP} build: build-stamp make +build-arch: build-stamp +build-indep: build-stamp build-stamp: dh_testdir touch build-stamp @@ -15,50 +16,43 @@ clean: dh_testroot rm -f build-stamp dh_clean -install: build clean +install: dh_testdir dh_testroot dh_prep + dh_clean -k dh_installdirs - mkdir -m 755 -p $(CURDIR)/debian/$(APP)/usr - mkdir -m 755 -p $(CURDIR)/debian/$(APP)/usr/bin - mkdir -m 755 -p $(DEST_APP) - mkdir -m 755 -p $(DEST_SHARE)/applications - mkdir -m 755 -p $(DEST_APP)/images - mkdir -m 755 -p $(DEST_APP)/pyelliptic - mkdir -m 755 -p $(DEST_APP)/socks - mkdir -m 755 -p $(DEST_APP)/bitmessageqt - mkdir -m 755 -p $(DEST_SHARE)/pixmaps - mkdir -m 755 -p $(DEST_SHARE)/icons - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/scalable - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/scalable/apps - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24 - mkdir -m 755 -p $(DEST_SHARE)/icons/hicolor/24x24/apps + mkdir -m 755 -p ${DESTDIR}/usr/bin + mkdir -m 755 -p ${DEST_APP} + mkdir -m 755 -p ${DEST_SHARE}/applications + mkdir -m 755 -p ${DEST_APP}/images + mkdir -m 755 -p ${DEST_APP}/pyelliptic + mkdir -m 755 -p ${DEST_APP}/socks + mkdir -m 755 -p ${DEST_APP}/bitmessageqt + mkdir -m 755 -p ${DEST_APP}/translations + mkdir -m 755 -p ${DEST_SHARE}/pixmaps + mkdir -m 755 -p ${DEST_SHARE}/icons + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/scalable/apps + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24 + mkdir -m 755 -p ${DEST_SHARE}/icons/hicolor/24x24/apps - install -m 644 $(CURDIR)/src/*.ui $(DEST_APP) - install -m 644 $(CURDIR)/src/*.py $(DEST_APP) - install -m 644 $(CURDIR)/src/*.qrc $(DEST_APP) + cp -r src/* ${DEST_APP} + install -m 755 debian/pybm ${DESTDIR}/usr/bin/${APP} - install -m 644 $(CURDIR)/src/images/*.png $(DEST_APP)/images - install -m 644 $(CURDIR)/src/images/*.ico $(DEST_APP)/images - install -m 644 $(CURDIR)/src/pyelliptic/*.py $(DEST_APP)/pyelliptic - install -m 644 $(CURDIR)/src/socks/*.py $(DEST_APP)/socks - install -m 644 $(CURDIR)/src/bitmessageqt/*.py $(DEST_APP)/bitmessageqt - install -m 755 $(CURDIR)/debian/pybm $(DEST_MAIN)/pybitmessage + install -m 644 desktop/${APP}.desktop ${DEST_SHARE}/applications/${APP}.desktop + install -m 644 src/images/can-icon-24px.png ${DEST_SHARE}/icons/hicolor/24x24/apps/${APP}.png + install -m 644 desktop/can-icon.svg ${DEST_SHARE}/icons/hicolor/scalable/apps/${APP}.svg + install -m 644 desktop/can-icon.svg ${DEST_SHARE}/pixmaps/${APP}.svg - install -m 644 $(CURDIR)/desktop/$(APP).desktop $(DEST_SHARE)/applications/$(APP).desktop - install -m 644 $(CURDIR)/src/images/can-icon-24px.png $(DEST_SHARE)/icons/hicolor/24x24/apps/$(APP).png - install -m 644 $(CURDIR)/desktop/can-icon.svg $(DEST_SHARE)/icons/hicolor/scalable/apps/$(APP).svg - install -m 644 $(CURDIR)/desktop/can-icon.svg $(DEST_SHARE)/pixmaps/$(APP).svg binary-indep: build install dh_shlibdeps dh_testdir dh_testroot dh_installchangelogs dh_installdocs -# dh_installexamples # dh_installman dh_link dh_compress @@ -68,5 +62,5 @@ binary-indep: build install dh_md5sums dh_builddeb binary-arch: build install -binary: binary-indep +binary: binary-indep binary-arch .PHONY: build clean binary-indep binary install From 55b899f5c1ee305161986601a0a5d656e99e0e5c Mon Sep 17 00:00:00 2001 From: Pedro Gimeno Date: Tue, 2 Jul 2013 17:43:54 +0200 Subject: [PATCH 3/3] Better fix for issue #183 The former patch was too local; this one integrates better with the structure of the code. --- src/class_receiveDataThread.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index a023f80b..ced951b2 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -65,11 +65,9 @@ class receiveDataThread(threading.Thread): print 'ID of the receiveDataThread is', str(id(self)) + '. The size of the shared.connectedHostsList is now', len(shared.connectedHostsList) shared.printLock.release() while True: + dataLen = len(self.data) try: - dataLen = len(self.data) self.data += self.sock.recv(4096) - if len(self.data) == dataLen: # recv returns 0 bytes when the remote closes the connection - raise Exception("Remote closed the connection") except socket.timeout: shared.printLock.acquire() print 'Timeout occurred waiting for data from', self.HOST + '. Closing receiveData thread. (ID:', str(id(self)) + ')' @@ -81,7 +79,7 @@ class receiveDataThread(threading.Thread): shared.printLock.release() break # print 'Received', repr(self.data) - if self.data == "": + if len(self.data) == dataLen: shared.printLock.acquire() print 'Connection to', self.HOST, 'closed. Closing receiveData thread. (ID:', str(id(self)) + ')' shared.printLock.release()