Date: Tue, 3 Jan 2017 10:20:07 -0500 From: Steve Wills <swills@FreeBSD.org> To: "=?UTF-8?Q?Jos=c3=a9_G._Juanino?=" <jjuanino@gmail.com>, freebsd-ruby@freebsd.org Subject: Re: PREFIX enviroment variable pollutes gem search path Message-ID: <5a2c04e1-81bb-41f6-e727-9b4a53682d9b@FreeBSD.org> In-Reply-To: <20170103142749.62nzduottim5wxpj@abel.home.inet> References: <20170103000758.pnoglvxtseec2xpn@abel.home.inet> <20170103142749.62nzduottim5wxpj@abel.home.inet>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rpxmx7K0kUqNoFej6TbVtFCeUfpWwLNTA Content-Type: multipart/mixed; boundary="wUWOggkHs38pDvO0kGpgl7w3q7Bhvj1S6"; protected-headers="v1" From: Steve Wills <swills@FreeBSD.org> To: =?UTF-8?Q?Jos=c3=a9_G._Juanino?= <jjuanino@gmail.com>, freebsd-ruby@freebsd.org Message-ID: <5a2c04e1-81bb-41f6-e727-9b4a53682d9b@FreeBSD.org> Subject: Re: PREFIX enviroment variable pollutes gem search path References: <20170103000758.pnoglvxtseec2xpn@abel.home.inet> <20170103142749.62nzduottim5wxpj@abel.home.inet> In-Reply-To: <20170103142749.62nzduottim5wxpj@abel.home.inet> --wUWOggkHs38pDvO0kGpgl7w3q7Bhvj1S6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi, On 01/03/2017 09:27, Jos=E9 G. Juanino wrote: >> In short: you cannot load any gem if your environment contains the >> PREFIX variable. When this happens, ruby uses the assigned value >> instead of /usr/local to search the proper files. This breaks a lot of= >> existent code. >> >> The relevant ports are, installed via pkg: >> >> ruby-2.2.5_1,1 >> ruby22-gems-2.6.4 >> ruby23-2.3.1_1,1 >> >> The FreeBSD version is 11.0-RELEASE. >> >> This issue did not happen in ruby20, I think. >=20 > I think that the root issue is this sentence in lang/ruby22 Makefile: >=20 > @${RB_SET_CONF_VAR} "prefix" "ENV['PREFIX'] || \3" >=20 >=20 > It set the following in > /usr/local/lib/ruby/2.2/amd64-freebsd11/rbconfig.rb: >=20 > CONFIG["prefix"] =3D (ENV['PREFIX'] || TOPDIR || DESTDIR + "/usr/local"= ) >=20 > That is wrong, as rbconfig.rb is sourced by gem infraestructure, and > therefore the result is dependent of your specific environment at > *runtime*. > (Please keep me in Cc:, as I am not subscribed to the list). >=20 This was added in r210636 (nearly 8 years ago) to "allow modules to be installed into separate PREFIX and/or under user privilegies" (sic) and so far I believe this is the first issue I've seen with it. Can you explain in more detail what existing code this breaks and how specifically it breaks? It may not be necessary and I actually considered removing it when adding 2.4 recently but I need to understand it in more detail first (which is why I didn't remove it already). While this may break things for some, I can imagine others relying on it. Thanks, Steve --wUWOggkHs38pDvO0kGpgl7w3q7Bhvj1S6-- --rpxmx7K0kUqNoFej6TbVtFCeUfpWwLNTA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQGQBAEBCgB6BQJYa8EnXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ5OEZBNDE0QTVDMkEwRUY5Q0ZEMEFEMERG NUNGNjJCMzIwN0IxQkExExxzd2lsbHNAZnJlZWJzZC5vcmcACgkQ9c9isyB7G6Fk 1Af/bMgbxqmxnyhRHqwID08zhmeG3Ahcx2L437tIK6xVd7gdELuyQcdVWnYZXKUH D3OeM90aTwSvAR1vbFzwVvUa8PNUkmq1sEKGLOroIS2n7ZQcSgoSCBgevM245Zj0 wINeNgIXiRn6q1XTJ4ZoLtfwdTB5qBYsm5fwxgbAe4X9xrztoBK/Uizxsc0aAsOt vIT4OsVDDnChrmB7x1xS2w/4pWgrkukPKvQy3skx3DnkRS1FGpbk36Glqf7dL7A5 +0gNcfp3P/L+wP4db8RTfi5LhZ0S4AOHdKmsJNgwGrUbwTrd5f8v+jRbK/jR9UR5 H+58lpNxzEzmo9v2+6LusiW83g== =joRl -----END PGP SIGNATURE----- --rpxmx7K0kUqNoFej6TbVtFCeUfpWwLNTA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5a2c04e1-81bb-41f6-e727-9b4a53682d9b>