Skip to content

Commit 0a83067

Browse files
committed
Fix openssl_dev_headers dep check to require the header
_core_dep_satisfied treated the openssl binary as evidence that the dev headers were installed. Minimal images (e.g. python:3.11-slim) ship openssl but not libssl-dev, so the check returned True and the core-deps installer skipped installing the headers, breaking source builds like medusa that need openssl/ssl.h. Closes #3272.
1 parent 42ef254 commit 0a83067

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

bbot/core/helpers/depsinstaller/installer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,16 @@ def _core_dep_satisfied(self, command):
453453
For special entries like openssl_dev_headers, use a custom check.
454454
"""
455455
if command == "openssl_dev_headers":
456-
# check for openssl headers by looking for the pkg-config file or header
456+
# look for the actual header. the openssl binary is NOT a proxy: many minimal
457+
# images (e.g. python:3.11-slim) ship openssl but not the -dev headers, and
458+
# anything that compiles against libssl needs the header.
457459
return any(
458460
Path(p).exists()
459461
for p in [
460462
"/usr/include/openssl/ssl.h",
461463
"/usr/local/include/openssl/ssl.h",
462464
]
463-
) or bool(self.parent_helper.which("openssl"))
465+
)
464466
return bool(self.parent_helper.which(command))
465467

466468
async def install_core_deps(self):

0 commit comments

Comments
 (0)