From 576f4fb81cb9d48e9fed4ee2414f3deb112da6e5 Mon Sep 17 00:00:00 2001 From: Leonid Fedorov Date: Tue, 10 Jun 2025 11:32:01 +0000 Subject: [PATCH] chore(packaging): add requires of snappy, ps awk and jemalloc required --- CMakeLists.txt | 1 + cmake/cpack_manage.cmake | 33 +++++++++++++++++++++++++++++++++ debian/control | 1 + 3 files changed, 35 insertions(+) create mode 100644 cmake/cpack_manage.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 093fb1f93..ec22f91d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,7 @@ include(columnstore_version) include(configureEngine) include(compiler_flags) include(misc) +include(cpack_manage) set(COMPONENTS dbcon/mysql diff --git a/cmake/cpack_manage.cmake b/cmake/cpack_manage.cmake new file mode 100644 index 000000000..e463db9cf --- /dev/null +++ b/cmake/cpack_manage.cmake @@ -0,0 +1,33 @@ +macro(columnstore_append_for_cpack var_name) + # Get current value from parent scope or use empty string + if(DEFINED ${var_name}) + set(current_val "${${var_name}}") + else() + set(current_val "") + endif() + + # Process each argument to append + foreach(arg IN LISTS ARGN) + if(current_val) + # If not empty, add comma before new item + set(current_val "${current_val}, ${arg}") + else() + # If empty, just add the item + set(current_val "${arg}") + endif() + endforeach() + + # Set back in parent scope + set(${var_name} + "${current_val}" + PARENT_SCOPE + ) +endmacro() + +macro(columnstore_add_rpm_deps) + columnstore_append_for_cpack(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES ${ARGN}) +endmacro() + +if(RPM) + columnstore_add_rpm_deps("snappy" "jemalloc" "procps-ng" "gawk") +endif() diff --git a/debian/control b/debian/control index cbb11cea4..7bde08ee8 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,7 @@ Depends: binutils, net-tools, python3, procps, + gawk, ${misc:Depends}, ${shlibs:Depends} Breaks: mariadb-columnstore-libs,