You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2018/08/03 20:23:39 UTC

nifi-minifi-cpp git commit: MINFICIPP-582: Update readme to implement bustache and kafka constraints

Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 19a838e47 -> fedc4f7fb


MINFICIPP-582: Update readme to implement bustache and kafka constraints

MINIFICPP-582: Add LUA limitations

This closes #383.

Signed-off-by: Aldrin Piri <al...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/fedc4f7f
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/fedc4f7f
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/fedc4f7f

Branch: refs/heads/master
Commit: fedc4f7fbcb81eda222fd1372a6e8df89a6089ae
Parents: 19a838e
Author: Marc Parisi <ph...@apache.org>
Authored: Mon Jul 30 14:14:12 2018 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Fri Aug 3 16:23:12 2018 -0400

----------------------------------------------------------------------
 aptitude.sh        |  2 +-
 bootstrap.sh       | 76 +++++++++++++++++++++++++++++++------------------
 bstrp_functions.sh | 42 +++++++++++++--------------
 centos.sh          |  4 +--
 debian.sh          |  8 +++---
 deploy.sh          |  4 +--
 fedora.sh          |  4 ++-
 generateVersion.sh |  2 +-
 linux.sh           | 48 +++++++++++++++++++++++++++++++
 rheldistro.sh      |  4 +--
 suse.sh            |  4 +--
 11 files changed, 134 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/aptitude.sh
----------------------------------------------------------------------
diff --git a/aptitude.sh b/aptitude.sh
index 8c14456..061ea00 100644
--- a/aptitude.sh
+++ b/aptitude.sh
@@ -19,7 +19,7 @@
 verify_enable(){
   feature="$1"
   feature_status=${!1}
-    echo "true"
+  verify_gcc_enable $feature
 }
 add_os_flags() {
   CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DFAIL_ON_WARNINGS= "

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/bootstrap.sh
----------------------------------------------------------------------
diff --git a/bootstrap.sh b/bootstrap.sh
index 97e8b5f..0474838 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -56,7 +56,7 @@ while :; do
       FEATURES_SELECTED="true"
       EnableAllFeatures
       ;;
-     -c|--clear)
+    -c|--clear)
       rm ${script_directory}/bt_state > /dev/null 2>&1
       ;;
     -d|--deploy)
@@ -149,34 +149,52 @@ fi
 OS_MAJOR=`echo $VER | cut -d. -f1`
 OS_MINOR=`echo $VER | cut -d. -f2`
 OS_REVISION=`echo $EVR	 | cut -d. -f3`
+
+### Verify the compiler version
+
+COMPILER_VERSION="0.0.0"
+
+COMPILER_COMMAND=""
+
+if [ -x "$(command -v g++)" ]; then
+  COMPILER_COMMAND="g++"
+  COMPILER_VERSION=`${COMPILER_COMMAND} -dumpversion`
+fi
+
+COMPILER_MAJOR=`echo $COMPILER_VERSION | cut -d. -f1`
+COMPILER_MINOR=`echo $COMPILER_VERSION | cut -d. -f2`
+COMPILER_REVISION=`echo $COMPILER_VERSION | cut -d. -f3`
+
+
 if [[ "$OS" = "Darwin" ]]; then
   . "${script_directory}/darwin.sh"
-elif [[ "$OS" = Deb* ]]; then
-  . "${script_directory}/debian.sh"
-elif [[ "$OS" = Rasp* ]]; then
-  . "${script_directory}/aptitude.sh"
-elif [[ "$OS" = Pop* ]]; then
-  . "${script_directory}/aptitude.sh"
-elif [[ "$OS" = Ubuntu* ]]; then
-  . "${script_directory}/aptitude.sh"
-elif [[ "$OS" = *SUSE* ]]; then
-  . "${script_directory}/suse.sh"
-elif [[ "$OS" = *SLE* ]]; then
-  if [[ "$VER" = 11* ]]; then
-    echo "Please install SLES11 manually...exiting"
-    exit
-  else
+else
+  . "${script_directory}/linux.sh"
+  if [[ "$OS" = Deb* ]]; then
+    . "${script_directory}/debian.sh"
+  elif [[ "$OS" = Rasp* ]]; then
+    . "${script_directory}/aptitude.sh"
+  elif [[ "$OS" = Pop* ]]; then
+    . "${script_directory}/aptitude.sh"
+  elif [[ "$OS" = Ubuntu* ]]; then
+    . "${script_directory}/aptitude.sh"
+  elif [[ "$OS" = *SUSE* ]]; then
     . "${script_directory}/suse.sh"
