[R-sig-Fedora] How to go about getting a change in the SPEC file from which R is built on EPEL?

Paul Johnson pauljohn32 at gmail.com
Thu Jun 3 18:14:13 CEST 2010


I asked a couple of months ago in r-sig-fedora about a difference I
noticed between Ubuntu and RedHat/Fedora.  Now I think I've figured
out the cause is a little issue in packaging but I don't know how to
get it fixed.

On Ubuntu, the setup is like this. It i is controlled in a file called Renviron

R packages built/distributed in RPM are installed to /usr/lib/R/library.
R packages built locally with install.packages by root go to
/usr/local/lib/R/site-library
Ordinary users who try to install packages are prompted to create a
folder in their HOME/~R/... and install there.

In my Ubuntu Renviron file, I have this at the end:

R_LIBS_USER=${R_LIBS_USER-'~/R/x86_64-pc-linux-gnu-library/2.11'}

# edd Apr 2003  Allow local install in /usr/local, also add a directory for
#               Debian packaged CRAN packages, and finally the default dir
# edd Jul 2007  Now use R_LIBS_SITE, not R_LIBS
R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}

I wondered why the RedHat/Fedora install of the R RPM don't see
same/similar options. On Fedora/RedHat using R from RPM as distributed
on EPEL, all the packages go into /usr/lib/R and nonroot users are out
of luck, pretty much, unless they make some special effort.

There was some debate here about what the folder in the user home dir
should be called, but none of us realized that R, as it comes from the
"factory", will work pretty much the way I want.

The problem is that the RPM is built from a SPEC file that inserts a
line into R's Renviron that enforces a  variable
R_LIBS and it has some kind of super power to block the R_LIBS_SITE
and R_LIBS_USER variables.  Specifically, I mean this line in the SPEC
file.

%build
Add PATHS to Renviron for R_LIBS
echo 'R_LIBS=${R_LIBS-'"'%{_libdir}/R/library:%{_datadir}/R/library'"'}'
>> etc/Renviron.in

On my systems, I comment out those lines in the spec file and then R
works the way the authors intended.  Judging from the comments that
Dirk Eddelbuettel inserted in the Debian packaging, sometime around
2007 the R LIBS framework changed.

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas



More information about the R-SIG-Fedora mailing list