Accepting request 1061550 from home:gladiac:branches:devel:languages:nodejs
- Fixed webpack with OpenSSL3 * Added webpack-fix-openssl3.patch - Fixed building for Fedora - Some spec file cleanup OBS-URL: https://build.opensuse.org/request/show/1061550 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/element-web?expand=0&rev=33
This commit is contained in:
parent
dd37ba99b2
commit
84fdcba352
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 27 12:21:26 UTC 2023 - Andreas Schneider <asn@cryptomilk.org>
|
||||||
|
|
||||||
|
- Fixed webpack with OpenSSL3
|
||||||
|
* Added webpack-fix-openssl3.patch
|
||||||
|
- Fixed building for Fedora
|
||||||
|
- Some spec file cleanup
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jan 20 13:12:45 UTC 2023 - Dominik Heidler <dheidler@suse.de>
|
Fri Jan 20 13:12:45 UTC 2023 - Dominik Heidler <dheidler@suse.de>
|
||||||
|
|
||||||
|
@ -27,26 +27,27 @@ Source1: npm-packages-offline-cache.tar.gz
|
|||||||
Source2: jitsi_external_api.min.js
|
Source2: jitsi_external_api.min.js
|
||||||
Source3: prepare.sh
|
Source3: prepare.sh
|
||||||
Patch0: fix-webpack-oom.patch
|
Patch0: fix-webpack-oom.patch
|
||||||
|
Patch1: webpack-fix-openssl3.patch
|
||||||
BuildRequires: yarn
|
BuildRequires: yarn
|
||||||
BuildRequires: nodejs18
|
BuildRequires: nodejs-packaging
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A glossy Matrix collaboration client - web files
|
A glossy Matrix collaboration client - web files
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n element-web-%{version} -p0
|
%autosetup -n element-web-%{version} -a1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
echo 'yarn-offline-mirror "./npm-packages-offline-cache"' > .yarnrc
|
echo 'yarn-offline-mirror "./npm-packages-offline-cache"' > .yarnrc
|
||||||
tar xf %{SOURCE1}
|
ls -l ./npm-packages-offline-cache | head
|
||||||
ls ./npm-packages-offline-cache | head
|
|
||||||
|
|
||||||
# fix some strange dependency
|
# fix some strange dependency
|
||||||
cd ./npm-packages-offline-cache
|
cp npm-packages-offline-cache/matrix-analytics-events-0.0.1.tgz \
|
||||||
cp matrix-analytics-events-0.0.1.tgz @matrix-analytics-events-0.0.1.tgz
|
npm-packages-offline-cache/@matrix-analytics-events-0.0.1.tgz
|
||||||
cd ..
|
ls -l ./npm-packages-offline-cache/*matrix-analytics-events*
|
||||||
ls ./npm-packages-offline-cache | grep matrix-analytics-events
|
|
||||||
sed -i -e 's| matrix-analytics-events "github:matrix-org/matrix-analytics-events.git#[^"]*"| matrix-analytics-events "^0.0.1"|' yarn.lock
|
sed -i -e 's| matrix-analytics-events "github:matrix-org/matrix-analytics-events.git#[^"]*"| matrix-analytics-events "^0.0.1"|' yarn.lock
|
||||||
sed -i -e 's|"matrix-analytics-events@github:matrix-org/matrix-analytics-events#[^"]*"|matrix-analytics-events@^0.0.1|' yarn.lock
|
sed -i -e 's|"matrix-analytics-events@github:matrix-org/matrix-analytics-events#[^"]*"|matrix-analytics-events@^0.0.1|' yarn.lock
|
||||||
|
|
||||||
@ -58,24 +59,27 @@ echo 'return;' > scripts/build-jitsi.js
|
|||||||
|
|
||||||
DIST_VERSION=%{version} ./scripts/package.sh
|
DIST_VERSION=%{version} ./scripts/package.sh
|
||||||
|
|
||||||
cd dist
|
pushd dist || exit 1
|
||||||
tar xf element-%{version}.tar.gz
|
tar xf element-%{version}.tar.gz
|
||||||
cd element-%{version}
|
popd
|
||||||
cp ../../LICENSE ./
|
cp LICENSE dist/element-%{version}/LICENSE
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd dist
|
install -d -m 0755 %{buildroot}/usr/share/webapps/element
|
||||||
cd element-%{version}
|
|
||||||
install -d %{buildroot}/{usr/share/webapps,etc/webapps}/element
|
|
||||||
|
|
||||||
cp -r * "%{buildroot}%{_datadir}/webapps/element/"
|
cp -av dist/element-%{version}/* "%{buildroot}%{_datadir}/webapps/element/"
|
||||||
install -Dm644 config.sample.json -t "%{buildroot}%{_sysconfdir}/webapps/element/"
|
|
||||||
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/webapps/element/
|
||||||
|
install -m 0644 config.sample.json "%{buildroot}%{_sysconfdir}/webapps/element/config.sample.json"
|
||||||
|
|
||||||
|
%fdupes %{buildroot}%{_datadir}/webapps/element/
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%dir %{_datadir}/webapps
|
%dir %{_datadir}/webapps
|
||||||
%dir %{_sysconfdir}/webapps
|
|
||||||
%{_datadir}/webapps/element
|
%{_datadir}/webapps/element
|
||||||
%{_sysconfdir}/webapps/element
|
%dir %{_sysconfdir}/webapps
|
||||||
|
%dir %{_sysconfdir}/webapps/element
|
||||||
|
%config %{_sysconfdir}/webapps/element/config.sample.json
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
--- package.json 2022-09-28 15:22:49.000000000 +0200
|
Index: element-web-1.11.20/package.json
|
||||||
+++ package.json 2022-12-23 11:10:18.838569341 +0100
|
===================================================================
|
||||||
|
--- element-web-1.11.20.orig/package.json 2023-01-20 13:52:01.000000000 +0100
|
||||||
|
+++ element-web-1.11.20/package.json 2023-01-27 13:02:23.452017454 +0100
|
||||||
@@ -37,7 +37,7 @@
|
@@ -37,7 +37,7 @@
|
||||||
"build:res": "node scripts/copy-res.js",
|
"build:res": "node scripts/copy-res.js",
|
||||||
"build:genfiles": "yarn build:res && yarn build:jitsi && yarn build:module_system",
|
"build:genfiles": "yarn build:res && yarn build:jitsi && yarn build:module_system",
|
||||||
|
16
webpack-fix-openssl3.patch
Normal file
16
webpack-fix-openssl3.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Index: element-web-1.11.20/webpack.config.js
|
||||||
|
===================================================================
|
||||||
|
--- element-web-1.11.20.orig/webpack.config.js 2023-01-20 13:52:01.000000000 +0100
|
||||||
|
+++ element-web-1.11.20/webpack.config.js 2023-01-27 13:16:14.405927597 +0100
|
||||||
|
@@ -1,5 +1,11 @@
|
||||||
|
/* eslint-disable quote-props */
|
||||||
|
|
||||||
|
+// HACK: OpenSSL 3 does not support md4 any more, but webpack hardcodes it all
|
||||||
|
+// over the place: https://github.com/webpack/webpack/issues/13572
|
||||||
|
+const crypto = require("crypto");
|
||||||
|
+const crypto_orig_createHash = crypto.createHash;
|
||||||
|
+crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);
|
||||||
|
+
|
||||||
|
const dotenv = require("dotenv");
|
||||||
|
const path = require("path");
|
||||||
|
const webpack = require("webpack");
|
Loading…
Reference in New Issue
Block a user