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 2020/04/06 15:10:11 UTC

[plc4x] branch develop updated: - Added checks to use at least Java 11 if cmake is enabled - Added some documentation on using libpcap on linux (root privileges issues)

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new e420c12  - Added checks to use at least Java 11 if cmake is enabled - Added some documentation on using libpcap on linux (root privileges issues)
e420c12 is described below

commit e420c1236be9a451f568e8d46124326201c191a3
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Apr 6 17:10:02 2020 +0200

    - Added checks to use at least Java 11 if cmake is enabled
    - Added some documentation on using libpcap on linux (root privileges issues)
---
 .../src/main/java/org/apache/plc4x/test/RequirePcapNgCondition.java | 2 +-
 src/main/script/prerequisiteCheck.groovy                            | 6 ++++--
 src/site/asciidoc/developers/preparing/linux.adoc                   | 4 ++++
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/RequirePcapNgCondition.java b/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/RequirePcapNgCondition.java
index 62522e4..844f7d0 100644
--- a/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/RequirePcapNgCondition.java
+++ b/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/RequirePcapNgCondition.java
@@ -51,7 +51,7 @@ public class RequirePcapNgCondition implements ExecutionCondition {
                 if (curVersion.compareTo(minVersion) >= 0) {
                     return ConditionEvaluationResult.enabled("Found libpcap version " + versionString);
                 } else if (SystemUtils.IS_OS_WINDOWS) {
-                    return ConditionEvaluationResult.disabled("Test disabled due to too old WinPcap version. Please install at least version 1.1.0 to support all features. Please install from here: https://sourceforge.net/projects/winpcap413-176/ as this version supports all needed freatures.");
+                    return ConditionEvaluationResult.disabled("Test disabled due to too old WinPcap version. Please install at least version 1.1.0 to support all features. Please install from here: https://sourceforge.net/projects/winpcap413-176/ as this version supports all needed features.");
                 } else {
                     return ConditionEvaluationResult.disabled("Test disabled due to too old libpcap version. Please install at least version 1.1.0 to support all features.");
                 }
diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index 4f0426b..4ef1424 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -494,9 +494,9 @@ if(proxiesEnabled) {
 
 if(proxiesEnabled || cppEnabled) {
     checkClang()
+    // The cmake-maven-plugin requires at least java 11
+    checkJavaVersion("11", null)
     checkGcc()
-    // We should now be using our own version ...
-    //checkCmake()
 }
 
 if(javaEnabled) {
@@ -504,6 +504,8 @@ if(javaEnabled) {
 }
 
 if(cEnabled) {
+    // The cmake-maven-plugin requires at least java 11
+    checkJavaVersion("11", null)
     checkGcc()
 }
 
diff --git a/src/site/asciidoc/developers/preparing/linux.adoc b/src/site/asciidoc/developers/preparing/linux.adoc
index 50d4eeb..7692c15 100644
--- a/src/site/asciidoc/developers/preparing/linux.adoc
+++ b/src/site/asciidoc/developers/preparing/linux.adoc
@@ -43,6 +43,10 @@ Yum based systems:
 
  sudo yum install libpcap-devel
 
+Using libpcap usually requires root privileges, however the java process can be granted permission to do so by executing the following command.
+
+ setcap cap_net_raw,cap_net_admin=eip /path/to/java
+
 === gcc
 
 Checking: