From nobody Fri Dec 09 10:59:11 2022 X-Original-To: ruby@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NT7Ll3qtxz4kGcg for ; Fri, 9 Dec 2022 10:59:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NT7Ll0rZLz3kJg for ; Fri, 9 Dec 2022 10:59:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670583551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qv+IjoCGe7Xdd8DzknubEGd28wy4thI5hpfY0Gj3rvg=; b=kWcISZ7NEZjUxd5b3s8k2Evz9bvWY1CZjUtm3LG6mGMgAh/cVt4QvudU5GycPkw0iR56ee 1ivDAPcNN1JslapvjvKApIpN8Kywzp9x41P7ZU8XsOwryIhSvaneLgwdpL+2DpvIF2YXr5 RI2Nxn6nz744PwqfGCAGKEGvw9vOmuh+InUIEDW0PXqK3dDA5OOc2DrSdcUdUHzK7pzcEe TOsbT0Ooy0qFCle0p0jr5U+3IJstbwQgivrFV2u0tPI2CsNvcOcrioHzYi1LeJhXoO9Heq jH7qOzwT0f2sCp4ijEm71BoI3no1EOk4pwm//1goQ1Uw7bMg8Ji/7aysLSiqvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670583551; a=rsa-sha256; cv=none; b=bu09HenKqLWz3yVmABp+PKnoroMlBaG5P5LfWGA5J7SPBdbfH1frh9ARiklG4Aa6RK/U5M 3fFHgz4xPpGLOvpjqqjdBcgkHK874YebOt8pwNj6qM/u71MsoZNBPo+HoGRB+ZjeN/kdJf di4x7LVQx+4wXqEsoxjcnp88xmSv7Zh1S2F59Wk3FaPJBuMlSw0nAUQtIYmcmkRU9dNQ/s oIC1fTl+s++OEB4WkRs2QTf9cAeSSSj7FxNYImTnVgx6FQAthpiwJOwhRcjaIpVvlMOWd5 Cs/Ja5LrtJYnpLpgRoIqcCF1X80DkNtNsgpHgIzRtys8qXxEqKxZv2PZ3QTRiQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NT7Lk6w92zY81 for ; Fri, 9 Dec 2022 10:59:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2B9AxAOh018429 for ; Fri, 9 Dec 2022 10:59:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2B9AxAxu018428 for ruby@FreeBSD.org; Fri, 9 Dec 2022 10:59:10 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ruby@FreeBSD.org Subject: [Bug 249083] devel/ruby-gems fails to install if /usr/local is a symlink Date: Fri, 09 Dec 2022 10:59:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: titus@edc.ro X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ruby@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD-specific Ruby discussions List-Archive: https://lists.freebsd.org/archives/freebsd-ruby List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ruby@freebsd.org X-BeenThere: freebsd-ruby@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D249083 titus m changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |titus@edc.ro --- Comment #3 from titus m --- if setup.rb is run without --prefix then bindir is taken from ruby config and then it prepends the destdir problem is that bindir from config is canonic (with symlinks resolved) so you end up with a stage dir containing ..../usr/local/stuff and ..../usr/reallocal/stuff --- /tmp/Makefile 2022-12-09 12:01:45.050912000 +0200 +++ Makefile 2022-12-09 12:24:40.557735000 +0200 @@ -6,6 +6,8 @@ DISTNAME=3D rubygems-${PORTVERSION} DIST_SUBDIR=3D ruby + + MAINTAINER=3D ruby@FreeBSD.org COMMENT=3D Package management framework for the Ruby language WWW=3D https://rubygems.org/ @@ -72,3 +74,7 @@ cd ${STAGEDIR}${PREFIX}/ && ${FIND} -ds ${DOC_DIR}/ ! -type d >> ${TMPPLIST} .include +REAL_PREFIX!=3D realpath ${PREFIX} +.if ${REAL_PREFIX} !=3D ${PREFIX} + GEMS_ENV+=3D GEM_XXX_BIN=3D${PREFIX}/bin +.endif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D and add this diff file in files/patch-fix-linked-local Code: --- lib/rubygems/commands/setup_command.rb.orig 2022-12-09 12:22:16.123948000 +0200 +++ lib/rubygems/commands/setup_command.rb 2022-12-09 12:22:34.331107000 +0200 @@ -448,10 +448,14 @@ def generate_default_dirs prefix =3D options[:prefix] site_or_vendor =3D options[:site_or_vendor] + xxx_bin =3D ENV["GEM_XXX_BIN"] if prefix.empty? lib_dir =3D RbConfig::CONFIG[site_or_vendor] bin_dir =3D RbConfig::CONFIG["bindir"] + if xxx_bin && !xxx_bin.empty? + bin_dir =3D xxx_bin + end else lib_dir =3D File.join prefix, "lib" bin_dir =3D File.join prefix, "bin" --=20 You are receiving this mail because: You are the assignee for the bug.=