You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2025/09/08 15:29:39 UTC

(nifi-minifi-cpp) branch main updated (35f98753d -> 68c27b98c)

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

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


    from 35f98753d MINIFICPP-2619 Fix deadlock of ThreadPool shutdown
     new fd0eacbd3 MINIFICPP-2584 Linux Filesystem Hierarchy Standard support, RPM package
     new f65f14543 MINIFICPP-2589 Refactor ConsumeWindowsEventLog
     new 434646feb MINIFICPP-2622 Replace Bitnami Kafka image with Apache in tests
     new 1121e3e34 MINIFICPP-2623 - Use same compiler
     new 54000432a MINIFICPP-2620 DatabaseContentRepository should be the default
     new 68c27b98c MINIFICPP-2600 Change RecordSetReader interface

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/verify-package.yml               |  21 +-
 .gitignore                                         |   2 +-
 CMakeLists.txt                                     | 140 +++++++----
 CONFIGURE.md                                       |  72 ++++--
 OPS.md                                             |  26 +-
 bin/CMakeLists.txt                                 |  69 ++++++
 bin/{minifi.service => minifi.service.in}          |   4 +-
 cmake/BundledOpenSSL.cmake                         |  31 ++-
 cmake/DockerConfig.cmake                           |  15 +-
 cmake/Extensions.cmake                             |  12 +-
 cmake/MiNiFiOptions.cmake                          |   1 +
 cmake/VerifyPackageWithDocker.cmake                |   4 +
 conanfile.py                                       |   2 +-
 conf/CMakeLists.txt                                |  89 +++++++
 conf/{config.yml => config.yml.in}                 |   0
 ...ifi-log.properties => minifi-log.properties.in} |   2 +-
 ...ifi-uid.properties => minifi-uid.properties.in} |   0
 conf/{minifi.properties => minifi.properties.in}   |  16 +-
 controller/CMakeLists.txt                          |  24 +-
 controller/MiNiFiController.cpp                    |  19 +-
 core-framework/include/Defaults.h                  |  32 +++
 core-framework/include/core/ProcessContext.h       |   9 -
 core-framework/include/utils/Environment.h         |   2 +-
 core-framework/include/utils/Locations.h           |  43 ++++
 .../src/utils/crypto/EncryptionManager.cpp         |   6 +-
 deploy.sh                                          |   2 +-
 docker/DockerBuild.sh                              |   3 +-
 docker/DockerVerify.sh                             |   2 +-
 .../installed.Dockerfile                           |   0
 .../installed.dockerignore                         |   0
 .../rpm.Dockerfile}                                |  16 +-
 docker/rockylinux/Dockerfile                       |  19 +-
 docker/test/integration/cluster/ContainerStore.py  |   3 +
 .../test/integration/cluster/DockerTestCluster.py  |   5 +-
 docker/test/integration/cluster/ImageStore.py      |  70 +++---
 .../cluster/MinifiControllerExecutor.py            |  23 +-
 .../integration/cluster/checkers/KafkaHelper.py    |   8 +-
 .../cluster/containers/KafkaBrokerContainer.py     |  68 ++---
 .../containers/MinifiAsPodInKubernetesCluster.py   |   2 +-
 .../cluster/containers/MinifiContainer.py          |  51 +++-
 .../features/MiNiFi_integration_test_driver.py     |   3 +
 docker/test/integration/features/couchbase.feature |  16 +-
 docker/test/integration/features/environment.py    |   3 +
 .../test/integration/features/kubernetes.feature   |   1 +
 docker/test/integration/features/steps/steps.py    |   2 +-
 .../kubernetes/minifi-conf/minifi.properties       |  10 +
 .../integration/resources/minifi/minifi.properties |   7 -
 encrypt-config/CMakeLists.txt                      |  22 +-
 encrypt-config/EncryptConfig.cpp                   |   6 +-
 encrypt-config/FlowConfigEncryptor.cpp             |  13 +-
 .../tests/ExpressionLanguageTests.cpp              |  10 +-
 extensions/python/CMakeLists.txt                   |  22 +-
 extensions/python/PythonCreator.h                  |  40 +--
 .../utils/dependency_installer.py                  |   1 +
 extensions/python/tests/PythonManifestTests.cpp    |   8 +-
 extensions/python/types/PyRecordSetReader.cpp      |   7 +-
 .../rocksdb-repos/DatabaseContentRepository.cpp    |  19 +-
 extensions/rocksdb-repos/FlowFileRepository.cpp    |  13 +-
 .../controllers/RocksDbStateStorage.cpp            |  13 +-
 .../rocksdb-repos/tests/ContentSessionTests.cpp    |   7 +-
 .../tests/DBContentRepositoryTests.cpp             |  12 -
 extensions/rocksdb-repos/tests/EncryptionTests.cpp |   1 -
 extensions/rocksdb-repos/tests/RepoTests.cpp       |  19 --
 extensions/rocksdb-repos/tests/SwapTests.cpp       |   1 -
 extensions/sftp/tests/ListSFTPTests.cpp            |   8 +-
 .../controllers/JsonTreeReader.cpp                 |  12 +-
 .../controllers/JsonTreeReader.h                   |   4 +-
 .../standard-processors/processors/SplitRecord.cpp |   6 +-
 .../tests/unit/TailFileTests.cpp                   |  13 +-
 .../windows-event-log/ConsumeWindowsEventLog.cpp   | 275 ++++++++++-----------
 .../windows-event-log/ConsumeWindowsEventLog.h     |  59 ++---
 .../windows-event-log/tests/BookmarkTests.cpp      |  11 +-
 extensions/windows-event-log/tests/CMakeLists.txt  |   2 +-
 .../tests/ConsumeWindowsEventLogTests.cpp          |   2 +-
 .../tests/MetadataWalkerTests.cpp                  | 130 +++++-----
 .../tests/StringSplitterTests.cpp                  |  45 ++++
 .../windows-event-log/tests/WindowsErrorTests.cpp  |  33 +--
 .../windows-event-log/{ => wel}/Bookmark.cpp       |  29 +--
 extensions/windows-event-log/{ => wel}/Bookmark.h  |  15 +-
 extensions/windows-event-log/wel/EventPath.h       |   2 +-
 .../windows-event-log/wel/MetadataWalker.cpp       |  60 +++--
 extensions/windows-event-log/wel/MetadataWalker.h  |  21 +-
 extensions/windows-event-log/wel/StringSplitter.h  |  56 +++++
 extensions/windows-event-log/wel/UniqueEvtHandle.h |  15 +-
 .../wel/{LookupCacher.cpp => WindowsError.h}       |  31 ++-
 .../windows-event-log/wel/WindowsEventLog.cpp      |  28 +--
 extensions/windows-event-log/wel/WindowsEventLog.h |  77 ++----
 fips/openssl.cnf                                   |   2 +-
 generateVersion.bat                                |   2 +-
 generateVersion.sh                                 |   2 +-
 libminifi/CMakeLists.txt                           |  10 +-
 libminifi/include/Defaults.h                       |  25 --
 libminifi/include/core/logging/LoggerProperties.h  |   8 +-
 libminifi/include/properties/Properties.h          |  15 --
 libminifi/src/core/ProcessContext.cpp              |   8 +-
 libminifi/src/core/extension/ExtensionManager.cpp  |  18 +-
 libminifi/src/core/flow/AdaptiveConfiguration.cpp  |   6 +-
 libminifi/src/core/logging/LoggerConfiguration.cpp |  10 +-
 .../src/core/repository/FileSystemRepository.cpp   |   9 +-
 libminifi/src/properties/Properties.cpp            |   8 +-
 libminifi/src/utils/file/AssetManager.cpp          |  17 +-
 libminifi/test/integration/AlertTests.cpp          |   3 +-
 libminifi/test/integration/C2AssetSyncTest.cpp     |  14 +-
 libminifi/test/integration/C2DebugBundleTest.cpp   |   3 +-
 .../test/integration/C2DescribeManifestTest.cpp    |   2 +-
 .../test/integration/C2PropertiesUpdateTests.cpp   |   8 +-
 libminifi/test/integration/C2UpdateAssetTest.cpp   |   5 +
 libminifi/test/libtest/unit/Catch.h                |   1 +
 libminifi/test/libtest/unit/RecordSetTesters.h     |  11 +-
 libminifi/test/libtest/unit/TestBase.cpp           |  13 +-
 .../test/libtest/unit/TestControllerWithFlow.cpp   |   1 -
 libminifi/test/libtest/unit/TestUtils.h            |  10 +-
 .../test/persistence-tests/PersistenceTests.cpp    |   2 -
 libminifi/test/unit/DecryptorTests.cpp             |   3 +-
 libminifi/test/unit/LogMetricsPublisherTests.cpp   |   1 -
 libminifi/test/unit/LoggerConfigurationTests.cpp   |   2 +-
 libminifi/test/unit/LoggerTests.cpp                |  20 +-
 libminifi/test/unit/ProcessSessionTests.cpp        |   1 -
 .../performance/VolatileRepositoryPerfTests.cpp    |   2 +-
 .../minifi-cpp/controllers/RecordSetReader.h       |   5 +-
 .../include/minifi-cpp/core/ProcessContext.h       |   2 -
 .../include/minifi-cpp/properties/Configure.h      |   3 +-
 .../include/minifi-cpp/properties/Properties.h     |   2 -
 minifi_main/CMakeLists.txt                         |  16 +-
 minifi_main/Fips.cpp                               |  63 ++---
 minifi_main/Fips.h                                 |   4 +-
 minifi_main/MainHelper.cpp                         |  75 ++++--
 minifi_main/MainHelper.h                           |  52 ++--
 minifi_main/MiNiFiMain.cpp                         |  94 ++++---
 minifi_main/MiNiFiWindowsService.cpp               |   2 +-
 .../FindLibSSH2.cmake => packaging/CMakeLists.txt  |   9 +-
 {msi => packaging/msi}/MergeModulesFeature.xml     |   0
 .../msi}/VSRedistributablesComponent.xml           |   0
 .../msi}/VSRedistributablesFeature.xml             |   0
 {msi => packaging/msi}/WixWin.wsi.in               |   0
 {msi => packaging/msi}/bgr.png                     | Bin
 {msi => packaging/msi}/minifi-logo-ico.ico         | Bin
 {msi => packaging/msi}/minifi-logo-png-banner.png  | Bin
 {msi => packaging/msi}/x64.wsi                     |   0
 {msi => packaging/msi}/x86.wsi                     |   0
 packaging/rpm/check_rpm_contents.sh                |  43 ++++
 packaging/rpm/expected-rpm-contents.in             |  67 +++++
 packaging/rpm/pre_install.sh                       |  11 +
 .../google-cloud-cpp/remove_installation.patch     | 258 +++++++++++++++++++
 .../0003-remove_FindLZ4_installation.patch         |  22 ++
 145 files changed, 1975 insertions(+), 1098 deletions(-)
 create mode 100644 bin/CMakeLists.txt
 rename bin/{minifi.service => minifi.service.in} (75%)
 create mode 100644 conf/CMakeLists.txt
 rename conf/{config.yml => config.yml.in} (100%)
 rename conf/{minifi-log.properties => minifi-log.properties.in} (98%)
 rename conf/{minifi-uid.properties => minifi-uid.properties.in} (100%)
 rename conf/{minifi.properties => minifi.properties.in} (93%)
 create mode 100644 core-framework/include/Defaults.h
 create mode 100644 core-framework/include/utils/Locations.h
 copy docker/{python-verify => installed}/installed.Dockerfile (100%)
 rename docker/{python-verify => installed}/installed.dockerignore (100%)
 rename docker/{python-verify/installed.Dockerfile => installed/rpm.Dockerfile} (66%)
 create mode 100644 docker/test/integration/resources/kubernetes/minifi-conf/minifi.properties
 create mode 100644 extensions/windows-event-log/tests/StringSplitterTests.cpp
 copy libminifi/test/unit/SpanTests.cpp => extensions/windows-event-log/tests/WindowsErrorTests.cpp (51%)
 rename extensions/windows-event-log/{ => wel}/Bookmark.cpp (87%)
 rename extensions/windows-event-log/{ => wel}/Bookmark.h (85%)
 create mode 100644 extensions/windows-event-log/wel/StringSplitter.h
 copy extensions/windows-event-log/wel/{LookupCacher.cpp => WindowsError.h} (63%)
 delete mode 100644 libminifi/include/Defaults.h
 copy cmake/libssh2/dummy/FindLibSSH2.cmake => packaging/CMakeLists.txt (77%)
 rename {msi => packaging/msi}/MergeModulesFeature.xml (100%)
 rename {msi => packaging/msi}/VSRedistributablesComponent.xml (100%)
 rename {msi => packaging/msi}/VSRedistributablesFeature.xml (100%)
 rename {msi => packaging/msi}/WixWin.wsi.in (100%)
 rename {msi => packaging/msi}/bgr.png (100%)
 rename {msi => packaging/msi}/minifi-logo-ico.ico (100%)
 rename {msi => packaging/msi}/minifi-logo-png-banner.png (100%)
 rename {msi => packaging/msi}/x64.wsi (100%)
 rename {msi => packaging/msi}/x86.wsi (100%)
 create mode 100755 packaging/rpm/check_rpm_contents.sh
 create mode 100644 packaging/rpm/expected-rpm-contents.in
 create mode 100644 packaging/rpm/pre_install.sh
 create mode 100644 thirdparty/google-cloud-cpp/remove_installation.patch
 create mode 100644 thirdparty/librdkafka/0003-remove_FindLZ4_installation.patch


(nifi-minifi-cpp) 06/06: MINIFICPP-2600 Change RecordSetReader interface

Posted by sz...@apache.org.
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 68c27b98ce6d007c2a582288e3d3121cee98f045
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Mon Sep 8 16:59:20 2025 +0200

    MINIFICPP-2600 Change RecordSetReader interface
    
    Closes #1999
    
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 extensions/python/types/PyRecordSetReader.cpp                |  7 ++++++-
 .../standard-processors/controllers/JsonTreeReader.cpp       | 12 ++++++------
 extensions/standard-processors/controllers/JsonTreeReader.h  |  4 +---
 extensions/standard-processors/processors/SplitRecord.cpp    |  6 +++++-
 libminifi/test/libtest/unit/RecordSetTesters.h               | 11 +++--------
 minifi-api/include/minifi-cpp/controllers/RecordSetReader.h  |  5 ++---
 6 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/extensions/python/types/PyRecordSetReader.cpp b/extensions/python/types/PyRecordSetReader.cpp
index d36f6a11f..f168aa68a 100644
--- a/extensions/python/types/PyRecordSetReader.cpp
+++ b/extensions/python/types/PyRecordSetReader.cpp
@@ -86,7 +86,12 @@ PyObject* PyRecordSetReader::read(PyRecordSetReader* self, PyObject* args) {
     return nullptr;
   }
 
-  auto read_result = record_set_reader->read(flow_file, process_session->getSession());
+  nonstd::expected<core::RecordSet, std::error_code> read_result;
+  process_session->getSession().read(flow_file, [&record_set_reader, &read_result](const std::shared_ptr<io::InputStream>& input_stream) {
+    read_result = record_set_reader->read(*input_stream);
+    return gsl::narrow<int64_t>(input_stream->size());
+  });
+
   if  (!read_result) {
     std::string error_message = "failed to read record set with the following error: " + read_result.error().message();
     PyErr_SetString(PyExc_RuntimeError, error_message.c_str());
diff --git a/extensions/standard-processors/controllers/JsonTreeReader.cpp b/extensions/standard-processors/controllers/JsonTreeReader.cpp
index 1031a5a62..40bfe9f7d 100644
--- a/extensions/standard-processors/controllers/JsonTreeReader.cpp
+++ b/extensions/standard-processors/controllers/JsonTreeReader.cpp
@@ -113,14 +113,14 @@ bool readAsArray(const std::string& content, core::RecordSet& record_set) {
   return true;
 }
 
-nonstd::expected<core::RecordSet, std::error_code> JsonTreeReader::read(const std::shared_ptr<core::FlowFile>& flow_file, core::ProcessSession& session) {
+nonstd::expected<core::RecordSet, std::error_code> JsonTreeReader::read(io::InputStream& input_stream) {
   core::RecordSet record_set{};
-  const auto read_result = session.read(flow_file, [&record_set](const std::shared_ptr<io::InputStream>& input_stream) -> int64_t {
+  const auto read_result = [&record_set](io::InputStream& input_stream) -> size_t {
     std::string content;
-    content.resize(input_stream->size());
-    const auto read_ret = gsl::narrow<int64_t>(input_stream->read(as_writable_bytes(std::span(content))));
+    content.resize(input_stream.size());
+    const auto read_ret = input_stream.read(as_writable_bytes(std::span(content)));
     if (io::isError(read_ret)) {
-      return -1;
+      return io::STREAM_ERROR;
     }
     if (content.starts_with('[')) {
       readAsArray(content, record_set);
@@ -128,7 +128,7 @@ nonstd::expected<core::RecordSet, std::error_code> JsonTreeReader::read(const st
       readAsJsonLines(content, record_set);
     }
     return read_ret;
-  });
+  }(input_stream);
   if (io::isError(read_result))
     return nonstd::make_unexpected(std::make_error_code(std::errc::invalid_argument));
   return record_set;
diff --git a/extensions/standard-processors/controllers/JsonTreeReader.h b/extensions/standard-processors/controllers/JsonTreeReader.h
index 58e8f1407..dc9e9540a 100644
--- a/extensions/standard-processors/controllers/JsonTreeReader.h
+++ b/extensions/standard-processors/controllers/JsonTreeReader.h
@@ -17,8 +17,6 @@
 #pragma once
 
 #include "controllers/RecordSetReader.h"
-#include "core/FlowFile.h"
-#include "core/ProcessSession.h"
 
 namespace org::apache::nifi::minifi::standard {
 
@@ -46,7 +44,7 @@ class JsonTreeReader final : public core::RecordSetReaderImpl {
   EXTENSIONAPI static constexpr auto ImplementsApis = std::array{ RecordSetReader::ProvidesApi };
   ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES
 
-  nonstd::expected<core::RecordSet, std::error_code> read(const std::shared_ptr<core::FlowFile>& flow_file, core::ProcessSession& session) override;
+  nonstd::expected<core::RecordSet, std::error_code> read(io::InputStream& input_stream) override;
 
   void initialize() override {
     setSupportedProperties(Properties);
diff --git a/extensions/standard-processors/processors/SplitRecord.cpp b/extensions/standard-processors/processors/SplitRecord.cpp
index 52016653b..5cc4f3153 100644
--- a/extensions/standard-processors/processors/SplitRecord.cpp
+++ b/extensions/standard-processors/processors/SplitRecord.cpp
@@ -49,7 +49,11 @@ void SplitRecord::onTrigger(core::ProcessContext& context, core::ProcessSession&
     return;
   }
 
-  auto record_set = record_set_reader_->read(original_flow_file, session);
+  nonstd::expected<core::RecordSet, std::error_code> record_set;
+  session.read(original_flow_file, [this, &record_set](const std::shared_ptr<io::InputStream>& input_stream) {
+    record_set = record_set_reader_->read(*input_stream);
+    return gsl::narrow<int64_t>(input_stream->size());
+  });
   if (!record_set) {
     logger_->log_error("Failed to read record set from flow file: {}", record_set.error().message());
     session.transfer(original_flow_file, Failure);
diff --git a/libminifi/test/libtest/unit/RecordSetTesters.h b/libminifi/test/libtest/unit/RecordSetTesters.h
index 56f64df4b..36bc18de9 100644
--- a/libminifi/test/libtest/unit/RecordSetTesters.h
+++ b/libminifi/test/libtest/unit/RecordSetTesters.h
@@ -62,15 +62,10 @@ bool testRecordWriter(RecordSetWriter& record_set_writer, const RecordSet& recor
 }
 
 inline bool testRecordReader(RecordSetReader& record_set_reader, const std::string_view serialized_record_set, const RecordSet& expected_record_set) {
-  const RecordSetFixture fixture;
-  ProcessSession& process_session = fixture.processSession();
-
-  const auto flow_file = process_session.create();
-  process_session.writeBuffer(flow_file, serialized_record_set);
-  process_session.transfer(flow_file, fixture.getRelationship());
-  process_session.commit();
+  io::BufferStream buffer_stream;
+  buffer_stream.write(as_bytes(std::span(serialized_record_set)));
 
-  const auto record_set = record_set_reader.read(flow_file, process_session);
+  const auto record_set = record_set_reader.read(buffer_stream);
   if (!record_set)
     return false;
 
diff --git a/minifi-api/include/minifi-cpp/controllers/RecordSetReader.h b/minifi-api/include/minifi-cpp/controllers/RecordSetReader.h
index e5d207da2..b60563106 100644
--- a/minifi-api/include/minifi-cpp/controllers/RecordSetReader.h
+++ b/minifi-api/include/minifi-cpp/controllers/RecordSetReader.h
@@ -19,11 +19,10 @@
 
 #include "core/controller/ControllerService.h"
 
-#include "minifi-cpp/core/FlowFile.h"
-#include "minifi-cpp/core/ProcessSession.h"
 #include "minifi-cpp/core/Record.h"
 #include "utils/Enum.h"
 #include "utils/ProcessorConfigUtils.h"
+#include "minifi-cpp/io/InputStream.h"
 
 
 namespace org::apache::nifi::minifi::core {
@@ -36,7 +35,7 @@ class RecordSetReader : public virtual controller::ControllerService {
     .type = "org.apache.nifi.minifi.core.RecordSetReader",
   };
 
-  virtual nonstd::expected<RecordSet, std::error_code> read(const std::shared_ptr<FlowFile>& flow_file, ProcessSession& session) = 0;
+  virtual nonstd::expected<RecordSet, std::error_code> read(io::InputStream& input_stream) = 0;
 };
 
 }  // namespace org::apache::nifi::minifi::core


(nifi-minifi-cpp) 04/06: MINIFICPP-2623 - Use same compiler

Posted by sz...@apache.org.
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 1121e3e34baaefe44cad236dbf0b43a63e71293d
Author: Adam Debreceni <ad...@apache.org>
AuthorDate: Mon Sep 8 15:36:06 2025 +0200

    MINIFICPP-2623 - Use same compiler
    
    Closes #2024
    
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 cmake/BundledOpenSSL.cmake | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/BundledOpenSSL.cmake b/cmake/BundledOpenSSL.cmake
index ea7e71c6b..55bdf29cd 100644
--- a/cmake/BundledOpenSSL.cmake
+++ b/cmake/BundledOpenSSL.cmake
@@ -106,7 +106,7 @@ function(use_openssl SOURCE_DIR BINARY_DIR)
                 URL_HASH "SHA256=712590fd20aaa60ec75d778fe5b810d6b829ca7fb1e530577917a131f9105539"
                 SOURCE_DIR "${BINARY_DIR}/thirdparty/openssl-src"
                 BUILD_IN_SOURCE true
-                CONFIGURE_COMMAND perl Configure "CFLAGS=${PASSTHROUGH_CMAKE_C_FLAGS} ${OPENSSL_WINDOWS_COMPILE_FLAGS}" "CXXFLAGS=${PASSTHROUGH_CMAKE_CXX_FLAGS} ${OPENSSL_WINDOWS_COMPILE_FLAGS}" ${OPENSSL_SHARED_FLAG} ${OPENSSL_EXTRA_FLAGS} "--prefix=${OPENSSL_BIN_DIR}" "--openssldir=${OPENSSL_BIN_DIR}"
+                CONFIGURE_COMMAND perl Configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "CFLAGS=${PASSTHROUGH_CMAKE_C_FLAGS} ${OPENSSL_WINDOWS_COMPILE_FLAGS}" "CXXFLAGS=${PASSTHROUGH_CMAKE_CXX_FLAGS} ${OPENSSL_WINDOWS_COMPILE_FLAGS}" ${OPENSSL_SHARED_FLAG} ${OPENSSL_EXTRA_FLAGS} "--prefix=${OPENSSL_BIN_DIR}" "--openssldir=${OPENSSL_BIN_DIR}"
                 BUILD_BYPRODUCTS ${OPENSSL_LIBRARIES_LIST}
                 EXCLUDE_FROM_ALL TRUE
                 BUILD_COMMAND ${OPENSSL_BUILD_COMMAND}
@@ -121,7 +121,7 @@ function(use_openssl SOURCE_DIR BINARY_DIR)
                 URL_HASH "SHA256=712590fd20aaa60ec75d778fe5b810d6b829ca7fb1e530577917a131f9105539"
                 SOURCE_DIR "${BINARY_DIR}/thirdparty/openssl-src"
                 BUILD_IN_SOURCE true
-                CONFIGURE_COMMAND ./Configure "CFLAGS=${PASSTHROUGH_CMAKE_C_FLAGS} -fPIC" "CXXFLAGS=${PASSTHROUGH_CMAKE_CXX_FLAGS} -fPIC" ${OPENSSL_SHARED_FLAG} ${OPENSSL_EXTRA_FLAGS} "--prefix=${OPENSSL_BIN_DIR}" "--openssldir=${OPENSSL_BIN_DIR}"
+                CONFIGURE_COMMAND ./Configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "CFLAGS=${PASSTHROUGH_CMAKE_C_FLAGS} -fPIC" "CXXFLAGS=${PASSTHROUGH_CMAKE_CXX_FLAGS} -fPIC" ${OPENSSL_SHARED_FLAG} ${OPENSSL_EXTRA_FLAGS} "--prefix=${OPENSSL_BIN_DIR}" "--openssldir=${OPENSSL_BIN_DIR}"
                 BUILD_BYPRODUCTS ${OPENSSL_LIBRARIES_LIST}
                 EXCLUDE_FROM_ALL TRUE
                 DOWNLOAD_NO_PROGRESS TRUE
@@ -238,7 +238,7 @@ function(use_openssl SOURCE_DIR BINARY_DIR)
                 URL_HASH "SHA256=eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90"
                 SOURCE_DIR "${BINARY_DIR}/thirdparty/openssl-fips-src"
                 BUILD_IN_SOURCE true
-                CONFIGURE_COMMAND perl Configure "CFLAGS=${PASSTHROUGH_CMAKE_C_FLAGS} ${OPENSSL_WINDOWS_COMPILE_FLAGS}" "CXXFLAGS=${PASSTHROUGH_CMAKE_CXX_FLAGS} ${OPENSSL_WINDOWS_COMPILE_FLAGS}" ${OPENSSL_SHARED_FLAG} ${OPENSSL_FIPS_EXTRA_FLAGS} enable-fips "--prefix=${OPENSSL_FIPS_BIN_DIR}" "--openssldir=${OPENSSL_FIPS_BIN_DIR}"
+                CONFIGURE_COMMAND perl Configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "CFLAGS=${PASSTHROUGH_CMAKE_C_FLAGS} ${OPENSSL_WINDOWS_COMPILE_FLAGS}" "CXXFLAGS=${PASSTHROUGH_CMAKE_CXX_FLAGS} ${OPENSSL_WINDOWS_COMPILE_FLAGS}" ${OPENSSL_SHARED_FLAG} ${OPENSSL_FIPS_EXTRA_FLAGS} enable-fips "--prefix=${OPENSSL_FIPS_BIN_DIR}" "--openssldir=${OPENSSL_FIPS_BIN_DIR}"
                 BUILD_BYPRODUCTS ${OPENSSL_FIPS_FILE_LIST}
                 EXCLUDE_FROM_ALL TRUE
                 BUILD_COMMAND ${OPENSSL_BUILD_COMMAND}
@@ -251,7 +251,7 @@ function(use_openssl SOURCE_DIR BINARY_DIR)
                 URL_HASH "SHA256=eb1ab04781474360f77c318ab89d8c5a03abc38e63d65a603cabbf1b00a1dc90"
                 SOURCE_DIR "${BINARY_DIR}/thirdparty/openssl-fips-src"
                 BUILD_IN_SOURCE true
-                CONFIGURE_COMMAND ./Configure "CFLAGS=${PASSTHROUGH_CMAKE_C_FLAGS} -fPIC" "CXXFLAGS=${PASSTHROUGH_CMAKE_CXX_FLAGS} -fPIC" ${OPENSSL_SHARED_FLAG} ${OPENSSL_FIPS_EXTRA_FLAGS}  "--prefix=${OPENSSL_FIPS_BIN_DIR}" "--openssldir=${OPENSSL_FIPS_BIN_DIR}"
+                CONFIGURE_COMMAND ./Configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "CFLAGS=${PASSTHROUGH_CMAKE_C_FLAGS} -fPIC" "CXXFLAGS=${PASSTHROUGH_CMAKE_CXX_FLAGS} -fPIC" ${OPENSSL_SHARED_FLAG} ${OPENSSL_FIPS_EXTRA_FLAGS}  "--prefix=${OPENSSL_FIPS_BIN_DIR}" "--openssldir=${OPENSSL_FIPS_BIN_DIR}"
                 BUILD_BYPRODUCTS ${OPENSSL_FIPS_FILE_LIST}
                 EXCLUDE_FROM_ALL TRUE
                 INSTALL_COMMAND make install_fips


(nifi-minifi-cpp) 01/06: MINIFICPP-2584 Linux Filesystem Hierarchy Standard support, RPM package

Posted by sz...@apache.org.
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 fd0eacbd3367cbaa70e37ea507c697075ed8fe1f
Author: Martin Zink <ma...@apache.org>
AuthorDate: Mon Sep 8 15:32:12 2025 +0200

    MINIFICPP-2584 Linux Filesystem Hierarchy Standard support, RPM package
    
    Closes #1993
    
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 .github/workflows/verify-package.yml               |  21 +-
 .gitignore                                         |   2 +-
 CMakeLists.txt                                     | 140 +++++++----
 CONFIGURE.md                                       |  72 ++++--
 OPS.md                                             |  26 +--
 bin/CMakeLists.txt                                 |  69 ++++++
 bin/{minifi.service => minifi.service.in}          |   4 +-
 cmake/BundledOpenSSL.cmake                         |  23 +-
 cmake/DockerConfig.cmake                           |  15 +-
 cmake/Extensions.cmake                             |  12 +-
 cmake/MiNiFiOptions.cmake                          |   1 +
 cmake/VerifyPackageWithDocker.cmake                |   4 +
 conanfile.py                                       |   2 +-
 conf/CMakeLists.txt                                |  89 +++++++
 conf/{config.yml => config.yml.in}                 |   0
 ...ifi-log.properties => minifi-log.properties.in} |   2 +-
 ...ifi-uid.properties => minifi-uid.properties.in} |   0
 conf/{minifi.properties => minifi.properties.in}   |  16 +-
 controller/CMakeLists.txt                          |  24 +-
 controller/MiNiFiController.cpp                    |  19 +-
 core-framework/include/Defaults.h                  |  32 +++
 core-framework/include/core/ProcessContext.h       |   9 -
 core-framework/include/utils/Environment.h         |   2 +-
 core-framework/include/utils/Locations.h           |  43 ++++
 .../src/utils/crypto/EncryptionManager.cpp         |   6 +-
 deploy.sh                                          |   2 +-
 docker/DockerBuild.sh                              |   3 +-
 docker/DockerVerify.sh                             |   2 +-
 .../installed.Dockerfile                           |   0
 .../installed.dockerignore                         |   0
 .../rpm.Dockerfile}                                |  16 +-
 docker/rockylinux/Dockerfile                       |  19 +-
 docker/test/integration/cluster/ContainerStore.py  |   3 +
 .../test/integration/cluster/DockerTestCluster.py  |   5 +-
 docker/test/integration/cluster/ImageStore.py      |  70 +++---
 .../cluster/MinifiControllerExecutor.py            |  23 +-
 .../containers/MinifiAsPodInKubernetesCluster.py   |   2 +-
 .../cluster/containers/MinifiContainer.py          |  51 +++-
 .../features/MiNiFi_integration_test_driver.py     |   3 +
 docker/test/integration/features/couchbase.feature |  16 +-
 docker/test/integration/features/environment.py    |   3 +
 .../test/integration/features/kubernetes.feature   |   1 +
 docker/test/integration/features/steps/steps.py    |   2 +-
 .../kubernetes/minifi-conf/minifi.properties       |  10 +
 .../integration/resources/minifi/minifi.properties |   6 -
 encrypt-config/CMakeLists.txt                      |  22 +-
 encrypt-config/EncryptConfig.cpp                   |   6 +-
 encrypt-config/FlowConfigEncryptor.cpp             |  13 +-
 .../tests/ExpressionLanguageTests.cpp              |  10 +-
 extensions/python/CMakeLists.txt                   |  22 +-
 extensions/python/PythonCreator.h                  |  40 ++--
 .../utils/dependency_installer.py                  |   1 +
 extensions/python/tests/PythonManifestTests.cpp    |   8 +-
 .../rocksdb-repos/DatabaseContentRepository.cpp    |  19 +-
 extensions/rocksdb-repos/FlowFileRepository.cpp    |  13 +-
 .../controllers/RocksDbStateStorage.cpp            |  13 +-
 .../rocksdb-repos/tests/ContentSessionTests.cpp    |   7 +-
 .../tests/DBContentRepositoryTests.cpp             |  12 -
 extensions/rocksdb-repos/tests/EncryptionTests.cpp |   1 -
 extensions/rocksdb-repos/tests/RepoTests.cpp       |  19 --
 extensions/rocksdb-repos/tests/SwapTests.cpp       |   1 -
 extensions/sftp/tests/ListSFTPTests.cpp            |   8 +-
 .../tests/unit/TailFileTests.cpp                   |  13 +-
 fips/openssl.cnf                                   |   2 +-
 generateVersion.bat                                |   2 +-
 generateVersion.sh                                 |   2 +-
 libminifi/CMakeLists.txt                           |  10 +-
 libminifi/include/Defaults.h                       |  25 --
 libminifi/include/core/logging/LoggerProperties.h  |   8 +-
 libminifi/include/properties/Properties.h          |  15 --
 libminifi/src/core/ProcessContext.cpp              |   8 +-
 libminifi/src/core/extension/ExtensionManager.cpp  |  18 +-
 libminifi/src/core/flow/AdaptiveConfiguration.cpp  |   6 +-
 libminifi/src/core/logging/LoggerConfiguration.cpp |  10 +-
 .../src/core/repository/FileSystemRepository.cpp   |   9 +-
 libminifi/src/properties/Properties.cpp            |   8 +-
 libminifi/src/utils/file/AssetManager.cpp          |  17 +-
 libminifi/test/integration/AlertTests.cpp          |   3 +-
 libminifi/test/integration/C2AssetSyncTest.cpp     |  14 +-
 libminifi/test/integration/C2DebugBundleTest.cpp   |   3 +-
 .../test/integration/C2DescribeManifestTest.cpp    |   2 +-
 .../test/integration/C2PropertiesUpdateTests.cpp   |   8 +-
 libminifi/test/integration/C2UpdateAssetTest.cpp   |   5 +
 libminifi/test/libtest/unit/TestBase.cpp           |  13 +-
 .../test/libtest/unit/TestControllerWithFlow.cpp   |   1 -
 .../test/persistence-tests/PersistenceTests.cpp    |   2 -
 libminifi/test/unit/DecryptorTests.cpp             |   3 +-
 libminifi/test/unit/LogMetricsPublisherTests.cpp   |   1 -
 libminifi/test/unit/LoggerConfigurationTests.cpp   |   2 +-
 libminifi/test/unit/LoggerTests.cpp                |  20 +-
 libminifi/test/unit/ProcessSessionTests.cpp        |   1 -
 .../performance/VolatileRepositoryPerfTests.cpp    |   2 +-
 .../include/minifi-cpp/core/ProcessContext.h       |   2 -
 .../include/minifi-cpp/properties/Configure.h      |   3 +-
 .../include/minifi-cpp/properties/Properties.h     |   2 -
 minifi_main/CMakeLists.txt                         |  16 +-
 minifi_main/Fips.cpp                               |  63 ++---
 minifi_main/Fips.h                                 |   4 +-
 minifi_main/MainHelper.cpp                         |  75 ++++--
 minifi_main/MainHelper.h                           |  52 +++--
 minifi_main/MiNiFiMain.cpp                         |  75 +++---
 minifi_main/MiNiFiWindowsService.cpp               |   2 +-
 deploy.sh => packaging/CMakeLists.txt              |  17 +-
 {msi => packaging/msi}/MergeModulesFeature.xml     |   0
 .../msi}/VSRedistributablesComponent.xml           |   0
 .../msi}/VSRedistributablesFeature.xml             |   0
 {msi => packaging/msi}/WixWin.wsi.in               |   0
 {msi => packaging/msi}/bgr.png                     | Bin
 {msi => packaging/msi}/minifi-logo-ico.ico         | Bin
 {msi => packaging/msi}/minifi-logo-png-banner.png  | Bin
 {msi => packaging/msi}/x64.wsi                     |   0
 {msi => packaging/msi}/x86.wsi                     |   0
 packaging/rpm/check_rpm_contents.sh                |  43 ++++
 packaging/rpm/expected-rpm-contents.in             |  67 ++++++
 packaging/rpm/pre_install.sh                       |  11 +
 .../google-cloud-cpp/remove_installation.patch     | 258 +++++++++++++++++++++
 .../0003-remove_FindLZ4_installation.patch         |  22 ++
 117 files changed, 1443 insertions(+), 587 deletions(-)

diff --git a/.github/workflows/verify-package.yml b/.github/workflows/verify-package.yml
index 20f769820..b0eb298ac 100644
--- a/.github/workflows/verify-package.yml
+++ b/.github/workflows/verify-package.yml
@@ -25,8 +25,8 @@ jobs:
       fail-fast: false
       matrix:
         platform: [
-          { arch: "x86_64", artifact: "minifi-x86_64-tar" },
-          { arch: "aarch64", artifact: "minifi-aarch64-tar" }
+          { arch: "x86_64", tar-artifact: "minifi-x86_64-tar", rpm-artifact: "minifi-x86_64-rpm" },
+          { arch: "aarch64", tar-artifact: "minifi-aarch64-tar", rpm-artifact: "minifi-aarch64-rpm" }
         ]
 
     steps:
@@ -44,14 +44,18 @@ jobs:
 
       - uses: actions/upload-artifact@v4
         with:
-          name: ${{ matrix.platform.artifact }}
+          name: ${{ matrix.platform.tar-artifact }}
           path: build/nifi-minifi-cpp-*-bin-rockylinux.tar.gz
-          if-no-files-found: error
+
+      - uses: actions/upload-artifact@v4
+        with:
+          name: ${{ matrix.platform.rpm-artifact }}
+          path: build/nifi-minifi-cpp-*.rpm
 
   docker-tests:
     name: "${{ matrix.platform.name }} (${{ matrix.arch }})${{ inputs.enable_fips && ' (FIPS Mode)' || '' }}"
     runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
-    timeout-minutes: 180
+    timeout-minutes: 240
     needs: build-packages
     strategy:
       fail-fast: false
@@ -60,6 +64,8 @@ jobs:
         platform: [
           { name: "Rocky Linux 8", id: "rocky8", build_cmd: "make rocky8_from_rocky_package", verify_cmd: "make docker-verify-rocky8" },
           { name: "Rocky Linux 9", id: "rocky9", build_cmd: "make rocky9_from_rocky_package", verify_cmd: "make docker-verify-rocky9" },
+          { name: "Rocky Linux 8 from RPM", id: "rocky8-rpm", build_cmd: "make rocky8_from_rpm_package", verify_cmd: "make docker-verify-rocky8-rpm" },
+          { name: "Rocky Linux 9 from RPM", id: "rocky9-rpm", build_cmd: "make rocky9_from_rpm_package", verify_cmd: "make docker-verify-rocky9-rpm" },
           { name: "Ubuntu 22.04", id: "ubuntu_jammy", build_cmd: "make jammy_from_rocky_package", verify_cmd: "make docker-verify-jammy" },
           { name: "Ubuntu 24.04", id: "ubuntu_noble", build_cmd: "make noble_from_rocky_package", verify_cmd: "make docker-verify-noble" },
           { name: "Debian 11", id: "debian_bullseye", build_cmd: "make bullseye_from_rocky_package", verify_cmd: "make docker-verify-bullseye" },
@@ -75,6 +81,11 @@ jobs:
           name: minifi-${{ matrix.arch }}-tar
           path: build
 
+      - uses: actions/download-artifact@v4
+        with:
+          name: minifi-${{ matrix.arch }}-rpm
+          path: build
+
       - id: install_deps
         run: |
           sudo apt update
diff --git a/.gitignore b/.gitignore
index 0230c6b91..83a5b56ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,7 +64,7 @@ __pycache__/
 /content_repository
 /provenance_repository
 /logs
-msi/WixWin.wsi
+packaging/msi/WixWin.wsi
 docker/behavex_output
 
 .vs/**
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9461e013..7f6ea3354 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,7 @@ include(CMakeDependentOption)
 include(CheckIncludeFile)
 include(FeatureSummary)
 include(ExternalProject)
+include(GNUInstallDirs)
 
 # Provide custom modules for the project
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
@@ -262,6 +263,10 @@ include(BundledLibSodium)
 use_bundled_libsodium("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")
 
 list(APPEND MINIFI_CPP_COMPILE_DEFINITIONS SODIUM_STATIC=1)
+list(APPEND MINIFI_CPP_COMPILE_DEFINITIONS "RPM_CONFIG_DIR=\"/${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME}\"")
+list(APPEND MINIFI_CPP_COMPILE_DEFINITIONS "RPM_LOG_DIR=\"/${CMAKE_INSTALL_LOCALSTATEDIR}/log/${PROJECT_NAME}\"")
+list(APPEND MINIFI_CPP_COMPILE_DEFINITIONS "RPM_WORK_DIR=\"/${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}\"")
+list(APPEND MINIFI_CPP_COMPILE_DEFINITIONS "RPM_LIB_DIR=\"/usr/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}\"")
 
 # zlib
 include(GetZLIB)
@@ -446,10 +451,9 @@ if(WIN32)
     set(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
     set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full)
     set(CPACK_WIX_EXTENSIONS WixUtilExtension)
-    set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/msi/minifi-logo-png-banner.png")
-    set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/msi/bgr.png")
+    set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/minifi-logo-png-banner.png")
+    set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/bgr.png")
 
-    file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conf/")
     file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/fips/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/fips/")
     file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
     file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/NOTICE" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
@@ -522,15 +526,15 @@ if(WIN32)
 
         if (BUILD_PLATFORM STREQUAL "x64")
             message("Using ${VCRUNTIME_X64_MERGEMODULE_PATH} VC Redistributable Merge Module")
-            configure_file("msi/x64.wsi" "msi/x64.wsi" @ONLY)
-            list(APPEND CPACK_WIX_EXTRA_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/msi/x64.wsi")
+            configure_file("packaging/msi/x64.wsi" "packaging/msi/x64.wsi" @ONLY)
+            list(APPEND CPACK_WIX_EXTRA_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/packaging/msi/x64.wsi")
         else()
             message("Using ${VCRUNTIME_X86_MERGEMODULE_PATH} VC Redistributable Merge Module")
-            configure_file("msi/x86.wsi" "msi/x86.wsi" @ONLY)
-            list(APPEND CPACK_WIX_EXTRA_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/msi/x86.wsi")
+            configure_file("packaging/msi/x86.wsi" "packaging/msi/x86.wsi" @ONLY)
+            list(APPEND CPACK_WIX_EXTRA_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/packaging/msi/x86.wsi")
         endif()
 
-        file(READ "${CMAKE_CURRENT_SOURCE_DIR}/msi/MergeModulesFeature.xml" WIX_EXTRA_FEATURES)
+        file(READ "${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/MergeModulesFeature.xml" WIX_EXTRA_FEATURES)
     elseif(MINIFI_INCLUDE_VC_REDIST_DLLS)
         message("Creating installer with Visual C++ Redistributable DLLs")
         file(GLOB VC_RUNTIME_X86_REDIST_CRT_DIR_LIST LIST_DIRECTORIES true "${VCRUNTIME_REDIST_DIR}/x86/Microsoft.VC*.CRT")
@@ -553,13 +557,13 @@ if(WIN32)
         else()
             message(FATAL_ERROR "Could not determine architecture, CMAKE_SIZEOF_VOID_P is unexpected: ${CMAKE_SIZEOF_VOID_P}")
         endif()
-        file(READ "${CMAKE_CURRENT_SOURCE_DIR}/msi/VSRedistributablesComponent.xml" WIX_EXTRA_COMPONENTS)
-        file(READ "${CMAKE_CURRENT_SOURCE_DIR}/msi/VSRedistributablesFeature.xml" WIX_EXTRA_FEATURES)
+        file(READ "${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/VSRedistributablesComponent.xml" WIX_EXTRA_COMPONENTS)
+        file(READ "${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/VSRedistributablesFeature.xml" WIX_EXTRA_FEATURES)
     else()
         message("Creating installer without UCRT or VC Redistributable")
     endif()
-    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/msi/WixWin.wsi.in" "${CMAKE_CURRENT_SOURCE_DIR}/msi/WixWin.wsi")
-    set(CPACK_WIX_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/msi/WixWin.wsi")
+    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/WixWin.wsi.in" "${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/WixWin.wsi")
+    set(CPACK_WIX_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/WixWin.wsi")
 else()
     set(CPACK_SOURCE_GENERATOR "TGZ")
 endif(WIN32)
@@ -607,57 +611,90 @@ set(CPACK_SOURCE_IGNORE_FILES
     "\\\\.ropeproject"
 )
 
-# Generate binary assembly. Exclude conf for windows since we'll be doing the work in the WiX template
+add_subdirectory(conf)
+add_subdirectory(bin)
 if (NOT WIN32)
-    install(FILES conf/minifi.properties conf/minifi-log.properties conf/minifi-uid.properties conf/config.yml
-        DESTINATION conf
-        COMPONENT bin)
-
-    install(FILES fips/openssl.cnf fips/README.md
-        DESTINATION fips
-        COMPONENT bin)
-
-    install(DIRECTORY extensions/python/pythonprocessors/
-        DESTINATION minifi-python
-        COMPONENT bin)
-
-    install(DIRECTORY extensions/python/pythonprocessor-examples/
-        DESTINATION minifi-python-examples
-        COMPONENT bin)
-
-    install(PROGRAMS bin/minifi.sh
-            DESTINATION bin
-            COMPONENT bin)
-
-    if (APPLE)
-        install(FILES bin/minifi.plist
-            DESTINATION bin
-            COMPONENT bin)
-    else()
-        install(FILES bin/minifi.service
-                DESTINATION bin
+    if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+        message(STATUS "Configuring for FHS/RPM package installation.")
+        install(FILES fips/openssl.cnf
+                DESTINATION /${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME}/fips
+                COMPONENT bin)
+        install(DIRECTORY DESTINATION /${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME} COMPONENT bin)
+        install(DIRECTORY DESTINATION /${CMAKE_INSTALL_LOCALSTATEDIR}/log/${PROJECT_NAME} COMPONENT bin)
+        install(DIRECTORY extensions/python/pythonprocessors/
+                DESTINATION /${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}/minifi-python
+                COMPONENT bin)
+        install(DIRECTORY extensions/python/pythonprocessor-examples/
+                DESTINATION ${CMAKE_INSTALL_DOCDIR}/pythonprocessor-examples
+                COMPONENT bin)
+    elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+        message(STATUS "Configuring for self-contained TGZ package installation.")
+        install(FILES fips/openssl.cnf fips/README.md
+                DESTINATION fips
+                COMPONENT bin)
+        install(DIRECTORY extensions/python/pythonprocessors/
+                DESTINATION minifi-python
+                COMPONENT bin)
+        install(DIRECTORY extensions/python/pythonprocessor-examples/
+                DESTINATION minifi-python-examples
                 COMPONENT bin)
+    else()
+        message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
     endif()
 endif()
 
-install(FILES LICENSE NOTICE
-    DESTINATION .
-    COMPONENT bin)
 file(GLOB markdown_docs "*.md")
-install(FILES ${markdown_docs}
-    DESTINATION .
-    COMPONENT bin)
+if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+    install(FILES LICENSE NOTICE ${markdown_docs}
+            DESTINATION ${CMAKE_INSTALL_DOCDIR}
+            COMPONENT bin)
+    install(FILES fips/README.md
+            DESTINATION ${CMAKE_INSTALL_DOCDIR}
+            RENAME FIPS.md
+            COMPONENT bin)
+elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+    install(FILES LICENSE NOTICE ${markdown_docs}
+            DESTINATION .
+            COMPONENT bin)
+else()
+    message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+endif()
+
 
 include(CPackComponent)
 
 if (WIN32)
     set(CPACK_GENERATOR "WIX")
     set(CPACK_WIX_UPGRADE_GUID "FE29F801-3486-4E9E-AFF9-838C1A5C8D59")
-    set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/msi/minifi-logo-ico.ico")
-else()
+    set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/msi/minifi-logo-ico.ico")
+elseif(APPLE)
     set(CPACK_GENERATOR "TGZ")
+else()
+    if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+        set(CPACK_GENERATOR "RPM")
+        set(CPACK_BINARY_RPM, "ON")
+        set(CPACK_RPM_PACKAGE_NAME "nifi-minifi-cpp")
+        set(CPACK_RPM_PACKAGE_AUTOREQ OFF)
+        set(CPACK_RPM_PACKAGE_REQUIRES "")
+        set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 0)
+        set(CPACK_RPM_SPEC_MORE_DEFINE "%define _build_id_links none")
+        set(CPACK_RPM_COMPONENT_INSTALL ON)
+        set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")
+        set(CPACK_RPM_DEFAULT_USER "minificpp")
+        set(CPACK_RPM_DEFAULT_GROUP "minificpp")
+        set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/packaging/rpm/pre_install.sh")
+        list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/var")
+        list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/var/lib")
+        list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/var/log")
+        list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/lib64/systemd")
+        list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/lib64/systemd/system")
+    elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+        set(CPACK_GENERATOR "TGZ")
+        set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 1)
+    else()
+        message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+    endif()
 endif()
-set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 1)
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache NiFi MiNiFi C++ version ${VERSION}")
 set(CPACK_PACKAGE_VENDOR "Apache NiFi")
 # set version information
@@ -669,8 +706,6 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" "${CMAKE_CURRENT_BINARY_DIR
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
 if(NOT WIN32)
     set(CPACK_PACKAGE_FILE_NAME "${ASSEMBLY_BASE_NAME}")
-    set(CPACK_GENERATOR "TGZ")
-    set(CPACK_BINARY_TGZ, "ON")
 else()
     set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}")
 endif()
@@ -733,6 +768,7 @@ if ("python_script_extension" IN_LIST CPACK_COMPONENTS_ALL)
                 FILES "${CMAKE_BINARY_DIR}/bin/minifi_native.so"
                 GROUP extensions
                 DEPENDS bin)
+        set(RPM_EXPECTED_EXTENSION_LIST ${RPM_EXPECTED_EXTENSION_LIST} /usr/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extensions/minifi_native.so)
     endif()
 endif()
 
@@ -797,3 +833,5 @@ if (MINIFI_ADVANCED_CODE_COVERAGE)
             "controller/MiNiFiController.cpp"
     )
 endif()
+
+add_subdirectory(packaging)
diff --git a/CONFIGURE.md b/CONFIGURE.md
index aae1d5cc1..40df3bbb8 100644
--- a/CONFIGURE.md
+++ b/CONFIGURE.md
@@ -74,6 +74,14 @@
   - [Shortening log messages](#shortening-log-messages)
 - [Recommended Antivirus Exclusions](#recommended-antivirus-exclusions)
 
+## Linux Installation types
+
+### Self-contained installation (from a .tar.gz archive)
+The `MINIFI_HOME` environment variable should point to the installation directory, if `MINIFI_HOME` is not defined, MiNiFi will try to infer it from binary's location.
+
+### Filesystem Hierarchy Standard installation (from .rpm package)
+The `MINIFI_HOME` environment variable should be set to `FHS`. If `MINIFI_HOME` is not defined but the binary is in the `/usr/bin` directory it will try to run as an FHS application.
+
 
 ## Configuring
 The 'conf' directory in the root contains a template config.yml document.
@@ -657,16 +665,23 @@ As stated before each of the repositories can be configured to be volatile (stat
 **NOTE:** If the volatile repository reaches the maximum number of entries, it will start to drop the oldest entries, and replace them with the new entries in round robin manner. Make sure to set the maximum number of entries to a reasonable value, so that the repository does not run out of memory.
 
 ### Configuring Repository storage locations
-Persistent repositories, such as the Flow File repository, use a configurable path to store data.
-The repository locations and their defaults are defined below. By default the MINIFI_HOME env
-variable is used. If this is not specified we extrapolate the path and use the root installation
-folder. You may specify your own path in place of these defaults.
+Persistent repositories, such as the Flow File repository, use configurable paths to store data. The application detects its installation type at runtime and uses the appropriate default locations.
+
+In a self-contained installation (from a .tar.gz archive), paths are relative to the application's root directory, which is typically configured using the ${MINIFI_HOME} environment variable. You may specify your own path in place of these defaults.
 
     # in minifi.properties
     nifi.provenance.repository.directory.default=${MINIFI_HOME}/provenance_repository
     nifi.flowfile.repository.directory.default=${MINIFI_HOME}/flowfile_repository
     nifi.database.content.repository.directory.default=${MINIFI_HOME}/content_repository
 
+In a Filesystem Hierarchy Standard (FHS) installation (from an RPM package), the default location for all persistent repositories is /var/lib/nifi-minifi-cpp/
+
+    # in minifi.properties
+    nifi.provenance.repository.directory.default=/var/lib/nifi-minifi-cpp/provenance_repository
+    nifi.flowfile.repository.directory.default=/var/lib/nifi-minifi-cpp/flowfile_repository
+    nifi.database.content.repository.directory.default=/var/lib/nifi-minifi-cpp/content_repository
+
+
 ### Configuring compression for rocksdb database
 
 Rocksdb has an option to set compression type for its database to use less disk space.
@@ -833,8 +848,12 @@ Additionally, a unique hexadecimal uid.minifi.device.segment should be assigned
 
 ### Asset directory
 
-There is an asset directory specified using the `nifi.asset.directory` agent property, which defaults to `${MINIFI_HOME}/asset`.
-The files referenced in the `.state` file in this directory are managed by the agent. They are deleted, updated, downloaded
+The location for downloaded assets is specified by the `nifi.asset.directory` agent property. The default path depends on the installation mode:
+
+* In a **self-contained (TGZ)** installation, this defaults to **`${MINIFI_HOME}/asset`**.
+* In a **system-wide FHS** installation, the default is **`/var/lib/nifi-minifi-cpp/asset`**.
+
+The files referenced in the `.state` file in this directory are managed by the agent. They are deleted, updated, downloaded 
 using the asset sync c2 command. For the asset sync command to work, the c2 server must be made aware of the current state of the
 managed assets by adding the `AssetInformation` entry to the `nifi.c2.root.classes` property.
 
@@ -946,24 +965,45 @@ To enable FIPS support, and use MiNiFi C++ in FIPS compliant mode, there are a f
 
 Before first starting the application, the fipsmodule.cnf needs to be generated. This can be done in two ways, either automatically or manually.
 
-#### Generating the fipsmodule.cnf file automatically
+### Generating the `fipsmodule.cnf` File
+
+#### Automatic Generation
+
+If the application is started with the `nifi.openssl.fips.support.enable` property set to `true`, it will check for the `fipsmodule.cnf` file. If the file is not found, the application will attempt to generate it automatically before loading the OpenSSL configuration.
 
-If the application is started with the nifi.openssl.fips.support.enable property set to true, and the fipsmodule.cnf file is not found in the $MINIFI_HOME/fips directory, the application will try to generate the fipsmodule.cnf file automatically. This is done by running the manual steps described in the next section, but this is done from the MiNiFi C++ process before loading the OpenSSL configuration. If the automatic generation is successful, the application will start in FIPS mode.
+The location where the application looks for and generates the file depends on the installation type:
+* **FHS Installation (RPM):** The application checks for `/etc/nifi-minifi-cpp/fips/fipsmodule.cnf`.
+* **Self-Contained Installation (TGZ):** The application checks for `$MINIFI_HOME/fips/fipsmodule.cnf`.
 
-#### Generating the fipsmodule.cnf file manually
+If the automatic generation is successful, the application will start in FIPS mode.
 
-To do this run the following command with the openssl binary (openssl on Unix and openssl.exe on windows) with the following parameters provided in the $MINIFI_HOME/fips directory:
+#### Manual Generation
 
-    # on Unix platform
-    ./openssl fipsinstall -out fipsmodule.cnf -module $MINIFI_HOME/fips/fips.so
+If automatic generation fails, or you need to create the file manually, follow the steps below.
 
-    # on Windows platform
-    openssl.exe fipsinstall -out fipsmodule.cnf -module $MINIFI_HOME\fips\fips.dll
+#### For FHS Installations (RPM)
+
+Run the bundled `openssl` binary located in the application's private library directory, and specify the absolute path for the output configuration file.
+```bash
+cd /usr/lib64/nifi-minifi-cpp/fips
+./openssl fipsinstall -out /etc/nifi-minifi-cpp/fips/fipsmodule.cnf -module ./fips.so
+```
+
+#### For self-contained (TGZ) Unix installation
+```bash
+cd $MINIFI_HOME/fips
+./openssl fipsinstall -out fipsmodule.cnf -module $MINIFI_HOME/fips/fips.so
+```
+
+#### For Windows
+```dos
+cd $MINIFI_HOME/fips
+openssl.exe fipsinstall -out fipsmodule.cnf -module $MINIFI_HOME\fips\fips.dll
+```
 
-If the command finishes successfully, the fipsmodule.cnf file will be generated in the $MINIFI_HOME/fips directory. After this the application can be started and it will configure OpenSSL to start in FIPS mode.
 
 ## Log configuration
-By default the application logs for Apache MiNiFi C++ can be found in the ${MINIFI_HOME}/logs/minifi-app.log file with default INFO level logging. The logger can be reconfigured in the ${MINIFI_HOME}/conf/minifi-log.properties file to use different output streams, log level, and output format.
+By default, the application logs for Apache MiNiFi C++ can be found in the ${MINIFI_HOME}/logs/minifi-app.log file with default INFO level logging. The logger can be reconfigured in the ${MINIFI_HOME}/conf/minifi-log.properties file to use different output streams, log level, and output format.
 
 ### Log appenders
 In the configuration file it is possible to define different output streams by defining what type of appenders (log sinks) should be used for logging. The following appenders are supported:
diff --git a/OPS.md b/OPS.md
index 07ccc3bb0..3bc2431eb 100644
--- a/OPS.md
+++ b/OPS.md
@@ -37,10 +37,10 @@ it is meant to provide testing and minimal operational capabilities by example.
 The MiNiFi controller is an executable in the bin directory that can be used to control the MiNiFi C++ agent while it runs -- utilizing the [Command and Control Protocol](https://cwiki.apache.org/confluence/display/MINIFI/C2+Design). Currently the controller will let you stop subcomponents within a running instance, clear queues, get the status of queues, and update the flow for a warm re-deploy. It also provides an option to retrieve the agent manifest json.
 
 This functionality has to enabled in the minifi.properties file with the controller.socket.enable property.
-The minificontroller can track a single MiNiFi C++ agent through the use of three options. Port is required.
+The minifi-controller can track a single MiNiFi C++ agent through the use of three options. Port is required.
 The hostname is not and will default to localhost. Additionally, controller.socket.local.any.interface allows
 you to bind to any address when using localhost. Otherwise, we will bind only to the loopback adapter so only
-minificontroller on the local host can control the agent:
+minifi-controller on the local host can control the agent:
 
     $ controller.socket.enable=true
     $ controller.socket.host=localhost
@@ -50,7 +50,7 @@ minificontroller on the local host can control the agent:
 These are defined by default to the above values. If the port option is left undefined, the MiNiFi controller
 will be disabled in your deployment.
 
-The executable is stored in the bin directory and is titled minificontroller. Available commands are listed below.
+The executable is stored in the bin directory and is titled minifi-controller. Available commands are listed below.
 
 ### SSL
 
@@ -71,41 +71,41 @@ Otherwise if you prefer to retrieve the SSL configuration properties from the mi
 ### Commands
 
 #### Specifying connecting information
-    ./minificontroller --host "host name" --port "port"
+    ./minifi-controller --host "host name" --port "port"
 
 By default these options use those defined in minifi.properties and are not required
 
 #### Start Command
-    ./minificontroller --start "component name"
+    ./minifi-controller --start "component name"
 
 #### Stop command
-    ./minificontroller --stop "component name"
+    ./minifi-controller --stop "component name"
 
 #### List connections command
-    ./minificontroller --list connections
+    ./minifi-controller --list connections
 
 #### List components command
-    ./minificontroller --list components
+    ./minifi-controller --list components
 
 #### Clear connection command
-    ./minificontroller --clear "connection name"
+    ./minifi-controller --clear "connection name"
 
 #### GetSize command
-    ./minificontroller --getsize "connection name"
+    ./minifi-controller --getsize "connection name"
 
 Returns the size of the connection. The current size along with the max will be reported
 
 #### Update flow
-    ./minificontroller --updateflow "config yml"
+    ./minifi-controller --updateflow "config yml"
 
 Updates the flow file reference and performs a warm re-deploy.
 
 #### Get full connection command
-    ./minificontroller --getfull
+    ./minifi-controller --getfull
 
 Provides a list of full connections, if any.
 
 #### Get manifest command
-    ./minificontroller --manifest
+    ./minifi-controller --manifest
 
 Writes the agent manifest json to standard output
diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt
new file mode 100644
index 000000000..bf91f535a
--- /dev/null
+++ b/bin/CMakeLists.txt
@@ -0,0 +1,69 @@
+# 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.
+#
+
+# Exclude conf for windows since we'll be doing the work in the WiX template
+
+if (WIN32)
+    return()
+endif()
+
+
+if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+    set(MINIFI_HOME_ENV_VALUE "FHS")
+    set(MINIFI_EXEC_PATH "/usr/bin/minifi")
+elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+    set(MINIFI_HOME_ENV_VALUE "/opt/minifi-cpp")
+    set(MINIFI_EXEC_PATH "/opt/minifi-cpp/bin/minifi")
+else()
+    message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+endif()
+
+if(APPLE)
+    configure_file(
+            minifi.plist
+            ${CMAKE_BINARY_DIR}/bin/minifi.plist
+            @ONLY
+    )
+else()
+    configure_file(
+            minifi.service.in
+            ${CMAKE_BINARY_DIR}/bin/minifi.service
+            @ONLY
+    )
+endif()
+
+
+configure_file(
+        minifi.sh
+        ${CMAKE_BINARY_DIR}/bin/minifi.sh
+        @ONLY
+)
+
+if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+    install(FILES ${CMAKE_BINARY_DIR}/bin/minifi.service DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/system COMPONENT bin)
+elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+    install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/minifi.sh DESTINATION bin COMPONENT bin)
+    if (APPLE)
+        install(FILES ${CMAKE_BINARY_DIR}/bin/minifi.plist DESTINATION bin COMPONENT bin)
+    else()
+        install(FILES ${CMAKE_BINARY_DIR}/bin/minifi.service DESTINATION bin COMPONENT bin)
+    endif()
+else()
+    message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+endif()
diff --git a/bin/minifi.service b/bin/minifi.service.in
similarity index 75%
rename from bin/minifi.service
rename to bin/minifi.service.in
index 6f3c43908..eb78573ce 100644
--- a/bin/minifi.service
+++ b/bin/minifi.service.in
@@ -4,8 +4,8 @@ After=network.target
 
 [Service]
 Type=simple
-Environment=MINIFI_HOME=/opt/minifi-cpp
-ExecStart=/opt/minifi-cpp/bin/minifi
+Environment=MINIFI_HOME=@MINIFI_HOME_ENV_VALUE@
+ExecStart=@MINIFI_EXEC_PATH@
 Restart=on-failure
 RestartSec=3
 KillSignal=SIGTERM
diff --git a/cmake/BundledOpenSSL.cmake b/cmake/BundledOpenSSL.cmake
index d2e882985..ea7e71c6b 100644
--- a/cmake/BundledOpenSSL.cmake
+++ b/cmake/BundledOpenSSL.cmake
@@ -188,9 +188,26 @@ function(use_openssl SOURCE_DIR BINARY_DIR)
         LIST(APPEND OPENSSL_FIPS_FILE_LIST "${OPENSSL_FIPS_BIN_DIR}/${BYPRODUCT}")
     ENDFOREACH(BYPRODUCT)
 
-    install(FILES ${OPENSSL_FIPS_FILE_LIST} DESTINATION fips COMPONENT bin)
-    install(FILES "${OPENSSL_BIN_DIR}/bin/openssl${EXECUTABLE_SUFFIX}" DESTINATION fips COMPONENT bin
-            PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE)
+    if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+        install(FILES ${OPENSSL_FIPS_FILE_LIST}
+                DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/fips
+                COMPONENT bin)
+
+        install(FILES "${OPENSSL_BIN_DIR}/bin/openssl${EXECUTABLE_SUFFIX}"
+                DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/fips
+                COMPONENT bin
+                PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE)
+
+    elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+        install(FILES ${OPENSSL_FIPS_FILE_LIST}
+                DESTINATION fips
+                COMPONENT bin)
+
+        install(FILES "${OPENSSL_BIN_DIR}/bin/openssl${EXECUTABLE_SUFFIX}"
+                DESTINATION fips
+                COMPONENT bin
+                PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE)
+    endif()
 
     set(OPENSSL_FIPS_EXTRA_FLAGS
             no-tests            # Disable tests
diff --git a/cmake/DockerConfig.cmake b/cmake/DockerConfig.cmake
index d1d88d65e..bb3697963 100644
--- a/cmake/DockerConfig.cmake
+++ b/cmake/DockerConfig.cmake
@@ -168,7 +168,20 @@ function(CREATE_DOCKER_TARGET_FROM_ROCKY_PACKAGE BASE_IMAGE TAG_PREFIX INSTALL_P
             --build-arg ARCHIVE_LOCATION=nifi-minifi-cpp-${MINIFI_VERSION_STR}-bin-rockylinux.tar.gz
             --build-arg INSTALL_PACKAGE_CMD=${INSTALL_PACKAGE_CMD}
             -t apacheminificpp:${TAG_PREFIX}-${MINIFI_VERSION_STR}
-            -f ${CMAKE_SOURCE_DIR}/docker/python-verify/installed.Dockerfile
+            -f ${CMAKE_SOURCE_DIR}/docker/installed/installed.Dockerfile
+            ${CMAKE_BINARY_DIR})
+endfunction()
+
+function(CREATE_DOCKER_TARGET_FROM_RPM_PACKAGE BASE_IMAGE TAG_PREFIX INSTALL_PACKAGE_CMD)
+    add_custom_target(
+            ${TAG_PREFIX}_from_rpm_package
+            COMMAND DOCKER_BUILDKIT=1 docker build
+            --build-arg MINIFI_VERSION=${MINIFI_VERSION_STR}
+            --build-arg BASE_IMAGE=${BASE_IMAGE}
+            --build-arg ARCHIVE_LOCATION=nifi-minifi-cpp-${MINIFI_VERSION_STR}-bin-rockylinux.rpm
+            --build-arg INSTALL_PACKAGE_CMD=${INSTALL_PACKAGE_CMD}
+            -t apacheminificpp:${TAG_PREFIX}-rpm-${MINIFI_VERSION_STR}
+            -f ${CMAKE_SOURCE_DIR}/docker/installed/rpm.Dockerfile
             ${CMAKE_BINARY_DIR})
 endfunction()
 
diff --git a/cmake/Extensions.cmake b/cmake/Extensions.cmake
index 3dda3982a..ee52f4d23 100644
--- a/cmake/Extensions.cmake
+++ b/cmake/Extensions.cmake
@@ -78,7 +78,17 @@ macro(register_extension extension-name extension-display-name extension-guard d
             else()
                 set_target_properties(${extension-name} PROPERTIES INSTALL_RPATH "$ORIGIN")
             endif()
-            install(TARGETS ${extension-name} LIBRARY DESTINATION extensions COMPONENT ${component-name})
+            if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+                install(TARGETS ${extension-name}
+                        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extensions/
+                        COMPONENT ${component-name})
+                set(RPM_EXPECTED_EXTENSION_LIST ${RPM_EXPECTED_EXTENSION_LIST} /usr/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extensions/lib${extension-name}.so)
+                set(RPM_EXPECTED_EXTENSION_LIST ${RPM_EXPECTED_EXTENSION_LIST} PARENT_SCOPE)
+            elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+                install(TARGETS ${extension-name} LIBRARY DESTINATION extensions COMPONENT ${component-name})
+            else()
+                message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+            endif()
         endif()
     endif()
 
diff --git a/cmake/MiNiFiOptions.cmake b/cmake/MiNiFiOptions.cmake
index 9503d8a0f..1170e3510 100644
--- a/cmake/MiNiFiOptions.cmake
+++ b/cmake/MiNiFiOptions.cmake
@@ -139,6 +139,7 @@ set_property(CACHE STRICT_GSL_CHECKS PROPERTY STRINGS ${STRICT_GSL_CHECKS_Values
 # BUILD: Fetch and build from source using CMake FetchContent or ExternalProject
 # SYSTEM: Use find_package to use the system version
 # CONAN: Use Conan packages
+add_minifi_multi_option(MINIFI_PACKAGING_TYPE "Selects the packaging format for the final artifact." "TGZ;RPM" "TGZ")
 add_minifi_multi_option(MINIFI_LIBCURL_SOURCE "Retrieves LibCURL from provided source" "BUILD;SYSTEM;CONAN" "BUILD")
 add_minifi_multi_option(MINIFI_OPENSSL_SOURCE "Retrieves OpenSSL from provided source" "BUILD;SYSTEM;CONAN" "BUILD")
 add_minifi_multi_option(MINIFI_ZLIB_SOURCE "Retrieves ZLib from provided source" "BUILD;SYSTEM;CONAN" "BUILD")
diff --git a/cmake/VerifyPackageWithDocker.cmake b/cmake/VerifyPackageWithDocker.cmake
index 32e0abb79..97ff6ad44 100644
--- a/cmake/VerifyPackageWithDocker.cmake
+++ b/cmake/VerifyPackageWithDocker.cmake
@@ -45,6 +45,8 @@ CREATE_DOCKER_TARGET_FROM_ROCKY_PACKAGE(ubuntu:jammy jammy "apt update \\&\\& ap
 CREATE_DOCKER_TARGET_FROM_ROCKY_PACKAGE(ubuntu:noble noble "apt update \\&\\& apt install -y wget python3-dev python3-venv python3-pip")
 CREATE_DOCKER_TARGET_FROM_ROCKY_PACKAGE(debian:bookworm bookworm "apt update \\&\\& apt install -y wget python3-dev python3-venv python3-pip")
 CREATE_DOCKER_TARGET_FROM_ROCKY_PACKAGE(debian:bullseye bullseye "apt update \\&\\& apt install -y wget python3-dev python3-venv python3-pip")
+CREATE_DOCKER_TARGET_FROM_RPM_PACKAGE(rockylinux:8 rocky8 "dnf install -y wget python3.12-devel python3.12-pip gcc gcc-c++")
+CREATE_DOCKER_TARGET_FROM_RPM_PACKAGE(rockylinux:9 rocky9 "dnf install -y wget python3-devel python3-pip gcc gcc-c++")
 
 if (EXISTS ${CMAKE_SOURCE_DIR}/docker/test/integration/features)
     ADD_PACKAGE_VERIFY(rocky8)
@@ -53,4 +55,6 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/docker/test/integration/features)
     ADD_PACKAGE_VERIFY(noble)
     ADD_PACKAGE_VERIFY(bookworm)
     ADD_PACKAGE_VERIFY(bullseye)
+    ADD_PACKAGE_VERIFY(rocky8-rpm)
+    ADD_PACKAGE_VERIFY(rocky9-rpm)
 endif()
diff --git a/conanfile.py b/conanfile.py
index 310a81ac1..6939c6eb5 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -9,7 +9,7 @@ required_conan_version = ">=2.0"
 
 shared_requires = ("openssl/3.2.1", "libcurl/8.4.0", "civetweb/1.16", "libxml2/2.12.6", "fmt/10.2.1", "spdlog/1.14.0", "catch2/3.5.4", "zlib/1.2.11", "zstd/1.5.2", "bzip2/1.0.8", "rocksdb/8.10.2@minifi/develop")
 
-shared_sources = ("CMakeLists.txt", "libminifi/*", "extensions/*", "minifi_main/*", "nanofi/*", "bin/*", "bootstrap/*", "cmake/*", "conf/*", "controller/*", "encrypt-config/*", "etc/*", "examples/*", "msi/*", "thirdparty/*", "docker/*", "LICENSE", "NOTICE", "README.md", "C2.md", "CONFIGURE.md", "CONTRIBUTING.md", "CONTROLLERS.md", "EXPRESSIONS.md", "Extensions.md", "JNI.md", "METRICS.md", "OPS.md", "PROCESSORS.md", "ThirdParties.md", "Windows.md", "aptitude.sh", "arch.sh", "bootstrap.sh" [...]
+shared_sources = ("CMakeLists.txt", "libminifi/*", "extensions/*", "minifi_main/*", "nanofi/*", "bin/*", "bootstrap/*", "cmake/*", "conf/*", "controller/*", "encrypt-config/*", "etc/*", "examples/*", "packaging/msi/*", "thirdparty/*", "docker/*", "LICENSE", "NOTICE", "README.md", "C2.md", "CONFIGURE.md", "CONTRIBUTING.md", "CONTROLLERS.md", "EXPRESSIONS.md", "Extensions.md", "JNI.md", "METRICS.md", "OPS.md", "PROCESSORS.md", "ThirdParties.md", "Windows.md", "aptitude.sh", "arch.sh", "boo [...]
 
 
 class MiNiFiCppMain(ConanFile):
diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt
new file mode 100644
index 000000000..6f2db62d8
--- /dev/null
+++ b/conf/CMakeLists.txt
@@ -0,0 +1,89 @@
+# 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.
+#
+
+# Exclude conf for windows since we'll be doing the work in the WiX template
+
+if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+    set(MINIFI_PATH_FLOW_CONFIG "/${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME}/config.yml")
+    set(MINIFI_PATH_EXTENSIONS "/usr/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extensions/*")
+    set(MINIFI_PATH_PROVENANCE_REPO "/${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}/provenance_repository")
+    set(MINIFI_PATH_FLOWFILE_REPO "/${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}/flowfile_repository")
+    set(MINIFI_PATH_CONTENT_REPO "/${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}/content_repository")
+    set(MINIFI_PATH_ASSET_DIR "/${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}/asset")
+    set(MINIFI_PATH_PYTHON_PROCESSORS "/${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}/minifi-python")
+    set(MINIFI_PATH_PYTHON_VENV "/${CMAKE_INSTALL_LOCALSTATEDIR}/lib/${PROJECT_NAME}/minifi-python-env")
+    set(MINIFI_PATH_LOG_DIR "/${CMAKE_INSTALL_LOCALSTATEDIR}/log/${PROJECT_NAME}/")
+elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+    set(MINIFI_PATH_FLOW_CONFIG "./conf/config.yml")
+    set(MINIFI_PATH_EXTENSIONS "../extensions/*")
+    set(MINIFI_PATH_PROVENANCE_REPO "\${MINIFI_HOME}/provenance_repository")
+    set(MINIFI_PATH_FLOWFILE_REPO "\${MINIFI_HOME}/flowfile_repository")
+    set(MINIFI_PATH_CONTENT_REPO "\${MINIFI_HOME}/content_repository")
+    set(MINIFI_PATH_ASSET_DIR "\${MINIFI_HOME}/asset")
+    set(MINIFI_PATH_PYTHON_PROCESSORS "\${MINIFI_HOME}/minifi-python/")
+    set(MINIFI_PATH_PYTHON_VENV "\${MINIFI_HOME}/minifi-python-env")
+    set(MINIFI_PATH_LOG_DIR "\${MINIFI_HOME}/logs")
+else()
+    message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+endif()
+
+configure_file(
+        config.yml.in
+        ${CMAKE_BINARY_DIR}/conf/config.yml
+        @ONLY
+)
+
+configure_file(
+        minifi.properties.in
+        ${CMAKE_BINARY_DIR}/conf/minifi.properties
+        @ONLY
+)
+
+configure_file(
+        minifi-log.properties.in
+        ${CMAKE_BINARY_DIR}/conf/minifi-log.properties
+        @ONLY
+)
+
+configure_file(
+        minifi-uid.properties.in
+        ${CMAKE_BINARY_DIR}/conf/minifi-uid.properties
+        @ONLY
+)
+
+
+if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+    install(FILES
+            ${CMAKE_BINARY_DIR}/conf/minifi.properties
+            ${CMAKE_BINARY_DIR}/conf/minifi-log.properties
+            ${CMAKE_BINARY_DIR}/conf/minifi-uid.properties
+            ${CMAKE_BINARY_DIR}/conf/config.yml
+            DESTINATION /${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME}
+            COMPONENT bin)
+elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+    install(FILES
+            ${CMAKE_BINARY_DIR}/conf/minifi.properties
+            ${CMAKE_BINARY_DIR}/conf/minifi-log.properties
+            ${CMAKE_BINARY_DIR}/conf/minifi-uid.properties
+            ${CMAKE_BINARY_DIR}/conf/config.yml
+            DESTINATION conf
+            COMPONENT bin)
+else()
+    message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+endif()
diff --git a/conf/config.yml b/conf/config.yml.in
similarity index 100%
rename from conf/config.yml
rename to conf/config.yml.in
diff --git a/conf/minifi-log.properties b/conf/minifi-log.properties.in
similarity index 98%
rename from conf/minifi-log.properties
rename to conf/minifi-log.properties.in
index 04b32e5ed..dc6ac9397 100644
--- a/conf/minifi-log.properties
+++ b/conf/minifi-log.properties.in
@@ -26,7 +26,7 @@ spdlog.pattern=[%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v
 #spdlog.pattern=[%D %H:%M:%S.%e] [%L] %v
 
 appender.rolling=rollingappender
-#appender.rolling.directory=${MINIFI_HOME}/logs
+#appender.rolling.directory=@MINIFI_PATH_LOG_DIR@
 appender.rolling.file_name=minifi-app.log
 appender.rolling.max_files=1
 appender.rolling.max_file_size=20 MB
diff --git a/conf/minifi-uid.properties b/conf/minifi-uid.properties.in
similarity index 100%
rename from conf/minifi-uid.properties
rename to conf/minifi-uid.properties.in
diff --git a/conf/minifi.properties b/conf/minifi.properties.in
similarity index 93%
rename from conf/minifi.properties
rename to conf/minifi.properties.in
index ef5704fcd..01441816c 100644
--- a/conf/minifi.properties
+++ b/conf/minifi.properties.in
@@ -14,23 +14,23 @@
 # limitations under the License.
 
 # Core Properties #
-nifi.flow.configuration.file=./conf/config.yml
+nifi.flow.configuration.file=@MINIFI_PATH_FLOW_CONFIG@
 nifi.administrative.yield.duration=30 sec
 # If a component has no work to do (is "bored"), how long should we wait before checking again for work?
 nifi.bored.yield.duration=100 millis
 #nifi.flow.engine.threads=5
 
 # Comma separated path for the extension libraries. Relative path is relative to the minifi executable.
-nifi.extension.path=../extensions/*
+nifi.extension.path=@MINIFI_PATH_EXTENSIONS@
 
 # Provenance Repository #
-nifi.provenance.repository.directory.default=${MINIFI_HOME}/provenance_repository
+nifi.provenance.repository.directory.default=@MINIFI_PATH_PROVENANCE_REPO@
 nifi.provenance.repository.max.storage.time=1 MIN
 nifi.provenance.repository.max.storage.size=1 MB
-nifi.flowfile.repository.directory.default=${MINIFI_HOME}/flowfile_repository
+nifi.flowfile.repository.directory.default=@MINIFI_PATH_FLOWFILE_REPO@
 # nifi.flowfile.repository.rocksdb.compression=auto
 # nifi.flowfile.repository.check.health=true
-nifi.database.content.repository.directory.default=${MINIFI_HOME}/content_repository
+nifi.database.content.repository.directory.default=@MINIFI_PATH_CONTENT_REPO@
 nifi.provenance.repository.class.name=NoOpRepository
 nifi.content.repository.class.name=DatabaseContentRepository
 # nifi.content.repository.rocksdb.compression=auto
@@ -132,7 +132,7 @@ nifi.c2.full.heartbeat=false
 #controller.ssl.context.service=SSLContextService
 
 ## specify the destination of c2 directed assets
-#nifi.asset.directory=${MINIFI_HOME}/asset
+nifi.asset.directory=@MINIFI_PATH_ASSET_DIR@
 
 ## You probably don't need to touch this, but you can if you want to
 # nifi.default.internal.buffer.size=4096
@@ -144,8 +144,8 @@ nifi.c2.full.heartbeat=false
 # nifi.metrics.publisher.metrics=QueueMetrics,RepositoryMetrics,GetFileMetrics,DeviceInfoNode,FlowInformation
 
 # Python processor properties
-nifi.python.processor.dir=${MINIFI_HOME}/minifi-python/
-nifi.python.virtualenv.directory=${MINIFI_HOME}/minifi-python-env
+nifi.python.processor.dir=@MINIFI_PATH_PYTHON_PROCESSORS@
+nifi.python.virtualenv.directory=@MINIFI_PATH_PYTHON_VENV@
 nifi.python.install.packages.automatically=true
 # nifi.python.env.setup.binary=python3
 
diff --git a/controller/CMakeLists.txt b/controller/CMakeLists.txt
index bea1c7eea..b06cf4ef8 100644
--- a/controller/CMakeLists.txt
+++ b/controller/CMakeLists.txt
@@ -33,29 +33,33 @@ set_cpp_version()
 
 set(MINIFI_CONTROLLER_SOURCES MiNiFiController.cpp Controller.cpp ../minifi_main/MainHelper.cpp)
 if (WIN32)
-    set(EXECUTABLE_FILE_NAME "minificontroller.exe")
+    set(EXECUTABLE_FILE_NAME "minifi-controller.exe")
     set(EXECUTABLE_FILE_DESCRIPTION "${PRODUCT_NAME} controller")
     configure_file(${CMAKE_SOURCE_DIR}/versioninfo.rc.in ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc @ONLY)
     list(APPEND MINIFI_CONTROLLER_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc")
 endif()
 
-add_minifi_executable(minificontroller ${MINIFI_CONTROLLER_SOURCES})
+add_minifi_executable(minifi-controller ${MINIFI_CONTROLLER_SOURCES})
 include(ArgParse)
-target_link_libraries(minificontroller ${LIBMINIFI} argparse Threads::Threads)
+target_link_libraries(minifi-controller ${LIBMINIFI} argparse Threads::Threads)
 
-set_target_properties(minificontroller PROPERTIES
-    OUTPUT_NAME minificontroller
+set_target_properties(minifi-controller PROPERTIES
+    OUTPUT_NAME minifi-controller
     RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
 
 if (NOT WIN32)
     if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT APPLE)
-        target_link_options(minificontroller PRIVATE "-Wl,--disable-new-dtags")
+        target_link_options(minifi-controller PRIVATE "-Wl,--disable-new-dtags")
     endif()
-    if (APPLE)
-        set_target_properties(minificontroller PROPERTIES INSTALL_RPATH "@loader_path")
+    if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+        set_target_properties(minifi-controller PROPERTIES INSTALL_RPATH "/usr/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")
     else()
-        set_target_properties(minificontroller PROPERTIES INSTALL_RPATH "$ORIGIN")
+        if (APPLE)
+            set_target_properties(minifi-controller PROPERTIES INSTALL_RPATH "@loader_path")
+        else()
+            set_target_properties(minifi-controller PROPERTIES INSTALL_RPATH "$ORIGIN")
+        endif()
     endif()
 endif()
 
-install(TARGETS minificontroller RUNTIME DESTINATION bin COMPONENT bin)
+install(TARGETS minifi-controller RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin)
diff --git a/controller/MiNiFiController.cpp b/controller/MiNiFiController.cpp
index 2c1f7a356..baecdf0c6 100644
--- a/controller/MiNiFiController.cpp
+++ b/controller/MiNiFiController.cpp
@@ -22,6 +22,7 @@
 #include <vector>
 
 #include "Controller.h"
+#include "Defaults.h"
 #include "Exception.h"
 #include "MainHelper.h"
 #include "agent/agent_version.h"
@@ -33,6 +34,7 @@
 #include "core/extension/ExtensionManager.h"
 #include "properties/Configure.h"
 #include "range/v3/algorithm/contains.hpp"
+#include "utils/Environment.h"
 
 namespace minifi = org::apache::nifi::minifi;
 
@@ -91,19 +93,20 @@ std::shared_ptr<minifi::controllers::SSLContextServiceInterface> getSSLContextSe
 int main(int argc, char **argv) {
   const auto logger = minifi::core::logging::LoggerConfiguration::getConfiguration().getLogger("controller");
 
-  const auto minifi_home = determineMinifiHome(logger);
-  if (minifi_home.empty()) {
-    // determineMinifiHome already logged everything we need
+  const auto locations = minifi::determineLocations(logger);
+  if (!locations) {
+    // determineLocations already logged everything we need
     return -1;
   }
+  minifi::utils::Environment::setEnvironmentVariable(std::string(MINIFI_WORKING_DIR).c_str(), locations->working_dir_.string().c_str());
+
 
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(minifi_home);
-  configuration->loadConfigureFile(DEFAULT_NIFI_PROPERTIES_FILE);
+  configuration->loadConfigureFile(locations->properties_path_);
+
+  const auto log_properties = std::make_shared<minifi::core::logging::LoggerProperties>(locations->logs_dir_);
+  log_properties->loadConfigureFile(locations->log_properties_path_, "nifi.log.");
 
-  const auto log_properties = std::make_shared<minifi::core::logging::LoggerProperties>();
-  log_properties->setHome(minifi_home);
-  log_properties->loadConfigureFile(DEFAULT_LOG_PROPERTIES_FILE);
   minifi::core::logging::LoggerConfiguration::getConfiguration().initialize(log_properties);
 
   minifi::utils::net::SocketData socket_data;
diff --git a/core-framework/include/Defaults.h b/core-framework/include/Defaults.h
new file mode 100644
index 000000000..2f809914c
--- /dev/null
+++ b/core-framework/include/Defaults.h
@@ -0,0 +1,32 @@
+/**
+ * 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.
+ */
+
+#pragma once
+
+#include <filesystem>
+#include <string_view>
+
+const inline std::filesystem::path DEFAULT_NIFI_CONFIG_YML = std::filesystem::path("conf") / "config.yml";
+const inline std::filesystem::path DEFAULT_NIFI_CONFIG_JSON = std::filesystem::path("conf") / "config.json";
+const inline std::filesystem::path DEFAULT_NIFI_PROPERTIES_FILE = std::filesystem::path("conf") / "minifi.properties";
+const inline std::filesystem::path DEFAULT_LOG_PROPERTIES_FILE = std::filesystem::path("conf") / "minifi-log.properties";
+const inline std::filesystem::path DEFAULT_UID_PROPERTIES_FILE = std::filesystem::path("conf") / "minifi-uid.properties";
+const inline std::filesystem::path DEFAULT_BOOTSTRAP_FILE = std::filesystem::path("conf") / "bootstrap.conf";
+
+constexpr inline std::string_view MINIFI_HOME_ENV_KEY = "MINIFI_HOME";
+constexpr inline std::string_view MINIFI_WORKING_DIR = "MINIFI_WORKING_DIR";
+constexpr inline std::string_view MINIFI_HOME_ENV_VALUE_FHS = "FHS";
diff --git a/core-framework/include/core/ProcessContext.h b/core-framework/include/core/ProcessContext.h
index 83c80b4ed..a89b5c7df 100644
--- a/core-framework/include/core/ProcessContext.h
+++ b/core-framework/include/core/ProcessContext.h
@@ -110,14 +110,6 @@ class ProcessContextImpl : public core::VariableRegistryImpl, public virtual Pro
     return controller_service;
   }
 
-  void initializeContentRepository(const std::string& home) override {
-    configure_->setHome(home);
-    content_repo_->initialize(configure_);
-    initialized_ = true;
-  }
-
-  bool isInitialized() const override { return initialized_; }
-
   static constexpr char const* DefaultStateStorageName = "defaultstatestorage";
 
   StateManager* getStateManager() override;
@@ -213,7 +205,6 @@ class ProcessContextImpl : public core::VariableRegistryImpl, public virtual Pro
   Processor& processor_;
   gsl::not_null<std::shared_ptr<Configure>> configure_;
   std::unique_ptr<ProcessorInfo> info_;
-  bool initialized_;
 };
 
 }  // namespace org::apache::nifi::minifi::core
diff --git a/core-framework/include/utils/Environment.h b/core-framework/include/utils/Environment.h
index 6f47f27dd..bcc820169 100644
--- a/core-framework/include/utils/Environment.h
+++ b/core-framework/include/utils/Environment.h
@@ -35,7 +35,7 @@ class Environment {
    * Gets an environment variable using the native OS API
    * @param name the name of the environment variable
    * @return a pair consisting of a bool indicating whether the environment variable is set
-   * and an std::string containing the value of the environemnt variable
+   * and an std::string containing the value of the environment variable
    */
   static std::optional<std::string> getEnvironmentVariable(const char* name);
 
diff --git a/core-framework/include/utils/Locations.h b/core-framework/include/utils/Locations.h
new file mode 100644
index 000000000..89e127422
--- /dev/null
+++ b/core-framework/include/utils/Locations.h
@@ -0,0 +1,43 @@
+/**
+* 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.
+ */
+#pragma once
+
+#include <filesystem>
+
+#include "Environment.h"
+#include "file/FileUtils.h"
+#include "Defaults.h"
+
+namespace org::apache::nifi::minifi::utils {
+inline std::string_view getDefaultExtensionsPattern() {
+  static constexpr std::string_view DEFAULT_EXTENSION_PATH = "../extensions/*";
+  static constexpr std::string_view DEFAULT_EXTENSION_PATH_RPM = RPM_LIB_DIR "/extensions/*";
+  if (Environment::getEnvironmentVariable(std::string(MINIFI_HOME_ENV_KEY).c_str()) == MINIFI_HOME_ENV_VALUE_FHS || file::get_executable_path().parent_path() == "/usr/bin") {
+    return DEFAULT_EXTENSION_PATH_RPM;
+  }
+  return DEFAULT_EXTENSION_PATH;
+}
+
+inline std::filesystem::path getMinifiDir() {
+  if (const auto working_dir_from_env = Environment::getEnvironmentVariable(std::string(MINIFI_WORKING_DIR).c_str())) {
+    return *working_dir_from_env;
+  }
+
+  // we should probably terminate instead, but tests rely on this behaviour
+  return "";
+}
+}  // namespace org::apache::nifi::minifi::utils
diff --git a/core-framework/src/utils/crypto/EncryptionManager.cpp b/core-framework/src/utils/crypto/EncryptionManager.cpp
index 3cedac44c..7e20b53de 100644
--- a/core-framework/src/utils/crypto/EncryptionManager.cpp
+++ b/core-framework/src/utils/crypto/EncryptionManager.cpp
@@ -26,16 +26,14 @@ namespace org::apache::nifi::minifi::utils::crypto {
 
 std::optional<Bytes> EncryptionManager::readKey(const std::string& key_name) const {
   auto bootstrap_conf = minifi::Properties::create();
-  bootstrap_conf->setHome(key_dir_);
-  bootstrap_conf->loadConfigureFile(DEFAULT_NIFI_BOOTSTRAP_FILE);
+  bootstrap_conf->loadConfigureFile(key_dir_ / DEFAULT_NIFI_BOOTSTRAP_FILE);
   return bootstrap_conf->getString(key_name)
          | utils::transform([](const std::string &encryption_key_hex) { return utils::string::from_hex(encryption_key_hex); });
 }
 
 bool EncryptionManager::writeKey(const std::string &key_name, const Bytes& key) const {
   auto bootstrap_conf = minifi::Properties::create();
-  bootstrap_conf->setHome(key_dir_);
-  bootstrap_conf->loadConfigureFile(DEFAULT_NIFI_BOOTSTRAP_FILE);
+  bootstrap_conf->loadConfigureFile(key_dir_ / DEFAULT_NIFI_BOOTSTRAP_FILE);
   bootstrap_conf->set(key_name, utils::string::to_hex(key));
   return bootstrap_conf->commitChanges();
 }
diff --git a/deploy.sh b/deploy.sh
index 2eeadb5ba..f1df2ffc2 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -24,5 +24,5 @@ echo "${build_identifier}" > build_identifier
 ./bootstrap.sh -d -p --build_identifier="${build_identifier}"
 
 pushd build || exit 1
-./controller/minificontroller --manifest >> build_output
+./controller/minifi-controller --manifest >> build_output
 popd || exit 2
diff --git a/docker/DockerBuild.sh b/docker/DockerBuild.sh
index 12a9a2982..ad03bd000 100755
--- a/docker/DockerBuild.sh
+++ b/docker/DockerBuild.sh
@@ -230,6 +230,7 @@ fi
 
 if [ -n "${DUMP_LOCATION}" ]; then
   container_id=$(docker create "${TAG}")
-  docker cp "${container_id}:/opt/minifi/build/nifi-minifi-cpp-${MINIFI_VERSION}.tar.gz" "${DUMP_LOCATION}/nifi-minifi-cpp-${MINIFI_VERSION}-${TARGZ_TAG}.tar.gz"
+  docker cp "${container_id}:/opt/minifi/build/nifi-minifi-cpp-${MINIFI_VERSION}.tar.gz" "${DUMP_LOCATION}/nifi-minifi-cpp-${MINIFI_VERSION}-${TARGZ_TAG}.tar.gz" || true
+  docker cp "${container_id}:/opt/minifi/build/nifi-minifi-cpp-${MINIFI_VERSION}.rpm" "${DUMP_LOCATION}/nifi-minifi-cpp-${MINIFI_VERSION}-${TARGZ_TAG}.rpm" || true
   docker rm -f "${container_id}"
 fi
diff --git a/docker/DockerVerify.sh b/docker/DockerVerify.sh
index 501cab174..515f205d7 100755
--- a/docker/DockerVerify.sh
+++ b/docker/DockerVerify.sh
@@ -177,7 +177,7 @@ TEST_DIRECTORY="${docker_dir}/test/integration"
 export TEST_DIRECTORY
 
 # Add --no-logcapture to see logs interleaved with the test output
-BEHAVE_OPTS=(--logging-level INFO --parallel-processes "${_arg_parallel_processes}" --parallel-scheme feature -o "${PWD}/behavex_output" -t "${_arg_tags_to_run}")
+BEHAVE_OPTS=(--show-progress-bar --logging-level INFO --parallel-processes "${_arg_parallel_processes}" --parallel-scheme feature -o "${PWD}/behavex_output" -t "${_arg_tags_to_run}")
 if ! test -z "${_arg_tags_to_exclude}"
 then
   IFS=','
diff --git a/docker/python-verify/installed.Dockerfile b/docker/installed/installed.Dockerfile
similarity index 100%
copy from docker/python-verify/installed.Dockerfile
copy to docker/installed/installed.Dockerfile
diff --git a/docker/python-verify/installed.dockerignore b/docker/installed/installed.dockerignore
similarity index 100%
rename from docker/python-verify/installed.dockerignore
rename to docker/installed/installed.dockerignore
diff --git a/docker/python-verify/installed.Dockerfile b/docker/installed/rpm.Dockerfile
similarity index 66%
rename from docker/python-verify/installed.Dockerfile
rename to docker/installed/rpm.Dockerfile
index 2b177976f..374aebcf5 100644
--- a/docker/python-verify/installed.Dockerfile
+++ b/docker/installed/rpm.Dockerfile
@@ -27,20 +27,14 @@ ARG UID=1001
 ARG GID=1001
 
 ENV USER minificpp
-ENV MINIFI_BASE_DIR /opt/minifi
-ENV MINIFI_HOME ${MINIFI_BASE_DIR}/minifi-current
-ENV MINIFI_VERSIONED_HOME ${MINIFI_BASE_DIR}/nifi-minifi-cpp-${MINIFI_VERSION}
+ENV MINIFI_HOME="FHS"
 
 
-RUN groupadd -g ${GID} ${USER} && useradd -m -g ${GID} ${USER} && \
-    install -d -o ${USER} -g ${USER} ${MINIFI_BASE_DIR} && ln -s ${MINIFI_VERSIONED_HOME} ${MINIFI_HOME}
-
-ADD ${ARCHIVE_LOCATION} ${MINIFI_BASE_DIR}
-RUN chown -R ${USER}:${USER} /opt/minifi  \
-    && /bin/bash -c "${INSTALL_PACKAGE_CMD}"
+COPY ${ARCHIVE_LOCATION} /tmp/minifi.rpm
+RUN /bin/bash -c "${INSTALL_PACKAGE_CMD}" \
+    && rpm -i /tmp/minifi.rpm
 
 USER ${USER}
-WORKDIR ${MINIFI_HOME}
 
 # Start MiNiFi CPP in the foreground
-CMD ["./bin/minifi.sh", "run"]
+CMD ["/usr/bin/minifi"]
diff --git a/docker/rockylinux/Dockerfile b/docker/rockylinux/Dockerfile
index a46953d9b..282b16d6b 100644
--- a/docker/rockylinux/Dockerfile
+++ b/docker/rockylinux/Dockerfile
@@ -30,17 +30,18 @@ ARG MINIFI_OPTIONS=""
 ARG CMAKE_BUILD_TYPE=Release
 ARG DOCKER_SKIP_TESTS=ON
 ARG DOCKER_MAKE_TARGET="all"
+ARG DOCKER_CREATE_RPM=ON
 
-ENV MINIFI_BASE_DIR /opt/minifi
-ENV MINIFI_HOME $MINIFI_BASE_DIR/nifi-minifi-cpp-$MINIFI_VERSION
-ENV USER minificpp
+ENV MINIFI_BASE_DIR=/opt/minifi
+ENV MINIFI_HOME=$MINIFI_BASE_DIR/nifi-minifi-cpp-$MINIFI_VERSION
+ENV USER=minificpp
 
 RUN mkdir -p $MINIFI_BASE_DIR
 COPY . ${MINIFI_BASE_DIR}
 
 # Install the system dependencies needed for a build
 # ccache is in EPEL
-RUN dnf -y install epel-release && dnf -y install gcc-toolset-12 sudo git which make libarchive ccache ca-certificates perl patch bison flex libtool cmake && \
+RUN dnf -y install epel-release && dnf -y install gcc-toolset-12 sudo git which make libarchive ccache ca-certificates perl patch bison flex libtool cmake rpmdevtools && \
     if echo "$MINIFI_OPTIONS" | grep -q "ENABLE_ALL=ON"; then dnf -y --enablerepo=devel install python3-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
@@ -66,3 +67,13 @@ RUN cd $MINIFI_BASE_DIR && \
     export CCACHE_DIR=${MINIFI_BASE_DIR}/.ccache && \
     cmake -DSTATIC_BUILD= -DSKIP_TESTS=${DOCKER_SKIP_TESTS} ${MINIFI_OPTIONS} -DAWS_ENABLE_UNITY_BUILD=OFF -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" .. && \
     make -j "$(nproc)" ${DOCKER_MAKE_TARGET}
+
+# Perform RPM build
+RUN if [[ "${DOCKER_CREATE_RPM}" == "ON" ]] ; then  \
+        cd $MINIFI_BASE_DIR && \
+        cd build && \
+        source /opt/rh/gcc-toolset-12/enable && \
+        cmake -DMINIFI_PACKAGING_TYPE=RPM .. && \
+        make -j "$(nproc)" package&& \
+        ../packaging/rpm/check_rpm_contents.sh *.rpm expected-rpm-contents.txt; \
+    fi \
diff --git a/docker/test/integration/cluster/ContainerStore.py b/docker/test/integration/cluster/ContainerStore.py
index 733e03b6a..9b5cba6b3 100644
--- a/docker/test/integration/cluster/ContainerStore.py
+++ b/docker/test/integration/cluster/ContainerStore.py
@@ -313,6 +313,9 @@ class ContainerStore:
         else:
             raise Exception('invalid flow engine: \'%s\'' % engine)
 
+    def acquire_transient_minifi(self, context, container_name: str, engine='minifi-cpp'):
+        self.acquire_container(context=context, container_name=container_name, engine=engine, command=["/bin/sh", "-c", "timeout 10s {run_minifi} && sleep 100".format(run_minifi=MinifiContainer.MINIFI_LOCATIONS.run_minifi_cmd)])
+
     def deploy_container(self, container_name: str):
         container_name = self.get_container_name_with_postfix(container_name)
         if container_name is None or container_name not in self.containers:
diff --git a/docker/test/integration/cluster/DockerTestCluster.py b/docker/test/integration/cluster/DockerTestCluster.py
index 150c5e7fe..aac42d4aa 100644
--- a/docker/test/integration/cluster/DockerTestCluster.py
+++ b/docker/test/integration/cluster/DockerTestCluster.py
@@ -68,6 +68,9 @@ class DockerTestCluster:
     def acquire_container(self, context, name: str, engine: str = 'minifi-cpp', command=None):
         return self.container_store.acquire_container(context=context, container_name=name, engine=engine, command=command)
 
+    def acquire_transient_minifi(self, context, name: str, engine: str = 'minifi-cpp'):
+        return self.container_store.acquire_transient_minifi(context=context, container_name=name, engine=engine)
+
     def deploy_container(self, name):
         self.container_store.deploy_container(name)
 
@@ -329,7 +332,7 @@ class DockerTestCluster:
 
     def wait_for_container_startup_to_finish(self, container_name):
         container_name = self.container_store.get_container_name_with_postfix(container_name)
-        startup_success = self.wait_for_startup_log(container_name, 300)
+        startup_success = self.wait_for_startup_log(container_name, 160)
         if not startup_success:
             logging.error("Cluster startup failed for %s", container_name)
             return False
diff --git a/docker/test/integration/cluster/ImageStore.py b/docker/test/integration/cluster/ImageStore.py
index 723591e4a..108dc7d0f 100644
--- a/docker/test/integration/cluster/ImageStore.py
+++ b/docker/test/integration/cluster/ImageStore.py
@@ -130,8 +130,10 @@ class ImageStore:
     def __build_minifi_cpp_image_with_example_minifi_python_processors(self):
         dockerfile = dedent("""\
                 FROM {base_image}
-                RUN cp -r /opt/minifi/minifi-current/minifi-python-examples /opt/minifi/minifi-current/minifi-python/examples
-                """.format(base_image='apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION))
+                RUN cp -r {minifi_python_examples_dir} {minifi_python_dir}/examples
+                """.format(base_image='apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION,
+                           minifi_python_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_dir_path,
+                           minifi_python_examples_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_examples))
 
         return self.__build_image(dockerfile)
 
@@ -145,18 +147,18 @@ class ImageStore:
         # /class ProcessorDetails:/,/^$/: Do the following between 'class ProcessorDetails:' and the first empty line (so we don't modify other PropertyDescriptor blocks below)
         # /^\s*dependencies\s*=/,/\]\s*$/: Do the following between 'dependencies =' at the start of a line, and ']' at the end of a line
         # d: Delete line
-        parse_document_sed_cmd = 'sed -i "/class ProcessorDetails:/,/^$/{/^\\s*dependencies\\s*=/,/\\]\\s*$/d}" /opt/minifi/minifi-current/minifi-python/nifi_python_processors/ParseDocument.py && \\'
-        chunk_document_sed_cmd = 'sed -i "/class ProcessorDetails:/,/^$/{/^\\s*dependencies\\s*=/,/\\]\\s*$/d}" /opt/minifi/minifi-current/minifi-python/nifi_python_processors/ChunkDocument.py && \\'
+        parse_document_sed_cmd = 'sed -i "/class ProcessorDetails:/,/^$/{{/^\\s*dependencies\\s*=/,/\\]\\s*$/d}}" {minifi_python_dir}/nifi_python_processors/ParseDocument.py && \\'.format(minifi_python_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_dir_path)
+        chunk_document_sed_cmd = 'sed -i "/class ProcessorDetails:/,/^$/{{/^\\s*dependencies\\s*=/,/\\]\\s*$/d}}" {minifi_python_dir}/nifi_python_processors/ChunkDocument.py && \\'.format(minifi_python_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_dir_path)
         if python_option == PythonWithDependenciesOptions.SYSTEM_INSTALLED_PACKAGES:
             if not MinifiContainer.MINIFI_TAG_PREFIX or "bookworm" in MinifiContainer.MINIFI_TAG_PREFIX or "noble" in MinifiContainer.MINIFI_TAG_PREFIX:
                 additional_cmd = "RUN pip3 install --break-system-packages 'langchain<=0.17.0'"
             else:
                 additional_cmd = "RUN pip3 install 'langchain<=0.17.0'"
         elif python_option == PythonWithDependenciesOptions.REQUIREMENTS_FILE:
-            requirements_install_command = "echo 'langchain<=0.17.0' > /opt/minifi/minifi-current/minifi-python/nifi_python_processors/requirements.txt && \\"
+            requirements_install_command = "echo 'langchain<=0.17.0' > {minifi_python_dir}/nifi_python_processors/requirements.txt && \\".format(minifi_python_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_dir_path)
         elif python_option == PythonWithDependenciesOptions.INLINE_DEFINED_PACKAGES:
-            parse_document_sed_cmd = parse_document_sed_cmd[:-2] + ' sed -i "s/langchain==[0-9.]\\+/langchain<=0.17.0/" /opt/minifi/minifi-current/minifi-python/nifi_python_processors/ParseDocument.py && \\'
-            chunk_document_sed_cmd = 'sed -i "s/\\[\\\'langchain\\\'\\]/\\[\\\'langchain<=0.17.0\\\'\\]/" /opt/minifi/minifi-current/minifi-python/nifi_python_processors/ChunkDocument.py && \\'
+            parse_document_sed_cmd = parse_document_sed_cmd[:-2] + ' sed -i "s/langchain==[0-9.]\\+/langchain<=0.17.0/" {minifi_python_dir}/nifi_python_processors/ParseDocument.py && \\'.format(minifi_python_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_dir_path)
+            chunk_document_sed_cmd = 'sed -i "s/\\[\\\'langchain\\\'\\]/\\[\\\'langchain<=0.17.0\\\'\\]/" {minifi_python_dir}/nifi_python_processors/ChunkDocument.py && \\'.format(minifi_python_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_dir_path)
         if not MinifiContainer.MINIFI_TAG_PREFIX:
             pip3_install_command = "RUN apk --update --no-cache add py3-pip"
         dockerfile = dedent("""\
@@ -165,15 +167,15 @@ class ImageStore:
                 {pip3_install_command}
                 {additional_cmd}
                 USER minificpp
-                RUN wget {parse_document_url} --directory-prefix=/opt/minifi/minifi-current/minifi-python/nifi_python_processors && \\
-                    wget {chunk_document_url} --directory-prefix=/opt/minifi/minifi-current/minifi-python/nifi_python_processors && \\
-                    echo 'langchain<=0.17.0' > /opt/minifi/minifi-current/minifi-python/nifi_python_processors/requirements.txt && \\
+                RUN wget {parse_document_url} --directory-prefix={minifi_python_dir}/nifi_python_processors && \\
+                    wget {chunk_document_url} --directory-prefix={minifi_python_dir}/nifi_python_processors && \\
+                    echo 'langchain<=0.17.0' > {minifi_python_dir}/nifi_python_processors/requirements.txt && \\
                     {requirements_install_command}
                     {parse_document_sed_cmd}
                     {chunk_document_sed_cmd}
-                    python3 -m venv /opt/minifi/minifi-current/venv && \\
-                    python3 -m venv /opt/minifi/minifi-current/venv-with-langchain && \\
-                    . /opt/minifi/minifi-current/venv-with-langchain/bin/activate && python3 -m pip install --no-cache-dir "langchain<=0.17.0" && \\
+                    python3 -m venv {minifi_python_venv_parent}/venv && \\
+                    python3 -m venv {minifi_python_venv_parent}/venv-with-langchain && \\
+                    . {minifi_python_venv_parent}/venv-with-langchain/bin/activate && python3 -m pip install --no-cache-dir "langchain<=0.17.0" && \\
                     deactivate
                 """.format(base_image='apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION,
                            pip3_install_command=pip3_install_command,
@@ -182,7 +184,9 @@ class ImageStore:
                            additional_cmd=additional_cmd,
                            requirements_install_command=requirements_install_command,
                            parse_document_sed_cmd=parse_document_sed_cmd,
-                           chunk_document_sed_cmd=chunk_document_sed_cmd))
+                           chunk_document_sed_cmd=chunk_document_sed_cmd,
+                           minifi_python_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_dir_path,
+                           minifi_python_venv_parent=MinifiContainer.MINIFI_LOCATIONS.minifi_python_venv_parent))
         return self.__build_image(dockerfile)
 
     def __build_minifi_cpp_image_with_nifi_python_processors(self):
@@ -194,21 +198,24 @@ class ImageStore:
                 USER root
                 {pip3_install_command}
                 USER minificpp
-                COPY RotatingForwarder.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/RotatingForwarder.py
-                COPY SpecialPropertyTypeChecker.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/SpecialPropertyTypeChecker.py
-                COPY ProcessContextInterfaceChecker.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/ProcessContextInterfaceChecker.py
-                COPY CreateFlowFile.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/CreateFlowFile.py
-                COPY FailureWithAttributes.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/FailureWithAttributes.py
-                COPY subtractutils.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/compute/subtractutils.py
-                COPY RelativeImporterProcessor.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/compute/processors/RelativeImporterProcessor.py
-                COPY multiplierutils.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/compute/processors/multiplierutils.py
-                COPY CreateNothing.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/CreateNothing.py
-                COPY FailureWithContent.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/FailureWithContent.py
-                COPY TransferToOriginal.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/TransferToOriginal.py
-                COPY SetRecordField.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/SetRecordField.py
-                COPY TestStateManager.py /opt/minifi/minifi-current/minifi-python/nifi_python_processors/TestStateManager.py
-                RUN python3 -m venv /opt/minifi/minifi-current/venv
-                """.format(base_image='apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION, pip3_install_command=pip3_install_command))
+                COPY RotatingForwarder.py {minifi_python_dir}/nifi_python_processors/RotatingForwarder.py
+                COPY SpecialPropertyTypeChecker.py {minifi_python_dir}/nifi_python_processors/SpecialPropertyTypeChecker.py
+                COPY ProcessContextInterfaceChecker.py {minifi_python_dir}/nifi_python_processors/ProcessContextInterfaceChecker.py
+                COPY CreateFlowFile.py {minifi_python_dir}/nifi_python_processors/CreateFlowFile.py
+                COPY FailureWithAttributes.py {minifi_python_dir}/nifi_python_processors/FailureWithAttributes.py
+                COPY subtractutils.py {minifi_python_dir}/nifi_python_processors/compute/subtractutils.py
+                COPY RelativeImporterProcessor.py {minifi_python_dir}/nifi_python_processors/compute/processors/RelativeImporterProcessor.py
+                COPY multiplierutils.py {minifi_python_dir}/nifi_python_processors/compute/processors/multiplierutils.py
+                COPY CreateNothing.py {minifi_python_dir}/nifi_python_processors/CreateNothing.py
+                COPY FailureWithContent.py {minifi_python_dir}/nifi_python_processors/FailureWithContent.py
+                COPY TransferToOriginal.py {minifi_python_dir}/nifi_python_processors/TransferToOriginal.py
+                COPY SetRecordField.py {minifi_python_dir}/nifi_python_processors/SetRecordField.py
+                COPY TestStateManager.py {minifi_python_dir}/nifi_python_processors/TestStateManager.py
+                RUN python3 -m venv {minifi_python_venv_parent}/venv
+                """.format(base_image='apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION,
+                           pip3_install_command=pip3_install_command,
+                           minifi_python_dir=MinifiContainer.MINIFI_LOCATIONS.minifi_python_dir_path,
+                           minifi_python_venv_parent=MinifiContainer.MINIFI_LOCATIONS.minifi_python_venv_parent))
 
         def build_full_python_resource_path(resource):
             return os.path.join(self.test_dir, "resources", "python", resource)
@@ -232,8 +239,9 @@ class ImageStore:
     def __build_minifi_cpp_image_with_llamacpp_model(self):
         dockerfile = dedent("""\
                 FROM {base_image}
-                RUN mkdir /opt/minifi/minifi-current/models && wget https://huggingface.co/bartowski/Qwen2-0.5B-Instruct-GGUF/resolve/main/Qwen2-0.5B-Instruct-IQ3_M.gguf --directory-prefix=/opt/minifi/minifi-current/models
-                """.format(base_image='apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION))
+                RUN mkdir {models_path} && wget https://huggingface.co/bartowski/Qwen2-0.5B-Instruct-GGUF/resolve/main/Qwen2-0.5B-Instruct-IQ3_M.gguf --directory-prefix={models_path}
+                """.format(base_image='apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION,
+                           models_path=MinifiContainer.MINIFI_LOCATIONS.models_path))
 
         return self.__build_image(dockerfile)
 
diff --git a/docker/test/integration/cluster/MinifiControllerExecutor.py b/docker/test/integration/cluster/MinifiControllerExecutor.py
index 8da19835c..880e43e74 100644
--- a/docker/test/integration/cluster/MinifiControllerExecutor.py
+++ b/docker/test/integration/cluster/MinifiControllerExecutor.py
@@ -14,6 +14,7 @@
 # limitations under the License.
 import logging
 from .DockerCommunicator import DockerCommunicator
+from .containers.MinifiContainer import MinifiContainer
 
 
 class MinifiControllerExecutor:
@@ -21,24 +22,24 @@ class MinifiControllerExecutor:
         self.container_communicator = container_communicator
 
     def update_flow(self, container_name: str):
-        self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--updateflow", "/tmp/resources/minifi-controller/config.yml"])
+        self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--updateflow", "/tmp/resources/minifi-controller/config.yml"])
 
     def updated_config_is_persisted(self, container_name: str) -> bool:
-        (code, output) = self.container_communicator.execute_command(container_name, ["cat", "/opt/minifi/minifi-current/conf/config.yml"])
+        (code, output) = self.container_communicator.execute_command(container_name, ["cat", MinifiContainer.MINIFI_LOCATIONS.config_path])
         return code == 0 and "2f2a3b47-f5ba-49f6-82b5-bc1c86b96f38" in output
 
     def stop_component(self, component: str, container_name: str):
-        self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--stop", component])
+        self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--stop", component])
 
     def start_component(self, component: str, container_name: str):
-        self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--start", component])
+        self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--start", component])
 
     def is_component_running(self, component: str, container_name: str) -> bool:
-        (code, output) = self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--list", "components"])
+        (code, output) = self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--list", "components"])
         return code == 0 and component + ", running: true" in output
 
     def get_connections(self, container_name: str):
-        (_, output) = self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--list", "connections"])
+        (_, output) = self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--list", "connections"])
         connections = []
         for line in output.split('\n'):
             if not line.startswith('[') and not line.startswith('Connection Names'):
@@ -46,14 +47,14 @@ class MinifiControllerExecutor:
         return connections
 
     def get_full_connection_count(self, container_name: str) -> int:
-        (_, output) = self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--getfull"])
+        (_, output) = self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--getfull"])
         for line in output.split('\n'):
             if "are full" in line:
                 return int(line.split(' ')[0])
         return -1
 
     def get_connection_size(self, connection: str, container_name: str):
-        (_, output) = self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--getsize", connection])
+        (_, output) = self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--getsize", connection])
         for line in output.split('\n'):
             if "Size/Max of " + connection in line:
                 size_and_max = line.split(connection)[1].split('/')
@@ -61,7 +62,7 @@ class MinifiControllerExecutor:
         return (-1, -1)
 
     def get_manifest(self, container_name: str) -> str:
-        (_, output) = self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--manifest"])
+        (_, output) = self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--manifest"])
         manifest = ""
         for line in output.split('\n'):
             if not line.startswith('['):
@@ -69,9 +70,9 @@ class MinifiControllerExecutor:
         return manifest
 
     def get_debug_bundle(self, container_name: str, dest: str) -> bool:
-        (code, _) = self.container_communicator.execute_command(container_name, ["/opt/minifi/minifi-current/bin/minificontroller", "--debug", "/opt/minifi/minifi-current/"])
+        (code, _) = self.container_communicator.execute_command(container_name, [MinifiContainer.MINIFI_LOCATIONS.minifi_controller_path, "--debug", "/tmp"])
         if code != 0:
             logging.error("Minifi controller debug command failed with code: %d", code)
             return False
 
-        return self.container_communicator.copy_file_from_container(container_name, "/opt/minifi/minifi-current/debug.tar.gz", dest)
+        return self.container_communicator.copy_file_from_container(container_name, "/tmp/debug.tar.gz", dest)
diff --git a/docker/test/integration/cluster/containers/MinifiAsPodInKubernetesCluster.py b/docker/test/integration/cluster/containers/MinifiAsPodInKubernetesCluster.py
index 59488cc2f..4a660906c 100644
--- a/docker/test/integration/cluster/containers/MinifiAsPodInKubernetesCluster.py
+++ b/docker/test/integration/cluster/containers/MinifiAsPodInKubernetesCluster.py
@@ -29,7 +29,7 @@ class MinifiAsPodInKubernetesCluster(MinifiContainer):
 
     def __init__(self, feature_context, kubernetes_proxy, config_dir, minifi_options, name, vols, network, image_store, command=None):
         test_dir = os.environ['TEST_DIRECTORY']
-        shutil.copy(os.path.join(test_dir, os.pardir, os.pardir, os.pardir, 'conf', 'minifi.properties'), config_dir)
+        shutil.copy(os.path.join(test_dir, 'resources', 'kubernetes', 'minifi-conf', 'minifi.properties'), config_dir)
         shutil.copy(os.path.join(test_dir, 'resources', 'kubernetes', 'minifi-conf', 'minifi-log.properties'), config_dir)
         super().__init__(feature_context=feature_context,
                          config_dir=config_dir,
diff --git a/docker/test/integration/cluster/containers/MinifiContainer.py b/docker/test/integration/cluster/containers/MinifiContainer.py
index e6b3cf68a..dbbdc2143 100644
--- a/docker/test/integration/cluster/containers/MinifiContainer.py
+++ b/docker/test/integration/cluster/containers/MinifiContainer.py
@@ -51,10 +51,41 @@ class MinifiOptions:
         self.download_llama_model = False
 
 
+class MinifiLocations:
+    MINIFI_TAG_PREFIX = os.environ['MINIFI_TAG_PREFIX']
+    MINIFI_VERSION = os.environ['MINIFI_VERSION']
+
+    def __init__(self):
+        if "rpm" in MinifiLocations.MINIFI_TAG_PREFIX:
+            self.run_minifi_cmd = '/usr/bin/minifi'
+            self.config_path = '/etc/nifi-minifi-cpp/config.yml'
+            self.properties_path = '/etc/nifi-minifi-cpp/minifi.properties'
+            self.log_properties_path = '/etc/nifi-minifi-cpp/minifi-log.properties'
+            self.uid_properties_path = '/etc/nifi-minifi-cpp/minifi-uid.properties'
+            self.minifi_python_dir_path = '/var/lib/nifi-minifi-cpp/minifi-python'
+            self.minifi_python_venv_parent = '/var/lib/nifi-minifi-cpp'
+            self.minifi_python_examples = '/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples'
+            self.models_path = '/var/lib/nifi-minifi-cpp/models'
+            self.minifi_controller_path = '/usr/bin/minifi-controller'
+            self.minifi_home = '/var/lib/nifi-minifi-cpp'
+        else:
+            self.run_minifi_cmd = '/opt/minifi/minifi-current/bin/minifi.sh run'
+            self.config_path = '/opt/minifi/minifi-current/conf/config.yml'
+            self.properties_path = '/opt/minifi/minifi-current/conf/minifi.properties'
+            self.log_properties_path = '/opt/minifi/minifi-current/conf/minifi-log.properties'
+            self.uid_properties_path = '/opt/minifi/minifi-current/conf/minifi-uid.properties'
+            self.minifi_python_dir_path = '/opt/minifi/minifi-current/minifi-python'
+            self.minifi_python_examples = '/opt/minifi/minifi-current/minifi-python-examples'
+            self.minifi_python_venv_parent = '/opt/minifi/minifi-current'
+            self.models_path = '/opt/minifi/minifi-current/models'
+            self.minifi_controller_path = '/opt/minifi/minifi-current/bin/minifi-controller'
+            self.minifi_home = '/opt/minifi/minifi-current'
+
+
 class MinifiContainer(FlowContainer):
     MINIFI_TAG_PREFIX = os.environ['MINIFI_TAG_PREFIX']
     MINIFI_VERSION = os.environ['MINIFI_VERSION']
-    MINIFI_ROOT = '/opt/minifi/nifi-minifi-cpp-' + MINIFI_VERSION
+    MINIFI_LOCATIONS = MinifiLocations()
 
     def __init__(self, feature_context, config_dir, options, name, vols, network, image_store, command=None):
         self.options = options
@@ -99,6 +130,12 @@ class MinifiContainer(FlowContainer):
     def _create_properties(self):
         properties_file_path = os.path.join(self.container_specific_config_dir, 'minifi.properties')
         with open(properties_file_path, 'a') as f:
+            f.write("nifi.flow.configuration.file={conf_path}\n".format(conf_path=MinifiContainer.MINIFI_LOCATIONS.config_path))
+            f.write("nifi.provenance.repository.directory.default={minifi_home}/provenance_repository\n".format(minifi_home=MinifiContainer.MINIFI_LOCATIONS.minifi_home))
+            f.write("nifi.flowfile.repository.directory.default={minifi_home}/flowfile_repository\n".format(minifi_home=MinifiContainer.MINIFI_LOCATIONS.minifi_home))
+            f.write("nifi.database.content.repository.directory.default={minifi_home}/content_repository\n".format(minifi_home=MinifiContainer.MINIFI_LOCATIONS.minifi_home))
+            f.write("nifi.python.processor.dir={minifi_home}/minifi-python\n".format(minifi_home=MinifiContainer.MINIFI_LOCATIONS.minifi_home))
+
             if self.options.enable_c2:
                 f.write("nifi.c2.enable=true\n")
                 f.write(f"nifi.c2.rest.url=http://minifi-c2-server-{self.feature_context.id}:10090/c2/config/heartbeat\n")
@@ -157,9 +194,9 @@ class MinifiContainer(FlowContainer):
                 f.write("controller.socket.local.any.interface=false\n")
 
             if self.options.use_nifi_python_processors_with_virtualenv or self.options.remove_python_requirements_txt or self.options.use_nifi_python_processors_without_dependencies:
-                f.write("nifi.python.virtualenv.directory=/opt/minifi/minifi-current/venv\n")
+                f.write("nifi.python.virtualenv.directory={minifi_python_venv_parent}/venv\n".format(minifi_python_venv_parent=MinifiContainer.MINIFI_LOCATIONS.minifi_python_venv_parent))
             elif self.options.use_nifi_python_processors_with_virtualenv_packages_installed:
-                f.write("nifi.python.virtualenv.directory=/opt/minifi/minifi-current/venv-with-langchain\n")
+                f.write("nifi.python.virtualenv.directory={minifi_python_venv_parent}/venv-with-langchain\n".format(minifi_python_venv_parent=MinifiContainer.MINIFI_LOCATIONS.minifi_python_venv_parent))
 
             if self.options.use_nifi_python_processors_with_virtualenv or self.options.remove_python_requirements_txt:
                 f.write("nifi.python.install.packages.automatically=true\n")
@@ -173,10 +210,10 @@ class MinifiContainer(FlowContainer):
         self._create_properties()
         if not self.options.use_flow_config_from_url:
             self._create_config()
-            self.vols[os.path.join(self.container_specific_config_dir, 'config.yml')] = {"bind": os.path.join(MinifiContainer.MINIFI_ROOT, 'conf', 'config.yml'), "mode": "rw"}
+            self.vols[os.path.join(self.container_specific_config_dir, 'config.yml')] = {"bind": MinifiContainer.MINIFI_LOCATIONS.config_path, "mode": "rw"}
 
-        self.vols[os.path.join(self.container_specific_config_dir, 'minifi.properties')] = {"bind": os.path.join(MinifiContainer.MINIFI_ROOT, 'conf', 'minifi.properties'), "mode": "rw"}
-        self.vols[os.path.join(self.container_specific_config_dir, 'minifi-log.properties')] = {"bind": os.path.join(MinifiContainer.MINIFI_ROOT, 'conf', 'minifi-log.properties'), "mode": "rw"}
+        self.vols[os.path.join(self.container_specific_config_dir, 'minifi.properties')] = {"bind": MinifiContainer.MINIFI_LOCATIONS.properties_path, "mode": "rw"}
+        self.vols[os.path.join(self.container_specific_config_dir, 'minifi-log.properties')] = {"bind": MinifiContainer.MINIFI_LOCATIONS.log_properties_path, "mode": "rw"}
 
     def deploy(self):
         if not self.set_deployed():
@@ -203,7 +240,7 @@ class MinifiContainer(FlowContainer):
             image = 'apacheminificpp:' + MinifiContainer.MINIFI_TAG_PREFIX + MinifiContainer.MINIFI_VERSION
 
         if self.options.use_flow_config_from_url:
-            self.command = ["/bin/sh", "-c", "rm " + MinifiContainer.MINIFI_ROOT + "/conf/config.yml && ./bin/minifi.sh run"]
+            self.command = ["/bin/sh", "-c", "rm " + MinifiContainer.MINIFI_LOCATIONS.config_path + " && " + MinifiContainer.MINIFI_LOCATIONS.run_minifi_cmd]
 
         ports = {}
         if self.options.enable_prometheus or self.options.enable_prometheus_with_ssl:
diff --git a/docker/test/integration/features/MiNiFi_integration_test_driver.py b/docker/test/integration/features/MiNiFi_integration_test_driver.py
index bfe9e6739..27316150f 100644
--- a/docker/test/integration/features/MiNiFi_integration_test_driver.py
+++ b/docker/test/integration/features/MiNiFi_integration_test_driver.py
@@ -60,6 +60,9 @@ class MiNiFi_integration_test:
     def acquire_container(self, context, name, engine='minifi-cpp', command=None):
         return self.cluster.acquire_container(context=context, name=name, engine=engine, command=command)
 
+    def acquire_transient_minifi(self, context, name, engine='minifi-cpp'):
+        return self.cluster.acquire_transient_minifi(context=context, name=name, engine=engine)
+
     def start_kafka_broker(self, context):
         self.cluster.acquire_container(context=context, name='kafka-broker', engine='kafka-broker')
         self.cluster.deploy_container(name='kafka-broker')
diff --git a/docker/test/integration/features/couchbase.feature b/docker/test/integration/features/couchbase.feature
index 88c75020f..ecf4ce8a1 100644
--- a/docker/test/integration/features/couchbase.feature
+++ b/docker/test/integration/features/couchbase.feature
@@ -36,7 +36,7 @@ Feature: Executing Couchbase operations from MiNiFi-C++
     When a Couchbase server is started
     And all instances start up
 
-    Then the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 60 seconds
+    Then the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 100 seconds
     And the Minifi logs contain the following message: "key:couchbase.doc.id value:test_doc_id" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.cas value:[1-9][0-9]*" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.sequence.number value:[1-9][0-9]*" in less than 1 seconds
@@ -62,7 +62,7 @@ Feature: Executing Couchbase operations from MiNiFi-C++
     When a Couchbase server is started
     And all instances start up
 
-    Then the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 60 seconds
+    Then the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 100 seconds
     And the Minifi logs contain the following message: "key:couchbase.doc.id value:test_doc_id" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.cas value:[1-9][0-9]*" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.sequence.number value:[1-9][0-9]*" in less than 1 seconds
@@ -93,7 +93,7 @@ Feature: Executing Couchbase operations from MiNiFi-C++
     When a Couchbase server is started
     And all instances start up
 
-    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 60 seconds
+    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 100 seconds
     And the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 10 seconds
     And the Minifi logs contain the following message: "key:couchbase.doc.id value:test_doc_id" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.cas value:[1-9][0-9]*" in less than 1 seconds
@@ -124,7 +124,7 @@ Feature: Executing Couchbase operations from MiNiFi-C++
     When a Couchbase server is started
     And all instances start up
 
-    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 60 seconds
+    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 100 seconds
     And the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 10 seconds
     And the Minifi logs contain the following message: "key:couchbase.doc.id value:test_doc_id" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.cas value:[1-9][0-9]*" in less than 1 seconds
@@ -156,7 +156,7 @@ Feature: Executing Couchbase operations from MiNiFi-C++
     When a Couchbase server is started
     And all instances start up
 
-    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 60 seconds
+    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 100 seconds
     And the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 10 seconds
     And the Minifi logs contain the following message: "key:couchbase.doc.id value:test_doc_id" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.cas value:[1-9][0-9]*" in less than 1 seconds
@@ -184,7 +184,7 @@ Feature: Executing Couchbase operations from MiNiFi-C++
     When a Couchbase server is started
     And all instances start up
 
-    Then the Minifi logs contain the following message: "Failed to get content for document 'test_doc_id' from collection 'test_bucket._default._default' with the following exception: 'raw_binary_transcoder expects document to have BINARY common flags" in less than 60 seconds
+    Then the Minifi logs contain the following message: "Failed to get content for document 'test_doc_id' from collection 'test_bucket._default._default' with the following exception: 'raw_binary_transcoder expects document to have BINARY common flags" in less than 100 seconds
 
   Scenario: A MiNiFi instance can get data from test bucket with GetCouchbaseKey processor using SSL connection
     Given a GetFile processor with the "Input Directory" property set to "/tmp/input"
@@ -211,7 +211,7 @@ Feature: Executing Couchbase operations from MiNiFi-C++
     When a Couchbase server is started
     And all instances start up
 
-    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 60 seconds
+    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 100 seconds
     And the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 10 seconds
     And the Minifi logs contain the following message: "key:couchbase.doc.id value:test_doc_id" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.cas value:[1-9][0-9]*" in less than 1 seconds
@@ -241,7 +241,7 @@ Feature: Executing Couchbase operations from MiNiFi-C++
     When a Couchbase server is started
     And all instances start up
 
-    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 60 seconds
+    Then a flowfile with the JSON content '{"field1": "value1", "field2": "value2"}' is placed in the monitored directory in less than 100 seconds
     And the Minifi logs contain the following message: "key:couchbase.bucket value:test_bucket" in less than 10 seconds
     And the Minifi logs contain the following message: "key:couchbase.doc.id value:test_doc_id" in less than 1 seconds
     And the Minifi logs match the following regex: "key:couchbase.doc.cas value:[1-9][0-9]*" in less than 1 seconds
diff --git a/docker/test/integration/features/environment.py b/docker/test/integration/features/environment.py
index d98d2f3f5..c6422a34c 100644
--- a/docker/test/integration/features/environment.py
+++ b/docker/test/integration/features/environment.py
@@ -81,6 +81,9 @@ def before_feature(context, feature):
         if not is_x86:
             feature.skip("This feature is only x86/x64 compatible")
 
+    if "SKIP_RPM" in feature.tags and "rpm" in os.environ['MINIFI_TAG_PREFIX']:
+        feature.skip("This feature is not yet supported on RPM installed images")
+
     feature_id = shortuuid.uuid()
     context.feature_id = feature_id
     context.directory_bindings = DockerTestDirectoryBindings(feature_id)
diff --git a/docker/test/integration/features/kubernetes.feature b/docker/test/integration/features/kubernetes.feature
index 3b5c58737..a88dd417d 100644
--- a/docker/test/integration/features/kubernetes.feature
+++ b/docker/test/integration/features/kubernetes.feature
@@ -15,6 +15,7 @@
 
 @requires.kubernetes.cluster
 @ENABLE_KUBERNETES
+@SKIP_RPM
 Feature: TailFile can collect logs from Kubernetes pods
 
   Background:
diff --git a/docker/test/integration/features/steps/steps.py b/docker/test/integration/features/steps/steps.py
index 29e526f91..b624ecfcf 100644
--- a/docker/test/integration/features/steps/steps.py
+++ b/docker/test/integration/features/steps/steps.py
@@ -321,7 +321,7 @@ def step_impl(context):
 
 @given("a transient MiNiFi flow with the name \"{flow_name}\" is set up")
 def step_impl(context, flow_name):
-    context.test.acquire_container(context=context, name=flow_name, command=["/bin/sh", "-c", "timeout 10s ./bin/minifi.sh run && sleep 100"])
+    context.test.acquire_transient_minifi(context=context, name=flow_name)
 
 
 @given("the provenance repository is enabled in MiNiFi")
diff --git a/docker/test/integration/resources/kubernetes/minifi-conf/minifi.properties b/docker/test/integration/resources/kubernetes/minifi-conf/minifi.properties
new file mode 100644
index 000000000..0fdb377b1
--- /dev/null
+++ b/docker/test/integration/resources/kubernetes/minifi-conf/minifi.properties
@@ -0,0 +1,10 @@
+nifi.administrative.yield.duration=30 sec
+nifi.bored.yield.duration=100 millis
+
+nifi.provenance.repository.max.storage.time=1 MIN
+nifi.provenance.repository.max.storage.size=1 MB
+nifi.provenance.repository.class.name=NoOpRepository
+nifi.content.repository.class.name=DatabaseContentRepository
+
+nifi.c2.root.classes=DeviceInfoNode,AgentInformation,FlowInformation,AssetInformation
+nifi.c2.full.heartbeat=false
diff --git a/docker/test/integration/resources/minifi/minifi.properties b/docker/test/integration/resources/minifi/minifi.properties
index 69322f739..68dbec03c 100644
--- a/docker/test/integration/resources/minifi/minifi.properties
+++ b/docker/test/integration/resources/minifi/minifi.properties
@@ -1,13 +1,7 @@
-nifi.flow.configuration.file=./conf/config.yml
 nifi.administrative.yield.duration=30 sec
 nifi.bored.yield.duration=100 millis
-nifi.extension.path=../extensions/*
-nifi.provenance.repository.directory.default=${MINIFI_HOME}/provenance_repository
 nifi.provenance.repository.max.storage.time=1 MIN
 nifi.provenance.repository.max.storage.size=1 MB
-nifi.flowfile.repository.directory.default=${MINIFI_HOME}/flowfile_repository
 nifi.database.content.repository.directory.default=${MINIFI_HOME}/content_repository
 nifi.content.repository.class.name=DatabaseContentRepository
-
-nifi.python.processor.dir=${MINIFI_HOME}/minifi-python/
 nifi.flow.engine.threads=5
diff --git a/encrypt-config/CMakeLists.txt b/encrypt-config/CMakeLists.txt
index 05146bdb7..a6f728133 100644
--- a/encrypt-config/CMakeLists.txt
+++ b/encrypt-config/CMakeLists.txt
@@ -18,26 +18,26 @@
 
 file(GLOB ENCRYPT_CONFIG_FILES  "*.cpp")
 if (WIN32)
-    set(EXECUTABLE_FILE_NAME "encrypt-config.exe")
-    set(EXECUTABLE_FILE_DESCRIPTION "${PRODUCT_NAME} encrypt-config tool")
+    set(EXECUTABLE_FILE_NAME "minifi-encrypt-config.exe")
+    set(EXECUTABLE_FILE_DESCRIPTION "${PRODUCT_NAME} minifi-encrypt-config tool")
     configure_file(${CMAKE_SOURCE_DIR}/versioninfo.rc.in ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc @ONLY)
     list(APPEND ENCRYPT_CONFIG_FILES "${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc")
 endif()
-add_minifi_executable(encrypt-config "${ENCRYPT_CONFIG_FILES}")
-target_include_directories(encrypt-config PRIVATE ../libminifi/include)
+add_minifi_executable(minifi-encrypt-config "${ENCRYPT_CONFIG_FILES}")
+target_include_directories(minifi-encrypt-config PRIVATE ../libminifi/include)
 include(ArgParse)
-target_link_libraries(encrypt-config libsodium argparse core-minifi)
-set_target_properties(encrypt-config PROPERTIES OUTPUT_NAME encrypt-config)
-set_target_properties(encrypt-config PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+target_link_libraries(minifi-encrypt-config libsodium argparse core-minifi)
+set_target_properties(minifi-encrypt-config PROPERTIES OUTPUT_NAME minifi-encrypt-config)
+set_target_properties(minifi-encrypt-config PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
 
 if (NOT WIN32)
     if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT APPLE)
-        target_link_options(encrypt-config PRIVATE "-Wl,--disable-new-dtags")
+        target_link_options(minifi-encrypt-config PRIVATE "-Wl,--disable-new-dtags")
     endif()
     if (APPLE)
-        set_target_properties(encrypt-config PROPERTIES INSTALL_RPATH "@loader_path")
+        set_target_properties(minifi-encrypt-config PROPERTIES INSTALL_RPATH "@loader_path")
     else()
-        set_target_properties(encrypt-config PROPERTIES INSTALL_RPATH "$ORIGIN")
+        set_target_properties(minifi-encrypt-config PROPERTIES INSTALL_RPATH "$ORIGIN")
     endif()
 endif()
-install(TARGETS encrypt-config RUNTIME DESTINATION bin COMPONENT bin)
+install(TARGETS minifi-encrypt-config RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin)
diff --git a/encrypt-config/EncryptConfig.cpp b/encrypt-config/EncryptConfig.cpp
index 0f8ffb912..064bd939a 100644
--- a/encrypt-config/EncryptConfig.cpp
+++ b/encrypt-config/EncryptConfig.cpp
@@ -23,13 +23,13 @@
 #include <optional>
 #include <stdexcept>
 
+#include "../core-framework/include/Defaults.h"
 #include "ConfigFile.h"
 #include "ConfigFileEncryptor.h"
+#include "FlowConfigEncryptor.h"
+#include "core/extension/ExtensionManager.h"
 #include "utils/Enum.h"
 #include "utils/file/FileUtils.h"
-#include "Defaults.h"
-#include "core/extension/ExtensionManager.h"
-#include "FlowConfigEncryptor.h"
 
 namespace {
 constexpr std::string_view ENCRYPTION_KEY_PROPERTY_NAME = "nifi.bootstrap.sensitive.key";
diff --git a/encrypt-config/FlowConfigEncryptor.cpp b/encrypt-config/FlowConfigEncryptor.cpp
index fa14954ae..c8ff85fa9 100644
--- a/encrypt-config/FlowConfigEncryptor.cpp
+++ b/encrypt-config/FlowConfigEncryptor.cpp
@@ -16,16 +16,16 @@
  */
 #include "FlowConfigEncryptor.h"
 
-#include "core/extension/ExtensionManager.h"
+#include "Defaults.h"
+#include "Utils.h"
 #include "core/FlowConfiguration.h"
-#include "core/flow/AdaptiveConfiguration.h"
 #include "core/ProcessGroup.h"
 #include "core/RepositoryFactory.h"
+#include "core/extension/ExtensionManager.h"
+#include "core/flow/AdaptiveConfiguration.h"
 #include "core/repository/VolatileContentRepository.h"
-#include "Defaults.h"
-#include "Utils.h"
-#include "utils/file/FileSystem.h"
 #include "utils/Id.h"
+#include "utils/file/FileSystem.h"
 
 namespace minifi = org::apache::nifi::minifi;
 
@@ -180,8 +180,7 @@ void encryptSensitiveValuesInFlowConfig(const EncryptionKeys& keys, const std::f
   }
 
   const auto configure = std::make_shared<ConfigureImpl>();
-  configure->setHome(minifi_home);
-  configure->loadConfigureFile(DEFAULT_NIFI_PROPERTIES_FILE);
+  configure->loadConfigureFile(minifi_home / DEFAULT_NIFI_PROPERTIES_FILE);
 
   bool encrypt_whole_flow_config_file = (configure->get(Configure::nifi_flow_configuration_encrypt) | utils::andThen(utils::string::toBool)).value_or(false);
   auto whole_file_encryptor = encrypt_whole_flow_config_file ? utils::crypto::EncryptionProvider::create(minifi_home) : std::nullopt;
diff --git a/extensions/expression-language/tests/ExpressionLanguageTests.cpp b/extensions/expression-language/tests/ExpressionLanguageTests.cpp
index 3d5bbba2c..a8cb42e05 100644
--- a/extensions/expression-language/tests/ExpressionLanguageTests.cpp
+++ b/extensions/expression-language/tests/ExpressionLanguageTests.cpp
@@ -193,7 +193,6 @@ TEST_CASE("GetFile PutFile dynamic attribute", "[expressionLanguageTestGetFilePu
   LogTestController::getInstance().setTrace<minifi::processors::UpdateAttribute>();
 
   auto conf = std::make_shared<minifi::ConfigureImpl>();
-  conf->setHome(testController.createTempDirectory());
 
   conf->set("nifi.my.own.property", "custom_value");
 
@@ -939,7 +938,7 @@ TEST_CASE("GT4 Value parsing errors", "[expressionGT4][outofrange]") {
   auto flow_file = std::make_shared<core::FlowFileImpl>();
   flow_file->addAttribute("attr1", test_str);
   try {
-    const auto result = expr(expression::Parameters{flow_file.get()}).asString();
+    [[maybe_unused]] const auto result = expr(expression::Parameters{flow_file.get()}).asString();
     REQUIRE(false);
   } catch (const std::exception& ex) {
     const std::string message = ex.what();
@@ -1302,9 +1301,9 @@ TEST_CASE("Parse RFC3339 with Expression Language toDate") {
   using namespace std::literals::chrono_literals;
   using std::chrono::milliseconds;
 
-  milliseconds expected_second = std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min + 55s).time_since_epoch());
-  milliseconds expected_tenth_second = std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min + 55s + 100ms).time_since_epoch());
-  milliseconds expected_milli_second = std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min + 55s + 190ms).time_since_epoch());
+  auto expected_second = std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min + 55s).time_since_epoch());
+  auto expected_tenth_second = std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min + 55s + 100ms).time_since_epoch());
+  auto expected_milli_second = std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min + 55s + 190ms).time_since_epoch());
 
   CHECK(expression::compile("${literal('2023-03-01T19:04:55Z'):toDate()}")(expression::Parameters()).asSignedLong() == expected_second.count());
   CHECK(expression::compile("${literal('2023-03-01T19:04:55.1Z'):toDate()}")(expression::Parameters()).asSignedLong() == expected_tenth_second.count());
@@ -1440,7 +1439,6 @@ TEST_CASE("Reverse DNS lookup with valid timeout parameter", "[ExpressionLanguag
   LogTestController::getInstance().clear();
 
   auto flow_file_a = std::make_shared<core::FlowFileImpl>();
-  std::string expected_hostname;
   flow_file_a->addAttribute("ip_addr", "8.8.8.8");
 
   SECTION("Shouldn't timeout") {
diff --git a/extensions/python/CMakeLists.txt b/extensions/python/CMakeLists.txt
index d1ebd6b0c..ac3f5fe57 100644
--- a/extensions/python/CMakeLists.txt
+++ b/extensions/python/CMakeLists.txt
@@ -84,11 +84,23 @@ else()
         COMMENT "Creating symlink for minifi-python-script-extension"
     )
 
-    install(
-        FILES "${CMAKE_BINARY_DIR}/bin/minifi_native.so"
-        DESTINATION extensions
-        COMPONENT minifi_python_native_module
-    )
+
+    if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+        install(
+                FILES "${CMAKE_BINARY_DIR}/bin/minifi_native.so"
+                DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extensions/
+                COMPONENT minifi_python_native_module
+        )
+    elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+        install(
+                FILES "${CMAKE_BINARY_DIR}/bin/minifi_native.so"
+                DESTINATION extensions
+                COMPONENT minifi_python_native_module
+        )
+    else()
+        message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+    endif()
+
 endif()
 
 if (NOT WIN32)
diff --git a/extensions/python/PythonCreator.h b/extensions/python/PythonCreator.h
index 961928085..337cc666e 100644
--- a/extensions/python/PythonCreator.h
+++ b/extensions/python/PythonCreator.h
@@ -18,26 +18,28 @@
 
 #pragma once
 
-#include <vector>
 #include <algorithm>
-#include <string>
-#include <memory>
 #include <filesystem>
-#include "core/Core.h"
-#include "core/logging/LoggerFactory.h"
-#include "core/Resource.h"
+#include <memory>
+#include <string>
+#include <vector>
+
 #include "ExecutePythonProcessor.h"
 #include "PythonConfigState.h"
+#include "PythonDependencyInstaller.h"
 #include "PythonObjectFactory.h"
+#include "core/Core.h"
+#include "core/Resource.h"
+#include "core/logging/LoggerFactory.h"
 #include "minifi-cpp/agent/agent_version.h"
 #include "minifi-cpp/agent/build_description.h"
-#include "utils/file/FileUtils.h"
-#include "utils/StringUtils.h"
 #include "range/v3/algorithm.hpp"
-#include "utils/file/FilePattern.h"
 #include "range/v3/view/filter.hpp"
-#include "PythonDependencyInstaller.h"
-#include "utils/file/PathUtils.h"
+#include "utils/Environment.h"
+#include "utils/Locations.h"
+#include "utils/StringUtils.h"
+#include "utils/file/FilePattern.h"
+#include "utils/file/FileUtils.h"
 #include "minifi-cpp/core/ProcessorDescriptor.h"
 
 namespace org::apache::nifi::minifi::extensions::python {
@@ -211,15 +213,15 @@ class PythonCreator : public minifi::core::CoreComponentImpl {
   }
 
   std::filesystem::path getPythonLibPath(const std::shared_ptr<Configure>& configuration) {
-    constexpr const char* DEFAULT_EXTENSION_PATH = "../extensions/*";
-    std::string pattern = [&] {
-      auto opt_pattern = configuration->get(minifi::Configuration::nifi_extension_path);
-      if (!opt_pattern) {
-        logger_->log_warn("No extension path is provided, using default: '{}'", DEFAULT_EXTENSION_PATH);
-      }
-      return opt_pattern.value_or(DEFAULT_EXTENSION_PATH);
+    const std::string pattern = [&] {
+      if (const auto opt_pattern = configuration->get(Configuration::nifi_extension_path)) {
+        return *opt_pattern;
+      };
+      const auto default_extension_path = utils::getDefaultExtensionsPattern();
+      logger_->log_warn("No extension path is provided in properties, using default: '{}'", default_extension_path);
+      return std::string(default_extension_path);
     }();
-    auto candidates = utils::file::match(utils::file::FilePattern(pattern, [&] (std::string_view subpattern, std::string_view error_msg) {
+    const auto candidates = utils::file::match(utils::file::FilePattern(pattern, [&] (std::string_view subpattern, std::string_view error_msg) {
       logger_->log_error("Error in subpattern '{}': {}", subpattern, error_msg);
     }));
 
diff --git a/extensions/python/pythonprocessors/nifi_python_processors/utils/dependency_installer.py b/extensions/python/pythonprocessors/nifi_python_processors/utils/dependency_installer.py
index 2a01a23bc..d0b2e5cdc 100644
--- a/extensions/python/pythonprocessors/nifi_python_processors/utils/dependency_installer.py
+++ b/extensions/python/pythonprocessors/nifi_python_processors/utils/dependency_installer.py
@@ -65,6 +65,7 @@ if __name__ == '__main__':
     if dependencies_found:
         try:
             subprocess.check_call(command)
+            print("Done installing dependencies for MiNiFi python processors.")
         except subprocess.CalledProcessError as e:
             print("Error occurred while installing dependencies: {}".format(e))
             sys.exit(1)
diff --git a/extensions/python/tests/PythonManifestTests.cpp b/extensions/python/tests/PythonManifestTests.cpp
index 3b4f90612..889ff31ab 100644
--- a/extensions/python/tests/PythonManifestTests.cpp
+++ b/extensions/python/tests/PythonManifestTests.cpp
@@ -32,9 +32,11 @@ using minifi::state::response::SerializedResponseNode;
 using minifi::state::response::ValueNode;
 
 template<typename F>
-const SerializedResponseNode* findNode(const std::vector<SerializedResponseNode>& nodes, F&& filter) {
+const SerializedResponseNode* findNode(const std::vector<SerializedResponseNode>& nodes, F filter) {
   for (auto& node : nodes) {
-    if (filter(node)) return &node;
+    if (filter(node)) {
+      return &node;
+    }
   }
   return nullptr;
 }
@@ -54,7 +56,7 @@ ValueNode getNthAllowableValue(const SerializedResponseNode& node, size_t n) {
 TEST_CASE("Python processor's description is part of the manifest") {
   TestControllerWithFlow controller(empty_flow, false /* DEFER FLOW SETUP */);
 
-  auto python_dir = controller.configuration_->getHome() / "minifi-python";
+  auto python_dir = controller.createTempDirectory() / "minifi-python";
   utils::file::create_dir(python_dir);
   std::ofstream{python_dir / "MyPyProc.py"} <<
     "def describe(proc):\n"
diff --git a/extensions/rocksdb-repos/DatabaseContentRepository.cpp b/extensions/rocksdb-repos/DatabaseContentRepository.cpp
index 5c0f826de..6bfa6cefa 100644
--- a/extensions/rocksdb-repos/DatabaseContentRepository.cpp
+++ b/extensions/rocksdb-repos/DatabaseContentRepository.cpp
@@ -17,29 +17,32 @@
 
 #include "DatabaseContentRepository.h"
 
+#include <cinttypes>
 #include <memory>
 #include <string>
 #include <utility>
 #include <vector>
-#include <cinttypes>
 
-#include "encryption/RocksDbEncryptionProvider.h"
-#include "RocksDbStream.h"
-#include "utils/gsl.h"
 #include "Exception.h"
-#include "database/RocksDbUtils.h"
-#include "database/StringAppender.h"
+#include "RocksDbStream.h"
 #include "core/Resource.h"
 #include "core/TypedValues.h"
+#include "database/RocksDbUtils.h"
+#include "database/StringAppender.h"
+#include "encryption/RocksDbEncryptionProvider.h"
+#include "utils/Locations.h"
+#include "utils/gsl.h"
 
 namespace org::apache::nifi::minifi::core::repository {
 
 bool DatabaseContentRepository::initialize(const std::shared_ptr<minifi::Configure> &configuration) {
+  const auto working_dir = utils::getMinifiDir();
+
   std::string value;
   if (configuration->get(Configure::nifi_dbcontent_repository_directory_default, value) && !value.empty()) {
     directory_ = value;
   } else {
-    directory_ = (configuration->getHome() / "dbcontentrepository").string();
+    directory_ = (working_dir / "dbcontentrepository").string();
   }
   auto purge_period_str = utils::string::trim(configuration->get(Configure::nifi_dbcontent_repository_purge_period).value_or("1 s"));
   if (purge_period_str == "0") {
@@ -50,7 +53,7 @@ bool DatabaseContentRepository::initialize(const std::shared_ptr<minifi::Configu
     logger_->log_error("Malformed delete period value, expected time format: '{}'", purge_period_str);
     purge_period_ = std::chrono::seconds{1};
   }
-  const auto encrypted_env = createEncryptingEnv(utils::crypto::EncryptionManager{configuration->getHome()}, DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME});
+  const auto encrypted_env = createEncryptingEnv(utils::crypto::EncryptionManager{working_dir}, DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME});
   logger_->log_info("Using {} DatabaseContentRepository", encrypted_env ? "encrypted" : "plaintext");
 
   setCompactionPeriod(configuration);
diff --git a/extensions/rocksdb-repos/FlowFileRepository.cpp b/extensions/rocksdb-repos/FlowFileRepository.cpp
index 82ea380c9..a37bc2751 100644
--- a/extensions/rocksdb-repos/FlowFileRepository.cpp
+++ b/extensions/rocksdb-repos/FlowFileRepository.cpp
@@ -24,13 +24,14 @@
 #include <utility>
 #include <vector>
 
+#include "FlowFileRecord.h"
+#include "core/Resource.h"
+#include "core/TypedValues.h"
 #include "rocksdb/options.h"
 #include "rocksdb/slice.h"
-#include "utils/gsl.h"
-#include "core/Resource.h"
+#include "utils/Locations.h"
 #include "utils/OptionalUtils.h"
-#include "core/TypedValues.h"
-#include "FlowFileRecord.h"
+#include "utils/gsl.h"
 
 using namespace std::literals::chrono_literals;
 
@@ -210,7 +211,9 @@ bool FlowFileRepository::initialize(const std::shared_ptr<Configure> &configure)
 
   setCompactionPeriod(configure);
 
-  const auto encrypted_env = createEncryptingEnv(utils::crypto::EncryptionManager{configure->getHome()}, DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME});
+  const auto working_dir = utils::getMinifiDir();
+
+  const auto encrypted_env = createEncryptingEnv(utils::crypto::EncryptionManager{working_dir}, DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME});
   logger_->log_info("Using {} FlowFileRepository", encrypted_env ? "encrypted" : "plaintext");
 
   verify_checksums_in_rocksdb_reads_ = (configure->get(Configure::nifi_flowfile_repository_rocksdb_read_verify_checksums) | utils::andThen(&utils::string::toBool)).value_or(false);
diff --git a/extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp b/extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp
index 5f5097fb7..26956e480 100644
--- a/extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp
+++ b/extensions/rocksdb-repos/controllers/RocksDbStateStorage.cpp
@@ -15,14 +15,16 @@
  * limitations under the License.
  */
 
+#include "RocksDbStateStorage.h"
+
 #include <cinttypes>
 #include <fstream>
 #include <utility>
 
-#include "RocksDbStateStorage.h"
 #include "../encryption/RocksDbEncryptionProvider.h"
-#include "utils/StringUtils.h"
 #include "core/Resource.h"
+#include "utils/Locations.h"
+#include "utils/StringUtils.h"
 
 namespace org::apache::nifi::minifi::controllers {
 
@@ -60,9 +62,12 @@ void RocksDbStateStorage::onEnable() {
   auto_persistor_.start(always_persist, auto_persistence_interval, [this] { return persistNonVirtual(); });
   db_.reset();
 
-  auto encrypted_env = createEncryptingEnv(utils::crypto::EncryptionManager{configuration_->getHome()}, core::repository::DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME});
+
+  const auto working_dir = utils::getMinifiDir();
+
+  auto encrypted_env = createEncryptingEnv(utils::crypto::EncryptionManager{working_dir}, core::repository::DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME});
   if (!encrypted_env) {
-    encrypted_env = createEncryptingEnv(utils::crypto::EncryptionManager{configuration_->getHome()}, core::repository::DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME_OLD});
+    encrypted_env = createEncryptingEnv(utils::crypto::EncryptionManager{working_dir}, core::repository::DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME_OLD});
   }
   logger_->log_info("Using {} RocksDbStateStorage", encrypted_env ? "encrypted" : "plaintext");
 
diff --git a/extensions/rocksdb-repos/tests/ContentSessionTests.cpp b/extensions/rocksdb-repos/tests/ContentSessionTests.cpp
index c1c6fdc3d..1a58e4c39 100644
--- a/extensions/rocksdb-repos/tests/ContentSessionTests.cpp
+++ b/extensions/rocksdb-repos/tests/ContentSessionTests.cpp
@@ -37,7 +37,6 @@ class ContentSessionController : public TestController {
       : contentRepository(std::make_shared<ContentRepositoryClass>()) {
     auto contentRepoPath = createTempDirectory();
     auto config = std::make_shared<minifi::ConfigureImpl>();
-    config->setHome(contentRepoPath);
     config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, contentRepoPath.string());
     contentRepository->initialize(config);
   }
@@ -54,12 +53,12 @@ class ContentSessionController : public TestController {
   std::shared_ptr<core::ContentRepository> contentRepository;
 };
 
-const std::shared_ptr<minifi::io::OutputStream>& operator<<(const std::shared_ptr<minifi::io::OutputStream>& stream, const std::string& str) {
+std::shared_ptr<minifi::io::OutputStream> operator<<(std::shared_ptr<minifi::io::OutputStream> stream, const std::string& str) {
   REQUIRE(stream->write(reinterpret_cast<const uint8_t*>(str.data()), str.length()) == str.length());
   return stream;
 }
 
-const std::shared_ptr<minifi::io::InputStream>& operator>>(const std::shared_ptr<minifi::io::InputStream>& stream, std::string& str) {
+std::shared_ptr<minifi::io::InputStream> operator>>(std::shared_ptr<minifi::io::InputStream> stream, std::string& str) {
   str = "";
   std::array<std::byte, utils::configuration::DEFAULT_BUFFER_SIZE> buffer{};
   while (true) {
@@ -104,7 +103,7 @@ void test_template() {
   {
     auto other_session = contentRepository->createSession();
     other_session->append(oldClaim, 4, [&] (auto new_claim) {
-      copied_claim = new_claim;
+      copied_claim = std::move(new_claim);
     }) << "-some extra content";
     other_session->commit();
   }
diff --git a/extensions/rocksdb-repos/tests/DBContentRepositoryTests.cpp b/extensions/rocksdb-repos/tests/DBContentRepositoryTests.cpp
index cfc9e4674..7fc19ca4d 100644
--- a/extensions/rocksdb-repos/tests/DBContentRepositoryTests.cpp
+++ b/extensions/rocksdb-repos/tests/DBContentRepositoryTests.cpp
@@ -44,7 +44,6 @@ TEST_CASE("Write Claim", "[TestDBCR1]") {
   auto content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -67,7 +66,6 @@ TEST_CASE("Write Claim", "[TestDBCR1]") {
   content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -92,7 +90,6 @@ TEST_CASE("Delete Claim", "[TestDBCR2]") {
   auto content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -112,7 +109,6 @@ TEST_CASE("Delete Claim", "[TestDBCR2]") {
   content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
 
   std::string readstr;
@@ -151,7 +147,6 @@ TEST_CASE("Append Claim", "[TestDBCR1]") {
   auto content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -193,7 +188,6 @@ TEST_CASE("Test Empty Claim", "[TestDBCR3]") {
   auto content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -212,7 +206,6 @@ TEST_CASE("Test Empty Claim", "[TestDBCR3]") {
   content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -230,7 +223,6 @@ TEST_CASE("Delete NonExistent Claim", "[TestDBCR4]") {
   auto content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -250,7 +242,6 @@ TEST_CASE("Delete NonExistent Claim", "[TestDBCR4]") {
   content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -272,7 +263,6 @@ TEST_CASE("Delete Remove Count Claim", "[TestDBCR5]") {
   auto content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -292,7 +282,6 @@ TEST_CASE("Delete Remove Count Claim", "[TestDBCR5]") {
   content_repo = std::make_shared<TestDatabaseContentRepository>();
 
   configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   REQUIRE(content_repo->initialize(configuration));
 
@@ -345,7 +334,6 @@ TEST_CASE("DBContentRepository can clear orphan entries") {
   TestController testController;
   auto dir = testController.createTempDirectory();
   auto configuration = std::make_shared<org::apache::nifi::minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, dir.string());
   {
     auto content_repo = std::make_shared<core::repository::DatabaseContentRepository>();
diff --git a/extensions/rocksdb-repos/tests/EncryptionTests.cpp b/extensions/rocksdb-repos/tests/EncryptionTests.cpp
index cf49528e7..754d12bd4 100644
--- a/extensions/rocksdb-repos/tests/EncryptionTests.cpp
+++ b/extensions/rocksdb-repos/tests/EncryptionTests.cpp
@@ -35,7 +35,6 @@ class FFRepoFixture : public TestController {
     home_ = createTempDirectory();
     repo_dir_ = home_ / "flowfile_repo";
     config_ = std::make_shared<minifi::ConfigureImpl>();
-    config_->setHome(home_);
     container_ = std::make_unique<minifi::ConnectionImpl>(nullptr, nullptr, "container");
     content_repo_ = std::make_shared<core::repository::VolatileContentRepository>();
     content_repo_->initialize(config_);
diff --git a/extensions/rocksdb-repos/tests/RepoTests.cpp b/extensions/rocksdb-repos/tests/RepoTests.cpp
index 3442ab547..4f377f574 100644
--- a/extensions/rocksdb-repos/tests/RepoTests.cpp
+++ b/extensions/rocksdb-repos/tests/RepoTests.cpp
@@ -76,7 +76,6 @@ TEST_CASE("Test Repo Empty Value Attribute", "[TestFFR1]") {
   const auto repository = std::make_shared<core::repository::FlowFileRepository>("ff", dir.string(), 0ms, 0, 1ms);
 
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   repository->initialize(configuration);
 
   std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -98,7 +97,6 @@ TEST_CASE("Test Repo Empty Key Attribute ", "[TestFFR2]") {
   const auto repository = std::make_shared<core::repository::FlowFileRepository>("ff", dir.string(), 0ms, 0, 1ms);
 
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   repository->initialize(configuration);
   std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
   const auto file = std::make_shared<minifi::FlowFileRecordImpl>();
@@ -121,7 +119,6 @@ TEST_CASE("Test Repo Key Attribute Verify ", "[TestFFR3]") {
   const auto repository = std::make_shared<core::repository::FlowFileRepository>("ff", dir.string(), 0ms, 0, 1ms);
 
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   repository->initialize(configuration);
 
   std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -178,7 +175,6 @@ TEST_CASE("Test Delete Content ", "[TestFFR4]") {
   std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::FileSystemRepository>();
 
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   repository->initialize(configuration);
 
   repository->loadComponent(content_repo);
@@ -229,7 +225,6 @@ TEST_CASE("Test Validate Checkpoint ", "[TestFFR5]") {
   std::shared_ptr<core::ContentRepository> content_repo = std::make_shared<core::repository::FileSystemRepository>();
 
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   repository->initialize(configuration);
 
   repository->loadComponent(content_repo);
@@ -281,7 +276,6 @@ TEST_CASE("Test FlowFile Restore", "[TestFFR6]") {
   auto dir = testController.createTempDirectory();
 
   auto config = std::make_shared<minifi::ConfigureImpl>();
-  config->setHome(dir);
   config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, (dir / "content_repository").string());
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, (dir / "flowfile_repository").string());
 
@@ -382,7 +376,6 @@ TEST_CASE("Flush deleted flowfiles before shutdown", "[TestFFR7]") {
   const auto dir = testController.createTempDirectory();
 
   const auto config = std::make_shared<minifi::ConfigureImpl>();
-  config->setHome(dir);
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, (dir / "flowfile_repository").string());
 
   const auto content_repo = std::make_shared<core::repository::VolatileContentRepository>();
@@ -455,12 +448,10 @@ TEST_CASE("FlowFileRepository triggers content repo orphan clear") {
   LogTestController::getInstance().setDebug<core::repository::FileSystemRepository>();
   LogTestController::getInstance().setDebug<core::repository::FlowFileRepository>();
   TestController testController;
-  auto home_dir = testController.createTempDirectory();
   auto ff_dir = testController.createTempDirectory();
   auto content_dir = testController.createTempDirectory();
 
   auto config = std::make_shared<minifi::ConfigureImpl>();
-  config->setHome(home_dir);
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, ff_dir.string());
   config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, content_dir.string());
 
@@ -490,12 +481,10 @@ TEST_CASE("FlowFileRepository synchronously pushes existing flow files") {
   LogTestController::getInstance().setDebug<core::repository::FileSystemRepository>();
   LogTestController::getInstance().setDebug<core::repository::FlowFileRepository>();
   TestController testController;
-  const auto home_dir = testController.createTempDirectory();
   const auto ff_dir = testController.createTempDirectory();
   const auto content_dir = testController.createTempDirectory();
 
   const auto config = std::make_shared<minifi::ConfigureImpl>();
-  config->setHome(home_dir);
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, ff_dir.string());
   config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, content_dir.string());
 
@@ -577,7 +566,6 @@ TEST_CASE("Test getting flow file repository size properties", "[TestGettingRepo
     expected_max_repo_size = 7;
   }
   auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   repository->initialize(configuration);
 
   auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
@@ -621,12 +609,10 @@ TEST_CASE("Test getting flow file repository size properties", "[TestGettingRepo
 
 TEST_CASE("Test getting noop repository size properties", "[TestGettingRepositorySize]") {
   TestController testController;
-  const auto dir = testController.createTempDirectory();
 
   const auto repository = minifi::core::createRepository("NoOpRepository", "ff");
 
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   repository->initialize(configuration);
 
   const auto flow_file = std::make_shared<minifi::FlowFileRecordImpl>();
@@ -654,7 +640,6 @@ TEST_CASE("Test getting content repository size properties", "[TestGettingReposi
 
   const auto content_repo_dir = testController.createTempDirectory();
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, content_repo_dir.string());
   std::string content = "content";
   configuration->set(minifi::Configure::nifi_volatile_repository_options_content_max_bytes, std::to_string(content.size()));
@@ -747,7 +732,6 @@ TEST_CASE("Flow file repositories can be stopped", "[TestRepoIsRunning]") {
   }
 
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(dir);
   repository->initialize(configuration);
 
   REQUIRE(!repository->isRunning());
@@ -763,7 +747,6 @@ TEST_CASE("Content repositories are always running", "[TestRepoIsRunning]") {
   LogTestController::getInstance().setDebug<core::repository::VolatileContentRepository>();
   LogTestController::getInstance().setDebug<core::repository::DatabaseContentRepository>();
   TestController testController;
-  const auto dir = testController.createTempDirectory();
 
   std::shared_ptr<core::ContentRepository> content_repo;
   SECTION("FileSystemRepository") {
@@ -805,12 +788,10 @@ TEST_CASE("FlowFileRepository can filter out too small contents") {
   LogTestController::getInstance().setDebug<core::repository::FileSystemRepository>();
   LogTestController::getInstance().setDebug<core::repository::FlowFileRepository>();
   TestController testController;
-  const auto minifi_home = testController.createTempDirectory();
   const auto ff_dir = testController.createTempDirectory();
   const auto content_dir = testController.createTempDirectory();
 
   auto config = std::make_shared<minifi::ConfigureImpl>();
-  config->setHome(minifi_home);
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, ff_dir.string());
   config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, content_dir.string());
 
diff --git a/extensions/rocksdb-repos/tests/SwapTests.cpp b/extensions/rocksdb-repos/tests/SwapTests.cpp
index de7929655..154922a4f 100644
--- a/extensions/rocksdb-repos/tests/SwapTests.cpp
+++ b/extensions/rocksdb-repos/tests/SwapTests.cpp
@@ -84,7 +84,6 @@ TEST_CASE("Connection will on-demand swap flow files") {
   auto dir = testController.createTempDirectory();
 
   auto config = std::make_shared<minifi::ConfigureImpl>();
-  config->setHome(dir);
   config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, (dir / "content_repository").string());
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, (dir / "flowfile_repository").string());
 
diff --git a/extensions/sftp/tests/ListSFTPTests.cpp b/extensions/sftp/tests/ListSFTPTests.cpp
index 1d2bd3e9b..d3ee16d9c 100644
--- a/extensions/sftp/tests/ListSFTPTests.cpp
+++ b/extensions/sftp/tests/ListSFTPTests.cpp
@@ -74,9 +74,6 @@ class ListSFTPTestsFixture {
     sftp_server = std::make_unique<SFTPTestServer>(working_directory);
     REQUIRE(true == sftp_server->start());
 
-    if (configuration) {
-      configuration->setHome(working_directory);
-    }
     // Build MiNiFi processing graph
     createPlan(nullptr, configuration);
   }
@@ -95,9 +92,6 @@ class ListSFTPTestsFixture {
     list_sftp = nullptr;
     plan.reset();
 
-    if (configuration) {
-      configuration->setHome(working_directory);
-    }
     plan = testController.createPlan(configuration, state_dir);
     if (list_sftp_uuid == nullptr) {
       list_sftp = plan->addProcessor(
@@ -152,7 +146,7 @@ class ListSFTPTestsFixture {
   }
 
   void createFileWithModificationTimeDiff(const std::filesystem::path& relative_path, const std::string& content, std::chrono::seconds modification_timediff = -5min) const {
-    return createFile(relative_path, content, std::chrono::file_clock::now() + modification_timediff);
+    createFile(relative_path, content, std::chrono::file_clock::now() + modification_timediff);
   }
 
  protected:
diff --git a/extensions/standard-processors/tests/unit/TailFileTests.cpp b/extensions/standard-processors/tests/unit/TailFileTests.cpp
index 916e24605..941d962a2 100644
--- a/extensions/standard-processors/tests/unit/TailFileTests.cpp
+++ b/extensions/standard-processors/tests/unit/TailFileTests.cpp
@@ -285,7 +285,7 @@ TEST_CASE("TailFile converts the old-style state file to the new-style state", "
       REQUIRE(it != state.end());
       REQUIRE(it->second == key_value_pair.second);
     }
-    REQUIRE(state.find("file.0.last_read_time") != state.end());
+    REQUIRE(state.contains("file.0.last_read_time"));
   }
 
   SECTION("multiple") {
@@ -335,8 +335,8 @@ TEST_CASE("TailFile converts the old-style state file to the new-style state", "
       REQUIRE(it != state.end());
       REQUIRE(it->second == key_value_pair.second);
     }
-    REQUIRE(state.find("file.0.last_read_time") != state.end());
-    REQUIRE(state.find("file.1.last_read_time") != state.end());
+    REQUIRE(state.contains("file.0.last_read_time"));
+    REQUIRE(state.contains("file.1.last_read_time"));
   }
 }
 
@@ -552,7 +552,7 @@ TEST_CASE("TailFile processes a very long line correctly", "[simple]") {
   std::generate_n(line2.begin(), line2.size() - 1, [&] {
     // Make sure to only generate from characters that don't intersect with line1 and 3-4
     // Starting generation from 64 ensures that no numeric digit characters are added
-    return gsl::narrow<char>(64 + gen() % (127 - 64));
+    return gsl::narrow<char>(64 + (gen() % (127 - 64)));
   });
   line2.back() = '\n';
   std::string line3("345\n");
@@ -627,7 +627,7 @@ TEST_CASE("TailFile processes a long line followed by multiple newlines correctl
   std::generate_n(line1.begin(), 4095, [&] {
     // Make sure to only generate from characters that don't intersect with line2-4
     // Starting generation from 64 ensures that no numeric digit characters are added
-    return gsl::narrow<char>(64 + gen() % (127 - 64));
+    return gsl::narrow<char>(64 + (gen() % (127 - 64)));
   });
   std::string line2("012\n");
   std::string line3("345\n");
@@ -1044,7 +1044,7 @@ TEST_CASE("TailFile finds and finishes the renamed file and continues with the n
   auto log_dir = testController.createTempDirectory();
 
   const auto file_modi_time_t0 = std::chrono::file_clock::now();
-  auto test_file_1 = createTempFile(log_dir, "test.1", "line one\nline two\nline three\n");  // old rotated file
+  [[maybe_unused]] auto test_file_1 = createTempFile(log_dir, "test.1", "line one\nline two\nline three\n");  // old rotated file
   std::filesystem::last_write_time(log_dir/"test.1", file_modi_time_t0 - 1100ms);
   auto test_file = createTempFile(log_dir, "test.log", "line four\nline five\nline six\n");  // current log file
   std::filesystem::last_write_time(log_dir/"test.log", file_modi_time_t0 - 100ms);
@@ -1056,7 +1056,6 @@ TEST_CASE("TailFile finds and finishes the renamed file and continues with the n
 
   // use persistent state storage that defaults to rocksDB, not volatile
   const auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(log_dir);
   {
     auto test_plan = testController.createPlan(configuration, state_dir);
     auto tail_file = test_plan->addProcessor("TailFile", tail_file_uuid, "Tail", {success_relationship});
diff --git a/fips/openssl.cnf b/fips/openssl.cnf
index 8cc2731b3..8779438cb 100644
--- a/fips/openssl.cnf
+++ b/fips/openssl.cnf
@@ -1,6 +1,6 @@
 openssl_conf = openssl_init
 
-.include ${MINIFI_HOME}/fips/fipsmodule.cnf
+.include ${FIPS_CONF_DIR}/fipsmodule.cnf
 
 [openssl_init]
 providers = prov
diff --git a/generateVersion.bat b/generateVersion.bat
index ac2187dff..d2512510e 100644
--- a/generateVersion.bat
+++ b/generateVersion.bat
@@ -60,7 +60,7 @@ for %%i in (%extensions%) do (
 	echo const char* const AgentBuild::BUILD_DATE = "%builddate%";
 	echo const char* const AgentBuild::COMPILER = "%compiler%";
 	echo const char* const AgentBuild::COMPILER_VERSION = "%compiler_version%";
-	echo const char* const AgentBuild::COMPILER_FLAGS = "%flags%";
+	echo const char* const AgentBuild::COMPILER_FLAGS = R"(%flags%)";
 	echo std^:^:vector^<std^:^:string^> AgentBuild::getExtensions^(^) {
   	echo 	static std^:^:vector^<std^:^:string^> extensions;
   	echo 	if ^(extensions.empty^(^)^){
diff --git a/generateVersion.sh b/generateVersion.sh
index ff25afba8..029b81bf1 100755
--- a/generateVersion.sh
+++ b/generateVersion.sh
@@ -71,7 +71,7 @@ const char* const AgentBuild::BUILD_REV = "$buildrev";
 const char* const AgentBuild::BUILD_DATE = "$date";
 const char* const AgentBuild::COMPILER = "$compiler";
 const char* const AgentBuild::COMPILER_VERSION = "$compiler_version";
-const char* const AgentBuild::COMPILER_FLAGS = "$flags";
+const char* const AgentBuild::COMPILER_FLAGS = R"($flags)";
 
 std::vector<std::string> AgentBuild::getExtensions() {
   static std::vector<std::string> extensions;
diff --git a/libminifi/CMakeLists.txt b/libminifi/CMakeLists.txt
index 7e35f5a56..e0db77b08 100644
--- a/libminifi/CMakeLists.txt
+++ b/libminifi/CMakeLists.txt
@@ -105,5 +105,13 @@ if (WIN32)
     install(TARGETS core-minifi ARCHIVE DESTINATION bin COMPONENT bin)
     install(TARGETS core-minifi RUNTIME DESTINATION bin COMPONENT bin)
 else()
-    install(TARGETS core-minifi LIBRARY DESTINATION bin COMPONENT bin)
+    if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+        install(TARGETS core-minifi
+                LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nifi-minifi-cpp
+                COMPONENT bin)
+    elseif (MINIFI_PACKAGING_TYPE STREQUAL "TGZ")
+        install(TARGETS core-minifi LIBRARY DESTINATION bin COMPONENT bin)
+    else()
+        message(FATAL_ERROR "Invalid MINIFI_PACKAGING_TYPE")
+    endif()
 endif()
diff --git a/libminifi/include/Defaults.h b/libminifi/include/Defaults.h
deleted file mode 100644
index 3e119e294..000000000
--- a/libminifi/include/Defaults.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.
- */
-
-#pragma once
-
-const std::filesystem::path DEFAULT_NIFI_CONFIG_YML = std::filesystem::path("conf") / "config.yml";
-const std::filesystem::path DEFAULT_NIFI_CONFIG_JSON = std::filesystem::path("conf") / "config.json";
-const std::filesystem::path DEFAULT_NIFI_PROPERTIES_FILE = std::filesystem::path("conf") / "minifi.properties";
-const std::filesystem::path DEFAULT_LOG_PROPERTIES_FILE = std::filesystem::path("conf") / "minifi-log.properties";
-const std::filesystem::path DEFAULT_UID_PROPERTIES_FILE = std::filesystem::path("conf") / "minifi-uid.properties";
-const std::filesystem::path DEFAULT_BOOTSTRAP_FILE = std::filesystem::path("conf") / "bootstrap.conf";
diff --git a/libminifi/include/core/logging/LoggerProperties.h b/libminifi/include/core/logging/LoggerProperties.h
index 0ac483561..90098d447 100644
--- a/libminifi/include/core/logging/LoggerProperties.h
+++ b/libminifi/include/core/logging/LoggerProperties.h
@@ -31,8 +31,9 @@ namespace org::apache::nifi::minifi::core::logging {
 
 class LoggerProperties : public PropertiesImpl {
  public:
-  LoggerProperties()
-      : PropertiesImpl("Logger properties") {
+  explicit LoggerProperties(std::filesystem::path default_log_dir)
+      : PropertiesImpl("Logger properties"),
+        default_log_dir_(std::move(default_log_dir)) {
   }
   /**
    * Gets all keys that start with the given prefix and do not have a "." after the prefix and "." separator.
@@ -52,7 +53,10 @@ class LoggerProperties : public PropertiesImpl {
     return sinks_;
   }
 
+  std::filesystem::path getDefaultLogDir() const { return default_log_dir_; }
+
  private:
+  std::filesystem::path default_log_dir_;
   std::map<std::string, std::shared_ptr<spdlog::sinks::sink>> sinks_;
 };
 
diff --git a/libminifi/include/properties/Properties.h b/libminifi/include/properties/Properties.h
index 2cab983ae..5586f827c 100644
--- a/libminifi/include/properties/Properties.h
+++ b/libminifi/include/properties/Properties.h
@@ -102,16 +102,8 @@ class PropertiesImpl : public virtual Properties {
    */
   std::optional<std::string> getString(const std::string& key) const override;
 
-  /**
-   * Load configure file
-   * @param fileName path of the configuration file RELATIVE to MINIFI_HOME set by setHome()
-   */
   void loadConfigureFile(const std::filesystem::path& configuration_file, std::string_view prefix = "") override;
 
-  // Set the determined MINIFI_HOME
-  void setHome(std::filesystem::path minifiHome) override {
-    minifi_home_ = std::move(minifiHome);
-  }
 
   std::vector<std::string> getConfiguredKeys() const override {
     std::vector<std::string> keys;
@@ -121,11 +113,6 @@ class PropertiesImpl : public virtual Properties {
     return keys;
   }
 
-  // Get the determined MINIFI_HOME
-  std::filesystem::path getHome() const override {
-    return minifi_home_;
-  }
-
   bool commitChanges() override;
 
   utils::ChecksumCalculator& getChecksumCalculator() override { return checksum_calculator_; }
@@ -146,8 +133,6 @@ class PropertiesImpl : public virtual Properties {
   // Mutex for protection
   mutable std::mutex mutex_;
   std::shared_ptr<core::logging::Logger> logger_;
-  // Home location for this executable
-  std::filesystem::path minifi_home_;
 
   std::string name_;
 };
diff --git a/libminifi/src/core/ProcessContext.cpp b/libminifi/src/core/ProcessContext.cpp
index 3c985c9bc..97028ae45 100644
--- a/libminifi/src/core/ProcessContext.cpp
+++ b/libminifi/src/core/ProcessContext.cpp
@@ -50,8 +50,7 @@ ProcessContextImpl::ProcessContextImpl(
       content_repo_(content_repo),
       processor_(processor),
       configure_(minifi::Configure::create()),
-      info_(std::make_unique<StandardProcessorInfo>(processor)),
-      initialized_(false) {}
+      info_(std::make_unique<StandardProcessorInfo>(processor)) {}
 
 ProcessContextImpl::ProcessContextImpl(
     Processor& processor, controller::ControllerServiceProvider* controller_service_provider, const std::shared_ptr<core::Repository>& repo,
@@ -66,8 +65,7 @@ ProcessContextImpl::ProcessContextImpl(
       content_repo_(content_repo),
       processor_(processor),
       configure_(configuration ? gsl::make_not_null(configuration) : minifi::Configure::create()),
-      info_(std::make_unique<StandardProcessorInfo>(processor)),
-      initialized_(false) {}
+      info_(std::make_unique<StandardProcessorInfo>(processor)) {}
 
 bool ProcessContextImpl::hasNonEmptyProperty(std::string_view name) const {
   auto val = getProcessor().getProperty(name);
@@ -117,7 +115,7 @@ nonstd::expected<void, std::error_code> ProcessContextImpl::setDynamicProperty(s
 }
 
 void ProcessContextImpl::addAutoTerminatedRelationship(const core::Relationship& relationship) {
-  return getProcessor().addAutoTerminatedRelationship(relationship);
+  getProcessor().addAutoTerminatedRelationship(relationship);
 }
 
 bool ProcessContextImpl::isRunning() const {
diff --git a/libminifi/src/core/extension/ExtensionManager.cpp b/libminifi/src/core/extension/ExtensionManager.cpp
index ea22de781..893df3ec6 100644
--- a/libminifi/src/core/extension/ExtensionManager.cpp
+++ b/libminifi/src/core/extension/ExtensionManager.cpp
@@ -26,6 +26,7 @@
 #include "agent/agent_version.h"
 #include "core/extension/Utils.h"
 #include "properties/Configuration.h"
+#include "utils/Locations.h"
 
 namespace org::apache::nifi::minifi::core::extension {
 
@@ -49,8 +50,6 @@ ExtensionManager& ExtensionManager::get() {
   return ExtensionManagerImpl::get();
 }
 
-constexpr const char* DEFAULT_EXTENSION_PATH = "../extensions/*";
-
 bool ExtensionManagerImpl::initialize(const std::shared_ptr<Configure>& config) {
   static bool initialized = ([&] {
     logger_->log_trace("Initializing extensions");
@@ -60,17 +59,20 @@ bool ExtensionManagerImpl::initialize(const std::shared_ptr<Configure>& config)
       logger_->log_error("Missing configuration");
       return;
     }
-    std::string pattern = [&] {
+    const std::string pattern = [&] {
       /**
        * Comma separated list of path patterns. Patterns prepended with "!" result in the exclusion
        * of the extensions matching that pattern, unless some subsequent pattern re-enables it.
        */
-      auto opt_pattern = config->get(minifi::Configuration::nifi_extension_path);
-      if (!opt_pattern) {
-        logger_->log_warn("No extension path is provided, using default: '{}'", DEFAULT_EXTENSION_PATH);
-      }
-      return opt_pattern.value_or(DEFAULT_EXTENSION_PATH);
+      if (const auto opt_pattern = config->get(minifi::Configuration::nifi_extension_path)) {
+        return *opt_pattern;
+      };
+
+      auto default_extension_path = utils::getDefaultExtensionsPattern();
+      logger_->log_warn("No extension path is provided in properties, using default: '{}'", default_extension_path);
+      return std::string(default_extension_path);
     }();
+
     auto candidates = utils::file::match(utils::file::FilePattern(pattern, [&] (std::string_view subpattern, std::string_view error_msg) {
       logger_->log_error("Error in subpattern '{}': {}", subpattern, error_msg);
     }));
diff --git a/libminifi/src/core/flow/AdaptiveConfiguration.cpp b/libminifi/src/core/flow/AdaptiveConfiguration.cpp
index 194963bf1..2f72d522e 100644
--- a/libminifi/src/core/flow/AdaptiveConfiguration.cpp
+++ b/libminifi/src/core/flow/AdaptiveConfiguration.cpp
@@ -18,14 +18,14 @@
 
 #include "core/flow/AdaptiveConfiguration.h"
 
+#include "Defaults.h"
 #include "core/json/JsonFlowSerializer.h"
 #include "core/json/JsonNode.h"
 #include "core/yaml/YamlFlowSerializer.h"
 #include "core/yaml/YamlNode.h"
-#include "yaml-cpp/yaml.h"
-#include "utils/file/FileUtils.h"
-#include "Defaults.h"
 #include "rapidjson/error/en.h"
+#include "utils/file/FileUtils.h"
+#include "yaml-cpp/yaml.h"
 
 namespace org::apache::nifi::minifi::core::flow {
 
diff --git a/libminifi/src/core/logging/LoggerConfiguration.cpp b/libminifi/src/core/logging/LoggerConfiguration.cpp
index a5f338e44..6a9e7428a 100644
--- a/libminifi/src/core/logging/LoggerConfiguration.cpp
+++ b/libminifi/src/core/logging/LoggerConfiguration.cpp
@@ -80,9 +80,9 @@ void LoggerNamespace::forEachSink(const std::function<void(const std::shared_ptr
 std::vector<std::string> LoggerProperties::get_keys_of_type(const std::string &type) const {
   std::vector<std::string> appenders;
   const std::string prefix = type + ".";
-  for (auto const & entry : getProperties()) {
-    if (entry.first.rfind(prefix, 0) == 0 && entry.first.find(".", prefix.length() + 1) == std::string::npos) {
-      appenders.push_back(entry.first);
+  for (const auto & [property_name, _property_value] : getProperties()) {
+    if (property_name.starts_with(prefix) && property_name.find('.', prefix.length() + 1) == std::string::npos) {
+      appenders.push_back(property_name);
     }
   }
   return appenders;
@@ -144,7 +144,7 @@ void LoggerConfiguration::initialize(const std::shared_ptr<LoggerProperties> &lo
   }
 
   formatter_ = std::make_shared<spdlog::pattern_formatter>(spdlog_pattern);
-  spdlog::apply_all([&](auto spd_logger) {
+  spdlog::apply_all([&](const auto& spd_logger) {
     setupSpdLogger(lock, spd_logger, root_namespace_, spd_logger->name(), formatter_);
   });
   logger_->log_debug("Set following pattern on loggers: {}", spdlog_pattern);
@@ -367,7 +367,7 @@ std::shared_ptr<spdlog::sinks::rotating_file_sink_mt> LoggerConfiguration::getRo
   if (!properties->getString(appender_key + ".directory", directory_str)) {
     // The below part assumes logger_properties->getHome() is existing
     // Cause minifiHome must be set at MiNiFiMain.cpp?
-    directory_str = (properties->getHome() / "logs").string();
+    directory_str = properties->getDefaultLogDir().string();
   }
 
   auto file_name = std::filesystem::path(directory_str) / file_name_str;
diff --git a/libminifi/src/core/repository/FileSystemRepository.cpp b/libminifi/src/core/repository/FileSystemRepository.cpp
index dc2d0ae50..1c04a1030 100644
--- a/libminifi/src/core/repository/FileSystemRepository.cpp
+++ b/libminifi/src/core/repository/FileSystemRepository.cpp
@@ -17,11 +17,14 @@
  */
 
 #include "core/repository/FileSystemRepository.h"
-#include <string>
+
 #include <filesystem>
+#include <string>
+
+#include "core/ForwardingContentSession.h"
 #include "io/FileStream.h"
+#include "utils/Locations.h"
 #include "utils/file/FileUtils.h"
-#include "core/ForwardingContentSession.h"
 
 namespace org::apache::nifi::minifi::core::repository {
 
@@ -29,7 +32,7 @@ bool FileSystemRepository::initialize(const std::shared_ptr<Configure>& configur
   if (std::string directory_str; configuration->get(Configure::nifi_dbcontent_repository_directory_default, directory_str) && !directory_str.empty()) {
     directory_ = directory_str;
   } else {
-    directory_ = configuration->getHome().string();
+    directory_ = utils::getMinifiDir().string();
   }
   utils::file::create_dir(directory_);
   return true;
diff --git a/libminifi/src/properties/Properties.cpp b/libminifi/src/properties/Properties.cpp
index 521ad9af1..b60e1499d 100644
--- a/libminifi/src/properties/Properties.cpp
+++ b/libminifi/src/properties/Properties.cpp
@@ -166,14 +166,14 @@ void PropertiesImpl::loadConfigureFile(const std::filesystem::path& configuratio
     return;
   }
 
-  if (!utils::file::exists(getHome() / configuration_file)) {
-    if (utils::file::create_dir((getHome() / configuration_file).parent_path()) == 0) {
-      std::ofstream file{getHome() / configuration_file};
+  if (!utils::file::exists(configuration_file)) {
+    if (utils::file::create_dir(configuration_file.parent_path()) == 0) {
+      std::ofstream file{configuration_file};
     }
   }
 
   std::error_code ec;
-  properties_file_ = std::filesystem::canonical(getHome() / configuration_file, ec);
+  properties_file_ = std::filesystem::canonical(configuration_file, ec);
 
   if (ec.value() != 0) {
     logger_->log_warn("Configuration file '{}' does not exist, and it could not be created", configuration_file);
diff --git a/libminifi/src/utils/file/AssetManager.cpp b/libminifi/src/utils/file/AssetManager.cpp
index 73f052de6..531825a38 100644
--- a/libminifi/src/utils/file/AssetManager.cpp
+++ b/libminifi/src/utils/file/AssetManager.cpp
@@ -16,18 +16,29 @@
  */
 
 #include "utils/file/AssetManager.h"
-#include "utils/file/FileUtils.h"
+
+#include "core/logging/LoggerFactory.h"
 #include "rapidjson/document.h"
 #include "rapidjson/writer.h"
-#include "core/logging/LoggerFactory.h"
 #include "utils/Hash.h"
+#include "utils/Locations.h"
+#include "utils/file/FileUtils.h"
 
 #undef GetObject  // windows.h #defines GetObject = GetObjectA or GetObjectW, which conflicts with rapidjson
 
 namespace org::apache::nifi::minifi::utils::file {
 
+namespace {
+std::filesystem::path getRootFromConfigure(const Configure& configuration) {
+  if (auto nifi_asset_directory = configuration.get(Configure::nifi_asset_directory)) {
+    return *nifi_asset_directory;
+  }
+  return utils::getMinifiDir() / "asset";
+}
+}  // namespace
+
 AssetManager::AssetManager(const Configure& configuration)
-    : root_(configuration.get(Configure::nifi_asset_directory).value_or((configuration.getHome() / "asset").string())),
+    : root_(getRootFromConfigure(configuration)),
       logger_(core::logging::LoggerFactory<AssetManager>::getLogger()) {
   refreshState();
 }
diff --git a/libminifi/test/integration/AlertTests.cpp b/libminifi/test/integration/AlertTests.cpp
index 57eb3b49d..b972d4b8a 100644
--- a/libminifi/test/integration/AlertTests.cpp
+++ b/libminifi/test/integration/AlertTests.cpp
@@ -80,9 +80,8 @@ TEST_CASE("Alert system forwards logs") {
   AlertHandler handler(agent_id);
   harness.setUrl("http://localhost:0/api/alerts", &handler);
   harness.getConfiguration()->set(minifi::Configuration::nifi_c2_agent_identifier, agent_id);
-  harness.getConfiguration()->setHome(dir.getPath());
 
-  auto log_props = std::make_shared<logging::LoggerProperties>();
+  auto log_props = std::make_shared<logging::LoggerProperties>(dir.getPath() / "logs");
   log_props->set("appender.alert1", "alert");
   log_props->set("appender.alert1.url", harness.getC2RestUrl());
   log_props->set("appender.alert1.filter", ".*<begin>(.*)<end>.*");
diff --git a/libminifi/test/integration/C2AssetSyncTest.cpp b/libminifi/test/integration/C2AssetSyncTest.cpp
index a1ce6ad68..d9c2195b0 100644
--- a/libminifi/test/integration/C2AssetSyncTest.cpp
+++ b/libminifi/test/integration/C2AssetSyncTest.cpp
@@ -52,12 +52,6 @@ class C2HeartbeatHandler : public HeartbeatHandler {
   using AssetDescription = org::apache::nifi::minifi::utils::file::AssetDescription;
 
   void handleHeartbeat(const rapidjson::Document& root, struct mg_connection* conn) override {
-    std::string hb_str = [&] {
-      rapidjson::StringBuffer buffer;
-      rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
-      root.Accept(writer);
-      return std::string{buffer.GetString(), buffer.GetSize()};
-    }();
     auto& asset_info_node = root["resourceInfo"];
     auto& asset_hash_node = asset_info_node["hash"];
     std::string asset_hash{asset_hash_node.GetString(), asset_hash_node.GetStringLength()};
@@ -173,6 +167,11 @@ class VerifyC2AssetSync : public VerifyC2Base {
     verify_ = std::move(verify);
   }
 
+
+  void setAssetDir(const std::filesystem::path& asset_dir) {
+    configuration->set(Configure::nifi_asset_directory, asset_dir.string());
+  }
+
  private:
   std::function<void()> verify_;
 };
@@ -201,13 +200,12 @@ TEST_CASE("C2AssetSync", "[c2test]") {
   C2HeartbeatHandler hb_handler{std::make_shared<minifi::ConfigureImpl>()};
 
   VerifyC2AssetSync harness;
+  harness.setAssetDir(asset_dir);
   harness.setUrl("http://localhost:0/api/file/A.txt", &file_A_provider);
   harness.setUrl("http://localhost:0/api/file/Av2.txt", &file_Av2_provider);
   harness.setUrl("http://localhost:0/api/file/B.txt", &file_B_provider);
   harness.setUrl("http://localhost:0/api/file/C.txt", &file_C_provider);
 
-  std::string absolute_file_A_url = "http://localhost:" + harness.getWebPort() + "/api/file/A.txt";
-
   hb_handler.addAsset("Av1", "A.txt", "/api/file/A.txt");
   hb_handler.addAsset("Bv1", "nested/dir/B.txt", "/api/file/B.txt");
   hb_handler.addAsset("Cv1", "nested/C.txt", "/api/file/C.txt");
diff --git a/libminifi/test/integration/C2DebugBundleTest.cpp b/libminifi/test/integration/C2DebugBundleTest.cpp
index a6d0482d6..3e9f1a606 100644
--- a/libminifi/test/integration/C2DebugBundleTest.cpp
+++ b/libminifi/test/integration/C2DebugBundleTest.cpp
@@ -189,8 +189,7 @@ TEST_CASE("C2DebugBundleTest", "[c2test]") {
     return true;
   });
 
-  harness.getConfiguration()->setHome(home_dir.string());
-  harness.getConfiguration()->loadConfigureFile("conf/minifi.properties");
+  harness.getConfiguration()->loadConfigureFile(home_dir / "conf/minifi.properties");
   harness.setUrl("http://localhost:0/heartbeat", &heartbeat_handler);
   harness.setUrl("http://localhost:0/acknowledge", &ack_handler);
   harness.setUrl("http://localhost:0/debug_bundle", &bundle_handler);
diff --git a/libminifi/test/integration/C2DescribeManifestTest.cpp b/libminifi/test/integration/C2DescribeManifestTest.cpp
index f14a30fe3..14a02ab6d 100644
--- a/libminifi/test/integration/C2DescribeManifestTest.cpp
+++ b/libminifi/test/integration/C2DescribeManifestTest.cpp
@@ -59,7 +59,7 @@ TEST_CASE("C2DescribeManifestTest", "[c2test]") {
   harness.setKeyDir(TEST_RESOURCES);
   DescribeManifestHandler responder(harness.getConfiguration(), verified);
 
-  auto logger_properties = std::make_shared<core::logging::LoggerProperties>();
+  auto logger_properties = std::make_shared<core::logging::LoggerProperties>("");
   ConfigTestAccessor::call_setLoggerProperties(harness.getConfiguration(), logger_properties);
 
   harness.getConfiguration()->set(minifi::Configuration::nifi_rest_api_password, encrypted_value);
diff --git a/libminifi/test/integration/C2PropertiesUpdateTests.cpp b/libminifi/test/integration/C2PropertiesUpdateTests.cpp
index 6d0b80b31..7600c8428 100644
--- a/libminifi/test/integration/C2PropertiesUpdateTests.cpp
+++ b/libminifi/test/integration/C2PropertiesUpdateTests.cpp
@@ -136,12 +136,11 @@ TEST_CASE("C2PropertiesUpdateTests", "[c2test]") {
   C2HeartbeatHandler hb_handler{};
   C2AcknowledgeHandler ack_handler{};
 
-  auto logger_properties = std::make_shared<core::logging::LoggerProperties>();
+  auto logger_properties = std::make_shared<core::logging::LoggerProperties>(home_dir / "logs");
   // this sets the ostream logger
   auto log_test_controller = LogTestController::getInstance(logger_properties);
 
-  logger_properties->setHome(home_dir);
-  logger_properties->loadConfigureFile("conf/minifi-log.properties");
+  logger_properties->loadConfigureFile(home_dir / "conf/minifi-log.properties");
   core::logging::LoggerConfiguration::getConfiguration().initialize(logger_properties);
 
   auto logger1 = core::logging::LoggerFactory<DummyClass1>::getLogger();
@@ -213,8 +212,7 @@ TEST_CASE("C2PropertiesUpdateTests", "[c2test]") {
     }
   });
 
-  harness.getConfiguration()->setHome(home_dir.string());
-  harness.getConfiguration()->loadConfigureFile("conf/minifi.properties");
+  harness.getConfiguration()->loadConfigureFile(home_dir / "conf/minifi.properties");
   ConfigTestAccessor::call_setLoggerProperties(harness.getConfiguration(), logger_properties);
 
   harness.setUrl("http://localhost:0/heartbeat", &hb_handler);
diff --git a/libminifi/test/integration/C2UpdateAssetTest.cpp b/libminifi/test/integration/C2UpdateAssetTest.cpp
index 7da531de2..8dc59e4d5 100644
--- a/libminifi/test/integration/C2UpdateAssetTest.cpp
+++ b/libminifi/test/integration/C2UpdateAssetTest.cpp
@@ -86,6 +86,10 @@ class VerifyC2AssetUpdate : public VerifyC2Base {
     verify_ = std::move(verify);
   }
 
+  void setAssetDir(const std::filesystem::path& asset_dir) {
+    configuration->set(Configure::nifi_asset_directory, asset_dir.string());
+  }
+
  private:
   std::function<bool()> verify_;
 };
@@ -117,6 +121,7 @@ TEST_CASE("Test update asset C2 command", "[c2test]") {
   C2HeartbeatHandler hb_handler{std::make_shared<minifi::ConfigureImpl>()};
 
   VerifyC2AssetUpdate harness;
+  harness.setAssetDir(asset_dir);
   harness.setUrl("http://localhost:0/api/file/A.txt", &file_A_provider);
   harness.setUrl("http://localhost:0/api/file/B.txt", &file_B_provider);
 
diff --git a/libminifi/test/libtest/unit/TestBase.cpp b/libminifi/test/libtest/unit/TestBase.cpp
index 115fea1af..d0997e345 100644
--- a/libminifi/test/libtest/unit/TestBase.cpp
+++ b/libminifi/test/libtest/unit/TestBase.cpp
@@ -102,10 +102,10 @@ bool LogTestController::contains(const std::string& ending, std::chrono::millise
 }
 
 bool LogTestController::contains(const std::function<std::string()>& log_string_getter, const std::string& ending, std::chrono::milliseconds timeout, std::chrono::milliseconds sleep_interval) {
-  if (ending.length() == 0) {
+  if (ending.empty()) {
     return false;
   }
-  auto start = std::chrono::steady_clock::now();
+  const auto start = std::chrono::steady_clock::now();
   bool found = false;
   bool timed_out = false;
   do {
@@ -122,7 +122,7 @@ bool LogTestController::contains(const std::function<std::string()>& log_string_
 }
 
 std::optional<std::smatch> LogTestController::matchesRegex(const std::string& regex_str, std::chrono::milliseconds timeout, std::chrono::milliseconds sleep_interval) const {
-  if (regex_str.length() == 0) {
+  if (regex_str.empty()) {
     return std::nullopt;
   }
   auto start = std::chrono::steady_clock::now();
@@ -155,7 +155,7 @@ void LogTestController::reset() {
   modified_loggers.clear();
   if (config)
     config = logging::LoggerConfiguration::newInstance();
-  my_properties_ = std::make_shared<logging::LoggerProperties>();
+  my_properties_ = std::make_shared<logging::LoggerProperties>("");
   clear();
   init(nullptr);
 }
@@ -176,7 +176,7 @@ void LogTestController::init(const std::shared_ptr<logging::LoggerProperties>& l
   my_properties_ = logger_props;
   bool initMain = false;
   if (nullptr == my_properties_) {
-    my_properties_ = std::make_shared<logging::LoggerProperties>();
+    my_properties_ = std::make_shared<logging::LoggerProperties>("");
     initMain = true;
   }
   my_properties_->set("logger.root", "ERROR,ostream");
@@ -548,7 +548,7 @@ bool TestPlan::runProcessor(size_t target_location, const PreTriggerVerifier& ve
     verify(context, current_session);
     current_session->commit();
   } else {
-    auto session_factory = std::make_shared<TestSessionFactory>(context, [&] (auto current_session) {
+    const auto session_factory = std::make_shared<TestSessionFactory>(context, [&] (const auto& current_session) {
       current_session->setMetrics(processor->getMetrics());
       process_sessions_.push_back(current_session);
     });
@@ -717,7 +717,6 @@ TestController::TestController()
 std::shared_ptr<TestPlan> TestController::createPlan(PlanConfig config) {
   if (!config.configuration) {
     config.configuration = minifi::Configure::create();
-    config.configuration->setHome(createTempDirectory());
     config.configuration->set(minifi::Configure::nifi_state_storage_local_class_name, "VolatileMapStateStorage");
     config.configuration->set(minifi::Configure::nifi_dbcontent_repository_directory_default, createTempDirectory().string());
   }
diff --git a/libminifi/test/libtest/unit/TestControllerWithFlow.cpp b/libminifi/test/libtest/unit/TestControllerWithFlow.cpp
index e475e08ab..5b090b844 100644
--- a/libminifi/test/libtest/unit/TestControllerWithFlow.cpp
+++ b/libminifi/test/libtest/unit/TestControllerWithFlow.cpp
@@ -41,7 +41,6 @@ TestControllerWithFlow::TestControllerWithFlow(const char* yamlConfigContent, bo
   std::ofstream{yaml_path_} << yamlConfigContent;
 
   configuration_ = minifi::Configure::create();
-  configuration_->setHome(home_.string());
   configuration_->set(minifi::Configure::nifi_flow_configuration_file, yaml_path_.string());
   configuration_->set(minifi::Configure::nifi_c2_enable, "true");
 
diff --git a/libminifi/test/persistence-tests/PersistenceTests.cpp b/libminifi/test/persistence-tests/PersistenceTests.cpp
index 4518e916c..f26e3e0b7 100644
--- a/libminifi/test/persistence-tests/PersistenceTests.cpp
+++ b/libminifi/test/persistence-tests/PersistenceTests.cpp
@@ -173,7 +173,6 @@ TEST_CASE("Processors Can Store FlowFiles", "[TestP1]") {
   auto dir = testController.createTempDirectory();
 
   auto config = std::make_shared<minifi::ConfigureImpl>();
-  config->setHome(dir);
   config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, (dir / "content_repository").string());
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, (dir / "flowfile_repository").string());
 
@@ -287,7 +286,6 @@ TEST_CASE("Persisted flowFiles are updated on modification", "[TestP1]") {
   auto dir = testController.createTempDirectory();
 
   auto config = std::make_shared<minifi::ConfigureImpl>();
-  config->setHome(dir);
   config->set(minifi::Configure::nifi_dbcontent_repository_directory_default, (dir / "content_repository").string());
   config->set(minifi::Configure::nifi_flowfile_repository_directory_default, (dir / "flowfile_repository").string());
   config->set(minifi::Configure::nifi_dbcontent_repository_purge_period, "0 s");
diff --git a/libminifi/test/unit/DecryptorTests.cpp b/libminifi/test/unit/DecryptorTests.cpp
index a026dc8dc..1c4c44217 100644
--- a/libminifi/test/unit/DecryptorTests.cpp
+++ b/libminifi/test/unit/DecryptorTests.cpp
@@ -90,8 +90,7 @@ TEST_CASE("Decryptor can decrypt a configuration file", "[decryptSensitiveProper
 
   minifi::ConfigureImpl configuration{decryptor};
   std::filesystem::path resources_dir{TEST_RESOURCES};
-  configuration.setHome(resources_dir);
-  configuration.loadConfigureFile("encrypted.minifi.properties");
+  configuration.loadConfigureFile(resources_dir / "encrypted.minifi.properties");
   REQUIRE_FALSE(configuration.getConfiguredKeys().empty());
 
   const auto passphrase = configuration.get(minifi::Configure::nifi_security_client_pass_phrase);
diff --git a/libminifi/test/unit/LogMetricsPublisherTests.cpp b/libminifi/test/unit/LogMetricsPublisherTests.cpp
index 6a75f9c30..b29229f00 100644
--- a/libminifi/test/unit/LogMetricsPublisherTests.cpp
+++ b/libminifi/test/unit/LogMetricsPublisherTests.cpp
@@ -39,7 +39,6 @@ class LogPublisherTestFixture {
       response_node_loader_(std::make_shared<state::response::ResponseNodeLoaderImpl>(configuration_,
         std::vector<std::shared_ptr<core::RepositoryMetricsSource>>{provenance_repo_, flow_file_repo_}, nullptr)),
       publisher_("LogMetricsPublisher") {
-    configuration_->setHome(temp_directory_.getPath());
     provenance_repo_->initialize(configuration_);
     flow_file_repo_->initialize(configuration_);
   }
diff --git a/libminifi/test/unit/LoggerConfigurationTests.cpp b/libminifi/test/unit/LoggerConfigurationTests.cpp
index 6583c52a1..e1589bb9d 100644
--- a/libminifi/test/unit/LoggerConfigurationTests.cpp
+++ b/libminifi/test/unit/LoggerConfigurationTests.cpp
@@ -33,7 +33,7 @@
 TEST_CASE("TestLoggerProperties::get_keys_of_type", "[test get_keys_of_type]") {
   TestController test_controller;
   LogTestController::getInstance().setDebug<logging::LoggerProperties>();
-  logging::LoggerProperties logger_properties;
+  logging::LoggerProperties logger_properties{""};
   logger_properties.set("appender.rolling", "rolling");
   logger_properties.set("notappender.notrolling", "notrolling");
   logger_properties.set("appender.stdout", "stdout");
diff --git a/libminifi/test/unit/LoggerTests.cpp b/libminifi/test/unit/LoggerTests.cpp
index 05aa1e8f7..1326c7ddf 100644
--- a/libminifi/test/unit/LoggerTests.cpp
+++ b/libminifi/test/unit/LoggerTests.cpp
@@ -99,7 +99,7 @@ TEST_CASE("Logger configured with an ID prints this ID in every log line", "[log
 }
 
 TEST_CASE("Printing of the ID can be disabled in the config", "[logger][id][configuration]") {
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
 
   bool id_is_present{};
   SECTION("Property not set") {
@@ -172,7 +172,7 @@ class TestClass2 {
 
 TEST_CASE("Test ShortenNames", "[ttl8]") {
   LogTestController::getInstance().reset();
-  std::shared_ptr<logging::LoggerProperties> props = std::make_shared<logging::LoggerProperties>();
+  std::shared_ptr<logging::LoggerProperties> props = std::make_shared<logging::LoggerProperties>("");
 
   props->set("spdlog.shorten_names", "true");
 
@@ -229,7 +229,7 @@ class LoggerTestAccessor {
 
 TEST_CASE("Test Compression", "[ttl9]") {
   auto log_config = logging::LoggerConfiguration::newInstance();
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
   std::string className;
   SECTION("Using root logger") {
     className = "CompressionTestClassUsingRoot";
@@ -254,7 +254,7 @@ TEST_CASE("Test Compression", "[ttl9]") {
 
 TEST_CASE("Test Compression cache overflow is discarded intermittently", "[ttl10]") {
   auto log_config = logging::LoggerConfiguration::newInstance();
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
   properties->set(logging::internal::CompressionManager::compression_cached_log_max_size_, "10 KB");
   LoggerTestAccessor::setCompressionCacheSegmentSize(*log_config, 1_KiB);
   std::string className = "CompressionTestCacheCleaned";
@@ -273,7 +273,7 @@ TEST_CASE("Test Compression cache overflow is discarded intermittently", "[ttl10
 
 TEST_CASE("Setting either properties to 0 disables in-memory compressed logs", "[ttl11]") {
   auto log_config = logging::LoggerConfiguration::newInstance();
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
   bool is_empty = false;
   SECTION("Cached log size is set to 0") {
     is_empty = true;
@@ -300,7 +300,7 @@ TEST_CASE("Setting either properties to 0 disables in-memory compressed logs", "
 
 TEST_CASE("Setting max log entry length property trims long log entries", "[ttl12]") {
   auto log_config = logging::LoggerConfiguration::newInstance();
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
   properties->set("max.log.entry.length", "2");
   properties->set("logger.root", "INFO");
   log_config->initialize(properties);
@@ -317,7 +317,7 @@ TEST_CASE("Setting max log entry length property trims long log entries", "[ttl1
 
 TEST_CASE("Setting max log entry length property trims long formatted log entries", "[ttl13]") {
   auto log_config = logging::LoggerConfiguration::newInstance();
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
   properties->set("max.log.entry.length", "2");
   properties->set("logger.root", "INFO");
   log_config->initialize(properties);
@@ -334,7 +334,7 @@ TEST_CASE("Setting max log entry length property trims long formatted log entrie
 
 TEST_CASE("Setting max log entry length to a size larger than the internal buffer size", "[ttl14]") {
   auto log_config = logging::LoggerConfiguration::newInstance();
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
   properties->set("max.log.entry.length", "1500");
   properties->set("logger.root", "INFO");
   log_config->initialize(properties);
@@ -353,7 +353,7 @@ TEST_CASE("Setting max log entry length to a size larger than the internal buffe
 
 TEST_CASE("Setting max log entry length to unlimited results in unlimited log entry size", "[ttl15]") {
   auto log_config = logging::LoggerConfiguration::newInstance();
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
   std::string_view logger_name;
   SECTION("Use unlimited value") {
     properties->set("max.log.entry.length", "unlimited");
@@ -420,7 +420,7 @@ TEST_CASE("Test sending multiple segments at once", "[ttl16]") {
   auto log_config = logging::LoggerConfiguration::newInstance();
   LoggerTestAccessor::setCompressionCompressedSegmentSize(*log_config, 100);
   LoggerTestAccessor::setCompressionCacheSegmentSize(*log_config, 100);
-  auto properties = std::make_shared<logging::LoggerProperties>();
+  auto properties = std::make_shared<logging::LoggerProperties>("");
   // by default the root logger is OFF
   properties->set("logger.root", "INFO");
   log_config->initialize(properties);
diff --git a/libminifi/test/unit/ProcessSessionTests.cpp b/libminifi/test/unit/ProcessSessionTests.cpp
index 6761e5c19..8585f6456 100644
--- a/libminifi/test/unit/ProcessSessionTests.cpp
+++ b/libminifi/test/unit/ProcessSessionTests.cpp
@@ -146,7 +146,6 @@ class TestVolatileFlowFileRepository : public core::repository::VolatileFlowFile
 TEST_CASE("ProcessSession::commit avoids dangling ResourceClaims when using VolatileFlowFileRepository", "[incrementbefore]") {
   TempDirectory tmp_dir;
   auto configuration = std::make_shared<minifi::ConfigureImpl>();
-  configuration->setHome(tmp_dir.getPath());
   configuration->set(minifi::Configure::nifi_volatile_repository_options_flowfile_max_count, "2");
   auto ff_repo = std::make_shared<TestVolatileFlowFileRepository>("flowfile");
   Fixture fixture({
diff --git a/libminifi/test/unit/performance/VolatileRepositoryPerfTests.cpp b/libminifi/test/unit/performance/VolatileRepositoryPerfTests.cpp
index 44a65056d..2b25c281d 100644
--- a/libminifi/test/unit/performance/VolatileRepositoryPerfTests.cpp
+++ b/libminifi/test/unit/performance/VolatileRepositoryPerfTests.cpp
@@ -27,7 +27,7 @@
 // NOLINTBEGIN
 
 static bool initializeLogger = [] {
-  auto log_props = std::make_shared<org::apache::nifi::minifi::core::logging::LoggerProperties>();
+  auto log_props = std::make_shared<org::apache::nifi::minifi::core::logging::LoggerProperties>("");
   log_props->set("logger.root", "OFF");
   org::apache::nifi::minifi::core::logging::LoggerConfiguration::getConfiguration().initialize(log_props);
   return true;
diff --git a/minifi-api/include/minifi-cpp/core/ProcessContext.h b/minifi-api/include/minifi-cpp/core/ProcessContext.h
index 446d104a0..c9ba38fc5 100644
--- a/minifi-api/include/minifi-cpp/core/ProcessContext.h
+++ b/minifi-api/include/minifi-cpp/core/ProcessContext.h
@@ -85,8 +85,6 @@ class ProcessContext : public virtual core::VariableRegistry, public virtual uti
   virtual std::shared_ptr<core::Repository> getProvenanceRepository() = 0;
   virtual std::shared_ptr<core::ContentRepository> getContentRepository() const = 0;
   virtual std::shared_ptr<core::Repository> getFlowFileRepository() const = 0;
-  virtual void initializeContentRepository(const std::string& home) = 0;
-  virtual bool isInitialized() const = 0;
 
   virtual bool hasIncomingConnections() const = 0;
 
diff --git a/minifi-api/include/minifi-cpp/properties/Configure.h b/minifi-api/include/minifi-cpp/properties/Configure.h
index 393a91c70..ac05b42db 100644
--- a/minifi-api/include/minifi-cpp/properties/Configure.h
+++ b/minifi-api/include/minifi-cpp/properties/Configure.h
@@ -16,10 +16,10 @@
  */
 #pragma once
 
+#include <memory>
 #include <optional>
 #include <string>
 #include <utility>
-#include <memory>
 
 #include "Configuration.h"
 #include "minifi-cpp/core/AgentIdentificationProvider.h"
@@ -29,6 +29,7 @@ struct ConfigTestAccessor;
 
 namespace org::apache::nifi::minifi {
 
+
 class Configure : public virtual Configuration, public virtual core::AgentIdentificationProvider {
   friend struct ::ConfigTestAccessor;
  public:
diff --git a/minifi-api/include/minifi-cpp/properties/Properties.h b/minifi-api/include/minifi-cpp/properties/Properties.h
index 9f684bdcd..a9573a09a 100644
--- a/minifi-api/include/minifi-cpp/properties/Properties.h
+++ b/minifi-api/include/minifi-cpp/properties/Properties.h
@@ -55,9 +55,7 @@ class Properties {
   virtual int getInt(const std::string &key, int default_value) const = 0;
   virtual std::optional<std::string> getString(const std::string& key) const = 0;
   virtual void loadConfigureFile(const std::filesystem::path& configuration_file, std::string_view prefix = "") = 0;
-  virtual void setHome(std::filesystem::path minifiHome) = 0;
   virtual std::vector<std::string> getConfiguredKeys() const = 0;
-  virtual std::filesystem::path getHome() const = 0;
   virtual bool commitChanges() = 0;
   virtual utils::ChecksumCalculator& getChecksumCalculator() = 0;
   virtual std::filesystem::path getFilePath() const = 0;
diff --git a/minifi_main/CMakeLists.txt b/minifi_main/CMakeLists.txt
index 093eefc43..b8ba7ad9f 100644
--- a/minifi_main/CMakeLists.txt
+++ b/minifi_main/CMakeLists.txt
@@ -81,10 +81,18 @@ if (NOT WIN32)
     if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT APPLE)
         target_link_options(minifiexe PRIVATE "-Wl,--disable-new-dtags")
     endif()
-    if (APPLE)
-        set_target_properties(minifiexe PROPERTIES INSTALL_RPATH "@loader_path")
+
+    if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+        set_target_properties(minifiexe PROPERTIES
+                INSTALL_RPATH "/usr/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")
+
     else()
-        set_target_properties(minifiexe PROPERTIES INSTALL_RPATH "$ORIGIN")
+        if (APPLE)
+            set_target_properties(minifiexe PROPERTIES INSTALL_RPATH "@loader_path")
+        else()
+            set_target_properties(minifiexe PROPERTIES INSTALL_RPATH "$ORIGIN")
+        endif()
     endif()
-    install(TARGETS minifiexe RUNTIME DESTINATION bin COMPONENT bin)
+
+    install(TARGETS minifiexe RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin)
 endif()
diff --git a/minifi_main/Fips.cpp b/minifi_main/Fips.cpp
index f0387bc38..765884de9 100644
--- a/minifi_main/Fips.cpp
+++ b/minifi_main/Fips.cpp
@@ -16,17 +16,17 @@
  */
 #include "Fips.h"
 
-#include <openssl/provider.h>
-#include <openssl/evp.h>
 #include <openssl/err.h>
+#include <openssl/evp.h>
+#include <openssl/provider.h>
 
 #include <fstream>
-#include <algorithm>
 #include <string>
 
+#include "MainHelper.h"
 #include "utils/Environment.h"
-#include "utils/StringUtils.h"
 #include "utils/OptionalUtils.h"
+#include "utils/StringUtils.h"
 
 namespace org::apache::nifi::minifi::fips {
 
@@ -39,7 +39,7 @@ constexpr std::string_view FIPS_LIB = "fips.dylib";
 constexpr std::string_view FIPS_LIB = "fips.so";
 #endif
 
-bool replaceMinifiHomeVariable(const std::filesystem::path& file_path, const std::filesystem::path& minifi_home_path, const std::shared_ptr<core::logging::Logger>& logger) {
+bool substituteFipsDirVariable(const std::filesystem::path& file_path, const std::filesystem::path& fips_conf_dir, const std::shared_ptr<core::logging::Logger>& logger) {
   std::ifstream input_file(file_path);
   if (!input_file) {
     logger->log_error("Failed to open file: {}", file_path.string());
@@ -51,16 +51,16 @@ bool replaceMinifiHomeVariable(const std::filesystem::path& file_path, const std
   std::string content = buffer.str();
   input_file.close();
 
-  const std::string placeholder = "${MINIFI_HOME}";
+  const std::string placeholder = "${FIPS_CONF_DIR}";
   size_t pos = content.find(placeholder, 0);
   if (pos == std::string::npos) {
     return true;
   }
 
-  auto minifi_home_path_str = minifi_home_path.generic_string();
+  auto fips_dir_str = fips_conf_dir.generic_string();
   do {
-    content.replace(pos, placeholder.length(), minifi_home_path_str);
-    pos += minifi_home_path_str.length();
+    content.replace(pos, placeholder.length(), fips_dir_str);
+    pos += fips_dir_str.length();
   } while ((pos = content.find(placeholder, pos)) != std::string::npos);
 
   std::ofstream output_file(file_path);
@@ -74,18 +74,18 @@ bool replaceMinifiHomeVariable(const std::filesystem::path& file_path, const std
   return true;
 }
 
-bool generateFipsModuleConfig(const std::filesystem::path& minifi_home, const std::shared_ptr<core::logging::Logger>& logger) {
-  std::filesystem::path output_file(minifi_home / "fips" / "fipsmodule.cnf");
+bool generateFipsModuleConfig(const Locations& locations, const std::shared_ptr<core::logging::Logger>& logger) {
+  const auto& fips_bin_path = locations.fips_bin_path_;
+  const auto& fips_conf_path = locations.fips_conf_path_;
+  std::filesystem::path output_file(fips_conf_path / "fipsmodule.cnf");
   logger->log_info("fipsmodule.cnf was not found, trying to run fipsinstall command to generate the file");
 
 #ifdef WIN32
-  std::string command =
-    "\"\"" + (minifi_home / "fips" / "openssl.exe").string() + "\" fipsinstall -out \"" + output_file.string() + "\" -module \"" + (minifi_home / "fips" / FIPS_LIB).string() + "\"\"";
+  std::string command = fmt::format(R"("{}" fipsinstall -out "{}" -module "{}")", fips_bin_path / "openssl.exe", output_file, fips_bin_path / FIPS_LIB);
 #else
-  std::string command = "\"" + (minifi_home / "fips" / "openssl").string() + "\" fipsinstall -out \"" + output_file.string() + "\" -module \"" + (minifi_home / "fips" / FIPS_LIB).string() + "\"";
+  std::string command = fmt::format(R"("{}" fipsinstall -out "{}" -module "{}")", fips_bin_path / "openssl", output_file, fips_bin_path / FIPS_LIB);
 #endif
-  auto ret = std::system(command.c_str());
-  if (ret != 0) {
+  if (std::system(command.c_str()) != 0) {
     logger->log_error("Failed to generate fipsmodule.cnf file");
     return false;
   }
@@ -94,37 +94,42 @@ bool generateFipsModuleConfig(const std::filesystem::path& minifi_home, const st
 }
 }  // namespace
 
-void initializeFipsMode(const std::shared_ptr<minifi::Configure>& configure, const std::filesystem::path& minifi_home, const std::shared_ptr<core::logging::Logger>& logger) {
+void initializeFipsMode(const std::shared_ptr<minifi::Configure>& configure, const Locations& locations, const std::shared_ptr<core::logging::Logger>& logger) {
+  const auto& fips_bin_path = locations.fips_bin_path_;
+  const auto& fips_conf_path = locations.fips_conf_path_;
   if (!(configure->get(minifi::Configure::nifi_openssl_fips_support_enable) | utils::andThen(utils::string::toBool)).value_or(false)) {
     logger->log_info("FIPS mode is disabled. FIPS configs and modules will NOT be loaded.");
     return;
   }
 
-  if (!std::filesystem::exists(minifi_home / "fips" / FIPS_LIB)) {
-    logger->log_error("FIPS mode is enabled, but {} is not available in MINIFI_HOME/fips directory", FIPS_LIB);
+  if (!std::filesystem::exists(fips_bin_path / FIPS_LIB)) {
+    logger->log_error("FIPS mode is enabled, but {} is not available in {} directory", FIPS_LIB, fips_bin_path);
     std::exit(1);
   }
 
-  if (!std::filesystem::exists(minifi_home / "fips" / "fipsmodule.cnf") && !generateFipsModuleConfig(minifi_home, logger)) {
-    logger->log_error("FIPS mode is enabled, but fipsmodule.cnf is not available in $MINIFI_HOME/fips directory, and minifi couldn't generate it automatically.  "
-      "Run $MINIFI_HOME/fips/openssl fipsinstall -out fipsmodule.cnf -module $MINIFI_HOME/fips/{} command to generate the configuration file", FIPS_LIB);
+  if (!std::filesystem::exists(fips_conf_path / "fipsmodule.cnf") && !generateFipsModuleConfig(locations, logger)) {
+    logger->log_error("FIPS mode is enabled, but fipsmodule.cnf is not available in {fips_conf_dir} directory, and minifi couldn't generate it automatically.  "
+      "Run {fips_bin_dir}/openssl fipsinstall -out {fips_conf_dir}/fipsmodule.cnf -module {fips_bin_dir}/{fips_lib_name} command to generate the configuration file",
+      fmt::arg("fips_conf_dir", fips_conf_path),
+      fmt::arg("fips_bin_dir", fips_bin_path),
+      fmt::arg("fips_lib_name", FIPS_LIB));
     std::exit(1);
   }
 
-  if (!std::filesystem::exists(minifi_home / "fips" / "openssl.cnf")) {
-    logger->log_error("FIPS mode is enabled, but openssl.cnf is not available in MINIFI_HOME/fips directory");
+  if (!std::filesystem::exists(fips_conf_path / "openssl.cnf")) {
+    logger->log_error("FIPS mode is enabled, but openssl.cnf is not available in {} directory", fips_conf_path);
     std::exit(1);
   }
 
-  if (!replaceMinifiHomeVariable(minifi_home / "fips" / "openssl.cnf", minifi_home, logger)) {
-    logger->log_error("Failed to replace MINIFI_HOME variable in openssl.cnf");
+  if (!substituteFipsDirVariable(fips_conf_path / "openssl.cnf", fips_conf_path, logger)) {
+    logger->log_error("Failed to replace FIPS_CONF_DIR variable in openssl.cnf");
     std::exit(1);
   }
 
-  utils::Environment::setEnvironmentVariable("OPENSSL_CONF", (minifi_home / "fips" / "openssl.cnf").string().c_str(), true);
+  utils::Environment::setEnvironmentVariable("OPENSSL_CONF", (fips_conf_path / "openssl.cnf").string().c_str(), true);
 
-  if (!OSSL_PROVIDER_set_default_search_path(nullptr, (minifi_home / "fips").string().c_str())) {
-    logger->log_error("Failed to set FIPS module path: {}", (minifi_home / "fips").string());
+  if (!OSSL_PROVIDER_set_default_search_path(nullptr, (fips_bin_path.string()).c_str())) {
+    logger->log_error("Failed to set FIPS module path: {}", fips_bin_path.string());
     ERR_print_errors_fp(stderr);
     std::exit(1);
   }
diff --git a/minifi_main/Fips.h b/minifi_main/Fips.h
index a1b1d3b8a..958189332 100644
--- a/minifi_main/Fips.h
+++ b/minifi_main/Fips.h
@@ -18,11 +18,13 @@
 
 #include <filesystem>
 #include <memory>
+
+#include "MainHelper.h"
 #include "core/logging/Logger.h"
 #include "minifi-cpp/properties/Configure.h"
 
 namespace org::apache::nifi::minifi::fips {
 
-void initializeFipsMode(const std::shared_ptr<Configure>& configure, const std::filesystem::path& minifi_home, const std::shared_ptr<core::logging::Logger>& logger);
+void initializeFipsMode(const std::shared_ptr<Configure>& configure, const Locations& locations, const std::shared_ptr<core::logging::Logger>& logger);
 
 }  // namespace org::apache::nifi::minifi::fips
diff --git a/minifi_main/MainHelper.cpp b/minifi_main/MainHelper.cpp
index 70c46b76e..a2bb8af61 100644
--- a/minifi_main/MainHelper.cpp
+++ b/minifi_main/MainHelper.cpp
@@ -20,33 +20,32 @@
 
 #include "utils/Environment.h"
 #include "utils/StringUtils.h"
+#include "Defaults.h"
 #include "utils/file/FileUtils.h"
 
-namespace minifi = org::apache::nifi::minifi;
-namespace utils = minifi::utils;
-namespace logging = minifi::core::logging;
 
+namespace org::apache::nifi::minifi {
 bool validHome(const std::filesystem::path& home_path) {
   return utils::file::exists(home_path / DEFAULT_NIFI_PROPERTIES_FILE);
 }
 
 void setSyslogLogger() {
-  std::shared_ptr<logging::LoggerProperties> service_logger = std::make_shared<logging::LoggerProperties>();
+  std::shared_ptr<core::logging::LoggerProperties> service_logger = std::make_shared<core::logging::LoggerProperties>("");
   service_logger->set("appender.syslog", "syslog");
   service_logger->set("logger.root", "INFO,syslog");
-  logging::LoggerConfiguration::getConfiguration().initialize(service_logger);
+  core::logging::LoggerConfiguration::getConfiguration().initialize(service_logger);
 }
 
-std::filesystem::path determineMinifiHome(const std::shared_ptr<logging::Logger>& logger) {
+std::filesystem::path determineMinifiHome(const std::shared_ptr<core::logging::Logger>& logger) {
   /* Try to determine MINIFI_HOME */
   std::filesystem::path minifi_home = [&logger]() -> std::filesystem::path {
     /* If MINIFI_HOME is set as an environment variable, we will use that */
-    auto minifi_home_env_key = utils::Environment::getEnvironmentVariable(MINIFI_HOME_ENV_KEY);
-    if (minifi_home_env_key) {
-      logger->log_info("Found " MINIFI_HOME_ENV_KEY "={} in environment", *minifi_home_env_key);
-      return *minifi_home_env_key;
+    auto minifi_home_env_value = utils::Environment::getEnvironmentVariable(std::string(MINIFI_HOME_ENV_KEY).c_str());
+    if (minifi_home_env_value) {
+      logger->log_info("Found {}={} in environment", MINIFI_HOME_ENV_KEY, *minifi_home_env_value);
+      return *minifi_home_env_value;
     } else {
-      logger->log_info(MINIFI_HOME_ENV_KEY " is not set; trying to infer it");
+      logger->log_info("{} is not set; trying to infer it", MINIFI_HOME_ENV_KEY);
     }
 
     /* Try to determine MINIFI_HOME relative to the location of the minifi executable */
@@ -55,7 +54,7 @@ std::filesystem::path determineMinifiHome(const std::shared_ptr<logging::Logger>
       logger->log_error("Failed to determine location of the minifi executable");
     } else {
       auto executable_parent_path = executable_path.parent_path();
-      logger->log_info("Inferred " MINIFI_HOME_ENV_KEY "={} based on the minifi executable location {}", executable_parent_path, executable_path);
+      logger->log_info("Inferred {}={} based on the minifi executable location {}", MINIFI_HOME_ENV_KEY, executable_parent_path, executable_path);
       return executable_parent_path;
     }
 
@@ -65,7 +64,7 @@ std::filesystem::path determineMinifiHome(const std::shared_ptr<logging::Logger>
     if (cwd.empty()) {
       logger->log_error("Failed to determine current working directory");
     } else {
-      logger->log_info("Inferred " MINIFI_HOME_ENV_KEY "={} based on the current working directory {}", cwd, cwd);
+      logger->log_info("Inferred {}={} based on the current working directory {}", MINIFI_HOME_ENV_KEY, cwd, cwd);
       return cwd;
     }
 #endif
@@ -74,8 +73,8 @@ std::filesystem::path determineMinifiHome(const std::shared_ptr<logging::Logger>
   }();
 
   if (minifi_home.empty()) {
-    logger->log_error("No " MINIFI_HOME_ENV_KEY " could be inferred. "
-                      "Please set " MINIFI_HOME_ENV_KEY " or run minifi from a valid location.");
+    logger->log_error("No {} could be inferred. "
+                      "Please set {} or run minifi from a valid location.", MINIFI_HOME_ENV_KEY, MINIFI_HOME_ENV_KEY);
     return "";
   }
 
@@ -105,9 +104,47 @@ std::filesystem::path determineMinifiHome(const std::shared_ptr<logging::Logger>
     return "";
   }
 
-  /* Set the valid MINIFI_HOME in our environment */
-  logger->log_info("Using " MINIFI_HOME_ENV_KEY "={}", minifi_home);
-  utils::Environment::setEnvironmentVariable(MINIFI_HOME_ENV_KEY, minifi_home.string().c_str());
-
   return minifi_home;
 }
+
+Locations getFromMinifiHome(const std::filesystem::path& minifi_home) {
+  return {
+    .working_dir_ = minifi_home,
+    .lock_path_ = minifi_home / "LOCK",
+    .log_properties_path_ = minifi_home / DEFAULT_LOG_PROPERTIES_FILE,
+    .uid_properties_path_ = minifi_home / DEFAULT_UID_PROPERTIES_FILE,
+    .properties_path_ = minifi_home / DEFAULT_NIFI_PROPERTIES_FILE,
+    .logs_dir_ = minifi_home / "logs",
+    .fips_bin_path_ = minifi_home / "fips",
+    .fips_conf_path_ = minifi_home / "fips",
+  };
+}
+
+Locations getFromFHS() {
+  return {
+    .working_dir_ =  std::filesystem::path(RPM_WORK_DIR),
+    .lock_path_ = std::filesystem::path(RPM_WORK_DIR) / "LOCK",
+    .log_properties_path_ = std::filesystem::path(RPM_CONFIG_DIR) / "minifi-log.properties",
+    .uid_properties_path_ = std::filesystem::path(RPM_CONFIG_DIR) / "minifi-uid.properties",
+    .properties_path_ = std::filesystem::path(RPM_CONFIG_DIR) / "minifi.properties",
+    .logs_dir_ = std::filesystem::path(RPM_LOG_DIR),
+    .fips_bin_path_ = std::filesystem::path(RPM_LIB_DIR) / "fips",
+    .fips_conf_path_ = std::filesystem::path(RPM_CONFIG_DIR) / "fips"
+};
+}
+
+std::optional<Locations> determineLocations(const std::shared_ptr<core::logging::Logger>& logger) {
+  const auto minifi_home_env = utils::Environment::getEnvironmentVariable(std::string(MINIFI_HOME_ENV_KEY).c_str());
+  const auto executable_path = utils::file::get_executable_path();
+
+  if (minifi_home_env == MINIFI_HOME_ENV_VALUE_FHS || (!minifi_home_env && executable_path.parent_path() == "/usr/bin")) {
+    return getFromFHS();
+  }
+
+  const auto minifi_home = determineMinifiHome(logger);
+  if (minifi_home.empty()) {
+    return std::nullopt;
+  }
+  return getFromMinifiHome(minifi_home);
+}
+}  // namespace org::apache::nifi::minifi
diff --git a/minifi_main/MainHelper.h b/minifi_main/MainHelper.h
index 0636c20d1..5307d2a6c 100644
--- a/minifi_main/MainHelper.h
+++ b/minifi_main/MainHelper.h
@@ -21,8 +21,6 @@
 #include <filesystem>
 
 #include "core/logging/LoggerConfiguration.h"
-#include "core/logging/Logger.h"
-#include "Defaults.h"
 
 #ifdef WIN32
 extern "C" {
@@ -42,29 +40,53 @@ extern "C" {
 #define STOP_WAIT_TIME_MS 30*1000
 //! Default YAML location
 
-//! Define home environment variable
-#define MINIFI_HOME_ENV_KEY "MINIFI_HOME"
-
 #ifdef _MSC_VER
 #ifndef PATH_MAX
 #define PATH_MAX 260
 #endif
 #endif
 
-/**
- * Validates a MINIFI_HOME value.
- * @param home_path
- * @return true if home_path represents a valid MINIFI_HOME
- */
-bool validHome(const std::string &home_path);
+namespace org::apache::nifi::minifi {
+struct Locations {
+  std::filesystem::path working_dir_;
+  std::filesystem::path lock_path_;
+  std::filesystem::path log_properties_path_;
+  std::filesystem::path uid_properties_path_;
+  std::filesystem::path properties_path_;
+  std::filesystem::path logs_dir_;
+  std::filesystem::path fips_bin_path_;
+  std::filesystem::path fips_conf_path_;
+};
 
 /**
  * Configures the logger to log everything to syslog/Windows Event Log, and for the minimum log level to INFO
  */
 void setSyslogLogger();
 
-/**
- * Determines the full path of MINIFI_HOME
- * @return MINIFI_HOME on success, empty string on failure
- */
 std::filesystem::path determineMinifiHome(const std::shared_ptr<org::apache::nifi::minifi::core::logging::Logger>& logger);
+
+std::optional<Locations> determineLocations(const std::shared_ptr<org::apache::nifi::minifi::core::logging::Logger>& logger);
+
+inline auto format_as(const Locations& loc) {
+  static constexpr std::string_view fmt_str =
+      "\n"
+      "{:<24} {}\n"
+      "{:<24} {}\n"
+      "{:<24} {}\n"
+      "{:<24} {}\n"
+      "{:<24} {}\n"
+      "{:<24} {}\n"
+      "{:<24} {}\n"
+      "{:<24} {}";
+
+  return fmt::format(fmt_str,
+      "Working dir:",         loc.working_dir_,
+      "Lock path:",           loc.lock_path_,
+      "Log properties path:", loc.log_properties_path_,
+      "UID properties path:", loc.uid_properties_path_,
+      "Properties path:",     loc.properties_path_,
+      "Logs dir:",            loc.logs_dir_,
+      "Fips binary path:",    loc.fips_bin_path_,
+      "Fips conf path:",      loc.fips_conf_path_);
+}
+}  // namespace org::apache::nifi::minifi
diff --git a/minifi_main/MiNiFiMain.cpp b/minifi_main/MiNiFiMain.cpp
index 59c2e934b..33249767c 100644
--- a/minifi_main/MiNiFiMain.cpp
+++ b/minifi_main/MiNiFiMain.cpp
@@ -18,7 +18,6 @@
  * limitations under the License.
  */
 
-
 #ifdef WIN32
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
@@ -45,31 +44,32 @@
 #include <iostream>
 #include <vector>
 
+#include "AgentDocs.h"
+#include "DiskSpaceWatchdog.h"
+#include "Defaults.h"
+#include "Fips.h"
+#include "FlowController.h"
+#include "MainHelper.h"
 #include "ResourceClaim.h"
+#include "agent/JsonSchema.h"
+#include "agent/agent_version.h"
+#include "argparse/argparse.hpp"
+#include "core/BulletinStore.h"
+#include "core/ConfigurationFactory.h"
 #include "core/Core.h"
 #include "core/FlowConfiguration.h"
-#include "core/ConfigurationFactory.h"
 #include "core/RepositoryFactory.h"
 #include "core/extension/ExtensionManager.h"
 #include "core/repository/VolatileContentRepository.h"
 #include "core/repository/VolatileFlowFileRepository.h"
-#include "DiskSpaceWatchdog.h"
+#include "core/state/MetricsPublisherStore.h"
+#include "core/state/nodes/ResponseNodeLoader.h"
 #include "properties/Decryptor.h"
-#include "utils/file/PathUtils.h"
-#include "utils/file/FileUtils.h"
-#include "utils/file/AssetManager.h"
 #include "utils/Environment.h"
 #include "utils/FileMutex.h"
-#include "FlowController.h"
-#include "AgentDocs.h"
-#include "MainHelper.h"
-#include "agent/JsonSchema.h"
-#include "core/state/nodes/ResponseNodeLoader.h"
-#include "core/state/MetricsPublisherStore.h"
-#include "argparse/argparse.hpp"
-#include "agent/agent_version.h"
-#include "Fips.h"
-#include "core/BulletinStore.h"
+#include "utils/file/AssetManager.h"
+#include "utils/file/FileUtils.h"
+#include "utils/file/PathUtils.h"
 
 namespace minifi = org::apache::nifi::minifi;
 namespace core = minifi::core;
@@ -220,7 +220,7 @@ int main(int argc, char **argv) {
 #endif
 
   if (utils::Environment::isRunningAsService()) {
-    setSyslogLogger();
+    minifi::setSyslogLogger();
   }
   auto& logger_configuration = core::logging::LoggerConfiguration::getConfiguration();
   const auto logger = logger_configuration.getLogger("main");
@@ -266,25 +266,27 @@ int main(int argc, char **argv) {
     return -1;
   }
 #endif
-  // Determine MINIFI_HOME
-  const auto minifiHome = determineMinifiHome(logger);
-  if (minifiHome.empty()) {
-    // determineMinifiHome already logged everything we need
+  const auto locations = minifi::determineLocations(logger);
+  if (!locations) {
+    // determineLocations already logged everything we need
     return -1;
   }
-  utils::FileMutex minifi_home_mtx(minifiHome / "LOCK");
+  minifi::utils::Environment::setEnvironmentVariable(std::string(MINIFI_WORKING_DIR).c_str(), locations->working_dir_.string().c_str());
+  logger->log_info("MiNiFi Locations={}", *locations);
+
+  utils::FileMutex minifi_home_mtx(locations->lock_path_);
   std::unique_lock minifi_home_lock(minifi_home_mtx, std::defer_lock);
   try {
     minifi_home_lock.lock();
   } catch (const std::exception& ex) {
-    logger->log_error("Could not acquire LOCK for minifi home '{}', maybe another minifi instance is running: {}", minifiHome, ex.what());
+    logger->log_error("Could not acquire LOCK '{}', maybe another minifi instance is running: {}", locations->lock_path_, ex.what());
     std::exit(1);
   }
   // chdir to MINIFI_HOME
   std::error_code current_path_error;
-  std::filesystem::current_path(minifiHome, current_path_error);
+  std::filesystem::current_path(locations->working_dir_, current_path_error);
   if (current_path_error) {
-    logger->log_error("Failed to change working directory to MINIFI_HOME ({})", minifiHome);
+    logger->log_error("Failed to change working directory to {}", locations->working_dir_);
     return -1;
   }
 
@@ -303,27 +305,21 @@ int main(int argc, char **argv) {
   do {
     flow_controller_running.test_and_set();
 
-    std::string graceful_shutdown_seconds;
     std::string prov_repo_class = "provenancerepository";
     std::string flow_repo_class = "flowfilerepository";
     std::string nifi_configuration_class_name = "adaptiveconfiguration";
     std::string content_repo_class = "filesystemrepository";
 
-    auto log_properties = std::make_shared<core::logging::LoggerProperties>();
-    log_properties->setHome(minifiHome);
-    log_properties->loadConfigureFile(DEFAULT_LOG_PROPERTIES_FILE, "nifi.log.");
+    auto log_properties = std::make_shared<core::logging::LoggerProperties>(locations->logs_dir_);
+    log_properties->loadConfigureFile(locations->log_properties_path_, "nifi.log.");
 
     logger_configuration.initialize(log_properties);
 
     std::shared_ptr<minifi::Properties> uid_properties = std::make_shared<minifi::PropertiesImpl>("UID properties");
-    uid_properties->setHome(minifiHome);
-    uid_properties->loadConfigureFile(DEFAULT_UID_PROPERTIES_FILE);
+    uid_properties->loadConfigureFile(locations->uid_properties_path_);
     utils::IdGenerator::getIdGenerator()->initialize(uid_properties);
 
-    // Make a record of minifi home in the configured log file.
-    logger->log_info("MINIFI_HOME={}", minifiHome);
-
-    auto decryptor = minifi::Decryptor::create(minifiHome);
+    auto decryptor = minifi::Decryptor::create(locations->working_dir_);
     if (decryptor) {
       logger->log_info("Found encryption key, will decrypt sensitive properties in the configuration");
     } else {
@@ -331,11 +327,10 @@ int main(int argc, char **argv) {
     }
 
     const std::shared_ptr<minifi::Configure> configure = std::make_shared<minifi::ConfigureImpl>(std::move(decryptor), std::move(log_properties));
-    configure->setHome(minifiHome);
-    configure->loadConfigureFile(DEFAULT_NIFI_PROPERTIES_FILE);
+    configure->loadConfigureFile(locations->properties_path_);
     overridePropertiesFromCommandLine(argument_parser, configure);
 
-    minifi::fips::initializeFipsMode(configure, minifiHome, logger);
+    minifi::fips::initializeFipsMode(configure, *locations, logger);
 
     minifi::core::extension::ExtensionManagerImpl::get().initialize(configure);
 
@@ -392,7 +387,7 @@ int main(int argc, char **argv) {
 
     auto filesystem = std::make_shared<utils::file::FileSystem>(
         should_encrypt_flow_config,
-        utils::crypto::EncryptionProvider::create(minifiHome));
+        utils::crypto::EncryptionProvider::create(locations->working_dir_));
 
     auto asset_manager = std::make_unique<utils::file::AssetManager>(*configure);
     auto bulletin_store = std::make_unique<core::BulletinStore>(*configure);
@@ -404,7 +399,7 @@ int main(int argc, char **argv) {
           .configuration = configure,
           .path = configure->get(minifi::Configure::nifi_flow_configuration_file),
           .filesystem = filesystem,
-          .sensitive_values_encryptor = utils::crypto::EncryptionProvider::createSensitivePropertiesEncryptor(minifiHome),
+          .sensitive_values_encryptor = utils::crypto::EncryptionProvider::createSensitivePropertiesEncryptor(locations->working_dir_),
           .asset_manager = asset_manager.get(),
           .bulletin_store = bulletin_store.get()
       }, nifi_configuration_class_name);
diff --git a/minifi_main/MiNiFiWindowsService.cpp b/minifi_main/MiNiFiWindowsService.cpp
index f466d4f3e..dd5e446f3 100644
--- a/minifi_main/MiNiFiWindowsService.cpp
+++ b/minifi_main/MiNiFiWindowsService.cpp
@@ -69,7 +69,7 @@ void RunAsServiceIfNeeded() {
     {
       serviceNameMutable,
       [](DWORD argc, LPTSTR *argv) {
-        setSyslogLogger();
+        minifi::setSyslogLogger();
 
         Log()->log_trace("ServiceCtrlDispatcher");
 
diff --git a/deploy.sh b/packaging/CMakeLists.txt
old mode 100755
new mode 100644
similarity index 76%
copy from deploy.sh
copy to packaging/CMakeLists.txt
index 2eeadb5ba..c2229598b
--- a/deploy.sh
+++ b/packaging/CMakeLists.txt
@@ -1,5 +1,5 @@
-#!/bin/bash
 # 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
@@ -15,14 +15,9 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+#
 
-
-build_identifier=$1
-
-echo "${build_identifier}" > build_identifier
-
-./bootstrap.sh -d -p --build_identifier="${build_identifier}"
-
-pushd build || exit 1
-./controller/minificontroller --manifest >> build_output
-popd || exit 2
+if (MINIFI_PACKAGING_TYPE STREQUAL "RPM")
+    string(REPLACE ";" "\n" RPM_EXPECTED_EXTENSION_LIST "${RPM_EXPECTED_EXTENSION_LIST}")
+    configure_file(rpm/expected-rpm-contents.in ${CMAKE_BINARY_DIR}/expected-rpm-contents.txt @ONLY)
+endif()
diff --git a/msi/MergeModulesFeature.xml b/packaging/msi/MergeModulesFeature.xml
similarity index 100%
rename from msi/MergeModulesFeature.xml
rename to packaging/msi/MergeModulesFeature.xml
diff --git a/msi/VSRedistributablesComponent.xml b/packaging/msi/VSRedistributablesComponent.xml
similarity index 100%
rename from msi/VSRedistributablesComponent.xml
rename to packaging/msi/VSRedistributablesComponent.xml
diff --git a/msi/VSRedistributablesFeature.xml b/packaging/msi/VSRedistributablesFeature.xml
similarity index 100%
rename from msi/VSRedistributablesFeature.xml
rename to packaging/msi/VSRedistributablesFeature.xml
diff --git a/msi/WixWin.wsi.in b/packaging/msi/WixWin.wsi.in
similarity index 100%
rename from msi/WixWin.wsi.in
rename to packaging/msi/WixWin.wsi.in
diff --git a/msi/bgr.png b/packaging/msi/bgr.png
similarity index 100%
rename from msi/bgr.png
rename to packaging/msi/bgr.png
diff --git a/msi/minifi-logo-ico.ico b/packaging/msi/minifi-logo-ico.ico
similarity index 100%
rename from msi/minifi-logo-ico.ico
rename to packaging/msi/minifi-logo-ico.ico
diff --git a/msi/minifi-logo-png-banner.png b/packaging/msi/minifi-logo-png-banner.png
similarity index 100%
rename from msi/minifi-logo-png-banner.png
rename to packaging/msi/minifi-logo-png-banner.png
diff --git a/msi/x64.wsi b/packaging/msi/x64.wsi
similarity index 100%
rename from msi/x64.wsi
rename to packaging/msi/x64.wsi
diff --git a/msi/x86.wsi b/packaging/msi/x86.wsi
similarity index 100%
rename from msi/x86.wsi
rename to packaging/msi/x86.wsi
diff --git a/packaging/rpm/check_rpm_contents.sh b/packaging/rpm/check_rpm_contents.sh
new file mode 100755
index 000000000..6a335499d
--- /dev/null
+++ b/packaging/rpm/check_rpm_contents.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+if [ "$#" -ne 2 ]; then
+    echo "Usage: $0 <RPM_FILE> <EXPECTED_LIST_FILE>"
+    exit 1
+fi
+
+RPM_FILE="$1"
+EXPECTED_LIST_FILE="$2"
+
+if [ ! -f "$RPM_FILE" ]; then
+    echo "Error: RPM file not found at '$RPM_FILE'"
+    exit 1
+fi
+
+if [ ! -f "$EXPECTED_LIST_FILE" ]; then
+    echo "Error: Expected list file not found at '$EXPECTED_LIST_FILE'"
+    exit 1
+fi
+
+ACTUAL_SORTED=$(mktemp)
+EXPECTED_SORTED=$(mktemp)
+
+trap 'rm -f "$ACTUAL_SORTED" "$EXPECTED_SORTED"' EXIT
+
+echo "--- Analyzing RPM package: $RPM_FILE ---"
+
+rpm -qlp "$RPM_FILE" | sort > "$ACTUAL_SORTED"
+sort "$EXPECTED_LIST_FILE" > "$EXPECTED_SORTED"
+
+if ! DIFFERENCES=$(diff "$ACTUAL_SORTED" "$EXPECTED_SORTED"); then
+    echo "FAILURE: The RPM contents do not match the expected list."
+    echo ""
+    echo "--- Differences ---"
+    echo "< Lines only in the RPM"
+    echo "> Lines only in your expected list"
+    echo "-------------------"
+    echo "$DIFFERENCES"
+    exit 1
+else
+    echo "SUCCESS: The RPM contents match the expected list."
+    exit 0
+fi
diff --git a/packaging/rpm/expected-rpm-contents.in b/packaging/rpm/expected-rpm-contents.in
new file mode 100644
index 000000000..a06884a8b
--- /dev/null
+++ b/packaging/rpm/expected-rpm-contents.in
@@ -0,0 +1,67 @@
+/etc/nifi-minifi-cpp
+/etc/nifi-minifi-cpp/config.yml
+/etc/nifi-minifi-cpp/fips
+/etc/nifi-minifi-cpp/fips/openssl.cnf
+/etc/nifi-minifi-cpp/minifi-log.properties
+/etc/nifi-minifi-cpp/minifi-uid.properties
+/etc/nifi-minifi-cpp/minifi.properties
+/usr/bin/minifi
+/usr/bin/minifi-controller
+/usr/bin/minifi-encrypt-config
+/usr/lib64/nifi-minifi-cpp
+/usr/lib64/nifi-minifi-cpp/extensions
+@RPM_EXPECTED_EXTENSION_LIST@
+/usr/lib64/nifi-minifi-cpp/fips
+/usr/lib64/nifi-minifi-cpp/fips/fips.so
+/usr/lib64/nifi-minifi-cpp/fips/openssl
+/usr/lib64/nifi-minifi-cpp/libcore-minifi.so
+/usr/lib64/systemd/system/minifi.service
+/usr/share/doc/nifi-minifi-cpp
+/usr/share/doc/nifi-minifi-cpp/C2.md
+/usr/share/doc/nifi-minifi-cpp/CONAN.md
+/usr/share/doc/nifi-minifi-cpp/CONFIGURE.md
+/usr/share/doc/nifi-minifi-cpp/CONTRIBUTING.md
+/usr/share/doc/nifi-minifi-cpp/CONTROLLERS.md
+/usr/share/doc/nifi-minifi-cpp/EXPRESSIONS.md
+/usr/share/doc/nifi-minifi-cpp/Extensions.md
+/usr/share/doc/nifi-minifi-cpp/LICENSE
+/usr/share/doc/nifi-minifi-cpp/METRICS.md
+/usr/share/doc/nifi-minifi-cpp/NOTICE
+/usr/share/doc/nifi-minifi-cpp/OPS.md
+/usr/share/doc/nifi-minifi-cpp/PARAMETER_PROVIDERS.md
+/usr/share/doc/nifi-minifi-cpp/PROCESSORS.md
+/usr/share/doc/nifi-minifi-cpp/README.md
+/usr/share/doc/nifi-minifi-cpp/FIPS.md
+/usr/share/doc/nifi-minifi-cpp/ThirdParties.md
+/usr/share/doc/nifi-minifi-cpp/Windows.md
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/AddPythonAttribute.py
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/CountingProcessor.py
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/GaussianDistributionWithNumpy.py
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/MoveContentToJson.py
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/RemoveFlowFile.py
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/SentimentAnalysis.py
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/google
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/google/SentimentAnalyzer.py
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/h2o
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/h2o/ConvertDsToCsv.py
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/h2o/h2o3
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/h2o/h2o3/mojo
+/usr/share/doc/nifi-minifi-cpp/pythonprocessor-examples/h2o/h2o3/mojo/ExecuteH2oMojoScoring.py
+/var/lib/nifi-minifi-cpp
+/var/lib/nifi-minifi-cpp/minifi-python
+/var/lib/nifi-minifi-cpp/minifi-python/nifi_python_processors
+/var/lib/nifi-minifi-cpp/minifi-python/nifi_python_processors/__init__.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifi_python_processors/utils
+/var/lib/nifi-minifi-cpp/minifi-python/nifi_python_processors/utils/dependency_installer.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/__init__.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/componentstate.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/documentation.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/flowfilesource.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/flowfiletransform.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/processorbase.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/properties.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/recordtransform.py
+/var/lib/nifi-minifi-cpp/minifi-python/nifiapi/relationship.py
+/var/log/nifi-minifi-cpp
diff --git a/packaging/rpm/pre_install.sh b/packaging/rpm/pre_install.sh
new file mode 100644
index 000000000..54b9ab4ae
--- /dev/null
+++ b/packaging/rpm/pre_install.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if ! getent group minificpp >/dev/null; then
+    groupadd -r minificpp
+fi
+
+if ! getent passwd minificpp >/dev/null; then
+    useradd -r -g minificpp -s /sbin/nologin -d /var/lib/nifi-minifi-cpp -c "NiFi MiNiFi C++ Service Account" minificpp
+fi
+
+exit 0
diff --git a/thirdparty/google-cloud-cpp/remove_installation.patch b/thirdparty/google-cloud-cpp/remove_installation.patch
new file mode 100644
index 000000000..4984d77f7
--- /dev/null
+++ b/thirdparty/google-cloud-cpp/remove_installation.patch
@@ -0,0 +1,258 @@
+Subject: [PATCH] remove export
+---
+Index: google/cloud/google_cloud_cpp_common.cmake
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/google/cloud/google_cloud_cpp_common.cmake b/google/cloud/google_cloud_cpp_common.cmake
+--- a/google/cloud/google_cloud_cpp_common.cmake	(revision e9eb0d1d8295966e7bca38c0ddf6529299db4f2b)
++++ b/google/cloud/google_cloud_cpp_common.cmake	(date 1751639900095)
+@@ -233,24 +233,7 @@
+
+ create_bazel_config(google_cloud_cpp_common YEAR 2018)
+
+-# Export the CMake targets to make it easy to create configuration files.
+-install(
+-    EXPORT google_cloud_cpp_common-targets
+-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_common"
+-    COMPONENT google_cloud_cpp_development)
+-
+-# Install the libraries and headers in the locations determined by
+-# GNUInstallDirs
+-install(
+-    TARGETS google_cloud_cpp_common
+-    EXPORT google_cloud_cpp_common-targets
+-    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-            NAMELINK_COMPONENT google_cloud_cpp_development
+-    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_development)
++# Removed EXPORT of google_cloud_cpp_common-targets
+
+ google_cloud_cpp_install_headers(google_cloud_cpp_common include/google/cloud)
+
+@@ -277,13 +260,6 @@
+     VERSION ${PROJECT_VERSION}
+     COMPATIBILITY ExactVersion)
+
+-install(
+-    FILES
+-        "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config.cmake"
+-        "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_common-config-version.cmake"
+-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_common"
+-    COMPONENT google_cloud_cpp_development)
+-
+ if (GOOGLE_CLOUD_CPP_WITH_MOCKS)
+     # Create a header-only library for the mocks. We use a CMake `INTERFACE`
+     # library for these, a regular library would not work on macOS (where the
+@@ -314,11 +290,7 @@
+         DESTINATION "include/google/cloud/mocks"
+         COMPONENT google_cloud_cpp_development)
+
+-    # Export the CMake targets to make it easy to create configuration files.
+-    install(
+-        EXPORT google_cloud_cpp_mocks-targets
+-        DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_mocks"
+-        COMPONENT google_cloud_cpp_development)
++    # Removed EXPORT of google_cloud_cpp_mocks-targets
+
+     install(
+         TARGETS google_cloud_cpp_mocks
+@@ -337,13 +309,6 @@
+         "google_cloud_cpp_mocks-config-version.cmake"
+         VERSION ${PROJECT_VERSION}
+         COMPATIBILITY ExactVersion)
+-
+-    install(
+-        FILES
+-            "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_mocks-config.cmake"
+-            "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_mocks-config-version.cmake"
+-        DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_mocks"
+-        COMPONENT google_cloud_cpp_development)
+ endif ()
+
+ if (BUILD_TESTING)
+Index: google/cloud/google_cloud_cpp_rest_internal.cmake
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/google/cloud/google_cloud_cpp_rest_internal.cmake b/google/cloud/google_cloud_cpp_rest_internal.cmake
+--- a/google/cloud/google_cloud_cpp_rest_internal.cmake	(revision e9eb0d1d8295966e7bca38c0ddf6529299db4f2b)
++++ b/google/cloud/google_cloud_cpp_rest_internal.cmake	(date 1751633114501)
+@@ -169,11 +169,7 @@
+ add_library(google-cloud-cpp::rest_internal ALIAS
+             google_cloud_cpp_rest_internal)
+
+-# Export the CMake targets to make it easy to create configuration files.
+-install(
+-    EXPORT google_cloud_cpp_rest_internal-targets
+-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_rest_internal"
+-    COMPONENT google_cloud_cpp_development)
++# # Removed EXPORT of google_cloud_cpp_rest_internal-targets
+
+ # Install the libraries and headers in the locations determined by
+ # GNUInstallDirs
+Index: google/cloud/google_cloud_cpp_rest_protobuf_internal.cmake
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/google/cloud/google_cloud_cpp_rest_protobuf_internal.cmake b/google/cloud/google_cloud_cpp_rest_protobuf_internal.cmake
+--- a/google/cloud/google_cloud_cpp_rest_protobuf_internal.cmake	(revision e9eb0d1d8295966e7bca38c0ddf6529299db4f2b)
++++ b/google/cloud/google_cloud_cpp_rest_protobuf_internal.cmake	(date 1751642044339)
+@@ -51,25 +51,7 @@
+
+ create_bazel_config(google_cloud_cpp_rest_protobuf_internal YEAR 2022)
+
+-# Export the CMake targets to make it easy to create configuration files.
+-install(
+-    EXPORT google_cloud_cpp_rest_protobuf_internal-targets
+-    DESTINATION
+-        "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_rest_protobuf_internal"
+-    COMPONENT google_cloud_cpp_development)
+-
+-# Install the libraries and headers in the locations determined by
+-# GNUInstallDirs
+-install(
+-    TARGETS google_cloud_cpp_rest_protobuf_internal
+-    EXPORT google_cloud_cpp_rest_protobuf_internal-targets
+-    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-            NAMELINK_COMPONENT google_cloud_cpp_development
+-    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_development)
++# Removed installation
+
+ google_cloud_cpp_install_headers(google_cloud_cpp_rest_protobuf_internal
+                                  include/google/cloud)
+Index: google/cloud/storage/google_cloud_cpp_storage_grpc.cmake
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/google/cloud/storage/google_cloud_cpp_storage_grpc.cmake b/google/cloud/storage/google_cloud_cpp_storage_grpc.cmake
+--- a/google/cloud/storage/google_cloud_cpp_storage_grpc.cmake	(revision e9eb0d1d8295966e7bca38c0ddf6529299db4f2b)
++++ b/google/cloud/storage/google_cloud_cpp_storage_grpc.cmake	(date 1751642129371)
+@@ -294,11 +294,6 @@
+     "absl_time"
+     ${EXTRA_MODULES})
+
+-install(
+-    EXPORT storage_grpc-targets
+-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_storage_grpc"
+-    COMPONENT google_cloud_cpp_development)
+-
+ # Create and install the CMake configuration files.
+ configure_file("config-grpc.cmake.in"
+                "google_cloud_cpp_storage_grpc-config.cmake" @ONLY)
+@@ -307,25 +302,6 @@
+     VERSION ${PROJECT_VERSION}
+     COMPATIBILITY ExactVersion)
+
+-install(
+-    FILES
+-        "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_storage_grpc-config.cmake"
+-        "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_storage_grpc-config-version.cmake"
+-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_storage_grpc"
+-    COMPONENT google_cloud_cpp_development)
+-
+-install(
+-    TARGETS google_cloud_cpp_storage_grpc google_cloud_cpp_storage_protos
+-            # TODO(#13857) - remove the backwards compatibility shims
+-            google_cloud_cpp_experimental_storage_grpc
+-    EXPORT storage_grpc-targets
+-    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-            NAMELINK_COMPONENT google_cloud_cpp_development
+-    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_development)
+
+ google_cloud_cpp_install_headers(google_cloud_cpp_storage_grpc
+                                  include/google/cloud/storage)
+Index: google/cloud/spanner/CMakeLists.txt
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/google/cloud/spanner/CMakeLists.txt b/google/cloud/spanner/CMakeLists.txt
+--- a/google/cloud/spanner/CMakeLists.txt	(revision e9eb0d1d8295966e7bca38c0ddf6529299db4f2b)
++++ b/google/cloud/spanner/CMakeLists.txt	(date 1751642142713)
+@@ -300,24 +300,7 @@
+     create_bazel_config(google_cloud_cpp_spanner_rest YEAR "2023")
+ endif ()
+
+-# Export the CMake targets to make it easy to create configuration files.
+-install(
+-    EXPORT spanner-targets
+-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_spanner"
+-    COMPONENT google_cloud_cpp_development)
+-
+-# Install the libraries and headers in the locations determined by
+-# GNUInstallDirs
+-install(
+-    TARGETS google_cloud_cpp_spanner google_cloud_cpp_spanner_protos
+-    EXPORT spanner-targets
+-    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-            NAMELINK_COMPONENT google_cloud_cpp_development
+-    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_development)
++# Remove installation
+
+ google_cloud_cpp_install_headers("google_cloud_cpp_spanner"
+                                  "include/google/cloud/spanner")
+Index: google/cloud/storage/google_cloud_cpp_storage.cmake
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/google/cloud/storage/google_cloud_cpp_storage.cmake b/google/cloud/storage/google_cloud_cpp_storage.cmake
+--- a/google/cloud/storage/google_cloud_cpp_storage.cmake	(revision e9eb0d1d8295966e7bca38c0ddf6529299db4f2b)
++++ b/google/cloud/storage/google_cloud_cpp_storage.cmake	(date 1751642105444)
+@@ -313,22 +313,7 @@
+
+ create_bazel_config(google_cloud_cpp_storage)
+
+-# Export the CMake targets to make it easy to create configuration files.
+-install(
+-    EXPORT storage-targets
+-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_storage"
+-    COMPONENT google_cloud_cpp_development)
+-
+-install(
+-    TARGETS google_cloud_cpp_storage
+-    EXPORT storage-targets
+-    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_runtime
+-            NAMELINK_COMPONENT google_cloud_cpp_development
+-    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+-            COMPONENT google_cloud_cpp_development)
++# Removed EXPORT of storage-targets
+
+ google_cloud_cpp_install_headers(google_cloud_cpp_storage
+                                  include/google/cloud/storage)
+@@ -361,12 +346,6 @@
+     VERSION ${PROJECT_VERSION}
+     COMPATIBILITY ExactVersion)
+
+-install(
+-    FILES
+-        "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_storage-config.cmake"
+-        "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_storage-config-version.cmake"
+-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/google_cloud_cpp_storage"
+-    COMPONENT google_cloud_cpp_development)
+
+ install(
+     FILES testing/mock_client.h
diff --git a/thirdparty/librdkafka/0003-remove_FindLZ4_installation.patch b/thirdparty/librdkafka/0003-remove_FindLZ4_installation.patch
new file mode 100644
index 000000000..85eb9fccb
--- /dev/null
+++ b/thirdparty/librdkafka/0003-remove_FindLZ4_installation.patch
@@ -0,0 +1,22 @@
+Subject: [PATCH] remove FindLZ4 installation
+---
+Index: CMakeLists.txt
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	(revision 2af6749287b3695edf2421631ebf08d6bcb176e3)
++++ b/CMakeLists.txt	(date 1751541934552)
+@@ -262,10 +262,7 @@
+     COMPATIBILITY AnyNewerVersion
+ )
+
+-install(
+-    FILES "${project_config}" "${project_version}" "packaging/cmake/Modules/FindLZ4.cmake"
+-    DESTINATION "${config_install_dir}"
+-)
++# Installation removed
+
+ install(
+     EXPORT "${targets_export_name}"


(nifi-minifi-cpp) 02/06: MINIFICPP-2589 Refactor ConsumeWindowsEventLog

Posted by sz...@apache.org.
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 f65f14543941935d84a5363b278fcb30949f01f0
Author: Ferenc Gerlits <fg...@gmail.com>
AuthorDate: Mon Sep 8 15:32:38 2025 +0200

    MINIFICPP-2589 Refactor ConsumeWindowsEventLog
    
    * lots of renaming stuff
    * use magic_enum instead of hand-rolled enum parsing
    * some inlining / pulling out of methods
    * unify the printing of Windows error messages using fmt::format
    
    etc
    
    Closes #2007
    
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 .../windows-event-log/ConsumeWindowsEventLog.cpp   | 275 ++++++++++-----------
 .../windows-event-log/ConsumeWindowsEventLog.h     |  59 ++---
 .../windows-event-log/tests/BookmarkTests.cpp      |  11 +-
 extensions/windows-event-log/tests/CMakeLists.txt  |   2 +-
 .../tests/ConsumeWindowsEventLogTests.cpp          |   2 +-
 .../tests/MetadataWalkerTests.cpp                  | 130 +++++-----
 .../tests/StringSplitterTests.cpp                  |  45 ++++
 .../windows-event-log/tests/WindowsErrorTests.cpp  |  34 +++
 .../windows-event-log/{ => wel}/Bookmark.cpp       |  29 +--
 extensions/windows-event-log/{ => wel}/Bookmark.h  |  15 +-
 extensions/windows-event-log/wel/EventPath.h       |   2 +-
 .../windows-event-log/wel/MetadataWalker.cpp       |  60 +++--
 extensions/windows-event-log/wel/MetadataWalker.h  |  21 +-
 extensions/windows-event-log/wel/StringSplitter.h  |  56 +++++
 extensions/windows-event-log/wel/UniqueEvtHandle.h |  15 +-
 .../wel/{UniqueEvtHandle.h => WindowsError.h}      |  31 +--
 .../windows-event-log/wel/WindowsEventLog.cpp      |  28 +--
 extensions/windows-event-log/wel/WindowsEventLog.h |  77 ++----
 libminifi/test/libtest/unit/Catch.h                |   1 +
 libminifi/test/libtest/unit/TestUtils.h            |  10 +-
 20 files changed, 472 insertions(+), 431 deletions(-)

diff --git a/extensions/windows-event-log/ConsumeWindowsEventLog.cpp b/extensions/windows-event-log/ConsumeWindowsEventLog.cpp
index e5bce24e3..cb62bc03c 100644
--- a/extensions/windows-event-log/ConsumeWindowsEventLog.cpp
+++ b/extensions/windows-event-log/ConsumeWindowsEventLog.cpp
@@ -1,7 +1,4 @@
 /**
- * @file ConsumeWindowsEventLog.cpp
- * ConsumeWindowsEventLog class declaration
- *
  * 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.
@@ -19,31 +16,30 @@
  */
 
 #include "ConsumeWindowsEventLog.h"
+
 #include <cstdio>
 #include <vector>
 #include <tuple>
 #include <utility>
 #include <map>
-#include <sstream>
 #include <string>
 #include <memory>
 
+#include "wel/Bookmark.h"
 #include "wel/LookupCacher.h"
 #include "wel/MetadataWalker.h"
+#include "wel/StringSplitter.h"
 #include "wel/XMLString.h"
 #include "wel/JSONUtils.h"
-#include "wel/UniqueEvtHandle.h"
+#include "wel/WindowsError.h"
 
-#include "io/BufferStream.h"
 #include "core/ProcessContext.h"
 #include "core/ProcessSession.h"
 #include "core/Resource.h"
-#include "Bookmark.h"
 #include "utils/Deleters.h"
 #include "core/logging/LoggerFactory.h"
 
 #include "utils/gsl.h"
-#include "utils/OsUtils.h"
 #include "utils/RegexUtils.h"
 #include "utils/StringUtils.h"
 #include "utils/UnicodeConversion.h"
@@ -54,9 +50,31 @@
 
 using namespace std::literals::chrono_literals;
 
-namespace org::apache::nifi::minifi::processors {
+namespace {
+auto createTimer() {
+  return [start_time = std::chrono::steady_clock::now()] {
+    return std::chrono::steady_clock::now() - start_time;
+  };
+}
+}  // namespace
+
+namespace org::apache::nifi::minifi::wel {
+std::function<bool(std::string_view)> parseSidMatcher(const std::optional<std::string>& sid_matcher) {
+  if (!sid_matcher || sid_matcher->empty()) {
+    return [](std::string_view){ return false; };
+  }
+
+  if (std::smatch match; utils::regexMatch(*sid_matcher, match, utils::Regex{R"_(\.\*(\w+))_"})) {
+    std::string suffix = match[1];
+    return [suffix](std::string_view field_name) { return utils::string::endsWith(field_name, suffix); };
+  }
 
-const int EVT_NEXT_TIMEOUT_MS = 500;
+  utils::Regex sid_matcher_regex{*sid_matcher};
+  return [sid_matcher_regex](std::string_view field_name) { return utils::regexMatch(field_name, sid_matcher_regex); };
+}
+}  // namespace org::apache::nifi::minifi::wel
+
+namespace org::apache::nifi::minifi::processors {
 
 ConsumeWindowsEventLog::ConsumeWindowsEventLog(core::ProcessorMetadata metadata)
     : core::ProcessorImpl{std::move(metadata)} {
@@ -65,8 +83,7 @@ ConsumeWindowsEventLog::ConsumeWindowsEventLog(core::ProcessorMetadata metadata)
   if (GetComputerName(buff, &size)) {
     computerName_ = buff;
   } else {
-    auto last_error = utils::OsUtils::windowsErrorToErrorCode(GetLastError());
-    logger_->log_error("{}: {}", last_error, last_error.message());
+    logger_->log_error("GetComputerName failed due to {}", wel::getLastError());
   }
 }
 
@@ -78,7 +95,7 @@ void ConsumeWindowsEventLog::notifyStop() {
     if (FreeLibrary(hMsobjsDll_)) {
       hMsobjsDll_ = nullptr;
     } else {
-      LOG_LAST_ERROR(LoadLibrary);
+      logger_->log_error("FreeLibrary failed due to {}", wel::getLastError());
     }
   }
   logger_->log_trace("finish notifyStop");
@@ -95,14 +112,18 @@ void ConsumeWindowsEventLog::initialize() {
   setSupportedRelationships(Relationships);
 }
 
-bool ConsumeWindowsEventLog::insertHeaderName(wel::METADATA_NAMES &header, const std::string &key, const std::string & value) {
-  wel::METADATA name = wel::WindowsEventLogMetadata::getMetadataFromString(key);
+wel::HeaderNames ConsumeWindowsEventLog::createHeaderNames(const std::optional<std::string>& event_header_property) const {
+  if (!event_header_property) { return {}; }
 
-  if (name != wel::METADATA::UNKNOWN) {
-    header.emplace_back(std::make_pair(name, value));
-    return true;
-  }
-  return false;
+  wel::HeaderNames header_names;
+  wel::splitCommaSeparatedKeyValuePairs(*event_header_property, [this, &header_names](std::string_view key, std::string_view value) {
+    if (auto metadata = magic_enum::enum_cast<wel::Metadata>(key)) {
+      header_names.emplace_back(*metadata, value);
+    } else {
+      logger_->log_error("{} is an invalid key for the header map", key);
+    }
+  });
+  return header_names;
 }
 
 void ConsumeWindowsEventLog::onSchedule(core::ProcessContext& context, core::ProcessSessionFactory&) {
@@ -113,47 +134,26 @@ void ConsumeWindowsEventLog::onSchedule(core::ProcessContext& context, core::Pro
 
   resolve_as_attributes_ = utils::parseBoolProperty(context, ResolveAsAttributes);
   apply_identifier_function_ = utils::parseBoolProperty(context, IdentifierFunction);
-
   header_delimiter_ = utils::parseOptionalProperty(context, EventHeaderDelimiter);
   batch_commit_size_ = utils::parseU64Property(context, BatchCommitSize);
+  header_names_ = createHeaderNames(utils::parseOptionalProperty(context, EventHeader));
+  sid_matcher_ = wel::parseSidMatcher(utils::parseOptionalProperty(context, IdentifierMatcher));
+  output_format_ = utils::parseEnumProperty<wel::OutputFormat>(context, OutputFormatProperty);
+  json_format_ = utils::parseEnumProperty<wel::JsonFormat>(context, JsonFormatProperty);
 
-  header_names_.clear();
-  if (auto header = context.getProperty(EventHeader)) {
-    auto keyValueSplit = utils::string::split(*header, ",");
-    for (const auto &kv : keyValueSplit) {
-      auto splitKeyAndValue = utils::string::split(kv, "=");
-      if (splitKeyAndValue.size() == 2) {
-        auto key = utils::string::trim(splitKeyAndValue.at(0));
-        auto value = utils::string::trim(splitKeyAndValue.at(1));
-        if (!insertHeaderName(header_names_, key, value)) {
-          logger_->log_error("{} is an invalid key for the header map", key);
-        }
-      } else if (splitKeyAndValue.size() == 1) {
-        auto key = utils::string::trim(splitKeyAndValue.at(0));
-        if (!insertHeaderName(header_names_, key, "")) {
-          logger_->log_error("{} is an invalid key for the header map", key);
-        }
-      }
-    }
-  }
-
-  sid_matcher_ = cwel::parseSidMatcher(utils::parseOptionalProperty(context, IdentifierMatcher));
-  output_format_ = utils::parseEnumProperty<cwel::OutputFormat>(context, OutputFormatProperty);
-  json_format_ = utils::parseEnumProperty<cwel::JsonFormat>(context, JsonFormatProperty);
-
-  if (output_format_ != cwel::OutputFormat::Plaintext && !hMsobjsDll_) {
+  if (output_format_ != wel::OutputFormat::Plaintext && !hMsobjsDll_) {
     char systemDir[MAX_PATH];
     if (GetSystemDirectory(systemDir, sizeof(systemDir))) {
       hMsobjsDll_ = LoadLibrary((systemDir + std::string("\\msobjs.dll")).c_str());
       if (!hMsobjsDll_) {
-        LOG_LAST_ERROR(LoadLibrary);
+        logger_->log_error("LoadLibrary failed due to {}", wel::getLastError());
       }
     } else {
-      LOG_LAST_ERROR(GetSystemDirectory);
+      logger_->log_error("GetSystemDirectory failed due to {}", wel::getLastError());
     }
   }
 
-  path_ = wel::EventPath{context.getProperty(Channel).value()};
+  path_ = wel::EventPath{utils::parseProperty(context, Channel)};
   if (path_.kind() == wel::EventPath::Kind::FILE) {
     logger_->log_debug("Using saved log file as log source");
   } else {
@@ -161,21 +161,10 @@ void ConsumeWindowsEventLog::onSchedule(core::ProcessContext& context, core::Pro
   }
 
   std::string query = context.getProperty(Query).value_or("");
-  wstr_query_ = std::wstring(query.begin(), query.end());
-
-  bool processOldEvents = utils::parseBoolProperty(context, ProcessOldEvents);
+  wstr_query_ = utils::to_wstring(query);
 
   if (!bookmark_) {
-    std::string bookmarkDir = context.getProperty(BookmarkRootDirectory).value_or("");
-    if (bookmarkDir.empty()) {
-      logger_->log_error("State Directory is empty");
-      throw Exception(PROCESS_SCHEDULE_EXCEPTION, "State Directory is empty");
-    }
-    bookmark_ = std::make_unique<Bookmark>(path_, wstr_query_, bookmarkDir, getUUID(), processOldEvents, state_manager_, logger_);
-    if (!*bookmark_) {
-      bookmark_.reset();
-      throw Exception(PROCESS_SCHEDULE_EXCEPTION, "Bookmark is empty");
-    }
+    bookmark_ = createBookmark(context);
   }
 
   max_buffer_size_ = utils::parseDataSizeProperty(context, MaxBufferSize);
@@ -188,26 +177,26 @@ void ConsumeWindowsEventLog::onSchedule(core::ProcessContext& context, core::Pro
   logger_->log_trace("Successfully configured CWEL");
 }
 
-std::function<bool(std::string_view)> cwel::parseSidMatcher(const std::optional<std::string>& sid_matcher) {
-  if (!sid_matcher || sid_matcher->empty()) {
-    return [](std::string_view){ return false; };
+std::unique_ptr<wel::Bookmark> ConsumeWindowsEventLog::createBookmark(const core::ProcessContext& context) const {
+  std::string bookmark_dir = context.getProperty(BookmarkRootDirectory).value_or("");
+  if (bookmark_dir.empty()) {
+    logger_->log_error("State Directory is empty");
+    throw Exception(PROCESS_SCHEDULE_EXCEPTION, "State Directory is empty");
   }
-
-  if (std::smatch match; utils::regexMatch(*sid_matcher, match, utils::Regex{R"_(\.\*(\w+))_"})) {
-    std::string suffix = match[1];
-    return [suffix](std::string_view field_name) { return utils::string::endsWith(field_name, suffix); };
+  bool process_old_events = utils::parseBoolProperty(context, ProcessOldEvents);
+  auto bookmark = std::make_unique<wel::Bookmark>(path_, wstr_query_, bookmark_dir, getUUID(), process_old_events, state_manager_, logger_);
+  if (!bookmark->isValid()) {
+    throw Exception(PROCESS_SCHEDULE_EXCEPTION, "Bookmark is empty");
   }
-
-  utils::Regex sid_matcher_regex{*sid_matcher};
-  return [sid_matcher_regex](std::string_view field_name) { return utils::regexMatch(field_name, sid_matcher_regex); };
+  return bookmark;
 }
 
 bool ConsumeWindowsEventLog::commitAndSaveBookmark(const std::wstring &bookmark_xml, core::ProcessContext& context, core::ProcessSession& session) {
   {
-    const TimeDiff time_diff;
+    const auto time_diff = createTimer();
     session.commit();
     context.getStateManager()->beginTransaction();
-    logger_->log_debug("processQueue commit took {}", time_diff());
+    logger_->log_debug("ConsumeWindowsEventLog: commit took {}", time_diff());
   }
 
   if (!bookmark_->saveBookmarkXml(bookmark_xml)) {
@@ -222,17 +211,17 @@ bool ConsumeWindowsEventLog::commitAndSaveBookmark(const std::wstring &bookmark_
   return true;
 }
 
-std::tuple<size_t, std::wstring> ConsumeWindowsEventLog::processEventLogs(core::ProcessSession& session, const EVT_HANDLE& event_query_results) {
+std::tuple<size_t, std::wstring> ConsumeWindowsEventLog::processEventLogs(core::ProcessSession& session, EVT_HANDLE event_query_results) {
+  static constexpr DWORD timeout_milliseconds = 500;
   size_t processed_event_count = 0;
   std::wstring bookmark_xml;
   logger_->log_trace("Enumerating the events in the result set after the bookmarked event.");
   while (processed_event_count < batch_commit_size_ || batch_commit_size_ == 0) {
-    EVT_HANDLE next_event{};
+    EVT_HANDLE next_event_handle{};
     DWORD handles_set_count{};
-    if (!EvtNext(event_query_results, 1, &next_event, EVT_NEXT_TIMEOUT_MS, 0, &handles_set_count)) {
+    if (!EvtNext(event_query_results, 1, &next_event_handle, timeout_milliseconds, 0, &handles_set_count)) {
       if (ERROR_NO_MORE_ITEMS != GetLastError()) {
-        auto last_error = utils::OsUtils::windowsErrorToErrorCode(GetLastError());
-        logger_->log_error("Failed to get next event: {}: {}", last_error, last_error.message());
+        logger_->log_error("Failed to get next event due to {}", wel::getLastError());
         continue;
         /* According to MS this iteration should only end when the return value is false AND
           the error code is NO_MORE_ITEMS. See the following page for further details:
@@ -240,22 +229,21 @@ std::tuple<size_t, std::wstring> ConsumeWindowsEventLog::processEventLogs(core::
       }
       break;
     }
-
-    const auto guard_next_event = gsl::finally([next_event]() { EvtClose(next_event); });
-    logger_->log_trace("Succesfully got the next event, performing event rendering");
-    auto event_render = createEventRender(next_event);
-    if (!event_render) {
-      logger_->log_error("{}", event_render.error());
+    wel::unique_evt_handle next_event{next_event_handle};
+    logger_->log_trace("Successfully got the next event, performing event rendering");
+    auto processed_event = processEvent(next_event.get());
+    if (!processed_event) {
+      logger_->log_error("error processing event: {}", processed_event.error());
       continue;
     }
-    auto new_bookmark_xml = bookmark_->getNewBookmarkXml(next_event);
+    auto new_bookmark_xml = bookmark_->getNewBookmarkXml(next_event.get());
     if (!new_bookmark_xml) {
-      logger_->log_error("{}", new_bookmark_xml.error());
+      logger_->log_error("error getting the new bookmark: {}", new_bookmark_xml.error());
       continue;
     }
     bookmark_xml = std::move(*new_bookmark_xml);
     processed_event_count++;
-    putEventRenderFlowFileToSession(*event_render, session);
+    createAndCommitFlowFile(*processed_event, session);
   }
   logger_->log_trace("Finished enumerating events.");
   return std::make_tuple(processed_event_count, bookmark_xml);
@@ -277,14 +265,14 @@ void ConsumeWindowsEventLog::onTrigger(core::ProcessContext& context, core::Proc
   logger_->log_trace("CWEL onTrigger");
 
   size_t processed_event_count = 0;
-  const TimeDiff time_diff;
+  const auto time_diff = createTimer();
   const auto timeGuard = gsl::finally([&]() {
     logger_->log_debug("processed {} Events in {}", processed_event_count, time_diff());
   });
 
   wel::unique_evt_handle event_query_results{EvtQuery(nullptr, path_.wstr().c_str(), wstr_query_.c_str(), path_.getQueryFlags())};
   if (!event_query_results) {
-    LOG_LAST_ERROR(EvtQuery);
+    logger_->log_error("EvtQuery failed due to {}", wel::getLastError());
     context.yield();
     return;
   }
@@ -300,7 +288,7 @@ void ConsumeWindowsEventLog::onTrigger(core::ProcessContext& context, core::Proc
   }
 
   if (!EvtSeek(event_query_results.get(), 1, bookmark_handle, 0, EvtSeekRelativeToBookmark)) {
-    LOG_LAST_ERROR(EvtSeek);
+    logger_->log_error("EvtSeek failed due to {}", wel::getLastError());
     context.yield();
     return;
   }
@@ -316,22 +304,23 @@ void ConsumeWindowsEventLog::onTrigger(core::ProcessContext& context, core::Proc
   }
 }
 
-wel::WindowsEventLogHandler& ConsumeWindowsEventLog::getEventLogHandler(const std::string & name) {
-  logger_->log_trace("Getting Event Log Handler corresponding to {}", name.c_str());
-  auto provider = providers_.find(name);
-  if (provider != std::end(providers_)) {
-    logger_->log_trace("Found the handler");
-    return provider->second;
+wel::WindowsEventLogProvider& ConsumeWindowsEventLog::getEventLogProvider(const std::string& name) {
+  logger_->log_trace("Getting Event Log Provider corresponding to {}", name);
+  auto it = providers_.find(name);
+  if (it != std::end(providers_)) {
+    logger_->log_trace("Found cached event log provider");
+    return it->second;
   }
 
-  std::wstring temp_wstring = std::wstring(name.begin(), name.end());
+  std::wstring temp_wstring = utils::to_wstring(name);
   LPCWSTR widechar = temp_wstring.c_str();
 
   auto opened_publisher_metadata_provider = EvtOpenPublisherMetadata(nullptr, widechar, nullptr, 0, 0);
-  if (!opened_publisher_metadata_provider)
-    logger_->log_warn("EvtOpenPublisherMetadata failed due to {}", utils::OsUtils::windowsErrorToErrorCode(GetLastError()).message());
+  if (!opened_publisher_metadata_provider) {
+    logger_->log_warn("EvtOpenPublisherMetadata failed due to {}", wel::getLastError());
+  }
   providers_.emplace(name, opened_publisher_metadata_provider);
-  logger_->log_info("Handler not found for {}, creating. Number of cached handlers: {}", name, providers_.size());
+  logger_->log_info("Created new Windows event log provider for '{}'. Number of cached providers: {}", name, providers_.size());
   return providers_[name];
 }
 
@@ -392,7 +381,7 @@ void ConsumeWindowsEventLog::substituteXMLPercentageItems(pugi::xml_document& do
             // Add "" to xmlPercentageItemsResolutions_ - don't need to call FormaMessage for this 'key' again.
             xmlPercentageItemsResolutions_.insert({key, ""});
 
-            logger_->log_error("!FormatMessage error: {:#x}. '{}' is not found in msobjs.dll.", GetLastError(), key.c_str());
+            logger_->log_error("FormatMessage failed due to {}. '{}' is not found in msobjs.dll.", wel::getLastError(), key);
           }
         } else {
           value = it->second;
@@ -431,30 +420,27 @@ nonstd::expected<std::string, std::string> ConsumeWindowsEventLog::renderEventAs
   DWORD used = 0;
   DWORD propertyCount = 0;
   if (!EvtRender(nullptr, event_handle, EvtRenderEventXml, size, buf.get(), &used, &propertyCount)) {
-    DWORD last_error = GetLastError();
-    if (ERROR_INSUFFICIENT_BUFFER != last_error) {
-      std::string error_message = fmt::format("EvtRender failed due to {}", utils::OsUtils::windowsErrorToErrorCode(last_error).message());
-      return nonstd::make_unexpected(error_message);
+    if (ERROR_INSUFFICIENT_BUFFER != GetLastError()) {
+      return nonstd::make_unexpected(fmt::format("EvtRender failed due to {}", wel::getLastError()));
     }
     if (used > max_buffer_size_) {
-      std::string error_message = fmt::format("Dropping event because it couldn't be rendered within {} bytes.", max_buffer_size_);
-      return nonstd::make_unexpected(error_message);
+      return nonstd::make_unexpected(fmt::format("Dropping event because it couldn't be rendered within {} bytes.", max_buffer_size_));
     }
     size = used;
     buf.reset((LPWSTR) malloc(size));
-    if (!buf)
+    if (!buf) {
       return nonstd::make_unexpected("malloc failed");
+    }
     if (!EvtRender(nullptr, event_handle, EvtRenderEventXml, size, buf.get(), &used, &propertyCount)) {
-      std::string error_message = fmt::format("EvtRender failed due to {}", utils::OsUtils::windowsErrorToErrorCode(GetLastError()).message());
-      return nonstd::make_unexpected(error_message);
+      return nonstd::make_unexpected(fmt::format("EvtRender failed due to {}", wel::getLastError()));
     }
   }
   logger_->log_trace("Event rendered with size {}", used);
   return utils::to_string(std::wstring{buf.get()});
 }
 
-nonstd::expected<cwel::EventRender, std::string> ConsumeWindowsEventLog::createEventRender(EVT_HANDLE hEvent) {
-  auto event_as_xml = renderEventAsXml(hEvent);
+nonstd::expected<wel::ProcessedEvent, std::string> ConsumeWindowsEventLog::processEvent(EVT_HANDLE event_handle) {
+  auto event_as_xml = renderEventAsXml(event_handle);
   if (!event_as_xml)
     return nonstd::make_unexpected(event_as_xml.error());
 
@@ -462,11 +448,11 @@ nonstd::expected<cwel::EventRender, std::string> ConsumeWindowsEventLog::createE
   if (!doc.load_string(event_as_xml->c_str()))
     return nonstd::make_unexpected("Invalid XML produced");
 
-  cwel::EventRender result;
+  wel::ProcessedEvent result;
 
   // this is a well known path.
   std::string provider_name = doc.child("Event").child("System").child("Provider").attribute("Name").value();
-  wel::WindowsEventLogMetadataImpl metadata{getEventLogHandler(provider_name), hEvent};
+  wel::WindowsEventLogMetadataImpl metadata{getEventLogProvider(provider_name), event_handle};
   wel::MetadataWalker walker{metadata, path_.str(), !resolve_as_attributes_, apply_identifier_function_, sid_matcher_, userIdToUsernameFunction()};
 
   // resolve the event metadata
@@ -474,11 +460,11 @@ nonstd::expected<cwel::EventRender, std::string> ConsumeWindowsEventLog::createE
 
   logger_->log_trace("Finish doc traversing, performing writing...");
 
-  if (output_format_ == cwel::OutputFormat::Plaintext || output_format_ == cwel::OutputFormat::Both) {
+  if (output_format_ == wel::OutputFormat::Plaintext || output_format_ == wel::OutputFormat::Both) {
     logger_->log_trace("Writing event in plain text");
 
-    auto& handler = getEventLogHandler(provider_name);
-    auto event_message = handler.getEventMessage(hEvent);
+    auto& provider = getEventLogProvider(provider_name);
+    auto event_message = provider.getEventMessage(event_handle);
 
     if (event_message) {
       for (const auto& map_entry : walker.getIdentifiers()) {
@@ -492,7 +478,7 @@ nonstd::expected<cwel::EventRender, std::string> ConsumeWindowsEventLog::createE
     std::string_view payload_name = event_message ? "Message" : "Error";
 
     wel::WindowsEventLogHeader log_header(header_names_, header_delimiter_, payload_name.size());
-    result.plaintext = log_header.getEventHeader([&walker](wel::METADATA metadata) { return walker.getMetadata(metadata); });
+    result.plaintext = log_header.getEventHeader([&walker](wel::Metadata metadata) { return walker.getMetadata(metadata); });
     result.plaintext += payload_name;
     result.plaintext += log_header.getDelimiterFor(payload_name.size());
     result.plaintext += event_message.has_value() ? *event_message : event_message.error().message();
@@ -500,7 +486,7 @@ nonstd::expected<cwel::EventRender, std::string> ConsumeWindowsEventLog::createE
     logger_->log_trace("Finish writing in plain text");
   }
 
-  if (output_format_ != cwel::OutputFormat::Plaintext) {
+  if (output_format_ != wel::OutputFormat::Plaintext) {
     substituteXMLPercentageItems(doc);
     logger_->log_trace("Finish substituting %% in XML");
   }
@@ -509,7 +495,7 @@ nonstd::expected<cwel::EventRender, std::string> ConsumeWindowsEventLog::createE
     result.matched_fields = walker.getFieldValues();
   }
 
-  if (output_format_ == cwel::OutputFormat::XML || output_format_ == cwel::OutputFormat::Both) {
+  if (output_format_ == wel::OutputFormat::XML || output_format_ == wel::OutputFormat::Both) {
     logger_->log_trace("Writing event in XML");
 
     wel::XmlString writer;
@@ -520,21 +506,21 @@ nonstd::expected<cwel::EventRender, std::string> ConsumeWindowsEventLog::createE
     logger_->log_trace("Finish writing in XML");
   }
 
-  if (output_format_ == cwel::OutputFormat::JSON) {
+  if (output_format_ == wel::OutputFormat::JSON) {
     switch (json_format_) {
-      case cwel::JsonFormat::Raw: {
+      case wel::JsonFormat::Raw: {
         logger_->log_trace("Writing event in raw JSON");
         result.json = wel::jsonToString(wel::toRawJSON(doc));
         logger_->log_trace("Finish writing in raw JSON");
         break;
       }
-      case cwel::JsonFormat::Simple: {
+      case wel::JsonFormat::Simple: {
         logger_->log_trace("Writing event in simple JSON");
         result.json = wel::jsonToString(wel::toSimpleJSON(doc));
         logger_->log_trace("Finish writing in simple JSON");
         break;
       }
-      case cwel::JsonFormat::Flattened: {
+      case wel::JsonFormat::Flattened: {
         logger_->log_trace("Writing event in flattened JSON");
         result.json = wel::jsonToString(wel::toFlattenedJSON(doc));
         logger_->log_trace("Finish writing in flattened JSON");
@@ -573,21 +559,22 @@ void ConsumeWindowsEventLog::refreshTimeZoneData() {
       break;
   }
 
-  tzbias *= -1;  // WinApi specifies UTC = localtime + bias, but we need offset from UTC
-  std::stringstream tzoffset;
-  tzoffset << (tzbias >= 0 ? '+' : '-') << std::setfill('0') << std::setw(2) << std::abs(tzbias) / 60
-      << ":" << std::setfill('0') << std::setw(2) << std::abs(tzbias) % 60;
-
   timezone_name_ = utils::to_string(tzstr);
-  timezone_offset_ = tzoffset.str();
+
+  tzbias *= -1;  // WinApi specifies UTC = localtime + bias, but we need offset from UTC
+  timezone_offset_ = fmt::format("{}{:02}:{:02}", tzbias >= 0 ? '+' : '-', std::abs(tzbias) / 60, std::abs(tzbias) % 60);
 
   logger_->log_trace("Timezone name: {}, offset: {}", timezone_name_, timezone_offset_);
 }
 
-void ConsumeWindowsEventLog::putEventRenderFlowFileToSession(const cwel::EventRender& eventRender, core::ProcessSession& session) const {
-  auto commitFlowFile = [&] (const std::string& content, const std::string& mimeType) {
+void ConsumeWindowsEventLog::createAndCommitFlowFile(const wel::ProcessedEvent& processed_event, core::ProcessSession& session) const {
+  auto commit_flow_file = [&] (const std::string& content, const std::string& mimeType) {
     auto flow_file = session.create();
-    addMatchedFieldsAsAttributes(eventRender, session, flow_file);
+    for (const auto& [key, value] : processed_event.matched_fields) {
+      if (!value.empty()) {
+        session.putAttribute(*flow_file, key, value);
+      }
+    }
     session.writeBuffer(flow_file, content);
     session.putAttribute(*flow_file, core::SpecialFlowAttribute::MIME_TYPE, mimeType);
     session.putAttribute(*flow_file, "timezone.name", timezone_name_);
@@ -596,27 +583,19 @@ void ConsumeWindowsEventLog::putEventRenderFlowFileToSession(const cwel::EventRe
     session.transfer(flow_file, Success);
   };
 
-  if (output_format_ == cwel::OutputFormat::XML || output_format_ == cwel::OutputFormat::Both) {
+  if (output_format_ == wel::OutputFormat::XML || output_format_ == wel::OutputFormat::Both) {
     logger_->log_trace("Writing rendered XML to a flow file");
-    commitFlowFile(eventRender.xml, "application/xml");
+    commit_flow_file(processed_event.xml, "application/xml");
   }
 
-  if (output_format_ == cwel::OutputFormat::Plaintext || output_format_ == cwel::OutputFormat::Both) {
+  if (output_format_ == wel::OutputFormat::Plaintext || output_format_ == wel::OutputFormat::Both) {
     logger_->log_trace("Writing rendered plain text to a flow file");
-    commitFlowFile(eventRender.plaintext, "text/plain");
+    commit_flow_file(processed_event.plaintext, "text/plain");
   }
 
-  if (output_format_ == cwel::OutputFormat::JSON) {
+  if (output_format_ == wel::OutputFormat::JSON) {
     logger_->log_trace("Writing rendered {} JSON to a flow file", magic_enum::enum_name(json_format_));
-    commitFlowFile(eventRender.json, "application/json");
-  }
-}
-
-void ConsumeWindowsEventLog::addMatchedFieldsAsAttributes(const cwel::EventRender& eventRender, core::ProcessSession& session, const std::shared_ptr<core::FlowFile>& flowFile) const {
-  for (const auto &fieldMapping : eventRender.matched_fields) {
-    if (!fieldMapping.second.empty()) {
-      session.putAttribute(*flowFile, fieldMapping.first, fieldMapping.second);
-    }
+    commit_flow_file(processed_event.json, "application/json");
   }
 }
 
diff --git a/extensions/windows-event-log/ConsumeWindowsEventLog.h b/extensions/windows-event-log/ConsumeWindowsEventLog.h
index 3c48a3220..b2760c1d0 100644
--- a/extensions/windows-event-log/ConsumeWindowsEventLog.h
+++ b/extensions/windows-event-log/ConsumeWindowsEventLog.h
@@ -1,7 +1,4 @@
 /**
- * @file ConsumeWindowsEventLog.h
- * ConsumeWindowsEventLog class declaration
- *
  * 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.
@@ -52,10 +49,8 @@
 #include "utils/Export.h"
 #include "utils/RegexUtils.h"
 
-namespace org::apache::nifi::minifi::processors {
-
-namespace cwel {
-struct EventRender {
+namespace org::apache::nifi::minifi::wel {
+struct ProcessedEvent {
   std::map<std::string, std::string> matched_fields;
   std::string xml;
   std::string plaintext;
@@ -76,9 +71,11 @@ enum class JsonFormat {
 };
 
 std::function<bool(std::string_view)> parseSidMatcher(const std::optional<std::string>& sid_matcher);
-}  // namespace cwel
 
 class Bookmark;
+}  // namespace org::apache::nifi::minifi::wel
+
+namespace org::apache::nifi::minifi::processors {
 
 class ConsumeWindowsEventLog : public core::ProcessorImpl {
  public:
@@ -145,16 +142,16 @@ class ConsumeWindowsEventLog : public core::ProcessorImpl {
       .withDescription("Comma seperated list of key/value pairs with the following keys LOG_NAME, SOURCE, TIME_CREATED,EVENT_RECORDID,"
           "EVENTID,TASK_CATEGORY,LEVEL,KEYWORDS,USER,COMPUTER, and EVENT_TYPE. Eliminating fields will remove them from the header.")
       .build();
-  EXTENSIONAPI static constexpr auto OutputFormatProperty = core::PropertyDefinitionBuilder<magic_enum::enum_count<cwel::OutputFormat>()>::createProperty("Output Format")
+  EXTENSIONAPI static constexpr auto OutputFormatProperty = core::PropertyDefinitionBuilder<magic_enum::enum_count<wel::OutputFormat>()>::createProperty("Output Format")
       .isRequired(true)
-      .withDefaultValue(magic_enum::enum_name(cwel::OutputFormat::XML))
-      .withAllowedValues(magic_enum::enum_names<cwel::OutputFormat>())
+      .withDefaultValue(magic_enum::enum_name(wel::OutputFormat::XML))
+      .withAllowedValues(magic_enum::enum_names<wel::OutputFormat>())
       .withDescription("The format of the output flow files.")
       .build();
-  EXTENSIONAPI static constexpr auto JsonFormatProperty = core::PropertyDefinitionBuilder<magic_enum::enum_count<cwel::JsonFormat>()>::createProperty("JSON Format")
+  EXTENSIONAPI static constexpr auto JsonFormatProperty = core::PropertyDefinitionBuilder<magic_enum::enum_count<wel::JsonFormat>()>::createProperty("JSON Format")
       .isRequired(true)
-      .withDefaultValue(magic_enum::enum_name(cwel::JsonFormat::Simple))
-      .withAllowedValues(magic_enum::enum_names<cwel::JsonFormat>())
+      .withDefaultValue(magic_enum::enum_name(wel::JsonFormat::Simple))
+      .withAllowedValues(magic_enum::enum_names<wel::JsonFormat>())
       .withDescription("Set the json format type. Only applicable if Output Format is set to 'JSON'")
       .build();
   EXTENSIONAPI static constexpr auto BatchCommitSize = core::PropertyDefinitionBuilder<>::createProperty("Batch Commit Size")
@@ -216,31 +213,19 @@ class ConsumeWindowsEventLog : public core::ProcessorImpl {
 
  private:
   void refreshTimeZoneData();
-  void putEventRenderFlowFileToSession(const cwel::EventRender& eventRender, core::ProcessSession& session) const;
-  wel::WindowsEventLogHandler& getEventLogHandler(const std::string& name);
-  static bool insertHeaderName(wel::METADATA_NAMES& header, const std::string& key, const std::string& value);
-  nonstd::expected<cwel::EventRender, std::string> createEventRender(EVT_HANDLE eventHandle);
+  void createAndCommitFlowFile(const wel::ProcessedEvent& processed_event, core::ProcessSession& session) const;
+  wel::WindowsEventLogProvider& getEventLogProvider(const std::string& name);
+  wel::HeaderNames createHeaderNames(const std::optional<std::string>& event_header_property) const;
+  nonstd::expected<wel::ProcessedEvent, std::string> processEvent(EVT_HANDLE event_handle);
   void substituteXMLPercentageItems(pugi::xml_document& doc);
   std::function<std::string(const std::string&)> userIdToUsernameFunction() const;
-
   nonstd::expected<std::string, std::string> renderEventAsXml(EVT_HANDLE event_handle);
-
-  struct TimeDiff {
-    auto operator()() const {
-      return std::chrono::steady_clock::now() - time_;
-    }
-    const decltype(std::chrono::steady_clock::now()) time_ = std::chrono::steady_clock::now();
-  };
-
   bool commitAndSaveBookmark(const std::wstring& bookmarkXml, core::ProcessContext& context, core::ProcessSession& session);
-
-  std::tuple<size_t, std::wstring> processEventLogs(core::ProcessSession& session,
-                                                    const EVT_HANDLE& event_query_results);
-
-  void addMatchedFieldsAsAttributes(const cwel::EventRender &eventRender, core::ProcessSession &session, const std::shared_ptr<core::FlowFile> &flowFile) const;
+  std::tuple<size_t, std::wstring> processEventLogs(core::ProcessSession& session, EVT_HANDLE event_query_results);
+  std::unique_ptr<wel::Bookmark> createBookmark(const core::ProcessContext& context) const;
 
   core::StateManager* state_manager_{nullptr};
-  wel::METADATA_NAMES header_names_;
+  wel::HeaderNames header_names_;
   std::optional<std::string> header_delimiter_;
   wel::EventPath path_;
   std::wstring wstr_query_;
@@ -250,14 +235,14 @@ class ConsumeWindowsEventLog : public core::ProcessorImpl {
   std::string provenanceUri_;
   std::string computerName_;
   uint64_t max_buffer_size_{};
-  std::map<std::string, wel::WindowsEventLogHandler> providers_;
+  std::map<std::string, wel::WindowsEventLogProvider> providers_;
   uint64_t batch_commit_size_{};
   bool cache_sid_lookups_ = true;
 
-  cwel::OutputFormat output_format_;
-  cwel::JsonFormat json_format_;
+  wel::OutputFormat output_format_;
+  wel::JsonFormat json_format_;
 
-  std::unique_ptr<Bookmark> bookmark_;
+  std::unique_ptr<wel::Bookmark> bookmark_;
   std::mutex on_trigger_mutex_;
   std::unordered_map<std::string, std::string> xmlPercentageItemsResolutions_;
   HMODULE hMsobjsDll_{};
diff --git a/extensions/windows-event-log/tests/BookmarkTests.cpp b/extensions/windows-event-log/tests/BookmarkTests.cpp
index a6151ee23..cd1f4edf5 100644
--- a/extensions/windows-event-log/tests/BookmarkTests.cpp
+++ b/extensions/windows-event-log/tests/BookmarkTests.cpp
@@ -15,18 +15,17 @@
  * limitations under the License.
  */
 
-#include "Bookmark.h"
-
 #include <memory>
 #include <regex>
 
 #include "unit/TestBase.h"
 #include "unit/Catch.h"
 #include "utils/gsl.h"
+#include "wel/Bookmark.h"
 #include "wel/UniqueEvtHandle.h"
 #include "CWELTestUtils.h"
 
-using Bookmark = org::apache::nifi::minifi::processors::Bookmark;
+using Bookmark = org::apache::nifi::minifi::wel::Bookmark;
 using unique_evt_handle = org::apache::nifi::minifi::wel::unique_evt_handle;
 using IdGenerator = org::apache::nifi::minifi::utils::IdGenerator;
 
@@ -68,7 +67,7 @@ std::wstring bookmarkHandleAsXml(EVT_HANDLE event) {
 
 std::wstring bookmarkAsXml(const std::unique_ptr<Bookmark>& bookmark) {
   REQUIRE(bookmark);
-  REQUIRE(*bookmark);
+  REQUIRE(bookmark->isValid());
   return bookmarkHandleAsXml(bookmark->getBookmarkHandleFromXML());
 }
 
@@ -108,7 +107,7 @@ TEST_CASE("Bookmark constructor works", "[create]") {
   auto state_manager = test_plan->getStateStorage()->getStateManager(uuid);
   std::unique_ptr<Bookmark> bookmark = createBookmark(*test_plan, APPLICATION_CHANNEL, uuid, state_manager.get());
   REQUIRE(bookmark);
-  REQUIRE(*bookmark);
+  REQUIRE(bookmark->isValid());
 
   std::wregex pattern{L"<BookmarkList Direction='backward'>\r\n"
                       L"  <Bookmark Channel='Application' RecordId='\\d+' IsCurrent='true'/>\r\n"
@@ -130,7 +129,7 @@ TEST_CASE("Bookmark constructor works for log file path", "[create]") {
   auto state_manager = test_plan->getStateStorage()->getStateManager(uuid);
   std::unique_ptr<Bookmark> bookmark = createBookmark(*test_plan, L"SavedLog:" + log_file.wstring(), uuid, state_manager.get());
   REQUIRE(bookmark);
-  REQUIRE(*bookmark);
+  REQUIRE(bookmark->isValid());
 
   std::string log_file_str = log_file.string();
   utils::string::replaceAll(log_file_str, "\\", "\\\\");
diff --git a/extensions/windows-event-log/tests/CMakeLists.txt b/extensions/windows-event-log/tests/CMakeLists.txt
index 07c40712f..d0ba91a4e 100644
--- a/extensions/windows-event-log/tests/CMakeLists.txt
+++ b/extensions/windows-event-log/tests/CMakeLists.txt
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-set(WEL_TESTS  "BookmarkTests.cpp" "ConsumeWindowsEventLogTests.cpp" "LookupCacherTests.cpp" "MetadataWalkerTests.cpp")
+set(WEL_TESTS  "BookmarkTests.cpp" "ConsumeWindowsEventLogTests.cpp" "LookupCacherTests.cpp" "StringSplitterTests.cpp" "MetadataWalkerTests.cpp" "WindowsErrorTests.cpp")
 if (TEST_CUSTOM_WEL_PROVIDER)
     execute_process(COMMAND
         "${CMAKE_CURRENT_LIST_DIR}/custom-provider/generate-and-register.bat"
diff --git a/extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp b/extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp
index 353e91555..a1ea911c9 100644
--- a/extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp
+++ b/extensions/windows-event-log/tests/ConsumeWindowsEventLogTests.cpp
@@ -543,7 +543,7 @@ TEST_CASE("ConsumeWindowsEventLog can process events from a log file", "[cwel][l
 
 TEST_CASE("ConsumeWindowsEventLog::parseSidMatcher works correctly") {
   const auto verify = [](const std::optional<std::string>& sid_matcher, std::string_view field_name, bool result) {
-    const auto matcher_function = minifi::processors::cwel::parseSidMatcher(sid_matcher);
+    const auto matcher_function = minifi::wel::parseSidMatcher(sid_matcher);
     CHECK(matcher_function(field_name) == result);
   };
 
diff --git a/extensions/windows-event-log/tests/MetadataWalkerTests.cpp b/extensions/windows-event-log/tests/MetadataWalkerTests.cpp
index 678e0c768..84af243b5 100644
--- a/extensions/windows-event-log/tests/MetadataWalkerTests.cpp
+++ b/extensions/windows-event-log/tests/MetadataWalkerTests.cpp
@@ -28,21 +28,21 @@
 #include "wel/XMLString.h"
 #include "pugixml.hpp"
 
-using METADATA = org::apache::nifi::minifi::wel::METADATA;
+using Metadata = org::apache::nifi::minifi::wel::Metadata;
 using MetadataWalker = org::apache::nifi::minifi::wel::MetadataWalker;
-using WindowsEventLogHandler = org::apache::nifi::minifi::wel::WindowsEventLogHandler;
+using WindowsEventLogProvider = org::apache::nifi::minifi::wel::WindowsEventLogProvider;
 using WindowsEventLogMetadata = org::apache::nifi::minifi::wel::WindowsEventLogMetadata;
 using WindowsEventLogMetadataImpl = org::apache::nifi::minifi::wel::WindowsEventLogMetadataImpl;
 using XmlString = org::apache::nifi::minifi::wel::XmlString;
 
 namespace {
 
-auto none_matcher = minifi::processors::cwel::parseSidMatcher(std::nullopt);
+auto none_matcher = minifi::wel::parseSidMatcher(std::nullopt);
 
-std::string updateXmlMetadata(const std::string &xml, EVT_HANDLE metadata_ptr, EVT_HANDLE event_ptr, bool update_xml, bool resolve,
+std::string updateXmlMetadata(const std::string &xml, EVT_HANDLE provider_handle, EVT_HANDLE event_handle, bool update_xml, bool resolve,
     const std::function<bool(std::string_view)>& sid_matcher = none_matcher) {
-  WindowsEventLogHandler provider{metadata_ptr};
-  WindowsEventLogMetadataImpl metadata{provider, event_ptr};
+  WindowsEventLogProvider event_log_provider{provider_handle};
+  WindowsEventLogMetadataImpl metadata{event_log_provider, event_handle};
   MetadataWalker walker(metadata, "", update_xml, resolve, sid_matcher, &utils::OsUtils::userIdToUsername);
 
   pugi::xml_document doc;
@@ -98,7 +98,7 @@ TEST_CASE("MetadataWalker updates the Sid in the XML if both update_xml and reso
 
   SECTION("Resolve nobody") {
     std::string nobody = readFile("resources/withsids.xml");
-    const auto sid_matcher = minifi::processors::cwel::parseSidMatcher(".*Sid");
+    const auto sid_matcher = minifi::wel::parseSidMatcher(".*Sid");
     REQUIRE(updateXmlMetadata(xml, nullptr, nullptr, true, true, sid_matcher) == formatXml(nobody));
   }
 }
@@ -113,7 +113,7 @@ TEST_CASE("MetadataWalker updates the Security/UserId attribute", "[updateXmlMet
 
   SECTION("Resolve nobody") {
     std::string nobody = readFile("resources/resolveduserid.xml");
-    const auto sid_matcher = minifi::processors::cwel::parseSidMatcher("(.*Sid)|UserID");
+    const auto sid_matcher = minifi::wel::parseSidMatcher("(.*Sid)|UserID");
     REQUIRE(updateXmlMetadata(xml, nullptr, nullptr, true, true, sid_matcher) == formatXml(nobody));
   }
 }
@@ -135,7 +135,7 @@ TEST_CASE("MetadataWalker will leave a Sid unchanged if it doesn't correspond to
 
   REQUIRE(updateXmlMetadata(xml, nullptr, nullptr, false, true) == formatXml(xml));
   REQUIRE(updateXmlMetadata(xml, nullptr, nullptr, true, true) == formatXml(xml));
-  const auto sid_matcher = minifi::processors::cwel::parseSidMatcher(".*Sid");
+  const auto sid_matcher = minifi::wel::parseSidMatcher(".*Sid");
   REQUIRE(updateXmlMetadata(xml, nullptr, nullptr, true, true, sid_matcher) == formatXml(xml));
 }
 
@@ -157,7 +157,7 @@ void extractMappingsTestHelper(const std::string &file_name,
                                bool update_xml,
                                bool resolve,
                                const std::map<std::string, std::string>& expected_identifiers,
-                               const std::map<METADATA, std::string>& expected_metadata,
+                               const std::map<Metadata, std::string>& expected_metadata,
                                const std::map<std::string, std::string>& expected_field_values) {
   std::string input_xml = readFile(file_name);
   REQUIRE(!input_xml.empty());
@@ -165,7 +165,7 @@ void extractMappingsTestHelper(const std::string &file_name,
   pugi::xml_parse_result result = doc.load_string(input_xml.c_str());
   REQUIRE(result);
 
-  const auto sid_matcher = minifi::processors::cwel::parseSidMatcher(".*Sid");
+  const auto sid_matcher = minifi::wel::parseSidMatcher(".*Sid");
   MetadataWalker walker(FakeWindowsEventLogMetadata{}, METADATA_WALKER_TESTS_LOG_NAME, update_xml, resolve, sid_matcher, &utils::OsUtils::userIdToUsername);
   doc.traverse(walker);
 
@@ -183,12 +183,12 @@ TEST_CASE("MetadataWalker extracts mappings correctly when there is a single Sid
 
   const std::map<std::string, std::string> expected_identifiers{{"S-1-0-0", "S-1-0-0"}};
 
-  using org::apache::nifi::minifi::wel::METADATA;
-  const std::map<METADATA, std::string> expected_metadata{
-      {METADATA::SOURCE, "Microsoft-Windows-Security-Auditing"},
-      {METADATA::TIME_CREATED, "event_timestamp"},
-      {METADATA::EVENTID, "4672"},
-      {METADATA::EVENT_RECORDID, "2575952"}};
+  using org::apache::nifi::minifi::wel::Metadata;
+  const std::map<Metadata, std::string> expected_metadata{
+      {Metadata::SOURCE, "Microsoft-Windows-Security-Auditing"},
+      {Metadata::TIME_CREATED, "event_timestamp"},
+      {Metadata::EVENTID, "4672"},
+      {Metadata::EVENT_RECORDID, "2575952"}};
 
   const std::map<std::string, std::string> expected_field_values{};
 
@@ -206,18 +206,18 @@ TEST_CASE("MetadataWalker extracts mappings correctly when there is a single Sid
 
   const std::map<std::string, std::string> expected_identifiers{{"S-1-0-0", "Nobody"}};
 
-  using org::apache::nifi::minifi::wel::METADATA;
-  const std::map<METADATA, std::string> expected_metadata{
-      {METADATA::LOG_NAME, "MetadataWalkerTests"},
-      {METADATA::SOURCE, "Microsoft-Windows-Security-Auditing"},
-      {METADATA::TIME_CREATED, "event_timestamp"},
-      {METADATA::EVENTID, "4672"},
-      {METADATA::OPCODE, "event_data_for_field_4"},
-      {METADATA::EVENT_RECORDID, "2575952"},
-      {METADATA::EVENT_TYPE, "178"},
-      {METADATA::TASK_CATEGORY, "event_data_for_field_3"},
-      {METADATA::LEVEL, "event_data_for_field_2"},
-      {METADATA::KEYWORDS, "event_data_for_field_5"}};
+  using org::apache::nifi::minifi::wel::Metadata;
+  const std::map<Metadata, std::string> expected_metadata{
+      {Metadata::LOG_NAME, "MetadataWalkerTests"},
+      {Metadata::SOURCE, "Microsoft-Windows-Security-Auditing"},
+      {Metadata::TIME_CREATED, "event_timestamp"},
+      {Metadata::EVENTID, "4672"},
+      {Metadata::OPCODE, "event_data_for_field_4"},
+      {Metadata::EVENT_RECORDID, "2575952"},
+      {Metadata::EVENT_TYPE, "178"},
+      {Metadata::TASK_CATEGORY, "event_data_for_field_3"},
+      {Metadata::LEVEL, "event_data_for_field_2"},
+      {Metadata::KEYWORDS, "event_data_for_field_5"}};
 
   SECTION("update_xml is false => fields are collected into walker.getFieldValues()") {
     const std::map<std::string, std::string> expected_field_values{
@@ -243,12 +243,12 @@ TEST_CASE("MetadataWalker extracts mappings correctly when there are multiple Si
 
   const std::map<std::string, std::string> expected_identifiers{{"S-1-0-0", "S-1-0-0"}};
 
-  using org::apache::nifi::minifi::wel::METADATA;
-  const std::map<METADATA, std::string> expected_metadata{
-      {METADATA::SOURCE, "Microsoft-Windows-Security-Auditing"},
-      {METADATA::TIME_CREATED, "event_timestamp"},
-      {METADATA::EVENTID, "4672"},
-      {METADATA::EVENT_RECORDID, "2575952"}};
+  using org::apache::nifi::minifi::wel::Metadata;
+  const std::map<Metadata, std::string> expected_metadata{
+      {Metadata::SOURCE, "Microsoft-Windows-Security-Auditing"},
+      {Metadata::TIME_CREATED, "event_timestamp"},
+      {Metadata::EVENTID, "4672"},
+      {Metadata::EVENT_RECORDID, "2575952"}};
 
   const std::map<std::string, std::string> expected_field_values{};
 
@@ -272,18 +272,18 @@ TEST_CASE("MetadataWalker extracts mappings correctly when there are multiple Si
       {"S-1-0-0", "Nobody"},
       {"S-1-1-0", "Everyone"}};
 
-  using org::apache::nifi::minifi::wel::METADATA;
-  const std::map<METADATA, std::string> expected_metadata{
-      {METADATA::LOG_NAME, "MetadataWalkerTests"},
-      {METADATA::SOURCE, "Microsoft-Windows-Security-Auditing"},
-      {METADATA::TIME_CREATED, "event_timestamp"},
-      {METADATA::EVENTID, "4672"},
-      {METADATA::OPCODE, "event_data_for_field_4"},
-      {METADATA::EVENT_RECORDID, "2575952"},
-      {METADATA::EVENT_TYPE, "178"},
-      {METADATA::TASK_CATEGORY, "event_data_for_field_3"},
-      {METADATA::LEVEL, "event_data_for_field_2"},
-      {METADATA::KEYWORDS, "event_data_for_field_5"}};
+  using org::apache::nifi::minifi::wel::Metadata;
+  const std::map<Metadata, std::string> expected_metadata{
+      {Metadata::LOG_NAME, "MetadataWalkerTests"},
+      {Metadata::SOURCE, "Microsoft-Windows-Security-Auditing"},
+      {Metadata::TIME_CREATED, "event_timestamp"},
+      {Metadata::EVENTID, "4672"},
+      {Metadata::OPCODE, "event_data_for_field_4"},
+      {Metadata::EVENT_RECORDID, "2575952"},
+      {Metadata::EVENT_TYPE, "178"},
+      {Metadata::TASK_CATEGORY, "event_data_for_field_3"},
+      {Metadata::LEVEL, "event_data_for_field_2"},
+      {Metadata::KEYWORDS, "event_data_for_field_5"}};
 
   SECTION("update_xml is false => fields are collected into walker.getFieldValues()") {
     const std::map<std::string, std::string> expected_field_values{
@@ -309,12 +309,12 @@ TEST_CASE("MetadataWalker extracts mappings correctly when the Sid is unknown an
 
   const std::map<std::string, std::string> expected_identifiers{{"S-1-8-6-5-3-0-9", "S-1-8-6-5-3-0-9"}};
 
-  using org::apache::nifi::minifi::wel::METADATA;
-  const std::map<METADATA, std::string> expected_metadata{
-      {METADATA::SOURCE, "Microsoft-Windows-Security-Auditing"},
-      {METADATA::TIME_CREATED, "event_timestamp"},
-      {METADATA::EVENTID, "4672"},
-      {METADATA::EVENT_RECORDID, "2575952"}};
+  using org::apache::nifi::minifi::wel::Metadata;
+  const std::map<Metadata, std::string> expected_metadata{
+      {Metadata::SOURCE, "Microsoft-Windows-Security-Auditing"},
+      {Metadata::TIME_CREATED, "event_timestamp"},
+      {Metadata::EVENTID, "4672"},
+      {Metadata::EVENT_RECORDID, "2575952"}};
 
   const std::map<std::string, std::string> expected_field_values{};
 
@@ -332,18 +332,18 @@ TEST_CASE("MetadataWalker extracts mappings correctly when the Sid is unknown an
 
   const std::map<std::string, std::string> expected_identifiers{{"S-1-8-6-5-3-0-9", "S-1-8-6-5-3-0-9"}};
 
-  using org::apache::nifi::minifi::wel::METADATA;
-  const std::map<METADATA, std::string> expected_metadata{
-      {METADATA::LOG_NAME, "MetadataWalkerTests"},
-      {METADATA::SOURCE, "Microsoft-Windows-Security-Auditing"},
-      {METADATA::TIME_CREATED, "event_timestamp"},
-      {METADATA::EVENTID, "4672"},
-      {METADATA::OPCODE, "event_data_for_field_4"},
-      {METADATA::EVENT_RECORDID, "2575952"},
-      {METADATA::EVENT_TYPE, "178"},
-      {METADATA::TASK_CATEGORY, "event_data_for_field_3"},
-      {METADATA::LEVEL, "event_data_for_field_2"},
-      {METADATA::KEYWORDS, "event_data_for_field_5"}};
+  using org::apache::nifi::minifi::wel::Metadata;
+  const std::map<Metadata, std::string> expected_metadata{
+      {Metadata::LOG_NAME, "MetadataWalkerTests"},
+      {Metadata::SOURCE, "Microsoft-Windows-Security-Auditing"},
+      {Metadata::TIME_CREATED, "event_timestamp"},
+      {Metadata::EVENTID, "4672"},
+      {Metadata::OPCODE, "event_data_for_field_4"},
+      {Metadata::EVENT_RECORDID, "2575952"},
+      {Metadata::EVENT_TYPE, "178"},
+      {Metadata::TASK_CATEGORY, "event_data_for_field_3"},
+      {Metadata::LEVEL, "event_data_for_field_2"},
+      {Metadata::KEYWORDS, "event_data_for_field_5"}};
 
   SECTION("update_xml is false => fields are collected into walker.getFieldValues()") {
     const std::map<std::string, std::string> expected_field_values{
diff --git a/extensions/windows-event-log/tests/StringSplitterTests.cpp b/extensions/windows-event-log/tests/StringSplitterTests.cpp
new file mode 100644
index 000000000..907cfb77a
--- /dev/null
+++ b/extensions/windows-event-log/tests/StringSplitterTests.cpp
@@ -0,0 +1,45 @@
+/**
+ * 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 <string_view>
+#include <unordered_map>
+
+#include "unit/Catch.h"
+#include "unit/TestBase.h"
+#include "unit/TestUtils.h"
+#include "wel/StringSplitter.h"
+
+namespace wel = org::apache::nifi::minifi::wel;
+
+TEST_CASE("splitCommaSeparatedKeyValuePairs works") {
+  static constexpr auto test = [](std::string_view input, std::unordered_map<std::string_view, std::string_view> expected) {
+    std::unordered_map<std::string_view, std::string_view> output;
+    wel::splitCommaSeparatedKeyValuePairs(input, [&output](std::string_view key, std::string_view value) {
+      output[key] = value;
+    });
+    CHECK(output == expected);
+  };
+
+  test("", {});
+  test("foo", {{"foo", ""}});
+  test("foo =    ", {{"foo", ""}});
+  test("foo = bar", {{"foo", "bar"}});
+  test("foo == bar", {});  // more than two parts after splitting at '='
+  test("foo != bar", {{"foo !", "bar"}});
+  test("some long key = a long value", {{"some long key", "a long value"}});
+  test("all the leaves \t= brown ,\n and the sky=gray, \r\n I've been for a walk , on a winter's = day",
+       {{"all the leaves", "brown"}, {"and the sky", "gray"}, {"I've been for a walk", ""}, {"on a winter's", "day"}});
+}
diff --git a/extensions/windows-event-log/tests/WindowsErrorTests.cpp b/extensions/windows-event-log/tests/WindowsErrorTests.cpp
new file mode 100644
index 000000000..0f4890e02
--- /dev/null
+++ b/extensions/windows-event-log/tests/WindowsErrorTests.cpp
@@ -0,0 +1,34 @@
+/**
+ * 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 <Windows.h>
+
+#include <utility>
+
+#include "unit/TestBase.h"
+#include "unit/Catch.h"
+#include "wel/WindowsError.h"
+
+namespace wel = org::apache::nifi::minifi::wel;
+
+TEST_CASE("Windows system errors can be formatted") {
+  CHECK(fmt::format("{}", wel::WindowsError{ERROR_SUCCESS}) == "error 0x0: The operation completed successfully.");
+  CHECK(fmt::format("{}", wel::WindowsError{ERROR_INVALID_ADDRESS}) == "error 0x1E7: Attempt to access invalid address.");
+  CHECK(fmt::format("{}", wel::WindowsError{ERROR_APPCONTAINER_REQUIRED}) == "error 0x109B: This application can only run in the context of an app container.");
+  CHECK(fmt::format("{}", wel::WindowsError{ERROR_STATE_QUERY_SETTING_FAILED}) == "error 0x3DC2: State Manager failed to query the setting.");
+  CHECK(fmt::format("{}", wel::WindowsError{16789}) == "error 0x4195: unknown error");
+}
diff --git a/extensions/windows-event-log/Bookmark.cpp b/extensions/windows-event-log/wel/Bookmark.cpp
similarity index 87%
rename from extensions/windows-event-log/Bookmark.cpp
rename to extensions/windows-event-log/wel/Bookmark.cpp
index a4a08f53e..2adc364c2 100644
--- a/extensions/windows-event-log/Bookmark.cpp
+++ b/extensions/windows-event-log/wel/Bookmark.cpp
@@ -26,8 +26,9 @@
 #include "utils/file/FileUtils.h"
 #include "utils/OsUtils.h"
 #include "utils/UnicodeConversion.h"
+#include "WindowsError.h"
 
-namespace org::apache::nifi::minifi::processors {
+namespace org::apache::nifi::minifi::wel {
 static const std::string BOOKMARK_KEY = "bookmark";
 
 Bookmark::Bookmark(const wel::EventPath& path,
@@ -67,7 +68,7 @@ Bookmark::Bookmark(const wel::EventPath& path,
       return;
     }
 
-    LOG_LAST_ERROR(EvtCreateBookmark);
+    logger_->log_error("EvtCreateBookmark failed due to {}", wel::getLastError());
 
     bookmarkXml_.clear();
     state_map.erase(BOOKMARK_KEY);
@@ -76,18 +77,18 @@ Bookmark::Bookmark(const wel::EventPath& path,
 
   hBookmark_ = unique_evt_handle{EvtCreateBookmark(nullptr)};
   if (!hBookmark_) {
-    LOG_LAST_ERROR(EvtCreateBookmark);
+    logger_->log_error("EvtCreateBookmark failed due to {}", wel::getLastError());
     return;
   }
 
   const auto hEventResults = unique_evt_handle{ EvtQuery(nullptr, path.wstr().c_str(), query.c_str(), path.getQueryFlags()) };
   if (!hEventResults) {
-    LOG_LAST_ERROR(EvtQuery);
+    logger_->log_error("EvtQuery failed due to {}", wel::getLastError());
     return;
   }
 
   if (!EvtSeek(hEventResults.get(), 0, nullptr, 0, processOldEvents? EvtSeekRelativeToFirst : EvtSeekRelativeToLast)) {
-    LOG_LAST_ERROR(EvtSeek);
+    logger_->log_error("EvtSeek failed due to {}", wel::getLastError());
     return;
   }
 
@@ -95,7 +96,7 @@ Bookmark::Bookmark(const wel::EventPath& path,
     DWORD dwReturned{};
     EVT_HANDLE hEvent{ nullptr };
     if (!EvtNext(hEventResults.get(), 1, &hEvent, INFINITE, 0, &dwReturned)) {
-      LOG_LAST_ERROR(EvtNext);
+      logger_->log_error("EvtNext failed due to {}", wel::getLastError());
     }
     return unique_evt_handle{ hEvent };
   }();
@@ -105,14 +106,14 @@ Bookmark::Bookmark(const wel::EventPath& path,
 
 Bookmark::~Bookmark() = default;
 
-Bookmark::operator bool() const noexcept {
+bool Bookmark::isValid() const noexcept {
   return ok_;
 }
 
 EVT_HANDLE Bookmark::getBookmarkHandleFromXML() {
   hBookmark_ = unique_evt_handle{ EvtCreateBookmark(bookmarkXml_.c_str()) };
   if (!hBookmark_) {
-    LOG_LAST_ERROR(EvtCreateBookmark);
+    logger_->log_error("EvtCreateBookmark failed due to {}", wel::getLastError());
   }
 
   return hBookmark_.get();
@@ -139,7 +140,7 @@ bool Bookmark::saveBookmark(EVT_HANDLE event_handle) {
 
 nonstd::expected<std::wstring, std::string> Bookmark::getNewBookmarkXml(EVT_HANDLE hEvent) {
   if (!EvtUpdateBookmark(hBookmark_.get(), hEvent)) {
-    return nonstd::make_unexpected(fmt::format("EvtUpdateBookmark failed due to {}", utils::OsUtils::windowsErrorToErrorCode(GetLastError()).message()));
+    return nonstd::make_unexpected(fmt::format("EvtUpdateBookmark failed due to {}", wel::getLastError()));
   }
   // Render the bookmark as an XML string that can be persisted.
   logger_->log_trace("Rendering new bookmark");
@@ -150,15 +151,15 @@ nonstd::expected<std::wstring, std::string> Bookmark::getNewBookmarkXml(EVT_HAND
   if (event_render_succeeded_without_buffer)
     return nonstd::make_unexpected("EvtRender failed to determine the required buffer size.");
 
-  auto last_error = GetLastError();
-  if (last_error != ERROR_INSUFFICIENT_BUFFER)
-    return nonstd::make_unexpected(fmt::format("EvtRender failed due to {}", utils::OsUtils::windowsErrorToErrorCode(last_error).message()));
+  if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
+    return nonstd::make_unexpected(fmt::format("EvtRender failed due to {}", wel::getLastError()));
+  }
 
   bufferSize = bufferUsed;
   std::vector<wchar_t> buf(bufferSize / 2 + 1);
 
   if (!EvtRender(nullptr, hBookmark_.get(), EvtRenderBookmark, bufferSize, buf.data(), &bufferUsed, &propertyCount)) {
-    return nonstd::make_unexpected(fmt::format("EvtRender failed due to {}", utils::OsUtils::windowsErrorToErrorCode(GetLastError()).message()));
+    return nonstd::make_unexpected(fmt::format("EvtRender failed due to {}", wel::getLastError()));
   }
 
   return std::wstring(buf.data());
@@ -203,4 +204,4 @@ bool Bookmark::getBookmarkXmlFromFile(std::wstring& bookmarkXml) {
   return true;
 }
 
-}  // namespace org::apache::nifi::minifi::processors
+}  // namespace org::apache::nifi::minifi::wel
diff --git a/extensions/windows-event-log/Bookmark.h b/extensions/windows-event-log/wel/Bookmark.h
similarity index 85%
rename from extensions/windows-event-log/Bookmark.h
rename to extensions/windows-event-log/wel/Bookmark.h
index 0b17a2e82..36ffe6eaf 100644
--- a/extensions/windows-event-log/Bookmark.h
+++ b/extensions/windows-event-log/wel/Bookmark.h
@@ -18,7 +18,7 @@
 
 #pragma once
 
-#include <windows.h>
+#include <Windows.h>
 #include <winevt.h>
 #include <string>
 #include <memory>
@@ -26,14 +26,12 @@
 
 #include "core/ProcessContext.h"
 #include "core/ProcessSession.h"
-#include "wel/UniqueEvtHandle.h"
 #include "core/logging/Logger.h"
 #include "utils/expected.h"
-#include "wel/EventPath.h"
+#include "EventPath.h"
+#include "UniqueEvtHandle.h"
 
-namespace org::apache::nifi::minifi::processors {
-
-#define LOG_LAST_ERROR(func) logger_->log_error("!"#func" error {:#x}", GetLastError())
+namespace org::apache::nifi::minifi::wel {
 
 class Bookmark {
  public:
@@ -45,8 +43,7 @@ class Bookmark {
       core::StateManager* state_manager,
       std::shared_ptr<core::logging::Logger> logger);
   ~Bookmark();
-  explicit operator bool() const noexcept;
-
+  bool isValid() const noexcept;
   /* non-owning */ EVT_HANDLE getBookmarkHandleFromXML();
   nonstd::expected<std::wstring, std::string> getNewBookmarkXml(EVT_HANDLE hEvent);
   bool saveBookmarkXml(const std::wstring& bookmarkXml);
@@ -65,4 +62,4 @@ class Bookmark {
   std::wstring bookmarkXml_;
 };
 
-}  // namespace org::apache::nifi::minifi::processors
+}  // namespace org::apache::nifi::minifi::wel
diff --git a/extensions/windows-event-log/wel/EventPath.h b/extensions/windows-event-log/wel/EventPath.h
index dea8d60dc..8a02d5a00 100644
--- a/extensions/windows-event-log/wel/EventPath.h
+++ b/extensions/windows-event-log/wel/EventPath.h
@@ -18,7 +18,7 @@
 
 #pragma once
 
-#include <windows.h>
+#include <Windows.h>
 #include <winevt.h>
 
 #include <string>
diff --git a/extensions/windows-event-log/wel/MetadataWalker.cpp b/extensions/windows-event-log/wel/MetadataWalker.cpp
index 788f127b4..fee896a27 100644
--- a/extensions/windows-event-log/wel/MetadataWalker.cpp
+++ b/extensions/windows-event-log/wel/MetadataWalker.cpp
@@ -122,32 +122,42 @@ std::vector<std::string> MetadataWalker::getIdentifiers(const std::string &text)
   return found_strings;
 }
 
-std::string MetadataWalker::getMetadata(METADATA metadata) const {
-    switch (metadata) {
-      case LOG_NAME:
-        return log_name_;
-      case SOURCE:
-        return getString(metadata_, "Provider");
-      case TIME_CREATED:
-        return windows_event_log_metadata_.getEventTimestamp();
-      case EVENTID:
-        return getString(metadata_, "EventID");
-      case EVENT_RECORDID:
-        return getString(metadata_, "EventRecordID");
-      case OPCODE:
-        return getString(metadata_, "Opcode");
-      case TASK_CATEGORY:
-        return getString(metadata_, "Task");
-      case LEVEL:
-        return getString(metadata_, "Level");
-      case KEYWORDS:
-        return getString(metadata_, "Keywords");
-      case EVENT_TYPE:
-        return std::to_string(windows_event_log_metadata_.getEventTypeIndex());
-      case COMPUTER:
-        return WindowsEventLogMetadata::getComputerName();
+std::string MetadataWalker::getMetadata(Metadata metadata) const {
+  static constexpr auto get_from_map = [](const std::map<std::string, std::string>& map, const std::string& field) {
+    auto it = map.find(field);
+    if (it != std::end(map)) {
+      return it->second;
     }
-    return "N/A";
+    return std::string{"N/A"};
+  };
+
+  switch (metadata) {
+    case Metadata::LOG_NAME:
+      return log_name_;
+    case Metadata::SOURCE:
+      return get_from_map(metadata_, "Provider");
+    case Metadata::TIME_CREATED:
+      return windows_event_log_metadata_.getEventTimestamp();
+    case Metadata::EVENTID:
+      return get_from_map(metadata_, "EventID");
+    case Metadata::EVENT_RECORDID:
+      return get_from_map(metadata_, "EventRecordID");
+    case Metadata::OPCODE:
+      return get_from_map(metadata_, "Opcode");
+    case Metadata::TASK_CATEGORY:
+      return get_from_map(metadata_, "Task");
+    case Metadata::LEVEL:
+      return get_from_map(metadata_, "Level");
+    case Metadata::KEYWORDS:
+      return get_from_map(metadata_, "Keywords");
+    case Metadata::EVENT_TYPE:
+      return std::to_string(windows_event_log_metadata_.getEventTypeIndex());
+    case Metadata::COMPUTER:
+      return WindowsEventLogMetadata::getComputerName();
+    case Metadata::USER:
+      break;
+  }
+  return "N/A";
 }
 
 std::map<std::string, std::string> MetadataWalker::getFieldValues() const {
diff --git a/extensions/windows-event-log/wel/MetadataWalker.h b/extensions/windows-event-log/wel/MetadataWalker.h
index 9a8080f4d..b9da6c677 100644
--- a/extensions/windows-event-log/wel/MetadataWalker.h
+++ b/extensions/windows-event-log/wel/MetadataWalker.h
@@ -60,32 +60,13 @@ class MetadataWalker : public pugi::xml_tree_walker {
         user_id_to_username_fn_(std::move(user_id_to_username_fn)) {
   }
 
-  /**
-   * Overloaded function to visit a node
-   * @param node Node that we are visiting.
-   */
   bool for_each(pugi::xml_node &node) override;
-
   [[nodiscard]] std::map<std::string, std::string> getFieldValues() const;
-
   [[nodiscard]] std::map<std::string, std::string> getIdentifiers() const;
-
-  [[nodiscard]] std::string getMetadata(METADATA metadata) const;
+  [[nodiscard]] std::string getMetadata(Metadata metadata) const;
 
  private:
   static std::vector<std::string> getIdentifiers(const std::string &text);
-
-  static std::string getString(const std::map<std::string, std::string> &map, const std::string &field) {
-    auto srch = map.find(field);
-    if (srch != std::end(map)) {
-      return srch->second;
-    }
-    return "N/A";
-  }
-
-  /**
-   * Updates text within the XML representation
-   */
   template<typename Fn>
   requires std::is_convertible_v<std::invoke_result_t<Fn, std::string>, std::string>
   void updateText(pugi::xml_node &node, const std::string &field_name, Fn &&fn);
diff --git a/extensions/windows-event-log/wel/StringSplitter.h b/extensions/windows-event-log/wel/StringSplitter.h
new file mode 100644
index 000000000..5dbf620c2
--- /dev/null
+++ b/extensions/windows-event-log/wel/StringSplitter.h
@@ -0,0 +1,56 @@
+/**
+ * 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.
+ */
+
+#pragma once
+
+#include <cctype>
+#include <concepts>
+#include <ranges>
+#include <string_view>
+#include <vector>
+
+namespace org::apache::nifi::minifi::wel {
+
+template<std::invocable<std::string_view, std::string_view> Func>
+void splitCommaSeparatedKeyValuePairs(std::string_view input, Func output_callback) {
+  static constexpr auto count_whitespace = [](auto begin, auto end) {
+    size_t counter = 0;
+    for (auto it = begin; it != end && std::isspace(static_cast<unsigned char>(*it)); ++it) { ++counter; }
+    return counter;
+  };
+  for (const auto key_value_str : input | std::views::split(',')) {
+    const auto key_value_vec = key_value_str
+        | std::views::split('=')
+        | std::views::transform([](std::span<const char> term) {
+          size_t num_trim_left = count_whitespace(term.begin(), term.end());
+          if (num_trim_left < term.size()) {
+            size_t num_trim_right = count_whitespace(term.rbegin(), term.rend());
+            return std::string_view{term.data() + num_trim_left, term.size() - (num_trim_left + num_trim_right)};
+          } else {
+            return std::string_view{};
+          }
+        })
+        | std::ranges::to<std::vector>();
+    if (key_value_vec.size() == 2) {
+      output_callback(key_value_vec[0], key_value_vec[1]);
+    } else if (key_value_vec.size() == 1) {
+      output_callback(key_value_vec[0], "");
+    }
+  }
+}
+
+}  // namespace org::apache::nifi::minifi::wel
diff --git a/extensions/windows-event-log/wel/UniqueEvtHandle.h b/extensions/windows-event-log/wel/UniqueEvtHandle.h
index 5e19b612d..60574d05b 100644
--- a/extensions/windows-event-log/wel/UniqueEvtHandle.h
+++ b/extensions/windows-event-log/wel/UniqueEvtHandle.h
@@ -17,15 +17,11 @@
 
 #pragma once
 
-#include <windows.h>
+#include <Windows.h>
 
 #include <memory>
 
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
-namespace wel {
+namespace org::apache::nifi::minifi::wel {
 
 struct unique_evt_handle_deleter {
   void operator()(EVT_HANDLE event) const noexcept { EvtClose(event); }
@@ -33,9 +29,4 @@ struct unique_evt_handle_deleter {
 
 using unique_evt_handle = std::unique_ptr<std::remove_pointer<EVT_HANDLE>::type, unique_evt_handle_deleter>;
 
-} /* namespace wel */
-} /* namespace minifi */
-} /* namespace nifi */
-} /* namespace apache */
-} /* namespace org */
-
+}  // namespace org::apache::nifi::minifi::wel
diff --git a/extensions/windows-event-log/wel/UniqueEvtHandle.h b/extensions/windows-event-log/wel/WindowsError.h
similarity index 58%
copy from extensions/windows-event-log/wel/UniqueEvtHandle.h
copy to extensions/windows-event-log/wel/WindowsError.h
index 5e19b612d..2b060ef20 100644
--- a/extensions/windows-event-log/wel/UniqueEvtHandle.h
+++ b/extensions/windows-event-log/wel/WindowsError.h
@@ -17,25 +17,26 @@
 
 #pragma once
 
-#include <windows.h>
+#include <Windows.h>
 
-#include <memory>
+#include <system_error>
 
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
-namespace wel {
+#include "fmt/format.h"
 
-struct unique_evt_handle_deleter {
-  void operator()(EVT_HANDLE event) const noexcept { EvtClose(event); }
+namespace org::apache::nifi::minifi::wel {
+
+struct WindowsError {
+  DWORD error_code;
 };
 
-using unique_evt_handle = std::unique_ptr<std::remove_pointer<EVT_HANDLE>::type, unique_evt_handle_deleter>;
+inline WindowsError getLastError() {
+  return {GetLastError()};
+}
 
-} /* namespace wel */
-} /* namespace minifi */
-} /* namespace nifi */
-} /* namespace apache */
-} /* namespace org */
+// this is called by fmt::format; see https://fmt.dev/11.1/api/#formatting-user-defined-types
+inline std::string format_as(WindowsError windows_error) {
+  std::error_code error_code(windows_error.error_code, std::system_category());
+  return fmt::format("error 0x{:X}: {}", error_code.value(), error_code.message());
+}
 
+}  // namespace org::apache::nifi::minifi::wel
diff --git a/extensions/windows-event-log/wel/WindowsEventLog.cpp b/extensions/windows-event-log/wel/WindowsEventLog.cpp
index 585333e99..ad554e615 100644
--- a/extensions/windows-event-log/wel/WindowsEventLog.cpp
+++ b/extensions/windows-event-log/wel/WindowsEventLog.cpp
@@ -67,7 +67,7 @@ void WindowsEventLogMetadataImpl::renderMetadata() {
   if (!context)
     return;
 
-  if (!EvtRender(context.get(), event_ptr_, EvtRenderEventValues, dwBufferSize, rendered_values.get(), &dwBufferUsed, &dwPropertyCount)) {
+  if (!EvtRender(context.get(), event_handle_, EvtRenderEventValues, dwBufferSize, rendered_values.get(), &dwBufferUsed, &dwPropertyCount)) {
     if (ERROR_INSUFFICIENT_BUFFER != (status = GetLastError())) {
       return;
     }
@@ -78,7 +78,7 @@ void WindowsEventLogMetadataImpl::renderMetadata() {
       return;
     }
 
-    EvtRender(context.get(), event_ptr_, EvtRenderEventValues, dwBufferSize, rendered_values.get(), &dwBufferUsed, &dwPropertyCount);
+    EvtRender(context.get(), event_handle_, EvtRenderEventValues, dwBufferSize, rendered_values.get(), &dwBufferUsed, &dwPropertyCount);
     if (ERROR_SUCCESS != (status = GetLastError())) {
       return;
     }
@@ -121,29 +121,29 @@ void WindowsEventLogMetadataImpl::renderMetadata() {
 }
 
 std::string WindowsEventLogMetadataImpl::getEventData(EVT_FORMAT_MESSAGE_FLAGS field, const std::string& key) const {
-  return metadata_ptr_.getEventData(field, key, event_ptr_);
+  return event_log_provider_.getEventData(field, key, event_handle_);
 }
 
-std::string WindowsEventLogHandler::getEventData(EVT_FORMAT_MESSAGE_FLAGS field, const std::string& key, EVT_HANDLE event_ptr) const {
+std::string WindowsEventLogProvider::getEventData(EVT_FORMAT_MESSAGE_FLAGS field, const std::string& key, EVT_HANDLE event_handle) const {
   auto cached_value = event_data_cache_.get(field, key);
   if (cached_value) { return *cached_value; }
-  auto new_value = getEventDataImpl(field, event_ptr);
+  auto new_value = getEventDataImpl(field, event_handle);
   event_data_cache_.set(field, key, new_value);
   return new_value;
 }
 
-std::string WindowsEventLogHandler::getEventDataImpl(EVT_FORMAT_MESSAGE_FLAGS field, EVT_HANDLE event_ptr) const {
+std::string WindowsEventLogProvider::getEventDataImpl(EVT_FORMAT_MESSAGE_FLAGS field, EVT_HANDLE event_handle) const {
   WCHAR stack_buffer[4096];
   DWORD num_chars_in_buffer = sizeof(stack_buffer) / sizeof(stack_buffer[0]);
   using Deleter = utils::StackAwareDeleter<WCHAR, utils::FreeDeleter>;
   std::unique_ptr<WCHAR, Deleter> buffer{stack_buffer, Deleter{stack_buffer}};
   DWORD num_chars_used = 0;
 
-  if (!metadata_provider_ || !event_ptr) {
+  if (!provider_handle_ || !event_handle) {
     return {};
   }
 
-  if (!EvtFormatMessage(metadata_provider_.get(), event_ptr, 0, 0, nullptr, field, num_chars_in_buffer, buffer.get(), &num_chars_used)) {
+  if (!EvtFormatMessage(provider_handle_.get(), event_handle, 0, 0, nullptr, field, num_chars_in_buffer, buffer.get(), &num_chars_used)) {
     auto last_error = GetLastError();
     if (ERROR_INSUFFICIENT_BUFFER == last_error) {
       num_chars_in_buffer = num_chars_used;
@@ -153,7 +153,7 @@ std::string WindowsEventLogHandler::getEventDataImpl(EVT_FORMAT_MESSAGE_FLAGS fi
         return {};
       }
 
-      EvtFormatMessage(metadata_provider_.get(), event_ptr, 0, 0, nullptr, field, num_chars_in_buffer, buffer.get(), &num_chars_used);
+      EvtFormatMessage(provider_handle_.get(), event_handle, 0, 0, nullptr, field, num_chars_in_buffer, buffer.get(), &num_chars_used);
     }
   }
 
@@ -167,7 +167,7 @@ std::string WindowsEventLogHandler::getEventDataImpl(EVT_FORMAT_MESSAGE_FLAGS fi
   return utils::to_string(std::wstring{buffer.get()});
 }
 
-nonstd::expected<std::string, std::error_code> WindowsEventLogHandler::getEventMessage(EVT_HANDLE eventHandle) const {
+nonstd::expected<std::string, std::error_code> WindowsEventLogProvider::getEventMessage(EVT_HANDLE event_handle) const {
   std::string returnValue;
   WCHAR stack_buffer[4096];
   DWORD num_chars_in_buffer = sizeof(stack_buffer) / sizeof(stack_buffer[0]);
@@ -175,7 +175,7 @@ nonstd::expected<std::string, std::error_code> WindowsEventLogHandler::getEventM
   std::unique_ptr<WCHAR, Deleter> buffer{stack_buffer, Deleter{stack_buffer}};
   DWORD num_chars_used = 0;
 
-  bool evt_format_succeeded = EvtFormatMessage(metadata_provider_.get(), eventHandle, 0, 0, nullptr, EvtFormatMessageEvent, num_chars_in_buffer, buffer.get(), &num_chars_used);
+  bool evt_format_succeeded = EvtFormatMessage(provider_handle_.get(), event_handle, 0, 0, nullptr, EvtFormatMessageEvent, num_chars_in_buffer, buffer.get(), &num_chars_used);
   if (evt_format_succeeded)
     return utils::to_string(std::wstring{buffer.get()});
 
@@ -188,7 +188,7 @@ nonstd::expected<std::string, std::error_code> WindowsEventLogHandler::getEventM
   buffer.reset((LPWSTR) malloc(num_chars_in_buffer * sizeof(WCHAR)));
   if (!buffer)
     return nonstd::make_unexpected(utils::OsUtils::windowsErrorToErrorCode(ERROR_OUTOFMEMORY));
-  if (EvtFormatMessage(metadata_provider_.get(), eventHandle, 0, 0, nullptr,
+  if (EvtFormatMessage(provider_handle_.get(), event_handle, 0, 0, nullptr,
                        EvtFormatMessageEvent, num_chars_in_buffer,
                        buffer.get(), &num_chars_used))
     return utils::to_string(std::wstring{buffer.get()});
@@ -196,7 +196,7 @@ nonstd::expected<std::string, std::error_code> WindowsEventLogHandler::getEventM
 }
 
 namespace {
-size_t findLongestHeaderNameSize(const METADATA_NAMES& header_names, const size_t minimum_size) {
+size_t findLongestHeaderNameSize(const HeaderNames& header_names, const size_t minimum_size) {
   size_t max = minimum_size;
   for (const auto& option : header_names) {
     max = (std::max(max, option.second.size()));
@@ -205,7 +205,7 @@ size_t findLongestHeaderNameSize(const METADATA_NAMES& header_names, const size_
 }
 }  // namespace
 
-WindowsEventLogHeader::WindowsEventLogHeader(const METADATA_NAMES& header_names, const std::optional<std::string>& custom_delimiter, const size_t minimum_size)
+WindowsEventLogHeader::WindowsEventLogHeader(const HeaderNames& header_names, const std::optional<std::string>& custom_delimiter, const size_t minimum_size)
     : header_names_(header_names),
       custom_delimiter_(custom_delimiter),
       longest_header_name_(findLongestHeaderNameSize(header_names, minimum_size)) {
diff --git a/extensions/windows-event-log/wel/WindowsEventLog.h b/extensions/windows-event-log/wel/WindowsEventLog.h
index 7bfae03d2..b73c54573 100644
--- a/extensions/windows-event-log/wel/WindowsEventLog.h
+++ b/extensions/windows-event-log/wel/WindowsEventLog.h
@@ -43,7 +43,7 @@
 
 namespace org::apache::nifi::minifi::wel {
 
-enum METADATA {
+enum class Metadata {
   LOG_NAME,
   SOURCE,
   TIME_CREATED,
@@ -56,9 +56,7 @@ enum METADATA {
   KEYWORDS,
   USER,
   COMPUTER,
-  UNKNOWN
 };
-using METADATA_NAMES = std::vector<std::pair<METADATA, std::string>>;
 
 class EventDataCache {
  public:
@@ -89,22 +87,18 @@ class EventDataCache {
   std::unordered_map<CacheKey, CacheItem, CacheKeyHash> cache_;
 };
 
-class WindowsEventLogHandler {
+class WindowsEventLogProvider {
  public:
-  WindowsEventLogHandler() : metadata_provider_(nullptr) {
-  }
-
-  explicit WindowsEventLogHandler(EVT_HANDLE metadataProvider) : metadata_provider_(metadataProvider) {
-  }
+  WindowsEventLogProvider() : provider_handle_(nullptr) {}
+  explicit WindowsEventLogProvider(EVT_HANDLE provider_handle) : provider_handle_(provider_handle) {}
 
-  nonstd::expected<std::string, std::error_code> getEventMessage(EVT_HANDLE eventHandle) const;
-
-  [[nodiscard]] std::string getEventData(EVT_FORMAT_MESSAGE_FLAGS field, const std::string& key, EVT_HANDLE event_ptr) const;
+  nonstd::expected<std::string, std::error_code> getEventMessage(EVT_HANDLE event_handle) const;
+  [[nodiscard]] std::string getEventData(EVT_FORMAT_MESSAGE_FLAGS field, const std::string& key, EVT_HANDLE event_handle) const;
 
  private:
-  [[nodiscard]] std::string getEventDataImpl(EVT_FORMAT_MESSAGE_FLAGS field, EVT_HANDLE event_ptr) const;
+  [[nodiscard]] std::string getEventDataImpl(EVT_FORMAT_MESSAGE_FLAGS field, EVT_HANDLE event_handle) const;
 
-  unique_evt_handle metadata_provider_;
+  unique_evt_handle provider_handle_;
   mutable EventDataCache event_data_cache_;
 };
 
@@ -115,49 +109,6 @@ class WindowsEventLogMetadata {
   [[nodiscard]] virtual std::string getEventTimestamp() const = 0;
   virtual short getEventTypeIndex() const = 0;  // NOLINT short comes from WINDOWS API
 
-  static std::string getMetadataString(METADATA val) {
-    static std::map<METADATA, std::string> map = {
-        {LOG_NAME, "LOG_NAME"},
-        {SOURCE, "SOURCE"},
-        {TIME_CREATED, "TIME_CREATED"},
-        {EVENTID, "EVENTID"},
-        {OPCODE, "OPCODE"},
-        {EVENT_RECORDID, "EVENT_RECORDID"},
-        {EVENT_TYPE, "EVENT_TYPE"},
-        {TASK_CATEGORY, "TASK_CATEGORY"},
-        {LEVEL, "LEVEL"},
-        {KEYWORDS, "KEYWORDS"},
-        {USER, "USER"},
-        {COMPUTER, "COMPUTER"}
-    };
-
-    return map[val];
-  }
-
-  static METADATA getMetadataFromString(const std::string& val) {
-    static std::map<std::string, METADATA> map = {
-        {"LOG_NAME", LOG_NAME},
-        {"SOURCE", SOURCE},
-        {"TIME_CREATED", TIME_CREATED},
-        {"EVENTID", EVENTID},
-        {"OPCODE", OPCODE},
-        {"EVENT_RECORDID", EVENT_RECORDID},
-        {"TASK_CATEGORY", TASK_CATEGORY},
-        {"EVENT_TYPE", EVENT_TYPE},
-        {"LEVEL", LEVEL},
-        {"KEYWORDS", KEYWORDS},
-        {"USER", USER},
-        {"COMPUTER", COMPUTER}
-    };
-
-    auto enumVal = map.find(val);
-    if (enumVal != std::end(map)) {
-      return enumVal->second;
-    } else {
-      return METADATA::UNKNOWN;
-    }
-  }
-
   static std::string getComputerName() {
     static std::string computer_name;
     if (computer_name.empty()) {
@@ -175,7 +126,7 @@ class WindowsEventLogMetadata {
 
 class WindowsEventLogMetadataImpl : public WindowsEventLogMetadata {
  public:
-  WindowsEventLogMetadataImpl(const WindowsEventLogHandler& metadataProvider, EVT_HANDLE event_ptr) : metadata_ptr_(metadataProvider), event_ptr_(event_ptr) {
+  WindowsEventLogMetadataImpl(const WindowsEventLogProvider& event_log_provider, EVT_HANDLE event_handle) : event_log_provider_(event_log_provider), event_handle_(event_handle) {
     renderMetadata();
   }
 
@@ -191,13 +142,15 @@ class WindowsEventLogMetadataImpl : public WindowsEventLogMetadata {
   std::string event_type_;
   short event_type_index_ = 0;  // NOLINT short comes from WINDOWS API
   std::string event_timestamp_str_;
-  EVT_HANDLE event_ptr_;
-  const WindowsEventLogHandler& metadata_ptr_;
+  EVT_HANDLE event_handle_;
+  const WindowsEventLogProvider& event_log_provider_;
 };
 
+using HeaderNames = std::vector<std::pair<Metadata, std::string>>;
+
 class WindowsEventLogHeader {
  public:
-  explicit WindowsEventLogHeader(const METADATA_NAMES& header_names, const std::optional<std::string>& custom_delimiter, size_t minimum_size);
+  explicit WindowsEventLogHeader(const HeaderNames& header_names, const std::optional<std::string>& custom_delimiter, size_t minimum_size);
 
   template<typename MetadataCollection>
   std::string getEventHeader(const MetadataCollection& metadata_collection) const;
@@ -206,7 +159,7 @@ class WindowsEventLogHeader {
  private:
   [[nodiscard]] std::string createDefaultDelimiter(size_t length) const;
 
-  const METADATA_NAMES& header_names_;
+  const HeaderNames& header_names_;
   const std::optional<std::string>& custom_delimiter_;
   const size_t longest_header_name_;
 };
diff --git a/libminifi/test/libtest/unit/Catch.h b/libminifi/test/libtest/unit/Catch.h
index 6ce6fa833..3a6ff3bce 100644
--- a/libminifi/test/libtest/unit/Catch.h
+++ b/libminifi/test/libtest/unit/Catch.h
@@ -22,6 +22,7 @@
 #include <chrono>
 #include "fmt/format.h"
 #include "catch2/catch_test_macros.hpp"
+#include "catch2/catch_tostring.hpp"
 #include "catch2/matchers/catch_matchers.hpp"
 
 namespace Catch {
diff --git a/libminifi/test/libtest/unit/TestUtils.h b/libminifi/test/libtest/unit/TestUtils.h
index 13d7b7d24..89954e3a4 100644
--- a/libminifi/test/libtest/unit/TestUtils.h
+++ b/libminifi/test/libtest/unit/TestUtils.h
@@ -32,7 +32,6 @@
 #include "utils/TimeUtil.h"
 #include "TestBase.h"
 
-#include "catch2/catch_tostring.hpp"
 #include "fmt/format.h"
 #include "rapidjson/document.h"
 #include "asio.hpp"
@@ -244,4 +243,13 @@ struct StringMaker<minifi::state::response::ValueNode> {
     return fmt::format(R"("{}")", value_node.to_string());
   }
 };
+
+template <>
+struct StringMaker<std::unordered_map<std::string_view, std::string_view>> {
+  static std::string convert(const std::unordered_map<std::string_view, std::string_view>& map) {
+    return "{" + utils::string::join(", ", map, [](const auto& kv) {
+      return fmt::format(R"("{}" => "{}")", kv.first, kv.second);
+    }) + "}";
+  }
+};
 }  // namespace Catch


(nifi-minifi-cpp) 03/06: MINIFICPP-2622 Replace Bitnami Kafka image with Apache in tests

Posted by sz...@apache.org.
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 434646febbaef0e0ff1edd2877036df2d51a2325
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Mon Sep 8 15:35:53 2025 +0200

    MINIFICPP-2622 Replace Bitnami Kafka image with Apache in tests
    
    Closes #2023
    
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 .../integration/cluster/checkers/KafkaHelper.py    |  8 +--
 .../cluster/containers/KafkaBrokerContainer.py     | 68 +++++++++++++---------
 2 files changed, 44 insertions(+), 32 deletions(-)

diff --git a/docker/test/integration/cluster/checkers/KafkaHelper.py b/docker/test/integration/cluster/checkers/KafkaHelper.py
index a876e8bc0..0307e497b 100644
--- a/docker/test/integration/cluster/checkers/KafkaHelper.py
+++ b/docker/test/integration/cluster/checkers/KafkaHelper.py
@@ -26,19 +26,19 @@ class KafkaHelper:
 
     def create_topic(self, container_name: str, topic_name: str):
         logging.info(f"Creating topic {topic_name} in {container_name}")
-        (code, output) = self.container_communicator.execute_command(container_name, ["/bin/bash", "-c", f"/opt/bitnami/kafka/bin/kafka-topics.sh --create --topic {topic_name} --bootstrap-server {container_name}:9092"])
+        (code, output) = self.container_communicator.execute_command(container_name, ["/bin/bash", "-c", f"/opt/kafka/bin/kafka-topics.sh --create --topic {topic_name} --bootstrap-server {container_name}:9092"])
         logging.info(output)
         return code == 0
 
     def produce_message(self, container_name: str, topic_name: str, message: str):
         logging.info(f"Sending {message} to {container_name}:{topic_name}")
-        (code, output) = self.container_communicator.execute_command(container_name, ["/bin/bash", "-c", f"/opt/bitnami/kafka/bin/kafka-console-producer.sh --topic {topic_name} --bootstrap-server {container_name}:9092 <<< '{message}'"])
+        (code, output) = self.container_communicator.execute_command(container_name, ["/bin/bash", "-c", f"/opt/kafka/bin/kafka-console-producer.sh --topic {topic_name} --bootstrap-server {container_name}:9092 <<< '{message}'"])
         logging.info(output)
         return code == 0
 
     def produce_message_with_key(self, container_name: str, topic_name: str, message: str, message_key: str):
         logging.info(f"Sending {message} to {container_name}:{topic_name}")
-        (code, output) = self.container_communicator.execute_command(container_name, ["/bin/bash", "-c", f"/opt/bitnami/kafka/bin/kafka-console-producer.sh --property 'key.separator=:' --property 'parse.key=true' --topic {topic_name} --bootstrap-server {container_name}:9092 <<< '{message_key}:{message}'"])
+        (code, output) = self.container_communicator.execute_command(container_name, ["/bin/bash", "-c", f"/opt/kafka/bin/kafka-console-producer.sh --property 'key.separator=:' --property 'parse.key=true' --topic {topic_name} --bootstrap-server {container_name}:9092 <<< '{message_key}:{message}'"])
         logging.info(output)
         return code == 0
 
@@ -51,7 +51,7 @@ class KafkaHelper:
             RUN pip install confluent-kafka
             """
             dockerfile_stream = io.BytesIO(dockerfile_content.encode("utf-8"))
-            image, _ = self.container_communicator.client.images.build(fileobj=dockerfile_stream, tag="kafka-helper")
+            self.container_communicator.client.images.build(fileobj=dockerfile_stream, tag="kafka-helper")
 
         output = self.container_communicator.client.containers.run("kafka-helper", ["python", "-c", command], remove=True, stdout=True, stderr=True, network=f"minifi_integration_test_network-{self.feature_id}")
         logging.info(output)
diff --git a/docker/test/integration/cluster/containers/KafkaBrokerContainer.py b/docker/test/integration/cluster/containers/KafkaBrokerContainer.py
index 2aacfd0ef..a597792d3 100644
--- a/docker/test/integration/cluster/containers/KafkaBrokerContainer.py
+++ b/docker/test/integration/cluster/containers/KafkaBrokerContainer.py
@@ -40,6 +40,12 @@ class KafkaBrokerContainer(Container):
 
         os.chmod(self.server_keystore_file_path, 0o644)
 
+        with tempfile.NamedTemporaryFile(delete=False) as credentials_file:
+            credentials_file.write(b"abcdefgh")
+            self.credentials_file_path = credentials_file.name
+
+        os.chmod(self.credentials_file_path, 0o644)
+
         trusted_cert = jks.TrustedCertEntry.new(
             'root-ca',  # Alias for the certificate
             crypto.dump_certificate(crypto.FILETYPE_ASN1, feature_context.root_ca_cert)
@@ -82,69 +88,75 @@ Client {
 
         logging.info('Creating and running kafka broker docker container...')
         self.client.containers.run(
-            image="bitnamilegacy/kafka:3.9.0",
+            image="apache/kafka:4.1.0",
             detach=True,
             name=self.name,
             network=self.network.name,
             environment=[
-                "KAFKA_CFG_NODE_ID=1",
-                "KAFKA_CFG_PROCESS_ROLES=controller,broker",
-                "KAFKA_CFG_INTER_BROKER_LISTENER_NAME=PLAINTEXT",
-                "KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER",
+                "KAFKA_NODE_ID=1",
+                "KAFKA_PROCESS_ROLES=controller,broker",
+                "KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT",
+                "KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER",
+                "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1",
+                "KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1",
+                "KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1",
 
-                f"KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka-broker-{self.feature_context.id}:9096",
+                f"KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka-broker-{self.feature_context.id}:9096",
 
-                f"KAFKA_CFG_LISTENERS=PLAINTEXT://kafka-broker-{self.feature_context.id}:9092,"
+                f"KAFKA_LISTENERS=PLAINTEXT://kafka-broker-{self.feature_context.id}:9092,"
                 f"SASL_PLAINTEXT://kafka-broker-{self.feature_context.id}:9094,"
                 f"SSL://kafka-broker-{self.feature_context.id}:9093,"
                 f"SASL_SSL://kafka-broker-{self.feature_context.id}:9095,"
                 f"CONTROLLER://kafka-broker-{self.feature_context.id}:9096",
 
-                f"KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka-broker-{self.feature_context.id}:9092,"
+                f"KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka-broker-{self.feature_context.id}:9092,"
                 f"SASL_PLAINTEXT://kafka-broker-{self.feature_context.id}:9094,"
                 f"SSL://kafka-broker-{self.feature_context.id}:9093,"
                 f"SASL_SSL://kafka-broker-{self.feature_context.id}:9095,"
                 f"CONTROLLER://kafka-broker-{self.feature_context.id}:9096",
 
-                "KAFKA_CFG_LOG4J_ROOT_LOGLEVEL=DEBUG",
-                "KAFKA_CFG_LOG4J_LOGGERS=kafka.controller=DEBUG,kafka.server.KafkaApis=DEBUG",
-
-                "KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,"
+                "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,"
                 "SASL_PLAINTEXT:SASL_PLAINTEXT,"
                 "SSL:SSL,"
                 "SASL_SSL:SASL_SSL,"
                 "CONTROLLER:PLAINTEXT",
 
                 # **If using SASL_PLAINTEXT, provide JAAS config**
-                'KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN',
-                'KAFKA_CFG_SASL_ENABLED_MECHANISMS=PLAIN',
-                'KAFKA_OPTS=-Djava.security.auth.login.config=/opt/bitnami/kafka/config/kafka_jaas.conf',
-
-                "KAFKA_CFG_SSL_PROTOCOL=TLS",
-                "KAFKA_CFG_SSL_ENABLED_PROTOCOLS=TLSv1.2",
-                "KAFKA_CFG_SSL_KEYSTORE_TYPE=JKS",
-                "KAFKA_CFG_SSL_KEYSTORE_LOCATION=/bitnami/kafka/config/certs/kafka.keystore.jks",
-                "KAFKA_CFG_SSL_KEYSTORE_PASSWORD=abcdefgh",
-                "KAFKA_CFG_SSL_KEY_PASSWORD=abcdefgh",
-                "KAFKA_CFG_SSL_TRUSTSTORE_TYPE=JKS",
-                "KAFKA_CFG_SSL_TRUSTSTORE_LOCATION=/bitnami/kafka/config/certs/kafka.truststore.jks",
-                "KAFKA_CFG_SSL_CLIENT_AUTH=none"
+                'KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL=PLAIN',
+                'KAFKA_SASL_ENABLED_MECHANISMS=PLAIN',
+                'KAFKA_OPTS=-Djava.security.auth.login.config=/opt/kafka/config/kafka_jaas.conf -Dlog4j2.rootLogger.level=DEBUG -Dlog4j2.logger.org.apache.kafka.controller.level=DEBUG',
+
+                "KAFKA_SSL_PROTOCOL=TLS",
+                "KAFKA_SSL_ENABLED_PROTOCOLS=TLSv1.2",
+                "KAFKA_SSL_KEYSTORE_TYPE=JKS",
+                "KAFKA_SSL_KEYSTORE_FILENAME=kafka.keystore.jks",
+                "KAFKA_SSL_KEYSTORE_CREDENTIALS=credentials.conf",
+                "KAFKA_SSL_KEY_CREDENTIALS=credentials.conf",
+                "KAFKA_SSL_TRUSTSTORE_CREDENTIALS=credentials.conf",
+                "KAFKA_SSL_TRUSTSTORE_TYPE=JKS",
+                "KAFKA_SSL_TRUSTSTORE_FILENAME=kafka.truststore.jks",
+                "KAFKA_SSL_CLIENT_AUTH=none"
             ],
             mounts=[
                 docker.types.Mount(
                     type='bind',
                     source=self.server_keystore_file_path,
-                    target='/bitnami/kafka/config/certs/kafka.keystore.jks'
+                    target='/etc/kafka/secrets/kafka.keystore.jks'
                 ),
                 docker.types.Mount(
                     type='bind',
                     source=self.server_truststore_file_path,
-                    target='/bitnami/kafka/config/certs/kafka.truststore.jks'
+                    target='/etc/kafka/secrets/kafka.truststore.jks'
                 ),
                 docker.types.Mount(
                     type='bind',
                     source=self.jaas_config_file_path,
-                    target='/opt/bitnami/kafka/config/kafka_jaas.conf'
+                    target='/opt/kafka/config/kafka_jaas.conf'
+                ),
+                docker.types.Mount(
+                    type='bind',
+                    source=self.credentials_file_path,
+                    target='/etc/kafka/secrets/credentials.conf'
                 )
             ],
             entrypoint=self.command)


(nifi-minifi-cpp) 05/06: MINIFICPP-2620 DatabaseContentRepository should be the default

Posted by sz...@apache.org.
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 54000432ac3af2390f93f22573be67db2477ebca
Author: Martin Zink <ma...@apache.org>
AuthorDate: Mon Sep 8 16:17:57 2025 +0200

    MINIFICPP-2620 DatabaseContentRepository should be the default
    
    Based on [CONFIGURE.md](https://github.com/apache/nifi-minifi-cpp/blob/main/CONFIGURE.md#configuring-repositories) DatabaseContentRepository should be the default.
    
    We even had a [test](https://github.com/apache/nifi-minifi-cpp/blob/main/docker/test/integration/features/core_functionality.feature#L50-L55) to verify this, but it was explicitly set [here](https://github.com/apache/nifi-minifi-cpp/blob/main/minifi_main/MiNiFiMain.cpp#L310) so it didnt test it properly.
    
    Closes #2021
    
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 .../integration/resources/minifi/minifi.properties  |  1 -
 minifi_main/MiNiFiMain.cpp                          | 21 +++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/docker/test/integration/resources/minifi/minifi.properties b/docker/test/integration/resources/minifi/minifi.properties
index 68dbec03c..c5ba7cf8e 100644
--- a/docker/test/integration/resources/minifi/minifi.properties
+++ b/docker/test/integration/resources/minifi/minifi.properties
@@ -3,5 +3,4 @@ nifi.bored.yield.duration=100 millis
 nifi.provenance.repository.max.storage.time=1 MIN
 nifi.provenance.repository.max.storage.size=1 MB
 nifi.database.content.repository.directory.default=${MINIFI_HOME}/content_repository
-nifi.content.repository.class.name=DatabaseContentRepository
 nifi.flow.engine.threads=5
diff --git a/minifi_main/MiNiFiMain.cpp b/minifi_main/MiNiFiMain.cpp
index 33249767c..3a111fbd4 100644
--- a/minifi_main/MiNiFiMain.cpp
+++ b/minifi_main/MiNiFiMain.cpp
@@ -40,6 +40,7 @@
 #include <csignal>
 
 #include <atomic>
+#include <algorithm>
 #include <cstdlib>
 #include <iostream>
 #include <vector>
@@ -63,13 +64,13 @@
 #include "core/repository/VolatileContentRepository.h"
 #include "core/repository/VolatileFlowFileRepository.h"
 #include "core/state/MetricsPublisherStore.h"
-#include "core/state/nodes/ResponseNodeLoader.h"
 #include "properties/Decryptor.h"
 #include "utils/Environment.h"
 #include "utils/FileMutex.h"
 #include "utils/file/AssetManager.h"
 #include "utils/file/FileUtils.h"
 #include "utils/file/PathUtils.h"
+#include "range/v3/algorithm/min_element.hpp"
 
 namespace minifi = org::apache::nifi::minifi;
 namespace core = minifi::core;
@@ -84,7 +85,7 @@ static std::atomic_flag process_running;
  *
  * Semaphores are a portable choice when using signal handlers. Threads,
  * mutexes, and condition variables are not guaranteed to work within
- * a signal handler. Consequently we will use the semaphore to avoid thread
+ * a signal handler. Consequently, we will use the semaphore to avoid thread
  * safety issues.
  */
 
@@ -308,7 +309,7 @@ int main(int argc, char **argv) {
     std::string prov_repo_class = "provenancerepository";
     std::string flow_repo_class = "flowfilerepository";
     std::string nifi_configuration_class_name = "adaptiveconfiguration";
-    std::string content_repo_class = "filesystemrepository";
+    std::string content_repo_class = "DatabaseContentRepository";
 
     auto log_properties = std::make_shared<core::logging::LoggerProperties>(locations->logs_dir_);
     log_properties->loadConfigureFile(locations->log_properties_path_, "nifi.log.");
@@ -418,22 +419,22 @@ int main(int argc, char **argv) {
     if (disk_space_watchdog_enable) {
       try {
         const auto repo_paths = [&] {
-          std::vector<std::string> repo_paths;
-          repo_paths.reserve(3);
+          std::vector<std::string> paths;
+          paths.reserve(3);
           // REPOSITORY_DIRECTORY is a dummy path used by noop repositories
           const auto path_valid = [](const std::string& p) { return !p.empty() && p != org::apache::nifi::minifi::core::REPOSITORY_DIRECTORY; };
           auto prov_repo_path = prov_repo->getDirectory();
           auto flow_repo_path = flow_repo->getDirectory();
           auto content_repo_storage_path = content_repo->getStoragePath();
-          if (!prov_repo->isNoop() && path_valid(prov_repo_path)) { repo_paths.push_back(std::move(prov_repo_path)); }
-          if (!flow_repo->isNoop() && path_valid(flow_repo_path)) { repo_paths.push_back(std::move(flow_repo_path)); }
-          if (path_valid(content_repo_storage_path)) { repo_paths.push_back(std::move(content_repo_storage_path)); }
-          return repo_paths;
+          if (!prov_repo->isNoop() && path_valid(prov_repo_path)) { paths.push_back(std::move(prov_repo_path)); }
+          if (!flow_repo->isNoop() && path_valid(flow_repo_path)) { paths.push_back(std::move(flow_repo_path)); }
+          if (path_valid(content_repo_storage_path)) { paths.push_back(std::move(content_repo_storage_path)); }
+          return paths;
         }();
         const auto available_spaces = minifi::disk_space_watchdog::check_available_space(repo_paths, logger.get());
         const auto config = minifi::disk_space_watchdog::read_config(*configure);
         const auto min_space = [](const std::vector<std::uintmax_t>& spaces) {
-          const auto it = std::min_element(std::begin(spaces), std::end(spaces));
+          const auto it = std::ranges::min_element(spaces);
           return it != spaces.end() ? *it : (std::numeric_limits<std::uintmax_t>::max)();
         };
         if (min_space(available_spaces) <= config.stop_threshold_bytes) {