Skip to content

Commit 1044c45

Browse files
committed
Merge remote-tracking branch 'upstream/main' into merge-upstream-20231005
* upstream/main: Ship with BoringSSL (swift-server#135) Add CI pipeline for Swift 5.10 (swift-server#137)
2 parents 603e35c + 5dbf2fa commit 1044c45

File tree

13 files changed

+150
-12
lines changed

13 files changed

+150
-12
lines changed

Package.swift

+5-10
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ let package = Package(
4646
],
4747
dependencies: [
4848
.package(url: "https://github.com/apple/swift-nio.git", from: "2.55.0"),
49-
.package(url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "2.0.0-beta.1"),
49+
.package(url: "https://github.com/apple/swift-nio-ssl", from: "2.25.0"),
50+
.package(url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "2.1.0"),
5051
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
5152
// The zstd Swift package produces warnings that we cannot resolve:
5253
// https://github.com/facebook/zstd/issues/3328
@@ -56,7 +57,7 @@ let package = Package(
5657
.target(
5758
name: "Crdkafka",
5859
dependencies: [
59-
"COpenSSL",
60+
.product(name: "NIOSSL", package: "swift-nio-ssl"),
6061
.product(name: "libzstd", package: "zstd"),
6162
],
6263
exclude: rdkafkaExclude,
@@ -65,7 +66,9 @@ let package = Package(
6566
cSettings: [
6667
// dummy folder, because config.h is included as "../config.h" in librdkafka
6768
.headerSearchPath("./custom/config/dummy"),
69+
.headerSearchPath("./custom/include"),
6870
.headerSearchPath("./librdkafka/src"),
71+
.define("_GNU_SOURCE", to: "1"), // Fix build error for Swift 5.9 onwards
6972
],
7073
linkerSettings: [
7174
.linkedLibrary("curl"),
@@ -88,14 +91,6 @@ let package = Package(
8891
"Kafka",
8992
]
9093
),
91-
.systemLibrary(
92-
name: "COpenSSL",
93-
pkgConfig: "openssl",
94-
providers: [
95-
.brew(["libressl"]),
96-
.apt(["libssl-dev"]),
97-
]
98-
),
9994
.testTarget(
10095
name: "KafkaTests",
10196
dependencies: ["Kafka"]

Sources/COpenSSL/module.modulemap

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the swift-kafka-client open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the swift-kafka-client project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of swift-kafka-client project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include "CNIOBoringSSL_err.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the swift-kafka-client open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the swift-kafka-client project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of swift-kafka-client project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include "CNIOBoringSSL_evp.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the swift-kafka-client open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the swift-kafka-client project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of swift-kafka-client project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include "CNIOBoringSSL_hmac.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the swift-kafka-client open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the swift-kafka-client project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of swift-kafka-client project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include "CNIOBoringSSL_pkcs12.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the swift-kafka-client open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the swift-kafka-client project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of swift-kafka-client project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include "CNIOBoringSSL_sha.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the swift-kafka-client open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the swift-kafka-client project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of swift-kafka-client project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include "CNIOBoringSSL_ssl.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the swift-kafka-client open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the swift-kafka-client project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of swift-kafka-client project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include "CNIOBoringSSL_x509.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the swift-kafka-client open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the swift-kafka-client project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of swift-kafka-client project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include "CNIOBoringSSL_x509_vfy.h"

docker/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ENV LANGUAGE en_US.UTF-8
1515
# Dependencies
1616
RUN apt-get update
1717
RUN apt-get install libsasl2-dev -y
18-
RUN apt-get install libssl-dev -y
1918

2019
# tools
2120
RUN mkdir -p $HOME/.tools

docker/docker-compose.2204.510.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: "3"
2+
3+
services:
4+
5+
runtime-setup:
6+
image: swift-kafka-client:22.04-5.10
7+
build:
8+
args:
9+
base_image: "swiftlang/swift:nightly-5.10-jammy"
10+
11+
build:
12+
image: swift-kafka-client:22.04-5.10
13+
14+
test:
15+
image: swift-kafka-client:22.04-5.10
16+
environment:
17+
- WARN_AS_ERROR_ARG=-Xswiftc -warnings-as-errors
18+
- IMPORT_CHECK_ARG=--explicit-target-dependency-import-check error
19+
- STRICT_CONCURRENCY_ARG=-Xswiftc -strict-concurrency=complete
20+
# - SANITIZER_ARG=--sanitize=thread # TSan broken still
21+
22+
shell:
23+
image: swift-kafka-client:22.04-5.10

docker/docker-compose.2204.59.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ services:
66
image: swift-kafka-client:22.04-5.9
77
build:
88
args:
9-
base_image: "swiftlang/swift:nightly-5.9-jammy"
9+
ubuntu_version: "jammy"
10+
swift_version: "5.9"
1011

1112
build:
1213
image: swift-kafka-client:22.04-5.9

0 commit comments

Comments
 (0)