aws-*: Update (#428410)

authored by Sandro and committed by GitHub 298eebb6 8b1aae35

+33 -328
+2 -2
pkgs/by-name/aw/aws-c-auth/package.nix
··· 16 16 stdenv.mkDerivation rec { 17 17 pname = "aws-c-auth"; 18 18 # nixpkgs-update: no auto update 19 - version = "0.8.1"; 19 + version = "0.9.0"; 20 20 21 21 src = fetchFromGitHub { 22 22 owner = "awslabs"; 23 23 repo = "aws-c-auth"; 24 24 rev = "v${version}"; 25 - hash = "sha256-p8D79BRjaPlhzap/FWbqMlkrbVELSgeJW8CljxBAaCI="; 25 + hash = "sha256-HzDUINTmgjW7rNEe+5iwZBv6ayxNKmGAJy+Lg4tp1t0="; 26 26 }; 27 27 28 28 nativeBuildInputs = [
-33
pkgs/by-name/aw/aws-c-cal/aws-c-cal-musl-compat.patch
··· 1 - From: Emil Lerch <emil@lerch.org> 2 - Date: Wed, 28 Apr 2021 17:46:24 -0700 3 - Subject: [PATCH] Allow dlopen to fail on musl systems 4 - 5 - Now that references are forced when linking statically, the assertion is 6 - no longer necessary. See https://github.com/awslabs/aws-c-cal/pull/54 7 - --- 8 - source/unix/openssl_platform_init.c | 5 +++-- 9 - 1 file changed, 3 insertions(+), 2 deletions(-) 10 - 11 - diff --git a/source/unix/openssl_platform_init.c b/source/unix/openssl_platform_init.c 12 - index 5266ecc1..99f210bd 100644 13 - --- a/source/unix/openssl_platform_init.c 14 - +++ b/source/unix/openssl_platform_init.c 15 - @@ -496,7 +502,6 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) { 16 - /* Try to auto-resolve against what's linked in/process space */ 17 - FLOGF("searching process and loaded modules"); 18 - void *process = dlopen(NULL, RTLD_NOW); 19 - - AWS_FATAL_ASSERT(process && "Unable to load symbols from process space"); 20 - enum aws_libcrypto_version result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_LC, process); 21 - if (result == AWS_LIBCRYPTO_NONE) { 22 - result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_0_2, process); 23 - @@ -504,7 +509,9 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) { 24 - if (result == AWS_LIBCRYPTO_NONE) { 25 - result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_1_1, process); 26 - } 27 - - dlclose(process); 28 - + if (process) { 29 - + dlclose(process); 30 - + } 31 - 32 - if (result == AWS_LIBCRYPTO_NONE) { 33 - FLOGF("libcrypto symbols were not statically linked, searching for shared libraries");
+2 -7
pkgs/by-name/aw/aws-c-cal/package.nix
··· 11 11 stdenv.mkDerivation (finalAttrs: { 12 12 pname = "aws-c-cal"; 13 13 # nixpkgs-update: no auto update 14 - version = "0.8.0"; 14 + version = "0.9.2"; 15 15 16 16 src = fetchFromGitHub { 17 17 owner = "awslabs"; 18 18 repo = "aws-c-cal"; 19 19 rev = "v${finalAttrs.version}"; 20 - hash = "sha256-dYFUYdMQMT8CZFMrCrhQ8JPEhA4CVf+f7VLFt3JNmn8="; 20 + hash = "sha256-ufMoB71xebxO/Cu/xVQ3BMrcCgIlkG+MXH2Ru2i6uXo="; 21 21 }; 22 - 23 - patches = [ 24 - # Fix openssl adaptor code for musl based static binaries. 25 - ./aws-c-cal-musl-compat.patch 26 - ]; 27 22 28 23 nativeBuildInputs = [ cmake ]; 29 24
+2 -2
pkgs/by-name/aw/aws-c-common/package.nix
··· 9 9 stdenv.mkDerivation rec { 10 10 pname = "aws-c-common"; 11 11 # nixpkgs-update: no auto update 12 - version = "0.10.3"; 12 + version = "0.12.4"; 13 13 14 14 src = fetchFromGitHub { 15 15 owner = "awslabs"; 16 16 repo = "aws-c-common"; 17 17 rev = "v${version}"; 18 - hash = "sha256-sA6CsLLHh4Ce/+ffl4OhisMSgdrD+EmXvTNGSq7/vvk="; 18 + hash = "sha256-hKCIPZlLPyH7D3Derk2onyqTzWGUtCx+f2+EKtAKlwA="; 19 19 }; 20 20 21 21 nativeBuildInputs = [ cmake ];
+2 -2
pkgs/by-name/aw/aws-c-compression/package.nix
··· 10 10 stdenv.mkDerivation rec { 11 11 pname = "aws-c-compression"; 12 12 # nixpkgs-update: no auto update 13 - version = "0.3.0"; 13 + version = "0.3.1"; 14 14 15 15 src = fetchFromGitHub { 16 16 owner = "awslabs"; 17 17 repo = "aws-c-compression"; 18 18 rev = "v${version}"; 19 - sha256 = "sha256-EjvOf2UMju6pycPdYckVxqQ34VOhrIIyvK+O3AVRED4="; 19 + sha256 = "sha256-gpru+hnppgLHhcPfVBOaMdcT6e8wUjZmY7Caaa/KAW4="; 20 20 }; 21 21 22 22 nativeBuildInputs = [
+2 -2
pkgs/by-name/aw/aws-c-event-stream/package.nix
··· 15 15 stdenv.mkDerivation rec { 16 16 pname = "aws-c-event-stream"; 17 17 # nixpkgs-update: no auto update 18 - version = "0.5.0"; 18 + version = "0.5.5"; 19 19 20 20 src = fetchFromGitHub { 21 21 owner = "awslabs"; 22 22 repo = "aws-c-event-stream"; 23 23 rev = "v${version}"; 24 - hash = "sha256-lg1qS/u5Fi8nt/tv2ekd8dgQ7rlrF3DrRxqidAoEywY="; 24 + hash = "sha256-wVjpDKKwoksq5gFtvhH76c7ciP0XmMozhkWmzY6GwgU="; 25 25 }; 26 26 27 27 nativeBuildInputs = [ cmake ];
+2 -2
pkgs/by-name/aw/aws-c-http/package.nix
··· 14 14 stdenv.mkDerivation rec { 15 15 pname = "aws-c-http"; 16 16 # nixpkgs-update: no auto update 17 - version = "0.9.2"; 17 + version = "0.10.4"; 18 18 19 19 src = fetchFromGitHub { 20 20 owner = "awslabs"; 21 21 repo = "aws-c-http"; 22 22 rev = "v${version}"; 23 - hash = "sha256-3nT64dFUcuwPfhQDwY5MTe/xPdr7XZMBpVL7V0y9tng="; 23 + hash = "sha256-t9PoxOjgV9qLris+C18SaEwXodBGcgK591LZl0dajxU="; 24 24 }; 25 25 26 26 nativeBuildInputs = [
+2 -2
pkgs/by-name/aw/aws-c-io/package.nix
··· 12 12 stdenv.mkDerivation rec { 13 13 pname = "aws-c-io"; 14 14 # nixpkgs-update: no auto update 15 - version = "0.15.3"; 15 + version = "0.21.2"; 16 16 17 17 src = fetchFromGitHub { 18 18 owner = "awslabs"; 19 19 repo = "aws-c-io"; 20 20 rev = "v${version}"; 21 - hash = "sha256-/pG/+MHAu/TYTtY/RQrr1U1ev2FZ1p/O8kIRUDDOcvQ="; 21 + hash = "sha256-QNf4TJIqtypDliiu6I72CbgjyJhdS9Uuim9tZOb3SJs="; 22 22 }; 23 23 24 24 nativeBuildInputs = [ cmake ];
+2 -2
pkgs/by-name/aw/aws-c-mqtt/package.nix
··· 15 15 stdenv.mkDerivation rec { 16 16 pname = "aws-c-mqtt"; 17 17 # nixpkgs-update: no auto update 18 - version = "0.11.0"; 18 + version = "0.13.3"; 19 19 20 20 src = fetchFromGitHub { 21 21 owner = "awslabs"; 22 22 repo = "aws-c-mqtt"; 23 23 rev = "v${version}"; 24 - hash = "sha256-gIoC3OG6VFzNH9/DjuC42eCIuN+w1AikaGAbx6ao8qQ="; 24 + hash = "sha256-Nf8c5iVl+NOPZFjsAPCMOGq2e7D8e7PafuMQh6t0DYw="; 25 25 }; 26 26 27 27 nativeBuildInputs = [
+2 -2
pkgs/by-name/aw/aws-c-s3/package.nix
··· 17 17 stdenv.mkDerivation rec { 18 18 pname = "aws-c-s3"; 19 19 # nixpkgs-update: no auto update 20 - version = "0.7.1"; 20 + version = "0.8.6"; 21 21 22 22 src = fetchFromGitHub { 23 23 owner = "awslabs"; 24 24 repo = "aws-c-s3"; 25 25 rev = "v${version}"; 26 - hash = "sha256-UE42U3UszobaUdo0ry9IlwTbSbGqmYkux19ILrVgUZY="; 26 + hash = "sha256-g2w1igjv0N0o6+bewypJm2coHTvhYN2v8usdMN7TBI4="; 27 27 }; 28 28 29 29 nativeBuildInputs = [
+2 -2
pkgs/by-name/aw/aws-c-sdkutils/package.nix
··· 10 10 stdenv.mkDerivation rec { 11 11 pname = "aws-c-sdkutils"; 12 12 # nixpkgs-update: no auto update 13 - version = "0.2.1"; 13 + version = "0.2.4"; 14 14 15 15 src = fetchFromGitHub { 16 16 owner = "awslabs"; 17 17 repo = "aws-c-sdkutils"; 18 18 rev = "v${version}"; 19 - hash = "sha256-Z9c+uBiGMXW5v+khdNaElhno16ikBO4voTzwd2mP6rA="; 19 + hash = "sha256-zc8E5ESZxXBJ6WA/V5i2Us61UcNf9wXa2k63NWqGRtI="; 20 20 }; 21 21 22 22 nativeBuildInputs = [
+2 -2
pkgs/by-name/aw/aws-checksums/package.nix
··· 10 10 stdenv.mkDerivation rec { 11 11 pname = "aws-checksums"; 12 12 # nixpkgs-update: no auto update 13 - version = "0.2.2"; 13 + version = "0.2.7"; 14 14 15 15 src = fetchFromGitHub { 16 16 owner = "awslabs"; 17 17 repo = "aws-checksums"; 18 18 rev = "v${version}"; 19 - sha256 = "sha256-hiqV6FrOZ19YIxL3UKBuexLJwoC2mY7lqysnV7ze0gg="; 19 + sha256 = "sha256-dYDTDWZJJ0JlvkMfLS376uUt5QzSmbV0UNRC4aq35TY="; 20 20 }; 21 21 22 22 nativeBuildInputs = [ cmake ];
-65
pkgs/by-name/aw/aws-crt-cpp/0001-build-Make-includedir-properly-overrideable.patch
··· 1 - From b3a46b9a2a9f86ff416a0ff5f84882c0dedebd14 Mon Sep 17 00:00:00 2001 2 - From: Jan Tojnar <jtojnar@gmail.com> 3 - Date: Sun, 9 Jan 2022 01:57:18 +0100 4 - Subject: [PATCH] build: Make includedir properly overrideable 5 - 6 - This is required by some package managers like Nix. 7 - 8 - Co-authored-by: Artturin <Artturin@artturin.com> 9 - --- 10 - CMakeLists.txt | 26 +++++++++++++++----------- 11 - 1 file changed, 15 insertions(+), 11 deletions(-) 12 - 13 - diff --git a/CMakeLists.txt b/CMakeLists.txt 14 - index 9f062ca..b28f13c 100644 15 - --- a/CMakeLists.txt 16 - +++ b/CMakeLists.txt 17 - @@ -49,6 +49,10 @@ if(${CMAKE_INSTALL_LIBDIR} STREQUAL "lib64") 18 - set(FIND_LIBRARY_USE_LIB64_PATHS true) 19 - endif() 20 - 21 - +if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR) 22 - + set(CMAKE_INSTALL_INCLUDEDIR "include") 23 - +endif() 24 - + 25 - if(NOT CMAKE_CXX_STANDARD) 26 - set(CMAKE_CXX_STANDARD 11) 27 - endif() 28 - @@ -329,7 +333,7 @@ endif() 29 - target_include_directories(${PROJECT_NAME} PUBLIC 30 - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 31 - $<BUILD_INTERFACE:${GENERATED_INCLUDE_DIR}> 32 - - $<INSTALL_INTERFACE:include>) 33 - + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) 34 - 35 - aws_use_package(aws-c-http) 36 - aws_use_package(aws-c-mqtt) 37 - @@ -346,16 +350,16 @@ aws_add_sanitizers(${PROJECT_NAME}) 38 - 39 - target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS}) 40 - 41 - -install(FILES ${AWS_CRT_HEADERS} DESTINATION "include/aws/crt" COMPONENT Development) 42 - -install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "include/aws/crt/auth" COMPONENT Development) 43 - -install(FILES ${AWS_CRT_CHECKSUM_HEADERS} DESTINATION "include/aws/crt/checksum" COMPONENT Development) 44 - -install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "include/aws/crt/crypto" COMPONENT Development) 45 - -install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "include/aws/crt/io" COMPONENT Development) 46 - -install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "include/aws/iot" COMPONENT Development) 47 - -install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "include/aws/crt/mqtt" COMPONENT Development) 48 - -install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "include/aws/crt/http" COMPONENT Development) 49 - -install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "include/aws/crt/endpoints" COMPONENT Development) 50 - -install(FILES ${AWS_CRT_CBOR_HEADERS} DESTINATION "include/aws/crt/cbor" COMPONENT Development) 51 - +install(FILES ${AWS_CRT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt" COMPONENT Development) 52 - +install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/auth" COMPONENT Development) 53 - +install(FILES ${AWS_CRT_CHECKSUM_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/checksum" COMPONENT Development) 54 - +install(FILES ${AWS_CRT_CRYPTO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/crypto" COMPONENT Development) 55 - +install(FILES ${AWS_CRT_IO_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/io" COMPONENT Development) 56 - +install(FILES ${AWS_CRT_IOT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/iot" COMPONENT Development) 57 - +install(FILES ${AWS_CRT_MQTT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/mqtt" COMPONENT Development) 58 - +install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/http" COMPONENT Development) 59 - +install(FILES ${AWS_CRT_ENDPOINT_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/endpoints" COMPONENT Development) 60 - +install(FILES ${AWS_CRT_CBOR_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/crt/cbor" COMPONENT Development) 61 - 62 - install( 63 - TARGETS ${PROJECT_NAME} 64 - -- 65 - 2.46.0
+5 -9
pkgs/by-name/aw/aws-crt-cpp/package.nix
··· 20 20 stdenv.mkDerivation rec { 21 21 pname = "aws-crt-cpp"; 22 22 # nixpkgs-update: no auto update 23 - version = "0.29.4"; 23 + version = "0.33.1"; 24 24 25 25 outputs = [ 26 26 "out" ··· 31 31 owner = "awslabs"; 32 32 repo = "aws-crt-cpp"; 33 33 rev = "v${version}"; 34 - sha256 = "sha256-Uv1BHM39f9soq7kziedqRhHqQ/xwnqcz++1UM5nuo8g="; 34 + sha256 = "sha256-C8KWe5+CXujD8nN3gLkjaaMld15sat/ohwEKhyWELKI="; 35 35 }; 36 36 37 - patches = [ 38 - # Correct include path for split outputs. 39 - # https://github.com/awslabs/aws-crt-cpp/pull/325 40 - ./0001-build-Make-includedir-properly-overrideable.patch 41 - ]; 42 - 43 37 postPatch = '' 44 - substituteInPlace CMakeLists.txt --replace '-Werror' "" 38 + substituteInPlace CMakeLists.txt \ 39 + --replace-fail "$<INSTALL_INTERFACE:include>" "$<INSTALL_INTERFACE:$dev/include>" \ 40 + --replace-fail '-Werror' "" 45 41 ''; 46 42 47 43 nativeBuildInputs = [
+2 -2
pkgs/by-name/aw/aws-sdk-cpp/package.nix
··· 33 33 stdenv.mkDerivation rec { 34 34 pname = "aws-sdk-cpp"; 35 35 # nixpkgs-update: no auto update 36 - version = "1.11.448"; 36 + version = "1.11.612"; 37 37 38 38 src = fetchFromGitHub { 39 39 owner = "aws"; 40 40 repo = "aws-sdk-cpp"; 41 41 rev = version; 42 - hash = "sha256-K0UFs7vOeZeQIs3G5L4FfEWXDGTXT9ssr/vQwa1l2lw="; 42 + hash = "sha256-W4eKgUvN2NLYEOO47HTJYJpEmyn10gNK29RIrvoXkek="; 43 43 }; 44 44 45 45 postPatch = ''
+3 -1
pkgs/tools/package-management/nix/common-autoconf.nix
··· 21 21 }@args: 22 22 assert (hash == null) -> (src != null); 23 23 let 24 + atLeast24 = lib.versionAtLeast version "2.4"; 24 25 atLeast224 = lib.versionAtLeast version "2.24pre"; 25 26 atLeast225 = lib.versionAtLeast version "2.25pre"; 26 27 in ··· 75 76 withAWS ? 76 77 lib.meta.availableOn stdenv.hostPlatform aws-c-common 77 78 && !enableStatic 78 - && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), 79 + && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) 80 + && atLeast24, 79 81 aws-c-common, 80 82 aws-sdk-cpp, 81 83 withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp,
+1 -5
pkgs/tools/package-management/nix/default.nix
··· 29 29 stateDir 30 30 confDir 31 31 ; 32 - aws-sdk-cpp = 33 - if lib.versionAtLeast args.version "2.12pre" then 34 - nixDependencies.aws-sdk-cpp 35 - else 36 - nixDependencies.aws-sdk-cpp-old; 32 + inherit (nixDependencies) aws-sdk-cpp; 37 33 }; 38 34 39 35 # Called for Nix == 2.28. Transitional until we always use
-59
pkgs/tools/package-management/nix/dependencies.nix
··· 9 9 { 10 10 scopeFunction = scope: { 11 11 boehmgc = regular.boehmgc.override { enableLargeConfig = true; }; 12 - 13 - # old nix fails to build with newer aws-sdk-cpp and the patch doesn't apply 14 - aws-sdk-cpp-old = 15 - (regular.aws-sdk-cpp.override { 16 - apis = [ 17 - "s3" 18 - "transfer" 19 - ]; 20 - customMemoryManagement = false; 21 - }).overrideAttrs 22 - (args: rec { 23 - # intentionally overriding postPatch 24 - version = "1.9.294"; 25 - 26 - src = fetchFromGitHub { 27 - owner = "aws"; 28 - repo = "aws-sdk-cpp"; 29 - rev = version; 30 - hash = "sha256-Z1eRKW+8nVD53GkNyYlZjCcT74MqFqqRMeMc33eIQ9g="; 31 - }; 32 - postPatch = '' 33 - # Avoid blanket -Werror to evade build failures on less 34 - # tested compilers. 35 - substituteInPlace cmake/compiler_settings.cmake \ 36 - --replace '"-Werror"' ' ' 37 - 38 - # Missing includes for GCC11 39 - sed '5i#include <thread>' -i \ 40 - aws-cpp-sdk-cloudfront-integration-tests/CloudfrontOperationTest.cpp \ 41 - aws-cpp-sdk-cognitoidentity-integration-tests/IdentityPoolOperationTest.cpp \ 42 - aws-cpp-sdk-dynamodb-integration-tests/TableOperationTest.cpp \ 43 - aws-cpp-sdk-elasticfilesystem-integration-tests/ElasticFileSystemTest.cpp \ 44 - aws-cpp-sdk-lambda-integration-tests/FunctionTest.cpp \ 45 - aws-cpp-sdk-mediastore-data-integration-tests/MediaStoreDataTest.cpp \ 46 - aws-cpp-sdk-queues/source/sqs/SQSQueue.cpp \ 47 - aws-cpp-sdk-redshift-integration-tests/RedshiftClientTest.cpp \ 48 - aws-cpp-sdk-s3-crt-integration-tests/BucketAndObjectOperationTest.cpp \ 49 - aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp \ 50 - aws-cpp-sdk-s3control-integration-tests/S3ControlTest.cpp \ 51 - aws-cpp-sdk-sqs-integration-tests/QueueOperationTest.cpp \ 52 - aws-cpp-sdk-transfer-tests/TransferTests.cpp 53 - # Flaky on Hydra 54 - rm aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp 55 - # Includes aws-c-auth private headers, so only works with submodule build 56 - rm aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp 57 - # TestRandomURLMultiThreaded fails 58 - rm aws-cpp-sdk-core-tests/http/HttpClientTest.cpp 59 - '' 60 - + lib.optionalString aws-sdk-cpp.stdenv.hostPlatform.isi686 '' 61 - # EPSILON is exceeded 62 - rm aws-cpp-sdk-core-tests/aws/client/AdaptiveRetryStrategyTest.cpp 63 - ''; 64 - 65 - patches = (args.patches or [ ]) ++ [ ./patches/aws-sdk-cpp-TransferManager-ContentEncoding.patch ]; 66 - 67 - # only a stripped down version is build which takes a lot less resources to build 68 - requiredSystemFeatures = [ ]; 69 - }); 70 - 71 12 aws-sdk-cpp = 72 13 (regular.aws-sdk-cpp.override { 73 14 apis = [
-127
pkgs/tools/package-management/nix/patches/aws-sdk-cpp-TransferManager-ContentEncoding.patch
··· 1 - From 7d58e303159b2fb343af9a1ec4512238efa147c7 Mon Sep 17 00:00:00 2001 2 - From: Eelco Dolstra <edolstra@gmail.com> 3 - Date: Mon, 6 Aug 2018 17:15:04 +0200 4 - Subject: [PATCH] TransferManager: Allow setting a content-encoding for S3 uploads 5 - 6 - --- a/aws-cpp-sdk-transfer/include/aws/transfer/TransferHandle.h 7 - +++ b/aws-cpp-sdk-transfer/include/aws/transfer/TransferHandle.h 8 - @@ -297,6 +297,14 @@ namespace Aws 9 - * Content type of the object being transferred 10 - */ 11 - inline void SetContentType(const Aws::String& value) { std::lock_guard<std::mutex> locker(m_getterSetterLock); m_contentType = value; } 12 - + /** 13 - + * Content encoding of the object being transferred 14 - + */ 15 - + inline const Aws::String GetContentEncoding() const { std::lock_guard<std::mutex> locker(m_getterSetterLock); return m_contentEncoding; } 16 - + /** 17 - + * Content type of the object being transferred 18 - + */ 19 - + inline void SetContentEncoding(const Aws::String& value) { std::lock_guard<std::mutex> locker(m_getterSetterLock); m_contentEncoding = value; } 20 - /** 21 - * In case of an upload, this is the metadata that was placed on the object when it was uploaded. 22 - * In the case of a download, this is the object metadata from the GetObject operation. 23 - @@ -383,6 +391,7 @@ namespace Aws 24 - Aws::String m_key; 25 - Aws::String m_fileName; 26 - Aws::String m_contentType; 27 - + Aws::String m_contentEncoding; 28 - Aws::String m_versionId; 29 - Aws::Map<Aws::String, Aws::String> m_metadata; 30 - TransferStatus m_status; 31 - --- a/aws-cpp-sdk-transfer/include/aws/transfer/TransferManager.h 32 - +++ b/aws-cpp-sdk-transfer/include/aws/transfer/TransferManager.h 33 - @@ -154,7 +154,8 @@ namespace Aws 34 - const Aws::String& keyName, 35 - const Aws::String& contentType, 36 - const Aws::Map<Aws::String, Aws::String>& metadata, 37 - - const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr); 38 - + const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr, 39 - + const Aws::String& contentEncoding = ""); 40 - 41 - /** 42 - * Downloads the contents of bucketName/keyName in S3 to the file specified by writeToFile. This will perform a GetObject operation. 43 - @@ -246,7 +247,8 @@ namespace Aws 44 - const Aws::Map<Aws::String, 45 - Aws::String>& metadata, 46 - const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context, 47 - - const Aws::String& fileName = ""); 48 - + const Aws::String& fileName = "", 49 - + const Aws::String& contentEncoding = ""); 50 - 51 - /** 52 - * Submits the actual task to task schecduler 53 - @@ -262,7 +264,8 @@ namespace Aws 54 - const Aws::String& keyName, 55 - const Aws::String& contentType, 56 - const Aws::Map<Aws::String, Aws::String>& metadata, 57 - - const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context); 58 - + const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context, 59 - + const Aws::String& contentEncoding); 60 - 61 - /** 62 - * Uploads the contents of file, to bucketName/keyName in S3. contentType and metadata will be added to the object. If the object is larger than the configured bufferSize, 63 - --- a/aws-cpp-sdk-transfer/source/transfer/TransferManager.cpp 64 - +++ b/aws-cpp-sdk-transfer/source/transfer/TransferManager.cpp 65 - @@ -87,9 +87,10 @@ namespace Aws 66 - const Aws::String& bucketName, 67 - const Aws::String& keyName, const Aws::String& contentType, 68 - const Aws::Map<Aws::String, Aws::String>& metadata, 69 - - const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) 70 - + const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context, 71 - + const Aws::String& contentEncoding) 72 - { 73 - - return this->DoUploadFile(fileStream, bucketName, keyName, contentType, metadata, context); 74 - + return this->DoUploadFile(fileStream, bucketName, keyName, contentType, metadata, context, contentEncoding); 75 - } 76 - 77 - std::shared_ptr<TransferHandle> TransferManager::DownloadFile(const Aws::String& bucketName, 78 - @@ -286,6 +287,9 @@ namespace Aws 79 - createMultipartRequest.WithKey(handle->GetKey()); 80 - createMultipartRequest.WithMetadata(handle->GetMetadata()); 81 - 82 - + if (handle->GetContentEncoding() != "") 83 - + createMultipartRequest.WithContentEncoding(handle->GetContentEncoding()); 84 - + 85 - auto createMultipartResponse = m_transferConfig.s3Client->CreateMultipartUpload(createMultipartRequest); 86 - if (createMultipartResponse.IsSuccess()) 87 - { 88 - @@ -441,6 +445,9 @@ namespace Aws 89 - 90 - putObjectRequest.SetContentType(handle->GetContentType()); 91 - 92 - + if (handle->GetContentEncoding() != "") 93 - + putObjectRequest.SetContentEncoding(handle->GetContentEncoding()); 94 - + 95 - auto buffer = m_bufferManager.Acquire(); 96 - 97 - auto lengthToWrite = (std::min)(m_transferConfig.bufferSize, handle->GetBytesTotalSize()); 98 - @@ -1140,12 +1147,15 @@ namespace Aws 99 - const Aws::String& contentType, 100 - const Aws::Map<Aws::String, Aws::String>& metadata, 101 - const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context, 102 - - const Aws::String& fileName) 103 - + const Aws::String& fileName, 104 - + const Aws::String& contentEncoding) 105 - { 106 - auto handle = Aws::MakeShared<TransferHandle>(CLASS_TAG, bucketName, keyName, 0, fileName); 107 - handle->SetContentType(contentType); 108 - handle->SetMetadata(metadata); 109 - handle->SetContext(context); 110 - + if (contentEncoding != "") 111 - + handle->SetContentEncoding(contentEncoding); 112 - 113 - if (!fileStream->good()) 114 - { 115 - @@ -1213,9 +1223,10 @@ namespace Aws 116 - const Aws::String& keyName, 117 - const Aws::String& contentType, 118 - const Aws::Map<Aws::String, Aws::String>& metadata, 119 - - const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) 120 - + const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context, 121 - + const Aws::String& contentEncoding) 122 - { 123 - - auto handle = CreateUploadFileHandle(fileStream.get(), bucketName, keyName, contentType, metadata, context); 124 - + auto handle = CreateUploadFileHandle(fileStream.get(), bucketName, keyName, contentType, metadata, context, "", contentEncoding); 125 - return SubmitUpload(handle, fileStream); 126 - } 127 -