Skip to content

Commit

Permalink
Always re-package signed jars with existing MANIFEST (#12041)
Browse files Browse the repository at this point in the history
Previously, a default MANIFEST file would be used, which would be
problematic for modules.
  • Loading branch information
hubertp authored Jan 13, 2025
1 parent 09929c3 commit 516e0f2
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions app/ide-desktop/client/tasks/signArchivesMacOs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ async function ensoPackageSignables(resourcesDir: string): Promise<Signable[]> {
// 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',
[
Expand Down Expand Up @@ -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) {

Check warning on line 220 in app/ide-desktop/client/tasks/signArchivesMacOs.ts

View workflow job for this annotation

GitHub Actions / 🧹 GUI Lint Results

app/ide-desktop/client/tasks/signArchivesMacOs.ts#L220

[@typescript-eslint/no-unused-vars] 'err' is defined but never used.

Check warning on line 220 in app/ide-desktop/client/tasks/signArchivesMacOs.ts

View workflow job for this annotation

GitHub Actions / 🧹 GUI Lint Results

app/ide-desktop/client/tasks/signArchivesMacOs.ts#L220

[@typescript-eslint/no-unused-vars] 'err' is defined but never used.
run('jar', ['-cf', TEMPORARY_ARCHIVE_PATH, '.'], workingDir)
}
} else {
Expand Down

0 comments on commit 516e0f2

Please sign in to comment.