From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vagrant Cascadian Subject: bug#34377: (ledger|trezor|keepkey)-agent execute shell code with python interpreter Date: Thu, 07 Feb 2019 17:34:33 -0800 Message-ID: <87mun76p1y.fsf@ponder> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:59944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grv5S-0007hl-8n for bug-guix@gnu.org; Thu, 07 Feb 2019 20:36:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grv5N-0003np-PD for bug-guix@gnu.org; Thu, 07 Feb 2019 20:36:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grv5F-0003lv-T7 for bug-guix@gnu.org; Thu, 07 Feb 2019 20:36:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1grv5F-0002j2-Ou for bug-guix@gnu.org; Thu, 07 Feb 2019 20:36:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:59721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grv48-0007Y8-Po for bug-guix@gnu.org; Thu, 07 Feb 2019 20:34:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grv47-0002u5-U3 for bug-guix@gnu.org; Thu, 07 Feb 2019 20:34:52 -0500 Received: from cascadia.aikidev.net ([173.255.214.101]:51656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grv44-0002qX-Jj for bug-guix@gnu.org; Thu, 07 Feb 2019 20:34:50 -0500 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id C1F0C1AAC0 for ; Thu, 7 Feb 2019 17:34:38 -0800 (PST) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 34377@debbugs.gnu.org --=-=-= Content-Type: text/plain When running trezor-agent (or any of the others), I get a bizarre python traceback with a bunch of code that looks to be shell code. $ trezor-agent Traceback (most recent call last): File "/gnu/store/77i5pm165ljn8fx030z41yqaja77lb99-trezor-agent-0.10.0/bin/.trezor-agent-real", line 11, in load_entry_point('trezor-agent==0.10.0', 'console_scripts', 'trezor-agent')() File "/gnu/store/9z98cvjm7p7z21xdid1ryydxy5vyz6wr-python-3.7.0/lib/python3.7/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point ... module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/gnu/store/77i5pm165ljn8fx030z41yqaja77lb99-trezor-agent-0.10.0/bin/trezor_agent.py", line 2 export PYTHONPATH="/gnu/store/ ... site-packages${PYTHONPATH:+:}$PYTHONPATH" ^ SyntaxError: invalid syntax It looks to me that .trezor-agent-real is trying to import trezor_agent.py as a python module, and obviously failing, because it is also a shell wrapper around .trezor_agent.py-real My guess is the correct way to fix this is to not install the shell wrapper around trezor_agent.py and/or put trezor_agent.py into a proper module in PYTHONPATH, rather than in /bin. I'm not sure how to do that in the packaging, but I've manually hacked around this by copying all of the .*-real files from /bin into another directory, renaming them to their original names, adding the directory to PATH, and setting PYTHONPATH manually to what the shell wrappers were doing, and then I'm able to at least use the ssh-agent and gpg-agent functionality... Currently, none of these packages build in master because python-trezor doesn't build anymore, but I've submitted a patch to update and fix python-trezor(#34326), and have local patches dependent on that to update python-trezor-agent, trezor-agent, ledger-agent and keepkey-agent that at least get it to build. live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXFzcqgAKCRDcUY/If5cW qol8APoDPr4QepdOX2GPRqwkOdJ/xWFR/7V0RMbAGK5Z5neXkgEA6nTByGsNqHHx Kx7AelUtJibCLFhbov9Ixri41NQtxAU= =QKEz -----END PGP SIGNATURE----- --=-=-=--