From owner-svn-ports-all@freebsd.org Fri Oct 13 15:09:31 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FBE1E4A711; Fri, 13 Oct 2017 15:09:31 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C146686A6; Fri, 13 Oct 2017 15:09:31 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9DF9UXh050986; Fri, 13 Oct 2017 15:09:30 GMT (envelope-from ehaupt@FreeBSD.org) Received: (from ehaupt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9DF9U5H050982; Fri, 13 Oct 2017 15:09:30 GMT (envelope-from ehaupt@FreeBSD.org) Message-Id: <201710131509.v9DF9U5H050982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ehaupt set sender to ehaupt@FreeBSD.org using -f From: Emanuel Haupt Date: Fri, 13 Oct 2017 15:09:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r452010 - in head/finance/electrum: . files X-SVN-Group: ports-head X-SVN-Commit-Author: ehaupt X-SVN-Commit-Paths: in head/finance/electrum: . files X-SVN-Commit-Revision: 452010 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2017 15:09:31 -0000 Author: ehaupt Date: Fri Oct 13 15:09:30 2017 New Revision: 452010 URL: https://svnweb.freebsd.org/changeset/ports/452010 Log: Electrum is installed with various hardware wallet plugins but they lack the necessary python backends. Now that we have ports for the TREZOR and LEDGER hardware wallets in the ports tree add those as an option and enable by default. Provide devd sample rules and display a message on how to enable. Takeover maintainership. PR: 222946 Approved by: amutu@amutu.com Added: head/finance/electrum/files/ledger_wallet.conf.sample (contents, props changed) head/finance/electrum/files/pkg-message-hwwallet.in (contents, props changed) head/finance/electrum/files/trezor_wallet.conf.sample (contents, props changed) Modified: head/finance/electrum/Makefile Modified: head/finance/electrum/Makefile ============================================================================== --- head/finance/electrum/Makefile Fri Oct 13 15:07:55 2017 (r452009) +++ head/finance/electrum/Makefile Fri Oct 13 15:09:30 2017 (r452010) @@ -3,12 +3,13 @@ PORTNAME= electrum PORTVERSION= 2.9.3 +PORTREVISION= 1 CATEGORIES= finance python MASTER_SITES= https://download.electrum.org/${PORTVERSION}/ \ http://download.electrum.org/${PORTVERSION}/ DISTNAME= Electrum-${PORTVERSION} -MAINTAINER= amutu@amutu.com +MAINTAINER= ehaupt@FreeBSD.org COMMENT= Easy to use Bitcoin client LICENSE= MIT @@ -29,8 +30,32 @@ USE_PYQT= gui_run USE_PYTHON= autoplist distutils PYDISTUTILS_PKGNAME= Electrum NO_ARCH= yes +OPTIONS_SUB= yes +OPTIONS_DEFINE= LEDGER TREZOR +OPTIONS_DEFAULT=LEDGER TREZOR + +LEDGER_DESC= Enable LEDGER Bitcoin hardware wallet support +TREZOR_DESC= Enable TREZOR Bitcoin hardware wallet support + +LEDGER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}btchip>0:security/py-btchip +TREZOR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}trezor>0:security/py-trezor + +LEDGER_PLIST_FILES= "@sample etc/devd/ledger_wallet.conf.sample" +TREZOR_PLIST_FILES= "@sample etc/devd/trezor_wallet.conf.sample" + +LEDGER_SUB_FILES= pkg-message-hwwallet +TREZOR_SUB_FILES= pkg-message-hwwallet + post-patch: @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/setup.py + +post-install-LEDGER-on: + ${INSTALL_DATA} ${FILESDIR}/ledger_wallet.conf.sample \ + ${STAGEDIR}${PREFIX}/etc/devd + +post-install-TREZOR-on: + ${INSTALL_DATA} ${FILESDIR}/trezor_wallet.conf.sample \ + ${STAGEDIR}${PREFIX}/etc/devd .include Added: head/finance/electrum/files/ledger_wallet.conf.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/finance/electrum/files/ledger_wallet.conf.sample Fri Oct 13 15:09:30 2017 (r452010) @@ -0,0 +1,13 @@ +# $FreeBSD$ +# +# Allow members of group operator to access hardware wallet devices + +## Ledger Nano S +#notify 301 { +# match "system" "USB"; +# match "subsystem" "DEVICE"; +# match "vendor" "0x2c97"; +# match "product" "0x0001"; +# match "type" "ATTACH"; +# action "/bin/chmod g=rw /dev/$cdev"; +#}; Added: head/finance/electrum/files/pkg-message-hwwallet.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/finance/electrum/files/pkg-message-hwwallet.in Fri Oct 13 15:09:30 2017 (r452010) @@ -0,0 +1,14 @@ +For hardware wallet devices to work you need to be in the operator group +and need r/w permissions to the appropriate /dev/usb/* device. + +Add a user to operator group: + +% pw groupmod operator -m satoshi + +Edit your configuration: + +%%PREFIX%%/etc/devd/*_wallet.conf + +Then restart devd to load the new rules: + +% /etc/rc.d/devd restart Added: head/finance/electrum/files/trezor_wallet.conf.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/finance/electrum/files/trezor_wallet.conf.sample Fri Oct 13 15:09:30 2017 (r452010) @@ -0,0 +1,13 @@ +# $FreeBSD$ +# +# Allow members of group operator to access hardware wallet devices + +## SatoshiLabs TREZOR +#notify 301 { +# match "system" "USB"; +# match "subsystem" "DEVICE"; +# match "vendor" "0x534c"; +# match "product" "0x0001"; +# match "type" "ATTACH"; +# action "/bin/chmod g=rw /dev/$cdev"; +#};