From 207a1f58940e00625846b56a286241d7d10c2256 Mon Sep 17 00:00:00 2001 From: "Markus Kitsinger (SwooshyCueb)" Date: Fri, 22 Mar 2024 16:17:13 -0400 Subject: [PATCH] [#7371] Add curl to development package dependencies --- cmake/packaging.cmake | 46 +++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/cmake/packaging.cmake b/cmake/packaging.cmake index b2562f8128..d8d305e8d1 100644 --- a/cmake/packaging.cmake +++ b/cmake/packaging.cmake @@ -54,40 +54,33 @@ endif() set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) +# identify proper curl packages for debian +get_filename_component(CURL_LIBRARY_REALPATH ${CURL_LIBRARY} REALPATH) +get_filename_component(CURL_LIBRARY_REALNAME ${CURL_LIBRARY_REALPATH} NAME_WE) +if (CURL_LIBRARY_REALNAME STREQUAL "libcurl-gnutls") + set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3-gnutls") + set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL_DEV "libcurl4-gnutls-dev") +elseif (CURL_LIBRARY_REALNAME STREQUAL "libcurl-nss") + set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3-nss") + set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL_DEV "libcurl4-nss-dev") +elseif (CURL_LIBRARY_REALNAME STREQUAL "libcurl") + set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl4") + set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL_DEV "libcurl4-openssl-dev") +endif() + ####################################### ## Runtime package ####################################### set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_NAME "irods-runtime") set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_PROVIDES "irods-runtime (= ${CPACK_DEBIAN_PACKAGE_VERSION})") +set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, libc6, sudo, libfuse2, libxml2, openssl, ${CPACK_DEBIAN_PACKAGE_DEPENDS_CURL}, libgcc-s1, libstdc++6") if (OPENSSL_VERSION VERSION_LESS "3.0.0") - set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, libc6, sudo, libssl1.1, libfuse2, libxml2, openssl, libgcc-s1, libstdc++6") + set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS}, libssl1.1") else() - set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, libc6, sudo, libssl3, libfuse2, libxml2, openssl, libgcc-s1, libstdc++6") + set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS}, libssl3") endif() set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_REPLACES "irods-server (<< 4.2.10-2~)") -get_filename_component(CURL_LIBRARY_REALPATH ${CURL_LIBRARY} REALPATH) -get_filename_component(CURL_LIBRARY_REALNAME ${CURL_LIBRARY_REALPATH} NAME_WE) -if (CURL_LIBRARY_REALNAME STREQUAL "libcurl-gnutls") - set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3-gnutls") -elseif (CURL_LIBRARY_REALNAME STREQUAL "libcurl-nss") - set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3-nss") -elseif (CURL_LIBRARY_REALNAME STREQUAL "libcurl") - if (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "ubuntu") - if (IRODS_LINUX_DISTRIBUTION_VERSION_MAJOR GREATER_EQUAL "18") - set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl4") - else() - set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3") - endif() - elseif (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "debian") - if (IRODS_LINUX_DISTRIBUTION_VERSION_MAJOR GREATER_EQUAL "10") - set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl4") - else() - set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3") - endif() - endif() -endif() -set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS_CURL}") set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME}_PACKAGE_NAME "irods-runtime") if (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "opensuse") @@ -153,12 +146,13 @@ endif() ## Development package ####################################### set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_NAME "irods-dev") -set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_DEVELOP_DEPENDENCIES_STRING}, irods-runtime (= ${CPACK_DEBIAN_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), libssl-dev") +set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_DEVELOP_DEPENDENCIES_STRING}, irods-runtime (= ${CPACK_DEBIAN_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), libssl-dev, libcurl-dev") +set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_RECOMMENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS_CURL_DEV}") set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_PROVIDES "irods-dev (= ${CPACK_DEBIAN_PACKAGE_VERSION})") set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_REPLACES "irods-runtime (<< 4.3.0~)") set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_NAME "irods-devel") -set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_REQUIRES "${IRODS_DEVELOP_DEPENDENCIES_STRING}, irods-runtime = ${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}") +set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_REQUIRES "${IRODS_DEVELOP_DEPENDENCIES_STRING}, irods-runtime = ${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, libcurl-devel") if (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "opensuse") set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_REQUIRES "${CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_REQUIRES}, libopenssl-devel") else()