Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We currently see problems and gitlab suggested to use grpc 1.30.2: https://gitlab.com/gitlab-org/gitlab/-/issues/345693#note_734676746 Newer version of grpc and google-protobuf have known bugs. The open bug that license files cannot not be handled is tracked here: https://gitlab.com/gitlab-org/gitlab/-/issues/345693 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259848
- Loading branch information
Showing
19 changed files
with
475 additions
and
806 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Created by: vanilla@ | ||
|
||
PORTNAME= grpc | ||
PORTVERSION= 1.30.2 | ||
DISTVERSIONPREFIX= v | ||
CATEGORIES= devel | ||
PKGNAMESUFFIX= 130 | ||
|
||
MAINTAINER= mfechner@FreeBSD.org | ||
COMMENT= HTTP/2-based RPC framework | ||
|
||
LICENSE= BSD3CLAUSE | ||
LICENSE_FILE= ${WRKSRC}/LICENSE | ||
|
||
LIB_DEPENDS= libabsl_base.so:devel/abseil \ | ||
libbenchmark.so:devel/benchmark \ | ||
libcares.so:dns/c-ares \ | ||
libgflags.so:devel/gflags \ | ||
libprotobuf.so:devel/protobuf \ | ||
libre2.so:devel/re2 | ||
|
||
USES= cmake compiler:c++17-lang cpe localbase:ldflags pkgconfig ssl | ||
|
||
USE_GITHUB= yes | ||
|
||
CMAKE_ARGS= -DCMAKE_CXX_STANDARD=17 \ | ||
-DgRPC_ABSL_PROVIDER=package \ | ||
-DgRPC_BENCHMARK_PROVIDER=package \ | ||
-DgRPC_CARES_PROVIDER=package \ | ||
-DgRPC_GFLAGS_PROVIDER=package \ | ||
-DgRPC_PROTOBUF_PROVIDER=package \ | ||
-DgRPC_RE2_PROVIDER=package \ | ||
-DgRPC_SSL_PROVIDER=package \ | ||
-DgRPC_ZLIB_PROVIDER=package | ||
CMAKE_ON= BUILD_SHARED_LIBS | ||
USE_LDCONFIG= yes | ||
STRIP= | ||
|
||
PLIST_SUB= PORTVERSION=${PORTVERSION} | ||
|
||
.include <bsd.port.pre.mk> | ||
|
||
# Remove openssl from grpc.pc because we do not ship openssl.pc in base system | ||
.if ${SSL_DEFAULT} == base | ||
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-CMakeLists.txt | ||
.endif | ||
|
||
post-patch: | ||
# Clean up bundled libraries | ||
@${RM} -r ${WRKSRC}/third_party/abseil-cpp/ | ||
@${RM} -r ${WRKSRC}/third_party/benchmark/ | ||
@${RM} -r ${WRKSRC}/third_party/boringssl-with-bazel/ | ||
@${RM} -r ${WRKSRC}/third_party/cares/ | ||
@${RM} -r ${WRKSRC}/third_party/protobuf/ | ||
@${RM} -r ${WRKSRC}/third_party/re2/ | ||
@${RM} -r ${WRKSRC}/third_party/zlib/ | ||
|
||
.include <bsd.port.post.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1637134735 | ||
SHA256 (grpc-grpc-v1.30.2_GH0.tar.gz) = ba74b97a2f1b4e22ec5fb69d639d849d2069fb58ea7d6579a31f800af6fe3b6c | ||
SIZE (grpc-grpc-v1.30.2_GH0.tar.gz) = 6978015 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- CMakeLists.txt.orig 2021-09-25 02:33:41 UTC | ||
+++ CMakeLists.txt | ||
@@ -17664,7 +17664,7 @@ generate_pkgconfig( | ||
"gRPC" | ||
"high performance general RPC framework" | ||
"${gRPC_CORE_VERSION}" | ||
- "gpr openssl absl_base absl_bind_front absl_cord absl_core_headers absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_variant" | ||
+ "gpr absl_base absl_bind_front absl_cord absl_core_headers absl_flat_hash_map absl_inlined_vector absl_memory absl_optional absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_variant" | ||
"-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz" | ||
"" | ||
"grpc.pc") |
11 changes: 11 additions & 0 deletions
11
devel/grpc130/files/patch-src_core_lib_security_credentials_jwt_jwt__verifier.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- src/core/lib/security/credentials/jwt/jwt_verifier.cc.orig 2020-12-01 19:24:28 UTC | ||
+++ src/core/lib/security/credentials/jwt/jwt_verifier.cc | ||
@@ -472,7 +472,7 @@ static BIGNUM* bignum_from_base64(const char* b64) { | ||
return result; | ||
} | ||
|
||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L | ||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) | ||
|
||
// Provide compatibility across OpenSSL 1.02 and 1.1. | ||
static int RSA_set0_key(RSA* r, BIGNUM* n, BIGNUM* e, BIGNUM* d) { |
11 changes: 11 additions & 0 deletions
11
devel/grpc130/files/patch-src_core_tsi_alts_crypt_aes__gcm.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- src/core/tsi/alts/crypt/aes_gcm.cc.orig 2020-12-01 19:24:28 UTC | ||
+++ src/core/tsi/alts/crypt/aes_gcm.cc | ||
@@ -185,7 +185,7 @@ static grpc_status_code aes_gcm_derive_aead_key(uint8_ | ||
const uint8_t* kdf_counter) { | ||
unsigned char buf[EVP_MAX_MD_SIZE]; | ||
unsigned char ctr = 1; | ||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L | ||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) | ||
HMAC_CTX hmac; | ||
HMAC_CTX_init(&hmac); | ||
if (!HMAC_Init_ex(&hmac, kdf_key, kKdfKeyLen, EVP_sha256(), nullptr) || |
26 changes: 26 additions & 0 deletions
26
devel/grpc130/files/patch-src_core_tsi_ssl__transport__security.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- src/core/tsi/ssl_transport_security.cc.orig 2020-12-01 19:24:28 UTC | ||
+++ src/core/tsi/ssl_transport_security.cc | ||
@@ -70,11 +70,10 @@ extern "C" { | ||
#define TSI_SSL_MAX_PROTECTED_FRAME_SIZE_LOWER_BOUND 1024 | ||
#define TSI_SSL_HANDSHAKER_OUTGOING_BUFFER_INITIAL_SIZE 1024 | ||
|
||
-/* Putting a macro like this and littering the source file with #if is really | ||
- bad practice. | ||
- TODO(jboeuf): refactor all the #if / #endif in a separate module. */ | ||
-#ifndef TSI_OPENSSL_ALPN_SUPPORT | ||
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L | ||
#define TSI_OPENSSL_ALPN_SUPPORT 1 | ||
+#else | ||
+#define TSI_OPENSSL_ALPN_SUPPORT 0 | ||
#endif | ||
|
||
/* TODO(jboeuf): I have not found a way to get this number dynamically from the | ||
@@ -1930,7 +1929,7 @@ tsi_result tsi_create_ssl_client_handshaker_factory_wi | ||
options->cipher_suites); | ||
if (result != TSI_OK) break; | ||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 | ||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) | ||
// X509_STORE_up_ref is only available since OpenSSL 1.1. | ||
if (options->root_store != nullptr) { | ||
X509_STORE_up_ref(options->root_store->store); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
gRPC is a modern, open source, high-performance remote procedure call (RPC) | ||
framework that can run anywhere, enables client and server applications to | ||
communicate transparently, and simplifies the building of connected systems. | ||
|
||
WWW: https://grpc.io/ | ||
WWW: https://github.com/grpc/grpc |
Oops, something went wrong.