Import PyBitmessage 0.4.4 as net/py-bitmessage

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.
This commit is contained in:
kamil 2015-12-13 00:31:53 +00:00
parent 529b790a7a
commit b04705f9d2
7 changed files with 267 additions and 0 deletions

7
net/py-bitmessage/DESCR Normal file
View file

@ -0,0 +1,7 @@
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.

View file

@ -0,0 +1,37 @@
# $NetBSD: Makefile,v 1.1 2015/12/13 00:31:53 kamil Exp $
GITHUB_PROJECT= PyBitmessage
DISTNAME= ${PYPKGPREFIX}-bitmessage-0.4.4
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_GITHUB:=Bitmessage/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= ${MASTER_SITE_GITHUB:=Bitmessage/PyBitmessage/}
COMMENT= P2P communications protocol used to send encrypted messages
LICENSE= mit
PYTHON_VERSIONS_INCOMPATIBLE= 33 34 35
HAS_CONFIGURE= yes
USE_LANGUAGES= # none
REPLACE_PYTHON+= src/bitmessagemain.py
REPLACE_PYTHON+= src/pyelliptic/cipher.py
REPLACE_PYTHON+= src/pyelliptic/ecc.py
REPLACE_PYTHON+= src/pyelliptic/hash.py
REPLACE_PYTHON+= src/pyelliptic/openssl.py
REPLACE_PYTHON+= src/qidenticon.py
REPLACE_PYTHON+= src/singleton.py
# Hack
post-install:
${RUN} rm -f ${DESTDIR}${PREFIX}/share/pybitmessage/helper_startup.py.orig
${RUN} rm -f ${DESTDIR}${PREFIX}/share/pybitmessage/shared.py.orig
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../x11/py-qt4/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"

134
net/py-bitmessage/PLIST Normal file
View file

