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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Tue, Jun 07, 2011 at 07:31:13PM +0100, Eric wrote:
> > From: Romain Tartière <romain@FreeBSD.org>
> > My current workaround is:
> >
> > ------------------------------8<---------------------------
> > post-install:
> > @${FIND} ${PREFIX}/${GEM_LIB_DIR} -type f -exec ${CHMOD} 444 '{}' ';'
> > ------------------------------8<---------------------------
> >
> > I am not really happy with this. Is there a better way to fix this?
>
> 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 process
> do little for a gem, given it's mainly a wrapper for the gem installer
> itself.
>
> 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' gem
> 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 note
> 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?
>
> 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
--
Romain Tartière <romain@FreeBSD.org> http://people.FreeBSD.org/~romain/
pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
[-- Attachment #2 --]
-----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-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110607211000.GA58324>
