10
0

Patch esbuild to use native runtime on ppc64 #5

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

View File

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

Can you mention the bug here otherwise it looks good

Can you mention the bug here otherwise it looks good

Bug number added

Bug number added
* added esbuild-ppc64.patch
-------------------------------------------------------------------
Thu Jan 29 10:11:50 UTC 2026 - Alice Brooks <alice.brooks@suse.com>

View File

@@ -25,6 +25,7 @@ Source: %{name}-%{version}.tar.xz
Source10: package-lock.json
Source11: node_modules.spec.inc
Patch10: load-css-overrides.patch
Patch11: esbuild-ppc64.patch
%include %_sourcedir/node_modules.spec.inc
BuildArch: noarch
%if ! 0%{?suse_version}
@@ -56,6 +57,7 @@ A cockpit module for (un)installing packages
%prep
%setup -q -n %{name}-%{version}
%patch -P 10 -p1
%patch -P 11 -p1
rm -rf node_modules
rm -f package-lock.json
local-npm-registry %{_sourcedir} install --include=dev --ignore-scripts

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