@ -0,0 +1,134 @@
@comment $NetBSD: PLIST,v 1.1 2015/12/13 00:31:53 kamil Exp $
bin/pybitmessage
man/man1/pybitmessage.1
share/applications/pybitmessage.desktop
share/icons/hicolor/24x24/apps/pybitmessage.png
share/icons/hicolor/scalable/apps/pybitmessage.svg
share/pybitmessage/addresses.py
share/pybitmessage/api.py
share/pybitmessage/api_client.py
share/pybitmessage/bitmessagecurses/__init__.py
share/pybitmessage/bitmessagemain.py
share/pybitmessage/bitmessageqt/__init__.py
share/pybitmessage/bitmessageqt/about.py
share/pybitmessage/bitmessageqt/about.ui
share/pybitmessage/bitmessageqt/addaddressdialog.py
share/pybitmessage/bitmessageqt/addaddressdialog.ui
share/pybitmessage/bitmessageqt/addpeer.ui
share/pybitmessage/bitmessageqt/bitmessage_icons.qrc
share/pybitmessage/bitmessageqt/bitmessage_icons_rc.py
share/pybitmessage/bitmessageqt/bitmessageui.py
share/pybitmessage/bitmessageqt/bitmessageui.ui
share/pybitmessage/bitmessageqt/connect.py
share/pybitmessage/bitmessageqt/connect.ui
share/pybitmessage/bitmessageqt/help.py
share/pybitmessage/bitmessageqt/help.ui
share/pybitmessage/bitmessageqt/iconglossary.py
share/pybitmessage/bitmessageqt/iconglossary.ui
share/pybitmessage/bitmessageqt/newaddressdialog.py
share/pybitmessage/bitmessageqt/newaddressdialog.ui
share/pybitmessage/bitmessageqt/newchandialog.py
share/pybitmessage/bitmessageqt/newchandialog.ui
share/pybitmessage/bitmessageqt/newsubscriptiondialog.py
share/pybitmessage/bitmessageqt/newsubscriptiondialog.ui
share/pybitmessage/bitmessageqt/regenerateaddresses.py
share/pybitmessage/bitmessageqt/regenerateaddresses.ui
share/pybitmessage/bitmessageqt/settings.py
share/pybitmessage/bitmessageqt/settings.ui
share/pybitmessage/bitmessageqt/specialaddressbehavior.py
share/pybitmessage/bitmessageqt/specialaddressbehavior.ui
share/pybitmessage/bitmessageqt/wanlan.ui
share/pybitmessage/build_osx.py
share/pybitmessage/class_addressGenerator.py
share/pybitmessage/class_objectHashHolder.py
share/pybitmessage/class_objectProcessor.py
share/pybitmessage/class_outgoingSynSender.py
share/pybitmessage/class_receiveDataThread.py
share/pybitmessage/class_sendDataThread.py
share/pybitmessage/class_singleCleaner.py
share/pybitmessage/class_singleListener.py
share/pybitmessage/class_singleWorker.py
share/pybitmessage/class_sqlThread.py
share/pybitmessage/debug.py
share/pybitmessage/defaultKnownNodes.py
share/pybitmessage/helper_bitcoin.py
share/pybitmessage/helper_bootstrap.py
share/pybitmessage/helper_generic.py
share/pybitmessage/helper_inbox.py
share/pybitmessage/helper_sent.py
share/pybitmessage/helper_sql.py
share/pybitmessage/helper_startup.py
share/pybitmessage/highlevelcrypto.py
share/pybitmessage/images/addressbook.png
share/pybitmessage/images/bitmessage.icns
share/pybitmessage/images/blacklist.png
share/pybitmessage/images/can-icon-16px.png
share/pybitmessage/images/can-icon-24px-green.png
share/pybitmessage/images/can-icon-24px-red.png
share/pybitmessage/images/can-icon-24px-yellow.png
share/pybitmessage/images/can-icon-24px.png
share/pybitmessage/images/can-icon.ico
share/pybitmessage/images/greenicon.png
share/pybitmessage/images/identities.png
share/pybitmessage/images/inbox.png
share/pybitmessage/images/networkstatus.png
share/pybitmessage/images/no_identicons.png
share/pybitmessage/images/qidenticon.png
share/pybitmessage/images/qidenticon_two.png
share/pybitmessage/images/qidenticon_two_x.png
share/pybitmessage/images/qidenticon_x.png
share/pybitmessage/images/redicon.png
share/pybitmessage/images/send.png
share/pybitmessage/images/sent.png
share/pybitmessage/images/subscriptions.png
share/pybitmessage/images/yellowicon.png
share/pybitmessage/l10n.py
share/pybitmessage/message_data_reader.py
share/pybitmessage/namecoin.py
share/pybitmessage/proofofwork.py
share/pybitmessage/pyelliptic/LICENSE
share/pybitmessage/pyelliptic/README.md
share/pybitmessage/pyelliptic/__init__.py
share/pybitmessage/pyelliptic/arithmetic.py
share/pybitmessage/pyelliptic/cipher.py
share/pybitmessage/pyelliptic/ecc.py
share/pybitmessage/pyelliptic/hash.py
share/pybitmessage/pyelliptic/openssl.py
share/pybitmessage/qidenticon.py
share/pybitmessage/shared.py
share/pybitmessage/singleton.py
share/pybitmessage/socks/BUGS
share/pybitmessage/socks/LICENSE
share/pybitmessage/socks/README
share/pybitmessage/socks/__init__.py
share/pybitmessage/tr.py
share/pybitmessage/translations/bitmessage_ar.pro
share/pybitmessage/translations/bitmessage_ar.qm
share/pybitmessage/translations/bitmessage_ar.ts
share/pybitmessage/translations/bitmessage_de.pro
share/pybitmessage/translations/bitmessage_de.qm
share/pybitmessage/translations/bitmessage_de.ts
share/pybitmessage/translations/bitmessage_en_pirate.pro
share/pybitmessage/translations/bitmessage_en_pirate.qm
share/pybitmessage/translations/bitmessage_en_pirate.ts
share/pybitmessage/translations/bitmessage_eo.pro
share/pybitmessage/translations/bitmessage_eo.qm
share/pybitmessage/translations/bitmessage_eo.ts
share/pybitmessage/translations/bitmessage_fr.pro
share/pybitmessage/translations/bitmessage_fr.qm
share/pybitmessage/translations/bitmessage_fr.ts
share/pybitmessage/translations/bitmessage_ja.pro
share/pybitmessage/translations/bitmessage_ja.qm
share/pybitmessage/translations/bitmessage_ja.ts
share/pybitmessage/translations/bitmessage_nl.pro
share/pybitmessage/translations/bitmessage_nl.qm
share/pybitmessage/translations/bitmessage_nl.ts
share/pybitmessage/translations/bitmessage_no.pro
share/pybitmessage/translations/bitmessage_no.qm
share/pybitmessage/translations/bitmessage_no.ts
share/pybitmessage/translations/bitmessage_ru.pro
share/pybitmessage/translations/bitmessage_ru.qm
share/pybitmessage/translations/bitmessage_ru.ts
share/pybitmessage/translations/bitmessage_zh_cn.pro
share/pybitmessage/translations/bitmessage_zh_cn.qm
share/pybitmessage/translations/bitmessage_zh_cn.ts

View file

@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.1 2015/12/13 00:31:53 kamil Exp $
SHA1 (py27-bitmessage-0.4.4.tar.gz) = 60585ee922b53f96940898bf4c278ae035b32ab9
RMD160 (py27-bitmessage-0.4.4.tar.gz) = b6ea349ebfecd3ac2f809156cfeffedf95d36449
Size (py27-bitmessage-0.4.4.tar.gz) = 611490 bytes
SHA1 (patch-Makefile) = ae867577d5c6a0a5f4938d857b117701933b4ade
SHA1 (patch-src_helper__startup.py) = 1175e9f5279160ec8d533a188944c60283f6be22
SHA1 (patch-src_shared.py) = 691380e3879aaf776abbfe6711c791cd013ac127

