Skip to content

Commit 90cf384

Browse files
committed
Fix ML installer: AppImage LD_LIBRARY_PATH collision and zip URL for Panopto (v0.7.9)
Windows + Linux: replace git+https:// Panopto URL with direct zip archive URL. - pip downloads the zip using its own HTTP client (Python ssl module), not system git, so it is unaffected by any LD_LIBRARY_PATH conflicts - Avoids spawning system git entirely (simpler, more portable) Linux AppImage: strip AppImage-injected LD_LIBRARY_PATH from installer env. - Electron AppImage prepends its bundled libs (libssl.so.3) to LD_LIBRARY_PATH; system git uses system libcurl which then finds the wrong libssl → "OPENSSL_3.2.0 not found" and git clone aborts - Restore APPIMAGE_ORIG_LD_LIBRARY_PATH (or unset) for pip subprocesses
1 parent 614ca5c commit 90cf384

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

electron/main.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ const ML_PACKAGES = [
5454
// PanoptoDownloader requires yarl~=1.7.2 in its metadata, but works fine with
5555
// modern yarl at runtime. Installing with --no-deps avoids the C++ build for
5656
// the old yarl on Windows where no pre-built wheel exists for Python 3.12+.
57-
const PANOPTO_PKG = 'git+https://github.com/Panopto-Video-DL/Panopto-Video-DL-lib.git';
57+
//
58+
// Use the zip archive URL instead of git+https://, because:
59+
// • On Windows: avoids triggering a git.exe subprocess (no PATH issues)
60+
// • On Linux AppImage: avoids system git, which fails when the AppImage's
61+
// bundled libssl.so.3 pollutes LD_LIBRARY_PATH and breaks libcurl
62+
// pip downloads the zip using its own HTTP client (Python ssl), not libcurl.
63+
const PANOPTO_PKG = 'https://github.com/Panopto-Video-DL/Panopto-Video-DL-lib/archive/refs/heads/main.zip';
5864

5965
// ── Config helpers ────────────────────────────────────────────────────────────
6066
function ensureDataDir() {
@@ -436,10 +442,24 @@ function stopProcess() {
436442
async function runInstaller(basePython, sendLog, sendDone) {
437443
const venvDir = path.join(DATA_DIR, 'venv');
438444

445+
// Build a clean environment for installer subprocesses.
446+
// On Linux AppImage, LD_LIBRARY_PATH is prepended with the AppImage's bundled
447+
// libs (e.g. libssl.so.3). System tools like git use system libcurl which then
448+
// finds the wrong libssl → OPENSSL version mismatch. Restore original value.
449+
const installerEnv = { ...process.env, PYTHONUNBUFFERED: '1', PYTHONIOENCODING: 'utf-8', PYTHONUTF8: '1' };
450+
if (process.platform === 'linux' && process.env.APPIMAGE) {
451+
const orig = process.env.APPIMAGE_ORIG_LD_LIBRARY_PATH;
452+
if (orig !== undefined) {
453+
installerEnv.LD_LIBRARY_PATH = orig;
454+
} else {
455+
delete installerEnv.LD_LIBRARY_PATH;
456+
}
457+
}
458+
439459
const runStep = (cmd, args) => new Promise((resolve) => {
440460
const proc = spawn(cmd, args, {
441461
stdio: ['ignore', 'pipe', 'pipe'],
442-
env: { ...process.env, PYTHONUNBUFFERED: '1', PYTHONIOENCODING: 'utf-8', PYTHONUTF8: '1' },
462+
env: installerEnv,
443463
windowsHide: true,
444464
});
445465
installProc = proc;

electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "auto-note",
3-
"version": "0.7.8",
3+
"version": "0.7.9",
44
"description": "AutoNote — lecture notes generator from Canvas recordings",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)