[arch-commits] Commit in aws-sdk-cpp/trunk (PKGBUILD fix_null.patch)
Anatol Pomozov
anatolik at gemini.archlinux.org
Tue Oct 5 02:42:07 UTC 2021
Date: Tuesday, October 5, 2021 @ 02:42:07
Author: anatolik
Revision: 1027685
upgpkg: aws-sdk-cpp 1.8.187-1
This library used to be a sparse set of aws-sdk modules needed by osquery.
osquery has switched to vendorized aws-sdk version and compiles libraries itself.
Turn this (aws-sdk-cpp) package into a generic library that contains all modules.
I have not switched to aws-sdk-cpp 1.9.xx yet as 1.9 starts pulling dependencies as git submodules.
It needs to be checked whether it is possible to compile aws-sdk by using system packages instead.
Added:
aws-sdk-cpp/trunk/fix_null.patch
Modified:
aws-sdk-cpp/trunk/PKGBUILD
----------------+
PKGBUILD | 28 +++++++++++++++-------------
fix_null.patch | 26 ++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 13 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-10-05 00:53:22 UTC (rev 1027684)
+++ PKGBUILD 2021-10-05 02:42:07 UTC (rev 1027685)
@@ -1,7 +1,7 @@
# Maintainer: Anatol Pomozov
pkgname=aws-sdk-cpp
-pkgver=1.8.149
+pkgver=1.8.187
pkgrel=1
pkgdesc='AWS SDK for C++'
arch=(x86_64)
@@ -8,27 +8,29 @@
url='https://github.com/aws/aws-sdk-cpp'
license=(Apache)
depends=(openssl curl zlib util-linux-libs aws-c-common aws-c-event-stream libpulse)
-makedepends=(cmake)
-source=(aws-sdk-cpp-$pkgver.zip::https://github.com/aws/aws-sdk-cpp/archive/$pkgver.zip)
-sha256sums=('da9bee0d5cddce39876e4cddcdb8e027114e92fdc2d05131d1918189cf1efaa2')
+makedepends=(cmake ninja)
+source=(aws-sdk-cpp-$pkgver.zip::https://github.com/aws/aws-sdk-cpp/archive/$pkgver.zip
+ fix_null.patch) # https://github.com/aws/aws-sdk-cpp/pull/1506
+sha256sums=('7dfe63338631acfbfe31981924029bc359ba83fda2003a2af856facfc1b8242e'
+ '2260270b5f05c79232b106ad4c73856c05db1f5866174934e0f03e56668868c3')
-# AWS C++ SDK is a huge project. Install size of the whole project is ~500MiB. To reduce it
-# we build only a small subset of components used by other packages. Add more components to
-# this list if you need it.
-_components="core;ec2;kinesis;firehose;sts;s3"
-# TOTHINK: it would be interesting to explore an idea of breaking sdk into set of small
-# per-component packages "aws-sdk-cpp-ec2, aws-sdk-cpp-kinesis, ...".
+prepare() {
+ cd aws-sdk-cpp-$pkgver
+ patch -p1 < ../fix_null.patch
+}
+
build() {
cd aws-sdk-cpp-$pkgver
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCUSTOM_MEMORY_MANAGEMENT=OFF -DENABLE_TESTING=OFF -DBUILD_DEPS=OFF -DBUILD_ONLY="$_components" -S . -B build
- cmake --build build
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCUSTOM_MEMORY_MANAGEMENT=OFF -DENABLE_TESTING=OFF -DBUILD_DEPS=OFF \
+ -S . -B build -G Ninja
+ ninja -C build -j 2 # the build is so heavy that it gets OOM killed even at powerful machines
}
package() {
cd aws-sdk-cpp-$pkgver
- cmake --build build --target install -- DESTDIR="$pkgdir"
+ DESTDIR="$pkgdir" ninja -C build install
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
Added: fix_null.patch
===================================================================
--- fix_null.patch (rev 0)
+++ fix_null.patch 2021-10-05 02:42:07 UTC (rev 1027685)
@@ -0,0 +1,26 @@
+diff --git a/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp b/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp
+index f70a6c88f6..e09a4e0ee6 100644
+--- a/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp
++++ b/aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp
+@@ -72,9 +72,7 @@ namespace Aws
+ assert(handler);
+ if (!handler)
+ {
+- AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but decoder encountered internal errors before."
+- "ErrorCode: " << EventStreamErrorsMapper::GetNameForError(handler->GetInternalError()) << ", "
+- "ErrorMessage: " << handler->GetEventPayloadAsString());
++ AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but handler is null.");
+ return;
+ }
+ handler->WriteMessageEventPayload(static_cast<unsigned char*>(payload->buffer), payload->len);
+@@ -129,9 +127,7 @@ namespace Aws
+ assert(handler);
+ if (!handler)
+ {
+- AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but decoder encountered internal errors before."
+- "ErrorCode: " << EventStreamErrorsMapper::GetNameForError(handler->GetInternalError()) << ", "
+- "ErrorMessage: " << handler->GetEventPayloadAsString());
++ AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but handler is null.");
+ return;
+ }
+
More information about the arch-commits
mailing list