mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-22 07:43:06 +00:00
Merge pull request #8557 from bket/openbsd_openssl_version
borg2 - Support other OpenSSL versions on OpenBSD (#8553)
This commit is contained in:
commit
b8fe10da84
4 changed files with 13 additions and 7 deletions
1
Vagrantfile
vendored
1
Vagrantfile
vendored
|
@ -84,6 +84,7 @@ def packages_openbsd
|
||||||
pkg_add openssl%3.0
|
pkg_add openssl%3.0
|
||||||
pkg_add py3-pip
|
pkg_add py3-pip
|
||||||
pkg_add py3-virtualenv
|
pkg_add py3-virtualenv
|
||||||
|
echo 'export BORG_OPENSSL_NAME=eopenssl30' >> ~vagrant/.bash_profile
|
||||||
EOF
|
EOF
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -662,6 +662,9 @@ operations), see \fI\%tempfile\fP for details.
|
||||||
.B Building:
|
.B Building:
|
||||||
.INDENT 7.0
|
.INDENT 7.0
|
||||||
.TP
|
.TP
|
||||||
|
.B BORG_OPENSSL_NAME
|
||||||
|
Defines the subdirectory name for OpenSSL (setup.py).
|
||||||
|
.TP
|
||||||
.B BORG_OPENSSL_PREFIX
|
.B BORG_OPENSSL_PREFIX
|
||||||
Adds given OpenSSL header file directory to the default locations (setup.py).
|
Adds given OpenSSL header file directory to the default locations (setup.py).
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -198,6 +198,8 @@ Directories and files:
|
||||||
operations), see tempfile_ for details.
|
operations), see tempfile_ for details.
|
||||||
|
|
||||||
Building:
|
Building:
|
||||||
|
BORG_OPENSSL_NAME
|
||||||
|
Defines the subdirectory name for OpenSSL (setup.py).
|
||||||
BORG_OPENSSL_PREFIX
|
BORG_OPENSSL_PREFIX
|
||||||
Adds given OpenSSL header file directory to the default locations (setup.py).
|
Adds given OpenSSL header file directory to the default locations (setup.py).
|
||||||
BORG_LIBACL_PREFIX
|
BORG_LIBACL_PREFIX
|
||||||
|
|
14
setup.py
14
setup.py
|
@ -132,23 +132,23 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version, lib_s
|
||||||
f"or ensure {lib_pkg_name}.pc is in PKG_CONFIG_PATH."
|
f"or ensure {lib_pkg_name}.pc is in PKG_CONFIG_PATH."
|
||||||
)
|
)
|
||||||
|
|
||||||
crypto_extra_objects = []
|
|
||||||
if is_win32:
|
if is_win32:
|
||||||
crypto_ext_lib = lib_ext_kwargs(pc, "BORG_OPENSSL_PREFIX", "libcrypto", "libcrypto", ">=1.1.1", lib_subdir="")
|
crypto_ext_lib = lib_ext_kwargs(pc, "BORG_OPENSSL_PREFIX", "libcrypto", "libcrypto", ">=1.1.1", lib_subdir="")
|
||||||
elif is_openbsd:
|
elif is_openbsd:
|
||||||
# Use openssl (not libressl) because we need AES-OCB via EVP api. Link
|
# Use openssl (not libressl) because we need AES-OCB via EVP api. Link
|
||||||
# it statically to avoid conflicting with shared libcrypto from the base
|
# it statically to avoid conflicting with shared libcrypto from the base
|
||||||
# OS pulled in via dependencies.
|
# OS pulled in via dependencies.
|
||||||
crypto_ext_lib = {"include_dirs": ["/usr/local/include/eopenssl30"]}
|
openssl_prefix = os.environ.get("BORG_OPENSSL_PREFIX", "/usr/local")
|
||||||
crypto_extra_objects += ["/usr/local/lib/eopenssl30/libcrypto.a"]
|
openssl_name = os.environ.get("BORG_OPENSSL_NAME", "eopenssl33")
|
||||||
|
crypto_ext_lib = dict(
|
||||||
|
include_dirs=[os.path.join(openssl_prefix, "include", openssl_name)],
|
||||||
|
extra_objects=[os.path.join(openssl_prefix, "lib", openssl_name, "libcrypto.a")],
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
crypto_ext_lib = lib_ext_kwargs(pc, "BORG_OPENSSL_PREFIX", "crypto", "libcrypto", ">=1.1.1")
|
crypto_ext_lib = lib_ext_kwargs(pc, "BORG_OPENSSL_PREFIX", "crypto", "libcrypto", ">=1.1.1")
|
||||||
|
|
||||||
crypto_ext_kwargs = members_appended(
|
crypto_ext_kwargs = members_appended(
|
||||||
dict(sources=[crypto_ll_source]),
|
dict(sources=[crypto_ll_source]), crypto_ext_lib, dict(extra_compile_args=cflags)
|
||||||
crypto_ext_lib,
|
|
||||||
dict(extra_compile_args=cflags),
|
|
||||||
dict(extra_objects=crypto_extra_objects),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
compress_ext_kwargs = members_appended(
|
compress_ext_kwargs = members_appended(
|
||||||
|
|
Loading…
Reference in a new issue