From 8afd92425b69c7556bda040c02833d3a4a39210d Mon Sep 17 00:00:00 2001 From: Marcus Watts Date: Mon, 7 Dec 2020 17:20:49 -0500 Subject: [PATCH] rgw/kms/vault - need libicu to make canonical json for encryption contexts. for encryption, aws s3 provides an "encryption" context to vary per-object keys. The encryption context is a base64 encoded json structure, which must be converted to a determinstic form -- "canonical json". This requires converting all strings to a normalized canonical form: "utf-8 nfc", it also requires thta keys in objects be sorted in a fixed order; so some form of sorting based on nfc. It turns out that libicu was the best way to produce utf-8 nfc (boost also provides a mechanism, but it has many quirks). So, here are the hooks to pull the system libicu into the build. Fixes: http://tracker.ceph.com/issues/48746 Signed-off-by: Marcus Watts --- ceph.spec.in | 1 + debian/control | 1 + src/rgw/CMakeLists.txt | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 0fad99f6bb7..b72b3463c68 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -216,6 +216,7 @@ BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: make BuildRequires: ncurses-devel +BuildRequires: libicu-devel BuildRequires: parted BuildRequires: patch BuildRequires: perl diff --git a/debian/control b/debian/control index 48fee481f72..42044b802d8 100644 --- a/debian/control +++ b/debian/control @@ -44,6 +44,7 @@ Build-Depends: automake, # Crimson libgnutls28-dev, # Crimson libhwloc-dev, libibverbs-dev, + libicu-dev, librdmacm-dev, libkeyutils-dev, libldap2-dev, diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index a62908c6368..44de25895ea 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -23,6 +23,8 @@ function(gperf_generate input output) ) endfunction() +find_package(ICU 52.0 COMPONENTS uc REQUIRED) + set(librgw_common_srcs services/svc_finisher.cc services/svc_bi_rados.cc @@ -179,6 +181,7 @@ target_include_directories(rgw_common PUBLIC "${CMAKE_SOURCE_DIR}/src/dmclock/su target_include_directories(rgw_common PUBLIC "${CMAKE_SOURCE_DIR}/src/fmt/include") target_include_directories(rgw_common PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw") target_include_directories(rgw_common PRIVATE "${LUA_INCLUDE_DIR}") +target_include_directories(rgw_common SYSTEM PRIVATE "${ICU_INCLUDE_DIRS}") set(librgw_kmip_srcs @@ -270,6 +273,7 @@ target_link_libraries(rgw_a ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${OPENLDAP_LIBRARIES} ${CRYPTO_LIBS} + ICU::uc OATH::OATH) if(WITH_CURL_OPENSSL) -- 2.39.5