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

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 3d7262a883dff57b7e0999a20f6e745d1197f480
Author: Ferenc Gerlits <[email protected]>
AuthorDate: Mon Apr 15 18:26:44 2024 +0200

    MINIFICPP-2326 Link lua statically
    
    also, fix typo: UCT -> UTC
    this has nothing to do with Lua, but CronTests started failing on my machine
    after some recent upgrade because of this, and the change is too small for a
    Jira/PR of its own
    
    Closes #1756
    
    Signed-off-by: Marton Szasz <[email protected]>
---
 .github/workflows/ci.yml           |  7 +++----
 .github/workflows/gcc13-compat.yml |  2 +-
 LICENSE                            | 22 ++++++++++++++++++++++
 NOTICE                             |  1 +
 README.md                          |  7 -------
 aptitude.sh                        |  2 --
 arch.sh                            |  2 --
 bootstrap/package_manager.py       |  5 +----
 bootstrap/system_dependency.py     |  2 --
 centos.sh                          |  3 ---
 cmake/Lua.cmake                    | 37 +++++++++++++++++++++++++++++++++++++
 darwin.sh                          |  2 --
 debian.sh                          |  2 --
 docker/Dockerfile                  |  4 +---
 docker/bionic/Dockerfile           |  2 +-
 docker/centos/Dockerfile           |  1 -
 docker/fedora/Dockerfile           |  2 +-
 docker/focal/Dockerfile            |  2 +-
 docker/rockylinux/Dockerfile       |  1 -
 extensions/lua/CMakeLists.txt      |  4 ++--
 fedora.sh                          |  2 --
 libminifi/test/unit/CronTests.cpp  |  2 +-
 rheldistro.sh                      |  2 --
 suse.sh                            |  2 --
 24 files changed, 72 insertions(+), 46 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b83e02a32..ffde88297 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -80,7 +80,7 @@ jobs:
         run: |
           # Skip brew update until 
https://github.com/actions/setup-python/issues/577 is fixed
           # brew update
-          HOMEBREW_NO_AUTO_UPDATE=1 brew install ossp-uuid bison flex lua 
ccache sqliteodbc automake autoconf ninja
+          HOMEBREW_NO_AUTO_UPDATE=1 brew install ossp-uuid bison flex ccache 
sqliteodbc automake autoconf ninja
       - id: setup_env
         name: setup enviroment
         run: |
@@ -130,7 +130,6 @@ jobs:
     runs-on: windows-2022
     timeout-minutes: 240
     env:
-      LUA_DIR: D:\a\nifi-minifi-cpp\nifi-minifi-cpp\.lua
       WINDOWS_MINIFI_OPTIONS: >-
         -DCMAKE_BUILD_TYPE=Release
         -DBUILD_ROCKSDB=ON
@@ -160,7 +159,7 @@ jobs:
         -DENABLE_KUBERNETES=ON
         -DENABLE_LIBARCHIVE=ON
         -DENABLE_LIBRDKAFKA=ON
-        -DENABLE_LUA_SCRIPTING=OFF
+        -DENABLE_LUA_SCRIPTING=ON
         -DENABLE_LZMA=ON
         -DENABLE_MQTT=ON
         -DENABLE_NANOFI=ON
@@ -428,7 +427,7 @@ jobs:
           echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | 
sudo tee -a /etc/apt/sources.list
           echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 
main" | sudo tee -a /etc/apt/sources.list
           sudo apt update
-          sudo apt install -y ccache libfl-dev libpcap-dev libusb-1.0-0-dev 
libpng-dev libgps-dev clang-16 clang-tidy-16 libc++-16-dev libc++abi-16-dev 
libc++1-16 libc++abi1-16 libunwind-16 libsqliteodbc lua5.3 liblua5.3-dev flake8 
parallel
+          sudo apt install -y ccache libfl-dev libpcap-dev libusb-1.0-0-dev 
libpng-dev libgps-dev clang-16 clang-tidy-16 libc++-16-dev libc++abi-16-dev 
libc++1-16 libc++abi1-16 libunwind-16 libsqliteodbc flake8 parallel
           echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
           echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
       - id: free_disk_space
diff --git a/.github/workflows/gcc13-compat.yml 
b/.github/workflows/gcc13-compat.yml
index baa06f5b9..ad4855ddb 100644
--- a/.github/workflows/gcc13-compat.yml
+++ b/.github/workflows/gcc13-compat.yml
@@ -22,7 +22,7 @@ jobs:
         run: |
           sudo add-apt-repository ppa:ubuntu-toolchain-r/test
           sudo apt update
-          sudo apt install -y ccache libfl-dev libpcap-dev libboost-all-dev 
openjdk-8-jdk maven libusb-1.0-0-dev libpng-dev libgps-dev libsqliteodbc lua5.3 
liblua5.3-dev flake8 parallel gcc-13 g++-13
+          sudo apt install -y ccache libfl-dev libpcap-dev libboost-all-dev 
openjdk-8-jdk maven libusb-1.0-0-dev libpng-dev libgps-dev libsqliteodbc flake8 
parallel gcc-13 g++-13
           echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
           echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts > /dev/null
       - name: build
diff --git a/LICENSE b/LICENSE
index f8cc77e36..d6d1409b3 100644
--- a/LICENSE
+++ b/LICENSE
@@ -487,6 +487,28 @@ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, 
TORT OR OTHERWISE,
 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 DEALINGS IN THE SOFTWARE.
 
+This product bundles 'Lua' which is available under an MIT license:
+
+Copyright (c) 1994–2023 Lua.org, PUC-Rio.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
 This product bundles 'sol2' which is available under The MIT License.
 
 The MIT License (MIT)
diff --git a/NOTICE b/NOTICE
index c9a1a4428..0bc781e3f 100644
--- a/NOTICE
+++ b/NOTICE
@@ -81,6 +81,7 @@ This software includes third party software subject to the 
following copyrights:
 - protbuf - Copyright 2008 Google Inc.  All rights reserved.
 - RE2 - Copyright (c) 2009 The RE2 Authors. All rights reserved.
 - c-ares - Copyright (c) 1998 Massachusetts Institute of Technology Copyright 
(c) 2007 - 2023 Daniel Stenberg with many contributors, see AUTHORS file.
+- lua - Copyright (c) 1994–2023 Lua.org, PUC-Rio.
 
 The licenses for these third party components are included in LICENSE.txt
 
diff --git a/README.md b/README.md
index 1d005f2c8..49aaf787b 100644
--- a/README.md
+++ b/README.md
@@ -149,7 +149,6 @@ and rebuild.
 * libuuid and uuid-dev
 * openssl
 * Python 3 and development headers -- Required if Python support is enabled
-* Lua and development headers -- Required if Lua support is enabled
 * libgps-dev -- Required if building libGPS support
 * Zlib headers
 * perl -- Required for OpenSSL configuration
@@ -190,7 +189,6 @@ On all distributions please use -DUSE_SHARED_LIBS=OFF to 
statically link zlib, l
 * libarchive (built and statically linked)
 * librdkafka (built and statically linked)
 * Python 3 -- Required if Python support is enabled
-* Lua -- Required if Lua support is enabled
 * libusb -- Optional, unless USB Camera support is enabled
 * libpng -- Optional, unless USB Camera support is enabled
 * libpcap -- Optional, unless ENABLE_PCAP specified
@@ -220,8 +218,6 @@ dnf install cmake \
   zlib-devel
 # (Optional) for building Python support
 dnf install python36-devel
-# (Optional) for building Lua support
-dnf install lua-devel
 # (Optional) for building USB Camera support
 dnf install libusb-devel libpng-devel
 # (Optional) for building docker image
@@ -255,8 +251,6 @@ apt install cmake \
   zlib1g-dev
 # (Optional) for building Python support
 apt install libpython3-dev
-# (Optional) for building Lua support
-apt install liblua5.1-0-dev
 # (Optional) for building USB Camera support
 apt install libusb-1.0.0-0-dev libpng12-dev
 # (Optional) for building docker image
@@ -281,7 +275,6 @@ brew install cmake \
   ossp-uuid \
   openssl \
   python \
-  lua \
   xz \
   bzip2 \
   doxygen \
diff --git a/aptitude.sh b/aptitude.sh
index 388fde05d..0206fe36a 100644
--- a/aptitude.sh
+++ b/aptitude.sh
@@ -92,8 +92,6 @@ build_deps(){
                         INSTALLED+=("openjdk-8-jdk")
                         INSTALLED+=("openjdk-8-source")
                         INSTALLED+=("maven")
-                    elif [ "$FOUND_VALUE" = "lua" ]; then
-                        INSTALLED+=("liblua5.1-0-dev")
                     elif [ "$FOUND_VALUE" = "gpsd" ]; then
                         INSTALLED+=("libgps-dev")
                     elif [ "$FOUND_VALUE" = "libarchive" ]; then
diff --git a/arch.sh b/arch.sh
index 72eca4606..4e94f5cad 100644
--- a/arch.sh
+++ b/arch.sh
@@ -70,8 +70,6 @@ build_deps(){
                     elif [ "$FOUND_VALUE" = "jnibuild" ]; then
                         INSTALLED+=("jdk8-openjdk")
                         INSTALLED+=("maven")
-                    elif [ "$FOUND_VALUE" = "lua" ]; then
-                        INSTALLED+=("lua")
                     elif [ "$FOUND_VALUE" = "gpsd" ]; then
                         INSTALLED+=("gpsd")
                     elif [ "$FOUND_VALUE" = "libarchive" ]; then
diff --git a/bootstrap/package_manager.py b/bootstrap/package_manager.py
index 972d42dc2..b5257c55f 100644
--- a/bootstrap/package_manager.py
+++ b/bootstrap/package_manager.py
@@ -114,7 +114,6 @@ class AptPackageManager(PackageManager):
         return self._install(dependencies=dependencies,
                              install_cmd="sudo apt install -y",
                              replace_dict={"libarchive": {"liblzma-dev"},
-                                           "lua": {"liblua5.1-0-dev"},
                                            "python": {"libpython3-dev"},
                                            "libusb": {"libusb-1.0-0-dev", 
"libusb-dev"},
                                            "libpng": {"libpng-dev"},
@@ -148,7 +147,6 @@ class DnfPackageManager(PackageManager):
                              install_cmd="sudo dnf --enablerepo=crb install -y 
epel-release",
                              replace_dict={"gpsd": {"gpsd-devel"},
                                            "libpcap": {"libpcap-devel"},
-                                           "lua": {"lua-devel"},
                                            "python": {"python3-devel"},
                                            "jni": {"java-1.8.0-openjdk", 
"java-1.8.0-openjdk-devel", "maven"},
                                            "libpng": {"libpng-devel"},
@@ -241,8 +239,7 @@ class ChocolateyPackageManager(PackageManager):
     def install(self, dependencies: Dict[str, Set[str]]) -> bool:
         self._install(dependencies=dependencies,
                       install_cmd="choco install -y",
-                      replace_dict={"lua": set(),
-                                    "python": set(),
+                      replace_dict={"python": set(),
                                     "patch": set(),
                                     "bison": set(),
                                     "flex": set(),
diff --git a/bootstrap/system_dependency.py b/bootstrap/system_dependency.py
index 2271178b6..9e91b6bd3 100644
--- a/bootstrap/system_dependency.py
+++ b/bootstrap/system_dependency.py
@@ -40,8 +40,6 @@ def _create_system_dependencies(minifi_options: 
MinifiOptions) -> Dict[str, Set[
         system_dependencies['automake'] = {'automake'}
         system_dependencies['autoconf'] = {'autoconf'}
         system_dependencies['libtool'] = {'libtool'}
-    if minifi_options.is_enabled("ENABLE_LUA_SCRIPTING"):
-        system_dependencies['lua'] = {'lua'}
     if minifi_options.is_enabled("ENABLE_PYTHON_SCRIPTING"):
         system_dependencies['python'] = {'python'}
     if minifi_options.is_enabled("MINIFI_OPENSSL"):
diff --git a/centos.sh b/centos.sh
index 489326809..ca17f62ff 100644
--- a/centos.sh
+++ b/centos.sh
@@ -100,9 +100,6 @@ build_deps() {
                         INSTALLED+=("maven")
                     elif [ "$FOUND_VALUE" = "python" ]; then
                         INSTALLED+=("python36-devel")
-                    elif [ "$FOUND_VALUE" = "lua" ]; then
-                        INSTALLED+=("lua-libs")
-                        INSTALLED+=("lua-devel")
                     elif [ "$FOUND_VALUE" = "gpsd" ]; then
                         INSTALLED+=("gpsd-devel")
                     elif [ "$FOUND_VALUE" = "libarchive" ]; then
diff --git a/cmake/Lua.cmake b/cmake/Lua.cmake
new file mode 100644
index 000000000..2d38cbcb2
--- /dev/null
+++ b/cmake/Lua.cmake
@@ -0,0 +1,37 @@
+# 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.
+
+include(FetchContent)
+
+FetchContent_Declare(lua
+    URL         "https://www.lua.org/ftp/lua-5.4.6.tar.gz";
+    URL_HASH    
"SHA256=7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88"
+)
+
+FetchContent_GetProperties(lua)
+if(NOT lua_POPULATED)
+    FetchContent_Populate(lua)
+
+    file(GLOB LUA_SOURCES "${lua_SOURCE_DIR}/src/*.c")
+    add_library(lua STATIC ${LUA_SOURCES})
+
+    file(MAKE_DIRECTORY "${lua_BINARY_DIR}/include")
+    foreach(HEADER lua.h luaconf.h lualib.h lauxlib.h lua.hpp)
+        file(COPY "${lua_SOURCE_DIR}/src/${HEADER}" DESTINATION 
"${lua_BINARY_DIR}/include")
+    endforeach()
+    set(LUA_INCLUDE_DIR "${lua_BINARY_DIR}/include" CACHE STRING "" FORCE)
+endif()
diff --git a/darwin.sh b/darwin.sh
index de797a546..0c536cf97 100644
--- a/darwin.sh
+++ b/darwin.sh
@@ -91,8 +91,6 @@ build_deps(){
                         INSTALLED+=("flex")
                     elif [ "$FOUND_VALUE" = "python" ]; then
                         INSTALLED+=("python")
-                    elif [ "$FOUND_VALUE" = "lua" ]; then
-                        INSTALLED+=("lua")
                     elif [ "$FOUND_VALUE" = "jnibuild" ]; then
                         brew cask install java8 > /dev/null 2>&1
                         INSTALLED+=("maven")
diff --git a/debian.sh b/debian.sh
index 412530014..f532e8826 100644
--- a/debian.sh
+++ b/debian.sh
@@ -73,8 +73,6 @@ build_deps(){
             INSTALLED+=("libtool")
           elif [ "$FOUND_VALUE" = "python" ]; then
             INSTALLED+=("libpython3-dev")
-          elif [ "$FOUND_VALUE" = "lua" ]; then
-            INSTALLED+=("liblua5.1-0-dev")
           elif [ "$FOUND_VALUE" = "jnibuild" ]; then
             INSTALLED+=("openjdk-11-jdk")
             INSTALLED+=("openjdk-11-source")
diff --git a/docker/Dockerfile b/docker/Dockerfile
index d4092357f..2148bd8c6 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -57,8 +57,7 @@ RUN apk --no-cache add gcc \
   gpsd-dev \
   python3-dev \
   doxygen \
-  ccache \
-  lua-dev
+  ccache
 
 ENV USER minificpp
 ENV MINIFI_BASE_DIR /opt/minifi
@@ -109,7 +108,6 @@ RUN addgroup -g ${GID} ${USER} && adduser -u ${UID} -D -G 
${USER} -g "" ${USER}
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_JNI=ON"; then apk add 
--no-cache openjdk8-jre-base; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_PCAP=ON"; then apk add 
--no-cache libpcap; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_USB_CAMERA=ON"; then apk add 
--no-cache libpng libusb; fi && \
-    if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_LUA_SCRIPTING=ON"; then apk 
add --no-cache lua; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_PYTHON_SCRIPTING=ON"; then apk 
add --no-cache python3; fi
 
 # Copy built minifi distribution from builder
diff --git a/docker/bionic/Dockerfile b/docker/bionic/Dockerfile
index dc9a33163..ca66810e5 100644
--- a/docker/bionic/Dockerfile
+++ b/docker/bionic/Dockerfile
@@ -33,7 +33,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
 
 RUN apt-get update \
     && DEBIAN_FRONTEND="noninteractive" apt-get install -y openjdk-8-jdk 
openjdk-8-source sudo git maven autogen autoconf automake pkgconf libtool 
libfl-dev libusb-1.0-0-dev \
-    libpng-dev libgps-dev libsqliteodbc liblua5.3-dev \
+    libpng-dev libgps-dev libsqliteodbc \
     && mkdir -p $MINIFI_BASE_DIR
 COPY . ${MINIFI_BASE_DIR}
 
diff --git a/docker/centos/Dockerfile b/docker/centos/Dockerfile
index d76be55b1..3bdd1f2e1 100644
--- a/docker/centos/Dockerfile
+++ b/docker/centos/Dockerfile
@@ -48,7 +48,6 @@ RUN ulimit -n 1024000 && yum -y install epel-release && yum 
-y install sudo git
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_JNI=ON"; then yum -y install 
java-1.8.0-openjdk maven; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_PCAP=ON"; then yum -y install 
libpcap-devel; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_USB_CAMERA=ON"; then yum -y 
install libpng-devel libusbx-devel; fi && \
-    if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_LUA_SCRIPTING=ON"; then yum -y 
install lua-devel; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_PYTHON_SCRIPTING=ON"; then yum 
-y install python36-devel; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_SFTP=ON" && [ 
"${DOCKER_SKIP_TESTS}" == "OFF" ]; then yum -y install java-1.8.0-openjdk 
maven; fi
 
diff --git a/docker/fedora/Dockerfile b/docker/fedora/Dockerfile
index 5821ccbdc..cd62a492e 100644
--- a/docker/fedora/Dockerfile
+++ b/docker/fedora/Dockerfile
@@ -33,7 +33,7 @@ ENV MINIFI_HOME 
$MINIFI_BASE_DIR/nifi-minifi-cpp-$MINIFI_VERSION
 RUN echo "fastestmirror=True" | tee -a /etc/dnf/dnf.conf
 RUN for iter in {1..10}; do yum update -y && \
     yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel flex bison make 
patch sudo git which maven libtool autoconf automake java-1.8.0-openjdk 
java-1.8.0-openjdk-devel sudo \
-    git which maven make libarchive lua-devel libusb-devel libpng-devel 
gpsd-devel libpcap-devel perl && \
+    git which maven make libarchive libusb-devel libpng-devel gpsd-devel 
libpcap-devel perl && \
     yum clean all && exit_code=0 && break || exit_code=$? && echo "yum error: 
retry $iter in 10s" && sleep 10; done; \
     (exit $exit_code)
 
diff --git a/docker/focal/Dockerfile b/docker/focal/Dockerfile
index 6eab97b31..1db4cc21f 100644
--- a/docker/focal/Dockerfile
+++ b/docker/focal/Dockerfile
@@ -33,7 +33,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
 
 RUN apt update \
     && DEBIAN_FRONTEND="noninteractive" apt install -y openjdk-8-jdk 
openjdk-8-source python3.9-dev sudo git maven autogen autoconf automake cmake 
software-properties-common pkgconf libtool \
-    libfl-dev libusb-1.0-0-dev libpng-dev libgps-dev libsqliteodbc 
liblua5.3-dev\
+    libfl-dev libusb-1.0-0-dev libpng-dev libgps-dev libsqliteodbc \
     && mkdir -p "${MINIFI_BASE_DIR}"
 
 COPY . ${MINIFI_BASE_DIR}
diff --git a/docker/rockylinux/Dockerfile b/docker/rockylinux/Dockerfile
index a88e335ae..a6504d841 100644
--- a/docker/rockylinux/Dockerfile
+++ b/docker/rockylinux/Dockerfile
@@ -45,7 +45,6 @@ RUN dnf -y install epel-release && dnf -y install sudo git 
which make libarchive
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_JNI=ON"; then dnf -y install 
java-1.8.0-openjdk maven; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_PCAP=ON"; then dnf -y install 
libpcap-devel; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_USB_CAMERA=ON"; then dnf -y 
install libpng-devel libusbx-devel; fi && \
-    if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_LUA_SCRIPTING=ON"; then dnf -y 
--enablerepo=powertools install lua-devel; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_PYTHON_SCRIPTING=ON"; then dnf 
-y install python3-devel; fi && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_SFTP=ON" && [ 
"${DOCKER_SKIP_TESTS}" == "OFF" ]; then dnf -y install java-1.8.0-openjdk 
maven; fi
 
diff --git a/extensions/lua/CMakeLists.txt b/extensions/lua/CMakeLists.txt
index f4175db7e..ed0766e9b 100644
--- a/extensions/lua/CMakeLists.txt
+++ b/extensions/lua/CMakeLists.txt
@@ -21,6 +21,7 @@ if (NOT (ENABLE_ALL OR ENABLE_LUA_SCRIPTING))
     return()
 endif()
 
+include(Lua)
 include(Sol2)
 
 include(${CMAKE_SOURCE_DIR}/extensions/ExtensionHeader.txt)
@@ -33,12 +34,11 @@ target_link_libraries(minifi-lua-script-extension PRIVATE 
${LIBMINIFI} Threads::
 
 SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
 SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION ASC)
-find_package(Lua 5.1 REQUIRED)
 
 target_include_directories(minifi-lua-script-extension PRIVATE lua)
 target_include_directories(minifi-lua-script-extension PUBLIC 
${LUA_INCLUDE_DIR})
 
-target_link_libraries(minifi-lua-script-extension PUBLIC ${LUA_LIBRARIES} sol2)
+target_link_libraries(minifi-lua-script-extension PUBLIC lua sol2)
 target_compile_features(minifi-lua-script-extension PUBLIC cxx_std_14)
 
 register_extension(minifi-lua-script-extension "LUA SCRIPTING EXTENSIONS" 
LUA-SCRIPTING-EXTENSIONS "This enables LUA scripting" "extensions/lua/tests")
diff --git a/fedora.sh b/fedora.sh
index 2ba5fc4c0..7eaf4de94 100644
--- a/fedora.sh
+++ b/fedora.sh
@@ -68,8 +68,6 @@ build_deps(){
                         INSTALLED+=("maven")
                     elif [ "$FOUND_VALUE" = "python" ]; then
                         INSTALLED+=("python3-devel")
-                    elif [ "$FOUND_VALUE" = "lua" ]; then
-                        INSTALLED+=("lua-devel")
                     elif [ "$FOUND_VALUE" = "libtool" ]; then
                         INSTALLED+=("libtool")
                     elif [ "$FOUND_VALUE" = "autoconf" ]; then
diff --git a/libminifi/test/unit/CronTests.cpp 
b/libminifi/test/unit/CronTests.cpp
index 3b7c6118a..ade38b86e 100644
--- a/libminifi/test/unit/CronTests.cpp
+++ b/libminifi/test/unit/CronTests.cpp
@@ -421,7 +421,7 @@ TEST_CASE("Cron::calculateNextTrigger with timezones", 
"[cron]") {
   date::set_install(TZ_DATA_DIR);
 #endif
 
-  const std::vector<std::string> time_zones{ "Europe/Berlin", "Asia/Seoul", 
"America/Los_Angeles", "Asia/Singapore", "UCT" };
+  const std::vector<std::string> time_zones{ "Europe/Berlin", "Asia/Seoul", 
"America/Los_Angeles", "Asia/Singapore", "UTC" };
 
   for (const auto& time_zone: time_zones) {
     checkNext("0/15 * 1-4 * * ?",
diff --git a/rheldistro.sh b/rheldistro.sh
index fd0df52c1..7414e3a20 100644
--- a/rheldistro.sh
+++ b/rheldistro.sh
@@ -111,8 +111,6 @@ build_deps(){
             INSTALLED+=("libtool")
           elif [ "$FOUND_VALUE" = "python" ]; then
             INSTALLED+=("python34-devel")
-          elif [ "$FOUND_VALUE" = "lua" ]; then
-            INSTALLED+=("lua-devel")
           elif [ "$FOUND_VALUE" = "gpsd" ]; then
             INSTALLED+=("gpsd-devel")
           elif [ "$FOUND_VALUE" = "libarchive" ]; then
diff --git a/suse.sh b/suse.sh
index 71a0a0414..c1ea7b081 100644
--- a/suse.sh
+++ b/suse.sh
@@ -97,8 +97,6 @@ build_deps(){
             INSTALLED+=("libtool")
           elif [ "$FOUND_VALUE" = "python" ]; then
             INSTALLED+=("python3-devel")
-          elif [ "$FOUND_VALUE" = "lua" ]; then
-            INSTALLED+=("lua-devel")
           elif [ "$FOUND_VALUE" = "gpsd" ]; then
             INSTALLED+=("gpsd-devel")
           elif [ "$FOUND_VALUE" = "libarchive" ]; then

Reply via email to