install.packages on unix / su (PR#8760)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

install.packages on unix / su (PR#8760)

Thomas Friedrichsmeier
Full_Name: Thomas Friedrichsmeier
Version: R 2.2.1
OS: Debian / Linux
Submission from: (NULL) (84.60.123.243)


Wishlist item:

There is a small problem using intall.packages() (and update.packages()):
Typically I want to install packages for system-wide use, not in a user
directory. Obviously this does not work without superuser rights.
What I would like to be able to do is to specify a "become root" command to use
in install.packages (). Probably this would be done using an extra argument to
install.packages () and update.packages ():

install.packages ([...], install.wrapper=NULL)

The argument value I would typically want to supply on my system (running in a
KDE Session) would be: install.wrapper="kdesu --" . I.e. I would like to run the
R CMD INSTALL command through kdesu.

Technically it would basically function like this:

Instead of

cmd0 <- paste(file.path(R.home("bin"),"R"), "CMD INSTALL")

in install.packages (), it would read

cmd0 <- paste(install.wrapper, file.path(R.home("bin"),"R"), "CMD INSTALL")

This feature would save me a lot of small hazzles.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: install.packages on unix / su (PR#8760)

Dirk Eddelbuettel

On 10 April 2006 at 21:14, [hidden email] wrote:
| Full_Name: Thomas Friedrichsmeier
| Version: R 2.2.1
| OS: Debian / Linux
| Submission from: (NULL) (84.60.123.243)
|
|
| Wishlist item:
|
| There is a small problem using intall.packages() (and update.packages()):
| Typically I want to install packages for system-wide use, not in a user
| directory. Obviously this does not work without superuser rights.

One can see this problem as a local system management issue for which another
possible answer is to add you (and/or the user users installing R packages)
to, say, group 'admin' and to make /usr/local/lib/R of group admin and
group-writeable.  Or create a custom group radmin. Or ...

Dirk

| What I would like to be able to do is to specify a "become root" command to use
| in install.packages (). Probably this would be done using an extra argument to
| install.packages () and update.packages ():
|
| install.packages ([...], install.wrapper=NULL)
|
| The argument value I would typically want to supply on my system (running in a
| KDE Session) would be: install.wrapper="kdesu --" . I.e. I would like to run the
| R CMD INSTALL command through kdesu.
|
| Technically it would basically function like this:
|
| Instead of
|
| cmd0 <- paste(file.path(R.home("bin"),"R"), "CMD INSTALL")
|
| in install.packages (), it would read
|
| cmd0 <- paste(install.wrapper, file.path(R.home("bin"),"R"), "CMD INSTALL")
|
| This feature would save me a lot of small hazzles.
|
| ______________________________________________
| [hidden email] mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel

--
Hell, there are no rules here - we're trying to accomplish something.
                                                  -- Thomas A. Edison

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: install.packages on unix / su (PR#8760)

Thomas Friedrichsmeier
> | Wishlist item:
> |
> | There is a small problem using intall.packages() (and update.packages()):
> | Typically I want to install packages for system-wide use, not in a user
> | directory. Obviously this does not work without superuser rights.
>
> One can see this problem as a local system management issue for which
> another possible answer is to add you (and/or the user users installing R
> packages) to, say, group 'admin' and to make /usr/local/lib/R of group
> admin and group-writeable.  Or create a custom group radmin. Or ...

It's about convenience, no more, no less, and so it's a wishlist item, no
more, and no less.
I don't think the case of a non-root user working on a de-facto single user
system is too uncommon on linux. It's why tools like kdesu exist in the first
place. Unless there are strong reasons not to (and there may well be), I
think adding some convenience option for this particular case may well be
worth while.

Regards
Thomas



______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

attachment0 (198 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: install.packages on unix / su (PR#8760)

Brian Ripley
In reply to this post by Thomas Friedrichsmeier
On Mon, 10 Apr 2006, Thomas Friedrichsmeier wrote:

>> | Wishlist item:
>> |
>> | There is a small problem using intall.packages() (and update.packages()):
>> | Typically I want to install packages for system-wide use, not in a user
>> | directory. Obviously this does not work without superuser rights.

[From a reply I started last night.]

Not obvious at all, especially to those of us who do it all the time.
Many of us set up an account to `own' R, and either install under that
account or change the ownership of the library directory to that account.

I think what you suggest is quite dangerous, as different directories may
be visible to the user account producing the summary information and to
root.  Then update.packages() (run by you) and R CMD INSTALL (run by root)
may do different things.  This could apply both within a library directory
(root might have installed a later version of a package not readable by
you) and over different library trees (my personal R library is not
readable by root, and indeed the main R library tree is not readable by
root on our student's machines).

Quoting someone else (without attribution, a breach of copyright)

>> One can see this problem as a local system management issue for which
>> another possible answer is to add you (and/or the user users installing R
>> packages) to, say, group 'admin' and to make /usr/local/lib/R of group
>> admin and group-writeable.  Or create a custom group radmin. Or ...
>
> It's about convenience, no more, no less, and so it's a wishlist item, no
> more, and no less.
> I don't think the case of a non-root user working on a de-facto single user
> system is too uncommon on linux. It's why tools like kdesu exist in the first
> place. Unless there are strong reasons not to (and there may well be), I
> think adding some convenience option for this particular case may well be
> worth while.

See the `strong reason' above.  Two of us have suggested better solutions.
If you want yours, you can of course patch your installation, the beauty
of Open Source.  But unless you can find an R-core member who is prepared
to maintain your solution, it will not be going into R.

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel