From unknown Tue Jun 24 13:55:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#27438 <27438@debbugs.gnu.org> To: bug#27438 <27438@debbugs.gnu.org> Subject: Status: [PATCH] Specify native search path for all ruby packages Reply-To: bug#27438 <27438@debbugs.gnu.org> Date: Tue, 24 Jun 2025 20:55:28 +0000 retitle 27438 [PATCH] Specify native search path for all ruby packages reassign 27438 guix-patches submitter 27438 Christopher Baines severity 27438 normal tag 27438 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 02:37:01 2017 Received: (at submit) by debbugs.gnu.org; 21 Jun 2017 06:37:01 +0000 Received: from localhost ([127.0.0.1]:58752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNZG9-0002Wz-1O for submit@debbugs.gnu.org; Wed, 21 Jun 2017 02:37:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNZG8-0002Wm-0r for submit@debbugs.gnu.org; Wed, 21 Jun 2017 02:37:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNZG2-0001Us-3t for submit@debbugs.gnu.org; Wed, 21 Jun 2017 02:36:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34479) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNZG2-0001UN-1m for submit@debbugs.gnu.org; Wed, 21 Jun 2017 02:36:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNZG1-0008Ak-5p for guix-patches@gnu.org; Wed, 21 Jun 2017 02:36:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNZFw-0001RA-Ac for guix-patches@gnu.org; Wed, 21 Jun 2017 02:36:53 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:56059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNZFw-0001R0-4y for guix-patches@gnu.org; Wed, 21 Jun 2017 02:36:48 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id A1DD013D1DA; Wed, 21 Jun 2017 07:36:44 +0100 (BST) Received: from [192.168.0.14] (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 8875613D066 for ; Wed, 21 Jun 2017 07:36:44 +0100 (BST) To: guix-patches@gnu.org From: Christopher Baines Subject: [PATCH] Specify native search path for all ruby packages Message-ID: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> Date: Wed, 21 Jun 2017 07:36:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i5trTDXPTH9VgQliCSEugsc4PBoEPUjDg" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i5trTDXPTH9VgQliCSEugsc4PBoEPUjDg Content-Type: multipart/mixed; boundary="NQNRlkgWPwXGPA2gcq6VqG3DvttHulfLg"; protected-headers="v1" From: Christopher Baines To: guix-patches@gnu.org Message-ID: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> Subject: [PATCH] Specify native search path for all ruby packages --NQNRlkgWPwXGPA2gcq6VqG3DvttHulfLg Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Without specifying this explicitly in each definition, the GEM_PATH is inherited and the version is that of the inherited package. --NQNRlkgWPwXGPA2gcq6VqG3DvttHulfLg-- --i5trTDXPTH9VgQliCSEugsc4PBoEPUjDg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJFBAEBCAAvFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAllKE/kRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XdLNg//dhyKyP96e2QahZY8BBG1HHGiFMT0zxZd 5BhmEV89S9olQCJ+KZlAA8PPpqhqEo7vwk4xMlU1MULvfQ5HFiZbLpJq0Eu7ILJb tkEoVzwYs+teNR0ixWSQ/6yaGs4RSARa8N4BePRCxNdXe1YCfvOekhRGwDtCDidI UWsyRBNjjotSdS1P3B80A0VI5QWJ701GMPmUDjymQNbDfAaZeLdMymlB9dmVklGS lh7HiHULPNIE0XjePuOKsIAIZzvPGPzNqYJ+RvQ4L5qWTbbYAzjKOFDvSRoVRPyT hDK46mBkbpLcO5QGfAwd88XelK8+sYmSYLNppTWGPp7AmlWGaL0/ddvgovWJu7W0 FgX10uUdj4L1V4HIvFnxT1vROtVcV+aiPToMm918dXeLOEPFpv8oJit8WTjwIX60 C2fL5cgVloOe12NqJMGETy0W4zrrogXC3ccs1aAcQ0Lhm2awyibwBurYBV9hSTEI ltSW1KhEOL3GRUZUIlmQ7w/F5k4w5yL7Jmm8dL2uOMj/lQ/K47AlgALVxmRUCljn ZxFEUWekO6iKFCanHeeX51dBs6WwOUFXrHRiJwCaaMOuLUXTMGAV+rID23lejjvl yCp9W1zjIQXam0Cr0Uiv9hddUePmkrm0GdwFSI3XAY5xb6q1vOPEHQT+I4xDkcHo 1aB37DrD89U= =gLs7 -----END PGP SIGNATURE----- --i5trTDXPTH9VgQliCSEugsc4PBoEPUjDg-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 02:38:40 2017 Received: (at 27438) by debbugs.gnu.org; 21 Jun 2017 06:38:40 +0000 Received: from localhost ([127.0.0.1]:58759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNZHk-0002aZ-Ca for submit@debbugs.gnu.org; Wed, 21 Jun 2017 02:38:40 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:41352 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNZHh-0002aD-QF for 27438@debbugs.gnu.org; Wed, 21 Jun 2017 02:38:38 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id F31CD13D6AA; Wed, 21 Jun 2017 07:38:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id CBEDF13D066 for <27438@debbugs.gnu.org>; Wed, 21 Jun 2017 07:38:36 +0100 (BST) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 694dbe4e for <27438@debbugs.gnu.org>; Wed, 21 Jun 2017 06:38:36 +0000 (UTC) From: Christopher Baines To: 27438@debbugs.gnu.org Subject: [PATCH 1/3] gnu: ruby-1.8: Fix search path specification. Date: Wed, 21 Jun 2017 07:38:34 +0100 Message-Id: <20170621063836.840-1-mail@cbaines.net> X-Mailer: git-send-email 2.13.1 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/ruby.scm (ruby-1.8)[native-search-paths]: Specify the native search path, such that the version included in the path is 1.8, rather than the inherited version. --- gnu/packages/ruby.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 7680f4eae..d9eb93643 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -197,7 +197,13 @@ a focus on simplicity and productivity.") "lib/mkmf.rb" "process.c") (("/bin/sh") (which "sh")))) - %standard-phases))))) + %standard-phases))) + (native-search-paths + (list (search-path-specification + (variable "GEM_PATH") + (files (list (string-append "lib/ruby/gems/" + (version-major+minor version) + ".0")))))))) (define-public ruby-hoe (package -- 2.13.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 02:38:40 2017 Received: (at 27438) by debbugs.gnu.org; 21 Jun 2017 06:38:41 +0000 Received: from localhost ([127.0.0.1]:58761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNZHk-0002ac-Me for submit@debbugs.gnu.org; Wed, 21 Jun 2017 02:38:40 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:41353 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNZHh-0002aE-QF for 27438@debbugs.gnu.org; Wed, 21 Jun 2017 02:38:38 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 12FEC13D066; Wed, 21 Jun 2017 07:38:37 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id DD6F513D1DA for <27438@debbugs.gnu.org>; Wed, 21 Jun 2017 07:38:36 +0100 (BST) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 70be8d68 for <27438@debbugs.gnu.org>; Wed, 21 Jun 2017 06:38:36 +0000 (UTC) From: Christopher Baines To: 27438@debbugs.gnu.org Subject: [PATCH 2/3] gnu: ruby-2.2: Fix search path specification. Date: Wed, 21 Jun 2017 07:38:35 +0100 Message-Id: <20170621063836.840-2-mail@cbaines.net> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170621063836.840-1-mail@cbaines.net> References: <20170621063836.840-1-mail@cbaines.net> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/ruby.scm (ruby-2.2)[native-search-paths]: Specify the native search path, such that the version included in the path is 2.2, rather than the inherited version. --- gnu/packages/ruby.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index d9eb93643..098024fc0 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -134,7 +134,13 @@ a focus on simplicity and productivity.") "/ruby-" version ".tar.xz")) (sha256 (base32 - "0lyb7gnbbhs3a3v9grsjgbaixm20wxz6x3h0czyrxnj3cpp8lk13")))))) + "0lyb7gnbbhs3a3v9grsjgbaixm20wxz6x3h0czyrxnj3cpp8lk13")))) + (native-search-paths + (list (search-path-specification + (variable "GEM_PATH") + (files (list (string-append "lib/ruby/gems/" + (version-major+minor version) + ".0")))))))) (define-public ruby-2.1 (package (inherit ruby) -- 2.13.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 02:38:41 2017 Received: (at 27438) by debbugs.gnu.org; 21 Jun 2017 06:38:41 +0000 Received: from localhost ([127.0.0.1]:58763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNZHk-0002ai-UG for submit@debbugs.gnu.org; Wed, 21 Jun 2017 02:38:41 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:41354 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNZHh-0002aF-Ra for 27438@debbugs.gnu.org; Wed, 21 Jun 2017 02:38:39 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 2385B13D1DA; Wed, 21 Jun 2017 07:38:37 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id EF61013D1DE for <27438@debbugs.gnu.org>; Wed, 21 Jun 2017 07:38:36 +0100 (BST) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 9ea39b7d for <27438@debbugs.gnu.org>; Wed, 21 Jun 2017 06:38:36 +0000 (UTC) From: Christopher Baines To: 27438@debbugs.gnu.org Subject: [PATCH 3/3] gnu: ruby-2.3: Fix search path specification. Date: Wed, 21 Jun 2017 07:38:36 +0100 Message-Id: <20170621063836.840-3-mail@cbaines.net> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170621063836.840-1-mail@cbaines.net> References: <20170621063836.840-1-mail@cbaines.net> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/ruby.scm (ruby-2.3)[native-search-paths]: Specify the native search path, such that the version included in the path is 2.3, rather than the inherited version. --- gnu/packages/ruby.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 098024fc0..69835a771 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -120,7 +120,13 @@ a focus on simplicity and productivity.") (snippet `(begin ;; Remove bundled libffi (delete-file-recursively "ext/fiddle/libffi-3.2.1") - #t)))))) + #t)))) + (native-search-paths + (list (search-path-specification + (variable "GEM_PATH") + (files (list (string-append "lib/ruby/gems/" + (version-major+minor version) + ".0")))))))) (define-public ruby-2.2 (package (inherit ruby) -- 2.13.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 07:48:08 2017 Received: (at 27438) by debbugs.gnu.org; 21 Jun 2017 11:48:08 +0000 Received: from localhost ([127.0.0.1]:58935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNe7D-0004tV-UI for submit@debbugs.gnu.org; Wed, 21 Jun 2017 07:48:08 -0400 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:45853 helo=newmailhub.uq.edu.au) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNe7C-0004tK-6c for 27438@debbugs.gnu.org; Wed, 21 Jun 2017 07:48:07 -0400 Received: from smtp2.soe.uq.edu.au (smtp2.soe.uq.edu.au [10.138.113.41]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id v5LBlv04029951; Wed, 21 Jun 2017 21:47:58 +1000 Received: from [192.168.1.105] (static.customers.nuskope.com.au [103.25.181.216] (may be forged)) (authenticated bits=0) by smtp2.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id v5LBlsTR041034 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 21 Jun 2017 21:47:57 +1000 Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages To: Christopher Baines , 27438@debbugs.gnu.org References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> From: Ben Woodcroft Message-ID: Date: Wed, 21 Jun 2017 21:47:54 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-UQ-FilterTime: 1498045680 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27438 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Chris, On 21/06/17 16:36, Christopher Baines wrote: > Without specifying this explicitly in each definition, the GEM_PATH is > inherited and the version is that of the inherited package. > I'm not sure if this is by design, but the version of the gems folder is embedded in the build of each rubygem e.g. 'ruby-hoe' includes /gnu/store/d867l5i2dqd5qnq4qlsrcwwb0x3443fl-ruby-hoe-3.16.0/lib/ruby/gems/2.4.0 So, in this environment, "require 'hoe'" fails after applying your patch ./pre-inst-env guix environment -C --ad-hoc ruby@2.2 ruby-hoe Having said that, the gems bundled with each ruby are in a directory with the actual version e.g. ruby@2.2 has this path /gnu/store/f43dirk254lfhmgjs3sf515cpfl8d46q-ruby-2.2.7/lib/ruby/gems/2.2.0 This isn't ideal, any ideas on what we should do? Specify both paths maybe? Thanks, ben From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 09:10:33 2017 Received: (at 27438) by debbugs.gnu.org; 21 Jun 2017 13:10:33 +0000 Received: from localhost ([127.0.0.1]:58976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNfOz-0006jd-53 for submit@debbugs.gnu.org; Wed, 21 Jun 2017 09:10:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNfOx-0006jP-JV for 27438@debbugs.gnu.org; Wed, 21 Jun 2017 09:10:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfOo-0006EY-H7 for 27438@debbugs.gnu.org; Wed, 21 Jun 2017 09:10:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfOo-0006ER-Dk; Wed, 21 Jun 2017 09:10:22 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:32872 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dNfOn-0001ok-HY; Wed, 21 Jun 2017 09:10:22 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Christopher Baines Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 Messidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 21 Jun 2017 15:10:17 +0200 In-Reply-To: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> (Christopher Baines's message of "Wed, 21 Jun 2017 07:36:41 +0100") Message-ID: <87d19xij0m.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27438 Cc: 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Christopher Baines skribis: > Without specifying this explicitly in each definition, the GEM_PATH is > inherited and the version is that of the inherited package. All 3 patches LGTM, thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 09:12:35 2017 Received: (at 27438) by debbugs.gnu.org; 21 Jun 2017 13:12:35 +0000 Received: from localhost ([127.0.0.1]:58983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNfQx-0006mV-H9 for submit@debbugs.gnu.org; Wed, 21 Jun 2017 09:12:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNfQu-0006mH-QQ for 27438@debbugs.gnu.org; Wed, 21 Jun 2017 09:12:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfQl-0007A9-L7 for 27438@debbugs.gnu.org; Wed, 21 Jun 2017 09:12:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfQl-0007A4-IT; Wed, 21 Jun 2017 09:12:23 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:32874 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dNfQk-0001zX-E1; Wed, 21 Jun 2017 09:12:23 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Ben Woodcroft Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 Messidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 21 Jun 2017 15:12:18 +0200 In-Reply-To: (Ben Woodcroft's message of "Wed, 21 Jun 2017 21:47:54 +1000") Message-ID: <878tkliix9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27438 Cc: Christopher Baines , 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Ben Woodcroft skribis: > On 21/06/17 16:36, Christopher Baines wrote: >> Without specifying this explicitly in each definition, the GEM_PATH is >> inherited and the version is that of the inherited package. >> > I'm not sure if this is by design, but the version of the gems folder > is embedded in the build of each rubygem e.g. 'ruby-hoe' includes > /gnu/store/d867l5i2dqd5qnq4qlsrcwwb0x3443fl-ruby-hoe-3.16.0/lib/ruby/gems= /2.4.0 Or should the search path spec include both lib/ruby/gems/2.2.0 and lib/ruby/gems/2.4.0, in this order? Ludo=E2=80=99, who has no experience with Ruby. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 01:27:36 2017 Received: (at 27438) by debbugs.gnu.org; 22 Jun 2017 05:27:37 +0000 Received: from localhost ([127.0.0.1]:60522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNueW-0006Yv-Mf for submit@debbugs.gnu.org; Thu, 22 Jun 2017 01:27:36 -0400 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:58197 helo=newmailhub.uq.edu.au) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNueT-0006Yj-9W for 27438@debbugs.gnu.org; Thu, 22 Jun 2017 01:27:34 -0400 Received: from smtp1.soe.uq.edu.au (smtp1.soe.uq.edu.au [10.138.113.40]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id v5M5RMjQ011238; Thu, 22 Jun 2017 15:27:24 +1000 Received: from [172.23.208.246] (scmb-bwoodc.biosci.uq.edu.au [172.23.208.246]) (authenticated bits=0) by smtp1.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id v5M5RMIM023339 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 22 Jun 2017 15:27:22 +1000 Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> From: Ben Woodcroft Message-ID: Date: Thu, 22 Jun 2017 15:27:22 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <878tkliix9.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-UQ-FilterTime: 1498109247 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27438 Cc: Christopher Baines , 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 21/06/17 23:12, Ludovic Courtès wrote: > Ben Woodcroft skribis: > >> On 21/06/17 16:36, Christopher Baines wrote: >>> Without specifying this explicitly in each definition, the GEM_PATH is >>> inherited and the version is that of the inherited package. >>> >> I'm not sure if this is by design, but the version of the gems folder >> is embedded in the build of each rubygem e.g. 'ruby-hoe' includes >> /gnu/store/d867l5i2dqd5qnq4qlsrcwwb0x3443fl-ruby-hoe-3.16.0/lib/ruby/gems/2.4.0 > Or should the search path spec include both lib/ruby/gems/2.2.0 and > lib/ruby/gems/2.4.0, in this order? Exactly. Chris, what is your experience? Did you propose the patch because you ran into a particular issue? Ta, ben. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 01:40:25 2017 Received: (at 27438) by debbugs.gnu.org; 22 Jun 2017 05:40:25 +0000 Received: from localhost ([127.0.0.1]:60527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNuqu-0006vA-T4 for submit@debbugs.gnu.org; Thu, 22 Jun 2017 01:40:25 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:55005 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNuqt-0006v2-DT for 27438@debbugs.gnu.org; Thu, 22 Jun 2017 01:40:24 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 743D413D1DA; Thu, 22 Jun 2017 06:40:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from [192.168.0.14] (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id C5A5A13D066; Thu, 22 Jun 2017 06:40:20 +0100 (BST) Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages To: Ben Woodcroft , =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> From: Christopher Baines Message-ID: <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> Date: Thu, 22 Jun 2017 06:40:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wHncBGBH3ij6KPx3OuGHwR6RxAd0CCtCE" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 Cc: 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wHncBGBH3ij6KPx3OuGHwR6RxAd0CCtCE Content-Type: multipart/mixed; boundary="LUAvDilEjBIsscrMUukKST8ogOv6k4OVE"; protected-headers="v1" From: Christopher Baines To: Ben Woodcroft , =?UTF-8?Q?Ludovic_Court=c3=a8s?= Cc: 27438@debbugs.gnu.org Message-ID: <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> In-Reply-To: --LUAvDilEjBIsscrMUukKST8ogOv6k4OVE Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 22/06/17 06:27, Ben Woodcroft wrote: > On 21/06/17 23:12, Ludovic Court=C3=A8s wrote: >> Ben Woodcroft skribis: >> >>> On 21/06/17 16:36, Christopher Baines wrote: >>>> Without specifying this explicitly in each definition, the GEM_PATH = is >>>> inherited and the version is that of the inherited package. >>>> >>> I'm not sure if this is by design, but the version of the gems folder= >>> is embedded in the build of each rubygem e.g. 'ruby-hoe' includes >>> /gnu/store/d867l5i2dqd5qnq4qlsrcwwb0x3443fl-ruby-hoe-3.16.0/lib/ruby/= gems/2.4.0 >>> >> Or should the search path spec include both lib/ruby/gems/2.2.0 and >> lib/ruby/gems/2.4.0, in this order? > Exactly. >=20 > Chris, what is your experience? Did you propose the patch because you > ran into a particular issue? Yep, I ran in to problems trying to use the guix ruby-2.3 package with the guix bundler package, when I build bundler with ruby-2.3. Ben's email got me thinking about how this works in Debian, and it looks like Debian uses a different location /usr/lib/ruby/vendor_ruby/ . I think there might be benefits from doing similarly, but this needs a bit of thought and testing, as I'm unsure how this might work, especially in cases where libraries include native code that links against ruby. I've got a patch for the ruby-build-system to make a change roughly like this, and I'll send that up soon. Relating this back to the issue at hand, moving to a version independent directory would mean that the GEM_PATH wouldn't be version specific. Thanks, Chris --LUAvDilEjBIsscrMUukKST8ogOv6k4OVE-- --wHncBGBH3ij6KPx3OuGHwR6RxAd0CCtCE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJFBAEBCAAvFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAllLWEERHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XccRw/8Cx5d1gzKmQHUzLCq3rNw2W6xG9HNiojH Vo3fcLRUdQD74PtVbeeWEUno+XoLDG8ccJiwMmljjDTEN9XcNrGwImLGGFuCPx6b 0YSASG3eeftkspRIY10QGan8K1nSNjeDi3FsawAPA8/BOcWVcrP+IlvERY4Oe5lw 5eQZ1R3/4QgHVdSEZEoxrQRa1f1L5m1DtOHGIMPJbF9OTBveRBOJI1hs2KZVLzx7 9K5Xgj/wAbeHhsM/DpOrXvtskVg4VFUl3PKidgiVNCnrK6N+/kunwWcs9paocrZ6 R+1iza/AEyVskTnX1uDrkHx4MML0ZnwAarXHKKdnvbQThzNrKTsHzfNBlS49btIQ azNn0iNoBB/E0dM0Mv4AI2szE6gffwYqmOUKLfhq5qkmR+kFhsUBFRgOKmQIxro0 tMZZ+89lq7ALB7Rtj1ec7iQ0zV03T+ZR7HArc1LNTjbHzM6mcJCGSKFEHhX3HEuA ed8UPaCy5WkUEZHIudABPvuOehRLi6RUUGNluV9Xtwnk6FSSJ2TwLHv8VQDidyYW rDGPW5F9QuKX6Cz0CwhMeDwBmQXk2VKsk0tkPec8sKZaYc4F3hKOH+GAxbPuk/Uc hf2QKf+FaHUBTirbEgdufq6N2dMXuyEROQ/SS79qeLE6uLC0anZeAGMo/9NgeHn1 2Bye0GdKI6E= =ekDV -----END PGP SIGNATURE----- --wHncBGBH3ij6KPx3OuGHwR6RxAd0CCtCE-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 16 13:37:14 2017 Received: (at 27438) by debbugs.gnu.org; 16 Jul 2017 17:37:14 +0000 Received: from localhost ([127.0.0.1]:42677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWnTm-0003UW-1z for submit@debbugs.gnu.org; Sun, 16 Jul 2017 13:37:14 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:54731 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWnTk-0003UN-1D for 27438@debbugs.gnu.org; Sun, 16 Jul 2017 13:37:12 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 4E62513D1DA; Sun, 16 Jul 2017 18:37:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 7EED113D1D3; Sun, 16 Jul 2017 18:37:08 +0100 (BST) Date: Sun, 16 Jul 2017 18:37:05 +0100 From: Christopher Baines To: Ben Woodcroft , Ludovic =?UTF-8?B?Q291cnTDqHM=?= Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages Message-ID: <20170716183705.18b5025e@cbaines.net> In-Reply-To: <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/DVvOWoZ31TztI/Yfn9yLlF9"; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 Cc: 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Sig_/DVvOWoZ31TztI/Yfn9yLlF9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 22 Jun 2017 06:40:17 +0100 Christopher Baines wrote: > On 22/06/17 06:27, Ben Woodcroft wrote: > > On 21/06/17 23:12, Ludovic Court=C3=A8s wrote: =20 > >> Ben Woodcroft skribis: > >> =20 > >>> On 21/06/17 16:36, Christopher Baines wrote: =20 > >>>> Without specifying this explicitly in each definition, the > >>>> GEM_PATH is inherited and the version is that of the inherited > >>>> package.=20 > >>> I'm not sure if this is by design, but the version of the gems > >>> folder is embedded in the build of each rubygem e.g. 'ruby-hoe' > >>> includes /gnu/store/d867l5i2dqd5qnq4qlsrcwwb0x3443fl-ruby-hoe-3.16.0/= lib/ruby/gems/2.4.0 > >>> =20 > >> Or should the search path spec include both lib/ruby/gems/2.2.0 and > >> lib/ruby/gems/2.4.0, in this order? =20 > > Exactly. > >=20 > > Chris, what is your experience? Did you propose the patch because > > you ran into a particular issue? =20 >=20 > Yep, I ran in to problems trying to use the guix ruby-2.3 package with > the guix bundler package, when I build bundler with ruby-2.3. >=20 > Ben's email got me thinking about how this works in Debian, and it > looks like Debian uses a different > location /usr/lib/ruby/vendor_ruby/ . >=20 > I think there might be benefits from doing similarly, but this needs a > bit of thought and testing, as I'm unsure how this might work, > especially in cases where libraries include native code that links > against ruby. >=20 > I've got a patch for the ruby-build-system to make a change roughly > like this, and I'll send that up soon. Relating this back to the > issue at hand, moving to a version independent directory would mean > that the GEM_PATH wouldn't be version specific. So... I kind of forgot about this, sorry about that. But I'll send up the patch shortly. As an example of what this change means, here is a example of loading ruby gems with different versions of ruby, with the current and alternative situations. I think arel doesn't use native extensions, whereas nokogiri does. Also, ruby@2.1 is used, as the search path for the guix package reflects the version of ruby (whereas many others don't). * Current ** With the version of ruby used to build the gem =E2=86=92 guix environment --pure --ad-hoc ruby-arel ruby -- ruby -e "puts = require 'arel'" true (I'm pretty sure the "true" means that it worked) =E2=86=92 guix environment --pure --ad-hoc ruby-nokogiri ruby -- ruby -e "p= uts require 'nokogiri'" true ** With a different version of ruby =E2=86=92 guix environment --pure --ad-hoc ruby-arel ruby@2.1 -- ruby -e "p= uts require 'arel'" /gnu/store/gdg5m75axmrciwh3zhfnsc038q349ymg-ruby-2.1.10/lib/ruby/2.1.0/ruby= gems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- a= rel (LoadError) from /gnu/store/gdg5m75axmrciwh3zhfnsc038q349ymg-ruby-2.1.10/lib/ruby/2.1.= 0/rubygems/core_ext/kernel_require.rb:55:in `require' from -e:1:in `
' =E2=86=92 guix environment --pure --ad-hoc ruby-arel ruby@2.1 -- ruby -e "p= uts require 'nokogiri'" /gnu/store/gdg5m75axmrciwh3zhfnsc038q349ymg-ruby-2.1.10/lib/ruby/2.1.0/ruby= gems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- n= okogiri (LoadError) from /gnu/store/gdg5m75axmrciwh3zhfnsc038q349ymg-ruby-2.1.10/lib/ruby/2.1.= 0/rubygems/core_ext/kernel_require.rb:55:in `require' from -e:1:in `
' * Alternative ** With the version of ruby used to build the gem =E2=86=92 guix environment --pure --ad-hoc ruby-arel ruby -- ruby -e "puts = require 'arel'" true =E2=86=92 guix environment --pure --ad-hoc ruby-nokogiri ruby -- ruby -e "p= uts require 'nokogiri'" true ** With a different version of ruby =E2=86=92 guix environment --pure --ad-hoc ruby-arel ruby@2.1 -- ruby -e "p= uts require 'arel'" true =E2=86=92 guix environment --pure --ad-hoc ruby-nokogiri ruby@2.1 -- ruby -= e "puts require 'nokogiri'" /gnu/store/gdg5m75axmrciwh3zhfnsc038q349ymg-ruby-2.1.10/lib/ruby/2.1.0/file= utils.rb:250:in `mkdir': Read-only file system @ dir_s_mkdir - /gnu/store/j= xmi5lr8dbll3pzlzwkafpd9mj1wwxma-profile/lib/ruby/vendor_ruby/extensions/x86= _64-linux/2.1.0-static (Errno::EROFS) from /gnu/store/gdg5m75axmrciwh3zhfnsc038q349ymg-ruby-2.1.10/lib/ruby/2.1.= 0/fileutils.rb:250:in `fu_mkdir' ... So, putting the gems in a single location regardless of the version of ruby they were built with means that a different version of ruby will at least see them, however, it may still fail to load them. I think this is an improvement, but I'm very uncertain about ruby. Does anyone else have opinions on this? --Sig_/DVvOWoZ31TztI/Yfn9yLlF9 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAllrpEFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xeqog/+KDNrA/My2SYrvejv5McInH58TORCiqPpQqOxuwUfEGNELF/0JyPFoDfM W9zVHaXKU3RcxYGlfVC/yXp9K7nNGFl9zABNfmCo1wsbgcofJAyYPqXHKsShOWe7 y6WCnybBCvgcDrUAXJAMary1Ox211DQofGJxf+wCEHkDVW1zNkCAZZ/B5YKTrqhE C7GRjY5s5MzarqnxoSu4X+TFLMeEO/5b8dtWDtHEgvmmuLO+t3su+6X+LNPrP+ip AgtT1idgLAzc/2zE+kFtQZo+LPR6qycfMkMems+xJRYVEDR5m2JhucKzMsccn9H4 UE7nZU1TJvtMSVs8MeyjlmyW2SBsLs6oYdSO/8S7gSzFykSHoD4svsu2CmQA8b5l Ef9mmX29SefLLPUu49IZnctywjiBVOYLaduIk7q6cTUkk+LDEbaKfRXXlrQ258gz R3a56LdVyeQr7+1bj9VeUEjFugzxvQBofILdchQlnjiuOr+T1LN0n1+cu+xQl1/8 TmlY8sq93FQDtrUXuQobuYyIBwuCHC12SBBBcjy2HwbdE0m5KuNQ9bE0LmWTtiD3 b5tO+blw+D/o+6iuJicoaI6uEtMAa+1UV+QI8lWTmzx8Sbor+EfDejTKG0ZLe8pX FNRL0dXD2yof5mtIgUWbQS3IJwCA+dMJmrQF4c4kpgusGBolP9k= =EPDc -----END PGP SIGNATURE----- --Sig_/DVvOWoZ31TztI/Yfn9yLlF9-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 16 13:40:16 2017 Received: (at 27438) by debbugs.gnu.org; 16 Jul 2017 17:40:17 +0000 Received: from localhost ([127.0.0.1]:42681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWnWi-0003Yv-LW for submit@debbugs.gnu.org; Sun, 16 Jul 2017 13:40:16 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:54735 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWnWh-0003Yn-5a for 27438@debbugs.gnu.org; Sun, 16 Jul 2017 13:40:15 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id BD5B313D1D4; Sun, 16 Jul 2017 18:40:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 7775C13D1D3 for <27438@debbugs.gnu.org>; Sun, 16 Jul 2017 18:40:14 +0100 (BST) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id c5344aee for <27438@debbugs.gnu.org>; Sun, 16 Jul 2017 17:40:14 +0000 (UTC) From: Christopher Baines To: 27438@debbugs.gnu.org Subject: [PATCH] guix: build: ruby-build-system: Install to the vendor directory Date: Sun, 16 Jul 2017 18:40:14 +0100 Message-Id: <20170716174014.21859-1-mail@cbaines.net> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170716183705.18b5025e@cbaines.net> References: <20170716183705.18b5025e@cbaines.net> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) From: Christopher Baines * guix/build/ruby-build-system.scm (install): Install gems to the vendor directory, rather than the GEM_HOME. The vendor directory does not include the version of ruby used to install the gem in the path, which makes it easier to add it to the GEM_PATH for all versions of ruby to use. * gnu/packages/ruby.scm (ruby,ruby-2.1)[native-search-paths]: Switch to lib/ruby/vendor_ruby. --- gnu/packages/ruby.scm | 12 ++---------- guix/build/ruby-build-system.scm | 38 +++++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 7eba68444..f634d5e71 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -93,9 +93,7 @@ (native-search-paths (list (search-path-specification (variable "GEM_PATH") - (files (list (string-append "lib/ruby/gems/" - (version-major+minor version) - ".0")))))) + (files (list (string-append "lib/ruby/vendor_ruby")))))) (synopsis "Programming language interpreter") (description "Ruby is a dynamic object-oriented programming language with a focus on simplicity and productivity.") @@ -159,13 +157,7 @@ a focus on simplicity and productivity.") "lib/mkmf.rb" "process.c") (("/bin/sh") (which "sh")))) - %standard-phases))) - (native-search-paths - (list (search-path-specification - (variable "GEM_PATH") - (files (list (string-append "lib/ruby/gems/" - (version-major+minor version) - ".0")))))))) + %standard-phases))))) (define-public ruby-1.8 (package (inherit ruby) diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index c2d276627..f4ce2e5d8 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -129,40 +129,48 @@ GEM-FLAGS are passed to the 'gem' invokation, if present." (assoc-ref inputs "ruby")) 1)) (out (assoc-ref outputs "out")) - (gem-home (string-append out "/lib/ruby/gems/" ruby-version ".0")) + (vendor-dir (string-append out "/lib/ruby/vendor_ruby")) (gem-file (first-matching-file "\\.gem$")) (gem-file-basename (basename gem-file)) (gem-name (substring gem-file-basename 0 - (- (string-length gem-file-basename) 4))) - (gem-directory (string-append gem-home "/gems/" gem-name))) - (setenv "GEM_HOME" gem-home) - (mkdir-p gem-home) - (and (apply system* "gem" "install" gem-file - "--local" "--ignore-dependencies" - ;; Executables should go into /bin, not /lib/ruby/gems. - "--bindir" (string-append out "/bin") - gem-flags) + (- (string-length gem-file-basename) 4)))) + (setenv "GEM_VENDOR" vendor-dir) + (and (let ((install-succeeded? + (zero? + (apply system* "gem" "install" gem-file + "--local" "--ignore-dependencies" "--vendor" + ;; Executables should go into /bin, not + ;; /lib/ruby/gems. + "--bindir" (string-append out "/bin") + gem-flags)))) + (or install-succeeded? + (begin + (simple-format #t "installation failed\n") + (let ((failed-output-dir (string-append (getcwd) "/out"))) + (mkdir failed-output-dir) + (copy-recursively out failed-output-dir)) + #f))) (begin ;; Remove the cached gem file as this is unnecessary and contains ;; timestamped files rendering builds not reproducible. - (let ((cached-gem (string-append gem-home "/cache/" gem-file))) + (let ((cached-gem (string-append vendor-dir "/cache/" gem-file))) (log-file-deletion cached-gem) (delete-file cached-gem)) ;; For gems with native extensions, several Makefile-related files ;; are created that contain timestamps or other elements making ;; them not reproducible. They are unnecessary so we remove them. - (if (file-exists? (string-append gem-directory "/ext")) + (if (file-exists? (string-append vendor-dir "/ext")) (begin (for-each (lambda (file) (log-file-deletion file) (delete-file file)) (append - (find-files (string-append gem-home "/doc") + (find-files (string-append vendor-dir "/doc") "page-Makefile.ri") - (find-files (string-append gem-home "/extensions") + (find-files (string-append vendor-dir "/extensions") "gem_make.out") - (find-files (string-append gem-directory "/ext") + (find-files (string-append vendor-dir "/ext") "Makefile"))))) #t)))) -- 2.13.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 19 19:39:27 2017 Received: (at 27438) by debbugs.gnu.org; 19 Jul 2017 23:39:27 +0000 Received: from localhost ([127.0.0.1]:48312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXyYw-00005L-R0 for submit@debbugs.gnu.org; Wed, 19 Jul 2017 19:39:27 -0400 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:33997 helo=newmailhub.uq.edu.au) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXyYt-000058-Qp for 27438@debbugs.gnu.org; Wed, 19 Jul 2017 19:39:25 -0400 Received: from smtp1.soe.uq.edu.au (smtp1.soe.uq.edu.au [10.138.113.40]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id v6JNdESu035912; Thu, 20 Jul 2017 09:39:14 +1000 Received: from [10.184.36.121] (d-i184-36-121.staff.eduroam.uq.edu.au [10.184.36.121]) (authenticated bits=0) by smtp1.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id v6JNdDKZ020862 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 20 Jul 2017 09:39:14 +1000 Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages To: Christopher Baines , =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> <20170716183705.18b5025e@cbaines.net> From: Ben Woodcroft Message-ID: Date: Thu, 20 Jul 2017 09:39:13 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170716183705.18b5025e@cbaines.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-UQ-FilterTime: 1500507557 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27438 Cc: 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Chris, On 17/07/17 03:37, Christopher Baines wrote: > On Thu, 22 Jun 2017 06:40:17 +0100 > Christopher Baines wrote: > >> On 22/06/17 06:27, Ben Woodcroft wrote: >>> On 21/06/17 23:12, Ludovic Courtès wrote: >>>> Ben Woodcroft skribis: >>>> >>>>> On 21/06/17 16:36, Christopher Baines wrote: >>>>>> Without specifying this explicitly in each definition, the >>>>>> GEM_PATH is inherited and the version is that of the inherited >>>>>> package. >>>>> I'm not sure if this is by design, but the version of the gems >>>>> folder is embedded in the build of each rubygem e.g. 'ruby-hoe' >>>>> includes /gnu/store/d867l5i2dqd5qnq4qlsrcwwb0x3443fl-ruby-hoe-3.16.0/lib/ruby/gems/2.4.0 >>>>> >>>> Or should the search path spec include both lib/ruby/gems/2.2.0 and >>>> lib/ruby/gems/2.4.0, in this order? >>> Exactly. >>> >>> Chris, what is your experience? Did you propose the patch because >>> you ran into a particular issue? >> Yep, I ran in to problems trying to use the guix ruby-2.3 package with >> the guix bundler package, when I build bundler with ruby-2.3. >> >> Ben's email got me thinking about how this works in Debian, and it >> looks like Debian uses a different >> location /usr/lib/ruby/vendor_ruby/ . >> >> I think there might be benefits from doing similarly, but this needs a >> bit of thought and testing, as I'm unsure how this might work, >> especially in cases where libraries include native code that links >> against ruby. >> >> I've got a patch for the ruby-build-system to make a change roughly >> like this, and I'll send that up soon. Relating this back to the >> issue at hand, moving to a version independent directory would mean >> that the GEM_PATH wouldn't be version specific. > [..] > > So, putting the gems in a single location regardless of the version of > ruby they were built with means that a different version of ruby will > at least see them, however, it may still fail to load them. > > I think this is an improvement, but I'm very uncertain about ruby. Does > anyone else have opinions on this? Thanks for working on this. A few thoughts: What happens to the default gems that come bundled with ruby itself? I'm interpreting from your patch that these will not be available? In general, except for some special circumstances, we don't support old versions of software. To fix the issue that you are encountering properly with nokogiri probably requires new package definitions using "package-with-ruby-2.3" or similar to be made, I suppose. Ludo did some nice work making this easier (see https://lists.gnu.org/archive/html/guix-patches/2017-04/msg00126.html), but I worry in general about the resources required to support older Ruby versions. WDYT? The gem-home procedure in ruby-build-system will now return an incorrect path, I think. Perhaps I'm slow, but what are the advantages of the "vendor_ruby" method over exporting multiple GEM_PATHs as Ludo and I suggested? Changing the directory seems like a heavier touch and so more likely to misbehave. WDYT? Apologies if this comes across a little negative, I'm just trying to consider all the issues. Thanks again for your efforts on this. ben From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 22 06:06:38 2017 Received: (at 27438) by debbugs.gnu.org; 22 Jul 2017 10:06:38 +0000 Received: from localhost ([127.0.0.1]:51924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYrIz-0000Ma-Qo for submit@debbugs.gnu.org; Sat, 22 Jul 2017 06:06:38 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:37272 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYrIx-0000MS-NJ for 27438@debbugs.gnu.org; Sat, 22 Jul 2017 06:06:37 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 348A413D1E3; Sat, 22 Jul 2017 11:06:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 0F18D13D1CE; Sat, 22 Jul 2017 11:06:34 +0100 (BST) Date: Sat, 22 Jul 2017 11:06:30 +0100 From: Christopher Baines To: Ben Woodcroft Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages Message-ID: <20170722110630.19b5fce0@cbaines.net> In-Reply-To: References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> <20170716183705.18b5025e@cbaines.net> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/gjk.WBqXMXzplh1Nlgr1BlC"; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 Cc: Ludovic =?UTF-8?B?Q291cnTDqHM=?= , 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Sig_/gjk.WBqXMXzplh1Nlgr1BlC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 20 Jul 2017 09:39:13 +1000 Ben Woodcroft wrote: > Hi Chris, >=20 >=20 > On 17/07/17 03:37, Christopher Baines wrote: > > On Thu, 22 Jun 2017 06:40:17 +0100 > > Christopher Baines wrote: > > =20 > >> On 22/06/17 06:27, Ben Woodcroft wrote: =20 > >>> On 21/06/17 23:12, Ludovic Court=C3=A8s wrote: =20 > >>>> Ben Woodcroft skribis: > >>>> =20 > >>>>> On 21/06/17 16:36, Christopher Baines wrote: =20 > >>>>>> Without specifying this explicitly in each definition, the > >>>>>> GEM_PATH is inherited and the version is that of the inherited > >>>>>> package. =20 > >>>>> I'm not sure if this is by design, but the version of the gems > >>>>> folder is embedded in the build of each rubygem e.g. 'ruby-hoe' > >>>>> includes /gnu/store/d867l5i2dqd5qnq4qlsrcwwb0x3443fl-ruby-hoe-3.16.= 0/lib/ruby/gems/2.4.0 > >>>>> =20 > >>>> Or should the search path spec include both lib/ruby/gems/2.2.0 > >>>> and lib/ruby/gems/2.4.0, in this order? =20 > >>> Exactly. > >>> > >>> Chris, what is your experience? Did you propose the patch because > >>> you ran into a particular issue? =20 > >> Yep, I ran in to problems trying to use the guix ruby-2.3 package > >> with the guix bundler package, when I build bundler with ruby-2.3. > >> > >> Ben's email got me thinking about how this works in Debian, and it > >> looks like Debian uses a different > >> location /usr/lib/ruby/vendor_ruby/ . > >> > >> I think there might be benefits from doing similarly, but this > >> needs a bit of thought and testing, as I'm unsure how this might > >> work, especially in cases where libraries include native code that > >> links against ruby. > >> > >> I've got a patch for the ruby-build-system to make a change roughly > >> like this, and I'll send that up soon. Relating this back to the > >> issue at hand, moving to a version independent directory would mean > >> that the GEM_PATH wouldn't be version specific. =20 > > [..] > > > > So, putting the gems in a single location regardless of the version > > of ruby they were built with means that a different version of ruby > > will at least see them, however, it may still fail to load them. > > > > I think this is an improvement, but I'm very uncertain about ruby. > > Does anyone else have opinions on this? =20 > Thanks for working on this. A few thoughts: >=20 > What happens to the default gems that come bundled with ruby itself? > I'm interpreting from your patch that these will not be available? They seem to be: =E2=86=92 guix environment --container --ad-hoc ruby -- irb ... for 1 packages... done in 0.028 s=20 irb(main):001:0> ENV =3D> {"PS1"=3D>"\\u@\\h \\w [env]\\$ ", "TMPDIR"=3D>"/tmp", "TEMPDIR"=3D>"/tmp", "TMP"=3D>"/tmp", "TEMP"=3D>"/tmp", "HOME"=3D>"/home/chris", "PATH"=3D>"/gnu/store/2dh34pi9yjq17qf1bw3dmgcdpri20fjs-profile/bin", "GEM_PATH"=3D>"/gnu/store/2dh34pi9yjq17qf1bw3dmgcdpri20fjs-profile/lib/ruby= /vendor_ruby", "GUIX_ENVIRONMENT"=3D>"/gnu/store/2dh34pi9yjq17qf1bw3dmgcdpri20fjs-profile", "LINES"=3D>"76", "COLUMNS"=3D>"190"} irb(main):003:0> require 'rake' =3D> true irb(main):004:0> require 'minitest' =3D> true > In general, except for some special circumstances, we don't support > old versions of software. To fix the issue that you are encountering=20 > properly with nokogiri probably requires new package definitions > using "package-with-ruby-2.3" or similar to be made, I suppose. Ludo > did some nice work making this easier (see=20 > https://lists.gnu.org/archive/html/guix-patches/2017-04/msg00126.html),=20 > but I worry in general about the resources required to support older=20 > Ruby versions. WDYT? I'm not aware of any particular problems if you are working with the package definitions in Guile, as it should be possible to make them use the single ruby version that you want. With the guix environment command I posted: guix environment --pure --ad-hoc ruby-nokogiri ruby@2.1 -- ruby -e "puts require 'nokogiri'" It would be ideal if there was some way of telling guix environment to rewrite the package definitions of all packages to use ruby@2.1 in place of whatever ruby they might be using. > The gem-home procedure in ruby-build-system will now return an > incorrect path, I think. Good spot. I'll have a look at that. > Perhaps I'm slow, but what are the advantages of the "vendor_ruby"=20 > method over exporting multiple GEM_PATHs as Ludo and I suggested?=20 > Changing the directory seems like a heavier touch and so more likely > to misbehave. WDYT? I agree that it is heavier in some sense, but I like the simplicity of getting rid of the version from the path. The best documentation I've found for this is the NEWS of the release where it was added [1]. While Guix blurs the lines between the "package system" and the "user", using this vendor directory might come in useful. 1: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7/NEWS > Apologies if this comes across a little negative, I'm just trying to=20 > consider all the issues. Thanks again for your efforts on this. No need to apologise, I too think its important to consider the details of the support for ruby, which is not something I'm particularly knowledgeable on. --Sig_/gjk.WBqXMXzplh1Nlgr1BlC Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAllzI6ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XfeXA/8ChoAjDCFmIRZi9hpXC491LayHkMyA8VUSdnDgQndpbvpbxGTSToUp2BB uFdZIZWGeTsdyshZD+3joXgrHok7Zia8K7FO1kdU44hxMqkBvT+4lRQSKnxVQqdi U1gSFBAELgWS39zo/WAX5bobssBkR5fUqQpAdLOV/iigFamDOy09RbislSgDzr9P OWnGz5odYTHza8ED8/rWMiROtnviRKxCCzifWkTKP61c86TOoSXf/9J9QXgOne2k eyVWyIwcKE7FPNPYJQAFHim1EwCyTS7NEqYMOEWR0avgwq0fs1DX6I8sTT+CxpCy ++VhGX7z/vatNOlImYsHqzuiLlbXXzpTKoPXtMcXr0FTuTOX9qBe480YkOO8XdJ7 LEFthBfUa+YVJlQYVcvZZjynV19rRUC6yOvwy/o+x2+mr/ghnib4WO0FSjon3661 aGzC20ToVQ/ZKhV0AfZGjuSx7XzhY7BJaa03rCQVm1ZSvXbp/53n/ffbuY/kL0De AXT0PbNZF7BLJPPyBC0Y72OI864GylO/JQC8haOEjWTGtmP8a1AUrjAPnQUiJJZO tVHI1mET0eef4zs0E44NDfWq7ffBVq1HovT1ReZoz/71LkbR7S1Wj5qUwWTQWiJ0 outgu2rBrfh0sYNCiLG9pxQUscsidiPruEx0VeuaWDhbG6SEP04= =xTQ7 -----END PGP SIGNATURE----- --Sig_/gjk.WBqXMXzplh1Nlgr1BlC-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 00:00:13 2017 Received: (at 27438) by debbugs.gnu.org; 5 Aug 2017 04:00:13 +0000 Received: from localhost ([127.0.0.1]:42328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddqG5-0006Hw-90 for submit@debbugs.gnu.org; Sat, 05 Aug 2017 00:00:13 -0400 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:50831 helo=newmailhub.uq.edu.au) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddqG2-0006Hk-14 for 27438@debbugs.gnu.org; Sat, 05 Aug 2017 00:00:11 -0400 Received: from smtp1.soe.uq.edu.au (smtp1.soe.uq.edu.au [10.138.113.40]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id v753xxaY048678; Sat, 5 Aug 2017 14:00:00 +1000 Received: from [192.168.1.105] (static.customers.nuskope.com.au [103.25.181.216] (may be forged)) (authenticated bits=0) by smtp1.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id v753xv1f061714 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 5 Aug 2017 13:59:58 +1000 Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages To: Christopher Baines References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> <20170716183705.18b5025e@cbaines.net> <20170722110630.19b5fce0@cbaines.net> From: Ben Woodcroft Message-ID: <794765de-67a1-040b-3877-a19bfe83183f@uq.edu.au> Date: Sat, 5 Aug 2017 13:59:56 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170722110630.19b5fce0@cbaines.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-UQ-FilterTime: 1501905603 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27438 Cc: =?UTF-8?Q?Ludovic_Court=c3=a8s?= , 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Chris, sorry for the delay on this. On 22/07/17 20:06, Christopher Baines wrote: > On Thu, 20 Jul 2017 09:39:13 +1000 > Ben Woodcroft wrote: > >> Hi Chris, >> >> >> [..] >> >> What happens to the default gems that come bundled with ruby itself? >> I'm interpreting from your patch that these will not be available? > They seem to be: OK, excellent. >> In general, except for some special circumstances, we don't support >> old versions of software. To fix the issue that you are encountering >> properly with nokogiri probably requires new package definitions >> using "package-with-ruby-2.3" or similar to be made, I suppose. Ludo >> did some nice work making this easier (see >> https://lists.gnu.org/archive/html/guix-patches/2017-04/msg00126.html), >> but I worry in general about the resources required to support older >> Ruby versions. WDYT? > I'm not aware of any particular problems if you are working with the > package definitions in Guile, as it should be possible to make them use > the single ruby version that you want. > > With the guix environment command I posted: > > guix environment --pure --ad-hoc ruby-nokogiri ruby@2.1 -- ruby -e > "puts require 'nokogiri'" > > It would be ideal if there was some way of telling guix environment to > rewrite the package definitions of all packages to use ruby@2.1 in > place of whatever ruby they might be using. Is "package-mapping" sufficient? [..] >> Perhaps I'm slow, but what are the advantages of the "vendor_ruby" >> method over exporting multiple GEM_PATHs as Ludo and I suggested? >> Changing the directory seems like a heavier touch and so more likely >> to misbehave. WDYT? > I agree that it is heavier in some sense, but I like the simplicity of > getting rid of the version from the path. > > The best documentation I've found for this is the NEWS of the release > where it was added [1]. While Guix blurs the lines between the "package > system" and the "user", using this vendor directory might come in > useful. > > 1: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7/NEWS Ah, OK. I hadn't realised there was support for this baked into Ruby itself. Seems obvious in hindsight. If all Ruby dependencies build with this change, then the change seems reasonable to me, details aside. ben From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 05 17:56:00 2017 Received: (at 27438) by debbugs.gnu.org; 5 Aug 2017 21:56:00 +0000 Received: from localhost ([127.0.0.1]:43817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de739-0005v0-MD for submit@debbugs.gnu.org; Sat, 05 Aug 2017 17:55:59 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:58912 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1de737-0005us-QC for 27438@debbugs.gnu.org; Sat, 05 Aug 2017 17:55:58 -0400 Received: by mira.cbaines.net (Postfix, from userid 113) id 01D9116FE38; Sat, 5 Aug 2017 22:55:57 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 05B0A154C2E; Sat, 5 Aug 2017 22:55:54 +0100 (BST) Date: Sat, 5 Aug 2017 22:55:52 +0100 From: Christopher Baines To: Ben Woodcroft Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages Message-ID: <20170805225552.19c95c6d@cbaines.net> In-Reply-To: <794765de-67a1-040b-3877-a19bfe83183f@uq.edu.au> References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> <20170716183705.18b5025e@cbaines.net> <20170722110630.19b5fce0@cbaines.net> <794765de-67a1-040b-3877-a19bfe83183f@uq.edu.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/psk0ngvS=LI/00_jEqZYtnd"; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 Cc: Ludovic =?UTF-8?B?Q291cnTDqHM=?= , 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Sig_/psk0ngvS=LI/00_jEqZYtnd Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 5 Aug 2017 13:59:56 +1000 Ben Woodcroft wrote: > Hi Chris, sorry for the delay on this. No problem :) > On 22/07/17 20:06, Christopher Baines wrote: > > On Thu, 20 Jul 2017 09:39:13 +1000 > > Ben Woodcroft wrote: > > =20 > >> Hi Chris, > >> > >> > >> [..] > >> > >> What happens to the default gems that come bundled with ruby > >> itself? I'm interpreting from your patch that these will not be > >> available? =20 > > They seem to be: =20 > OK, excellent. >=20 > >> In general, except for some special circumstances, we don't support > >> old versions of software. To fix the issue that you are > >> encountering properly with nokogiri probably requires new package > >> definitions using "package-with-ruby-2.3" or similar to be made, I > >> suppose. Ludo did some nice work making this easier (see > >> https://lists.gnu.org/archive/html/guix-patches/2017-04/msg00126.html), > >> but I worry in general about the resources required to support > >> older Ruby versions. WDYT? =20 > > I'm not aware of any particular problems if you are working with the > > package definitions in Guile, as it should be possible to make them > > use the single ruby version that you want. > > > > With the guix environment command I posted: > > > > guix environment --pure --ad-hoc ruby-nokogiri ruby@2.1 -- ruby > > -e "puts require 'nokogiri'" > > > > It would be ideal if there was some way of telling guix environment > > to rewrite the package definitions of all packages to use ruby@2.1 > > in place of whatever ruby they might be using. =20 > Is "package-mapping" sufficient? I don't think so. The ruby used is in the case of the ruby-build-system is an argument to the build system, so you need to traverse part of the dependency graph, altering the arguments of packages using the ruby-build-system. Or, perhaps do the transformation at a lower level abstraction than the package record... > >> Perhaps I'm slow, but what are the advantages of the "vendor_ruby" > >> method over exporting multiple GEM_PATHs as Ludo and I suggested? > >> Changing the directory seems like a heavier touch and so more > >> likely to misbehave. WDYT? =20 > > I agree that it is heavier in some sense, but I like the simplicity > > of getting rid of the version from the path. > > > > The best documentation I've found for this is the NEWS of the > > release where it was added [1]. While Guix blurs the lines between > > the "package system" and the "user", using this vendor directory > > might come in useful. > > > > 1: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7/NEWS =20 > Ah, OK. I hadn't realised there was support for this baked into Ruby=20 > itself. Seems obvious in hindsight. >=20 > If all Ruby dependencies build with this change, then the change > seems reasonable to me, details aside. Ok, does anyone know a good process for testing if lots of packages build? I think I've heard of Hydra building branches? --Sig_/psk0ngvS=LI/00_jEqZYtnd Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlmGPuhfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdVKg/+Lj1EDfiYAoRN8+SrvmbJ7a+jAkfILbxFHcm9n99tD7IgGGcTApTun/is TKCoLZs+rcVtdhS4GToU4QCKaoAyAg5BbWT2r/lumpy7YP5g9DRKQOQzgy0EcXvK 66MHoat524tzQqBrEj1gQsSy41ia+0ABb1VVqWgC2JAlv5gZ3n1UFfpc+MghzCQv vWzZahd9E1l8PfBDAFr4QTiU0WEoX4uIL2EGly+pi9lVkePSY24YzIxXyTPs+9xM Fj0ul4cfGnfqDNTcG5lrRJ9IOmxl5W3Si1VDMXIVcmrZaBWJyDbYId2VCD4xqnlB 7uCoTNubHrlIVgStym5nnJ5nE+PKx/cKa7QXwWiy6F9Fx8wgixBa2jKMNbJYir1k hFRAgtx4X1h0+foFU+4W2JWFWsn5gO0QWJwDPXmJ25Y+jRgkdkjkCXHlcnDfwid9 6EBZdPu/gHinLfroUt6NCbH60mdS/d3OUZWCMnG3FG6rm2IVxEqtzaUtBPhRxkAR toHhrnzXvvFfzT1k/vuiwN6FcJVKmFMqJ6EWBINGIbBAk8sa6t3uZvvvmHOK7nEF hf9W5hoFVa+qtTMGywTxD2YnDEvflt2gdSEL2DJhGrfkdELgIYq0XoSu3Nr11bq1 jAH/5lUzRbE0dgeoGCIqS9LLAH5QCouhtZUJd0xOknP4e24NBCk= =nuhU -----END PGP SIGNATURE----- --Sig_/psk0ngvS=LI/00_jEqZYtnd-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 06 03:17:54 2017 Received: (at 27438) by debbugs.gnu.org; 6 Aug 2017 07:17:54 +0000 Received: from localhost ([127.0.0.1]:44070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deFow-000475-5J for submit@debbugs.gnu.org; Sun, 06 Aug 2017 03:17:54 -0400 Received: from mailhub2.soe.uq.edu.au ([130.102.132.209]:60268 helo=newmailhub.uq.edu.au) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deFot-00046v-Og for 27438@debbugs.gnu.org; Sun, 06 Aug 2017 03:17:52 -0400 Received: from smtp2.soe.uq.edu.au (smtp2.soe.uq.edu.au [10.138.113.41]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id v767HhbL049063; Sun, 6 Aug 2017 17:17:44 +1000 Received: from [192.168.1.105] (static.customers.nuskope.com.au [103.25.181.216] (may be forged)) (authenticated bits=0) by smtp2.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id v767HfXk008186 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 6 Aug 2017 17:17:43 +1000 Subject: Re: [bug#27438] [PATCH] Specify native search path for all ruby packages To: Christopher Baines References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> <20170716183705.18b5025e@cbaines.net> <20170722110630.19b5fce0@cbaines.net> <794765de-67a1-040b-3877-a19bfe83183f@uq.edu.au> <20170805225552.19c95c6d@cbaines.net> From: Ben Woodcroft Message-ID: <41bc2718-29ea-cf3c-e409-b1f7705b11f1@uq.edu.au> Date: Sun, 6 Aug 2017 17:17:41 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170805225552.19c95c6d@cbaines.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-UQ-FilterTime: 1502003865 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27438 Cc: =?UTF-8?Q?Ludovic_Court=c3=a8s?= , 27438@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, [..] >>>> In general, except for some special circumstances, we don't support >>>> old versions of software. To fix the issue that you are >>>> encountering properly with nokogiri probably requires new package >>>> definitions using "package-with-ruby-2.3" or similar to be made, I >>>> suppose. Ludo did some nice work making this easier (see >>>> https://lists.gnu.org/archive/html/guix-patches/2017-04/msg00126.html), >>>> but I worry in general about the resources required to support >>>> older Ruby versions. WDYT? >>> I'm not aware of any particular problems if you are working with the >>> package definitions in Guile, as it should be possible to make them >>> use the single ruby version that you want. >>> >>> With the guix environment command I posted: >>> >>> guix environment --pure --ad-hoc ruby-nokogiri ruby@2.1 -- ruby >>> -e "puts require 'nokogiri'" >>> >>> It would be ideal if there was some way of telling guix environment >>> to rewrite the package definitions of all packages to use ruby@2.1 >>> in place of whatever ruby they might be using. >> Is "package-mapping" sufficient? > I don't think so. The ruby used is in the case of the ruby-build-system > is an argument to the build system, so you need to traverse part of the > dependency graph, altering the arguments of packages using the > ruby-build-system. > > Or, perhaps do the transformation at a lower level abstraction than the > package record... For most compiled gems, I think it should be possible to write some procedure so that this would provide you with what you want: guix environment --ad-hoc ruby@2.1 --environment='(package-with-explicit-ruby ruby-2.1 ruby-nokogiri)' For this specific case though, ruby-2.1 might not be the best example, since it is explicitly not supported any more. >> If all Ruby dependencies build with this change, then the change >> seems reasonable to me, details aside. > Ok, does anyone know a good process for testing if lots of packages > build? I think I've heard of Hydra building branches? I believe we can go by the old standby "guix refresh -l ruby", so 659 packages are rebuilt. Given this it would be appropriate for the staging branch, due to be merged after core-updates. ben From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 17 09:19:51 2017 Received: (at 27438) by debbugs.gnu.org; 17 Dec 2017 14:19:51 +0000 Received: from localhost ([127.0.0.1]:38144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQZnC-0004FR-Q6 for submit@debbugs.gnu.org; Sun, 17 Dec 2017 09:19:51 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:36360 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQZn8-0004FF-A3 for 27438@debbugs.gnu.org; Sun, 17 Dec 2017 09:19:49 -0500 Received: by mira.cbaines.net (Postfix, from userid 113) id DB4D613E94E; Sun, 17 Dec 2017 14:19:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 9D19713E94B; Sun, 17 Dec 2017 14:19:42 +0000 (GMT) Received: from giedi (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id a70fb6d6; Sun, 17 Dec 2017 14:19:40 +0000 (UTC) References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> <20170716183705.18b5025e@cbaines.net> <20170722110630.19b5fce0@cbaines.net> <794765de-67a1-040b-3877-a19bfe83183f@uq.edu.au> <20170805225552.19c95c6d@cbaines.net> <41bc2718-29ea-cf3c-e409-b1f7705b11f1@uq.edu.au> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Christopher Baines To: 27438@debbugs.gnu.org Subject: [bug#27438] [PATCH] guix: build: ruby-build-system: Install to the vendor directory In-reply-to: <41bc2718-29ea-cf3c-e409-b1f7705b11f1@uq.edu.au> Date: Sun, 17 Dec 2017 14:19:37 +0000 Message-ID: <87shc9tp1i.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438 Cc: guix-devel@gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= , Ben Woodcroft X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hey, It's been a while since I looked at this, but I think it's still relevant. As a reminder, currently the search paths for the Ruby packages in Guix are a bit off [1], which makes it difficult to use Ruby gems with different versions of Ruby. Rubygems by default installs gems to directories specific to the version of Ruby, and this can be helpful when managing multiple versions of Ruby and different sets of gem packages in a shared directory, but with Guix, this isn't necessary, as the store can be used. Ruby/Rubygems supports installing gems in to a vendor directory, which is for gems installed by the package system [2]. While Guix blurs the lines between the "package system" and the "user", using this vendor directory might come in useful. I've attached an updated patch, and successfully built every Ruby package [3], as well as all of the packages that were changed in the patch. The only failure was ruby-pg, which failed to build before this patch. Ideally when using specific versions of ruby, any gems that need to be build with that version of ruby, would be. While this change doesn't do that, it does simplify the search paths of ruby packages and the packages for ruby gems. Reading the bug report again, I think there was nearly consensus about merging this, but I wanted to check if anyone has any comments or experience with Ruby/Rubygems before merging this? Thanks, Chris 1: scheme@(guile-user)> (use-modules (gnu packages) (guix packages) (guix search-paths) (ice-9 match)) scheme@(guile-user)> (map (lambda (ruby) (cons (package-version ruby) (match (package-native-search-paths ruby) (() #f) ((($ _ files)) files)))) (find-packages-by-name "ruby")) $1 = (("2.4.3" "lib/ruby/gems/2.4.0") ("2.4.2" "lib/ruby/gems/2.4.0") ("2.3.6" "lib/ruby/gems/2.4.0") ("2.2.9" "lib/ruby/gems/2.4.0") ("2.1.10" "lib/ruby/gems/2.1.0") ("1.8.7-p374" . #f)) 2: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7/NEWS 3: guix build --keep-going $(guix package -s ruby- | recsel -P name | tr '\n' ' ') --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-build-ruby-build-system-Install-to-the-vendor-d.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] guix: build: ruby-build-system: Install to the vendor directory From=202df7d9916fdcdafdbf3e8010ba275fd39ecbd308 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 17 Dec 2017 08:25:44 +0000 Subject: [PATCH] guix: build: ruby-build-system: Install to the vendor directory * guix/build/ruby-build-system.scm (install): Install gems to the vendor directory, rather than the GEM_HOME. The vendor directory does not include the version of ruby used to install the gem in the path, which makes it easier to add it to the GEM_PATH for all versions of ruby to use. (gem-home): Remove procedure. * gnu/packages/ruby.scm (ruby, ruby-2.1)[native-search-paths]: Switch to lib/ruby/vendor_ruby. (ruby-1.8)[native-search-paths]: Remove native-search-paths. (gem-directory): Remove procedure. (ruby-ansi, ruby-ae)[arguments]: Remove use of gem-directory. (ruby-metaclass, ruby-instantiator, ruby-introspection, ruby-mocha, ruby-nokogiri, ruby-minitest-tu-shim, ruby-redcloth)[arguments]: Remove u= se of gem-home. (ruby-git, ruby-httpclient)[arguments]: Remove use of GEM_HOME. * gnu/packages/databases.scm (es-dump-restore)[arguments]: Remove use of GEM_HOME. =2D-- gnu/packages/databases.scm | 8 ++--- gnu/packages/ruby.scm | 78 +++++++++++++++---------------------= ---- guix/build/ruby-build-system.scm | 51 +++++++++++++------------- 3 files changed, 56 insertions(+), 81 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index a6a7c3178..8f16b46c5 100644 =2D-- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -297,10 +297,10 @@ SQL, Key/Value, XML/XQuery or Java Object storage for= their data model.") (lambda* (#:key outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/es_dump_restore") =2D `("GEM_PATH" ":" prefix (,(string-append =2D (getenv "GEM_PATH") =2D ":" =2D (getenv "GEM_HOME"))))) + `("GEM_PATH" ":" prefix (,(getenv "GEM_PATH") + ,(string-append + (assoc-ref outputs "out") + "/lib/ruby/vendor_ruby")))) #t))))) (propagated-inputs `(("ruby-httpclient" ,ruby-httpclient) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 34387e575..b98ab2877 100644 =2D-- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -94,9 +94,7 @@ (native-search-paths (list (search-path-specification (variable "GEM_PATH") =2D (files (list (string-append "lib/ruby/gems/" =2D (version-major+minor version) =2D ".0")))))) + (files (list (string-append "lib/ruby/vendor_ruby")))))) (synopsis "Programming language interpreter") (description "Ruby is a dynamic object-oriented programming language w= ith a focus on simplicity and productivity.") @@ -180,13 +178,7 @@ a focus on simplicity and productivity.") "lib/mkmf.rb" "process.c") (("/bin/sh") (which "sh"))) =2D #t))))) =2D (native-search-paths =2D (list (search-path-specification =2D (variable "GEM_PATH") =2D (files (list (string-append "lib/ruby/gems/" =2D (version-major+minor version) =2D ".0")))))))) + #t))))))) =20 (define-public ruby-1.8 (package (inherit ruby) @@ -216,11 +208,6 @@ a focus on simplicity and productivity.") (("/bin/sh") (which "sh"))) #t))))))) =20 =2D(define (gem-directory ruby-version) =2D "Return the relative gem install directory for RUBY-VERSION." =2D (string-append "/lib/ruby/gems/" (version-major+minor ruby-version) =2D ".0/gems")) =2D (define-public ruby-highline (package (name "ruby-highline") @@ -1320,13 +1307,11 @@ It allows writing tests, checking results and autom= ated testing in Ruby.") (modify-phases %standard-phases (add-after 'unpack 'add-test-unit-to-search-path (lambda* (#:key inputs #:allow-other-keys) =2D (let* ((test-unit (assoc-ref inputs "ruby-test-unit")) =2D (test-unit-home (gem-home test-unit =2D ,(package-version ruby)))) + (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))) (substitute* "Rakefile" (("t\\.libs << \"test\"" line) (string-append line "; t.libs << \"" =2D test-unit-home + test-unit "/lib/ruby/vendor_ruby" "/gems/test-unit-" ,(package-version ruby-test-unit) "/lib\"")))) @@ -1385,13 +1370,11 @@ as a base class when writing classes that depend up= on (modify-phases %standard-phases (add-after 'unpack 'add-test-unit-to-search-path (lambda* (#:key inputs #:allow-other-keys) =2D (let* ((test-unit (assoc-ref inputs "ruby-test-unit")) =2D (test-unit-home (gem-home test-unit ,(package-version =2D ruby)))) + (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))) (substitute* "Rakefile" (("t\\.libs << \"test\"" line) (string-append line "; t.libs << \"" =2D test-unit-home + test-unit "/lib/ruby/vendor_ruby" "/gems/test-unit-" ,(package-version ruby-test-unit) "/lib\"")))) @@ -1424,13 +1407,11 @@ knowing anything about the constructor.") (modify-phases %standard-phases (add-after 'unpack 'add-test-unit-to-search-path (lambda* (#:key inputs #:allow-other-keys) =2D (let* ((test-unit (assoc-ref inputs "ruby-test-unit")) =2D (test-unit-home (gem-home test-unit ,(package-version =2D ruby)))) + (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))) (substitute* "Rakefile" (("t\\.libs << \"test\"" line) (string-append line "; t.libs << \"" =2D test-unit-home + test-unit "/lib/ruby/vendor_ruby" "/gems/test-unit-" ,(package-version ruby-test-unit) "/lib\"")))) @@ -1497,13 +1478,11 @@ conversion to (X)HTML.") (modify-phases %standard-phases (add-after 'unpack 'add-test-unit-to-search-path (lambda* (#:key inputs #:allow-other-keys) =2D (let* ((test-unit (assoc-ref inputs "ruby-test-unit")) =2D (test-unit-home (gem-home test-unit =2D ,(package-version ruby)))) + (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))) (substitute* "Rakefile" (("t\\.libs << 'test'" line) (string-append line "; t.libs << \"" =2D test-unit-home + test-unit "/lib/ruby/vendor_ruby" "/gems/test-unit-" ,(package-version ruby-test-unit) "/lib\"")))) @@ -1868,9 +1847,10 @@ run as a daemon and to be controlled by simple start= /stop/restart commands.") ;; store. (let ((git (string-append (assoc-ref inputs "git") "/bin/git")) =2D (config (string-append (getenv "GEM_HOME") =2D "/gems/git-" ,version =2D "/lib/git/config.rb")= )) + (config (string-append + (assoc-ref outputs "out") + "/lib/ruby/vendor_ruby/gems/git-" + ,version "/lib/git/config.rb"))) (substitute* (list config) (("'git'") (string-append "'" git "'"))) @@ -2055,13 +2035,11 @@ to reproduce user environments.") ;; 'pkg-config' is not included in the GEM_PATH during ;; installation, so we add it directly to the load path. (lambda* (#:key inputs #:allow-other-keys) =2D (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")) =2D (pkg-config-home (gem-home pkg-config =2D ,(package-version ruby)))) + (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config"))) (substitute* "ext/nokogiri/extconf.rb" (("gem 'pkg-config'.*") (string-append "$:.unshift '" =2D pkg-config-home + pkg-config "/lib/ruby/vendor_ruby" "/gems/pkg-config-" ,(package-version ruby-pkg-config) "/lib'\n")))) @@ -2468,13 +2446,11 @@ development of Ruby gems.") (modify-phases %standard-phases (add-after 'unpack 'fix-test-include-path (lambda* (#:key inputs #:allow-other-keys) =2D (let* ((minitest (assoc-ref inputs "ruby-minitest-4")) =2D (minitest-home (gem-home minitest =2D ,(package-version ruby)))) + (let* ((minitest (assoc-ref inputs "ruby-minitest-4"))) (substitute* "Rakefile" (("Hoe\\.add_include_dirs .*") (string-append "Hoe.add_include_dirs \"" =2D minitest-home + minitest "/lib/ruby/vendor_ruby" "/gems/minitest-" ,(package-version ruby-minitest-4) "/lib" "\"")))) @@ -2880,7 +2856,9 @@ alternative to Marshal for Object serialization. ") (lambda* (#:key outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/redcloth") =2D `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME")))) + `("GEM_PATH" ":" prefix (,(string-append + (assoc-ref outputs "out") + "/lib/ruby/vendor_ruby")))) #t))))) (native-inputs `(("bundler" ,bundler) @@ -3734,7 +3712,7 @@ It has built-in support for the legacy @code{cookies.= txt} and (lambda* (#:key outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/httpclient") =2D `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME")))) + `("GEM_PATH" ":" prefix (,(getenv "GEM_PATH")))) #t))))) (native-inputs `(("ruby-rack" ,ruby-rack))) @@ -3777,9 +3755,9 @@ requests either using arguments or with an interactiv= e prompt.") (add-before 'validate-runpath 'replace-broken-symlink (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) =2D (file (string-append out =2D ,(gem-directory (package-versio= n ruby)) =2D "/ansi-" ,version "/lib/ansi.ym= l"))) + (file (string-append + out "/lib/ruby/vendor_ruby/gems/ansi-" + ,version "/lib/ansi.yml"))) ;; XXX: This symlink is broken since ruby 2.4. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/ms= g00034.html (delete-file file) @@ -3977,9 +3955,9 @@ requirement specifications systems like Cucumber.") (add-before 'validate-runpath 'replace-broken-symlink (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) =2D (file (string-append out =2D ,(gem-directory (package-versio= n ruby)) =2D "/ae-" ,version "/lib/ae.yml"))) + (file (string-append + out "/lib/ruby/vendor_ruby/gems/ae-" + ,version "/lib/ae.yml"))) ;; XXX: This symlink is broken since ruby 2.4. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/ms= g00034.html (delete-file file) diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-syste= m.scm index c2d276627..e3a811151 100644 =2D-- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -27,8 +27,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (%standard-phases =2D ruby-build =2D gem-home)) + ruby-build)) =20 ;; Commentary: ;; @@ -129,40 +128,48 @@ GEM-FLAGS are passed to the 'gem' invokation, if pres= ent." (assoc-ref inputs "ruby")) 1)) (out (assoc-ref outputs "out")) =2D (gem-home (string-append out "/lib/ruby/gems/" ruby-version ".0= ")) + (vendor-dir (string-append out "/lib/ruby/vendor_ruby")) (gem-file (first-matching-file "\\.gem$")) (gem-file-basename (basename gem-file)) (gem-name (substring gem-file-basename 0 =2D (- (string-length gem-file-basename) 4))) =2D (gem-directory (string-append gem-home "/gems/" gem-name))) =2D (setenv "GEM_HOME" gem-home) =2D (mkdir-p gem-home) =2D (and (apply system* "gem" "install" gem-file =2D "--local" "--ignore-dependencies" =2D ;; Executables should go into /bin, not /lib/ruby/gems. =2D "--bindir" (string-append out "/bin") =2D gem-flags) + (- (string-length gem-file-basename) 4)))) + (setenv "GEM_VENDOR" vendor-dir) + (and (let ((install-succeeded? + (zero? + (apply system* "gem" "install" gem-file + "--local" "--ignore-dependencies" "--vendor" + ;; Executables should go into /bin, not + ;; /lib/ruby/gems. + "--bindir" (string-append out "/bin") + gem-flags)))) + (or install-succeeded? + (begin + (simple-format #t "installation failed\n") + (let ((failed-output-dir (string-append (getcwd) "/out"))) + (mkdir failed-output-dir) + (copy-recursively out failed-output-dir)) + #f))) (begin ;; Remove the cached gem file as this is unnecessary and contai= ns ;; timestamped files rendering builds not reproducible. =2D (let ((cached-gem (string-append gem-home "/cache/" gem-file)= )) + (let ((cached-gem (string-append vendor-dir "/cache/" gem-file)= )) (log-file-deletion cached-gem) (delete-file cached-gem)) ;; For gems with native extensions, several Makefile-related fi= les ;; are created that contain timestamps or other elements making ;; them not reproducible. They are unnecessary so we remove th= em. =2D (if (file-exists? (string-append gem-directory "/ext")) + (if (file-exists? (string-append vendor-dir "/ext")) (begin (for-each (lambda (file) (log-file-deletion file) (delete-file file)) (append =2D (find-files (string-append gem-home "/doc") + (find-files (string-append vendor-dir "/doc") "page-Makefile.ri") =2D (find-files (string-append gem-home "/extens= ions") + (find-files (string-append vendor-dir "/extens= ions") "gem_make.out") =2D (find-files (string-append gem-directory "/e= xt") + (find-files (string-append vendor-dir "/ext") "Makefile"))))) #t)))) =20 @@ -182,13 +189,3 @@ GEM-FLAGS are passed to the 'gem' invokation, if prese= nt." (define* (ruby-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) (apply gnu:gnu-build #:inputs inputs #:phases phases args)) =2D =2D(define (gem-home store-path ruby-version) =2D "Return a string to the gem home directory in the store given a STORE-= PATH =2Dand the RUBY-VERSION used to build that ruby package" =2D (string-append =2D store-path =2D "/lib/ruby/gems/" =2D (regexp-substitute #f =2D (string-match "^[0-9]+\\.[0-9]+" ruby-version) =2D 0 ".0"))) =2D-=20 2.15.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlo2fPlfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdCFQ/9F0RSHlMCxsIMA2MmDeArtQ40Pa5JtF5R7OsecQe0MJzzO3dXsU0qGqBt IgnJvyFANJqbGCYhKItFCpcZgDpSAzK8o8SlGsYvfKhooEMP815juUrfv1YOAQkY mg+kdUiz2CfzNxczXU2/5IeP+n6qs8QnI9KXEKYaFhS1rlc6VDWkaxDlBTbAAd2c 2trdgfFkCMWI6a5mzCxZclUGlBlZoeosdPyVZFs9fPaYcDe1eu3BVr4Fl52H4bcA Miu81amoj7i0PyAJ8nPF2jsjgwJuO2xkffkZZFMAMuQTLCAQhZbeXgLZlQGOZ42g 8s7lD3iFv9f7xgG848RPk+JU41axq8K5eBMXgsf+JrWs5VM79TqhDWpf5ztkCtTA SBPfdb17LRfZW7zUNo1U7mAEPVYbYc4EXbhj4vt9Z5eUWxoHaP72M1p2uWj0CJ0S ekZHVH2q0dk10jmvhiY1j+WEMcUduJ6cqm/C8UYHjPuJ3FjOTn7iLIXrp8AAc0hu y14SAQqev9p3foq4dQa9JYDEyXSkr6noRX3+u/nWStnzAJXOomHGovhhq+WDlrdG 6gOH6leaSVlWSHxuLvJp6i0F7t22xUjo7Udow/+jlGacK13yTl0IouXmMu5PoNup k79MSS9goQhFbEYn3ZHMkSDquYndyIBpduDRvsFjWQ3Gdla/AqI= =yVcD -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 12 02:17:41 2018 Received: (at 27438) by debbugs.gnu.org; 12 Jan 2018 07:17:41 +0000 Received: from localhost ([127.0.0.1]:52815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZtav-00034M-FT for submit@debbugs.gnu.org; Fri, 12 Jan 2018 02:17:41 -0500 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:37691 helo=newmailhub.uq.edu.au) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZtat-00034B-TJ for 27438@debbugs.gnu.org; Fri, 12 Jan 2018 02:17:40 -0500 Received: from smtp1.soe.uq.edu.au (smtp1.soe.uq.edu.au [10.138.113.40]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id w0C7HXsZ039771; Fri, 12 Jan 2018 17:17:33 +1000 Received: from [192.168.1.105] ([123.200.134.98]) (authenticated bits=0) by smtp1.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id w0C7HWXh027198 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 12 Jan 2018 17:17:33 +1000 Subject: Re: [bug#27438] [PATCH] guix: build: ruby-build-system: Install to the vendor directory To: Christopher Baines , 27438@debbugs.gnu.org References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> <20170716183705.18b5025e@cbaines.net> <20170722110630.19b5fce0@cbaines.net> <794765de-67a1-040b-3877-a19bfe83183f@uq.edu.au> <20170805225552.19c95c6d@cbaines.net> <41bc2718-29ea-cf3c-e409-b1f7705b11f1@uq.edu.au> <87shc9tp1i.fsf@cbaines.net> From: Ben Woodcroft Message-ID: <6dfe3202-85bf-0739-bd12-819f2d6c9e90@uq.edu.au> Date: Fri, 12 Jan 2018 17:17:31 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <87shc9tp1i.fsf@cbaines.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-UQ-FilterTime: 1515741455 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 27438 Cc: guix-devel@gnu.org, =?UTF-8?Q?Ludovic_Court=c3=a8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Chris, On 18/12/17 00:19, Christopher Baines wrote: > Hey, > > It's been a while since I looked at this, but I think it's still > relevant. > > As a reminder, currently the search paths for the Ruby packages in Guix > are a bit off [1], which makes it difficult to use Ruby gems with > different versions of Ruby. > > Rubygems by default installs gems to directories specific to the version > of Ruby, and this can be helpful when managing multiple versions of Ruby > and different sets of gem packages in a shared directory, but with Guix, > this isn't necessary, as the store can be used. > > Ruby/Rubygems supports installing gems in to a vendor directory, which > is for gems installed by the package system [2]. While Guix blurs the > lines between the "package system" and the "user", using this vendor > directory might come in useful. > > I've attached an updated patch, and successfully built every Ruby > package [3], as well as all of the packages that were changed in the > patch. The only failure was ruby-pg, which failed to build before this > patch. > > Ideally when using specific versions of ruby, any gems that need to be > build with that version of ruby, would be. While this change doesn't do > that, it does simplify the search paths of ruby packages and the > packages for ruby gems. > > Reading the bug report again, I think there was nearly consensus about > merging this, but I wanted to check if anyone has any comments or > experience with Ruby/Rubygems before merging this? I think go ahead with this one. It will be useful particularly when we update ruby to 2.5. ben From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 14 17:24:20 2018 Received: (at 27438-done) by debbugs.gnu.org; 14 Jan 2018 22:24:20 +0000 Received: from localhost ([127.0.0.1]:56425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eaqhQ-000309-FX for submit@debbugs.gnu.org; Sun, 14 Jan 2018 17:24:20 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:59574 helo=mira.cbaines.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eaqhO-000301-W7 for 27438-done@debbugs.gnu.org; Sun, 14 Jan 2018 17:24:19 -0500 Received: by mira.cbaines.net (Postfix, from userid 113) id 904CD14084F; Sun, 14 Jan 2018 22:24:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 2016E14084E; Sun, 14 Jan 2018 22:24:18 +0000 (GMT) Received: from giedi (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 308f2935; Sun, 14 Jan 2018 22:24:17 +0000 (UTC) References: <0c3c92c6-05ca-bb36-2f24-69077033e91f@cbaines.net> <878tkliix9.fsf@gnu.org> <6a666d6f-f2c2-d786-8fda-422ab28867ca@cbaines.net> <20170716183705.18b5025e@cbaines.net> <20170722110630.19b5fce0@cbaines.net> <794765de-67a1-040b-3877-a19bfe83183f@uq.edu.au> <20170805225552.19c95c6d@cbaines.net> <41bc2718-29ea-cf3c-e409-b1f7705b11f1@uq.edu.au> <87shc9tp1i.fsf@cbaines.net> <6dfe3202-85bf-0739-bd12-819f2d6c9e90@uq.edu.au> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Christopher Baines To: Ben Woodcroft Subject: Re: [bug#27438] [PATCH] guix: build: ruby-build-system: Install to the vendor directory In-reply-to: <6dfe3202-85bf-0739-bd12-819f2d6c9e90@uq.edu.au> Date: Sun, 14 Jan 2018 22:24:17 +0000 Message-ID: <87efmst6y6.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27438-done Cc: guix-devel@gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= , 27438-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Ben Woodcroft writes: > Hi Chris, > > > On 18/12/17 00:19, Christopher Baines wrote: >> Hey, >> >> It's been a while since I looked at this, but I think it's still >> relevant. >> >> As a reminder, currently the search paths for the Ruby packages in Guix >> are a bit off [1], which makes it difficult to use Ruby gems with >> different versions of Ruby. >> >> Rubygems by default installs gems to directories specific to the version >> of Ruby, and this can be helpful when managing multiple versions of Ruby >> and different sets of gem packages in a shared directory, but with Guix, >> this isn't necessary, as the store can be used. >> >> Ruby/Rubygems supports installing gems in to a vendor directory, which >> is for gems installed by the package system [2]. While Guix blurs the >> lines between the "package system" and the "user", using this vendor >> directory might come in useful. >> >> I've attached an updated patch, and successfully built every Ruby >> package [3], as well as all of the packages that were changed in the >> patch. The only failure was ruby-pg, which failed to build before this >> patch. >> >> Ideally when using specific versions of ruby, any gems that need to be >> build with that version of ruby, would be. While this change doesn't do >> that, it does simplify the search paths of ruby packages and the >> packages for ruby gems. >> >> Reading the bug report again, I think there was nearly consensus about >> merging this, but I wanted to check if anyone has any comments or >> experience with Ruby/Rubygems before merging this? > I think go ahead with this one. It will be useful particularly when we > update ruby to 2.5. Great, I've pushed this along with the other ruby build system change. Thanks for reviewing, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpb2JFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdLzQ/8CB1OZdM4ZkehHiv4S7OsNltMkZn7U6Tq3x3R2GRXzh0mHrlxxQI12w9/ 0ebAYWXniJ84xEWkmNTSZF9UtKstfqho+2ELBr/zDT9N/FLLwaDKJhl6nPoJoEhR fy/d/7VQLBzqwMo1+O5OiXOrYNubrZOkV7kfh+VyoOOplXM8KEUfCwT//K2AZUzw E88xCX7J8m6iPFzrqdU8OBZZMeHEmltacG4Uh4mQV5xFDDAKST9DQOxDGlcoBSm5 TlFEG7448oX06IYCkftDIfV6+TKiypfI6RHH44esJMfe3cH1/qZbgwK2twgvnfK4 OOhuzMY/cWUpeszQoEgLappXUEYZ9Q4s6kmV5hjIA1fxgHfxkeeb+jIt04K0G7si znDBRKusakZn7KVw23vIdJ/YBqrkO+8K/jQd5vgPowesOnXurteaaegmkOOPRwbW Mt0L21kKjh/DXK1xwlO6tfvavaQNcW/B8ZQ0YoBgOPm9MILCBPeggvZumqyWOKIX spcPr6IQ/njIR04YLU+S1OnD7Ed+Yaj1FVTdYM+MWVvKUNVZ5bjyErc0sAxgsTBo XeLspaZCB3kDJZiLC2eShHVYRipY75IZlQNQed64p2o1nlyP84W7gW1mukhxB7nf BBlzHptm6J591OWQ03aFIWgJW9CdMVaPffYf/E15a5G5IbrTY+8= =GX5b -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Jun 24 13:55:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 12 Feb 2018 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator