[R-sig-Fedora] Improving RPM packaging for R; ideas gathered from the Debian folks

Paul Johnson pauljohn32 at gmail.com
Thu Feb 4 03:12:11 CET 2010


Hi, everybody.

I've got some Centos Linux systems and some Ubuntu Linux systems.  R's
basically the same in either place, but the packaging of R for Debian
systems seems better to me than it is on Fedora/Redhat/Centos.

I joined R-sig-debian and we talk about package management issues
there sometimes. One of the really handy R packaging ideas they have
is to customize R environment so that there are several directories in
the package path.

It adjusts the etc/Renviron file so that it has:

R_LIBS_USER=${R_LIBS_USER-'~/R/i486-pc-linux-gnu-library/2.10'}
R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}

That would be pretty easy to add into the R packaging for RPM systems.
The benefit is as follows.

If an unprivileged user tries to install an R package, there's no
error, but rather it installs the rpm under $HOME/R/i386.
If a privileged user installs a package in R, that goes into /usr/local/lib/R.
If the privileged user installs an RPM that with packages that come
from R itself, the package is supposed to be built so it goes into
/usr/lib/R/, and if a package is built for circulation, it would
deposit into /usr/lib/R/site-libarary. In this way, one can have
several non-conflicting versions of a package, and users can
experiment with packages in their personal space and not destroy the
system package.

That's pretty handy, I think. Its a significant convenience for
Debian-based users of R.

"Over there" in r-sig-deb, I learned that Dirk Eddelbuettel and
Charles Blundell developed a thing called "cran2deb".

http://www.mail-archive.com/debian-science@lists.debian.org/msg03306.html

That has debian packages of almost every R package you can get on CRAN.

I wonder if we couldn't do something like that for RPM users. There
are SOME R packages you can get in rpm, but not a comprehensive
collection.  I'm not entirely sure we should do it, as it may just
generate more user dependency.  But sometimes I think it would be
handy.

Dirk also has a neat RSS service announcing new R packages.
http://dirk.eddelbuettel.com/cranberries/

I've been building RPMs for about 10 years and Debian packages for
about 2 years.  It seems to me the RPM system is simpler and more
straightforward, but it is hard to argue with the success of the
Debian folks in creating packages that have handy features.

What do you think?

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



More information about the R-SIG-Fedora mailing list