NetBSD Problem Report #43684
From www@NetBSD.org Thu Jul 29 13:00:32 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id F005B63BB39
for <gnats-bugs@gnats.NetBSD.org>; Thu, 29 Jul 2010 13:00:31 +0000 (UTC)
Message-Id: <20100729130031.7146863BB37@www.NetBSD.org>
Date: Thu, 29 Jul 2010 13:00:31 +0000 (UTC)
From: netbsd@eq.cz
Reply-To: netbsd@eq.cz
To: gnats-bugs@NetBSD.org
Subject: ruby: rbconfig.rb has inappropriate CONFIG["INSTALL"]
X-Send-Pr-Version: www-1.0
>Number: 43684
>Category: pkg
>Synopsis: ruby: rbconfig.rb has inappropriate CONFIG["INSTALL"]
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: taca
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 29 13:05:00 +0000 2010
>Closed-Date: Wed Oct 06 00:47:18 +0000 2010
>Last-Modified: Wed Oct 06 00:47:18 +0000 2010
>Originator: rudolf
>Release: NetBSD 5.1_RC3
>Organization:
>Environment:
NetBSD 5.1_RC3 i386
>Description:
It is currently not possible to install as a non-root user (to custom gempath) any gem, which needs to be compiled during installation. This is because rbconfig.rb (e.g. /usr/pkg/lib/ruby/1.8/i386-netbsdelf/rbconfig.rb) sets:
CONFIG["INSTALL"] = '/usr/bin/install -c -o root -g wheel'
which effectively prevents to successfully finish the process of installation of such a gem for any non-root user (Operation not permitted).
>How-To-Repeat:
install lang/ruby and misc/rubygems,
$ mkdir my_gems
$ env GEM_HOME=~/my_gems GEM_PATH=~/my_gems gem install unicode -v 0.1
[ failure ]
>Fix:
I think, that the origin of this problem is the unconditional
CONFIGURE_ENV+= ac_given_INSTALL=${INSTALL:Q}\ -c\ -o\ ${BINOWN}\ -g\ ${BINGRP}
in mk/configure/gnu-configure.mk (which is included by mk/configure/configure.mk, which is included by mk/configure/bsd.configure.mk, which is included by mk/bsd.pkg.mk, which is included by lang/ruby18-base/Makefile).
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->taca
Responsible-Changed-By: reed@NetBSD.org
Responsible-Changed-When: Thu, 29 Jul 2010 14:44:41 +0000
Responsible-Changed-Why:
Assigned to ruby18 maintainer.
State-Changed-From-To: open->analyzed
State-Changed-By: taca@NetBSD.org
State-Changed-When: Mon, 30 Aug 2010 17:38:40 +0000
State-Changed-Why:
I checked what was going on...
From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org, netbsd@eq.cz
Cc:
Subject: Re: pkg/43684: ruby: rbconfig.rb has inappropriate
CONFIG["INSTALL"]
Date: Tue, 31 Aug 2010 02:31:28 +0900 (JST)
Hi,
Please try this patch under /usr/pkgsrc/lang:
Index: ruby/Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby/Makefile.common,v
retrieving revision 1.19
diff -u -r1.19 Makefile.common
--- ruby/Makefile.common 10 Jun 2009 13:38:55 -0000 1.19
+++ ruby/Makefile.common 30 Aug 2010 17:06:53 -0000
@@ -46,6 +46,18 @@
STRIP?= strip
#
+# Avoid to use -o and -g options with install.
+#
+INSTALL_PROGRAM= ${INSTALL} ${COPY} -m ${BINMODE}
+INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE}
+INSTALL_LIB= ${INSTALL} ${COPY} -m ${BINMODE}
+INSTALL_DATA= ${INSTALL} ${COPY} -m ${SHAREMODE}
+INSTALL_MAN= ${INSTALL} ${COPY} -m ${MANMODE}
+INSTALL_PROGRAM_DIR= ${INSTALL} -d -m ${PKGDIRMODE}
+INSTALL_DATA_DIR= ${INSTALL} -d -m ${PKGDIRMODE}
+INSTALL_MAN_DIR= ${INSTALL} -d -m ${PKGDIRMODE}
+
+#
# PLIST substitution
#
PLIST_SUBST+= RUBY_SHLIBVER=${RUBY_SHLIBVER:Q} \
Index: ruby18-base/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby18-base/Makefile,v
retrieving revision 1.56
diff -u -r1.56 Makefile
--- ruby18-base/Makefile 16 Aug 2010 07:08:12 -0000 1.56
+++ ruby18-base/Makefile 30 Aug 2010 17:06:53 -0000
@@ -5,7 +5,7 @@
PKGNAME= ${RUBY_PKGPREFIX}-base-${RUBY_VERSION_SUFFIX}
CATEGORIES= lang ruby
MASTER_SITES= ${MASTER_SITE_RUBY}
-PKGREVISION= 6
+PKGREVISION= 7
MAINTAINER= taca@NetBSD.org
HOMEPAGE= ${RUBY_HOMEPAGE}
--
Takahiro Kambe <taca@back-street.net>
From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org, netbsd@eq.cz
Cc:
Subject: Re: pkg/43684: ruby: rbconfig.rb has inappropriate
CONFIG["INSTALL"]
Date: Tue, 31 Aug 2010 10:13:24 +0900 (JST)
Oops, please apply this patch, too.
Index: ruby18-base/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ruby18-base/Makefile,v
retrieving revision 1.56
diff -u -r1.56 Makefile
--- ruby18-base/Makefile 16 Aug 2010 07:08:12 -0000 1.56
+++ ruby18-base/Makefile 31 Aug 2010 00:57:34 -0000
@@ -28,7 +28,7 @@
CONFIGURE_ARGS+= --enable-shared \
--with-ssl-include="${BUILDLINK_PREFIX.openssl}/include" \
--with-ssl-lib="${BUILDLINK_PREFIX.openssl}/lib"
-CONFIGURE_ENV+= PREFIX=${PREFIX}
+CONFIGURE_ENV+= INSTALL="${INSTALL} ${COPY}"
WRKSRC= ${RUBY_WRKSRC}
.include "../../mk/compiler.mk"
--
Takahiro Kambe <taca@back-street.net>
From: rudolf <netbsd@eq.cz>
To: Takahiro Kambe <taca@back-street.net>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/43684: ruby: rbconfig.rb has inappropriate CONFIG["INSTALL"]
Date: Tue, 31 Aug 2010 12:46:29 +0200
Hi,
using the patches, i have installed the ruby package without problems
(as root) and successfully installed a gem (that have been built during
the installation) as an unprivileged user to a custom GEMPATH.
Best regards,
r.
From: Takahiro Kambe <taca@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43684 CVS commit: pkgsrc/lang/ruby18-base
Date: Tue, 31 Aug 2010 16:28:13 +0000
Module Name: pkgsrc
Committed By: taca
Date: Tue Aug 31 16:28:13 UTC 2010
Modified Files:
pkgsrc/lang/ruby18-base: Makefile
Log Message:
Explicitly set environment INSTALL, and reset INSTALL_DATA,
INSTALL_PROGRAM and INSTALL_SCRIPT.
They reflect to Ruby's Config::CONFIG constant which contains
various configuration parametes which would be used when installing
extention modules including ruby gems.
Setting INSTALL explicitly reset the line in mk/configure/gnu-configure.mk.
CONFIGURE_ENV+= ac_given_INSTALL=${INSTALL:Q}\ -c\ -o\ ${BINOWN}\ -g\ ${BINGRP}
Should be fix PR pkg/43684 and pkg/43687.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 pkgsrc/lang/ruby18-base/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->feedback
State-Changed-By: taca@NetBSD.org
State-Changed-When: Tue, 31 Aug 2010 16:31:59 +0000
State-Changed-Why:
Slightly different fix has commit. I believe it has no difference.
From: rudolf <netbsd@eq.cz>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/43684 (ruby: rbconfig.rb has inappropriate CONFIG["INSTALL"])
Date: Wed, 29 Sep 2010 14:15:59 +0200
taca@NetBSD.org wrote:
> State-Changed-From-To: analyzed->feedback
> State-Changed-By: taca@NetBSD.org
> State-Changed-When: Tue, 31 Aug 2010 16:31:59 +0000
> State-Changed-Why:
> Slightly different fix has commit. I believe it has no difference.
I've used pkgsrc (-current) from 2010/9/27 and the test case mentioned
in this PR is not failing on my computer anymore.
r.
State-Changed-From-To: feedback->closed
State-Changed-By: taca@NetBSD.org
State-Changed-When: Wed, 06 Oct 2010 00:47:18 +0000
State-Changed-Why:
Submitter reported the problem was fixed. Thanks for your problem report.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.