From nobody Fri Feb 16 09:26:11 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tbml764YMz5BM69; Fri, 16 Feb 2024 09:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tbml7460zz42gj; Fri, 16 Feb 2024 09:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708075571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=58dIgNYcMc/9HHHPfPCOxFx+ZLBgvGvSxX8YpcMGEIA=; b=rvkLcI12RajNp6hwnMrM1kX0HQJVDHn5peoXaoNOHJ8LelwEZh7c9EM6DACipeODzLSHfx 0t7d9/OXhGuLvQVhu8LtgV9RMvjXNCod27uVUxjcqo7XxnVaCIhToYfWEzco31r5LKP83k iFkFXGue3AWBJLsPGvMg8/Wlop0EYbGwwQOZUwb0VDCgmWiaseyeQklAwf8PwGwREmLE+z cBq4QktZYE/AEI7F9X+6kJhYcACWpMgHry64euhv6w3RT7jiNm5A842WCm31bU8Y3olD5S 1j5sZJaC68WTqKfZNWEl+h8mOfUkW5/MCRol0xcjkprhtl+zgMnGDJbrwkgOpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708075571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=58dIgNYcMc/9HHHPfPCOxFx+ZLBgvGvSxX8YpcMGEIA=; b=AHy3vc0D84+JtB+1AwoynWM1phtkZ8xXZWa4Tg+BSKDeWvKVw+RjCZ379H7MU/xOMLDLnb 1qCD2vWhUodjhKoIR3zE0Fc/Tv9YJTQD4Hv5rN0afvn1wutUbZtD9oPfP/zpl/9liTLxUm ISZkmm0aS6CqGFne1nBMWv+/9Ffvzc0KMnTOfQR5nHPufh+0obNt10ZszXK9lEBbfHbvJp Ymi7ucd2h+nf7m5iDVpkL0BcyH31RBluXp1L5bbphrw76XdQXbFV63yMYIhzhl28vk3LaU kiG72C/8GOV2sLBlwlD1BxKXUm27tcKYG3Q6VfiUeEYbQqgH2oZzHIFfCayAuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708075571; a=rsa-sha256; cv=none; b=E/P5szjhYEUrn/tvgGPxrg0NxXpa8nIntfeFS+sRuixNYhormOu8NGI0ajjVaBkrrUQXak KBOTW2ok1M3qe6Tq2piI3bwxsWRbiVQkisbFFYE1/PvrINSuLARTUMIdzpJ52fKnB6jV8W XnlUkZJlp3pNz+htPqFYS2THzXEHN3hc/SYJAQiu5suV9hgj/YlvXHVKDyMlmN6kk78HpX us9vsTMfUI3J5hN9WYI0GTES6qgFTMzCzGu0U4VCR7SvIV2poZNcwwq1Old9LFGx5eXF3v dRSYDhM8I68iQ5+KuDz6lukFG1naKxV2a6vZGphWbv6pPmautCu6+RTVzI25CA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tbml739CHzKG7; Fri, 16 Feb 2024 09:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41G9QBsB065881; Fri, 16 Feb 2024 09:26:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41G9QBLv065878; Fri, 16 Feb 2024 09:26:11 GMT (envelope-from git) Date: Fri, 16 Feb 2024 09:26:11 GMT Message-Id: <202402160926.41G9QBLv065878@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vasil Dimov Subject: git: 50d1b70610af - main - net-p2p/c-lightning: hook dependencies for the clnrest plugin List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50d1b70610afb3c07acb3558777fb2df55bca0c1 Auto-Submitted: auto-generated The branch main has been updated by vd: URL: https://cgit.FreeBSD.org/ports/commit/?id=50d1b70610afb3c07acb3558777fb2df55bca0c1 commit 50d1b70610afb3c07acb3558777fb2df55bca0c1 Author: Vasil Dimov AuthorDate: 2024-02-13 11:01:45 +0000 Commit: Vasil Dimov CommitDate: 2024-02-16 09:25:52 +0000 net-p2p/c-lightning: hook dependencies for the clnrest plugin The clnrest plugin is already installed but it depends on a bunch of Python packages. Add an option to net-p2p/c-lightning to install and depend on those packages. Further, 3 of those packages were not in the FreeBSD ports. Add them: * net-p2p/pyln-bolt7 Lightning Network BOLT7 implementation * net-p2p/pyln-client Python client library for lightningd (net-p2p/c-lightning) * net-p2p/pyln-proto Lightning Network protocol implementation To enable the plugin, add clnrest-port= clnrest-protocol= clnrest-host= to /usr/local/etc/lightningd-bitcoin.conf, see https://docs.corelightning.org/docs/rest Differential Revision: https://reviews.freebsd.org/D43863 --- net-p2p/Makefile | 3 ++ net-p2p/c-lightning/Makefile | 55 ++++++++++++++++++++++++++++++++- net-p2p/c-lightning/files/lightningd.in | 3 ++ net-p2p/pyln-bolt7/Makefile | 20 ++++++++++++ net-p2p/pyln-bolt7/distinfo | 3 ++ net-p2p/pyln-bolt7/pkg-descr | 1 + net-p2p/pyln-client/Makefile | 22 +++++++++++++ net-p2p/pyln-client/distinfo | 3 ++ net-p2p/pyln-client/pkg-descr | 5 +++ net-p2p/pyln-proto/Makefile | 21 +++++++++++++ net-p2p/pyln-proto/distinfo | 3 ++ net-p2p/pyln-proto/pkg-descr | 5 +++ 12 files changed, 143 insertions(+), 1 deletion(-) diff --git a/net-p2p/Makefile b/net-p2p/Makefile index c74f19ec13b2..35e1957b13bb 100644 --- a/net-p2p/Makefile +++ b/net-p2p/Makefile @@ -83,6 +83,9 @@ SUBDIR += py-transmission-rpc SUBDIR += py-tremc SUBDIR += py-vertex + SUBDIR += pyln-bolt7 + SUBDIR += pyln-client + SUBDIR += pyln-proto SUBDIR += qbittorrent SUBDIR += radarr SUBDIR += readarr diff --git a/net-p2p/c-lightning/Makefile b/net-p2p/c-lightning/Makefile index 5a7b6d352556..46e60ede7156 100644 --- a/net-p2p/c-lightning/Makefile +++ b/net-p2p/c-lightning/Makefile @@ -2,6 +2,7 @@ PORTNAME= c-lightning # To build from an arbitrary git commit comment PORTVERSION and PORTREVISION (if present) PORTVERSION= 23.11.2 DISTVERSIONPREFIX= v +PORTREVISION= 1 # and uncomment the following two lines (use for example -git-HEAD or -git-f8d8348c) #PORTVERSION= 0 #PKGNAMESUFFIX= -git-f8d8348c @@ -38,12 +39,58 @@ SHEBANG_FILES= plugins/clnrest/clnrest.py \ EXTRA_PATCHES_aarch64= ${FILESDIR}/extra-patch-external_libwally-core_src_ccan_ccan_base64_base64.c EXTRA_PATCHES= ${EXTRA_PATCHES_${ARCH}} -OPTIONS_DEFINE= COMPATIBILITY DEBUG +OPTIONS_DEFINE= CLNRESTDEPS COMPATIBILITY DEBUG OPTIONS_MULTI= STORAGE OPTIONS_MULTI_STORAGE= POSTGRESQL SQLITE OPTIONS_RADIO= TESTING OPTIONS_RADIO_TESTING= ASAN VALGRIND +CLNRESTDEPS_DESC= Install and depend on packages required by the clnrest plugin +# for d in `grep -E '^[^[:space:]]' work/lightning-23.11.2/plugins/clnrest/requirements.txt |cut -f 1 -d =` ; do echo "=== $d ===" ; portsearch -n "py.*$d" -o path ; done +CLNRESTDEPS_RUN_DEPENDS=\ + ${PYTHON_PKGNAMEPREFIX}Flask-Cors>0:www/py-flask-cors@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}aniso8601>0:devel/py-aniso8601@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}asn1crypto>0:devel/py-asn1crypto@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}attrs>0:devel/py-attrs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}base58>0:security/py-base58@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}bidict>0:devel/py-bidict@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}bitstring>0:devel/py-bitstring@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}blinker>0:devel/py-blinker@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cffi>0:devel/py-cffi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}coincurve>0:security/py-coincurve@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}colorama>0:devel/py-colorama@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flask-restx>0:www/py-flask-restx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flask-socketio>0:www/py-flask-socketio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flask>0:www/py-flask@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gevent-websocket>0:www/py-gevent-websocket@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gevent>0:devel/py-gevent@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}greenlet>0:devel/py-greenlet@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gunicorn>0:www/py-gunicorn@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}importlib-resources>0:devel/py-importlib-resources@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}itsdangerous>0:security/py-itsdangerous@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}json5>0:devel/py-json5@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jsonschema-specifications>0:devel/py-jsonschema-specifications@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jsonschema>0:devel/py-jsonschema@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}markupsafe>0:textproc/py-markupsafe@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycparser>0:devel/py-pycparser@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyln-bolt7>0:net-p2p/pyln-bolt7@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyln-client>0:net-p2p/pyln-client@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyln-proto>0:net-p2p/pyln-proto@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pysocks>0:net/py-pysocks@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-engineio>0:devel/py-python-engineio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}python-socketio>0:devel/py-python-socketio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}referencing>0:devel/py-referencing@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}rpds-py>0:devel/py-rpds-py@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}werkzeug>0:www/py-werkzeug@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}zipp>0:devel/py-zipp@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}zope.event>0:devel/py-zope.event@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}zope.interface>0:devel/py-zope.interface@${PY_FLAVOR} COMPATIBILITY_CONFIGURE_ENABLE= compat COMPATIBILITY_DESC= Compatibility mode, good to disable to see if your software breaks DEBUG_CONFIGURE_ENABLE= debugbuild @@ -60,6 +107,12 @@ VALGRIND_DESC= Run tests with Valgrind OPTIONS_DEFAULT=COMPATIBILITY SQLITE +.include + +.if ${PORT_OPTIONS:MCLNRESTDEPS} +USE_PYTHON+= cryptography +.endif + HAS_CONFIGURE= yes CONFIGURE_ARGS= --disable-rust diff --git a/net-p2p/c-lightning/files/lightningd.in b/net-p2p/c-lightning/files/lightningd.in index 043d8c43796e..76514303e6dd 100644 --- a/net-p2p/c-lightning/files/lightningd.in +++ b/net-p2p/c-lightning/files/lightningd.in @@ -22,6 +22,9 @@ rcvar=lightningd_enable load_rc_config ${name} +# If clnrest plugin is enabled it fails to load with OpenSSL 3.0: RuntimeError: OpenSSL 3.0's legacy provider failed to load. This is a fatal error by default, but cryptography supports running without legacy algorithms by setting the environment variable CRYPTOGRAPHY_OPENSSL_NO_LEGACY. If you did not expect this error, you have likely made a mistake with your OpenSSL configuration. +export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1 + : ${lightningd_enable:="NO"} : ${lightningd_user:="%%U%%"} : ${lightningd_group:="%%G%%"} diff --git a/net-p2p/pyln-bolt7/Makefile b/net-p2p/pyln-bolt7/Makefile new file mode 100644 index 000000000000..92d6f2615fab --- /dev/null +++ b/net-p2p/pyln-bolt7/Makefile @@ -0,0 +1,20 @@ +PORTNAME= pyln-bolt7 +PORTVERSION= 1.0.246 +CATEGORIES= net-p2p python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= vd@FreeBSD.org +COMMENT= Lightning Network BOLT7 implementation +WWW= https://github.com/ElementsProject/lightning/tree/master/contrib/pyln-spec/bolt7 + +LICENSE= MIT + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=0:devel/py-poetry-core@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist pep517 + +NO_ARCH= yes + +.include diff --git a/net-p2p/pyln-bolt7/distinfo b/net-p2p/pyln-bolt7/distinfo new file mode 100644 index 000000000000..37f6bc139915 --- /dev/null +++ b/net-p2p/pyln-bolt7/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1707742564 +SHA256 (pyln-bolt7-1.0.246.tar.gz) = 2b53744fa21c1b12d2c9c9df153651b122e38fa65d4a5c3f2957317ee148e089 +SIZE (pyln-bolt7-1.0.246.tar.gz) = 17905 diff --git a/net-p2p/pyln-bolt7/pkg-descr b/net-p2p/pyln-bolt7/pkg-descr new file mode 100644 index 000000000000..aecbf254812d --- /dev/null +++ b/net-p2p/pyln-bolt7/pkg-descr @@ -0,0 +1 @@ +Lightning Network BOLT7 implementation diff --git a/net-p2p/pyln-client/Makefile b/net-p2p/pyln-client/Makefile new file mode 100644 index 000000000000..f68ea47e8119 --- /dev/null +++ b/net-p2p/pyln-client/Makefile @@ -0,0 +1,22 @@ +PORTNAME= pyln-client +PORTVERSION= 23.11 +CATEGORIES= net-p2p python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= ${PORTNAME:S/-/_/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} + +MAINTAINER= vd@FreeBSD.org +COMMENT= Python client library for lightningd (net-p2p/c-lightning) +WWW= https://github.com/ElementsProject/lightning/tree/master/contrib/pyln-client + +LICENSE= MIT + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=0:devel/py-poetry-core@${PY_FLAVOR} + +USES= python shebangfix +USE_PYTHON= autoplist pep517 +SHEBANG_FILES= pyln/client/gossmap.py + +NO_ARCH= yes + +.include diff --git a/net-p2p/pyln-client/distinfo b/net-p2p/pyln-client/distinfo new file mode 100644 index 000000000000..8d472b4b8dc2 --- /dev/null +++ b/net-p2p/pyln-client/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1707743561 +SHA256 (pyln_client-23.11.tar.gz) = 4102792bbdca545d5fbfa1fb1371222744e7157ec3d2c162edb03e8786db9823 +SIZE (pyln_client-23.11.tar.gz) = 35134 diff --git a/net-p2p/pyln-client/pkg-descr b/net-p2p/pyln-client/pkg-descr new file mode 100644 index 000000000000..bcb46791d9e5 --- /dev/null +++ b/net-p2p/pyln-client/pkg-descr @@ -0,0 +1,5 @@ +A python client library for lightningd (net-p2p/c-lightning) + +This package implements the Unix socket based JSON-RPC protocol that lightningd +exposes to the rest of the world. It can be used to call arbitrary functions on +the RPC interface, and serves as a basis for plugins written in python. diff --git a/net-p2p/pyln-proto/Makefile b/net-p2p/pyln-proto/Makefile new file mode 100644 index 000000000000..fe9e3bb45e0b --- /dev/null +++ b/net-p2p/pyln-proto/Makefile @@ -0,0 +1,21 @@ +PORTNAME= pyln-proto +PORTVERSION= 23.11 +CATEGORIES= net-p2p python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= ${PORTNAME:S/-/_/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} + +MAINTAINER= vd@FreeBSD.org +COMMENT= Lightning Network protocol implementation +WWW= https://github.com/ElementsProject/lightning/tree/master/contrib/pyln-proto + +LICENSE= MIT + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=0:devel/py-poetry-core@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist pep517 + +NO_ARCH= yes + +.include diff --git a/net-p2p/pyln-proto/distinfo b/net-p2p/pyln-proto/distinfo new file mode 100644 index 000000000000..7d50ba245eea --- /dev/null +++ b/net-p2p/pyln-proto/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1707744598 +SHA256 (pyln_proto-23.11.tar.gz) = e7056386be1527fd2c49a3db9228a9f5fd44cd5cdc9b1d431b21112137dd5957 +SIZE (pyln_proto-23.11.tar.gz) = 27810 diff --git a/net-p2p/pyln-proto/pkg-descr b/net-p2p/pyln-proto/pkg-descr new file mode 100644 index 000000000000..2237bda60672 --- /dev/null +++ b/net-p2p/pyln-proto/pkg-descr @@ -0,0 +1,5 @@ +Lightning Network protocol implementation + +This package implements some of the Lightning Network protocol in pure python. +It is intended for protocol testing and some minor tooling only. It is not +deemed secure enough to handle any amount of real funds.