View file

@ -0,0 +1,42 @@
$NetBSD: patch-Makefile,v 1.1 2015/12/13 00:31:54 kamil Exp $
Adjust paths for pkgsrc.
--- Makefile.orig 2014-10-15 21:16:27.000000000 +0000
+++ Makefile
@@ -13,13 +13,12 @@ source:
tar -cvf ../${APP}_${VERSION}.orig.tar ../${APP}-${VERSION} --exclude-vcs
gzip -f9n ../${APP}_${VERSION}.orig.tar
install:
- mkdir -p ${DESTDIR}/usr
mkdir -p ${DESTDIR}${PREFIX}
mkdir -p ${DESTDIR}${PREFIX}/bin
- mkdir -m 755 -p ${DESTDIR}${PREFIX}/share
- mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man
- mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1
- install -m 644 man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1
+ mkdir -m 755 -p ${DESTDIR}${PREFIX}/man
+ mkdir -m 755 -p ${DESTDIR}${PREFIX}/man/man1
+ gunzip man/${APP}.1.gz
+ install -m 644 man/${APP}.1 ${DESTDIR}${PREFIX}/man/man1
mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/${APP}
mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/applications
mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/pixmaps
@@ -34,15 +33,10 @@ install:
install -m 644 desktop/can-icon.svg ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${APP}.svg
cp -rf src/* ${DESTDIR}${PREFIX}/share/${APP}
echo '#!/bin/sh' > ${DESTDIR}${PREFIX}/bin/${APP}
- echo 'if [ -d ${DESTDIR}/usr/local/share/${APP} ]; then' >> ${DESTDIR}${PREFIX}/bin/${APP}
- echo ' cd ${DESTDIR}/usr/local/share/${APP}' >> ${DESTDIR}${PREFIX}/bin/${APP}
- echo 'else' >> ${DESTDIR}${PREFIX}/bin/${APP}
- echo ' cd ${DESTDIR}/usr/share/pybitmessage' >> ${DESTDIR}${PREFIX}/bin/${APP}
- echo 'fi' >> ${DESTDIR}${PREFIX}/bin/${APP}
- echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP}
+ echo 'exec ${PREFIX}/share/${APP}/bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP}
chmod +x ${DESTDIR}${PREFIX}/bin/${APP}
uninstall:
- rm -f ${PREFIX}/share/man/man1/${APP}.1.gz
+ rm -f ${PREFIX}/man/man1/${APP}.1.gz
rm -rf ${PREFIX}/share/${APP}
rm -f ${PREFIX}/bin/${APP}
rm -f ${PREFIX}/share/applications/${APP}.desktop

View file

@ -0,0 +1,19 @@
$NetBSD: patch-src_helper__startup.py,v 1.1 2015/12/13 00:31:54 kamil Exp $
Unbreak version check of all BSDs.
Merged upstream:
https://github.com/Bitmessage/PyBitmessage/pull/811
--- src/helper_startup.py.orig 2014-10-15 21:16:27.000000000 +0000
+++ src/helper_startup.py
@@ -140,8 +140,8 @@ def loadConfig():
def isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections():
try:
- VER_THIS=StrictVersion(platform.version())
if sys.platform[0:3]=="win":
+ VER_THIS=StrictVersion(platform.version())
return StrictVersion("5.1.2600")<=VER_THIS and StrictVersion("6.0.6000")>=VER_THIS
return False
except Exception as err:

View file

@ -0,0 +1,20 @@
$NetBSD: patch-src_shared.py,v 1.1 2015/12/13 00:31:54 kamil Exp $
FreeBSD and NetBSD are compatible here.
Patch merged upstream:
https://github.com/Bitmessage/PyBitmessage/pull/812
--- src/shared.py.orig 2014-10-15 21:16:27.000000000 +0000
+++ src/shared.py
@@ -419,8 +419,8 @@ def checkSensitiveFilePermissions(filena
# TODO: This might deserve extra checks by someone familiar with
# Windows systems.
return True
- elif sys.platform[:7] == 'freebsd':
- # FreeBSD file systems are the same as major Linux file systems
+ elif sys.platform[:7] == 'freebsd' or sys.platform[:6] == 'netbsd':
+ # BSD file systems are the same as major Linux file systems
present_permissions = os.stat(filename)[0]
disallowed_permissions = stat.S_IRWXG | stat.S_IRWXO
return present_permissions & disallowed_permissions == 0