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/02/16 17:01:01 UTC
nifi-minifi-cpp git commit: MINIFICPP-400: Add Debian specific
limitations on the SSL version, update the docs,
and resolve Debian test failure
Repository: nifi-minifi-cpp
Updated Branches:
refs/heads/master 0a85355f8 -> c89ef2206
MINIFICPP-400: Add Debian specific limitations on the SSL version, update the docs, and resolve Debian test failure
MINIFICPP-31: Update broken test as a result of failed merge.
Original committer introduced a fix for this :
https://raw.githubusercontent.com/achristianson/nifi-minifi-cpp/efd701594f43eecc2e2e5d058bc60337a35b7b55/libminifi/test/unit/UpdateAttributeTests.cpp
MINIFICPP-31: Fix linter issues from copied commit
MINIFICPP-400: Fix CompressContents failure
This closes #264.
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/c89ef220
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/c89ef220
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/c89ef220
Branch: refs/heads/master
Commit: c89ef2206a150f9e71725eccd7f4ddef089d2658
Parents: 0a85355
Author: Marc Parisi <ph...@apache.org>
Authored: Wed Feb 14 14:47:29 2018 -0500
Committer: Aldrin Piri <al...@apache.org>
Committed: Fri Feb 16 12:00:34 2018 -0500
----------------------------------------------------------------------
README.md | 8 +-
aptitude.sh | 2 +-
bootstrap.sh | 2 +-
cmake/BuildTests.cmake | 2 +-
debian.sh | 91 +++++++++++++++++++++++
libminifi/CMakeLists.txt | 2 +-
libminifi/test/unit/UpdateAttributeTests.cpp | 10 +--
7 files changed, 104 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c89ef220/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 1806c59..3228cba 100644
--- a/README.md
+++ b/README.md
@@ -462,7 +462,7 @@ Additionally, users can utilize the MiNiFi Toolkit Converter (version 0.0.1 - sc
in minifi.properties
- enable tls ssl
+ enable tls
nifi.remote.input.secure=true
if you want to enable client certificate base authorization
@@ -477,9 +477,9 @@ Additionally, users can utilize the MiNiFi Toolkit Converter (version 0.0.1 - sc
if you do not want to enable client certificate base authorization
nifi.security.need.ClientAuth=false
-
-Alternatively you may specify an SSL Context Service definition for the RPGs. This will link
-to a corresponding SSL Context service defined in the flow.
+
+If you are using HTTP Site to Site, you have the option of specifying an SSL Context Service definition for the RPGs.
+This will link to a corresponding SSL Context service defined in the flow.
To do this specify the SSL Context Service Property in your RPGs and link it to
a defined controller service. If you do not take this approach the options, above, will be used
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c89ef220/aptitude.sh
----------------------------------------------------------------------
diff --git a/aptitude.sh b/aptitude.sh
index 271f97d..5e3db10 100644
--- a/aptitude.sh
+++ b/aptitude.sh
@@ -31,7 +31,7 @@ bootstrap_cmake(){
sudo apt-get -y install cmake
}
build_deps(){
-
+ ## need to account for debian
COMMAND="sudo apt-get -y install cmake gcc g++ zlib1g-dev libssl-dev uuid uuid-dev"
export DEBIAN_FRONTEND=noninteractive
INSTALLED=()
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c89ef220/bootstrap.sh
----------------------------------------------------------------------
diff --git a/bootstrap.sh b/bootstrap.sh
index 3e30947..48ef6a9 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -153,7 +153,7 @@ OS_REVISION=`echo $EVR | cut -d. -f3`
if [[ "$OS" = "Darwin" ]]; then
source darwin.sh
elif [[ "$OS" = Deb* ]]; then
- source aptitude.sh
+ source debian.sh
elif [[ "$OS" = Rasp* ]]; then
source aptitude.sh
elif [[ "$OS" = Ubuntu* ]]; then
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c89ef220/cmake/BuildTests.cmake
----------------------------------------------------------------------
diff --git a/cmake/BuildTests.cmake b/cmake/BuildTests.cmake
index 8bb83e7..9a180f0 100644
--- a/cmake/BuildTests.cmake
+++ b/cmake/BuildTests.cmake
@@ -56,7 +56,7 @@ function(createTests testName)
if (Boost_FOUND)
target_include_directories(${testName} BEFORE PRIVATE "${Boost_INCLUDE_DIRS}")
endif()
- target_link_libraries(${testName} ${SPD_LIB} ${TEST_BASE_LIB})
+ target_link_libraries(${testName} ${CMAKE_DL_LIBS} ${SPD_LIB} ${TEST_BASE_LIB})
target_link_libraries(${testName} ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} core-minifi yaml-cpp)
if (APPLE)
target_link_libraries (${testName} -Wl,-all_load minifi)
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c89ef220/debian.sh
----------------------------------------------------------------------
diff --git a/debian.sh b/debian.sh
new file mode 100644
index 0000000..b2d3e2b
--- /dev/null
+++ b/debian.sh
@@ -0,0 +1,91 @@
+# 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_enable(){
+ feature="$1"
+ feature_status=${!1}
+ if [ "$feature" = "USB_ENABLED" ]; then
+ echo "false"
+ else
+ echo "true"
+ fi
+}
+add_os_flags() {
+ CMAKE_BUILD_COMMAND="${CMAKE_BUILD_COMMAND} -DFAIL_ON_WARNINGS= "
+}
+bootstrap_cmake(){
+ sudo apt-get -y install cmake
+}
+build_deps(){
+ ## need to account for debian
+ sudo apt-get install libssl1.0-dev > /dev/null
+ RETVAL=$?
+ if ["$RETVAL" -ne "0"]; then
+ sudo apt-get install libssl-dev > /dev/null
+ fi
+ COMMAND="sudo apt-get -y install cmake gcc g++ zlib1g-dev uuid uuid-dev"
+ export DEBIAN_FRONTEND=noninteractive
+ INSTALLED=()
+ sudo apt-get -y update
+ for option in "${OPTIONS[@]}" ; do
+ option_value="${!option}"
+ if [ "$option_value" = "${TRUE}" ]; then
+ # option is enabled
+ FOUND_VALUE=""
+ for cmake_opt in "${DEPENDENCIES[@]}" ; do
+ KEY=${cmake_opt%%:*}
+ VALUE=${cmake_opt#*:}
+ if [ "$KEY" = "$option" ]; then
+ FOUND_VALUE="$VALUE"
+ if [ "$FOUND_VALUE" = "libcurl" ]; then
+ INSTALLED+=("libcurl4-openssl-dev")
+ elif [ "$FOUND_VALUE" = "libpcap" ]; then
+ INSTALLED+=("libpcap-dev")
+ elif [ "$FOUND_VALUE" = "openssl" ]; then
+ INSTALLED+=("openssl")
+ elif [ "$FOUND_VALUE" = "libusb" ]; then
+ INSTALLED+=("libusb-dev")
+ elif [ "$FOUND_VALUE" = "libpng" ]; then
+ INSTALLED+=("libpng-dev")
+ elif [ "$FOUND_VALUE" = "bison" ]; then
+ INSTALLED+=("bison")
+ elif [ "$FOUND_VALUE" = "flex" ]; then
+ INSTALLED+=("flex")
+ elif [ "$FOUND_VALUE" = "python" ]; then
+ INSTALLED+=("libpython3-dev")
+ elif [ "$FOUND_VALUE" = "lua" ]; then
+ INSTALLED+=("liblua5.1-0-dev")
+ elif [ "$FOUND_VALUE" = "gpsd" ]; then
+ INSTALLED+=("libgps-dev")
+ elif [ "$FOUND_VALUE" = "libarchive" ]; then
+ INSTALLED+=("liblzma-dev")
+ INSTALLED+=("libbz2-dev")
+ fi
+ fi
+ done
+
+ fi
+ done
+
+ for option in "${INSTALLED[@]}" ; do
+ COMMAND="${COMMAND} $option"
+ done
+
+ echo "Ensuring you have all dependencies installed..."
+ ${COMMAND}
+
+}
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c89ef220/libminifi/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/libminifi/CMakeLists.txt b/libminifi/CMakeLists.txt
index ce0a0d9..501a813 100644
--- a/libminifi/CMakeLists.txt
+++ b/libminifi/CMakeLists.txt
@@ -71,7 +71,7 @@ file(GLOB SPD_SOURCES "../thirdparty/spdlog-20170710/include/spdlog/*")
# header only library
add_library(spdlog STATIC ${SPD_SOURCES})
add_library(core-minifi STATIC ${SOURCES})
-target_link_libraries(core-minifi ${UUID_LIBRARIES} yaml-cpp)
+target_link_libraries(core-minifi ${CMAKE_DL_LIBS} ${UUID_LIBRARIES} yaml-cpp)
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIRS})
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/c89ef220/libminifi/test/unit/UpdateAttributeTests.cpp
----------------------------------------------------------------------
diff --git a/libminifi/test/unit/UpdateAttributeTests.cpp b/libminifi/test/unit/UpdateAttributeTests.cpp
index df1cf21..9009ea2 100644
--- a/libminifi/test/unit/UpdateAttributeTests.cpp
+++ b/libminifi/test/unit/UpdateAttributeTests.cpp
@@ -16,6 +16,7 @@
* limitations under the License.
*/
#include "../TestBase.h"
+#include <memory>
#include "processors/LogAttribute.h"
#include "processors/UpdateAttribute.h"
#include "processors/GenerateFlowFile.h"
@@ -41,15 +42,14 @@ TEST_CASE("UpdateAttributeTest", "[updateAttributeTest]") {
true);
plan->setProperty(update_proc, "test_attr_1", "test_val_1", true);
- plan->setProperty(update_proc, "test_attr_2", "test_val_${literal(1):plus(1)}", true);
+ plan->setProperty(update_proc, "test_attr_2", "test_val_2", true);
- testController.runSession(plan, false); // generate
- testController.runSession(plan, false); // update
- testController.runSession(plan, false); // log
+ testController.runSession(plan, false); // generate
+ testController.runSession(plan, false); // update
+ testController.runSession(plan, false); // log
REQUIRE(LogTestController::getInstance().contains("key:test_attr_1 value:test_val_1"));
REQUIRE(LogTestController::getInstance().contains("key:test_attr_2 value:test_val_2"));
LogTestController::getInstance().reset();
}
-