elukey commented on a change in pull request #697:
URL: https://github.com/apache/bigtop/pull/697#discussion_r521904818
##########
File path: bigtop_toolchain/manifests/renv.pp
##########
@@ -33,22 +33,64 @@
]
}
/(Ubuntu|Debian)/: {
- $pkgs = [
- "r-base",
- "r-base-dev",
- "pandoc"
- ]
+ if (versioncmp($operatingsystemmajrelease, '16.04') == 0) {
+ $pkgs = [
+ "r-base",
+ "r-base-dev",
+ "libcairo2-dev",
+ "pandoc",
+ "pandoc-citeproc",
+ ]
+ $rpkgs = "install_r_packages_ubt16.04"
+ } else {
+ $pkgs = [
+ "r-base",
+ "r-base-dev",
+ "pandoc",
+ ]
+ $rpkgs = "install_r_packages"
+ }
}
}
+
package { $pkgs:
ensure => installed,
- before => [Exec['install_r_packages']]
+ before => [Exec[$rpkgs]]
}
- # Install required R packages
- exec { 'install_r_packages':
- cwd => "/usr/bin",
- command => "/usr/bin/R -e \"install.packages(c('devtools', 'evaluate',
'rmarkdown', 'knitr', 'roxygen2', 'testthat', 'e1071'), repos =
'http://cran.us.r-project.org')\"",
- timeout => 6000
+ # BIGTOP-3443:
+ # Upgrade R version to 3.4.4 to fix dependency issuse in R 3.2
+ #
+ # Then Install required R packages dependency
+ if ($operatingsystem == 'Ubuntu' and versioncmp($operatingsystemmajrelease,
'16.04') == 0) {
+ $url = "https://cran.rstudio.com/src/base/R-3/"
+ $rfile = "R-3.4.4.tar.gz"
+ $rdir = "R-3.4.4"
+
+ exec { "download_R":
+ cwd => "/usr/src",
+ command => "/usr/bin/wget $url/$rfile && mkdir -p $rdir && /bin/tar
-xvzf $rfile -C $rdir --strip-components=1 && cd $rdir",
+ creates => "/usr/src/$rdir",
+ }
+ exec { "install_R":
+ cwd => "/usr/src/$rdir",
+ command => "/usr/src/$rdir/configure --with-recommended-packages=yes
--without-x --with-cairo --with-libpng --with-libtiff --with-jpeglib
--with-tcltk --with-blas --with-lapack --enable-R-shlib --prefix=/usr/local &&
/usr/bin/make && /usr/bin/make install && /sbin/ldconfig",
+ creates => "/usr/local/bin/R",
+ require => EXEC["download_R"],
Review comment:
EXEC (all uppercase) looks strange, not sure if it is the same as "Exec"
but better to double check :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]