Skip to contentSkip to conversation

grpc: Upgrade to 1.38.0

PATCH New Khem Raj 1 participant 2 messages May 29, 2021 RISC-V

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 grpc: Upgrade to 1.38.0

Fix build with musl by checking for iovec redefinition

---
 .../grpc/0001-gsec-Fix-build-on-musl.patch    | 37 +++++++++++++++++++
 .../grpc/{grpc_1.37.1.bb => grpc_1.38.0.bb}   |  4 +-
 2 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-gsec-Fix-build-on-musl.patch
 rename meta-oe/recipes-devtools/grpc/{grpc_1.37.1.bb => grpc_1.38.0.bb} (97%)
meta-oe/recipes-devtools/grpc/grpc/0001-gsec-Fix-build-on-musl.patch new file +37 -0
new file mode 100644
index 0000000000..faa18bb7f7
@@ -0,0 +1,37 @@
+From 9af185be6068d279736c0d2b2162a4e768444d3d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 29 May 2021 00:41:32 -0700
+Subject: [PATCH] gsec: Fix build on musl
+
+musl defines iovec struct in alltypes.h file which is included by many
+system include files, therefore check for appropriate define from musl
+before defining it again
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/core/tsi/alts/crypt/gsec.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/core/tsi/alts/crypt/gsec.h b/src/core/tsi/alts/crypt/gsec.h
+index 4d65caa944..3c367b2895 100644
+--- a/src/core/tsi/alts/crypt/gsec.h
++++ b/src/core/tsi/alts/crypt/gsec.h
+@@ -26,11 +26,14 @@
+ #include <stdlib.h>
+ 
+ #include <grpc/grpc.h>
++#include <sys/uio.h>
+ 
++#if !defined(__DEFINED_struct_iovec)
+ struct iovec {
+   void* iov_base;
+   size_t iov_len;
+ };
++#endif
+ 
+ /**
+  * A gsec interface for AEAD encryption schemes. The API is thread-compatible.
+-- 
+2.31.1
+
meta-oe/recipes-devtools/grpc/grpc_1.38.0.bb renamed from meta-oe/recipes-devtools/grpc/grpc_1.37.1.bb +2 -2
similarity index 97%
rename from meta-oe/recipes-devtools/grpc/grpc_1.37.1.bb
rename to meta-oe/recipes-devtools/grpc/grpc_1.38.0.bb
index a7aabd13f0..2095d81d4a 100644
@@ -16,8 +16,8 @@ RDEPENDS_${PN}-compiler = "${PN}"
 RDEPENDS_${PN}-dev += "${PN}-compiler"
 
 S = "${WORKDIR}/git"
-SRCREV_grpc = "8664c8334c05d322fbbdfb9e3b24601a23e9363c"
-BRANCH = "v1.37.x"
+SRCREV_grpc = "54dc182082db941aa67c7c3f93ad858c99a16d7d"
+BRANCH = "v1.38.x"
 SRC_URI = "git://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \
            "
 # Fixes build with older compilers 4.8 especially on ubuntu 14.04
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 2/2 python3-grpcio: Update to 1.38.0

Drop riscv patch as its applied upstream
Refresh patches

---
 .../python3-grpcio/mips_bigendian.patch       |  2 +-
 .../python3-grpcio/riscv64_support.patch      | 21 -------------------
 ...cio_1.37.0.bb => python3-grpcio_1.38.0.bb} |  4 +---
 3 files changed, 2 insertions(+), 25 deletions(-)
 delete mode 100644 meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch
 rename meta-python/recipes-devtools/python/{python3-grpcio_1.37.0.bb => python3-grpcio_1.38.0.bb} (89%)
meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch +1 -1
index 343f25a46e..775afa415c 100644
@@ -12,4 +12,4 @@
 +#elif defined(__mips__) && defined(__LP64__)
  #define OPENSSL_64_BIT
  #define OPENSSL_MIPS64
- #elif defined(__riscv)
+ #elif defined(__riscv) && __SIZEOF_POINTER__ == 8
meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch deleted +0 -21
deleted file mode 100644
index 350c67deaf..0000000000
@@ -1,21 +0,0 @@
-Add RISC-V 64bit support
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
---- a/third_party/boringssl-with-bazel/src/include/openssl/base.h
-+++ b/third_party/boringssl-with-bazel/src/include/openssl/base.h
-@@ -108,6 +108,14 @@ extern "C" {
- #elif defined(__MIPSEL__) && defined(__LP64__)
- #define OPENSSL_64_BIT
- #define OPENSSL_MIPS64
-+#elif defined(__riscv)
-+# if (__riscv_xlen == 64)
-+#  define OPENSSL_64_BIT
-+#  define OPENSSL_RISCV64
-+# elif(__riscv_xlen == 32)
-+#  define OPENSSL_32_BIT
-+#  define OPENSSL_RISCV32
-+# endif
- #elif defined(__pnacl__)
- #define OPENSSL_32_BIT
- #define OPENSSL_PNACL
meta-python/recipes-devtools/python/python3-grpcio_1.38.0.bb renamed from meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb +1 -3
similarity index 89%
rename from meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb
rename to meta-python/recipes-devtools/python/python3-grpcio_1.38.0.bb
index 47fb71120d..d9e00422bc 100644
@@ -8,12 +8,11 @@ DEPENDS += "${PYTHON_PN}-protobuf"
 
 SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch"
 SRC_URI_append_class-target = " file://ppc-boringssl-support.patch \
-                                file://riscv64_support.patch \
                                 file://boring_ssl.patch \
                                 file://mips_bigendian.patch \
                                 file://0001-absl-always-use-asm-sgidefs.h.patch \
 "
-SRC_URI[sha256sum] = "b3ce16aa91569760fdabd77ca901b2288152eb16941d28edd9a3a75a0c4a8a85"
+SRC_URI[sha256sum] = "abbf9c8c3df4d5233d5888c6cfa85c1bb68a6923749bd4dd1abc6e1e93986f17"
 
 RDEPENDS_${PN} = "${PYTHON_PN}-protobuf \
                   ${PYTHON_PN}-setuptools \
@@ -46,4 +45,3 @@ CCACHE_DISABLE = "1"
 
 # needs vdso support
 COMPATIBLE_HOST_libc-musl_powerpc64le = "null"
-
Signature · 1 line
2.31.1