From 2d13e8efa04c685e97328f9d87f162a0deaa0bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ketelaars?= Date: Sun, 25 Feb 2024 06:46:46 +0100 Subject: [PATCH] No need to use OpenSSL 3.0 on OpenBSD borg-2.0 requires EVP_aes_256_ocb, which is not provided by LibreSSL. As such, OpenSSL-3.0 is needed on OpenBSD. borg-1.4 however does not use EVP_aes_256_ocb thus there is no need to use OpenSSL. Instead rely on LibreSSL. Undo part of ccb1e92. Tested on OpenBSD -current. --- docs/changes.rst | 1 - setup.py | 7 ------- 2 files changed, 8 deletions(-) diff --git a/docs/changes.rst b/docs/changes.rst index 6a589d67ee..731a0f40b0 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -421,7 +421,6 @@ Other changes: - init: remove compatibility warning for borg <=1.0.8 The warning refers to a compatibility issue not relevant any more since borg 1.0.9 (released 2016-12). -- use OpenSSL 3.0 on OpenBSD - locate libacl via pkgconfig - scripts/make.py: move clean, build_man, build_usage to there, so we do not need to invoke setup.py directly, update docs diff --git a/setup.py b/setup.py index 9889994f96..124aaafbc8 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,6 @@ sys.path += [os.path.dirname(__file__)] is_win32 = sys.platform.startswith("win32") -is_openbsd = sys.platform.startswith("openbsd") # Number of threads to use for cythonize, not used on windows cpu_threads = multiprocessing.cpu_count() if multiprocessing and multiprocessing.get_start_method() != "spawn" else None @@ -124,12 +123,6 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version, lib_s crypto_extra_objects = [] if is_win32: crypto_ext_lib = lib_ext_kwargs(pc, "BORG_OPENSSL_PREFIX", "libcrypto", "libcrypto", ">=1.1.1", lib_subdir="") - elif is_openbsd: - # Use openssl (not libressl) because we need AES-OCB via EVP api. Link - # it statically to avoid conflicting with shared libcrypto from the base - # OS pulled in via dependencies. - crypto_ext_lib = {"include_dirs": ["/usr/local/include/eopenssl30"]} - crypto_extra_objects += ["/usr/local/lib/eopenssl30/libcrypto.a"] else: crypto_ext_lib = lib_ext_kwargs(pc, "BORG_OPENSSL_PREFIX", "crypto", "libcrypto", ">=1.1.1")