-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check system dependencies using pkg manager (#117)
* #109 extend and document java check tolerance * #105 stub action Stub action as generated by github workflow starter * #105 WIP basic setup * #105 activate for current branch * #105 use more recent setup R version * #105 os matrix, javareconf * #105 javareconf as root * Install rJava from package manager * #105 nonroot javareconf * #105 java debugging * #105 more java debugging * #105 try r version 4 only * #105 debug PATH * #105 set vars for javareconf * #105 alternatives wrong flag syntax * #105 display javareconf output * #105 display javareconf output * #105 set vars before R install * #105 remove preinstalled JVMs * issue #105 check java home path * #105 pass java home explicitly to javareconf * #105 remove java check, too severe * #105 add tinytex to build vignettes * #105 no TeX, same check as travis * #105 add changes from full example * #105 param OS + version, skip vignettes * #105 skip vignettes in build * #105 upload if fail, check XLConnect pkg file * #105 debug check, pkg file not as expected * #105 more file debugging * #105 more debugging * #105 retry with tinytex install * #105 add LaTeX dependencies * #105 use R helper functions for TeX deps * #105 >_< * #105 R install tinytex to get helper fns * #105 conditionals, correct step order * #105 more TeX deps * #105 still need install tinytex * #105 typo * #105 compact vignettes * #105 test nodoc path * #105 typo build_args * #105 more lenient option for no doc check * #105 nodoc: ignore subdirectory issues * #105 ignore warnings in nodoc * issue #105 reduce size of upload, upload built pkg * #105 more combinations * #105 add windows + env vars * #105 no windows, show test output * #105 fallback to devtools if rcmdcheck not here * #105 try MRAN snapshot for 3.2.5 * #105 cache incl. repo, temp. only legacy * #105 avoid fallback on CRAN * #105 explicit repos * #105 use legacy-compatible sessionInfo() * #105 install rcmdcheck from CRAN if available * #105 no devtools fallback, all builds * #105 coverage information * #105 coverage -_- * #105 covr sys dependencies * #105 cover only if success, explicit checks * #105 disable full test suite flag * #105 effective TZ variation * #105 reactivate full test suite option * #105 remove commented out code * #105 run complete test suite * #105 install built package to run tests * #105 correct path to src package * #105 set RCMDCHECK var explicitly * #105 working dir for test suite * #105 correct path to test output * #105 clean after full tests * #105 Windows * #105 typo in conditional * #105 windows: use cmd shell * #105 Windows: no javareconf >_< * #105 windows: set pkg repo as quick fix * #105 Windows: check java version * #105 Java: both x64 and x86 * #105 java x86 exception * #105 restrict to java x64 on macOS * #105 abridged check witout multi archs * #105 single arch for full test suite * #105 temp: check windows only * #105 reactivate others, multiarch except on win * #105 typo in R conditional * fix copy paste error in dependency loading * Issues #103, #106 - add poi ooxml schemas * #103, #106 - test xlsx file * Check system packages - incl. debian names * Add available RPM package names * Javadeps: suppress warnings of pkg queries * Javadeps: suppress system check warnings * JavaDeps try suppressing pkg messages * JavaDeps: use capture.output for system calls * JavaDeps: check distro * trim immediately after capture.output * JavaDeps simplify, capture not needed * JavaDeps remove NOTEs * JavaDeps - ignore util function in codecov * JavaDeps fix rpm version check * JavaDeps - try latest R setup * JavaDeps - disable macOs not working * JavaDeps revert r setup to v1 * JavaDeps - patched action for macOs * Prepare cran comments for upcoming release * Upgrade java dependencies * check if non-legacy works * JavaDeps - PR was merged, set to master actions * JavaDeps keep previous POI version * JavaDeps - NEWS update * JavaDeps: update POI, off by 1 last row of empty * JavaDeps use backwards compatible XLConnect, revert tests * JavaDeps - java check before d/l pkg when installing * JavaDeps - check java version without .jinit * JavaDeps copyright headers * PR feedback: java version check message * PR Feedback: reword CRAN comment * PR feedback 2nd round of copyright headers * PR feedback remove wordpress references * PR feedback install instructions * JavaDeps final 1.0.2 JAR
- Loading branch information
Showing
198 changed files
with
441 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
############################################################################# | ||
# | ||
# XLConnect | ||
# Copyright (C) 2010-2021 Mirai Solutions GmbH | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################# | ||
|
||
############################################################################# | ||
# | ||
# XLConnect Package Installation: find system packages by name, including | ||
# installed files, using Debian or Red Hat package managers | ||
# | ||
# Author: Simon Poltier, Mirai Solutions GmbH | ||
# | ||
############################################################################# | ||
|
||
checkSystemPackage <- function (debianpkgname, rpmpkgname, versionpattern) { | ||
dpkg <- function(args) { | ||
suppressWarnings(system2("dpkg", args, stdout = TRUE, stderr = TRUE)) | ||
} | ||
rpm <- function(args) { | ||
suppressWarnings(system2("rpm", args, stdout = TRUE, stderr = TRUE)) | ||
} | ||
distro <- function(distroName) { | ||
releaseLines <- suppressWarnings(system2("cat",c("/etc/*-release"), stdout = TRUE, stderr = TRUE)) | ||
sum(grepl(pattern = paste0("ID.*",distroName), x = releaseLines, ignore.case = TRUE), na.rm = TRUE) > 0 | ||
} | ||
if (!is.null(rpmpkgname) && distro("rhel")) { | ||
pkgInfo <- rpm(c("-qi", rpmpkgname)) | ||
versionStr <- pkgInfo[which(grepl('Version', pkgInfo))] | ||
if(length(versionStr) != 0) { | ||
foundVersion <- strsplit(versionStr, " +: +")[[1]][2] | ||
if(grepl(versionpattern, foundVersion)) { | ||
allFiles <- rpm(c("-ql", rpmpkgname)) | ||
allFiles[which(grepl(".*/java.*jar", allFiles))] | ||
} else { c() } | ||
} else { c() } | ||
} | ||
else if(!is.null(debianpkgname) && distro("debian")) { | ||
pkgList <- dpkg(c("-l", debianpkgname)) | ||
pkgLine <- pkgList[which(grepl(debianpkgname, pkgList))][1] | ||
foundVersion <- strsplit(pkgLine, " +")[[1]][3] | ||
if(grepl(versionpattern, foundVersion)) { | ||
allFiles <- dpkg(c("--listfiles", debianpkgname)) | ||
allFiles[which(grepl(".*/java.*jar", allFiles))] | ||
} else { c() } | ||
} | ||
else { c() } | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.