You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ab...@apache.org on 2022/12/09 16:15:19 UTC
[nifi-minifi-cpp] branch main updated: MINIFICPP-2010 Disable systemd on non-linux remove option from bootstrap UI
This is an automated email from the ASF dual-hosted git repository.
aboda pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new d6912551b MINIFICPP-2010 Disable systemd on non-linux remove option from bootstrap UI
d6912551b is described below
commit d6912551b2e356db6ed55b7a0a58843e4b92fca8
Author: Marton Szasz <sz...@apache.org>
AuthorDate: Fri Dec 9 16:44:56 2022 +0100
MINIFICPP-2010 Disable systemd on non-linux
remove option from bootstrap UI
Signed-off-by: Arpad Boda <ab...@apache.org>
This closes #1470
---
bootstrap.sh | 10 +++++++++-
bstrp_functions.sh | 8 +++++---
extensions/systemd/CMakeLists.txt | 2 +-
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/bootstrap.sh b/bootstrap.sh
index 15a887ed5..cd4f9e8b3 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -163,6 +163,12 @@ export OS_MINOR
OS_REVISION=$(echo "$EVR" | cut -d. -f3)
export OS_REVISION
+if [[ "$OSTYPE" =~ .*linux.* ]]; then
+ LINUX=true
+else
+ LINUX=false
+fi
+
### Verify the compiler version
COMPILER_VERSION="0.0.0"
@@ -328,7 +334,9 @@ add_dependency OPC_ENABLED "mbedtls"
add_option AZURE_ENABLED ${TRUE} "ENABLE_AZURE"
-add_option SYSTEMD_ENABLED ${TRUE} "ENABLE_SYSTEMD"
+if $LINUX; then
+ add_option SYSTEMD_ENABLED ${TRUE} "ENABLE_SYSTEMD"
+fi
add_option NANOFI_ENABLED ${FALSE} "ENABLE_NANOFI"
set_dependency PYTHON_ENABLED NANOFI_ENABLED
diff --git a/bstrp_functions.sh b/bstrp_functions.sh
index 778c5dd51..7ce885e60 100755
--- a/bstrp_functions.sh
+++ b/bstrp_functions.sh
@@ -380,7 +380,9 @@ show_supported_features() {
echo "V. SQL Support..................$(print_feature_status SQL_ENABLED)"
echo "W. Openwsman Support ...........$(print_feature_status OPENWSMAN_ENABLED)"
echo "X. Azure Support ...............$(print_feature_status AZURE_ENABLED)"
- echo "Y. Systemd Support .............$(print_feature_status SYSTEMD_ENABLED)"
+ if $LINUX; then
+ echo "Y. Systemd Support .............$(print_feature_status SYSTEMD_ENABLED)"
+ fi
echo "Z. NanoFi Support ..............$(print_feature_status NANOFI_ENABLED)"
echo "AA. Splunk Support .............$(print_feature_status SPLUNK_ENABLED)"
echo "AB. Kubernetes Support .........$(print_feature_status KUBERNETES_ENABLED)"
@@ -430,7 +432,7 @@ read_feature_options(){
ToggleFeature PYTHON_ENABLED
else
echo -e "${RED}Please ensure static linking is enabled for Python Support...${NO_COLOR}" && sleep 2
- fi
+ fi
;;
n) ToggleFeature COAP_ENABLED ;;
o) ToggleFeature SFTP_ENABLED ;;
@@ -440,7 +442,7 @@ read_feature_options(){
v) ToggleFeature SQL_ENABLED ;;
w) ToggleFeature OPENWSMAN_ENABLED ;;
x) ToggleFeature AZURE_ENABLED ;;
- y) ToggleFeature SYSTEMD_ENABLED ;;
+ y) if $LINUX; then ToggleFeature SYSTEMD_ENABLED; fi ;;
z) ToggleFeature NANOFI_ENABLED ;;
aa) ToggleFeature SPLUNK_ENABLED ;;
ab) ToggleFeature KUBERNETES_ENABLED ;;
diff --git a/extensions/systemd/CMakeLists.txt b/extensions/systemd/CMakeLists.txt
index 9c1356569..9a77ee255 100644
--- a/extensions/systemd/CMakeLists.txt
+++ b/extensions/systemd/CMakeLists.txt
@@ -17,7 +17,7 @@
# under the License.
#
-if (NOT ENABLE_SYSTEMD)
+if (NOT ENABLE_SYSTEMD OR NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
return()
endif()