Re: [Rd] R-Project build system: DESTDIR support

From: Claudio Fontana <sick_soul_at_yahoo.it>
Date: Fri 07 Apr 2006 - 02:47:47 GMT


Hello,

we had a quick exchange some time ago about putting DESTDIR support in R-Project.

DESTDIR is not meant for run-time relocation, but for staged installation.
An already configured package can be installed to a temporary destination, with all information, hard-coded paths, or even run-time relocation code referring to the final destination.

In attachment you'll find a p1 (and p2, for that matter) patch in unified format that adds DESTDIR support to R-Project.
It's made against 2.2.1.

To apply it and study/test it, please try as a regular (unprivileged) user:

$ cd R-2.2.1 # (top_srcdir)
$ patch -p1 < R-2.2.1-DESTDIR_support.p1.udiff
$ ./configure --prefix=${HOME}/usr
$ make
$ make install DESTDIR=${HOME}/install-destdir

what happens is that an installation finally intended for /home/username/usr (we install in user mode to prevent problems and encourage testing) is offset, at installation time, to a temporary location, namely ${HOME}/install-destdir.

If you find ~/install-destdir, you'll see that that directory contains in itself a whole snapshot of the installation.

The temporary installation is non-functional. Its hard-coded path information in _any form_ refers to the final destination.

Now try (supposing you do not have an existing ${HOME}/usr):

$ mv ${HOME}/install-destdir/${HOME}/usr ${HOME}/usr

The preceeding command is enough to change a temporary installation to a fully functional installation.

This is why DESTDIR cannot be placed in rhome itself, in prefix, or any other variable.

Please consider it for inclusion, or ask me any other question about it.

Note that the patch does not contain a ChangeLog entry, since R-2.2.1 does not seem to have a ChangeLog. If you need one, the info is something like:

2006-04-07 Claudio Fontana <claudio@gnu.org>

References for DESTDIR:

GNU coding standards:
http://www.gnu.org/prep/standards/

GNU automake manual [in case you decide to move to am] http://www.gnu.org/software/automake/manual/automake.html

I could not test --enable-R-framework because I do not have access to a darwin machine.

Thanks,

Claudio                                   


10MB                                   




R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Apr 07 13:22:04 2006

This archive was generated by hypermail 2.1.8 : Fri 07 Apr 2006 - 08:16:54 GMT