From f3ab670621389a5892d47e39c8dda6869feeb9d2 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 29 Feb 2024 17:35:39 -0500 Subject: [PATCH 1/3] [grpc] Update grpc to fix firebase-ios-sdk/#12441 --- Package.swift | 57 +++++++++++-------- grpc-Wrapper/Resources/PrivacyInfo.xcprivacy | 31 ++++++++++ .../dummy.m => grpc-Wrapper/empty.m | 4 +- .../dummy.h => grpc-Wrapper/include/empty.h | 4 +- .../Resources/PrivacyInfo.xcprivacy | 31 ++++++++++ .../dummy.m => grpcpp-Wrapper/empty.m | 4 +- .../dummy.h => grpcpp-Wrapper/include/empty.h | 4 +- .../Resources/PrivacyInfo.xcprivacy | 31 ++++++++++ openssl-grpc-Wrapper/empty.m | 15 +++++ openssl-grpc-Wrapper/include/empty.h | 15 +++++ 10 files changed, 163 insertions(+), 33 deletions(-) create mode 100644 grpc-Wrapper/Resources/PrivacyInfo.xcprivacy rename SwiftPM-PlatformExclude/gRPC-CXX-Target/dummy.m => grpc-Wrapper/empty.m (89%) rename SwiftPM-PlatformExclude/gRPC-CXX-Target/include/dummy.h => grpc-Wrapper/include/empty.h (89%) create mode 100644 grpcpp-Wrapper/Resources/PrivacyInfo.xcprivacy rename gRPC-CXX-Wrapper/dummy.m => grpcpp-Wrapper/empty.m (89%) rename gRPC-CXX-Wrapper/include/dummy.h => grpcpp-Wrapper/include/empty.h (89%) create mode 100644 openssl-grpc-Wrapper/Resources/PrivacyInfo.xcprivacy create mode 100644 openssl-grpc-Wrapper/empty.m create mode 100644 openssl-grpc-Wrapper/include/empty.h diff --git a/Package.swift b/Package.swift index a709ecb..cd19d80 100644 --- a/Package.swift +++ b/Package.swift @@ -21,51 +21,58 @@ let package = Package( products: [ .library( name: "gRPC-Core", - targets: ["gRPC-Core"] + targets: ["grpc-Wrapper"] ), .library( name: "gRPC-C++", - targets: ["gRPC-CXX-Target"] + targets: ["grpcpp-Wrapper"] ), ], dependencies: [ - .package( - url: "https://github.com/google/abseil-cpp-binary.git", - "1.2022062300.0" ..< "1.2022062400.0" - ) +// .package( +// url: "https://github.com/google/abseil-cpp-binary.git", +// "1.2022062300.0" ..< "1.2022062400.0" +// ) + .package(path: "/Users/nickcooke/Developer/abseil-cpp-binary") ], targets: [ .target( - name: "gRPC-CXX-Target", - dependencies: [ - .target(name: "gRPC-CXX-Wrapper") - ], - path: "SwiftPM-PlatformExclude/gRPC-CXX-Target" + name: "grpc-Wrapper", + dependencies: ["grpc"], + path: "grpc-Wrapper", + resources: [.process("Resources/PrivacyInfo.xcprivacy")] ), .target( - name: "gRPC-CXX-Wrapper", + name: "openssl-grpc-Wrapper", + dependencies: ["openssl_grpc"], + path: "openssl-grpc-Wrapper", + resources: [.process("Resources/PrivacyInfo.xcprivacy")] + ), + .target( + name: "grpcpp-Wrapper", dependencies: [ - .target(name: "gRPC-Core"), - .target(name: "gRPC-C++"), - .target(name: "BoringSSL-GRPC"), + "grpcpp", + "grpc-Wrapper", + "openssl-grpc-Wrapper", .product(name: "abseil", package: "abseil-cpp-binary"), ], - path: "gRPC-CXX-Wrapper" + path: "grpcpp-Wrapper", + resources: [.process("Resources/PrivacyInfo.xcprivacy")] ), .binaryTarget( - name: "gRPC-Core", - url: "https://dl.google.com/firebase/ios/bin/grpc/1.49.1/gRPC-Core.zip", - checksum: "ac70d546ec00500ed62e353623f33f469738826c33c1711127c1ced7ba0a003e" + name: "grpc", + url: "https://dl.google.com/firebase/ios/bin/grpc/1.49.2/grpc.zip", + checksum: "99e4a17fd34677622ef2cd99bc742eb079b80219d476544619f6f1583845855e" ), .binaryTarget( - name: "gRPC-C++", - url: "https://dl.google.com/firebase/ios/bin/grpc/1.49.1/gRPC-C++.zip", - checksum: "7c7e3568804b96cef83184f897a1d11fea753818a6644c9704b3b14be44507e2" + name: "grpcpp", + url: "https://dl.google.com/firebase/ios/bin/grpc/1.49.2/grpcpp.zip", + checksum: "075ed90f7a09589c1d269b7638dd34e50691b13b203305acb82c6248c1c752e1" ), .binaryTarget( - name: "BoringSSL-GRPC", - url: "https://dl.google.com/firebase/ios/bin/grpc/1.44.0/BoringSSL-GRPC.zip", - checksum: "7ba45f311a17a8b613f96316595f395c76eb7439117f958eba3735caa55e0fd7" + name: "openssl_grpc", + url: "https://dl.google.com/firebase/ios/bin/grpc/1.49.2/openssl_grpc.zip", + checksum: "3cb1cf53fb11a82d5f7e9f90a49a0c976535e5c3a89884b86516939f5b3e0871" ) ] ) diff --git a/grpc-Wrapper/Resources/PrivacyInfo.xcprivacy b/grpc-Wrapper/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..04aa8ca --- /dev/null +++ b/grpc-Wrapper/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,31 @@ + + + + + NSPrivacyTracking + + NSPrivacyCollectedDataTypes + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + + diff --git a/SwiftPM-PlatformExclude/gRPC-CXX-Target/dummy.m b/grpc-Wrapper/empty.m similarity index 89% rename from SwiftPM-PlatformExclude/gRPC-CXX-Target/dummy.m rename to grpc-Wrapper/empty.m index 3b45175..7ec8581 100644 --- a/SwiftPM-PlatformExclude/gRPC-CXX-Target/dummy.m +++ b/grpc-Wrapper/empty.m @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -// This file is intentionally empty. \ No newline at end of file +// This file is intentionally empty. diff --git a/SwiftPM-PlatformExclude/gRPC-CXX-Target/include/dummy.h b/grpc-Wrapper/include/empty.h similarity index 89% rename from SwiftPM-PlatformExclude/gRPC-CXX-Target/include/dummy.h rename to grpc-Wrapper/include/empty.h index 3b45175..7ec8581 100644 --- a/SwiftPM-PlatformExclude/gRPC-CXX-Target/include/dummy.h +++ b/grpc-Wrapper/include/empty.h @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -// This file is intentionally empty. \ No newline at end of file +// This file is intentionally empty. diff --git a/grpcpp-Wrapper/Resources/PrivacyInfo.xcprivacy b/grpcpp-Wrapper/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..04aa8ca --- /dev/null +++ b/grpcpp-Wrapper/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,31 @@ + + + + + NSPrivacyTracking + + NSPrivacyCollectedDataTypes + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + + diff --git a/gRPC-CXX-Wrapper/dummy.m b/grpcpp-Wrapper/empty.m similarity index 89% rename from gRPC-CXX-Wrapper/dummy.m rename to grpcpp-Wrapper/empty.m index 3b45175..7ec8581 100644 --- a/gRPC-CXX-Wrapper/dummy.m +++ b/grpcpp-Wrapper/empty.m @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -// This file is intentionally empty. \ No newline at end of file +// This file is intentionally empty. diff --git a/gRPC-CXX-Wrapper/include/dummy.h b/grpcpp-Wrapper/include/empty.h similarity index 89% rename from gRPC-CXX-Wrapper/include/dummy.h rename to grpcpp-Wrapper/include/empty.h index 3b45175..7ec8581 100644 --- a/gRPC-CXX-Wrapper/include/dummy.h +++ b/grpcpp-Wrapper/include/empty.h @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -// This file is intentionally empty. \ No newline at end of file +// This file is intentionally empty. diff --git a/openssl-grpc-Wrapper/Resources/PrivacyInfo.xcprivacy b/openssl-grpc-Wrapper/Resources/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..04aa8ca --- /dev/null +++ b/openssl-grpc-Wrapper/Resources/PrivacyInfo.xcprivacy @@ -0,0 +1,31 @@ + + + + + NSPrivacyTracking + + NSPrivacyCollectedDataTypes + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + + diff --git a/openssl-grpc-Wrapper/empty.m b/openssl-grpc-Wrapper/empty.m new file mode 100644 index 0000000..7ec8581 --- /dev/null +++ b/openssl-grpc-Wrapper/empty.m @@ -0,0 +1,15 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file is intentionally empty. diff --git a/openssl-grpc-Wrapper/include/empty.h b/openssl-grpc-Wrapper/include/empty.h new file mode 100644 index 0000000..7ec8581 --- /dev/null +++ b/openssl-grpc-Wrapper/include/empty.h @@ -0,0 +1,15 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file is intentionally empty. From c05d38a44099bca80dec10676e969d5d26d88fc6 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Thu, 29 Feb 2024 17:45:47 -0500 Subject: [PATCH 2/3] Review --- Package.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index cd19d80..fce905b 100644 --- a/Package.swift +++ b/Package.swift @@ -29,11 +29,10 @@ let package = Package( ), ], dependencies: [ -// .package( -// url: "https://github.com/google/abseil-cpp-binary.git", -// "1.2022062300.0" ..< "1.2022062400.0" -// ) - .package(path: "/Users/nickcooke/Developer/abseil-cpp-binary") + .package( + url: "https://github.com/google/abseil-cpp-binary.git", + "1.2022062300.1" ..< "1.2022062400.0" + ) ], targets: [ .target( From 8f2fb96a5ee270dcaab6145c268a4d109f7fbb18 Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Wed, 6 Mar 2024 10:16:55 -0500 Subject: [PATCH 3/3] Remove dashes to reduce risks --- Package.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Package.swift b/Package.swift index fce905b..22c0c37 100644 --- a/Package.swift +++ b/Package.swift @@ -21,11 +21,11 @@ let package = Package( products: [ .library( name: "gRPC-Core", - targets: ["grpc-Wrapper"] + targets: ["grpcWrapper"] ), .library( name: "gRPC-C++", - targets: ["grpcpp-Wrapper"] + targets: ["grpcppWrapper"] ), ], dependencies: [ @@ -36,23 +36,23 @@ let package = Package( ], targets: [ .target( - name: "grpc-Wrapper", + name: "grpcWrapper", dependencies: ["grpc"], path: "grpc-Wrapper", resources: [.process("Resources/PrivacyInfo.xcprivacy")] ), .target( - name: "openssl-grpc-Wrapper", + name: "opensslWrapper", dependencies: ["openssl_grpc"], path: "openssl-grpc-Wrapper", resources: [.process("Resources/PrivacyInfo.xcprivacy")] ), .target( - name: "grpcpp-Wrapper", + name: "grpcppWrapper", dependencies: [ "grpcpp", - "grpc-Wrapper", - "openssl-grpc-Wrapper", + "grpcWrapper", + "opensslWrapper", .product(name: "abseil", package: "abseil-cpp-binary"), ], path: "grpcpp-Wrapper",