From edd at debian.org  Sat Jun 15 21:13:31 2013
From: edd at debian.org (Dirk Eddelbuettel)
Date: Sat, 15 Jun 2013 14:13:31 -0500
Subject: [Rd] R CMD INSTALL and file permission settings
In-Reply-To: <20924.46479.760166.350303@stat.math.ethz.ch>
References: <20915.23136.75704.347469@max.nulle.part>
	<20917.40985.705751.95999@stat.math.ethz.ch>
	<20923.30546.509634.752403@stat.math.ethz.ch>
	<1A628E3D-CC34-4C38-B23B-03169D3C7AD0@r-project.org>
	<20923.32408.400045.470669@max.nulle.part>
	<046C1EB4-F22D-457F-BB2C-27D666E3418F@r-project.org>
	<20923.57124.150011.263475@max.nulle.part>
	<82EC6E1A-75F7-4172-968B-CA55AB102171@r-project.org>
	<20924.22356.973252.449984@max.nulle.part>
	<20924.35840.998596.681242@max.nulle.part>
	<20924.46479.760166.350303@stat.math.ethz.ch>
Message-ID: <20924.48347.174325.739567@max.nulle.part>


On 15 June 2013 at 20:42, Martin Maechler wrote:
| >>>>> Dirk Eddelbuettel <edd at debian.org>
| >>>>>     on Sat, 15 Jun 2013 10:45:04 -0500 writes:
| 
|     > On 15 June 2013 at 07:00, Dirk Eddelbuettel wrote:
|     > | 
|     > | On 15 June 2013 at 07:47, Simon Urbanek wrote: | |
|     > Because update.packages() doesn't restore the
|     > group-writable bit. Which leads us to my point that this
|     > is not what you really want.
|     > | 
|     > | Ooops. I'll take another look.
| 
|     > Done.  "It works."  For fairly generous definitions of
|     > working. I'll detail:
| 
|     > i) My initial patch only used options() to set things.
|     > Martin was not to enthralled with this and guided the
|     > patch towards using --group-writable as an option.
| 
|     > ii) With --group-writable, installation works but updates
|     > fail as noticed by Simon.
| 
|     > iii) If we fall back to using options() [ or an
|     > environment variable ], things works.  A log is below.
| 
| Hmm, but this only works if everyone who calls  update.packages() also has
| this options() setting, no?

Exactly, which is why I like options() called from $R_HOME/etc/Rprofile.site
for all users.  Just how I add all (relevant) users to the relevant group.

This is meant for site-wide policy and site-wide once-and-for-all behaviour,
not having to tell all luser to please add --group-writable to their
invocations.  Because they will forget.

| Why would the update keep the package files group writable otherwise ?

Because we tell it to via options().

| I still think the approach to abolish all settings and just
| trigger group-writable package installation *when* the library
| directory is group writable is so simple we should adopt it,
| and can forget all options/ command line arguments / environment
| variables about this topic.

Maybe. I guess you would still need to match the gid for which the directory
is set to the gid of the user running the update.

Or you just use what we now and let the operating system handle this. It is
pretty good at it :)

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



[Rd] R CMD INSTALL and file permission settings
Dirk Eddelbuettel