You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/06/02 11:15:42 UTC

[GitHub] [nifi-minifi-cpp] lordgamez opened a new pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

lordgamez opened a new pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094


   - Add and cleanup dependencies in docker image required by extensions
   - Fix extension builds without glibc (for alpine base image)
   - Cleanup .dockerignore file
   - Avoid rebuilds of package builds while building docker image
   - Merge docker image and minimal docker image build phases
   - Fix dockerfile linter issues
   
   --------------------------------------------------------------------------------------------
   Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced
        in the commit message?
   
   - [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically main)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651700157



##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)

Review comment:
       Could you add this answer to the top of the patch file? You can add random text above the diff command line, like in thirdparty/bzip2/bzip2.patch




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r645346834



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       Actually the minimal image was at least party about size optimization. It was meant for use cases in cloud environments where MiNiFi is used as a sidecar for every Kubernetes pod for log collection. In this case we only wanted to have a very small image and only include what is necessary for this use case as sidecars should be minimal in size if they are used in every pod. It's not a huge difference if we use the Release build type instead of MinSizeRel as it's a 33MB vs a 39.2MB image though. What would be the benefit of the Release build in this use case?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651685847



##########
File path: .dockerignore
##########
@@ -1,14 +1,75 @@
+# 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.
+#
+
+.git
+.vscode
+.cache
+.cproject
+.settings
+.DS_Store
+.idea
+.iml
+.project
+nifi-minifi-cpp.kdev4
+.kdev4
+.device_id
+.ccls-cache
+.vs
+bt_state
 bin/minifi
 *build*
+*flowfile_checkpoint
 *_repository*
 logs
-cmake-build-*
+**/cmake-build-*
 docker
-.git
-.vscode
+target
+*.pyc
+*.swp
+__pycache__/
+docs/generated
+corecomponentstate
+flowfile_repository
+content_repository
+provenance_repository
+logs
+compile_commands.json
+
 extensions/expression-language/Parser.cpp
 extensions/expression-language/Parser.hpp
 extensions/expression-language/Scanner.cpp
 extensions/expression-language/location.hh
 extensions/expression-language/position.hh
 extensions/expression-language/stack.h
+thirdparty/uuid/tst_uuid*
+thirdparty/apache-rat/apache-rat*
+thirdparty/**/*.o
+thirdparty/**/*.a
+libminifi/test/**/*.a
+libminifi/src/agent/agent_version.cpp
+
+**/assemblies
+**/CMakeCache.txt
+**/CMakeFiles
+**/CMakeScripts
+**/cmake_install.cmake
+**/install_manifest.txt
+**/CTestTestfile.cmake
+**/cmake-build-debug

Review comment:
       Removed in 2c3a22a89c66a830ed70851a6128e9026872367a




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r645346834



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       Actually the minimal image was at least party about size optimization. It was meant for use cases in cloud environments where MiNiFi is used as a sidecar for every Kubernetes pod for log collection. In this case we only wanted to have a very small image and only include what is necessary for this use case as sidecards should be minimal in size if they are used in every pod. It's not a huge difference if we use the Release build type instead of MinSizeRel as it's 33MB or 39.2MB image though. What would be the benefit of the Release build in this use case?

##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)

Review comment:
       PTHREAD_MUTEX_RECURSIVE_NP is a non-portable glibc mutex and our docker base distro alpine does not have glibc only musl is available. On these systems only PTHREAD_MUTEX_RECURSIVE mutex is available that's why we redefine the non-portable symbol. An issue with a similar solution: https://github.com/godotengine/godot/issues/31555

