From d068be244b603140b512e1e9ab27488b3fb05ebb Mon Sep 17 00:00:00 2001 From: Hannah Shi Date: Sat, 20 Jan 2024 16:11:36 -0800 Subject: [PATCH] add privacy manifests to boringssl grpc --- src/objective-c/BoringSSL-GRPC.podspec | 12 ++++++++++- .../BoringSSL-GRPC.podspec.template | 20 +++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/objective-c/BoringSSL-GRPC.podspec b/src/objective-c/BoringSSL-GRPC.podspec index 5d4f8578fcf..610c3367a59 100644 --- a/src/objective-c/BoringSSL-GRPC.podspec +++ b/src/objective-c/BoringSSL-GRPC.podspec @@ -124,7 +124,7 @@ Pod::Spec.new do |s| ss.header_mappings_dir = 'src' ss.resource_bundles = { - s.module_name => 'src/objective-c/PrivacyInfo.xcprivacy' + s.module_name => 'src/PrivacyInfo.xcprivacy' } ss.source_files = 'src/ssl/*.{h,c,cc}', @@ -691,6 +691,16 @@ Pod::Spec.new do |s| zwQA EOF + # PrivacyInfo.xcprivacy is not part of BoringSSL repo, inject it during pod installation + base64 --decode $opts < src/PrivacyInfo.xcprivacy + H4sICAAAAAAC/1ByaXZhY3lJbmZvLnhjcHJpdmFjeQC1kl9PwjAUxZ/Hp6h9Z1di/JsxAhskJAQXGQ8+ + Nt0VG7a1aRuw395OHUhE8UHflrNzzj2/pNHgpSrJBrURsu7TXnhOCdZcFqJe9ekyn3Rv6CDuRGfpfZI/ + ZmOiSmEsyZaj2TQhtAswVKpEgDRPSTabLnLiOwDGc0ros7XqDmC73YascYVcVo3RQKalQm3dzJd1fSAs + bEH9mff2gzleLQS3cSeI1uji+SLTYsO4yzXja78ygkb2f59YaRC++BJZlsgtFimzLHcKzS7BtGYOvm1O + ZcVEfdI+5ByNwWKYTY/U+4+gBQh+TrZBbzNW+wFHnQmzuJLaTUSJuajQWFapCD4SJ488IDNyDxV8mrm/ + m1z1rsPeYSnscaDl+RewhTMWq5GUtsH7Y7KLy8ntL8h2WqtE8PY0484rAb5xoDEDAAA= + EOF + # We are renaming openssl to openssl_grpc so that there is no conflict with openssl if it exists find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include 'src/objective-c/PrivacyInfo.xcprivacy' + s.module_name => 'src/PrivacyInfo.xcprivacy' } ss.source_files = 'src/ssl/*.{h,c,cc}', @@ -205,7 +206,14 @@ *) opts="--ignore-garbage" ;; esac base64 --decode $opts < src/include/openssl/boringssl_prefix_symbols.h - % for line in compress_boringssl_prefix_header(): + % for line in compress_and_encode_file('src/boringssl/boringssl_prefix_symbols.h'): + ${line.decode('utf-8')} + % endfor + EOF + + # PrivacyInfo.xcprivacy is not part of BoringSSL repo, inject it during pod installation + base64 --decode $opts < src/PrivacyInfo.xcprivacy + % for line in compress_and_encode_file('src/objective-c/PrivacyInfo.xcprivacy'): ${line.decode('utf-8')} % endfor EOF