You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/11/05 09:21:56 UTC
[plc4x] 02/02: - Added a check for OpenSSL to the
prerequisiteCheck.groovy script
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/reproducible-builds
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 9c8eb42a23bb1a5b467c691e066d600b8f766c2a
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Nov 5 10:21:44 2019 +0100
- Added a check for OpenSSL to the prerequisiteCheck.groovy script
---
src/main/script/prerequisiteCheck.groovy | 33 ++++++++++++++++++++++++--------
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index 8ee0db3..1e282d8 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -51,7 +51,7 @@ def checkVersionAtLeast(String current, String minimum) {
}
def checkBison() {
- print "Detecting Bison version: "
+ print "Detecting Bison version: "
def output = "bison --version".execute().text
Matcher matcher = extractVersion(output)
if(matcher.size() > 0) {
@@ -67,7 +67,7 @@ def checkBison() {
}
def checkDotnet() {
- print "Detecting Dotnet version: "
+ print "Detecting Dotnet version: "
def output = "dotnet --version".execute().text
Matcher matcher = extractVersion(output)
if(matcher.size() > 0) {
@@ -83,7 +83,7 @@ def checkDotnet() {
}
def checkFlex() {
- print "Detecting Flex version: "
+ print "Detecting Flex version: "
def output = "flex --version".execute().text
Matcher matcher = extractVersion(output)
if(matcher.size() > 0) {
@@ -99,7 +99,7 @@ def checkFlex() {
}
def checkGcc() {
- print "Detecting Gcc version: "
+ print "Detecting Gcc version: "
def output = "gcc --version".execute().text
Matcher matcher = extractVersion(output)
if(matcher.size() > 0) {
@@ -115,7 +115,7 @@ def checkGcc() {
}
def checkGit() {
- print "Detecting Git version: "
+ print "Detecting Git version: "
def output = "git --version".execute().text
Matcher matcher = extractVersion(output)
if(matcher.size() > 0) {
@@ -131,7 +131,7 @@ def checkGit() {
}
def checkGpp() {
- print "Detecting G++ version: "
+ print "Detecting G++ version: "
def output = "g++ --version".execute().text
Matcher matcher = extractVersion(output)
if(matcher.size() > 0) {
@@ -147,7 +147,7 @@ def checkGpp() {
}
def checkPython() {
- print "Detecting Python version: "
+ print "Detecting Python version: "
def process = ("python --version").execute()
def stdOut = new StringBuilder()
def stdErr = new StringBuilder()
@@ -186,7 +186,7 @@ def checkPython() {
* We're not checking if it could be resolved.
*/
def checkBoost() {
- print "Detecting Boost library: "
+ print "Detecting Boost library: "
def localRepoBaseDir = session.getLocalRepository().getBasedir()
def expectedFile = new File(localRepoBaseDir, "org/apache/plc4x/plc4x-tools-boost/" + project.version +
"/plc4x-tools-boost-" + project.version + "-lib-" + project.properties["os.classifier"] + ".zip")
@@ -201,6 +201,22 @@ def checkBoost() {
}
}
+def checkOpenSSL() {
+ print "Detecting OpenSSL version: "
+ def output = "openssl version".execute().text
+ Matcher matcher = extractVersion(output)
+ if(matcher.size() > 0) {
+ def curVersion = matcher[0][1]
+ def result = checkVersionAtLeast(curVersion, "1.0.0")
+ if(!result) {
+ allConditionsMet = false
+ }
+ } else {
+ println "missing"
+ allConditionsMet = false
+ }
+}
+
/**
* Version extraction function/macro. It looks for occurrence of x.y or x.y.z
* in passed input text (likely output from `program --version` command if found).
@@ -295,6 +311,7 @@ if(dotnetEnabled) {
if(proxiesEnabled) {
checkFlex()
+ checkOpenSSL()
}
if(proxiesEnabled || cppEnabled) {