+  elif [[ "$OS" = *SLE* ]]; then
+    if [[ "$VER" = 11* ]]; then
+      echo "Please install SLES11 manually...exiting"
+      exit
+    else
+      . "${script_directory}/suse.sh"
+    fi
+  elif [[ "$OS" = Red* ]]; then
+    . "${script_directory}/rheldistro.sh"
+  elif [[ "$OS" = CentOS* ]]; then
+    . "${script_directory}/centos.sh"
+  elif [[ "$OS" = Fedora* ]]; then
+    . "${script_directory}/fedora.sh"
   fi
-elif [[ "$OS" = Red* ]]; then
-  . "${script_directory}/rheldistro.sh"
-elif [[ "$OS" = CentOS* ]]; then
-  . "${script_directory}/centos.sh"
-elif [[ "$OS" = Fedora* ]]; then
-  . "${script_directory}/fedora.sh"
 fi
-
-
 ### verify the cmake version
 
 CMAKE_COMMAND=""
@@ -206,6 +224,8 @@ CMAKE_MAJOR=`echo $CMAKE_VERSION | cut -d. -f1`
 CMAKE_MINOR=`echo $CMAKE_VERSION | cut -d. -f2`
 CMAKE_REVISION=`echo $CMAKE_VERSION | cut -d. -f3`
 
+
+
 add_cmake_option PORTABLE_BUILD ${TRUE}
 add_cmake_option DEBUG_SYMBOLS ${FALSE}
 add_cmake_option BUILD_ROCKSDB ${TRUE}
@@ -259,9 +279,9 @@ fi
 BUILD_DIR_D=${BUILD_DIR}
 load_state
 if [ "$BUILD_DIR_D" != "build" ] && [ "$BUILD_DIR_D" != "$BUILD_DIR" ]; then
-   read -p "Build dir will override stored state, $BUILD_DIR. Press any key to continue " overwrite
-   BUILD_DIR=$BUILD_DIR_D
-   
+  read -p "Build dir will override stored state, $BUILD_DIR. Press any key to continue " overwrite
+  BUILD_DIR=$BUILD_DIR_D
+
 fi
 
 if [ ! -d "${BUILD_DIR}" ]; then
@@ -296,7 +316,7 @@ do
     read_advanced_menu_options
   else
     show_supported_features
