NetBSD Problem Report #57862

From cjep@netbsd.org  Wed Jan 17 14:51:26 2024
Return-Path: <cjep@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6AA961A924F
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 17 Jan 2024 14:51:26 +0000 (UTC)
Message-Id: <20240117145124.D8E241A9250@mollari.NetBSD.org>
Date: Wed, 17 Jan 2024 14:51:24 +0000 (UTC)
From: cjep@netbsd.org
Reply-To: cjep@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: Pkgsrc tries to install Ruby Gems packages in GEM_HOME
X-Send-Pr-Version: 3.95

>Number:         57862
>Category:       pkg
>Synopsis:       Pkgsrc tries to install Ruby Gems packages in GEM_HOME
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 17 14:55:00 +0000 2024
>Originator:     Chris Pinnock
>Release:        NetBSD 10.99.10
>Organization:
Very little frankly
>Environment:
NetBSD travis 10.99.10 NetBSD 10.99.10 (TRAVIS) #13: Sat Jan 13 20:34:48 UTC 2024  cjep@travis:/home/cjep/src/NetBSD/current/src/sys/arch/macppc/compile/TRAVIS macppc
Architecture: macppc
Machine: macppc
>Description:

(This could as always be PEBKAC...)

Ruby users are likely to set GEM_HOME & GEM_PATH in their environment. Building 
ruby Gem packages in pkgsrc breaks with this set.
With recent pkgsrc-current, set an environment:

	setenv GEM_HOME $HOME/.gem
	setenv GEM_PATH $HOME/.gem

Then try to build something. e.g. devel/ruby-eventmachine/.

On make install you get this:
...
ERROR:         /home/cjep/src/NetBSD/pkgsrc/devel/ruby-eventmachine/work/.destdir/usr/pkg/home/cjep/.gem/gems/eventmachine-1.2.7/tests/test_ssl_protocols.rb
ERROR:         /home/cjep/src/NetBSD/pkgsrc/devel/ruby-eventmachine/work/.destdir/usr/pkg/home/cjep/.gem/gems/eventmachine-1.2.7/tests/test_ssl_verify.rb
ERROR:         /home/cjep/src/NetBSD/pkgsrc/devel/ruby-eventmachine/work/.destdir/usr/pkg/home/cjep/.gem/gems/eventmachine-1.2.7/tests/test_stomp.rb
...

unsetenv GEM_HOME and GEM_PATH and it works properly.

>How-To-Repeat:
As description.

>Fix:
	Override GEM_HOME and GEM_PATH when building in pkgsrc?

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.