Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Package a session with specific external libraries #46
As becomes clear in the discussion on geospatial libraries in Rocker, the versions of linked external libraries matter.
Can we support packaging explicit version of linked libraries?
> extSoftVersion() zlib bzlib xz "1.2.8" "1.0.6, 6-Sept-2010" "5.1.0alpha" PCRE ICU TRE "8.38 2015-11-23" "" "TRE 0.8.0 R_fixes (BSD)" iconv readline "glibc 2.23" "6.3" > library(sf) Linking to GEOS 3.5.0, GDAL 2.1.2, proj.4 4.9.2 > sf::sf_extSoftVersion() GEOS GDAL proj.4 "3.5.1" "2.1.2" "4.9.2"
This information could be accessed by a funtion
This would be very tough, I think. First of all, there is not generic solution we could use. We would probably have to add individual support for every single version.
Via APT, it is possible to install different versions of one package, but not probable that we can make use of that: To find out, which versions of a package could be installed via
It seems a little bit more doable to install versioned packages from source. This is slow, and there is also not a generic solution here. Neither is there a central source code repository that we could use (to my knowledge), but for most of the libraries, we can find some repository that includes older versions. For instance:
We already have examples for installing proj and gdal from source here. We could use such commands as templates with different version numbers. This will work for some cases , but of course not for all.
If we can demonstrate that it is doable for "most" or "many" cases, that would already be quite something!
That there is no central repository for this means that the
That image building is slow is not an issue for now.
I implemented a parameter
Currently, the package only reads
The information to install versioned libs is based on a config file that you can find here:
The following R script provides some helper methods for creating such a file, for reading/writing and initializing, and getter methods for the information of interest (I want to re-write the first part into a test later):
The code that makes use of the config and creates the corresponding RUN commands is created here: