summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/etcd
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/etcd')
-rw-r--r--meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch33
-rw-r--r--meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-cmake-fix-when-cross-compiling.patch68
-rw-r--r--meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-include-stdint.h-for-int64_t-types.patch27
-rw-r--r--meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb (renamed from meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.3.bb)12
-rw-r--r--meta-oe/recipes-extended/etcd/etcd_3.5.7.bb20
5 files changed, 79 insertions, 81 deletions
diff --git a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch
new file mode 100644
index 0000000000..87000b663d
--- /dev/null
+++ b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-Replacing-GPR_ASSERT-with-c-assert.patch
@@ -0,0 +1,33 @@
1From aeb34f58782fb6d06aea4f5cbeccb23a0224466e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 4 Sep 2024 14:54:42 -0700
4Subject: [PATCH] Replacing GPR_ASSERT with c assert
5
6Latest GRPC >= 2.66 has dropped GRPC_ASSERT macro [1]
7
8[1] https://github.com/grpc/grpc/commit/0e23c2259da967a037e839e80cafd62bc6f9f68e
9
10Upstream-Status: Submitted [https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/pull/281]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/v3/Action.cpp | 9 +++++++++
14 1 file changed, 9 insertions(+)
15
16--- a/src/v3/Action.cpp
17+++ b/src/v3/Action.cpp
18@@ -2,6 +2,15 @@
19 #include <grpc/support/log.h>
20 #include <grpcpp/support/status.h>
21 #include "etcd/v3/action_constants.hpp"
22+#include <cstdlib>
23+
24+#ifndef GPR_ASSERT
25+#define GPR_ASSERT(x) \
26+ if (!(x)) { \
27+ fprintf(stderr, "%s:%d assert failed\n", __FILE__, __LINE__); \
28+ abort(); \
29+}
30+#endif
31
32 etcdv3::Action::Action(etcdv3::ActionParameters const& params) {
33 parameters = params;
diff --git a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-cmake-fix-when-cross-compiling.patch b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-cmake-fix-when-cross-compiling.patch
deleted file mode 100644
index ce12d4270a..0000000000
--- a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-cmake-fix-when-cross-compiling.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1From cb79329010d73e36ce64830914005f1c17f8f53c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= <peron.clem@gmail.com>
3Date: Sat, 23 Sep 2023 11:32:18 +0200
4Subject: [PATCH] cmake: fix when cross compiling
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9In order to generate protobuf files CMake need to use the protoc
10and grpc-cpp-plugin compiled for the host architecture.
11
12Unfortunately, the protoc and grpc-cpp-plugin in the gRPC CMake
13configuration file are the one for the target architecture.
14
15Fix this by properly finding the correct executable when
16CMake is cross compiling.
17
18Signed-off-by: Clément Péron <peron.clem@gmail.com>
19---
20Upstream-Status: Pending
21
22 CMakeLists.txt | 28 ++++++++++++++++++++++++++--
23 1 file changed, 26 insertions(+), 2 deletions(-)
24
25diff --git a/CMakeLists.txt b/CMakeLists.txt
26index 5aa1310..80ebad2 100644
27--- a/CMakeLists.txt
28+++ b/CMakeLists.txt
29@@ -120,10 +120,34 @@ if(Protobuf_PROTOC_EXECUTABLE)
30 endif()
31 endif()
32
33+# When cross compiling we look for the native protoc compiler
34+# overwrite protobuf::protoc with the proper protoc
35+if(CMAKE_CROSSCOMPILING)
36+ find_program(Protobuf_PROTOC_EXECUTABLE REQUIRED NAMES protoc)
37+ if(NOT TARGET protobuf::protoc)
38+ add_executable(protobuf::protoc IMPORTED)
39+ endif()
40+ set_target_properties(protobuf::protoc PROPERTIES
41+ IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}")
42+endif()
43+
44 find_package(gRPC QUIET)
45-if(gRPC_FOUND AND TARGET gRPC::grpc AND TARGET gRPC::grpc_cpp_plugin)
46+if(gRPC_FOUND AND TARGET gRPC::grpc)
47+ # When cross compiling we look for the native grpc_cpp_plugin
48+ if(CMAKE_CROSSCOMPILING)
49+ find_program(GRPC_CPP_PLUGIN REQUIRED NAMES grpc_cpp_plugin)
50+ if(NOT TARGET gRPC::grpc_cpp_plugin)
51+ add_executable(gRPC::grpc_cpp_plugin IMPORTED)
52+ endif()
53+ set_target_properties(gRPC::grpc_cpp_plugin PROPERTIES
54+ IMPORTED_LOCATION "${GRPC_CPP_PLUGIN}")
55+ elseif(TARGET gRPC::grpc_cpp_plugin)
56+ get_target_property(GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION)
57+ else()
58+ message(FATAL_ERROR "Found gRPC but no gRPC CPP plugin defined")
59+ endif()
60+
61 set(GRPC_LIBRARIES gRPC::gpr gRPC::grpc gRPC::grpc++)
62- get_target_property(GRPC_CPP_PLUGIN gRPC::grpc_cpp_plugin LOCATION)
63 get_target_property(GRPC_INCLUDE_DIR gRPC::grpc INTERFACE_INCLUDE_DIRECTORIES)
64 else()
65 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindGRPC.cmake)
66--
672.39.3 (Apple Git-145)
68
diff --git a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-include-stdint.h-for-int64_t-types.patch b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-include-stdint.h-for-int64_t-types.patch
new file mode 100644
index 0000000000..373e146b98
--- /dev/null
+++ b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3/0001-include-stdint.h-for-int64_t-types.patch
@@ -0,0 +1,27 @@
1From 44f4254fe96c43437400f94a8a2800175ddf3279 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 20 May 2024 21:00:48 -0700
4Subject: [PATCH] include stdint.h for int64_t types
5
6This is exposed when compiling for musl platforms where this
7header is not included indirectly.
8
9Upstream-Status: Submitted [https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/pull/270]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/Value.cpp | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/src/Value.cpp b/src/Value.cpp
16index cbda697..d6f2c9c 100644
17--- a/src/Value.cpp
18+++ b/src/Value.cpp
19@@ -1,4 +1,5 @@
20 #include <iomanip>
21+#include <cstdint>
22
23 #include "etcd/Value.hpp"
24 #include "etcd/v3/KeyValue.hpp"
25--
262.45.1
27
diff --git a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.3.bb b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb
index 401d53c79c..c3a5a02a3f 100644
--- a/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.3.bb
+++ b/meta-oe/recipes-extended/etcd/etcd-cpp-apiv3_0.15.4.bb
@@ -6,18 +6,24 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=eae7da6a2cd1788a5cf8a9f838cf6450"
6 6
7SRC_URI = " \ 7SRC_URI = " \
8 git://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3.git;branch=master;protocol=https \ 8 git://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3.git;branch=master;protocol=https \
9 file://0001-cmake-fix-when-cross-compiling.patch \ 9 file://0001-include-stdint.h-for-int64_t-types.patch \
10 file://0001-Replacing-GPR_ASSERT-with-c-assert.patch \
10" 11"
11 12
12SRCREV = "e31ac4d4caa55fa662e207150ba40f8151b7ad96" 13SRCREV = "ba6216385fc332b23d95683966824c2b86c2474e"
13 14
14inherit cmake 15inherit cmake
15 16
16DEPENDS += "grpc protobuf cpprest grpc-native protobuf-native" 17DEPENDS += "grpc protobuf cpprest grpc-native protobuf-native"
17 18
18S = "${WORKDIR}/git"
19 19
20EXTRA_OECONF += "-DCPPREST_EXCLUDE_WEBSOCKETS=ON" 20EXTRA_OECONF += "-DCPPREST_EXCLUDE_WEBSOCKETS=ON"
21 21
22do_install:append() {
23 sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${libdir}/cmake/etcd-cpp-api/etcd-targets.cmake
24}
25
22SOLIBS = ".so" 26SOLIBS = ".so"
23FILES_SOLIBSDEV = "" 27FILES_SOLIBSDEV = ""
28
29SKIP_RECIPE[etcd-cpp-apiv3] ?= "needs ccpprest which needs websocket does work with boost >= 1.87"
diff --git a/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
index 0794158a52..dd30543a41 100644
--- a/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
+++ b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
@@ -2,12 +2,12 @@ DESCRIPTION = "etcd is a distributed key-value store for distributed systems"
2HOMEPAGE = "https://etcd.io/" 2HOMEPAGE = "https://etcd.io/"
3 3
4LICENSE = "Apache-2.0" 4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${S}/${GO_INSTALL}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 5LIC_FILES_CHKSUM = "file://${GO_INSTALL}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
6 6
7SRC_URI = " \ 7SRC_URI = " \
8 git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https \ 8 git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \
9 file://0001-xxhash-bump-to-v2.1.2.patch;patchdir=src/${GO_IMPORT} \ 9 file://0001-xxhash-bump-to-v2.1.2.patch;patchdir=${GO_INSTALL} \
10 file://0001-test_lib.sh-remove-gobin-requirement-during-build.patch;patchdir=src/${GO_IMPORT} \ 10 file://0001-test_lib.sh-remove-gobin-requirement-during-build.patch;patchdir=${GO_INSTALL} \
11 file://etcd.service \ 11 file://etcd.service \
12 file://etcd-existing.conf \ 12 file://etcd-existing.conf \
13 file://etcd-new.service \ 13 file://etcd-new.service \
@@ -15,7 +15,6 @@ SRC_URI = " \
15" 15"
16 16
17SRCREV = "215b53cf3b48ee761f4c40908b3874b2e5e95e9f" 17SRCREV = "215b53cf3b48ee761f4c40908b3874b2e5e95e9f"
18UPSTREAM_CHECK_COMMITS = "1"
19 18
20GO_IMPORT = "go.etcd.io/etcd/v3" 19GO_IMPORT = "go.etcd.io/etcd/v3"
21GO_INSTALL = "src/${GO_IMPORT}/" 20GO_INSTALL = "src/${GO_IMPORT}/"
@@ -24,7 +23,7 @@ RDEPENDS:${PN}-dev = " \
24 bash \ 23 bash \
25" 24"
26 25
27export GO111MODULE="on" 26export GO111MODULE = "on"
28 27
29inherit go systemd pkgconfig features_check 28inherit go systemd pkgconfig features_check
30 29
@@ -62,12 +61,13 @@ do_install:append() {
62 install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcd ${D}${bindir} 61 install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcd ${D}${bindir}
63 install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcdctl ${D}${bindir} 62 install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcdctl ${D}${bindir}
64 install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcdutl ${D}${bindir} 63 install -m 0755 ${D}${libdir}/go/src/go.etcd.io/etcd/v3/bin/etcdutl ${D}${bindir}
65 install -m 0644 ${WORKDIR}/etcd-existing.conf -D -t ${D}${sysconfdir}/etcd.d 64 install -m 0644 ${UNPACKDIR}/etcd-existing.conf -D -t ${D}${sysconfdir}/etcd.d
66 install -d ${D}${systemd_system_unitdir} 65 install -d ${D}${systemd_system_unitdir}
67 install -m 0644 ${WORKDIR}/etcd.service ${D}${systemd_system_unitdir}/ 66 install -m 0644 ${UNPACKDIR}/etcd.service ${D}${systemd_system_unitdir}/
68 install -m 0644 ${WORKDIR}/etcd-new.service ${D}${systemd_system_unitdir}/ 67 install -m 0644 ${UNPACKDIR}/etcd-new.service ${D}${systemd_system_unitdir}/
69 install -m 0644 ${WORKDIR}/etcd-new.path ${D}${systemd_system_unitdir}/ 68 install -m 0644 ${UNPACKDIR}/etcd-new.path ${D}${systemd_system_unitdir}/
70} 69}
71 70
72FILES:${PN}:append = " ${sysconfdir}/etcd.d/etcd-existing.conf" 71FILES:${PN}:append = " ${sysconfdir}/etcd.d/etcd-existing.conf"
73 72
73SKIP_RECIPE[etcd] ?= "QA Issue: task do_compile has network enabled"