##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)
+ #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
+ #endif
+ 
+@@ -94,7 +94,7 @@ void u_destroy_lock(void* data)
+ void u_unlock(void* data)
+ {
+     if ( data )
+-    {	
++    {
+         pthread_mutex_unlock((pthread_mutex_t*)data);
+     }
+ }
+
+diff -rupN orig/include/u/lock.h patched/include/u/lock.h
+--- orig/include/u/lock.h	2021-05-31 13:44:43.992941115 +0200
++++ patched/include/u/lock.h	2021-05-31 12:00:30.792726402 +0200
+@@ -2,7 +2,7 @@
+ #ifndef LOCKING_H
+ #define LOCKING_H
+ 
+-#if defined (__FreeBSD__)  || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#if defined (__FreeBSD__)  || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) || !defined(__GLIBC__)

Review comment:
       Same as above




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651719456



##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)

Review comment:
       Good idea, added in 2192050b5ae17cbad8c4c700fb072e53c615c644




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm closed pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
szaszm closed pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r645346834



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       Actually the minimal image was at least party about size optimization. It was meant for use cases in cloud environments where MiNiFi is used as a sidecar for every Kubernetes pod for log collection. In this case we only wanted to have a very small image and only include what is necessary for this use case as sidecards should be minimal in size if they are used in every pod. It's not a huge difference if we use the Release build type instead of MinSizeRel as it's 33MB or 39.2MB image though. What would be the benefit of the Release build in this use case?

##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)

Review comment:
       PTHREAD_MUTEX_RECURSIVE_NP is a non-portable glibc mutex and our docker base distro alpine does not have glibc only musl is available. On these systems only PTHREAD_MUTEX_RECURSIVE mutex is available that's why we redefine the non-portable symbol. An issue with a similar solution: https://github.com/godotengine/godot/issues/31555

##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)
+ #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
+ #endif
+ 
+@@ -94,7 +94,7 @@ void u_destroy_lock(void* data)
+ void u_unlock(void* data)
+ {
+     if ( data )
+-    {	
++    {
+         pthread_mutex_unlock((pthread_mutex_t*)data);
+     }
+ }
+
+diff -rupN orig/include/u/lock.h patched/include/u/lock.h
+--- orig/include/u/lock.h	2021-05-31 13:44:43.992941115 +0200
++++ patched/include/u/lock.h	2021-05-31 12:00:30.792726402 +0200
+@@ -2,7 +2,7 @@
+ #ifndef LOCKING_H
+ #define LOCKING_H
+ 
+-#if defined (__FreeBSD__)  || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#if defined (__FreeBSD__)  || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) || !defined(__GLIBC__)

Review comment:
       Same as above

##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       Actually the minimal image was at least party about size optimization. It was meant for use cases in cloud environments where MiNiFi is used as a sidecar for every Kubernetes pod for log collection. In this case we only wanted to have a very small image and only include what is necessary for this use case as sidecars should be minimal in size if they are used in every pod. It's not a huge difference if we use the Release build type instead of MinSizeRel as it's 33MB or 39.2MB image though. What would be the benefit of the Release build in this use case?

##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       Actually the minimal image was at least party about size optimization. It was meant for use cases in cloud environments where MiNiFi is used as a sidecar for every Kubernetes pod for log collection. In this case we only wanted to have a very small image and only include what is necessary for this use case as sidecars should be minimal in size if they are used in every pod. It's not a huge difference if we use the Release build type instead of MinSizeRel as it's a 33MB vs a 39.2MB image though. What would be the benefit of the Release build in this use case?

##########
File path: CMakeLists.txt
##########
@@ -583,8 +583,11 @@ add_subdirectory(main)
 add_subdirectory(nanofi)
 add_dependencies(nanofi minifiexe)
 
-add_subdirectory(encrypt-config)
-add_dependencies(encrypt-config minifi)
+option(DISABLE_ENCRYPT_CONFIG "Disables build of encrypt-config binary." OFF)
+if (NOT DISABLE_ENCRYPT_CONFIG)

Review comment:
       Thanks, updated in d6f56f9a2a7808d459cb72afc7da5f2f091fd710




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651763224



##########
File path: docker/Dockerfile
##########
@@ -16,45 +16,75 @@
 # under the License.
 #
 
-# First stage: the common build environment dependencies
-ARG BASE_ALPINE_IMAGE="alpine:3.12"
-FROM ${BASE_ALPINE_IMAGE} AS build_deps
+ARG BASE_ALPINE_IMAGE="alpine:3.13"
+
+# Build image
+FROM ${BASE_ALPINE_IMAGE} AS build
 LABEL maintainer="Apache NiFi <de...@nifi.apache.org>"
 
 ARG MINIFI_VERSION
 ARG UID=1000
 ARG GID=1000
 
+ARG ENABLE_ALL=OFF
+ARG ENABLE_PYTHON=OFF
+ARG ENABLE_OPS=ON
+ARG ENABLE_JNI=OFF
+ARG ENABLE_OPENCV=OFF
+ARG ENABLE_OPC=OFF
+ARG ENABLE_GPS=OFF
+ARG ENABLE_COAP=OFF
+ARG ENABLE_WEL=OFF
+ARG ENABLE_SQL=OFF
+ARG ENABLE_MQTT=OFF
+ARG ENABLE_PCAP=OFF
+ARG ENABLE_LIBRDKAFKA=OFF
+ARG ENABLE_SENSORS=OFF
+ARG ENABLE_USB_CAMERA=OFF
+ARG ENABLE_TENSORFLOW=OFF
+ARG ENABLE_AWS=OFF
+ARG ENABLE_BUSTACHE=OFF
+ARG ENABLE_SFTP=OFF
+ARG ENABLE_OPENWSMAN=OFF
+ARG ENABLE_AZURE=OFF
+ARG ENABLE_ENCRYPT_CONFIG=ON
+ARG DISABLE_CURL=OFF
+ARG DISABLE_JEMALLOC=ON
+ARG DISABLE_CIVET=OFF
+ARG DISABLE_EXPRESSION_LANGUAGE=OFF
+ARG DISABLE_ROCKSDB=OFF
+ARG DISABLE_LIBARCHIVE=OFF
+ARG DISABLE_LZMA=OFF
+ARG DISABLE_BZIP2=OFF
+ARG DISABLE_SCRIPTING=OFF
+ARG DISABLE_PYTHON_SCRIPTING=OFF
+ARG DISABLE_CONTROLLER=OFF
+ARG CMAKE_BUILD_TYPE=Release

Review comment:
       It was not intentional, as only the previously present arguments were copied from the build phase here, so I suppose it was missing beforehand. After considering it I explicitly turned the SYSTEMD extension off as it wouldn't be of use inside and alpine container and removed the switch for WEL as well in 523df830a0509fbdc67fb98dd4d5d28f97d9db68




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651729979



##########
File path: docker/Dockerfile
##########
@@ -16,45 +16,75 @@
 # under the License.
 #
 
-# First stage: the common build environment dependencies
-ARG BASE_ALPINE_IMAGE="alpine:3.12"
-FROM ${BASE_ALPINE_IMAGE} AS build_deps
+ARG BASE_ALPINE_IMAGE="alpine:3.13"
+
+# Build image
+FROM ${BASE_ALPINE_IMAGE} AS build
 LABEL maintainer="Apache NiFi <de...@nifi.apache.org>"
 
 ARG MINIFI_VERSION
 ARG UID=1000
 ARG GID=1000
 
+ARG ENABLE_ALL=OFF
+ARG ENABLE_PYTHON=OFF
+ARG ENABLE_OPS=ON
+ARG ENABLE_JNI=OFF
+ARG ENABLE_OPENCV=OFF
+ARG ENABLE_OPC=OFF
+ARG ENABLE_GPS=OFF
+ARG ENABLE_COAP=OFF
+ARG ENABLE_WEL=OFF
+ARG ENABLE_SQL=OFF
+ARG ENABLE_MQTT=OFF
+ARG ENABLE_PCAP=OFF
+ARG ENABLE_LIBRDKAFKA=OFF
+ARG ENABLE_SENSORS=OFF
+ARG ENABLE_USB_CAMERA=OFF
+ARG ENABLE_TENSORFLOW=OFF
+ARG ENABLE_AWS=OFF
+ARG ENABLE_BUSTACHE=OFF
+ARG ENABLE_SFTP=OFF
+ARG ENABLE_OPENWSMAN=OFF
+ARG ENABLE_AZURE=OFF
+ARG ENABLE_ENCRYPT_CONFIG=ON
+ARG DISABLE_CURL=OFF
+ARG DISABLE_JEMALLOC=ON
+ARG DISABLE_CIVET=OFF
+ARG DISABLE_EXPRESSION_LANGUAGE=OFF
+ARG DISABLE_ROCKSDB=OFF
+ARG DISABLE_LIBARCHIVE=OFF
+ARG DISABLE_LZMA=OFF
+ARG DISABLE_BZIP2=OFF
+ARG DISABLE_SCRIPTING=OFF
+ARG DISABLE_PYTHON_SCRIPTING=OFF
+ARG DISABLE_CONTROLLER=OFF
+ARG CMAKE_BUILD_TYPE=Release

Review comment:
       Is it intentional that the systemd extension is missing? I assume WEL and PDH are missing because they are windows-only. A comment about these would be nice.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r645346834



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       Actually the minimal image was at least party about size optimization. It was meant for use cases in cloud environments where MiNiFi is used as a sidecar for every Kubernetes pod for log collection. In this case we only wanted to have a very small image and only include what is necessary for this use case as sidecars should be minimal in size if they are used in every pod. It's not a huge difference if we use the Release build type instead of MinSizeRel as it's 33MB or 39.2MB image though. What would be the benefit of the Release build in this use case?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651698555



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       I agree with the first part. By size-optimized, I meant `-Os`, I should have been more specific. In some cases it gives up inlining, which would enable many other optimizations, loop unrolling and a bunch of other compiler optimizations that increases the size of the binary. I would only go that route if there is a constraint forcing us to do so.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r645159423



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       I don't think a minimal image should mean size-optimized. I'd rather have inlining unless it's about as embedded as an arduino.

##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)

Review comment:
       why?

##########
File path: CMakeLists.txt
##########
@@ -583,8 +583,11 @@ add_subdirectory(main)
 add_subdirectory(nanofi)
 add_dependencies(nanofi minifiexe)
 
-add_subdirectory(encrypt-config)
-add_dependencies(encrypt-config minifi)
+option(DISABLE_ENCRYPT_CONFIG "Disables build of encrypt-config binary." OFF)
+if (NOT DISABLE_ENCRYPT_CONFIG)

Review comment:
       There was a discussion about double negatives in the ConsumeJournald PR. It should apply here, too. https://github.com/apache/nifi-minifi-cpp/pull/1044#discussion_r622005451

##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)
+ #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
+ #endif
+ 
+@@ -94,7 +94,7 @@ void u_destroy_lock(void* data)
+ void u_unlock(void* data)
+ {
+     if ( data )
+-    {	
++    {
+         pthread_mutex_unlock((pthread_mutex_t*)data);
+     }
+ }
+
+diff -rupN orig/include/u/lock.h patched/include/u/lock.h
+--- orig/include/u/lock.h	2021-05-31 13:44:43.992941115 +0200
++++ patched/include/u/lock.h	2021-05-31 12:00:30.792726402 +0200
+@@ -2,7 +2,7 @@
+ #ifndef LOCKING_H
+ #define LOCKING_H
+ 
+-#if defined (__FreeBSD__)  || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#if defined (__FreeBSD__)  || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) || !defined(__GLIBC__)

Review comment:
       why?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] fgerlits commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
fgerlits commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651621047



##########
File path: .dockerignore
##########
@@ -1,14 +1,75 @@
+# 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.
+#
+
+.git
+.vscode
+.cache
+.cproject
+.settings
+.DS_Store
+.idea
+.iml
+.project
+nifi-minifi-cpp.kdev4
+.kdev4
+.device_id
+.ccls-cache
+.vs
+bt_state
 bin/minifi
 *build*
+*flowfile_checkpoint
 *_repository*
 logs
-cmake-build-*
+**/cmake-build-*
 docker
-.git
-.vscode
+target
+*.pyc
+*.swp
+__pycache__/
+docs/generated
+corecomponentstate
+flowfile_repository
+content_repository
+provenance_repository
+logs
+compile_commands.json
+
 extensions/expression-language/Parser.cpp
 extensions/expression-language/Parser.hpp
 extensions/expression-language/Scanner.cpp
 extensions/expression-language/location.hh
 extensions/expression-language/position.hh
 extensions/expression-language/stack.h
+thirdparty/uuid/tst_uuid*
+thirdparty/apache-rat/apache-rat*
+thirdparty/**/*.o
+thirdparty/**/*.a
+libminifi/test/**/*.a
+libminifi/src/agent/agent_version.cpp
+
+**/assemblies
+**/CMakeCache.txt
+**/CMakeFiles
+**/CMakeScripts
+**/cmake_install.cmake
+**/install_manifest.txt
+**/CTestTestfile.cmake
+**/cmake-build-debug

Review comment:
       this is already covered by line 39




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
lordgamez commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651720694



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       Thanks, I see what you mean. As we don't have specific size requirements and as I think under 39.2MB size is still okay, I changed the minimal image to use the `Release` build for those benefits in 2192050b5ae17cbad8c4c700fb072e53c615c644




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651698555



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       I agree with the first part. By size-optimized, I meant `-Os`. In some cases it gives up inlining, which would enable many other optimizations, loop unrolling and a bunch of other compiler optimizations that increases the size of the binary. I would only go that route if there is a constraint forcing us to do so.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r651698555



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       I agree with the first part. By size-optimized, I meant `-Os`, I should have been more specific. In some cases it gives up inlining, which would enable many other optimizations, loop unrolling and a bunch of other compiler optimizations that increase the size of the binary. I would only go that route if there is a constraint forcing us to do so.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1094: MINIFICPP-1576 Allow build of all extensions in docker and cleanup docker files

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #1094:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1094#discussion_r645159423



##########
File path: cmake/DockerConfig.cmake
##########
@@ -65,10 +65,19 @@ add_custom_target(
     COMMAND ${CMAKE_SOURCE_DIR}/docker/DockerBuild.sh
         -u 1000
         -g 1000
+        -t minimal
         -v ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
-        -i minimal
+        -c ENABLE_PYTHON=OFF
+        -c ENABLE_LIBRDKAFKA=ON
+        -c ENABLE_AWS=ON
+        -c DISABLE_CONTROLLER=ON
+        -c DISABLE_SCRIPTING=ON
+        -c DISABLE_PYTHON_SCRIPTING=ON
+        -c DISABLE_ENCRYPT_CONFIG=ON
+        -c AWS_ENABLE_UNITY_BUILD=OFF
         -c DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}
         -c BUILD_NUMBER=${BUILD_NUMBER}
+        -c CMAKE_BUILD_TYPE=MinSizeRel

Review comment:
       I don't think a minimal image should mean size-optimized. I'd rather have inlining unless it's about as embedded as an arduino.

##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)

Review comment:
       why?

##########
File path: CMakeLists.txt
##########
@@ -583,8 +583,11 @@ add_subdirectory(main)
 add_subdirectory(nanofi)
 add_dependencies(nanofi minifiexe)
 
-add_subdirectory(encrypt-config)
-add_dependencies(encrypt-config minifi)
+option(DISABLE_ENCRYPT_CONFIG "Disables build of encrypt-config binary." OFF)
+if (NOT DISABLE_ENCRYPT_CONFIG)

Review comment:
       There was a discussion about double negatives in the ConsumeJournald PR. It should apply here, too. https://github.com/apache/nifi-minifi-cpp/pull/1044#discussion_r622005451

##########
File path: thirdparty/openwsman/openwsman.patch
##########
@@ -79,3 +79,39 @@ diff -rupN orig/src/lib/wsman-soap.c patched/src/lib/wsman-soap.c
                          max_connections_per_thread = (* fptr)();
                  }
                  else{
+
+diff -rupN orig/src/lib/u/lock.c patched/src/lib/u/lock.c
+--- orig/src/lib/u/lock.c	2021-05-31 13:44:43.992941115 +0200
++++ patched/src/lib/u/lock.c	2021-05-31 12:00:21.972733061 +0200
+@@ -50,7 +50,7 @@
+ extern int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+ #endif
+ 
+-#if defined (__SVR4) && defined (__sun)
++#if (defined (__SVR4) && defined (__sun)) || !defined(__GLIBC__)
+ #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
+ #endif
+ 
+@@ -94,7 +94,7 @@ void u_destroy_lock(void* data)
+ void u_unlock(void* data)
+ {
+     if ( data )
+-    {	
++    {
+         pthread_mutex_unlock((pthread_mutex_t*)data);
+     }
+ }
+
+diff -rupN orig/include/u/lock.h patched/include/u/lock.h
+--- orig/include/u/lock.h	2021-05-31 13:44:43.992941115 +0200
++++ patched/include/u/lock.h	2021-05-31 12:00:30.792726402 +0200
+@@ -2,7 +2,7 @@
+ #ifndef LOCKING_H
+ #define LOCKING_H
+ 
+-#if defined (__FreeBSD__)  || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__)
++#if defined (__FreeBSD__)  || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) || !defined(__GLIBC__)

Review comment:
       why?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org