mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix loading of legacy openssl module on Linux frozen build
Needed by podofo unconditionally even though we dont actually use encryption.
This commit is contained in:
parent
c09d5c9e68
commit
07e47871a7
@ -13,7 +13,7 @@ import time
|
||||
from functools import partial
|
||||
|
||||
from bypy.constants import (
|
||||
OUTPUT_DIR, PREFIX, SRC as CALIBRE_DIR, python_major_minor_version,
|
||||
LIBDIR, OUTPUT_DIR, PREFIX, SRC as CALIBRE_DIR, python_major_minor_version,
|
||||
)
|
||||
from bypy.freeze import (
|
||||
extract_extension_modules, fix_pycryptodome, freeze_python, is_package_dir,
|
||||
@ -125,6 +125,8 @@ def copy_libs(env):
|
||||
os.chmod(j(
|
||||
dest, os.path.basename(x)),
|
||||
stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
|
||||
for x in ('ossl-modules',):
|
||||
shutil.copytree(os.path.join(LIBDIR, x), os.path.join(env.lib_dir, x))
|
||||
|
||||
base = j(QT_PREFIX, 'plugins')
|
||||
dest = j(env.lib_dir, '..', 'plugins')
|
||||
|
@ -42,6 +42,9 @@ int main(int argc, char **argv) {
|
||||
if (ret < 0 || ret > (PATHLEN-2)) { fprintf(stderr, "LD_LIBRARY_PATH too long: %s:%s", lib, ldp); return 1; }
|
||||
}
|
||||
SET("LD_LIBRARY_PATH", buf)
|
||||
ret = snprintf(buf, PATHLEN, "%s/ossl-modules", lib);
|
||||
if (ret < 0 || ret > (PATHLEN-2)) { fprintf(stderr, "OPENSSL_MODULES too long: %s/ossl-modules", lib); return 1; }
|
||||
SET("OPENSSL_MODULES", buf)
|
||||
|
||||
argv[0] = exe;
|
||||
if (execv(exe, argv) == -1) {
|
||||
|
@ -1383,7 +1383,9 @@ def sanitize_env_vars():
|
||||
is needed to prevent library conflicts when launching external utilities.'''
|
||||
|
||||
if islinux and isfrozen:
|
||||
env_vars = {'LD_LIBRARY_PATH':'/lib'}
|
||||
env_vars = {
|
||||
'LD_LIBRARY_PATH':'/lib', 'OPENSSL_MODULES': '/lib/ossl-modules',
|
||||
}
|
||||
elif iswindows:
|
||||
env_vars = {}
|
||||
elif ismacos:
|
||||
|
Loading…
x
Reference in New Issue
Block a user