From owner-freebsd-ruby@FreeBSD.ORG Tue Jun 7 21:36:45 2011 Return-Path: Delivered-To: freebsd-ruby@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D81106566C for ; Tue, 7 Jun 2011 21:36:45 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from 23.mail-out.ovh.net (23.mail-out.ovh.net [91.121.28.222]) by mx1.freebsd.org (Postfix) with SMTP id 4F1E28FC1B for ; Tue, 7 Jun 2011 21:36:44 +0000 (UTC) Received: (qmail 25088 invoked by uid 503); 7 Jun 2011 21:07:24 -0000 Received: from marvin.blogreen.org (178.33.173.42) by 23.mail-out.ovh.net with SMTP; 7 Jun 2011 21:07:24 -0000 Received: by marvin.blogreen.org (Postfix, from userid 1001) id E190A515A; Tue, 7 Jun 2011 23:10:00 +0200 (CEST) Date: Tue, 7 Jun 2011 23:10:00 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: freebsd-ruby@freebsd.org Message-ID: <20110607211000.GA58324@blogreen.org> References: <20110606160931.GA17343@blogreen.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://romain.blogreen.org/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-Ovh-Tracer-Id: 10595844024939760316 Subject: Re: Fixing gem files permissions X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2011 21:36:46 -0000 --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 07, 2011 at 07:31:13PM +0100, Eric wrote: > > From: Romain Tarti=E8re > > My current workaround is: > >=20 > > ------------------------------8<--------------------------- > > post-install: > > @${FIND} ${PREFIX}/${GEM_LIB_DIR} -type f -exec ${CHMOD} 444 '{}= ' ';' > > ------------------------------8<--------------------------- > >=20 > > I am not really happy with this. Is there a better way to fix this? >=20 > I don't think there is an easy place other than the post-install target > where you can 'patch' gems since the other stages of the port build proce= ss > do little for a gem, given it's mainly a wrapper for the gem installer > itself. >=20 > I remember had to do similar things with a couple of gems I use personally > (can't remember if I've submitted those as ports yet). The only thing I'd > say is to restrict your 'fix' to just those files your 'getopt-declare' g= em > installs rather than make all the contents of the Gem lib dir 444 and > potentially cause a headache somewhere else. So something more like (I n= ote > from a quick glance in my own Gem libs that they tend to be root/wheel and > 644) AFAICS, ${GEM_LIB_DIR} expends to the gem directory: | % make -V GEM_LIB_DIR | lib/ruby/gems/1.8/gems/getopt-declare-1.29 BTW, I changed the mode from 444 to 644 as it is the permissions of other gem files as you said. > I'd also pop a comment in the Makefile so someone following knows why you= 've > done it. Yep! > > I am not used with Ruby gems packaging, and I would like to be sure that > > this is a problem that should be signaled upstream before acting: is it? >=20 > I've never looked at the Gem internals to see how it determines file > permissions of those files it installs, but given it *appears* to be a bug > you'd do well to flag it to upstream and see what they say. I'll do so. Thanks! Romain --=20 Romain Tarti=E8re http://people.FreeBSD.org/~romain/ pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --Nq2Wo0NMKNjxTN9z Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQGcBAEBAgAGBQJN7pOmAAoJELpNHZVREjNvc7sL/AqoSM1WDWAkrDNTKWWp4EvP QNij0mbs9hC8eFz+yqoEZlRS8jJtd6ksKyp8WNBFrRi6IR8hwKSgMGHE9K0nINNf 6OT5SkoISHyCydLUdNtiNRDzxqQAYn+PQD1HRIUgM66KHet2CA/ISIPwDqZzPHkk xEjSioz/857oIPCDwDxb+UCBYdIOJjTt1PHL4Wi4f3iJI9Lrk9yIFMJlaS3bQOSm DzvEFmfX3/qH+WUnPIDIVPQnzjWVBLhcLppNFPu8/4NSx4TGrxUM6gCyOL+7jmqG OSjsVJi3iuIAGwc1M4qZPFVCVZxNzeIViURP645ODnKdfTldagUXL+uJiN1NfAJp 4Q0v9W5KBG+CyqCU9vAxcXAC94qzfRj+hNf4JGyRJBBRLAQw1Rjl72LNBqjg0WL2 TLPSWMwNhUMrRa+9M7DCuDJdhSteb3aZ6rOyTrjZIVfB3X8TpkIg2CnrK04yN8TK qvvnCdrSu+GNPP3fhOLiaCUgFNYtCar6CTVAi0Lwiw== =NEHB -----END PGP SIGNATURE----- --Nq2Wo0NMKNjxTN9z--