From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uK8qLMrgWGOy7QAAbAwnHQ (envelope-from ) for ; Wed, 26 Oct 2022 09:24:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6NrjK8rgWGNa9QAAauVa8A (envelope-from ) for ; Wed, 26 Oct 2022 09:24:58 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1B0692D0D5 for ; Wed, 26 Oct 2022 09:24:58 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onalR-00080R-Lt; Wed, 26 Oct 2022 03:23:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onalO-0007nq-NZ for help-guix@gnu.org; Wed, 26 Oct 2022 03:23:47 -0400 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onalK-0001dr-7n for help-guix@gnu.org; Wed, 26 Oct 2022 03:23:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=f/rCDLKfEP6CkWvIgOKpUgp43CDkwv4CYYM/WM6j+H8=; b=YyTx+59kSdkbejQ6pyhvuehMob iQrkWoPfEU+27uZklnR4QWrsOVNQ5s28mYIWKzbGeEr3+/0h3PW1D3J8q0Wuem78/ealLwE3DGdfO nWAtfsB416bcx8+czkvoO6e7azWmU+83ndKGAPyoS0UHx+PTdXMpkGL3JvT/53MePcKaZom/XyHOG kbY2M+U/KoZ4YwR63JuhCvnzbJOeMFE8XaItYAdVnI5NBj0vrFjvprzua5otqJ9Na66An4C/kYl07 autshR+KoJcWQS4QU4Jzr4XXljPh+46X3hSgqwqOmmA04NxbsPvRik+m/xBKAtmyVwityXvO1hUgH eFMx45VIKSnklXFpojOwMWlMrWPOE8aog6RfWikfAYuGZZ+dOWPTj5yvWcrhBItPo9hiEoxKv/Tb2 1XamgXZT5gQC/PmtV8JvxsAnqzMNN7JdYw0DqXqk8cl+1tTWJsZZG16nsjpXGeNR8IjBDcPf4LrsM 4IjyjdBsIm/5xt+RVWeHgPozgm15ZuLGb7F/P9AgL1BUxhhyT8rJ46YqxBKHFnlDQ/MEFzB2KnMBV 07Uz5bBZ455e1+wlrqgFitqoi4qdOJdenYdWJGQIPCAgdeXmAUm3mYeFaHPrGwkEwfidVYlwG4IDQ bwpfxIg0cZV2A90X83Qq1XaAB1R2e0aLu977Q0PT8=; Received: from 77-252-46-225.static.ip.netia.com.pl ([77.252.46.225] helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onalA-0007YK-FQ for help-guix@gnu.org; Wed, 26 Oct 2022 09:23:32 +0200 Date: Wed, 26 Oct 2022 09:23:30 +0200 To: Wojtek Kosior via Subject: Re: program prepared with `guix pack` unusable by end users Message-ID: <20221026092330.6df3870c@koszkonutek-tmp.pl.eu.org> In-Reply-To: <20221017153648.7185c235@koszkonutek-tmp.pl.eu.org> References: <20221013182027.2044d8ff@koszkonutek-tmp.pl.eu.org> <87czaurh9e.fsf@gmail.com> <20221014110911.66168330@koszkonutek-tmp.pl.eu.org> <87mt9ypt4t.fsf@gmail.com> <20221017153648.7185c235@koszkonutek-tmp.pl.eu.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/Xo/vbqgpCreZOu2TFXLk=lb"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Help-Guix" Reply-to: Wojtek Kosior From: Wojtek Kosior via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666769098; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=f/rCDLKfEP6CkWvIgOKpUgp43CDkwv4CYYM/WM6j+H8=; b=oQAXnz8QJktJvzuYxZC4aSPKEm721SdpXxE1mA0Ia2v4xKR8YqEOusQZzolw9/syPq1Qr5 vjdF2yQwStMUZcA5JV5Oorb7iuvd8zI619PZ3Nl1oY08c1+mc8z8SZlfQS0sXbaqXVTPcl QkQREQMpvepbYzhPBGHSI11iPc2u2gEPK7Vt7C9tnkZxQhG6aeacXCTB60dQNjr0gpd8i7 5xoNo05BcrUznCHRgNCMzFa8PnpIx7tbe8gQGzAappqqbVBWEuPOWeEylyO33RrZExh+fC dCwfdr3Gwh2dK8TSXcawQGJ3Yu9vrgq4p51lO9FrBqf3Mw9t85D+4NXfPb4nAQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666769098; a=rsa-sha256; cv=none; b=B5z+d8X4b6xH4F14Utn7g8q/I4NGpZKDZpucSvztopUUcfjAcyyvyJIt3j2+6+aYehq5Jm EzfJ96AdvlQzcsw0ApfJlhjyvwwVHp63i31WamR40IW5X0nznaWQWzkld0LfrqcLC6KzI6 2+tlQSr5JiWLITX1UPEexlipIVnQzu9ryRY6/QHvKDjwcDmchPPdAlVBFUUrK1ICYq1LhF xtmWj9UcUujEeSNXiF3Dro/uIAQa8aj1/BwCo302V5yKms4VYoRHePUJbh4U16aQpJi+MB 3YgocsJlukZrKD+UG/SXXoxIzFz/HTcuqhh4Tq+XMIYKhDa8PQDjabEpHKqcXQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=YyTx+59k; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.61 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=YyTx+59k; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1B0692D0D5 X-Spam-Score: -4.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: /GJgsJruoBX6 --Sig_/Xo/vbqgpCreZOu2TFXLk=lb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable My problem has been solved. It turned out the Python interpreter contained within the pack was finding an older version of `hydrilla` Python package installed in `~/.local/lib/python3.9/site-packages` and that older version was missing the `console_scripts` entry point that was being loaded. It's worth mentioning that Python interpreter gives `~/.local/lib/python3.9/site-packages` priority over the paths that Guix adds to GUIX_PYTHONPATH. The solution was to patch the wrapper script for each of the commands my package provides. Definition of PYTHONNOUSERSITE enviroment variable stops Python from looking at local site packages. You can see my fix here[1]. I most importantly needed to add the following to #:phases of my package definition > (add-after 'wrap 'prevent-local-package-interference > (lambda* (#:key outputs #:allow-other-keys) > (match-let ((((_ . dir)) outputs)) > (for-each (lambda (prog-name) > (substitute* (string-append dir "/bin/" prog-name) > (("^#!/.*$" shabang) > (string-append shabang > "export PYTHONNOUSERSITE=3D1\n")))) > '("hydrilla" > "hydrilla-server" > "hydrilla-builder" > "haketilo"))))) It's worth noting that this problem is not exclusive to `guix pack` or to my particular package. Users of other Python programs could in some circumstances experience similar issues. Which makes me think - shouldn't the default behavior be changed? Perhaps by making Python give paths from `GUIX_PYTHONPATH` priority over those in user site packages directory? Should I report this as a bug to bug-guix@gnu.org? Best, Wojtek [1] https://git.koszko.org/pydrilla/commit/?h=3Dkoszko&id=3Df7c4dff95e88d58= d61c51b2a6b94c90e2e4e0c4b -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A Meet Krak=C3=B3w saints! #17: blessed Jolenta Helena Poznaj =C5=9Bwi=C4=99tych krakowskich! #17: b=C5=82ogos=C5=82awiona Jolent= a Helena https://pl.wikipedia.org/wiki/Jolenta_Helena -- (sig_end) On Mon, 17 Oct 2022 15:36:48 +0200 Wojtek Kosior via wrote: > Hello again after a break, >=20 > > Well, then I tried to reproduce your failure in order to understand what > > is going wrong but I hit this: > > > > [...] > >=20 > > That=E2=80=99s because your package =E2=80=99python-pyopenssl-for-haket= ilo=E2=80=99 inherit from > > =E2=80=99python-pyopenssl=E2=80=99 defined in (gnu packages python-cryp= to). The issue > > is that the =E2=80=99origin=E2=80=99 also inherits > >=20 > > (origin > > (inherit (package-source base)) > > =20 > > and thus > >=20 > > (patches (search-patches "python2-pyopenssl-openssl-compat.patch= ")))) > >=20 > > does not make sense anymore because this patch is against 21.0.0 and > > your variant is about 22.0.0. =20 >=20 > Thank you for your time spent on trying this out. >=20 > The error is surely a result of us using different Guix versions. In the > version I had the pyOpenSSL version was 20.0.1 and no patch was being > used yet[1]. >=20 > Another user also had problems building from source under a different > Guix version. I knew this would happen but I didn't have a ready > solution before. I now came up with a Makefile that organizes most > common development tasks in my project into rules that call `guix > time-machine` under the hood[2]. This should be a general solution for > this kind of problems. >=20 > > Well, further investigations about what could be wrong for =E2=80=9Cgui= x pack=E2=80=9D > > needs a way to reproduce. :-) Could you fix or point a working > > example in your Git repository? =20 >=20 > As for troubleshooting the creation of Hydrilla 3.0-beta1 pack, one can > get the same enviroment I was using by pulling Guix from commit > fd00ac7e27c8a6d4b4d4719b4f8797bdce204623. Although most list users here > probably know how to achieve this, I'm putting this here for convenience >=20 > > guix time-machine --commit=3Dfd00ac7e27c8a6d4b4d4719b4f8797bdce204623 -= - =20 >=20 > Anyway, the main problem could probably be also troubleshooted by > experimenting with the pack I made available[3] as it is also the one > that is known to have caused problems. >=20 > Thank you again, > Wojtek >=20 > [1] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/python-c= rypto.scm?id=3Dfd00ac7e27c8a6d4b4d4719b4f8797bdce204623#n650 > [2] https://git.koszko.org/pydrilla/commit/?h=3Dkoszko&id=3Ded2e14dd6ced4= f64b6ac707c5998b38a78e6d7ad > [3] https://hydrillabugs.koszko.org/projects/haketilo/wiki/Releases#Files >=20 > -- (sig_start) > website: https://koszko.org/koszko.html > PGP: https://koszko.org/key.gpg > fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A >=20 > Meet Krak=C3=B3w saints! #13: blessed Jan Beyzym > Poznaj =C5=9Bwi=C4=99tych krakowskich! #13: b=C5=82ogos=C5=82awiony Jan = Beyzym > https://pl.wikipedia.org/wiki/Jan_Beyzym > -- (sig_end) >=20 >=20 > On Fri, 14 Oct 2022 13:00:18 +0200 > zimoun wrote: >=20 > > Hi, > >=20 > > On ven., 14 oct. 2022 at 11:09, Wojtek Kosior via w= rote: > > =20 > > > I accidently just replied to you, Simon, instead of making a "reply > > > all". I'm reposting the same now, sorry for the nuisance... =20 > >=20 > > Do not worry. :-) > > =20 > > > So, I did run `guix shell -L. hydrilla`. First, I got a warning about > > > =20 > > >> ambiguous package specification `hydrilla' =20 > >=20 > > That=E2=80=99s expected because: > >=20 > > --8<---------------cut here---------------start------------->8--- > > (define-public hydrilla > > (package > > (name "hydrilla") > >=20 > > [...] > >=20 > > (define-public hydrilla-dist-tarball > > (let ((base hydrilla) > > (filename (string-append "hydrilla-" %hydrilla-version ".tar.gz= "))) > > (package > > (inherit base) > > (source (local-file > > --8<---------------cut here---------------end--------------->8--- > >=20 > > It means that the package =E2=80=99hydrilla=E2=80=99 has the name =E2= =80=9Chydrilla=E2=80=9D and because > > the package =E2=80=99hydrilla-dist-tarball=E2=80=99 inherits then it al= so has the name > > =E2=80=9Chydrilla=E2=80=9D. Idem for the version field. > >=20 > > Therefore, > >=20 > > guix shell -L . hydrilla > >=20 > > refers to 2 possible packages. All Guix CLI commands use =E2=80=9Cname= =E2=80=9C and > > =E2=80=9Cversion=E2=80=9D for looking up to packages and not the symbol= s. > >=20 > >=20 > > Well, then I tried to reproduce your failure in order to understand what > > is going wrong but I hit this: > >=20 > > --8<---------------cut here---------------start------------->8--- > > $ guix build -L . python-pyopenssl@22.0.0 > > The following derivations will be built: > > /gnu/store/gyc6sw8a9vq09z6p7plv3k5sjjvrcz9i-python-pyopenssl-22.0.0.d= rv > > /gnu/store/rfawn8bnr1vz71gcm6dz171gfpk0fwai-pyOpenSSL-22.0.0.tar.xz.d= rv > > building /gnu/store/rfawn8bnr1vz71gcm6dz171gfpk0fwai-pyOpenSSL-22.0.0.t= ar.xz.drv... > > pyOpenSSL-22.0.0/ > >=20 > > [...] > >=20 > > pyOpenSSL-22.0.0/tox.ini > > patching file src/OpenSSL/SSL.py > > Hunk #1 FAILED at 1421. > > Hunk #2 FAILED at 2449. > > 2 out of 2 hunks FAILED -- saving rejects to file src/OpenSSL/SSL.py.rej > > patching file tests/test_ssl.py > > Hunk #1 FAILED at 1928. > > 1 out of 1 hunk FAILED -- saving rejects to file tests/test_ssl.py.rej > > source is at 'pyOpenSSL-22.0.0' > > applying '/gnu/store/4cd1x970w3jg3rwaiqg174x56mvkihij-python2-pyopenssl= -openssl-compat.patch'... > > Backtrace: > >=20 > > [...] > >=20 > > ERROR: > > 1. &invoke-error: > > program: "/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-patch-2.7.6= /bin/patch" > > arguments: ("--force" "--no-backup-if-mismatch" "-p1" "--input" "= /gnu/store/4cd1x970w3jg3rwaiqg174x56mvkihij-python2-pyopenssl-openssl-compa= t.patch") > >=20 > > [...] > >=20 > > builder for `/gnu/store/rfawn8bnr1vz71gcm6dz171gfpk0fwai-pyOpenSSL-22.0= .0.tar.xz.drv' failed with exit code 1 > > build of /gnu/store/rfawn8bnr1vz71gcm6dz171gfpk0fwai-pyOpenSSL-22.0.0.t= ar.xz.drv failed > > View build log at '/var/log/guix/drvs/rf/awn8bnr1vz71gcm6dz171gfpk0fwai= -pyOpenSSL-22.0.0.tar.xz.drv.gz'. > > cannot build derivation `/gnu/store/gyc6sw8a9vq09z6p7plv3k5sjjvrcz9i-py= thon-pyopenssl-22.0.0.drv': 1 dependencies couldn't be built > > guix build: error: build of `/gnu/store/gyc6sw8a9vq09z6p7plv3k5sjjvrcz9= i-python-pyopenssl-22.0.0.drv' failed > > --8<---------------cut here---------------end--------------->8--- > >=20 > > That=E2=80=99s because your package =E2=80=99python-pyopenssl-for-haket= ilo=E2=80=99 inherit from > > =E2=80=99python-pyopenssl=E2=80=99 defined in (gnu packages python-cryp= to). The issue > > is that the =E2=80=99origin=E2=80=99 also inherits > >=20 > > (origin > > (inherit (package-source base)) > > =20 > > and thus > >=20 > > (patches (search-patches "python2-pyopenssl-openssl-compat.patch= ")))) > >=20 > > does not make sense anymore because this patch is against 21.0.0 and > > your variant is about 22.0.0. > >=20 > >=20 > > Well, further investigations about what could be wrong for =E2=80=9Cgui= x pack=E2=80=9D > > needs a way to reproduce. :-) Could you fix or point a working example > > in your Git repository? > >=20 > >=20 > > Thanks, > > simon > > =20 >=20 >=20 --Sig_/Xo/vbqgpCreZOu2TFXLk=lb Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCY1jgcgAKCRBLxSIcWnn9 GqfhAQCApvnu6T7b5UdI3giSLrGqElZCpFFEahGbWm/IWzenOgEA+DfnQ6VUk+Uq Gqh86H5hAucX0xmNBJkZ/MAx85G4AQg= =9aTB -----END PGP SIGNATURE----- --Sig_/Xo/vbqgpCreZOu2TFXLk=lb--