@@ -15,7 +15,24 @@ How to update to newer OpenSSL version, build, and publish a release.
15
15
Increment ` PACKAGE_VERSION ` if you are repackaging the same OpenSSL version.
16
16
Otherwise, update ` VERSION ` to OpenSSL version and reset ` PACKAGE_VERSION ` to ` 1 ` .
17
17
18
+ ```
19
+ ## OpenSSL version to build
20
+ VERSION ?= 1.1.1v
21
+ ## Extra version of the distributed package
22
+ PACKAGE_VERSION ?= 1
23
+ ```
24
+
18
25
Also update tarball checksums in [ ` build-libssl.sh ` ] ( build-libssl.sh ) .
26
+ ```
27
+ # Default version in case no version is specified
28
+ # Official checksums available at https://www.openssl.org/source/
29
+ DEFAULTVERSION="1.1.1u"
30
+ OPENSSL_CHECKSUMS="
31
+ 1.1.1k 892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5
32
+ 1.1.1u e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6
33
+ 1.1.1v d6697e2871e77238460402e9362d47d18382b15ef9f246aba6c7bd780d38a6b0
34
+ "
35
+ ```
19
36
20
37
3 . ** Update platform configuration.**
21
38
@@ -27,37 +44,87 @@ How to update to newer OpenSSL version, build, and publish a release.
27
44
To build from scratch - remove output folder.
28
45
29
46
``` shell
30
- make
47
+ make clean && make
31
48
```
32
49
33
50
This can take a while.
34
51
Not only it builds the library, this also packages it,
35
52
and updates the project specs.
36
53
54
+ Check the cocoapods/CLOpenSSL-XCF.podspec. It have to be created from podpec.template file with actual version, hash and filenames.
55
+
56
+ Note: semversioned number of framework is taken from ``` frameworks/MacOSX/openssl.framework ``` .
57
+
58
+
37
59
5 . ** Update SPM package settings**
38
60
39
61
Update [`Package.swift`](Package.swift) file with the new URL of the binary framework and its checksum:
40
62
41
63
``` swift
42
64
.binaryTarget (name : " openssl" ,
43
65
// update version in URL path
44
- url :" https://github.com/cossacklabs/openssl-apple/releases/download/1.1.10701 /openssl-static-xcframework.zip" ,
66
+ url :" https://github.com/cossacklabs/openssl-apple/releases/download/1.1.12201 /openssl-static-xcframework.zip" ,
45
67
// Run from package directory:
46
68
// swift package compute-checksum output/openssl-static-xcframework.zip
47
- checksum : " 77b9a36297a2cade7bb6db5282570740a2af7b1e5083f126f46ca2671b14d73e" ),
69
+ checksum : " a3363e4297428d2497c481791f6ac3c17c118b6829ee6246781efe0a3593ae16" ),
70
+ ```
71
+ Remember: actual version you can see in output/version file. It is created by authors of the OpenSSL library.
72
+
73
+ 6 . ** Update the Carthage package settings and prepare the copy of files**
74
+ During the 'make' process, the scripts in the 'scripts' folder had to update the json files in the carthage folder. Check it out.
75
+
76
+ ` cat carthage/openssl-dynamic-framework.json `
77
+ ```
78
+ {
79
+ "1.1.12201": "https://github.com/cossacklabs/openssl-apple/releases/download/1.1.12201/openssl-dynamic-xcframework.zip",
80
+ "1.1.12101": "https://github.com/cossacklabs/openssl-apple/releases/download/1.1.12101/openssl-dynamic-xcframework.zip",
81
+ "1.1.11101": "https://github.com/cossacklabs/openssl-apple/releases/download/1.1.11101/openssl-dynamic-xcframework.zip",
82
+ "1.1.10803": "https://github.com/cossacklabs/openssl-apple/releases/download/1.1.10803/openssl-dynamic-xcframework.zip",
83
+ }
84
+ ```
85
+
86
+ ` cat carthage/openssl-static-framework.json `
87
+ ```
88
+ rad@Oleksiis-M1-2021 ~/g/p/t/openssl-apple (openssl-1.1.1v)> cat carthage/openssl-static-xcframework.json
89
+ {
90
+ "1.1.12201": "https://github.com/cossacklabs/openssl-apple/releases/download/1.1.12201/openssl-static-xcframework.zip",
91
+ "1.1.12101": "https://github.com/cossacklabs/openssl-apple/releases/download/1.1.12101/openssl-static-xcframework.zip",
92
+ "1.1.11101": "https://github.com/cossacklabs/openssl-apple/releases/download/1.1.11101/openssl-static-xcframework.zip",
93
+ "1.1.10803": "https://github.com/cossacklabs/openssl-apple/releases/download/1.1.10803/openssl-static-xcframework.zip",
94
+ }
95
+ ```
96
+
97
+ Also carthage will use files with the name that contain ".xcframework". So, you need to copy files in output directory to corresponding names.
98
+ ` openssl-dynamic-xcframework.zip ` to ` openssl-dynamic.xcframework.zip ` .
99
+ And ` openssl-static-xcframework.zip ` to ` openssl-static.xcframework.zip `
100
+ You will upload these files later into the release.
101
+
102
+ 7 . ** Cocoapods podspec**
103
+ During the 'make' process scripts had to generate new podspec file from the template located in 'cocoapods' directory.
104
+ So, you will see the new file: CLOpenSSL-XCF.podspec
105
+ Check it out. You have to see newly created version and hash checksum in the body of the file.
48
106
```
107
+ openssl_version = "1.1.12201"
108
+ XCFramework_archive_hash = "bc9d20b7e4369b3cec2f30115e455f610c9d61aefc569676805b006d83e77944"
109
+ ```
110
+
111
+ You can compare the hash with the result of command ` swift package compute-checksum output/openssl-dynamic-xcframework.zip `
112
+ It should be equal.
113
+ openssl_version have to be equal to ` cat output/version `
114
+
115
+ 8 . ** Commit, tag, push the release.**
49
116
50
- 6 . ** Commit, tag, push the release. **
117
+ Commit the changes. Changes must contain new version settings, SPM, Carthage, and Cocoapods updates. Optionally, other files.
51
118
52
- Tag should be in a semver format.
119
+ Tag should be in a semver format. Do not add cocoapods/CLOpenSSL-XCF.podspec to the git. It is generated every time.
53
120
54
121
``` shell
55
122
git add carthage
56
123
git add Package.swift
57
- git commit -S -e -m " OpenSSL 1.1.1g "
58
- git tag -s -e -m " OpenSSL 1.1.1g " 1.1.10701
124
+ git commit -S -e -m " OpenSSL 1.1.1v "
125
+ git tag -s -e -m " OpenSSL 1.1.1v " 1.1.12201
59
126
git push origin cossacklabs # Push the branch
60
- git push origin 1.1.10701 # Push the tag
127
+ git push origin 1.1.12201 # Push the tag
61
128
```
62
129
63
130
Make will remind you how to do this.
@@ -67,23 +134,24 @@ How to update to newer OpenSSL version, build, and publish a release.
67
134
Congratulations!
68
135
You have just published broken Carthage and SPM packages :)
69
136
70
- 7 . ** Publish GitHub release with binary framework files.**
137
+ 9 . ** Publish GitHub release with binary framework files.**
71
138
72
139
Go to GitHub release page for the tag:
73
140
74
- https://github.com/cossacklabs/openssl-apple/releases/tag/1.1.107
141
+ https://github.com/cossacklabs/openssl-apple/releases/tag/1.1.12201
75
142
76
- press ** Edit tag** and upload ` *.zip ` packages from ` output ` directory.
143
+ press ** Edit tag** and upload ` *.zip ` packages from ` output ` directory. Do not forget to upload also .xcframework.zip files too. It is important for carthage binary prebuilt scheme.
77
144
78
145
Also, describe the release, press the ** Publish release** when done.
79
146
80
147
Congratulations!
81
148
You should have fixed the Carthage and SPM packages with this.
82
149
83
- 8 . ** Publish podspec.**
150
+ 10 . ** Publish podspec.**
84
151
85
152
``` shell
86
- pod trunk push cocoapods/CLOpenSSL.podspec
153
+ pod spec lint
154
+ pod trunk push cocoapods/CLOpenSSL-XCF.podspec
87
155
```
88
156
89
157
This lints the podspec before publishing it.
@@ -94,4 +162,49 @@ How to update to newer OpenSSL version, build, and publish a release.
94
162
95
163
Actually, you have published all of the OpenSSL.
96
164
Now is the time to go check if it * actually* works.
165
+
97
166
You can use [ Themis] ( https://github.com/cossacklabs/themis ) for that.
167
+
168
+ 11 . ** Test the CLOpenSSL-XCF release**
169
+
170
+ ##### SPM
171
+
172
+ 1 . Create a new Xcode project.
173
+ 2 . Add the package from the URL: https://github.com/cossacklabs/openssl-apple
174
+ 3 . Select the exact version (Which you released recently)
175
+ 4 . Compile and run project (Build, Archive)
176
+
177
+ ##### Carthage
178
+ 1 . Create a new Xcode project
179
+ 2 . Create Cartfile near the .xcodeproj or .xcworkspace file
180
+ 3 . Add similar content
181
+ ```
182
+ “github "cossacklabs/openssl-apple" ~> 1.1.12201
183
+ ```
184
+
185
+ Run
186
+
187
+ ```
188
+ carthage update --use-xcframeworks
189
+ ```
190
+
191
+ 4 . Drag the downloaded ` .xcframework ` bundles from ` Carthage/Build ` into the "Frameworks and Libraries" section of your application’s Xcode project.
192
+
193
+ ##### Cocoapods
194
+ 1 . Create new Xcode project
195
+ 2 . run pod init from the root of the project
196
+ 3 . Add
197
+
198
+ ``` bash
199
+ pod ' CLOpenSSL-XCF'
200
+ ```
201
+
202
+ 4. Run
203
+
204
+ ` ` ` bash
205
+ pod install
206
+ ` ` `
207
+
208
+ Open .xcworkspace file and run test the project
209
+
210
+
0 commit comments