Skip to content

Commit bb9ca10

Browse files
committed
downloads: qualify OpenSSL version on downloads entry
In preparation of adding support for OpenSSL 3.x.
1 parent 664a4d2 commit bb9ca10

File tree

8 files changed

+44
-38
lines changed

8 files changed

+44
-38
lines changed
File renamed without changes.

Diff for: cpython-unix/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ $(OUTDIR)/mpdecimal-$(MPDECIMAL_VERSION)-$(PACKAGE_SUFFIX).tar: $(PYTHON_DEP_DEP
170170
$(OUTDIR)/ncurses-$(NCURSES_VERSION)-$(PACKAGE_SUFFIX).tar: $(PYTHON_DEP_DEPENDS) $(HERE)/build-ncurses.sh
171171
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) ncurses
172172

173-
$(OUTDIR)/openssl-$(OPENSSL_VERSION)-$(PACKAGE_SUFFIX).tar: $(PYTHON_DEP_DEPENDS) $(HERE)/build-openssl.sh
174-
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) openssl
173+
$(OUTDIR)/openssl-1.1-$(OPENSSL_1.1_VERSION)-$(PACKAGE_SUFFIX).tar: $(PYTHON_DEP_DEPENDS) $(HERE)/build-openssl-1.1.sh
174+
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) openssl-1.1
175175

176176
LIBEDIT_DEPENDS = \
177177
$(PYTHON_DEP_DEPENDS) \
@@ -250,7 +250,7 @@ PYTHON_DEPENDS := \
250250
$(if $(NEED_m4),$(OUTDIR)/m4-$(M4_VERSION)-$(PACKAGE_SUFFIX).tar) \
251251
$(if $(NEED_MPDECIMAL),$(OUTDIR)/mpdecimal-$(MPDECIMAL_VERSION)-$(PACKAGE_SUFFIX).tar) \
252252
$(if $(NEED_NCURSES),$(OUTDIR)/ncurses-$(NCURSES_VERSION)-$(PACKAGE_SUFFIX).tar) \
253-
$(if $(NEED_OPENSSL),$(OUTDIR)/openssl-$(OPENSSL_VERSION)-$(PACKAGE_SUFFIX).tar) \
253+
$(if $(NEED_OPENSSL_1_1),$(OUTDIR)/openssl-1.1-$(OPENSSL_1.1_VERSION)-$(PACKAGE_SUFFIX).tar) \
254254
$(if $(NEED_PATCHELF),$(OUTDIR)/patchelf-$(PATCHELF_VERSION)-$(PACKAGE_SUFFIX).tar) \
255255
$(if $(NEED_SQLITE),$(OUTDIR)/sqlite-$(SQLITE_VERSION)-$(PACKAGE_SUFFIX).tar) \
256256
$(if $(NEED_TCL),$(OUTDIR)/tcl-$(TCL_VERSION)-$(PACKAGE_SUFFIX).tar) \

Diff for: cpython-unix/build-openssl.sh renamed to cpython-unix/build-openssl-1.1.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ ROOT=`pwd`
99

1010
export PATH=${TOOLS_PATH}/${TOOLCHAIN}/bin:${TOOLS_PATH}/host/bin:$PATH
1111

12-
tar -xf openssl-${OPENSSL_VERSION}.tar.gz
12+
tar -xf openssl-${OPENSSL_1_1_VERSION}.tar.gz
1313

14-
pushd openssl-${OPENSSL_VERSION}
14+
pushd openssl-${OPENSSL_1_1_VERSION}
1515

1616
# Otherwise it gets set to /tools/deps/ssl by default.
1717
case "${TARGET_TRIPLE}" in