-    read_feature_options 
+    read_feature_options
   fi
 done
 ### ensure we have all dependencies

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/bstrp_functions.sh
----------------------------------------------------------------------
diff --git a/bstrp_functions.sh b/bstrp_functions.sh
index aa1daf3..2d16b5e 100755
--- a/bstrp_functions.sh
+++ b/bstrp_functions.sh
@@ -72,29 +72,29 @@ pause(){
 
 
 load_state(){
-if [ -f ${script_directory}/bt_state ]; then
- . ${script_directory}/bt_state
- for option in "${OPTIONS[@]}" ; do
+  if [ -f ${script_directory}/bt_state ]; then
+    . ${script_directory}/bt_state
+    for option in "${OPTIONS[@]}" ; do
       option_value="${!option}"
-       if [ "${option_value}" = "${FALSE}" ]; then
-       	ALL_FEATURES_ENABLED=${FALSE}
-       fi
-   done
-fi
+      if [ "${option_value}" = "${FALSE}" ]; then
+        ALL_FEATURES_ENABLED=${FALSE}
+      fi
+    done
+  fi
 }
 
 echo_state_variable(){
-VARIABLE_VALUE=${!1}
-echo "$1=\"${VARIABLE_VALUE}\"" >> ${script_directory}/bt_state
+  VARIABLE_VALUE=${!1}
+  echo "$1=\"${VARIABLE_VALUE}\"" >> ${script_directory}/bt_state
 }
 
 save_state(){
-   echo "VERSION=1" > ${script_directory}/bt_state
-   echo_state_variable BUILD_IDENTIFIER
-   echo_state_variable BUILD_DIR
-   for option in "${OPTIONS[@]}" ; do
-       echo_state_variable $option
-   done
+  echo "VERSION=1" > ${script_directory}/bt_state
+  echo_state_variable BUILD_IDENTIFIER
+  echo_state_variable BUILD_DIR
+  for option in "${OPTIONS[@]}" ; do
+    echo_state_variable $option
+  done
 }
 
 can_deploy(){
@@ -189,7 +189,7 @@ show_main_menu() {
   echo "****************************************"
   echo " MiNiFi C++ Main Menu."
   echo "****************************************"
-  echo "A. Select MiNIFi C++ Features " 
+  echo "A. Select MiNIFi C++ Features "
   if [ "$ALL_FEATURES_ENABLED" = "${TRUE}" ]; then
     echo "  All features enabled  ........$(print_feature_status ALL_FEATURES_ENABLED)"
   fi
@@ -257,7 +257,7 @@ show_supported_features() {
   echo "M. Enable all extensions"
   echo "P. Continue with these options"
   if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
- 	 echo "R. Return to Main Menu"
+    echo "R. Return to Main Menu"
   fi
   echo "Q. Quit"
   echo "* Extension cannot be installed due to"
@@ -284,9 +284,9 @@ read_feature_options(){
     m) EnableAllFeatures ;;
     p) FEATURES_SELECTED="true" ;;
     r) if [ "$GUIDED_INSTALL" = "${TRUE}" ]; then
-	   MENU="main" 
-       fi
-       ;;
+        MENU="main"
+      fi
+      ;;
     q) exit 0;;
     *) echo -e "${RED}Please enter an option A-L...${NO_COLOR}" && sleep 2
   esac

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/centos.sh
----------------------------------------------------------------------
diff --git a/centos.sh b/centos.sh
index 14d1e65..f99d51a 100644
--- a/centos.sh
+++ b/centos.sh
@@ -27,13 +27,13 @@ verify_enable() {
     elif [ "$feature" = "TENSORFLOW_ENABLED" ]; then
       echo "false"
     else
-      echo "true"
+      verify_gcc_enable $feature
     fi
   else
     if [ "$feature" = "USB_ENABLED" ]; then
       echo "false"
     else
-      echo "true"
+      verify_gcc_enable $feature
     fi
   fi
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/debian.sh
----------------------------------------------------------------------
diff --git a/debian.sh b/debian.sh
index 4a50dbb..8a8ae25 100644
--- a/debian.sh
+++ b/debian.sh
@@ -19,7 +19,7 @@
 verify_enable(){
   feature="$1"
   feature_status=${!1}
-    echo "true"
+  verify_gcc_enable $feature
 }
 add_os_flags() {
   CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DFAIL_ON_WARNINGS= "
@@ -28,12 +28,12 @@ bootstrap_cmake(){
   sudo apt-get -y install cmake
 }
 build_deps(){
-  sudo apt-get -y update 
+  sudo apt-get -y update
   ## need to account for debian
   sudo apt-get install -y libssl1.0-dev > /dev/null
   RETVAL=$?
-  if [ "$RETVAL" -ne "0" ]; then  
-     sudo apt-get install -y libssl-dev > /dev/null
+  if [ "$RETVAL" -ne "0" ]; then
+    sudo apt-get install -y libssl-dev > /dev/null
   fi
   COMMAND="sudo apt-get -y install cmake gcc g++ zlib1g-dev uuid uuid-dev"
   export DEBIAN_FRONTEND=noninteractive

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/deploy.sh
----------------------------------------------------------------------
diff --git a/deploy.sh b/deploy.sh
index 00a1c69..c28c63c 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -23,6 +23,6 @@ echo "${build_identifier}" > build_identifier
 
 ./bootstrap.sh -d -p --build_identifier=${build_identifier}
 
-pushd build 
- ./controller/minificontroller --manifest >> build_output
+pushd build
+./controller/minificontroller --manifest >> build_output
 popd

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/fedora.sh
----------------------------------------------------------------------
diff --git a/fedora.sh b/fedora.sh
index 252ed5b..0bf7d4b 100644
--- a/fedora.sh
+++ b/fedora.sh
@@ -17,7 +17,9 @@
 # under the License.
 
 verify_enable(){
-  echo "true"
+  feature="$1"
+  feature_status=${!1}
+  verify_gcc_enable $feature
 }
 add_os_flags() {
   :

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/generateVersion.sh
----------------------------------------------------------------------
diff --git a/generateVersion.sh b/generateVersion.sh
index a0796cb..238104b 100755
--- a/generateVersion.sh
+++ b/generateVersion.sh
@@ -34,7 +34,7 @@ fi
 
 IFS=';' read -r -a extensions_array <<< "$extensions"
 
-extension_list="${extension_list} } "    
+extension_list="${extension_list} } "
 
 cat >"$out_dir/agent_version.h" <<EOF
 #ifndef AGENT_BUILD_H

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/linux.sh
----------------------------------------------------------------------
diff --git a/linux.sh b/linux.sh
new file mode 100644
index 0000000..e279c84
--- /dev/null
+++ b/linux.sh
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#!/bin/bash
+verify_gcc_enable(){
+  feature="$1"
+  feature_status=${!1}
+  if [ "$feature" = "BUSTACHE_ENABLED" ]; then 
+    if (( COMPILER_MAJOR == 6 && COMPILER_MINOR >= 3 && COMPILER_REVISION >= 1  )); then
+      echo "true" 	    
+    elif (( COMPILER_MAJOR > 6 )); then
+      echo "true"
+    else
+      echo "false"
+    fi
+  elif [ "$feature" = "EXECUTE_SCRIPT_ENABLED" ]; then
+    if (( COMPILER_MAJOR >= 6 )); then
+      echo "true"
+    else
+      echo "false"
+    fi
+  elif [ "$feature" = "KAFKA_ENABLED" ]; then
+    if (( COMPILER_MAJOR >= 4 )); then
+      if (( COMPILER_MAJOR > 4 || COMPILER_MINOR >= 9 )); then
+        echo "true"
+      else
+        echo "false"
+      fi
+    else
+      echo "false"
+    fi
+  else
+    echo "true"
+  fi
+}

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/rheldistro.sh
----------------------------------------------------------------------
diff --git a/rheldistro.sh b/rheldistro.sh
index 52ef928..93ab352 100644
--- a/rheldistro.sh
+++ b/rheldistro.sh
@@ -25,13 +25,13 @@ verify_enable() {
     elif [ "$feature" = "USB_ENABLED" ]; then
       echo "false"
     else
-      echo "true"
+      verify_gcc_enable $feature
     fi
   else
     if [ "$feature" = "USB_ENABLED" ]; then
       echo "false"
     else
-      echo "true"
+      verify_gcc_enable $feature
     fi
   fi
 }

http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/fedc4f7f/suse.sh
----------------------------------------------------------------------
diff --git a/suse.sh b/suse.sh
index 955e047..7a40bd5 100644
--- a/suse.sh
+++ b/suse.sh
@@ -25,13 +25,13 @@ verify_enable() {
     elif [ "$feature" = "USB_ENABLED" ]; then
       echo "false"
     else
-      echo "true"
+      verify_gcc_enable $feature
     fi
   else
     if [ "$feature" = "USB_ENABLED" ]; then
       echo "false"
     else
-      echo "true"
+      verify_gcc_enable $feature
     fi
   fi
 }