--- ./CMakeLists.txt_orig	2024-12-08 03:30:35.895064190 -0600
+++ ./CMakeLists.txt	2024-12-08 03:37:54.115539630 -0600
@@ -72,7 +72,7 @@
 include_directories(${CMAKE_SOURCE_DIR} libdnf/utils/)
 
 if (WITH_ZCHUNK)
-    pkg_check_modules(ZCHUNKLIB zck>=0.9.11 REQUIRED)
+    pkg_check_modules(ZCHUNKLIB zchunk>=0.9.11 REQUIRED)
     set (CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS} -DWITH_ZCHUNK")
     set (CMAKE_CXX_FLAGS_DEBUG    "${CMAKE_CXX_FLAGS_DEBUG} -DWITH_ZCHUNK")
 endif ()
@@ -86,10 +86,10 @@
 # glibc: check if fnmatch.h has FNM_CASEFOLD symbol
 include(CheckSymbolExists)
 list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
-check_symbol_exists(FNM_CASEFOLD "fnmatch.h" HAS_FNM_CASEFOLD)
-if(NOT HAS_FNM_CASEFOLD)
-    message(SEND_ERROR "FNM_CASEFOLD is not available in fnmatch.h")
-endif()
+#check_symbol_exists(FNM_CASEFOLD "fnmatch.h" HAS_FNM_CASEFOLD)
+#if(NOT HAS_FNM_CASEFOLD)
+#    message(SEND_ERROR "FNM_CASEFOLD is not available in fnmatch.h")
+#endif()
 
 # python
 if(WITH_BINDINGS)
--- ./libdnf/dnf-repo.cpp_orig	2024-12-08 03:50:31.245622850 -0600
+++ ./libdnf/dnf-repo.cpp	2024-12-08 03:50:48.504139562 -0600
@@ -930,7 +930,7 @@
             continue;
         }
         auto repo_pattern = setopt.key.substr(0, last_dot_pos);
