Date: Tue, 7 Jun 2011 23:10:00 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= <romain@FreeBSD.org> To: freebsd-ruby@freebsd.org Subject: Re: Fixing gem files permissions Message-ID: <20110607211000.GA58324@blogreen.org> In-Reply-To: <CA142D01.1F5AD%freebsdlists-ruby@chillibear.com> References: <20110606160931.GA17343@blogreen.org> <CA142D01.1F5AD%freebsdlists-ruby@chillibear.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <romain@FreeBSD.org> > > 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 <romain@FreeBSD.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110607211000.GA58324>