10
0
forked from pool/cockpit-repos

Patch esbuild to use native runtime on ppc64 #6

Open
malikirri wants to merge 1 commits from malikirri/cockpit-repos:main into main
3 changed files with 34 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 10 19:10:42 UTC 2026 - Miika Alikirri <miika.alikirri@suse.com>
- Patch esbuild to use native runtime on ppc64 (bsc#1257698)

Actually one slight thing, can you mention the buy in this changelog

Actually one slight thing, can you mention the buy in this changelog

Bug number added

Bug number added
* added esbuild-ppc64.patch
-------------------------------------------------------------------
Fri Jan 30 09:31:16 UTC 2026 - Alice Brooks <alice.brooks@suse.com>

View File

@@ -27,6 +27,7 @@ Source10: package-lock.json
Source11: node_modules.spec.inc
%include %_sourcedir/node_modules.spec.inc
Patch10: load-css-overrides.patch
Patch11: esbuild-ppc64.patch
BuildArch: noarch
%if ! 0%{?suse_version}

27
esbuild-ppc64.patch Normal file
View File

@@ -0,0 +1,27 @@
From ab9730f4cfc3db836ba79460f1df6999c32020ef Mon Sep 17 00:00:00 2001
From: Miika Alikirri <miika.alikirri@suse.com>
Date: Tue, 10 Feb 2026 18:47:35 +0200
Subject: Don't use esbuild wasm on ppc64
For some reason, wasm runtime is broken on node24 so we should
use native runtime instead
---
build.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.js b/build.js
index 7548c91..26340e5 100755
--- a/build.js
+++ b/build.js
@@ -13,7 +13,7 @@ import { cockpitPoEsbuildPlugin } from './pkg/lib/cockpit-po-plugin.js';
import { cockpitRsyncEsbuildPlugin } from './pkg/lib/cockpit-rsync-plugin.js';
const production = process.env.NODE_ENV === 'production';
-const useWasm = os.arch() !== 'x64';
+const useWasm = os.arch() !== 'x64' && os.arch() !== 'ppc64';
const esbuild = (await import(useWasm ? 'esbuild-wasm' : 'esbuild')).default;
const parser = (await import('argparse')).default.ArgumentParser();
--
2.52.0