From 516e0f2d80aaea2ade48ab36452d68fe2dc9ee23 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Mon, 13 Jan 2025 09:20:01 +0100 Subject: [PATCH] Always re-package signed jars with existing MANIFEST (#12041) Previously, a default MANIFEST file would be used, which would be problematic for modules. --- .../client/tasks/signArchivesMacOs.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/ide-desktop/client/tasks/signArchivesMacOs.ts b/app/ide-desktop/client/tasks/signArchivesMacOs.ts index 1d15f1460394..db7753c1212c 100644 --- a/app/ide-desktop/client/tasks/signArchivesMacOs.ts +++ b/app/ide-desktop/client/tasks/signArchivesMacOs.ts @@ -73,15 +73,6 @@ async function ensoPackageSignables(resourcesDir: string): Promise { // in the error message provided by Apple and can then be added here. const engineDir = `${resourcesDir}/enso/dist/*` const archivePatterns: ArchivePattern[] = [ - [ - '/component/runner/runner.jar', - [ - 'org/sqlite/native/Mac/x86_64/libsqlitejdbc.jnilib', - 'org/sqlite/native/Mac/aarch64/libsqlitejdbc.jnilib', - 'com/sun/jna/darwin-aarch64/libjnidispatch.jnilib', - 'com/sun/jna/darwin-x86-64/libjnidispatch.jnilib', - ], - ], [ 'component/python-resources-*.jar', [ @@ -223,9 +214,10 @@ class ArchiveToSign implements Signable { } if (isJar) { - if (archiveName.includes('runner')) { - run('jar', ['-cfm', TEMPORARY_ARCHIVE_PATH, 'META-INF/MANIFEST.MF', '.'], workingDir) - } else { + const meta = 'META-INF/MANIFEST.MF' + try { + run('jar', ['-cfm', TEMPORARY_ARCHIVE_PATH, meta, '.'], workingDir) + } catch (err) { run('jar', ['-cf', TEMPORARY_ARCHIVE_PATH, '.'], workingDir) } } else {