Skip to content

Commit 2a1c93d

Browse files
committed
Merge tag 'v1.11.31' into sc
* If you package Element Desktop with a static sqlcipher, you may need to tweak some build scripts: SQLCIPHER_STATIC became SQLCIPHER_BUNDLED, and OpenSSL is now included too. * Start packaging for Debian & Ubuntu aarch64 ([\element-hq#895](element-hq#895)). * Use a fully static seshat build ([\element-hq#631](element-hq#631)). Contributed by @MatMaul. * Improve Content-Security-Policy ([\#25210](element-hq/element-web#25210)). * Add UIFeature.locationSharing to hide location sharing ([\#10727](matrix-org/matrix-react-sdk#10727)). * Memoize field validation results ([\#10714](matrix-org/matrix-react-sdk#10714)). * Commands for plain text editor ([\#10567](matrix-org/matrix-react-sdk#10567)). Contributed by @alunturner. * Allow 16 lines of text in the rich text editors ([\#10670](matrix-org/matrix-react-sdk#10670)). Contributed by @alunturner. * Bail out of `RoomSettingsDialog` when room is not found ([\#10662](matrix-org/matrix-react-sdk#10662)). Contributed by @kerryarchibald. * Element-R: Populate device list for right-panel ([\#10671](matrix-org/matrix-react-sdk#10671)). Contributed by @florianduros. * Make existing and new issue URLs configurable ([\#10710](matrix-org/matrix-react-sdk#10710)). Fixes element-hq/element-web#24424. * Fix usages of ARIA tabpanel ([\#10628](matrix-org/matrix-react-sdk#10628)). Fixes element-hq/element-web#25016. * Element-R: Starting a DMs with a user ([\#10673](matrix-org/matrix-react-sdk#10673)). Contributed by @florianduros. * ARIA Accessibility improvements ([\#10675](matrix-org/matrix-react-sdk#10675)). * ARIA Accessibility improvements ([\#10674](matrix-org/matrix-react-sdk#10674)). * Add arrow key controls to emoji and reaction pickers ([\#10637](matrix-org/matrix-react-sdk#10637)). Fixes element-hq/element-web#17189. * Translate credits in help about section ([\#10676](matrix-org/matrix-react-sdk#10676)). * Fix macos update check exploding ([\element-hq#944](element-hq#944)). Fixes element-hq#668. * Fix: reveal images when image previews are disabled ([\#10781](matrix-org/matrix-react-sdk#10781)). Fixes element-hq/element-web#25271. Contributed by @kerryarchibald. * Workaround Squirrel.Mac wedging app restart after failed update check ([\element-hq#629](element-hq#629)). * Fix autocomplete not resetting properly on message send ([\#10741](matrix-org/matrix-react-sdk#10741)). Fixes element-hq/element-web#25170. * Fix start_sso not working with guests disabled ([\#10720](matrix-org/matrix-react-sdk#10720)). Fixes element-hq/element-web#16624. * Fix soft crash with Element call widgets ([\#10684](matrix-org/matrix-react-sdk#10684)). * Send correct receipt when marking a room as read ([\#10730](matrix-org/matrix-react-sdk#10730)). Fixes element-hq/element-web#25207. * Offload some more waveform processing onto a worker ([\#9223](matrix-org/matrix-react-sdk#9223)). Fixes element-hq/element-web#19756. * Consolidate login errors ([\#10722](matrix-org/matrix-react-sdk#10722)). Fixes element-hq/element-web#17520. * Fix all rooms search generating permalinks to wrong room id ([\#10625](matrix-org/matrix-react-sdk#10625)). Fixes element-hq/element-web#25115. * Posthog properly handle Analytics ID changing from under us ([\#10702](matrix-org/matrix-react-sdk#10702)). Fixes element-hq/element-web#25187. * Fix Clock being read as an absolute time rather than duration ([\#10706](matrix-org/matrix-react-sdk#10706)). Fixes element-hq/element-web#22582. * Properly translate errors in `ChangePassword.tsx` so they show up translated to the user but not in our logs ([\#10615](matrix-org/matrix-react-sdk#10615)). Fixes element-hq/element-web#9597. Contributed by @MadLittleMods. * Honour feature toggles in guest mode ([\#10651](matrix-org/matrix-react-sdk#10651)). Fixes element-hq/element-web#24513. Contributed by @andybalaam. * Fix default content in devtools event sender ([\#10699](matrix-org/matrix-react-sdk#10699)). Contributed by @tulir. * Fix a crash when a call ends while you're in it ([\#10681](matrix-org/matrix-react-sdk#10681)). Fixes element-hq/element-web#25153. * Fix lack of screen reader indication when triggering auto complete ([\#10664](matrix-org/matrix-react-sdk#10664)). Fixes element-hq/element-web#11011. * Fix typing tile duplicating users ([\#10678](matrix-org/matrix-react-sdk#10678)). Fixes element-hq/element-web#25165. * Fix wrong room topic tooltip position ([\#10667](matrix-org/matrix-react-sdk#10667)). Fixes element-hq/element-web#25158. * Fix create subspace dialog not working ([\#10652](matrix-org/matrix-react-sdk#10652)). Fixes element-hq/element-web#24882.
2 parents 03b5e93 + b7668ae commit 2a1c93d

35 files changed

+493
-558
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Bug report for the Element desktop app (not in a browser)
2+
description: File a bug report if you are using the desktop Element application.
3+
labels: [T-Defect]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
10+
Please report security issues by email to [email protected]
11+
- type: textarea
12+
id: reproduction-steps
13+
attributes:
14+
label: Steps to reproduce
15+
description: Please attach screenshots, videos or logs if you can.
16+
placeholder: Tell us what you see!
17+
value: |
18+
1. Where are you starting? What can you see?
19+
2. What do you click?
20+
3. More steps…
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: result
25+
attributes:
26+
label: Outcome
27+
placeholder: Tell us what went wrong
28+
value: |
29+
#### What did you expect?
30+
31+
#### What happened instead?
32+
validations:
33+
required: true
34+
- type: input
35+
id: os
36+
attributes:
37+
label: Operating system
38+
placeholder: Windows, macOS, Ubuntu, Arch Linux…
39+
validations:
40+
required: false
41+
- type: input
42+
id: version
43+
attributes:
44+
label: Application version
45+
description: You can find the version information in Settings -> Help & About.
46+
placeholder: e.g. Element version 1.7.34, olm version 3.2.3
47+
validations:
48+
required: false
49+
- type: input
50+
id: source
51+
attributes:
52+
label: How did you install the app?
53+
description: Where did you install the app from? Please give a link or a description.
54+
placeholder: e.g. From https://element.io/get-started
55+
validations:
56+
required: false
57+
- type: input
58+
id: homeserver
59+
attributes:
60+
label: Homeserver
61+
description: |
62+
Which server is your account registered on? If it is a local or non-public homeserver, please tell us what is the homeserver implementation (ex: Synapse/Dendrite/etc.) and the version.
63+
placeholder: e.g. matrix.org or Synapse 1.50.0rc1
64+
validations:
65+
required: false
66+
- type: dropdown
67+
id: rageshake
68+
attributes:
69+
label: Will you send logs?
70+
description: |
71+
Did you know that you can send a /rageshake command from your application to submit logs for this issue? Trigger the defect, then type `/rageshake` into the message input area followed by a description of the problem and send the command. You will be able to add a link to this defect report and submit anonymous logs to the developers.
72+
options:
73+
- "Yes"
74+
- "No"
75+
validations:
76+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Enhancement request
2+
description: Do you have a suggestion or feature request?
3+
labels: [T-Enhancement]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for taking the time to propose an enhancement to an existing feature. If you would like to propose a new feature or a major cross-platform change, please [start a discussion here](https://github.com/vector-im/element-meta/discussions/new?category=ideas).
9+
- type: textarea
10+
id: usecase
11+
attributes:
12+
label: Your use case
13+
description: What would you like to be able to do? Please feel welcome to include screenshots or mock ups.
14+
placeholder: Tell us what you would like to do!
15+
value: |
16+
#### What would you like to do?
17+
18+
#### Why would you like to do it?
19+
20+
#### How would you like to achieve it?
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: alternative
25+
attributes:
26+
label: Have you considered any alternatives?
27+
placeholder: A clear and concise description of any alternative solutions or features you've considered.
28+
validations:
29+
required: false
30+
- type: textarea
31+
id: additional-context
32+
attributes:
33+
label: Additional context
34+
placeholder: Is there anything else you'd like to add?
35+
validations:
36+
required: false

.github/ISSUE_TEMPLATE/please-don-t-file-issues-here---use-the-element-web-project.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/build_and_deploy.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: ./.github/workflows/build_prepare.yaml
4848
with:
4949
config: element.io/${{ inputs.mode || 'nightly' }}
50-
version: ${{ inputs.mode == 'release' && '' || 'develop' }}
50+
version: ${{ inputs.mode != 'release' && 'develop' || '' }}
5151
nightly: ${{ inputs.mode != 'release' }}
5252
secrets:
5353
CF_R2_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
@@ -89,14 +89,18 @@ jobs:
8989
base-url: https://packages.element.io/${{ inputs.mode == 'release' && 'desktop' || 'nightly' }}
9090
version: ${{ needs.prepare.outputs.macos-version }}
9191

92-
# We do not put this call into deploy-mode as we do not want it to add to the packages.element.io artifact
92+
# We do not put these calls into deploy-mode as we do not want it to add to the packages.element.io artifact
9393
# We ship this build via reprepro only
9494
linux:
9595
if: github.event_name != 'workflow_dispatch' || inputs.linux
9696
needs: prepare
97-
name: Linux (sqlcipher system)
97+
name: Linux ${{ matrix.arch }} (sqlcipher system)
98+
strategy:
99+
matrix:
100+
arch: [amd64, arm64]
98101
uses: ./.github/workflows/build_linux.yaml
99102
with:
103+
arch: ${{ matrix.arch }}
100104
config: element.io/${{ inputs.mode || 'nightly' }}
101105
sqlcipher: system
102106
version: ${{ needs.prepare.outputs.linux-version }}
@@ -108,6 +112,7 @@ jobs:
108112
name: Linux (sqlcipher static)
109113
uses: ./.github/workflows/build_linux.yaml
110114
with:
115+
arch: amd64
111116
deploy-mode: true
112117
config: element.io/${{ inputs.mode || 'nightly' }}
113118
sqlcipher: static
@@ -154,9 +159,12 @@ jobs:
154159
- linux
155160
# We queue this after the other deploy stage as we want to abort if that fails
156161
- deploy
157-
name: Run reprepro
162+
name: Run reprepro ${{ matrix.arch }}
163+
strategy:
164+
matrix:
165+
arch: [amd64, arm64]
158166
if: github.event_name != 'workflow_dispatch' || (inputs.deploy && inputs.linux)
159167
uses: ./.github/workflows/reprepro.yaml
160168
secrets: inherit
161169
with:
162-
artifact-name: linux-sqlcipher-system
170+
artifact-name: linux-${{ matrix.arch }}-sqlcipher-system

.github/workflows/build_and_test.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: "Get modified files"
4343
id: changed_files
44-
uses: tj-actions/changed-files@79adacd43ea069e57037edc891ea8d33013bc3da # v35
44+
uses: tj-actions/changed-files@7ecfc6730dff8072d1cc5215a24cc9478f55264d # v35
4545
with:
4646
files: |
4747
dockerbuild/*
@@ -63,7 +63,7 @@ jobs:
6363

6464
- name: Build and push Docker image
6565
if: steps.changed_files.outputs.any_modified == 'true'
66-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
66+
uses: docker/build-push-action@eafaea8d0f5853934deece2ffa67af59d936562b
6767
with:
6868
context: dockerbuild
6969
push: true
@@ -73,15 +73,22 @@ jobs:
7373
needs:
7474
- fetch
7575
- linux_docker
76-
name: Linux
76+
name: "Linux (${{ matrix.arch }}) (sqlcipher: ${{ matrix.sqlcipher }})"
7777
uses: ./.github/workflows/build_linux.yaml
7878
strategy:
7979
matrix:
8080
sqlcipher: [system, static]
81+
arch: [amd64, arm64]
82+
exclude:
83+
# FIXME: This combination yields a broken Seshat at this time
84+
# Errors at launch with `undefined symbol: PKCS5_PBKDF2_HMAC
85+
- arch: arm64
86+
sqlcipher: static
8187
with:
8288
config: ${{ github.event.pull_request.base.ref == 'develop' && 'element.io/nightly' || 'element.io/release' }}
8389
sqlcipher: ${{ matrix.sqlcipher }}
8490
docker-image: ${{ needs.linux_docker.outputs.docker-image }}
91+
arch: ${{ matrix.arch }}
8592

8693
macos:
8794
needs: fetch
@@ -99,16 +106,16 @@ jobs:
99106
- name: macOS Universal
100107
os: macos
101108
artifact: macos
102-
executable: "./dist/mac-universal/Element.app/Contents/MacOS/Element"
103-
prepare_cmd: "find ./dist/mac-universal/Element.app -type f | perl -lne 'print if -B' | tr '\\n' '\\0' | xargs -0 -n1 chmod 755"
104-
- name: "Linux (sqlcipher: system)"
109+
executable: "/Volumes/Element/Element.app/Contents/MacOS/Element"
110+
prepare_cmd: "hdiutil attach ./dist/*.dmg -mountpoint /Volumes/Element"
111+
- name: "Linux (amd64) (sqlcipher: system)"
105112
os: ubuntu
106-
artifact: linux-sqlcipher-system
113+
artifact: linux-amd64-sqlcipher-system
107114
executable: "element-desktop"
108115
prepare_cmd: "sudo apt install ./dist/*.deb"
109-
- name: "Linux (sqlcipher: static)"
116+
- name: "Linux (amd64) (sqlcipher: static)"
110117
os: ubuntu
111-
artifact: linux-sqlcipher-static
118+
artifact: linux-amd64-sqlcipher-static
112119
executable: "element-desktop"
113120
prepare_cmd: "sudo apt install ./dist/*.deb"
114121
- name: Windows (x86)

.github/workflows/build_linux.yaml

Lines changed: 75 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
on:
55
workflow_call:
66
inputs:
7+
arch:
8+
type: string
9+
required: true
10+
description: "The architecture to build for, one of 'amd64' | 'arm64'"
711
config:
812
type: string
913
required: true
@@ -33,6 +37,24 @@ jobs:
3337
run:
3438
shell: bash
3539
steps:
40+
- uses: kanga333/variable-mapper@master
41+
id: config
42+
with:
43+
key: "${{ inputs.arch }}"
44+
export_to: output
45+
map: |
46+
{
47+
"amd64": {
48+
"target": "x86_64-unknown-linux-gnu",
49+
"arch": "x86-64"
50+
},
51+
"arm64": {
52+
"target": "aarch64-unknown-linux-gnu",
53+
"arch": "aarch64",
54+
"build-args": "--arm64"
55+
}
56+
}
57+
3658
- uses: actions/checkout@v3
3759

3860
- uses: actions/download-artifact@v3
@@ -43,7 +65,7 @@ jobs:
4365
id: cache
4466
uses: actions/cache@v3
4567
with:
46-
key: ${{ runner.os }}-${{ inputs.docker-image || github.ref_name }}-${{ inputs.sqlcipher }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }}
68+
key: ${{ runner.os }}-${{ inputs.docker-image || github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion') }}
4769
path: |
4870
./.hak
4971
@@ -58,11 +80,30 @@ jobs:
5880
- name: Install Deps
5981
run: "yarn install --frozen-lockfile"
6082

83+
- name: Prepare for static sqlcipher build
84+
if: inputs.sqlcipher == 'static'
85+
run: |
86+
echo "SQLCIPHER_BUNDLED=1" >> $GITHUB_ENV
87+
88+
# Ideally the docker image would be ready for cross-compilation but libsqlcipher-dev is not Multi-Arch compatible
89+
# https://unix.stackexchange.com/a/349359
90+
- name: Prepare for cross compilation
91+
if: steps.cache.outputs.cache-hit != 'true' && inputs.arch == 'arm64'
92+
run: |
93+
set -x
94+
sed -i 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
95+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic main multiverse restricted universe" | tee -a /etc/apt/sources.list
96+
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main multiverse restricted universe" | tee -a /etc/apt/sources.list
97+
dpkg --add-architecture arm64
98+
apt-get -qq update
99+
apt-get -qq install --no-install-recommends crossbuild-essential-arm64 libsqlcipher-dev:arm64 libssl-dev:arm64 libsecret-1-dev:arm64 libgnome-keyring-dev:arm64
100+
rustup target add aarch64-unknown-linux-gnu
101+
mv dockerbuild/aarch64/.cargo .
102+
cat dockerbuild/aarch64/.env >> $GITHUB_ENV
103+
61104
- name: Build Natives
62105
if: steps.cache.outputs.cache-hit != 'true'
63-
run: "yarn build:native"
64-
env:
65-
SQLCIPHER_STATIC: ${{ inputs.sqlcipher == 'static' && '1' || '' }}
106+
run: "yarn build:native --target ${{ steps.config.outputs.target }}"
66107

67108
- name: "[Nightly] Resolve version"
68109
id: nightly
@@ -77,33 +118,48 @@ jobs:
77118
echo "config-args=--deb-changelog changelog.Debian" >> $GITHUB_OUTPUT
78119
fi
79120
80-
cp "$DIR/control.template" debcontrol
121+
cat "$DIR/control.template" | grep -v "Architecture: " > debcontrol
122+
echo "Architecture: $ARCHITECTURE" >> debcontrol
81123
VERSION=${INPUT_VERSION:-$(cat package.json | jq -r .version)}
82124
echo "Version: $VERSION" >> debcontrol
83125
env:
84126
DIR: ${{ inputs.config }}
85127
INPUT_VERSION: ${{ inputs.version }}
128+
ARCHITECTURE: ${{ inputs.arch }}
86129

87130
- name: Build App
88131
run: |
89132
npx ts-node scripts/generate-builder-config.ts \
90133
${{ steps.nightly.outputs.config-args }} \
91134
${{ steps.debian.outputs.config-args }} \
92135
--deb-custom-control=debcontrol
93-
yarn build --publish never -l --config electron-builder.json
136+
yarn build --publish never -l --config electron-builder.json ${{ steps.config.outputs.build-args }}
94137
95-
- name: Check ldd
138+
- name: Check native libraries
96139
run: |
97-
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node
98-
if [ "$SQLCIPHER_STATIC" == "1" ]; then
99-
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node | grep -v libsqlcipher.so.0
100-
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node | grep libcrypto.so.1.1
140+
set -x
141+
shopt -s globstar
142+
143+
FILES=$(file dist/**/*.node)
144+
echo "$FILES"
145+
146+
if [ grep -v "$ARCH" ]; then
147+
exit 1
148+
fi
149+
150+
LIBS=$(readelf -d dist/**/*.node | grep NEEDED)
151+
echo "$LIBS"
152+
153+
set +x
154+
assert_contains_string() { [[ "$1" == *"$2"* ]]; }
155+
! assert_contains_string "$LIBS" "libcrypto.so.1.1"
156+
if [ "$SQLCIPHER_BUNDLED" == "1" ]; then
157+
! assert_contains_string "$LIBS" "libsqlcipher.so.0"
101158
else
102-
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node | grep libsqlcipher.so.0
103-
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node | grep -v libcrypto.so.1.1
159+
assert_contains_string "$LIBS" "libsqlcipher.so.0"
104160
fi
105161
env:
106-
SQLCIPHER_STATIC: ${{ inputs.sqlcipher == 'static' && '1' || '' }}
162+
ARCH: ${{ steps.config.outputs.arch }}
107163

108164
- name: Stash deb package
109165
if: inputs.deploy-mode
@@ -133,9 +189,12 @@ jobs:
133189
ln -s "$(find . -type f -iname "*.tar.gz" | xargs -0 -n1 -- basename)" "element-desktop.tar.gz"
134190
working-directory: "dist/install/linux/glibc-x86-64"
135191

192+
# We exclude *-unpacked as it loses permissions and the tarball contains it with correct permissions
136193
- name: Upload Artifacts
137194
uses: actions/upload-artifact@v3
138195
with:
139-
name: ${{ inputs.deploy-mode && 'packages.element.io' || format('linux-sqlcipher-{0}', inputs.sqlcipher) }}
140-
path: dist
196+
name: ${{ inputs.deploy-mode && 'packages.element.io' || format('linux-{0}-sqlcipher-{1}', inputs.arch, inputs.sqlcipher) }}
197+
path: |
198+
dist
199+
!dist/*-unpacked/**
141200
retention-days: 1

0 commit comments

Comments
 (0)