diff --git a/break-esbuild-for-good.patch b/break-esbuild-for-good.patch new file mode 100644 index 0000000..059fe5f --- /dev/null +++ b/break-esbuild-for-good.patch @@ -0,0 +1,41 @@ +diff -ru a/node_modules/esbuild/install.js b/node_modules/esbuild/install.js +--- a/node_modules/esbuild/install.js 2025-02-01 12:49:52.486000000 +0100 ++++ b/node_modules/esbuild/install.js 2025-02-02 17:53:44.578575982 +0100 +@@ -27,7 +27,7 @@ + var os = require("os"); + var path = require("path"); + var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +-var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; ++var isValidBinaryPath = (x) => !!x + var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", +@@ -94,6 +94,7 @@ + var toPath = path2.join(__dirname, "bin", "esbuild"); + var isToPathJS = true; + function validateBinaryVersion(...command) { ++ return; + command.push("--version"); + let stdout; + try { +diff -ru a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js +--- a/node_modules/esbuild/lib/main.js 2025-02-01 12:49:52.486000000 +0100 ++++ b/node_modules/esbuild/lib/main.js 2025-02-02 18:05:52.027111771 +0100 +@@ -662,9 +662,6 @@ + if (isFirstPacket) { + isFirstPacket = false; + let binaryVersion = String.fromCharCode(...bytes); +- if (binaryVersion !== "0.23.1") { +- throw new Error(`Cannot start service: Host version "${"0.23.1"}" does not match binary version ${quote(binaryVersion)}`); +- } + return; + } + let packet = decodePacket(bytes); +@@ -1680,6 +1677,7 @@ + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); + } + function generateBinPath() { ++ return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); diff --git a/element-desktop-1.11.90.tar.gz b/element-desktop-1.11.90.tar.gz deleted file mode 100644 index 516858e..0000000 --- a/element-desktop-1.11.90.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f8da386c2863556557eb9f286de230b940493eaeb3d3a99b04478efabf6801a -size 3120828 diff --git a/element-desktop-1.11.91.tar.gz b/element-desktop-1.11.91.tar.gz new file mode 100644 index 0000000..ed38a4c --- /dev/null +++ b/element-desktop-1.11.91.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dc9e7511c6786aafb7585f840e4b1ab522303a8a61d384d9009fb35dd96dbed +size 3121963 diff --git a/element-desktop.changes b/element-desktop.changes index 3fd37e2..93a3273 100644 --- a/element-desktop.changes +++ b/element-desktop.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Sun Feb 2 16:41:33 UTC 2025 - Dominik Heidler + +- Fix build by breakig the bad esbuild library for good + * Add break-esbuild-for-good.patch + +------------------------------------------------------------------- +Sat Feb 1 10:50:43 UTC 2025 - Dominik Heidler + +- Version 1.11.91 + ## ✨ Features + + * Implement changes to memberlist from feedback (https://github.com/element-hq/element-web/pull/29029). Contributed by @MidhunSureshR. + * Add toast for recovery keys being out of sync (https://github.com/element-hq/element-web/pull/28946). Contributed by @dbkr. + * Refactor LegacyCallHandler event emitter to use TypedEventEmitter (https://github.com/element-hq/element-web/pull/29008). Contributed by @t3chguy. + * Add `Recovery` section in the new user settings `Encryption` tab (https://github.com/element-hq/element-web/pull/28673). Contributed by @florianduros. + * Retry loading chunks to make the app more resilient (https://github.com/element-hq/element-web/pull/29001). Contributed by @t3chguy. + * Clear account idb table on logout (https://github.com/element-hq/element-web/pull/28996). Contributed by @t3chguy. + * Implement new memberlist design with MVVM architecture (https://github.com/element-hq/element-web/pull/28874). Contributed by @MidhunSureshR. + + ## 🐛 Bug Fixes + + * https://github.com/element-hq/element-web/pull/29035). Contributed by @RiotRobot. + * React to MatrixEvent sender/target being updated for rendering state events (https://github.com/element-hq/element-web/pull/28947). Contributed by @t3chguy. + ------------------------------------------------------------------- Wed Jan 15 14:01:29 UTC 2025 - Dominik Heidler diff --git a/element-desktop.spec b/element-desktop.spec index 05ffc8b..25cd729 100644 --- a/element-desktop.spec +++ b/element-desktop.spec @@ -17,7 +17,7 @@ Name: element-desktop -Version: 1.11.90 +Version: 1.11.91 Release: 0 Summary: A glossy Matrix collaboration client - desktop License: AGPL-3.0-only or GPL-3.0-only @@ -32,6 +32,7 @@ Patch1: 7za-path.patch Patch2: cc-link-lib-no-static.patch Patch3: remove-fuses.patch Patch4: no-walrus-operator.patch +Patch5: break-esbuild-for-good.patch BuildRequires: element-web = %{version} BuildRequires: app-builder BuildRequires: cargo @@ -41,6 +42,7 @@ BuildRequires: jq BuildRequires: nodejs-electron-devel BuildRequires: pkgconfig(openssl) BuildRequires: zstd +BuildRequires: esbuild %if 0%{?fedora} BuildRequires: rust-srpm-macros %else @@ -49,7 +51,11 @@ BuildRequires: cargo-auditable %endif BuildRequires: libsecret-devel +%if 0%{?sle_version} <= 150600 +BuildRequires: gcc13-c++ +%else BuildRequires: gcc-c++ +%endif Requires: element-web = %{version} Requires: nodejs-electron%{_isa} @@ -88,6 +94,12 @@ export ELECTRON_SKIP_BINARY_DOWNLOAD=1 export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 export USE_SYSTEM_APP_BUILDER=true export OPENSSL_NO_VENDOR=1 +%if 0%{?sle_version} <= 150600 +mkdir -p /tmp/bin +ln -sf /usr/bin/gcc-13 /tmp/bin/gcc +ln -sf /usr/bin/g++-13 /tmp/bin/g++ +export PATH="/tmp/bin:$PATH" +%endif # The `cc` crate tries to be too clever and passes some default cflags when building sqlcipher. # Disable these and use only the ones from CFLAGS env. variable export CRATE_CC_NO_DEFAULTS=1 @@ -100,6 +112,8 @@ export RUSTC_BOOTSTRAP=1 export RUSTC_LOG='rustc_codegen_ssa::back::link=info' export RUSTFLAGS="%{build_rustflags} --verbose -Cstrip=none" export CARGO_TERM_VERBOSE=true +# break esbuild for good - see https://en.opensuse.org/openSUSE:Packaging_Electron#esbuild and Patch5 +export ESBUILD_BINARY_PATH=/usr/bin/esbuild %electron_rebuild @@ -122,6 +136,7 @@ popd npm run build:ts npm run build:res npx --no-install electron-builder --linux dir --universal -c.electronDist=%{_libdir}/electron -c.asar=false -c.nodeGypRebuild=false -c.npmRebuild=false +rm -rf "/tmp/bin" diff --git a/vendor.tar.zst b/vendor.tar.zst index be251e2..3d7a3db 100644 --- a/vendor.tar.zst +++ b/vendor.tar.zst @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4194d7a376ce9070c2ab55b1bdb6e677f998c68f567918425df064c733dceba -size 138340525 +oid sha256:72a417d46b289007da405ee5e0a2b4a8f13743f19252e4c8a1d96ecbf139c052 +size 39529844