Diff for: cpython-unix/build.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,15 @@ def simple_build(
252252
build_env.copy_file(SUPPORT / ("build-%s.sh" % entry))
253253

254254
env = {
255-
"%s_VERSION" % entry.upper().replace("-", "_"): DOWNLOADS[entry]["version"],
255+
"%s_VERSION"
256+
% entry.upper()
257+
.replace("-", "_")
258+
.replace(".", "_"): DOWNLOADS[entry]["version"],
256259
}
257260

258261
add_target_env(env, host_platform, target_triple, build_env)
259262

260-
if entry == "openssl":
263+
if entry == "openssl-1.1":
261264
settings = get_targets(TARGETS_CONFIG)[target_triple]
262265
env["OPENSSL_TARGET"] = settings["openssl_target"]
263266

@@ -948,7 +951,7 @@ def main():
948951
"m4",
949952
"mpdecimal",
950953
"ncurses",
951-
"openssl",
954+
"openssl-1.1",
952955
"patchelf",
953956
"sqlite",
954957
"tcl",

Diff for: cpython-unix/targets.yml

+24-24
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ aarch64-apple-darwin:
9191
- libffi
9292
- m4
9393
- mpdecimal
94-
- openssl
94+
- openssl-1.1
9595
- sqlite
9696
- tcl
9797
- tk
@@ -135,7 +135,7 @@ aarch64-apple-ios:
135135
- libffi
136136
- m4
137137
- mpdecimal
138-
- openssl
138+
- openssl-1.1
139139
- sqlite
140140
- xz
141141
openssl_target: ios64-cross
@@ -166,7 +166,7 @@ aarch64-unknown-linux-gnu:
166166
- m4
167167
- mpdecimal
168168
- ncurses
169-
- openssl
169+
- openssl-1.1
170170
- patchelf
171171
- sqlite
172172
- tcl
@@ -213,7 +213,7 @@ arm64-apple-tvos:
213213
- expat
214214
- m4
215215
- mpdecimal
216-
- openssl
216+
- openssl-1.1
217217
- sqlite
218218
- xz
219219
openssl_target: todo
@@ -243,7 +243,7 @@ armv7-unknown-linux-gnueabi:
243243
- m4
244244
- mpdecimal
245245
- ncurses
246-
- openssl
246+
- openssl-1.1
247247
- patchelf
248248
- sqlite
249249
- tcl
@@ -280,7 +280,7 @@ armv7-unknown-linux-gnueabihf:
280280
- m4
281281
- mpdecimal
282282
- ncurses
283-
- openssl
283+
- openssl-1.1
284284
- patchelf
285285
- sqlite
286286
- tcl
@@ -323,7 +323,7 @@ i686-unknown-linux-gnu:
323323
- m4
324324
- mpdecimal
325325
- ncurses
326-
- openssl
326+
- openssl-1.1
327327
- patchelf
328328
- sqlite
329329
- tcl
@@ -360,7 +360,7 @@ mips-unknown-linux-gnu:
360360
- m4
361361
- mpdecimal
362362
- ncurses
363-
- openssl
363+
- openssl-1.1
364364
- patchelf
365365
- sqlite
366366
- tcl
@@ -397,7 +397,7 @@ mipsel-unknown-linux-gnu:
397397
- m4
398398
- mpdecimal
399399
- ncurses
400-
- openssl
400+
- openssl-1.1
401401
- patchelf
402402
- sqlite
403403
- tcl
@@ -434,7 +434,7 @@ ppc64le-unknown-linux-gnu:
434434
- m4
435435
- mpdecimal
436436
- ncurses
437-
- openssl
437+
- openssl-1.1
438438
- patchelf
439439
- sqlite
440440
- tcl
@@ -471,7 +471,7 @@ s390x-unknown-linux-gnu:
471471
- m4
472472
- mpdecimal
473473
- ncurses
474-
- openssl
474+
- openssl-1.1
475475
- patchelf
476476
- sqlite
477477
- tcl
@@ -518,7 +518,7 @@ thumb7k-apple-watchos:
518518
- expat
519519
- m4
520520
- mpdecimal
521-
- openssl
521+
- openssl-1.1
522522
- sqlite
523523
- xz
524524
openssl_target: todo
@@ -566,7 +566,7 @@ x86_64-apple-darwin:
566566
- libffi
567567
- m4
568568
- mpdecimal
569-
- openssl
569+
- openssl-1.1
570570
- sqlite
571571
- tcl
572572
- tk
@@ -610,7 +610,7 @@ x86_64-apple-ios:
610610
- libffi
611611
- m4
612612
- mpdecimal
613-
- openssl
613+
- openssl-1.1
614614
- sqlite
615615
- xz
616616
openssl_target: darwin64-x86_64-cc
@@ -650,7 +650,7 @@ x86_64-apple-tvos:
650650
- expat
651651
- m4
652652
- mpdecimal
653-
- openssl
653+
- openssl-1.1
654654
- sqlite
655655
- xz
656656
openssl_target: todo
@@ -690,7 +690,7 @@ x86_64-apple-watchos:
690690
- expat
691691
- m4
692692
- mpdecimal
693-
- openssl
693+
- openssl-1.1
694694
- sqlite
695695
- xz
696696
openssl_target: todo
@@ -723,7 +723,7 @@ x86_64-unknown-linux-gnu:
723723
- m4
724724
- mpdecimal
725725
- ncurses
726-
- openssl
726+
- openssl-1.1
727727
- patchelf
728728
- sqlite
729729
- tcl
@@ -764,7 +764,7 @@ x86_64_v2-unknown-linux-gnu:
764764
- m4
765765
- mpdecimal
766766
- ncurses
767-
- openssl
767+
- openssl-1.1
768768
- patchelf
769769
- sqlite
770770
- tcl
@@ -805,7 +805,7 @@ x86_64_v3-unknown-linux-gnu:
805805
- m4
806806
- mpdecimal
807807
- ncurses
808-
- openssl
808+
- openssl-1.1
809809
- patchelf
810810
- sqlite
811811
- tcl
@@ -846,7 +846,7 @@ x86_64_v4-unknown-linux-gnu:
846846
- m4
847847
- mpdecimal
848848
- ncurses
849-
- openssl
849+
- openssl-1.1
850850
- patchelf
851851
- sqlite
852852
- tcl
@@ -887,7 +887,7 @@ x86_64-unknown-linux-musl:
887887
- mpdecimal
888888
- musl
889889
- ncurses
890-
- openssl
890+
- openssl-1.1
891891
- patchelf
892892
- sqlite
893893
- tcl
@@ -929,7 +929,7 @@ x86_64_v2-unknown-linux-musl:
929929
- mpdecimal
930930
- musl
931931
- ncurses
932-
- openssl
932+
- openssl-1.1
933933
- patchelf
934934
- sqlite
935935
- tcl
@@ -971,7 +971,7 @@ x86_64_v3-unknown-linux-musl:
971971
- mpdecimal
972972
- musl
973973
- ncurses
974-
- openssl
974+
- openssl-1.1
975975
- patchelf
976976
- sqlite
977977
- tcl
@@ -1013,7 +1013,7 @@ x86_64_v4-unknown-linux-musl:
10131013
- mpdecimal
10141014
- musl
10151015
- ncurses
1016-
- openssl
1016+
- openssl-1.1
10171017
- patchelf
10181018
- sqlite
10191019
- tcl

Diff for: cpython-windows/build.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"_hashlib": ["openssl"],
110110
"_lzma": ["xz"],
111111
"_sqlite3": ["sqlite"],
112-
"_ssl": ["openssl"],
112+
"_ssl": ["openssl-1.1"],
113113
"_tkinter": ["tcl", "tk", "tix"],
114114
"_uuid": ["uuid"],
115115
"zlib": ["zlib"],
@@ -1571,7 +1571,7 @@ def build_openssl_for_arch(
15711571
*,
15721572
jom_archive,
15731573
):
1574-
openssl_version = DOWNLOADS["openssl"]["version"]
1574+
openssl_version = DOWNLOADS["openssl-1.1"]["version"]
15751575
nasm_version = DOWNLOADS["nasm-windows-bin"]["version"]
15761576

15771577
log("extracting %s to %s" % (openssl_archive, build_root))
@@ -1666,7 +1666,7 @@ def build_openssl(
16661666
"""Build OpenSSL from sources using the Perl executable specified."""
16671667

16681668
# First ensure the dependencies are in place.
1669-
openssl_archive = download_entry("openssl", BUILD)
1669+
openssl_archive = download_entry("openssl-1.1", BUILD)
16701670
nasm_archive = download_entry("nasm-windows-bin", BUILD)
16711671
jom_archive = download_entry("jom-windows-bin", BUILD)
16721672

Diff for: pythonbuild/downloads.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@
204204
"licenses": ["X11"],
205205
"license_file": "LICENSE.ncurses.txt",
206206
},
207-
"openssl": {
207+
"openssl-1.1": {
208208
"url": "https://www.openssl.org/source/openssl-1.1.1v.tar.gz",
209209
"size": 9893443,
210210
"sha256": "d6697e2871e77238460402e9362d47d18382b15ef9f246aba6c7bd780d38a6b0",
211211
"version": "1.1.1v",
212212
"library_names": ["crypto", "ssl"],
213213
"licenses": ["OpenSSL"],
214-
"license_file": "LICENSE.openssl.txt",
214+
"license_file": "LICENSE.openssl-1.1.txt",
215215
},
216216
"nasm-windows-bin": {
217217
"url": "https://github.com/python/cpython-bin-deps/archive/nasm-2.11.06.tar.gz",

Diff for: pythonbuild/utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ def write_triples_makefiles(
147147

148148
lines = []
149149
for need in settings.get("needs", []):
150-
lines.append("NEED_%s := 1\n" % need.upper())
150+
lines.append(
151+
"NEED_%s := 1\n"
152+
% need.upper().replace("-", "_").replace(".", "_")
153+
)
151154

152155
image_suffix = settings.get("docker_image_suffix", "")
153156

0 commit comments

Comments
 (0)