Paul Johnson
2010-Jan-13 19:05 UTC
[R-sig-Debian] There's a nice packaging thing you do...
Hello, Dirk (and everybody): I have Ubuntu on some systems and I notice there's a very nice thing you do with your R packages. The system is setup so that packages installed from deb go into /usr/lib/R, while packages built from scratch by root go into /usr/local/.., and if the user runs install.packages(), then it gets dumped into the user's own account. I'm much more familiar with RedHat/Fedora systems, and they don't have that approach built in. I've not tried to install a package on an RPM based system as an ordinary user lately, but in the old days it failed because user's can't write in /usr/lib. I am certain the RPM based systems don't segregate packages installed from RPM and built by root with install.packages. Am I correct in my "detective work" that your package is making changes to the Renviron file to make this happen? Are there other changes as well? I'd like to do the same to an RPM setup. I found myself wondering if this setup should be suggested to the R distribution itself? pj -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas
Dirk Eddelbuettel
2010-Jan-13 19:23 UTC
[R-sig-Debian] There's a nice packaging thing you do...
Hi Paul, On 13 January 2010 at 13:05, Paul Johnson wrote: | Hello, Dirk (and everybody): | | I have Ubuntu on some systems and I notice there's a very nice thing | you do with your R packages. The system is setup so that packages | installed from deb go into /usr/lib/R, while packages built from | scratch by root go into /usr/local/.., and if the user runs | install.packages(), then it gets dumped into the user's own account. Credit where credit is due -- Fritz and Kurt suggested that to me the first time I made it to Vienna (for DSC 2003 if memory serves) R 'recommended' packages get /usr/lib/R/library (eg boot, survival, MASS, ...) Pre-packaged r-cran* deb /usr/lib/R/site-library 'The rest' /usr/local/lib/R/site-library which is indeed pretty nice as we separate installation via dpkg, apt, aptitude, ... from that with R (install.packages(), R CMD INSTALL, ...) That is done via the setting of R_LIBS_SITE (formerly: R_LIBS) in /etc/R/Renviron -- the very trick suggested by Fritz and Kurt. | I'm much more familiar with RedHat/Fedora systems, and they don't have | that approach built in. I've not tried to install a package on an RPM | based system as an ordinary user lately, but in the old days it failed | because user's can't write in /usr/lib. I am certain the RPM based | systems don't segregate packages installed from RPM and built by root | with install.packages. | | Am I correct in my "detective work" that your package is making | changes to the Renviron file to make this happen? Are there other | changes as well? I'd like to do the same to an RPM setup. Not to package management, I think. We do get Deepayan's tab-completion for bash and a bunch of other niceties -- read the source, in this case debian/rules of the r-base package for Debian :) Thanks for kind encouragement. Dirk -- Three out of two people have difficulties with fractions.
Prasenjit Kapat
2010-Jan-14 00:18 UTC
[R-sig-Debian] There's a nice packaging thing you do...
On Wed, Jan 13, 2010 at 2:05 PM, Paul Johnson <pauljohn32 at gmail.com> wrote:> Hello, Dirk (and everybody): > > I have Ubuntu on some systems and I notice there's a very nice thing > you do with your R packages. ?The system is setup so that packages > installed from deb go into /usr/lib/R, while packages built from > scratch by root go into /usr/local/.., and if the user runs > install.packages(), then it gets dumped into the user's own account. > > I'm much more familiar with RedHat/Fedora systems, and they don't have > that approach built in. ?I've not tried to install a package on an RPM > based system as an ordinary user lately, but in the old days it failed > because user's can't write in /usr/lib. ?I am certain the RPM based > systems don't segregate packages installed from RPM and built by root > with install.packages.Interesting that you bring this up. I can confirm this (lack of) behavior on RedHat atleast.>From the *NEW FEATURES* section under *CHANGES IN R VERSION 2.5.0* ofhttp://www.cran.r-project.org/src/base/NEWS If 'lib' is not specified or is specified of length one and the chosen location is not a writable directory, install.packages() offers to create a personal library directory for you if one does not already exist, and to install there. If I understand correctly, this "feature" is not an artifact of a distribution specific packaging. It irks me how an rpm installation (I can talk of RedHat 5.4 only) blatantly ignores this, even to this day (R 2.10.0)! And I fail to understand how/why, especially when R_LIBS_USER is very specifically hardcoded in /usr/lib64/R/etc/Renviron (for x86_64)!!! (Anyway, this is not the appropriate list for discussing any solution.) -- Prasenjit
Apparently Analagous Threads
- How to go about getting a change in the SPEC file from which R is built on EPEL?
- Multiple LibPaths in Fresh Install
- R CMD check --as-cran attempts to hide R_LIBS_USER but fails
- Improving RPM packaging for R; ideas gathered from the Debian folks
- R CMD check (v-3.0.2) not loading $R_CHECK_ENVIRON