[-- Attachment #1: Type: text/plain, Size: 2448 bytes --] There is a new pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 [WIP] Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [x] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> <!-- #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [x] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [x] armv7l - [ ] armv6l-musl --> This depends on #28272. I've added the package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1. Remaining issues: - The package builds and runs OK (tested opening and creating wallets), but I don't know if the oudated libsecp256k1 could be problematic with other functionality. - Difference between libbitcoin/secp256k1 and its upstream bitcoin-core/secp256k1? Possible to provide the bitcoin-core/secp256k1 version instead in Void? A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 14995 bytes --] From 781cd72de5506fe7ea3423d1b76d8d12322a7fb8 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/8] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..d9a195e6fd3 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 73798ed60b314f180286a11ceca0166b72ca71e5 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/8] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..bf8da44e087 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From e41a1e227a0efb1e586ee036b2a66b101acd76f7 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/8] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..43a3fdf71ad --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,21 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 4439c53947dc8f65d85813afbce452108120e476 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/8] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..1d7876978bc --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 402548bf6b86a539ca188b5e62670e4a9db392ae Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/8] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From a9806764454413c9aa53db39059e69f76e497554 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/8] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..9bf8299b1f1 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks>=1.0.1" +checkdepends="python3-aiohttp python3-attrs python3-socks>=1.0.1" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From a3f8e7388cc5062783aaffd277475495116b7a5b Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/8] New package: python3-bitstring --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From 281725adac3f20b83a453ec752cc92fdc55c4d86 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 8/8] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 13 +++-- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..dfbb612f0ff 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,13 +1,14 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 +hostmakedepends="python3-PyQt5-devel-tools python3-setuptools git automake libtool" +depends="python3-aiohttp python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" + python3-pyaes python3-pycryptodome python3-PyQt5 python3-socks>=1.0.1 + python3-qrcode libbitcoin-secp256k1" # Missing optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support @@ -19,7 +20,7 @@ license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 2453 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 [WIP] Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [x] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> <!-- #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [x] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [x] armv7l - [ ] armv6l-musl --> This depends on #28272. I've added the package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1. Remaining issues: - The package builds and runs OK (tested opening and creating wallets), but I don't know if the oudated libsecp256k1 could be problematic with other functionality. - Difference between libbitcoin/secp256k1 and its upstream bitcoin-core/secp256k1? Possible to provide the bitcoin-core/secp256k1 version instead in Void? A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 15001 bytes --] From 781cd72de5506fe7ea3423d1b76d8d12322a7fb8 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/8] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..d9a195e6fd3 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 73798ed60b314f180286a11ceca0166b72ca71e5 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/8] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..bf8da44e087 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From e41a1e227a0efb1e586ee036b2a66b101acd76f7 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/8] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..43a3fdf71ad --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,21 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 4439c53947dc8f65d85813afbce452108120e476 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/8] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..1d7876978bc --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 402548bf6b86a539ca188b5e62670e4a9db392ae Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/8] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From a9806764454413c9aa53db39059e69f76e497554 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/8] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..9bf8299b1f1 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks>=1.0.1" +checkdepends="python3-aiohttp python3-attrs python3-socks>=1.0.1" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 05b5ee43ba7d03a02acc7d51d27c3a0fd29fcffd Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/8] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From 99718be1dd4e82035fd4ffb5e5aa53db412e99fc Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 8/8] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 14 ++--- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..eee0fd76c3b 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,13 +1,13 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 +hostmakedepends="python3-PyQt5-devel-tools python3-setuptools git automake libtool" +depends="python3-aiohttp python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" + python3-pyaes python3-pycryptodome python3-PyQt5 python3-socks>=1.0.1 + python3-qrcode libbitcoin-secp256k1" # Missing optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support @@ -19,7 +19,7 @@ license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 2453 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 [WIP] Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [x] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> <!-- #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [x] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [x] armv7l - [ ] armv6l-musl --> This depends on #28272. I've added the package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1. Remaining issues: - The package builds and runs OK (tested opening and creating wallets), but I don't know if the oudated libsecp256k1 could be problematic with other functionality. - Difference between libbitcoin/secp256k1 and its upstream bitcoin-core/secp256k1? Possible to provide the bitcoin-core/secp256k1 version instead in Void? A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 24430 bytes --] From db2549ebeced6c64aa2a73c6882e0fea0fd4b0d4 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..46cd4c934a8 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,32 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-async_generator>=1.9 python3-attrs>=19.2.0 python3-idna + python3-outcome python3-sniffio python3-sortedcontainers" +checkdepends="python3-pytest python3-pytest-cov python3-ipython python3-pylint + python3-jedi black python3-mypy python3-flake8 + python3-async_generator>=1.9 python3-attrs>=19.2.0 + python3-idna python3-outcome python3-sniffio python3-sortedcontainers" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +do_check() { + : + # PYTHONPATH=$(cd build/lib* && pwd) pytest + # Tests also need the following to be packaged: + # pyOpenSSL https://pypi.org/project/pyOpenSSL/ + # trustme https://pypi.org/project/trustme/ + # astor https://pypi.org/project/astor/ +} + +post_install() { + vlicense LICENSE +} From 9d9849de48e71dab9c01654a84e9a754ef7f9e06 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..c7e2c3ae643 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From e406c48f6dd72d702a22ff62e01696663779b7a4 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..f326b36ace8 --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,23 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-pytest-asyncio" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 69f2ff84d66d964529a66082c7cb7f9854ef231e Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..af169ef60b1 --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-curio" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From cb8ed11d3075c61dd87a626d4ed3feaf6eb271be Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From 984d7e6367b188bcdc2fa26ea7718094db195e4d Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..5ebdd5b6ab9 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks" +checkdepends="python3-aiohttp python3-attrs python3-socks" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 398d1d4c188b8fd98723cbecb6e66c3233f791d4 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From 325f75d63e3074c5e66ceebaf2ee844969def2f2 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 8/9] electrum: update to 4.0.9. --- common/shlibs | 1 + srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 31 +++++++--- 3 files changed, 60 insertions(+), 43 deletions(-) diff --git a/common/shlibs b/common/shlibs index dd8a7019ee3..7f283edfec4 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3663,6 +3663,7 @@ libdwarves_reorganize.so.1 pahole-1.12_1 libclthreads.so.2 clthreads-2.4.2_1 libclxclient.so.3 clxclient-3.9.2_1 libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1 +libsecp256k1.so.0 electrum-4.0.9_1 libbitcoin.so.0 libbitcoin-system-3.5.0_1 libbitcoin-protocol.so.0 libbitcoin-protocol-3.5.0_1 libbitcoin-client.so.0 libbitcoin-client-3.5.0_1 diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..e01579414c3 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,40 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools + git automake libtool" +depends="python3-aiohttp>=3.3.0<4.0.0 python3-aiohttp_socks>=0.3 + python3-aiorpcx>=0.18<0.19 python3-bitstring python3-dnspython python3-ecdsa + python3-jsonrpclib python3-protobuf python3-pyaes python3-pycryptodomex + python3-PyQt5 python3-qrcode python3-socks" # Missing optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="python3-attrs python3-aiohttp>=3.3.0<4.0.0 + python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-bitstring + python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf + python3-pyaes python3-pycryptodomex python3-socks python3-qrcode + python3-PyQt5 python3-qdarkstyle<2.9 python3-QtPy python3-helpdev" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 + +do_check() { + : +} + +pre_install() { + $wrksrc/contrib/make_libsecp256k1.sh + vinstall $wrksrc/electrum/libsecp256k1.so.0 755 usr/lib +} post_install() { sed -i -e 's|electrum %u|electrum|' \ From 64ad5b8123126fb5ddb62ddad5ddd7061d737409 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 9/9] python3-dnspython: update to 2.0.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 15 +- 2 files changed, 11 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d..00000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c402..b10aaed3d33 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,24 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.0.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=044af09374469c3a39eeea1a146e8cac27daec951f1f1f157b1962fc7cb9d1b7 + +do_check() { + : +} post_install() { vlicense LICENSE
[-- Attachment #1: Type: text/plain, Size: 282 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-771251498 Comment: Hello @clehner, I've updated Electrum to v 4.0.9 but I'm not sure how best to proceed with providing `libsecp256k1`. Do you have a suggestion?
[-- Attachment #1: Type: text/plain, Size: 675 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-775485651 Comment: Hi @atweiden, @CameronNemo, I was wondering if either of you has a suggestion for how to provide an update to `libsecp256k1` for Void (as maintainer and user of the library respectively). ElectronCash uses the package that's currently in Void, which is based on a very old version of `libbitcoin/secp256k1`. Electrum 4.x uses a more recent version based on `bitcoin-core/secp256k1`, which is also the upstream repo for libbitcoin/secp256k1. I've updated Electrum but I still need a way to provide a more recent version of the library.
[-- Attachment #1: Type: text/plain, Size: 318 bytes --] New comment by atweiden on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-776344888 Comment: Looks like secp256k1 upstream still hasn't tagged a release. If the Electrum maintainers want you to use upstream secp256k1, you probably shouldn't use the one from libbitcoin.
[-- Attachment #1: Type: text/plain, Size: 366 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-776347916 Comment: I [asked](https://github.com/spesmilo/electrum/issues/7014) and it looks like the libbitcoin version may work, for now at least. But I'll need to run Electrum tests and that'll require packaging a few more dependencies first.
[-- Attachment #1: Type: text/plain, Size: 2841 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 [WIP] Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> <!-- #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl --> This depends on #28272. Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1. Remaining issues: - Using `libbitcoin-secp256k1` it builds and runs OK (tested opening and creating wallets), but I don't know if the outdated libsecp256k1 could be problematic with other functionality. So instead I've tried using the `make_libsecp256k1.sh` from Electrum. This works locally on my x86_64, but I'm not sure how to do this correctly for all architectures/compilers. - Also, the library must be available at `/usr/lib/libsecp256k1.so.0`, how should that work if someone also has `libbitcoin-secp256k1` installed which uses the same library path? - Difference between libbitcoin/secp256k1 and its upstream bitcoin-core/secp256k1? Possible to provide the bitcoin-core/secp256k1 version instead in Void? A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 24561 bytes --] From 6eae111b917ebf9b5fb6df47479d5d8fedd4efb0 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..991cafdc216 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,31 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-async_generator>=1.9 python3-attrs>=19.2.0 python3-idna + python3-outcome python3-sniffio python3-sortedcontainers" +checkdepends="python3-pytest python3-pytest-cov python3-ipython python3-pylint + python3-jedi black python3-mypy python3-flake8 + python3-async_generator>=1.9 python3-attrs>=19.2.0 + python3-idna python3-outcome python3-sniffio python3-sortedcontainers" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +# Tests also need the following to be packaged: +# pyOpenSSL https://pypi.org/project/pyOpenSSL/ +# trustme https://pypi.org/project/trustme/ +# astor https://pypi.org/project/astor/ +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From b9bcfcff8870c5be4206ebaa04b897866d9dd146 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..f9064a84649 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,25 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + # CI container has different privileges than expected in test_errors() + # which leads to CI builds timing out on some arches. + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_errors' +} + +post_install() { + vlicense LICENSE +} From ef81da4b13fdb3508f6fcbf232522d4b411cd337 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..f326b36ace8 --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,23 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-pytest-asyncio" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 15602482c6dfee83a9319a7369c35b1e09a0a2b0 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..af169ef60b1 --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-curio" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 675d69b45364493e0cfa30588315b5e353108d01 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From 3edba931322bec1d05f490cf0f4c83a4cdc5c690 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..5ebdd5b6ab9 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks" +checkdepends="python3-aiohttp python3-attrs python3-socks" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 51e04aa6049df749fca97674158a5ae7ddcb5132 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From d1f2ac4c007d0469c99a581d9fc7bf8e18ca91ae Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 8/9] python3-dnspython: update to 2.0.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 15 +- 2 files changed, 11 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d..00000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c402..b10aaed3d33 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,24 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.0.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=044af09374469c3a39eeea1a146e8cac27daec951f1f1f157b1962fc7cb9d1b7 + +do_check() { + : +} post_install() { vlicense LICENSE From 465cf4b7832efc61d3aed59ef95357fc1439ef54 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 9/9] electrum: update to 4.0.9. --- common/shlibs | 1 + srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 29 ++++++--- 3 files changed, 57 insertions(+), 44 deletions(-) diff --git a/common/shlibs b/common/shlibs index fd1a20b0f64..36ab5f5d18a 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3547,6 +3547,7 @@ libdwarves_reorganize.so.1 pahole-1.12_1 libclthreads.so.2 clthreads-2.4.2_1 libclxclient.so.3 clxclient-3.9.2_1 libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1 +libsecp256k1.so.0 electrum-4.0.9_1 libbitcoin.so.0 libbitcoin-system-3.5.0_1 libbitcoin-protocol.so.0 libbitcoin-protocol-3.5.0_1 libbitcoin-client.so.0 libbitcoin-client-3.5.0_1 diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..8cc5a8c1a5e 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,36 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" -# Missing optional dependencies: +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools + git automake libtool" +depends="python3-aiohttp>=3.3.0<4.0.0 python3-aiohttp_socks>=0.3 + python3-aiorpcx>=0.18<0.19 python3-bitstring python3-dnspython python3-ecdsa + python3-jsonrpclib python3-protobuf python3-pyaes python3-pycryptodomex + python3-PyQt5 python3-qrcode python3-socks python3-cryptography + libbitcoin-secp256k1" +# Optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="python3-pytest python3-attrs python3-aiohttp>=3.3.0<4.0.0 + python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-bitstring + python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf + python3-pyaes python3-pycryptodomex python3-socks python3-qrcode + python3-PyQt5 python3-QtPy python3-cryptography libbitcoin-secp256k1" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 + +do_check() { + : # PYTHONPATH=$(cd build/lib* && pwd) pytest electrum/tests -v +} post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 2841 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 [WIP] Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> <!-- #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl --> This depends on #28272. Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1. Remaining issues: - Using `libbitcoin-secp256k1` it builds and runs OK (tested opening and creating wallets), but I don't know if the outdated libsecp256k1 could be problematic with other functionality. So instead I've tried using the `make_libsecp256k1.sh` from Electrum. This works locally on my x86_64, but I'm not sure how to do this correctly for all architectures/compilers. - Also, the library must be available at `/usr/lib/libsecp256k1.so.0`, how should that work if someone also has `libbitcoin-secp256k1` installed which uses the same library path? - Difference between libbitcoin/secp256k1 and its upstream bitcoin-core/secp256k1? Possible to provide the bitcoin-core/secp256k1 version instead in Void? A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 24475 bytes --] From 6eae111b917ebf9b5fb6df47479d5d8fedd4efb0 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..991cafdc216 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,31 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-async_generator>=1.9 python3-attrs>=19.2.0 python3-idna + python3-outcome python3-sniffio python3-sortedcontainers" +checkdepends="python3-pytest python3-pytest-cov python3-ipython python3-pylint + python3-jedi black python3-mypy python3-flake8 + python3-async_generator>=1.9 python3-attrs>=19.2.0 + python3-idna python3-outcome python3-sniffio python3-sortedcontainers" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +# Tests also need the following to be packaged: +# pyOpenSSL https://pypi.org/project/pyOpenSSL/ +# trustme https://pypi.org/project/trustme/ +# astor https://pypi.org/project/astor/ +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From b9bcfcff8870c5be4206ebaa04b897866d9dd146 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..f9064a84649 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,25 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + # CI container has different privileges than expected in test_errors() + # which leads to CI builds timing out on some arches. + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_errors' +} + +post_install() { + vlicense LICENSE +} From ef81da4b13fdb3508f6fcbf232522d4b411cd337 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..f326b36ace8 --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,23 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-pytest-asyncio" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 15602482c6dfee83a9319a7369c35b1e09a0a2b0 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..af169ef60b1 --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-curio" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 675d69b45364493e0cfa30588315b5e353108d01 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From 3edba931322bec1d05f490cf0f4c83a4cdc5c690 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..5ebdd5b6ab9 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks" +checkdepends="python3-aiohttp python3-attrs python3-socks" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 51e04aa6049df749fca97674158a5ae7ddcb5132 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From d1f2ac4c007d0469c99a581d9fc7bf8e18ca91ae Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 8/9] python3-dnspython: update to 2.0.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 15 +- 2 files changed, 11 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d..00000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c402..b10aaed3d33 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,24 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.0.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=044af09374469c3a39eeea1a146e8cac27daec951f1f1f157b1962fc7cb9d1b7 + +do_check() { + : +} post_install() { vlicense LICENSE From 71e10f5cfdd408acb05b5b858cb2ae7ad80070d5 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 9/9] electrum: update to 4.0.9. --- common/shlibs | 1 + srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 25 +++++--- 3 files changed, 53 insertions(+), 44 deletions(-) diff --git a/common/shlibs b/common/shlibs index fd1a20b0f64..36ab5f5d18a 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3547,6 +3547,7 @@ libdwarves_reorganize.so.1 pahole-1.12_1 libclthreads.so.2 clthreads-2.4.2_1 libclxclient.so.3 clxclient-3.9.2_1 libsecp256k1.so.0 libbitcoin-secp256k1-0.1.0.13_1 +libsecp256k1.so.0 electrum-4.0.9_1 libbitcoin.so.0 libbitcoin-system-3.5.0_1 libbitcoin-protocol.so.0 libbitcoin-protocol-3.5.0_1 libbitcoin-client.so.0 libbitcoin-client-3.5.0_1 diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..194734e65ec 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,32 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" -# Missing optional dependencies: +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools + git automake libtool" +depends="python3-aiohttp>=3.3.0<4.0.0 python3-aiohttp_socks>=0.3 + python3-aiorpcx>=0.18<0.19 python3-bitstring python3-dnspython python3-ecdsa + python3-jsonrpclib python3-protobuf python3-pyaes python3-pycryptodomex + python3-PyQt5 python3-qrcode python3-socks python3-cryptography + libbitcoin-secp256k1" +# Optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="python3-pytest python3-attrs python3-aiohttp>=3.3.0<4.0.0 + python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-bitstring + python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf + python3-pyaes python3-pycryptodomex python3-socks python3-qrcode + python3-PyQt5 python3-QtPy python3-cryptography libbitcoin-secp256k1" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 2841 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 [WIP] Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> <!-- #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl --> This depends on #28272. Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1. Remaining issues: - Using `libbitcoin-secp256k1` it builds and runs OK (tested opening and creating wallets), but I don't know if the outdated libsecp256k1 could be problematic with other functionality. So instead I've tried using the `make_libsecp256k1.sh` from Electrum. This works locally on my x86_64, but I'm not sure how to do this correctly for all architectures/compilers. - Also, the library must be available at `/usr/lib/libsecp256k1.so.0`, how should that work if someone also has `libbitcoin-secp256k1` installed which uses the same library path? - Difference between libbitcoin/secp256k1 and its upstream bitcoin-core/secp256k1? Possible to provide the bitcoin-core/secp256k1 version instead in Void? A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 22432 bytes --] From 781cd72de5506fe7ea3423d1b76d8d12322a7fb8 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..d9a195e6fd3 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 73798ed60b314f180286a11ceca0166b72ca71e5 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..bf8da44e087 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From e41a1e227a0efb1e586ee036b2a66b101acd76f7 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..43a3fdf71ad --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,21 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 4439c53947dc8f65d85813afbce452108120e476 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..1d7876978bc --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,21 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 402548bf6b86a539ca188b5e62670e4a9db392ae Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From a9806764454413c9aa53db39059e69f76e497554 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..9bf8299b1f1 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks>=1.0.1" +checkdepends="python3-aiohttp python3-attrs python3-socks>=1.0.1" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 05b5ee43ba7d03a02acc7d51d27c3a0fd29fcffd Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From 6406b7665196e524ab96f13b570e58a9a7ce06a6 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 8/9] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 15 ++--- 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..3a4d33bc735 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,26 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" +depends="python3-aiohttp python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 + python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib + python3-protobuf python3-pyaes python3-pycryptodome python3-PyQt5 + python3-qrcode python3-socks>=1.0.1 libbitcoin-secp256k1" # Missing optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="python3-attrs python3-bitstring python3-dnspython>=2.0.0" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \ From 2bfdb4ebb40bca37c8a51c715bab8e64c66d52a6 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 9/9] python3-dnspython: update to 2.0.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 15 +- 2 files changed, 11 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d..00000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c402..b10aaed3d33 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,24 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.0.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=044af09374469c3a39eeea1a146e8cac27daec951f1f1f157b1962fc7cb9d1b7 + +do_check() { + : +} post_install() { vlicense LICENSE
[-- Attachment #1: Type: text/plain, Size: 2841 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 [WIP] Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> <!-- #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl --> This depends on #28272. Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1. Remaining issues: - Using `libbitcoin-secp256k1` it builds and runs OK (tested opening and creating wallets), but I don't know if the outdated libsecp256k1 could be problematic with other functionality. So instead I've tried using the `make_libsecp256k1.sh` from Electrum. This works locally on my x86_64, but I'm not sure how to do this correctly for all architectures/compilers. - Also, the library must be available at `/usr/lib/libsecp256k1.so.0`, how should that work if someone also has `libbitcoin-secp256k1` installed which uses the same library path? - Difference between libbitcoin/secp256k1 and its upstream bitcoin-core/secp256k1? Possible to provide the bitcoin-core/secp256k1 version instead in Void? A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 23910 bytes --] From c8a2cd1c6b87127407ad13a9750440ed2e87cb53 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..991cafdc216 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,31 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-async_generator>=1.9 python3-attrs>=19.2.0 python3-idna + python3-outcome python3-sniffio python3-sortedcontainers" +checkdepends="python3-pytest python3-pytest-cov python3-ipython python3-pylint + python3-jedi black python3-mypy python3-flake8 + python3-async_generator>=1.9 python3-attrs>=19.2.0 + python3-idna python3-outcome python3-sniffio python3-sortedcontainers" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +# Tests also need the following to be packaged: +# pyOpenSSL https://pypi.org/project/pyOpenSSL/ +# trustme https://pypi.org/project/trustme/ +# astor https://pypi.org/project/astor/ +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 388949b232537ca89c99f781825e28c194cbd180 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..f9064a84649 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,25 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + # CI container has different privileges than expected in test_errors() + # which leads to CI builds timing out on some arches. + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_errors' +} + +post_install() { + vlicense LICENSE +} From ef48ee382f23d312258fd5068ebfb0508fff08f6 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..f326b36ace8 --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,23 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-pytest-asyncio" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 3898ba945d92a7a98d0ff326ca88a3cfb306694d Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..af169ef60b1 --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-curio" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 036a4bc86c1abde88cde39c82c4bbdd36311c566 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From a9ccd79c6fb787c0f8fb63766854c595a96b7fd3 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..5ebdd5b6ab9 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks" +checkdepends="python3-aiohttp python3-attrs python3-socks" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 01fcc3571f5084a503d80d07ef861979c215917c Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From 13e2e67107b8fe71278db117226664237ca8d717 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 8/9] python3-dnspython: update to 2.0.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 15 +- 2 files changed, 11 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d..00000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c402..b10aaed3d33 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,24 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.0.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=044af09374469c3a39eeea1a146e8cac27daec951f1f1f157b1962fc7cb9d1b7 + +do_check() { + : +} post_install() { vlicense LICENSE From 745b3107b6879e3340e027891a6898e482447f8c Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 9/9] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 24 +++++--- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..8210de96396 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,31 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" -# Missing optional dependencies: +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools" +depends="python3-aiohttp>=3.3.0<4.0.0 python3-aiohttp_socks>=0.3 + python3-aiorpcx>=0.18<0.19 python3-bitstring python3-dnspython python3-ecdsa + python3-jsonrpclib python3-protobuf python3-pyaes python3-pycryptodomex + python3-PyQt5 python3-qrcode python3-socks python3-cryptography + libbitcoin-secp256k1" +# Optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="python3-pytest python3-attrs python3-aiohttp>=3.3.0<4.0.0 + python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-bitstring + python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf + python3-pyaes python3-pycryptodomex python3-socks python3-qrcode + python3-PyQt5 python3-QtPy python3-cryptography libbitcoin-secp256k1" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 491 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-792979262 Comment: The move back to OpenSSL allowed Electrum tests to pass. This version uses the very old `libbitcoin-secp256k1` package, but is is sufficient for now, as per [this Electrum issue](https://github.com/spesmilo/electrum/issues/7014): > if the tests pass, it is considered good enough. [to use the old libbitcoin-secp256k1] I think this is ready now.
[-- Attachment #1: Type: text/plain, Size: 512 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-792979262 Comment: The move back to OpenSSL allowed Electrum tests to pass. I've now used the existing, rather outdated `libbitcoin-secp256k1` package, but this is is sufficient for now, as per [this Electrum issue](https://github.com/spesmilo/electrum/issues/7014): > if the tests pass, it is considered good enough. [to use the old libbitcoin-secp256k1] I think this is ready now.
[-- Attachment #1: Type: text/plain, Size: 2415 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl ~This depends on #28272.~ ~Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1.~ --> The old version of `libbitcoin-secp256k1` in Void's repos is is sufficient for now, as per [this Electrum issue](https://github.com/spesmilo/electrum/issues/7014): > if the tests pass, it is considered good enough. [to use the old libbitcoin-secp256k1] So this is ready now. Also tested locally. A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 23901 bytes --] From c8a2cd1c6b87127407ad13a9750440ed2e87cb53 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..991cafdc216 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,31 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-async_generator>=1.9 python3-attrs>=19.2.0 python3-idna + python3-outcome python3-sniffio python3-sortedcontainers" +checkdepends="python3-pytest python3-pytest-cov python3-ipython python3-pylint + python3-jedi black python3-mypy python3-flake8 + python3-async_generator>=1.9 python3-attrs>=19.2.0 + python3-idna python3-outcome python3-sniffio python3-sortedcontainers" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +# Tests also need the following to be packaged: +# pyOpenSSL https://pypi.org/project/pyOpenSSL/ +# trustme https://pypi.org/project/trustme/ +# astor https://pypi.org/project/astor/ +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 388949b232537ca89c99f781825e28c194cbd180 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..f9064a84649 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,25 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + # CI container has different privileges than expected in test_errors() + # which leads to CI builds timing out on some arches. + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_errors' +} + +post_install() { + vlicense LICENSE +} From ef48ee382f23d312258fd5068ebfb0508fff08f6 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..f326b36ace8 --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,23 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-pytest-asyncio" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 3898ba945d92a7a98d0ff326ca88a3cfb306694d Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..af169ef60b1 --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-curio" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 036a4bc86c1abde88cde39c82c4bbdd36311c566 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From a9ccd79c6fb787c0f8fb63766854c595a96b7fd3 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..5ebdd5b6ab9 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks" +checkdepends="python3-aiohttp python3-attrs python3-socks" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 01fcc3571f5084a503d80d07ef861979c215917c Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From 9809b8b2c6631874183d5748cae28d3a04c72211 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 8/9] python3-dnspython: update to 2.0.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 11 +- 2 files changed, 7 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d..00000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c402..2cde2dfa1e8 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,20 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.0.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome python3-pytest" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=044af09374469c3a39eeea1a146e8cac27daec951f1f1f157b1962fc7cb9d1b7 post_install() { vlicense LICENSE From 4713c7ab44ebe55f216a8074171cd41e8d8c1187 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 9/9] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 24 +++++--- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..8210de96396 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,31 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" -# Missing optional dependencies: +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools" +depends="python3-aiohttp>=3.3.0<4.0.0 python3-aiohttp_socks>=0.3 + python3-aiorpcx>=0.18<0.19 python3-bitstring python3-dnspython python3-ecdsa + python3-jsonrpclib python3-protobuf python3-pyaes python3-pycryptodomex + python3-PyQt5 python3-qrcode python3-socks python3-cryptography + libbitcoin-secp256k1" +# Optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="python3-pytest python3-attrs python3-aiohttp>=3.3.0<4.0.0 + python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-bitstring + python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf + python3-pyaes python3-pycryptodomex python3-socks python3-qrcode + python3-PyQt5 python3-QtPy python3-cryptography libbitcoin-secp256k1" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 646 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-792979262 Comment: The move back to OpenSSL allowed Electrum tests to pass. I've now used the existing, rather outdated `libbitcoin-secp256k1` package, but this is is sufficient for now, as per [this Electrum issue](https://github.com/spesmilo/electrum/issues/7014): > if the tests pass, it is considered good enough. [to use the old libbitcoin-secp256k1] ~I think this is ready now.~ Edit: all tests pass when skipping tests just for `dnspython`, re-enabled those now. How to fix those, or can we skip them for now?
[-- Attachment #1: Type: text/plain, Size: 2415 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl ~This depends on #28272.~ ~Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1.~ --> The old version of `libbitcoin-secp256k1` in Void's repos is is sufficient for now, as per [this Electrum issue](https://github.com/spesmilo/electrum/issues/7014): > if the tests pass, it is considered good enough. [to use the old libbitcoin-secp256k1] So this is ready now. Also tested locally. A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 23912 bytes --] From c8a2cd1c6b87127407ad13a9750440ed2e87cb53 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..991cafdc216 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,31 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-async_generator>=1.9 python3-attrs>=19.2.0 python3-idna + python3-outcome python3-sniffio python3-sortedcontainers" +checkdepends="python3-pytest python3-pytest-cov python3-ipython python3-pylint + python3-jedi black python3-mypy python3-flake8 + python3-async_generator>=1.9 python3-attrs>=19.2.0 + python3-idna python3-outcome python3-sniffio python3-sortedcontainers" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +# Tests also need the following to be packaged: +# pyOpenSSL https://pypi.org/project/pyOpenSSL/ +# trustme https://pypi.org/project/trustme/ +# astor https://pypi.org/project/astor/ +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 388949b232537ca89c99f781825e28c194cbd180 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..f9064a84649 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,25 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + # CI container has different privileges than expected in test_errors() + # which leads to CI builds timing out on some arches. + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_errors' +} + +post_install() { + vlicense LICENSE +} From ef48ee382f23d312258fd5068ebfb0508fff08f6 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..f326b36ace8 --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,23 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-pytest-asyncio" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 3898ba945d92a7a98d0ff326ca88a3cfb306694d Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..af169ef60b1 --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-curio" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 036a4bc86c1abde88cde39c82c4bbdd36311c566 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From a9ccd79c6fb787c0f8fb63766854c595a96b7fd3 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..5ebdd5b6ab9 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks" +checkdepends="python3-aiohttp python3-attrs python3-socks" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 01fcc3571f5084a503d80d07ef861979c215917c Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From e2a836711167057c820b41e9e865ed37fc1a4edd Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 8/9] python3-dnspython: update to 2.0.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 12 +- 2 files changed, 8 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d..00000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c402..78ae56e0ab2 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,21 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.0.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome + python3-pytest iana-etc" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=044af09374469c3a39eeea1a146e8cac27daec951f1f1f157b1962fc7cb9d1b7 post_install() { vlicense LICENSE From cfe1c91803df79cee310ae44c48c74a0d4c9ef11 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 9/9] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 24 +++++--- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..8210de96396 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,31 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" -# Missing optional dependencies: +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools" +depends="python3-aiohttp>=3.3.0<4.0.0 python3-aiohttp_socks>=0.3 + python3-aiorpcx>=0.18<0.19 python3-bitstring python3-dnspython python3-ecdsa + python3-jsonrpclib python3-protobuf python3-pyaes python3-pycryptodomex + python3-PyQt5 python3-qrcode python3-socks python3-cryptography + libbitcoin-secp256k1" +# Optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="python3-pytest python3-attrs python3-aiohttp>=3.3.0<4.0.0 + python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-bitstring + python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf + python3-pyaes python3-pycryptodomex python3-socks python3-qrcode + python3-PyQt5 python3-QtPy python3-cryptography libbitcoin-secp256k1" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 181 bytes --] New comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-793174456 Comment: Try adding `iana-etc` to `checkdepends`.
[-- Attachment #1: Type: text/plain, Size: 254 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-793176948 Comment: @ericonr Yes thanks, this has solved the issue for the arches that were failing, but now `x86_64-musl` is failing?
[-- Attachment #1: Type: text/plain, Size: 214 bytes --] New comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-793194211 Comment: Alpine is using 2.1.0 of dnspython and doesn't seem to disable any tests.
[-- Attachment #1: Type: text/plain, Size: 2415 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl ~This depends on #28272.~ ~Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1.~ --> The old version of `libbitcoin-secp256k1` in Void's repos is is sufficient for now, as per [this Electrum issue](https://github.com/spesmilo/electrum/issues/7014): > if the tests pass, it is considered good enough. [to use the old libbitcoin-secp256k1] So this is ready now. Also tested locally. A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 24103 bytes --] From c8a2cd1c6b87127407ad13a9750440ed2e87cb53 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 00000000000..991cafdc216 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,31 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-async_generator>=1.9 python3-attrs>=19.2.0 python3-idna + python3-outcome python3-sniffio python3-sortedcontainers" +checkdepends="python3-pytest python3-pytest-cov python3-ipython python3-pylint + python3-jedi black python3-mypy python3-flake8 + python3-async_generator>=1.9 python3-attrs>=19.2.0 + python3-idna python3-outcome python3-sniffio python3-sortedcontainers" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 + +# Tests also need the following to be packaged: +# pyOpenSSL https://pypi.org/project/pyOpenSSL/ +# trustme https://pypi.org/project/trustme/ +# astor https://pypi.org/project/astor/ +do_check() { + : +} + +post_install() { + vlicense LICENSE +} From 388949b232537ca89c99f781825e28c194cbd180 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 00000000000..f9064a84649 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,25 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + # CI container has different privileges than expected in test_errors() + # which leads to CI builds timing out on some arches. + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_errors' +} + +post_install() { + vlicense LICENSE +} From ef48ee382f23d312258fd5068ebfb0508fff08f6 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 00000000000..f326b36ace8 --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,23 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-pytest-asyncio" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 3898ba945d92a7a98d0ff326ca88a3cfb306694d Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 00000000000..af169ef60b1 --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-curio" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 036a4bc86c1abde88cde39c82c4bbdd36311c566 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 00000000000..afa0c84fb8c --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From a9ccd79c6fb787c0f8fb63766854c595a96b7fd3 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c..5ebdd5b6ab9 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks" +checkdepends="python3-aiohttp python3-attrs python3-socks" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 01fcc3571f5084a503d80d07ef861979c215917c Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 00000000000..3696935078d --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From 2b4acbc7897021b4ed73566ba8a66efe67ec3584 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 8/9] python3-dnspython: update to 2.1.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 17 +- 2 files changed, 13 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d..00000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c402..e1ee5f4a8bf 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,26 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.1.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome + python3-pytest iana-etc" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4 + +do_check() { + # This exclusion can be removed for 2.1.1 or 2.2.0 (https://github.com/rthalley/dnspython/issues/622) + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_unpickle' +} post_install() { vlicense LICENSE From 9508dc4af7223fe665b5d5a38804a789d25cfe4a Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 9/9] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 71 ++++++++++++----------- srcpkgs/electrum/template | 24 +++++--- 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch index eb215543b29..102636e3bc2 100644 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ b/srcpkgs/electrum/patches/no-certifi.patch @@ -2,28 +2,31 @@ Upstream: No Reason: Avoid certifi dependency diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 +index b935a68..6e8fd25 100644 --- contrib/requirements/requirements.txt +++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 +@@ -4,7 +4,6 @@ qdarkstyle<2.9 aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 -certifi + bitstring + attrs>=19.2.0 + diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 +index 810727e..4c90e0d 100644 --- electrum/interface.py +++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress +@@ -42,7 +42,6 @@ from aiorpcx import RPCSession, Notification, NetAddress, NewlineFramer from aiorpcx.curio import timeout_after, TaskTimeout from aiorpcx.jsonrpc import JSONRPC, CodeMessageError from aiorpcx.rawsocket import RSClient -import certifi - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network + from .util import (ignore_exceptions, log_exceptions, bfh, SilentTaskGroup, MySocksProxy, + is_integer, is_non_negative_integer, is_hash256_str, is_hex_str, +@@ -64,7 +63,7 @@ if TYPE_CHECKING: + from .simple_config import SimpleConfig -ca_path = certifi.where() @@ -32,18 +35,18 @@ index b5eac439c..14bbd7ab9 100644 BUCKET_NAME_OF_ONION_SERVERS = 'onion' diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 +index 2ce0ff2..17048e0 100644 --- electrum/paymentrequest.py +++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional +@@ -29,7 +29,6 @@ from typing import Optional, List, TYPE_CHECKING + import asyncio + import urllib.parse -import certifi - import urllib.parse import aiohttp -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) + +@@ -58,7 +57,7 @@ _logger = get_logger(__name__) REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} @@ -53,18 +56,18 @@ index fedcd1b3a..cba4879c7 100644 ca_keyID = None diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 +index 404e410..305cd9c 100644 --- electrum/util.py +++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer +@@ -51,7 +51,6 @@ import aiohttp + from aiohttp_socks import ProxyConnector, ProxyType + import aiorpcx from aiorpcx import TaskGroup -import certifi + import dns.resolver from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): +@@ -70,7 +69,7 @@ def inv_dict(d): return {v: k for k, v in d.items()} @@ -74,33 +77,31 @@ index 62df080a9..9c96055ba 100644 base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 +index 78ae26c..634f7aa 100644 --- electrum/x509.py +++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - +@@ -343,5 +343,5 @@ def load_certificates(ca_path): if __name__ == "__main__": -- import certifi -- + import certifi + - ca_path = certifi.where() + ca_path = '/etc/ssl/certs/ca-certificates.crt' ca_list, ca_keyID = load_certificates(ca_path) diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 +index 3caf118..6564784 100755 --- run_electrum +++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): +@@ -57,7 +57,6 @@ def check_imports(): + # pure-python dependencies need to be imported here for pyinstaller + try: import dns - import pyaes - import ecdsa - import certifi import qrcode import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): + import aiorpcx +@@ -69,7 +68,7 @@ def check_imports(): + from google.protobuf import reflection from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here - assert os.path.exists(certifi.where()) + assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5..8210de96396 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,31 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" -# Missing optional dependencies: +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools" +depends="python3-aiohttp>=3.3.0<4.0.0 python3-aiohttp_socks>=0.3 + python3-aiorpcx>=0.18<0.19 python3-bitstring python3-dnspython python3-ecdsa + python3-jsonrpclib python3-protobuf python3-pyaes python3-pycryptodomex + python3-PyQt5 python3-qrcode python3-socks python3-cryptography + libbitcoin-secp256k1" +# Optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="python3-pytest python3-attrs python3-aiohttp>=3.3.0<4.0.0 + python3-aiohttp_socks>=0.3 python3-aiorpcx>=0.18<0.19 python3-bitstring + python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf + python3-pyaes python3-pycryptodomex python3-socks python3-qrcode + python3-PyQt5 python3-QtPy python3-cryptography libbitcoin-secp256k1" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" # patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 360 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-793211710 Comment: @ericonr I probably made the template initially before 2.1.0 was released. Updated to 2.1.0 now, but: - I did have to skip a test due to an upstream issue - Tests passed locally, but now there's further test failures
[-- Attachment #1: Type: text/plain, Size: 219 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r589997564 Comment: If the restriction is just a minimum version, it isn't really necessary.
[-- Attachment #1: Type: text/plain, Size: 200 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r589997150 Comment: Use `make_check=no` instead of defining the function.
[-- Attachment #1: Type: text/plain, Size: 478 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r589999058 Comment: ```suggestion checksum=e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4 # tests not working on CI make_check=extended do_check() { # This exclusion can be removed for 2.1.1 or 2.2.0 (https://github.com/rthalley/dnspython/issues/622) PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_unpickle' } ```
[-- Attachment #1: Type: text/plain, Size: 209 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r589995760 Comment: It's easier to do `checkdepends="$depends python3-pytest ..."`
[-- Attachment #1: Type: text/plain, Size: 1590 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r590001321 Comment: ``` =================================== FAILURES =================================== ____________ OverrideSystemResolverTestCase.test_basic_getaddrinfo _____________ self = <tests.test_resolver_override.OverrideSystemResolverTestCase testMethod=test_basic_getaddrinfo> @unittest.skipIf(sys.platform == 'win32', 'avoid windows original getaddrinfo issues') def test_basic_getaddrinfo(self): > self.assertTrue(self.equivalent('dns.google', 53, socket.AF_INET, socket.SOCK_DGRAM)) E AssertionError: False is not true tests/test_resolver_override.py:87: AssertionError ----------------------------- Captured stdout call ----------------------------- NOT EQUIVALENT [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('8.8.8.8', 53)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('8.8.4.4', 53))] [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, 'dns.google', ('8.8.4.4', 53)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, 'dns.google', ('8.8.8.8', 53))] =========================== short test summary info ============================ FAILED tests/test_resolver_override.py::OverrideSystemResolverTestCase::test_basic_getaddrinfo ========== 1 failed, 1149 passed, 25 skipped, 1 deselected in 10.25s =========== ``` kinda still broken on musl, seems to be the same errors >.<
[-- Attachment #1: Type: text/plain, Size: 266 bytes --] New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#issuecomment-799690790 Comment: Hello @Chocimier, care to take a look at this, since you reviewed these dependencies earlier in #28272? I think this is ready.
[-- Attachment #1: Type: text/plain, Size: 228 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r600782015 Comment: Does this actually help? I'd rather add the dependency than carry this forever...
[-- Attachment #1: Type: text/plain, Size: 234 bytes --] New review comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r600779217 Comment: I don't like the version restrictions here, and would prefer to leave them unspecified.
[-- Attachment #1: Type: text/plain, Size: 2665 bytes --] There is an updated pull request by ar-jan against master on the void-packages repository https://github.com/ar-jan/void-packages electrum-409 https://github.com/void-linux/void-packages/pull/28305 Update Electrum to 4.0.9 <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl ~This depends on #28272.~ ~Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1.~ --> The old version of `libbitcoin-secp256k1` in Void's repos is is sufficient for now, as per [this Electrum issue](https://github.com/spesmilo/electrum/issues/7014): `if the tests pass, it is considered good enough.` New dependencies: python3-socks-1.2.0 python3-curio-1.4 python3-trio-0.18.0 python3-outcome-1.1.0 python3-sniffio-1.2.0 python3-bitstring-3.1.7 Updated dependencies: python3-aiohttp_socks: update to 0.5.5. python3-dnspython: update to 2.1.0. So this is ready; also tested locally. A patch file from https://github.com/void-linux/void-packages/pull/28305.patch is attached [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: github-pr-electrum-409-28305.patch --] [-- Type: text/x-diff, Size: 22688 bytes --] From b8d194df5ba149f01d68be1d97123638beb60074 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:00:16 +0100 Subject: [PATCH 1/9] New package: python3-trio-0.18.0 --- srcpkgs/python3-trio/template | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 srcpkgs/python3-trio/template diff --git a/srcpkgs/python3-trio/template b/srcpkgs/python3-trio/template new file mode 100644 index 000000000000..68025f8902e1 --- /dev/null +++ b/srcpkgs/python3-trio/template @@ -0,0 +1,28 @@ +# Template file for 'python3-trio' +pkgname=python3-trio +version=0.18.0 +revision=1 +wrksrc="trio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-async_generator python3-attrs python3-idna + python3-outcome python3-sniffio python3-sortedcontainers" +checkdepends="python3-pytest python3-pytest-cov python3-ipython python3-pylint + python3-jedi black python3-mypy python3-flake8 + python3-async_generator python3-attrs + python3-idna python3-outcome python3-sniffio python3-sortedcontainers" +short_desc="Friendly Python library for async concurrency and I/O" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/trio" +distfiles="${PYPI_SITE}/t/trio/trio-${version}.tar.gz" +checksum=87a66ae61f27fe500c9024926a9ba482c07e1e0f56380b70a264d19c435ba076 +# Tests are disabled as they also need the following to be packaged: +# pyOpenSSL https://pypi.org/project/pyOpenSSL/ +# trustme https://pypi.org/project/trustme/ +# astor https://pypi.org/project/astor/ +make_check=no + +post_install() { + vlicense LICENSE +} From 8685a5fb0b7432149b6390fcc3255bcbc1b95465 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:20 +0100 Subject: [PATCH 2/9] New package: python3-curio-1.4 --- srcpkgs/python3-curio/template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 srcpkgs/python3-curio/template diff --git a/srcpkgs/python3-curio/template b/srcpkgs/python3-curio/template new file mode 100644 index 000000000000..f9064a846495 --- /dev/null +++ b/srcpkgs/python3-curio/template @@ -0,0 +1,25 @@ +# Template file for 'python3-curio' +pkgname=python3-curio +version=1.4 +revision=1 +wrksrc="curio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest" +short_desc="Coroutine-based library for concurrent programming using async/await" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="BSD-3-Clause" +homepage="https://github.com/dabeaz/curio" +distfiles="${PYPI_SITE}/c/curio/curio-${version}.tar.gz" +checksum=57edce81c837f3c2cf42fbb346dee26e537d1659e6605269fb13bd179e068744 + +do_check() { + # CI container has different privileges than expected in test_errors() + # which leads to CI builds timing out on some arches. + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_errors' +} + +post_install() { + vlicense LICENSE +} From 631ce1db02e5c09a1d97c3ecf8ab6cb9283ffbc0 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:01:37 +0100 Subject: [PATCH 3/9] New package: python3-outcome-1.1.0 --- srcpkgs/python3-outcome/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-outcome/template diff --git a/srcpkgs/python3-outcome/template b/srcpkgs/python3-outcome/template new file mode 100644 index 000000000000..f326b36ace81 --- /dev/null +++ b/srcpkgs/python3-outcome/template @@ -0,0 +1,23 @@ +# Template file for 'python3-outcome' +pkgname=python3-outcome +version=1.1.0 +revision=1 +wrksrc="outcome-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-pytest-asyncio" +short_desc="Capture the outcome of Python function calls" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/outcome" +distfiles="${PYPI_SITE}/o/outcome/outcome-${version}.tar.gz" +checksum=e862f01d4e626e63e8f92c38d1f8d5546d3f9cce989263c521b2e7990d186967 + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 9c61cecb66b3df8f32d4ef3cebe4e0dfbe3a095f Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:03 +0100 Subject: [PATCH 4/9] New package: python3-sniffio-1.2.0 --- srcpkgs/python3-sniffio/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/python3-sniffio/template diff --git a/srcpkgs/python3-sniffio/template b/srcpkgs/python3-sniffio/template new file mode 100644 index 000000000000..af169ef60b12 --- /dev/null +++ b/srcpkgs/python3-sniffio/template @@ -0,0 +1,23 @@ +# Template file for 'python3-sniffio' +pkgname=python3-sniffio +version=1.2.0 +revision=1 +wrksrc="sniffio-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3" +checkdepends="python3-pytest python3-pytest-cov python3-curio" +short_desc="Sniff out which async library your code is running under" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0, MIT" +homepage="https://github.com/python-trio/sniffio" +distfiles="${PYPI_SITE}/s/sniffio/sniffio-${version}.tar.gz" +checksum=c4666eecec1d3f50960c6bdf61ab7bc350648da6c126e3cf6898d8cd4ddcd3de + +do_check() { + PYTHONPATH=$(cd build/lib* && pwd) pytest +} + +post_install() { + vlicense LICENSE +} From 61dc08a47c1842777465a4a171c5f3aeb96a71c3 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:02:23 +0100 Subject: [PATCH 5/9] New package: python3-socks-1.2.0 --- srcpkgs/python3-socks/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-socks/template diff --git a/srcpkgs/python3-socks/template b/srcpkgs/python3-socks/template new file mode 100644 index 000000000000..afa0c84fb8cd --- /dev/null +++ b/srcpkgs/python3-socks/template @@ -0,0 +1,20 @@ +# Template file for 'python3-socks' +pkgname=python3-socks +version=1.2.0 +revision=1 +wrksrc="python-socks-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +checkdepends="python3-async-timeout python3-curio python3-trio python3-attrs + python3-async_generator python3-sniffio python3-sortedcontainers + python3-outcome python3-idna" +# Optional dependencies: +# async-timeout >= 3.0.1 +# trio >= 0.16.0 +# curio >= 1.4 +short_desc="Core proxy client functionality for Python" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="Apache-2.0" +homepage="https://github.com/romis2012/python-socks" +distfiles="${PYPI_SITE}/p/python-socks/python-socks-${version}.tar.gz" +checksum=3054a8afa984a35144198e00fed1144eeae3287cc231ac7db3908d32ab642cd4 From 624db1e410ce18215dbf1f99b3b100f725095b0a Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Thu, 28 Jan 2021 01:14:56 +0100 Subject: [PATCH 6/9] python3-aiohttp_socks: update to 0.5.5. --- srcpkgs/python3-aiohttp_socks/template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srcpkgs/python3-aiohttp_socks/template b/srcpkgs/python3-aiohttp_socks/template index fa75a54302c8..5ebdd5b6ab90 100644 --- a/srcpkgs/python3-aiohttp_socks/template +++ b/srcpkgs/python3-aiohttp_socks/template @@ -1,15 +1,15 @@ # Template file for 'python3-aiohttp_socks' pkgname=python3-aiohttp_socks -version=0.2.2 -revision=3 +version=0.5.5 +revision=1 wrksrc="aiohttp_socks-${version}" build_style=python3-module -pycompile_module="aiohttp_socks" hostmakedepends="python3-setuptools" -depends="python3-aiohttp" +depends="python3-aiohttp python3-socks" +checkdepends="python3-aiohttp python3-attrs python3-socks" short_desc="SOCKS proxy connector for aiohttp" maintainer="Christian Buschau <christian.buschau@mailbox.org>" license="Apache-2.0" homepage="https://github.com/romis2012/aiohttp-socks" distfiles="${PYPI_SITE}/a/aiohttp_socks/aiohttp_socks-${version}.tar.gz" -checksum=eebd8939a7c3c1e3e7e1b2552c60039b4c65ef6b8b2351efcbdd98290538e310 +checksum=2eb2059756bde34c55bb429541cbf2eba3fd53e36ac80875b461221e2858b04a From 86e5518f8f8a96a68b8e511bdc03ae320a2b3ccf Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:21:17 +0100 Subject: [PATCH 7/9] New package: python3-bitstring-3.1.7 --- srcpkgs/python3-bitstring/template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 srcpkgs/python3-bitstring/template diff --git a/srcpkgs/python3-bitstring/template b/srcpkgs/python3-bitstring/template new file mode 100644 index 000000000000..3696935078db --- /dev/null +++ b/srcpkgs/python3-bitstring/template @@ -0,0 +1,17 @@ +# Template file for 'python3-bitstring' +pkgname=python3-bitstring +version=3.1.7 +revision=1 +wrksrc="bitstring-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +short_desc="Python module for creation and analysis of binary data" +maintainer="Arjan Mossel <arjanmossel@gmail.com>" +license="MIT" +homepage="https://scott-griffiths.github.io/bitstring/" +distfiles="${PYPI_SITE}/b/bitstring/bitstring-${version}.tar.gz" +checksum=fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a + +post_install() { + vlicense LICENSE +} From f37e9357b415f1ea51d5281e026a7b0236b95371 Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Sat, 30 Jan 2021 18:40:08 +0100 Subject: [PATCH 8/9] python3-dnspython: update to 2.1.0. --- .../python3-dnspython/patches/gh-345.patch | 166 ------------------ srcpkgs/python3-dnspython/template | 19 +- 2 files changed, 15 insertions(+), 170 deletions(-) delete mode 100644 srcpkgs/python3-dnspython/patches/gh-345.patch diff --git a/srcpkgs/python3-dnspython/patches/gh-345.patch b/srcpkgs/python3-dnspython/patches/gh-345.patch deleted file mode 100644 index 272c9a7ca5d3..000000000000 --- a/srcpkgs/python3-dnspython/patches/gh-345.patch +++ /dev/null @@ -1,166 +0,0 @@ -Backport of https://github.com/rthalley/dnspython/pull/345. - ---- dns/dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ dns/dnssec.py 2018-12-29 19:49:57.505384082 +0100 -@@ -18,6 +18,7 @@ - """Common DNSSEC-related functions and constants.""" - - from io import BytesIO -+import hashlib - import struct - import time - -@@ -39,6 +40,57 @@ - """The DNSSEC signature is invalid.""" - - -+class Hash: -+ """ -+ Compatibilty Hash method -+ Has the same inteface as the stdlib hashlib.hash, with the added `oid` -+ attribute used by the crypto module -+ """ -+ _oid_map = { -+ 'MD5': '1.2.840.113549.2.5', -+ 'SHA1': '1.3.14.3.2.26', -+ 'SHA256': '2.16.840.1.101.3.4.2.1', -+ 'SHA384': '2.16.840.1.101.3.4.2.2', -+ 'SHA512': '2.16.840.1.101.3.4.2.3', -+ } -+ -+ def __init__(self): -+ self._hash = None -+ -+ @classmethod -+ def new(cls, name, data=b''): -+ self = cls() -+ self._hash = hashlib.new(name, data) -+ -+ return self -+ -+ def update(self, data): -+ self._hash.update(data) -+ -+ def digest(self): -+ return self._hash.digest() -+ -+ def hexdigest(self): -+ return self._hash.hexdigest() -+ -+ def copy(self): -+ copy = Hash() -+ copy._hash = self._hash.copy() -+ -+ return copy -+ -+ @property -+ def name(self): -+ return self._hash.name -+ -+ @property -+ def oid(self): -+ try: -+ return self._oid_map[self.name] -+ except KeyError: -+ raise RuntimeError('OID for algorithm %s is unknown' % self.name) -+ -+ - #: RSAMD5 - RSAMD5 = 1 - #: DH -@@ -165,10 +217,10 @@ - - if algorithm.upper() == 'SHA1': - dsalg = 1 -- hash = SHA1.new() -+ hash = Hash.new('SHA1') - elif algorithm.upper() == 'SHA256': - dsalg = 2 -- hash = SHA256.new() -+ hash = Hash.new('SHA256') - else: - raise UnsupportedAlgorithm('unsupported algorithm "%s"' % algorithm) - -@@ -240,15 +292,15 @@ - - def _make_hash(algorithm): - if _is_md5(algorithm): -- return MD5.new() -+ return Hash.new('MD5') - if _is_sha1(algorithm): -- return SHA1.new() -+ return Hash.new('SHA1') - if _is_sha256(algorithm): -- return SHA256.new() -+ return Hash.new('sha256') - if _is_sha384(algorithm): -- return SHA384.new() -+ return Hash.new('sha384') - if _is_sha512(algorithm): -- return SHA512.new() -+ return Hash.new('sha512') - raise ValidationFailure('unknown hash for algorithm %u' % algorithm) - - -@@ -479,12 +531,10 @@ - try: - try: - # test we're using pycryptodome, not pycrypto (which misses SHA1 for example) -- from Crypto.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Crypto.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Crypto.Signature import pkcs1_15, DSS - from Crypto.Util import number - except ImportError: -- from Cryptodome.Hash import MD5, SHA1, SHA256, SHA384, SHA512 - from Cryptodome.PublicKey import RSA as CryptoRSA, DSA as CryptoDSA - from Cryptodome.Signature import pkcs1_15, DSS - from Cryptodome.Util import number ---- tests/test_dnssec.py.orig 2018-12-01 07:25:26.000000000 +0100 -+++ tests/test_dnssec.py 2018-12-29 19:51:46.799389525 +0100 -@@ -177,10 +177,6 @@ - abs_dnspython_org, when) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -- self.failUnless(ds == good_ds) -- - def testAbsoluteDSAGood(self): # type: () -> None - dns.dnssec.validate(abs_dsa_soa, abs_dsa_soa_rrsig, abs_dsa_keys, None, - when2) -@@ -191,14 +187,6 @@ - abs_dsa_keys, None, when2) - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - -- def testMakeExampleSHA1DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -- self.failUnless(ds == example_ds_sha1) -- -- def testMakeExampleSHA256DS(self): # type: () -> None -- ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -- self.failUnless(ds == example_ds_sha256) -- - @unittest.skipUnless(dns.dnssec._have_ecdsa, - "python ECDSA cannot be imported") - def testAbsoluteECDSA256Good(self): # type: () -> None -@@ -228,5 +216,20 @@ - self.failUnlessRaises(dns.dnssec.ValidationFailure, bad) - - -+class DNSSECMakeDSTestCase(unittest.TestCase): -+ -+ def testMakeSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') -+ self.failUnless(ds == good_ds) -+ -+ def testMakeExampleSHA1DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA1') -+ self.failUnless(ds == example_ds_sha1) -+ -+ def testMakeExampleSHA256DS(self): # type: () -> None -+ ds = dns.dnssec.make_ds(abs_example, example_sep_key, 'SHA256') -+ self.failUnless(ds == example_ds_sha256) -+ -+ - if __name__ == '__main__': - unittest.main() diff --git a/srcpkgs/python3-dnspython/template b/srcpkgs/python3-dnspython/template index 3673209c4025..2374c83ca243 100644 --- a/srcpkgs/python3-dnspython/template +++ b/srcpkgs/python3-dnspython/template @@ -1,17 +1,28 @@ # Template file for 'python3-dnspython' pkgname=python3-dnspython -version=1.16.0 -revision=5 +version=2.1.0 +revision=1 wrksrc="dnspython-${version}" build_style=python3-module hostmakedepends="python3-setuptools unzip" depends="python3" +checkdepends="python3-attrs python3-async_generator python3-idna python3-curio + python3-trio python3-outcome python3-sniffio python3-sortedcontainers + python3-requests python3-requests-toolbelt python3-pycryptodome + python3-pytest iana-etc" short_desc="DNS toolkit for Python3" maintainer="Orphaned <orphan@voidlinux.org>" license="ISC" -homepage="http://www.dnspython.org/" +homepage="https://www.dnspython.org/" distfiles="${PYPI_SITE}/d/dnspython/dnspython-${version}.zip" -checksum=36c5e8e38d4369a08b6780b7f27d790a292b2b08eea01607865bf0936c558e01 +checksum=e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4 +# Some tests not working +make_check=extended + +do_check() { + # All tests should work again in version 2.1.1 or 2.2.0 (https://github.com/rthalley/dnspython/issues/622) + PYTHONPATH=$(cd build/lib* && pwd) pytest -k 'not test_unpickle' +} post_install() { vlicense LICENSE From 9a5fcfb397720f0364380eb1d6f3a114d88fdb2e Mon Sep 17 00:00:00 2001 From: Arjan Mossel <arjanmossel@gmail.com> Date: Fri, 29 Jan 2021 17:22:13 +0100 Subject: [PATCH 9/9] electrum: update to 4.0.9. --- srcpkgs/electrum/patches/no-certifi.patch | 109 ---------------------- srcpkgs/electrum/template | 21 +++-- 2 files changed, 11 insertions(+), 119 deletions(-) delete mode 100644 srcpkgs/electrum/patches/no-certifi.patch diff --git a/srcpkgs/electrum/patches/no-certifi.patch b/srcpkgs/electrum/patches/no-certifi.patch deleted file mode 100644 index eb215543b297..000000000000 --- a/srcpkgs/electrum/patches/no-certifi.patch +++ /dev/null @@ -1,109 +0,0 @@ -Upstream: No -Reason: Avoid certifi dependency - -diff --git contrib/requirements/requirements.txt contrib/requirements/requirements.txt -index 1159a0469..9e406b56e 100644 ---- contrib/requirements/requirements.txt -+++ contrib/requirements/requirements.txt -@@ -8,4 +8,3 @@ qdarkstyle<2.7 - aiorpcx>=0.18,<0.19 - aiohttp>=3.3.0 - aiohttp_socks --certifi -diff --git electrum/interface.py electrum/interface.py -index b5eac439c..14bbd7ab9 100644 ---- electrum/interface.py -+++ electrum/interface.py -@@ -40,7 +40,6 @@ from aiorpcx import RPCSession, Notification, NetAddress - from aiorpcx.curio import timeout_after, TaskTimeout - from aiorpcx.jsonrpc import JSONRPC, CodeMessageError - from aiorpcx.rawsocket import RSClient --import certifi - - from .util import ignore_exceptions, log_exceptions, bfh, SilentTaskGroup - from . import util -@@ -57,7 +56,7 @@ if TYPE_CHECKING: - from .network import Network - - --ca_path = certifi.where() -+ca_path = '/etc/ssl/certs/ca-certificates.crt' - - BUCKET_NAME_OF_ONION_SERVERS = 'onion' - -diff --git electrum/paymentrequest.py electrum/paymentrequest.py -index fedcd1b3a..cba4879c7 100644 ---- electrum/paymentrequest.py -+++ electrum/paymentrequest.py -@@ -29,7 +29,6 @@ import traceback - import json - from typing import Optional - --import certifi - import urllib.parse - import aiohttp - -@@ -54,7 +53,7 @@ _logger = get_logger(__name__) - REQUEST_HEADERS = {'Accept': 'application/bitcoin-paymentrequest', 'User-Agent': 'Electrum'} - ACK_HEADERS = {'Content-Type':'application/bitcoin-payment','Accept':'application/bitcoin-paymentack','User-Agent':'Electrum'} - --ca_path = certifi.where() -+ca_path = '/etc/ssl/certs/ca-certificates.crt' - ca_list = None - ca_keyID = None - -diff --git electrum/util.py electrum/util.py -index 62df080a9..9c96055ba 100644 ---- electrum/util.py -+++ electrum/util.py -@@ -44,7 +44,6 @@ import ssl - import aiohttp - from aiohttp_socks import SocksConnector, SocksVer - from aiorpcx import TaskGroup --import certifi - - from .i18n import _ - from .logging import get_logger, Logger -@@ -62,7 +61,7 @@ def inv_dict(d): - return {v: k for k, v in d.items()} - - --ca_path = certifi.where() -+ca_path = '/etc/ssl/certs/ca-certificates.crt' - - - base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} -diff --git electrum/x509.py electrum/x509.py -index c38edc77a..1c4065444 100644 ---- electrum/x509.py -+++ electrum/x509.py -@@ -343,7 +343,5 @@ def load_certificates(ca_path): - - - if __name__ == "__main__": -- import certifi -- -- ca_path = certifi.where() -+ ca_path = '/etc/ssl/certs/ca-certificates.crt' - ca_list, ca_keyID = load_certificates(ca_path) -diff --git run_electrum run_electrum -index 1f5ee2f03..7891c50f0 100755 ---- run_electrum -+++ run_electrum -@@ -58,7 +58,6 @@ def check_imports(): - import dns - import pyaes - import ecdsa -- import certifi - import qrcode - import google.protobuf - import jsonrpclib -@@ -72,7 +71,7 @@ def check_imports(): - from google.protobuf import descriptor_pb2 - from jsonrpclib import SimpleJSONRPCServer - # make sure that certificates are here -- assert os.path.exists(certifi.where()) -+ assert os.path.exists('/etc/ssl/certs/ca-certificates.crt') - - - if not is_android: diff --git a/srcpkgs/electrum/template b/srcpkgs/electrum/template index 5c3016675e5f..c8f9aa4c6cff 100644 --- a/srcpkgs/electrum/template +++ b/srcpkgs/electrum/template @@ -1,25 +1,26 @@ # Template file for 'electrum' pkgname=electrum -version=3.3.8 -revision=2 +version=4.0.9 +revision=1 build_style=python3-module -pycompile_module="electrum electrum_gui electrum_plugins" -hostmakedepends="python3-PyQt5-devel-tools python3-setuptools" -depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx>=0.18<0.19 - python3-dnspython python3-ecdsa python3-jsonrpclib python3-protobuf - python3-pyaes python3-pycryptodome python3-PyQt5 python3-qrcode" -# Missing optional dependencies: +hostmakedepends="python3-setuptools python3-PyQt5-devel-tools" +depends="python3-aiohttp python3-aiohttp_socks python3-aiorpcx + python3-bitstring python3-dnspython python3-ecdsa python3-jsonrpclib + python3-protobuf python3-pyaes python3-pycryptodomex python3-PyQt5 + python3-qrcode python3-socks python3-cryptography libbitcoin-secp256k1 + python3-certifi" +# Optional dependencies: # btchip - BTChip hardware wallet support # trezor - TREZOR hardware wallet support # keepkey - KeepKey hardware wallet support # qdarkstyle - Dark theme +checkdepends="$depends python3-pytest" short_desc="Lightweight Bitcoin wallet" maintainer="Charles E. Lehner <cel@celehner.com>" license="MIT" homepage="https://electrum.org/" -# patch doesn't apply for PyPI tarball distfiles="https://github.com/spesmilo/electrum/archive/${version}.tar.gz" -checksum=52addd8c0d08d3cc7cc34015efd67f7396fe30a74ac668b8fb77f6b3b927fd8b +checksum=67e63afe6a9d8944f872500fbf6312a3840f3fa8ebd0c1aadfbba3147d8b3c24 post_install() { sed -i -e 's|electrum %u|electrum|' \
[-- Attachment #1: Type: text/plain, Size: 215 bytes --] New review comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r600872648 Comment: Indeed, no reason for this now that it's available in the repository.
[-- Attachment #1: Type: text/plain, Size: 151 bytes --] New review comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/28305#discussion_r600878249 Comment: Done!
[-- Attachment #1: Type: text/plain, Size: 2506 bytes --] There's a merged pull request on the void-packages repository Update Electrum to 4.0.9 https://github.com/void-linux/void-packages/pull/28305 Description: <!-- Mark items with [x] where applicable --> #### General - [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements) #### Have the results of the proposed changes been tested? - [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me - [ ] I generally don't use the affected packages but briefly tested this PR <!-- If GitHub CI cannot be used to validate the build result (for example, if the build is likely to take several hours), make sure to [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration). When skipping CI, uncomment and fill out the following section. Note: for builds that are likely to complete in less than 2 hours, it is not acceptable to skip CI. --> #### Does it build and run successfully? (Please choose at least one native build and, if supported, at least one cross build. More are better.) - [x] I built this PR locally for my native architecture, (ARCH-LIBC) - [ ] I built this PR locally for these architectures (if supported. mark crossbuilds): - [ ] aarch64-musl - [ ] armv7l - [ ] armv6l-musl ~This depends on #28272.~ ~Using package [libbitcoin-secp256k1](https://github.com/void-linux/void-packages/tree/master/srcpkgs/libbitcoin-secp256k1) as dependency might be possible, but: it is based on this release: https://github.com/libbitcoin/secp256k1/releases/tag/v0.1.0.13 with the last commit included dating to December 2016. Electrum currently [uses](https://github.com/spesmilo/electrum/blob/master/contrib/make_libsecp256k1.sh) a commit from from June 2020 from https://github.com/bitcoin-core/secp256k1.~ --> The old version of `libbitcoin-secp256k1` in Void's repos is is sufficient for now, as per [this Electrum issue](https://github.com/spesmilo/electrum/issues/7014): `if the tests pass, it is considered good enough.` New dependencies: python3-socks-1.2.0 python3-curio-1.4 python3-trio-0.18.0 python3-outcome-1.1.0 python3-sniffio-1.2.0 python3-bitstring-3.1.7 Updated dependencies: python3-aiohttp_socks: update to 0.5.5. python3-dnspython: update to 2.1.0. So this is ready; also tested locally.