Skip to content

Commit 62da641

Browse files
fix: Remove global LD_LIBRARY_PATH to restore SSL certificate verification for email
Fixes SSL certificate verification failure when sending books to Kindle via email. Users were getting "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)" errors after recent updates. Root Cause: Commit 8638224 (feat: FTS management) added global LD_LIBRARY_PATH=/app/calibre/lib environment variable to force Calibre binaries to use their bundled libraries for FTS functionality. However, setting this globally caused Python's SSL/TLS module to load SSL libraries from Calibre's bundle instead of system OpenSSL, breaking cert verification for SMTP connections. Changes: - Removed `ENV LD_LIBRARY_PATH=/app/calibre/lib` from Dockerfile - Removed `export LD_LIBRARY_PATH=/app/calibre/lib` from s6 service run script - Kept per-subprocess LD_LIBRARY_PATH settings in cps/cwa_functions.py (lines 2083, 2151, 2198, 2274) which correctly isolate the variable to calibredb calls only Impact: - Email/SMTP functionality restored with proper SSL verification - FTS and all Calibre tool operations continue working correctly via subprocess env - No side effects on other functionality Reported by user on Discord who found issue present in dev branch but not in dev-auto-hardcover image (commit 297968d).
1 parent bc86850 commit 62da641

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

  • root/etc/s6-overlay/s6-rc.d/svc-calibre-web-automated

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ COPY --from=unrar /usr/bin/unrar-ubuntu /usr/bin/unrar
286286

287287
# Set calibre environment variables
288288
ENV CALIBRE_CONFIG_DIR=/config/.config/calibre
289-
ENV LD_LIBRARY_PATH=/app/calibre/lib
290289

291290
# Ports and volumes
292291
WORKDIR /config

root/etc/s6-overlay/s6-rc.d/svc-calibre-web-automated/run

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# shellcheck shell=bash
33

44
export CALIBRE_DBPATH=/config
5-
export LD_LIBRARY_PATH=/app/calibre/lib
65

76
exec \
87
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${CWA_PORT_OVERRIDE:-8083}" \

0 commit comments

Comments
 (0)