-        if (fnmatch(repo_pattern.c_str(), repoId, FNM_CASEFOLD) == 0) {
+        if (fnmatch(repo_pattern.c_str(), repoId, 0) == 0) {
             auto key = setopt.key.substr(last_dot_pos+1);
             try {
                 auto & optionItem = optBinds.at(key);
--- ./libdnf/hy-iutil.cpp_orig	2024-12-08 03:41:17.119771640 -0600
+++ ./libdnf/hy-iutil.cpp	2024-12-08 03:43:28.997402338 -0600
@@ -22,7 +22,7 @@
 #include <errno.h>
 #include <dirent.h>
 #include <fcntl.h>
-#ifdef __APPLE__
+#if (defined(__APPLE__)  || defined (_AIX))
 #include <limits.h>
 #else
 #include <linux/limits.h>
--- ./libdnf/hy-util.cpp_orig	2024-12-08 03:44:42.831702019 -0600
+++ ./libdnf/hy-util.cpp	2024-12-08 03:48:58.628509358 -0600
@@ -25,7 +25,7 @@
 #include <sys/utsname.h>
 #include <sys/stat.h>
 
-#ifdef __APPLE__
+#if (defined(__APPLE__) || defined (_AIX))
 typedef int auxv_t;
 #ifndef AT_HWCAP2
 #define AT_HWCAP2 26
--- ./libdnf/sack/query.cpp_orig	2024-12-08 03:54:50.292931859 -0600
+++ ./libdnf/sack/query.cpp	2024-12-08 03:56:07.837835348 -0600
@@ -50,6 +50,19 @@
 #include "libdnf/repo/solvable/Dependency.hpp"
 #include "libdnf/repo/solvable/DependencyContainer.hpp"
 
+ #ifndef HAVE_STRCASESTR
+ const char *strcasestr(const char *a, const char *b)
+ {
+     size_t l;
+     char f[3];
+ 
+     snprintf(f, sizeof(f), "%c%c", tolower(*b), toupper(*b));
+     for (l = strcspn(a, f); l != strlen(a); l += strcspn(a + l + 1, f) + 1)
+         if (strncasecmp(a + l, b, strlen(b)) == 0)
+             return(a + l);
+     return(NULL);
+ }
+ #endif
 
 namespace std {
 
@@ -1378,7 +1391,7 @@
                     continue;
                 }
                 if (cmpType & HY_GLOB) {
-                    if (fnmatch(match, name, FNM_CASEFOLD) == 0)
+                    if (fnmatch(match, name, 0) == 0)
                         MAPSET(m, id);
                     continue;
                 }
@@ -1462,7 +1475,7 @@
 {
     Pool *pool = dnf_sack_get_pool(sack);
     int cmp_type = f.getCmpType();
-    int fn_flags = (HY_ICASE & cmp_type) ? FNM_CASEFOLD : 0;
+    int fn_flags = (HY_ICASE & cmp_type) ? 0: 0;
     auto resultPset = result.get();
 
     for (auto match : f.getMatches()) {
--- ./libdnf/conf/Const.hpp_orig	2024-12-12 08:46:16.703395461 -0600
+++ ./libdnf/conf/Const.hpp	2024-12-12 08:51:31.595947096 -0600
@@ -29,10 +29,10 @@
 constexpr const char * PERSISTDIR = "/var/lib/dnf";
 constexpr const char * SYSTEM_CACHEDIR = "/var/cache/dnf";
 
-constexpr const char * CONF_FILENAME = "/etc/dnf/dnf.conf";
+constexpr const char * CONF_FILENAME = "/opt/freeware/etc/dnf/dnf.conf";
 
 // More important varsdirs must be on the end of vector
-const std::vector<std::string> VARS_DIRS{"/etc/yum/vars", "/etc/dnf/vars"};
+const std::vector<std::string> VARS_DIRS{"/opt/freeware/etc/yum/vars", "/opt/freeware/etc/dnf/vars"};
 
 const std::vector<std::string> GROUP_PACKAGE_TYPES{"mandatory", "default", "conditional"};
 const std::vector<std::string> INSTALLONLYPKGS{"kernel", "kernel-PAE",
--- ./libdnf/module/ModulePackageContainer.cpp_orig	2024-12-12 08:51:45.903466851 -0600
+++ ./libdnf/module/ModulePackageContainer.cpp	2024-12-12 08:53:04.753903847 -0600
@@ -288,7 +288,7 @@
 
     pImpl->installRoot = installRoot;
     g_autofree gchar * path = g_build_filename(pImpl->installRoot.c_str(),
-                                              "/etc/dnf/modules.d", NULL);
+                                              "/opt/freeware/etc/dnf/modules.d", NULL);
     std::unique_ptr<DIR> dir(opendir(path));
     if (dir) {
         struct dirent * ent;
@@ -345,7 +345,7 @@
 void ModulePackageContainer::addDefaultsFromDisk()
 {
     g_autofree gchar * dirPath = g_build_filename(
-            pImpl->installRoot.c_str(), "/etc/dnf/modules.defaults.d/", NULL);
+            pImpl->installRoot.c_str(), "/opt/freeware/etc/dnf/modules.defaults.d/", NULL);
 
     for (const auto &file : filesystem::getDirContent(dirPath)) {
         std::string yamlContent = getFileContent(file);
@@ -391,7 +391,7 @@
     }
 
     // add all modules to repository and pass ownership to module container
-    g_autofree gchar * path = g_build_filename(pImpl->installRoot.c_str(), "/etc/dnf/modules.d", NULL);
+    g_autofree gchar * path = g_build_filename(pImpl->installRoot.c_str(), "/opt/freeware/etc/dnf/modules.d", NULL);
     auto packages = md.getAllModulePackages(pImpl->moduleSack, repo, repoID, pImpl->modulesV2);
     for(auto const& modulePackagePtr: packages) {
         std::unique_ptr<ModulePackage> modulePackage(modulePackagePtr);
