[R-sig-Fedora] How to go about getting a change in the SPEC file from which R is built on EPEL?
Tom "spot" Callaway
tcallawa at redhat.com
Thu Jun 3 19:03:52 CEST 2010
On 06/03/2010 12:14 PM, Paul Johnson wrote:
> 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.
So, a few corrections:
On Fedora:
* Architecture specific R modules go into %{_libdir}/R/library
* Architecture independent R modules go into %{_datadir}/R/library
I don't believe that without making some change, R will look in
%{_datadir}/R/library at all.
It looks like we should be overloading R_LIBS_SITE as opposed to R_LIBS.
Easy peasy. :)
Can you try changing that line in the spec file to this and confirm that
it resolves the issue:
echo
'R_LIBS_SITE=${R_LIBS_SITE-'"'/usr/local/lib/R/site-library:/usr/local/lib/R/library:%{_libdir}/R/library:%{_datadir}/R/library'"'}'
>> etc/Renviron.in
(Note: email client wrapped it, but it should be one long line)
~spot
More information about the R-SIG-Fedora
mailing list