From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UCGKLIdtPl/mGwAA0tVLHw (envelope-from ) for ; Thu, 20 Aug 2020 12:33:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SJJDKIdtPl/mRAAAbx9fmQ (envelope-from ) for ; Thu, 20 Aug 2020 12:33:11 +0000 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 E334E94062F for ; Thu, 20 Aug 2020 12:33:10 +0000 (UTC) Received: from localhost ([::1]:56944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8jki-0001SE-Iz for larch@yhetil.org; Thu, 20 Aug 2020 08:33:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8jkd-0001S2-00 for bug-guix@gnu.org; Thu, 20 Aug 2020 08:33:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8jkc-00029S-NB for bug-guix@gnu.org; Thu, 20 Aug 2020 08:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k8jkc-000367-IL for bug-guix@gnu.org; Thu, 20 Aug 2020 08:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42948: (wrap-program) bug Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 20 Aug 2020 12:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42948 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Prafulla Giri Received: via spool by 42948-submit@debbugs.gnu.org id=B42948.159792673611854 (code B ref 42948); Thu, 20 Aug 2020 12:33:02 +0000 Received: (at 42948) by debbugs.gnu.org; 20 Aug 2020 12:32:16 +0000 Received: from localhost ([127.0.0.1]:41803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8jjs-000358-0w for submit@debbugs.gnu.org; Thu, 20 Aug 2020 08:32:16 -0400 Received: from lepiller.eu ([89.234.186.109]:41296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8jjp-00034v-Jb for 42948@debbugs.gnu.org; Thu, 20 Aug 2020 08:32:15 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 4f3a87f2; Thu, 20 Aug 2020 12:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=mL+zKauhm3vB pw/pQVpstUjt1H+vCKz68nZ6QuoahdQ=; b=By20VBRpbuCludTLETV4mYBRv7ZU OKEKIUVcDfo8wWnsnWdFkpLkTp+Krl+7q2/eWMX4FIJCPgrGmNRI3FBLSW5KVmbD d2U16WoeAlt6F2XK8f9ppNXWOInyWpX+XDkoczhsl2hd8MTcIOvvfW9QQuoRYBe+ 90xfmFPmbkn1IpNriA/iNtxzQXx5sOJzUeVR3WCUriBrfnSpkfSVVIaw7qEePT4C CyNUbWpTQwA+4yzqxsa7Nnq7GgbfNbBWcCTXzbv2uyaLzt+JMt+sOwPfbapmRFa9 sOMbUmArRBRYFzF28RgmdqWo7r8sRNJ+oJ7hDt7zzRi04kL3c87+KXy9GA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id fda7bc47 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Thu, 20 Aug 2020 12:32:10 +0000 (UTC) Date: Thu, 20 Aug 2020 14:31:58 +0200 From: Julien Lepiller Message-ID: <20200820143158.51e8b321@tachikoma.lepiller.eu> In-Reply-To: References: X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42948@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=lepiller.eu header.s=dkim header.b=By20VBRp; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: UT3EnRBuvhMa Le Thu, 20 Aug 2020 17:44:01 +0545, Prafulla Giri a =C3=A9crit : > Esteemed maintainers, >=20 > It seems that (wrap-program ...) over-writes the previous wrapping of > a package done by the build system. >=20 > This does not happen for many (wrap-programs) called in the > modify-phases section of the package definition itself. >=20 > Attached is a package definition for ruby-ronn-ng, that demonstrates > this issue. The custom (wrap-program)-s > called from the package definition seem to over-write the definitions > of GEM_ENV as made by the 'wrap %standard-phase > of the ruby-build system. > The wrappings made by 'wrap %standard-phase can be seen during the > custom 'DEBUG phase. The subsequent 'wrap-program1 > and 'wrap-program2 add more environment variables to the wrapping, > but on checking the contents of `which ronn`, once > it is installed (using `less $(which ronn)`), it can be verified that > the GEM_ENV package definitions have been overwritten. >=20 > This may just be a ruby-build-system issue. Or perhaps it might be > something that permeates over a few more build systems. > That still remains to be tested. >=20 > Attached are a few different versions of the package definitions for > ruby-ronn-ng for the ease of those who would like to > verify this. > 1. ruby-ronn-ng-standalone.scm : To be tested using `guix > time-machine -- build --verbosity=3D2 > --file=3Druby-ronn-ng-standalone.scm`[1] 2. ruby-ronn-ng.scm : To be > appended to the end of the gnu/packages/ruby.scm file in local guix > checkout, and be tested using the local version > 3. ruby-ronn-ng.patch : To be applied to local guix checkout >=20 > [1] - This package definition needs ruby-mustache, which has only > recently been added to guix. Hence, the time-machine. >=20 > NOTE: `ronn` does not work even with `propagated-inputs`. See this > patch as to why: > https://aur.archlinux.org/cgit/aur.git/tree/0001-allow-mustache-1.0.patch= ?h=3Druby-ronn-ng Hi, =46rom what I see, there is no issue here (unless I'm missing something). In the built package, I see bin/ronn is a shell wrapper that defines the PATH and FOO environment variables and calls bin/.ronn-real. bin/.ronn-real itself is a ruby script that defines GEM_PATH and calls bin/.real/ronn, which is the actual program. I don't see anything wrong with that, but I'm not a ruby expert. In fact, when running ronn (from its store path directly), I see the following error: /gnu/store/9yqh0g1p5bmxar8dlfp84j4py3j631jv-ruby-2.6.5/lib/ruby/2.6.0/rubyg= ems/dependency.rb:313:in `to_specs': Could not find 'mustache' (>=3D 0.7.0, ~> 0.7) - did find: [mustache-1.1.1] (Gem::MissingSpecVersionError) Checked in 'GEM_PATH=3D/gnu/store/l8jicf1ibzrgff754mvbc5k14fa62s7a-ruby-ronn-ng-0.9.1/= lib/ruby/vendor_ruby:/gnu/store/9yqh0g1p5bmxar8dlfp84j4py3j631jv-ruby-2.6.5= /lib/ruby/vendor_ruby:/gnu/store/w1a9ndhvvbw76g19fgx4j78kx3aghi4k-ruby-kram= down-2.3.0/lib/ruby/vendor_ruby:/gnu/store/jfbzrfd7i8x46q9c8sw26av6kx7jyr3c= -ruby-mustache-1.1.1/lib/ruby/vendor_ruby:/gnu/store/0wsy4yymr5m0wzms0qv5ak= 5q21g8c6hs-ruby-nokogiri-1.10.9/lib/ruby/vendor_ruby:/gnu/store/7ncf7v5prhv= 4ir8bgdlxa1rz8ph5mlry-ruby-pkg-config-1.2.5/lib/ruby/vendor_ruby:/gnu/store= /924np2k8f04lfjr6l9hzic7drah8bgbb-ruby-mini-portile-2.4.0/lib/ruby/vendor_r= uby:/gnu/store/9yqh0g1p5bmxar8dlfp84j4py3j631jv-ruby-2.6.5/lib/ruby/gems/2.= 6.0', execute `gem env` for more information which suggests that the GEM_PATH is set correctly (after all it found mustache), but the dependencies do not have the expected version. Does that make sense?