From ed9e7e59d453e19c653ff976aedc147a50d557d0 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Fri, 30 Sep 2022 19:02:21 -0400 Subject: [PATCH] New package: element-web-1.11.8 --- ...web_0001-remove-dependency-on-sentry.patch | 55 +++++++++++++++++++ srcpkgs/element-web/template | 35 ++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 srcpkgs/element-web/patches/element-web_0001-remove-dependency-on-sentry.patch create mode 100644 srcpkgs/element-web/template diff --git a/srcpkgs/element-web/patches/element-web_0001-remove-dependency-on-sentry.patch b/srcpkgs/element-web/patches/element-web_0001-remove-dependency-on-sentry.patch new file mode 100644 index 000000000000..e8d1003a8cec --- /dev/null +++ b/srcpkgs/element-web/patches/element-web_0001-remove-dependency-on-sentry.patch @@ -0,0 +1,55 @@ +From 464305f785b65f7b2e552fb449bb7d230e9b0715 Mon Sep 17 00:00:00 2001 +From: q66 +Date: Sat, 11 Dec 2021 21:22:44 +0100 +Subject: [PATCH] remove dependency on sentry + +This is unused and breaks ppc64 because it downlaods binaries. +--- + package.json | 1 - + webpack.config.js | 11 ----------- + 2 files changed, 12 deletions(-) + +diff --git a/package.json b/package.json +index 89c0ba12e..c31f84fad 100644 +--- a/package.json ++++ b/package.json +@@ -88,7 +88,6 @@ + "@babel/register": "^7.12.10", + "@babel/runtime": "^7.12.5", + "@principalstudio/html-webpack-inject-preload": "^1.2.7", +- "@sentry/webpack-plugin": "^1.18.1", + "@svgr/webpack": "^5.5.0", + "@types/flux": "^3.1.9", + "@types/jest": "^28.0.0", +diff --git a/webpack.config.js b/webpack.config.js +index 8d1f27330..b56a11566 100644 +--- a/webpack.config.js ++++ b/webpack.config.js +@@ -8,7 +8,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); + const TerserPlugin = require('terser-webpack-plugin'); + const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); + const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload'); +-const SentryCliPlugin = require("@sentry/webpack-plugin"); + + dotenv.config(); + let ogImageUrl = process.env.RIOT_OG_IMAGE_URL; +@@ -626,16 +625,6 @@ module.exports = (env, argv) => { + files: [{ match: /.*Inter.*\.woff2$/ }], + }), + +- // upload to sentry if sentry env is present +- process.env.SENTRY_DSN && +- new SentryCliPlugin({ +- release: process.env.VERSION, +- include: "./webapp/bundles", +- errorHandler: (err, invokeErr, compilation) => { +- compilation.warnings.push('Sentry CLI Plugin: ' + err.message); +- console.log(`::warning title=Sentry error::${err.message}`); +- }, +- }), + new webpack.EnvironmentPlugin(['VERSION']), + ].filter(Boolean), + +-- +2.37.2 + diff --git a/srcpkgs/element-web/template b/srcpkgs/element-web/template new file mode 100644 index 000000000000..be2638590ea3 --- /dev/null +++ b/srcpkgs/element-web/template @@ -0,0 +1,35 @@ +# Template file for 'element-web' +pkgname=element-web +version=1.11.8 +revision=1 +conf_files="/etc/webapps/element/config.json" +hostmakedepends="yarn jq moreutils" +short_desc="Glossy Matrix collaboration client - web version" +maintainer="Joel Beckmeyer " +license="Apache-2.0" +homepage="https://element.io" +changelog="https://raw.githubusercontent.com/vector-im/element-web/develop/CHANGELOG.md" +distfiles="https://github.com/vector-im/element-web/archive/v${version}.tar.gz" +checksum="9d9bb42a3d004ab4659d2945e6752aa278c59bc3b7f75919ce076bf3fb2b5f73" + +post_patch() { + # Disable auto-updating + jq '.update_base_url = ""' element.io/app/config.json | sponge element.io/app/config.json +} + +pre_build() { + # Build dependencies for element-web + yarn install +} + +do_build() { + yarn build +} + +do_install() { + vmkdir usr/share/webapps/element + vcopy webapp/. /usr/share/webapps/element + vsconf config.sample.json + vinstall config.sample.json 644 /etc/webapps/element/ config.json + ln -s /etc/webapps/element/config.json "${DESTDIR}"/usr/share/webapps/element/config.json +}