Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/remove-keyserver-consumer

This commit is contained in:
Till Faelligen 2022-02-08 17:33:09 +01:00
commit 33d517fcd8
7 changed files with 61 additions and 61 deletions

View file

@ -2,6 +2,6 @@
<!-- Please read docs/CONTRIBUTING.md before submitting your pull request --> <!-- Please read docs/CONTRIBUTING.md before submitting your pull request -->
* [ ] Pull request includes a [sign off](https://github.com/matrix-org/dendrite/blob/master/docs/CONTRIBUTING.md#sign-off) * [ ] Pull request includes a [sign off](https://github.com/matrix-org/dendrite/blob/main/docs/CONTRIBUTING.md#sign-off)
Signed-off-by: `Your Name <your@email.example.org>` Signed-off-by: `Your Name <your@email.example.org>`

View file

@ -2,9 +2,9 @@ name: "CodeQL"
on: on:
push: push:
branches: [master] branches: [main]
pull_request: pull_request:
branches: [master] branches: [main]
jobs: jobs:
analyze: analyze:
@ -14,21 +14,21 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: ['go'] language: ["go"]
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
fetch-depth: 2 fetch-depth: 2
- run: git checkout HEAD^2 - run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }} if: ${{ github.event_name == 'pull_request' }}
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v1
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v1

View file

@ -2,7 +2,7 @@ name: Tests
on: on:
push: push:
branches: [ 'master' ] branches: ["main"]
pull_request: pull_request:
concurrency: concurrency:
@ -33,7 +33,7 @@ jobs:
path: dendrite path: dendrite
# Attempt to check out the same branch of Complement as the PR. If it # Attempt to check out the same branch of Complement as the PR. If it
# doesn't exist, fallback to master. # doesn't exist, fallback to main.
- name: Checkout complement - name: Checkout complement
shell: bash shell: bash
run: | run: |
@ -68,4 +68,4 @@ jobs:
name: Run Complement Tests name: Run Complement Tests
env: env:
COMPLEMENT_BASE_IMAGE: complement-dendrite:latest COMPLEMENT_BASE_IMAGE: complement-dendrite:latest
working-directory: complement working-directory: complement

View file

@ -7,7 +7,7 @@ if [ -d ".git" ]
then then
export BUILD=`git rev-parse --short HEAD || ""` export BUILD=`git rev-parse --short HEAD || ""`
export BRANCH=`(git symbolic-ref --short HEAD | tr -d \/ ) || ""` export BRANCH=`(git symbolic-ref --short HEAD | tr -d \/ ) || ""`
if [ "$BRANCH" = master ] if [ "$BRANCH" = main ]
then then
export BRANCH="" export BRANCH=""
fi fi

View file

@ -9,9 +9,9 @@ FROM golang:1.14-alpine AS gobuild
# Download and build dendrite # Download and build dendrite
WORKDIR /build WORKDIR /build
ADD https://github.com/matrix-org/dendrite/archive/master.tar.gz /build/master.tar.gz ADD https://github.com/matrix-org/dendrite/archive/main.tar.gz /build/main.tar.gz
RUN tar xvfz master.tar.gz RUN tar xvfz main.tar.gz
WORKDIR /build/dendrite-master WORKDIR /build/dendrite-main
RUN GOOS=js GOARCH=wasm go build -o main.wasm ./cmd/dendritejs RUN GOOS=js GOARCH=wasm go build -o main.wasm ./cmd/dendritejs
@ -21,7 +21,7 @@ RUN apt-get update && apt-get -y install python
# Download riot-web and libp2p repos # Download riot-web and libp2p repos
WORKDIR /build WORKDIR /build
ADD https://github.com/matrix-org/go-http-js-libp2p/archive/master.tar.gz /build/libp2p.tar.gz ADD https://github.com/matrix-org/go-http-js-libp2p/archive/main.tar.gz /build/libp2p.tar.gz
RUN tar xvfz libp2p.tar.gz RUN tar xvfz libp2p.tar.gz
ADD https://github.com/vector-im/element-web/archive/matthew/p2p.tar.gz /build/p2p.tar.gz ADD https://github.com/vector-im/element-web/archive/matthew/p2p.tar.gz /build/p2p.tar.gz
RUN tar xvfz p2p.tar.gz RUN tar xvfz p2p.tar.gz
@ -31,21 +31,21 @@ WORKDIR /build/element-web-matthew-p2p
RUN yarn install RUN yarn install
RUN ln -s /build/go-http-js-libp2p-master /build/element-web-matthew-p2p/node_modules/go-http-js-libp2p RUN ln -s /build/go-http-js-libp2p-master /build/element-web-matthew-p2p/node_modules/go-http-js-libp2p
RUN (cd node_modules/go-http-js-libp2p && yarn install) RUN (cd node_modules/go-http-js-libp2p && yarn install)
COPY --from=gobuild /build/dendrite-master/main.wasm ./src/vector/dendrite.wasm COPY --from=gobuild /build/dendrite-main/main.wasm ./src/vector/dendrite.wasm
# build it all # build it all
RUN yarn build:p2p RUN yarn build:p2p
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
RUN echo $'\ RUN echo $'\
{ \n\ { \n\
"default_server_config": { \n\ "default_server_config": { \n\
"m.homeserver": { \n\ "m.homeserver": { \n\
"base_url": "https://p2p.riot.im", \n\ "base_url": "https://p2p.riot.im", \n\
"server_name": "p2p.riot.im" \n\ "server_name": "p2p.riot.im" \n\
}, \n\ }, \n\
"m.identity_server": { \n\ "m.identity_server": { \n\
"base_url": "https://vector.im" \n\ "base_url": "https://vector.im" \n\
} \n\ } \n\
}, \n\ }, \n\
"disable_custom_urls": false, \n\ "disable_custom_urls": false, \n\
"disable_guests": true, \n\ "disable_guests": true, \n\
@ -55,57 +55,57 @@ RUN echo $'\
"integrations_ui_url": "https://scalar.vector.im/", \n\ "integrations_ui_url": "https://scalar.vector.im/", \n\
"integrations_rest_url": "https://scalar.vector.im/api", \n\ "integrations_rest_url": "https://scalar.vector.im/api", \n\
"integrations_widgets_urls": [ \n\ "integrations_widgets_urls": [ \n\
"https://scalar.vector.im/_matrix/integrations/v1", \n\ "https://scalar.vector.im/_matrix/integrations/v1", \n\
"https://scalar.vector.im/api", \n\ "https://scalar.vector.im/api", \n\
"https://scalar-staging.vector.im/_matrix/integrations/v1", \n\ "https://scalar-staging.vector.im/_matrix/integrations/v1", \n\
"https://scalar-staging.vector.im/api", \n\ "https://scalar-staging.vector.im/api", \n\
"https://scalar-staging.riot.im/scalar/api" \n\ "https://scalar-staging.riot.im/scalar/api" \n\
], \n\ ], \n\
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html", \n\ "integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html", \n\
"bug_report_endpoint_url": "https://riot.im/bugreports/submit", \n\ "bug_report_endpoint_url": "https://riot.im/bugreports/submit", \n\
"defaultCountryCode": "GB", \n\ "defaultCountryCode": "GB", \n\
"showLabsSettings": false, \n\ "showLabsSettings": false, \n\
"features": { \n\ "features": { \n\
"feature_pinning": "labs", \n\ "feature_pinning": "labs", \n\
"feature_custom_status": "labs", \n\ "feature_custom_status": "labs", \n\
"feature_custom_tags": "labs", \n\ "feature_custom_tags": "labs", \n\
"feature_state_counters": "labs" \n\ "feature_state_counters": "labs" \n\
}, \n\ }, \n\
"default_federate": true, \n\ "default_federate": true, \n\
"default_theme": "light", \n\ "default_theme": "light", \n\
"roomDirectory": { \n\ "roomDirectory": { \n\
"servers": [ \n\ "servers": [ \n\
"matrix.org" \n\ "matrix.org" \n\
] \n\ ] \n\
}, \n\ }, \n\
"welcomeUserId": "", \n\ "welcomeUserId": "", \n\
"piwik": { \n\ "piwik": { \n\
"url": "https://piwik.riot.im/", \n\ "url": "https://piwik.riot.im/", \n\
"whitelistedHSUrls": ["https://matrix.org"], \n\ "whitelistedHSUrls": ["https://matrix.org"], \n\
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"], \n\ "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], \n\
"siteId": 1 \n\ "siteId": 1 \n\
}, \n\ }, \n\
"enable_presence_by_hs_url": { \n\ "enable_presence_by_hs_url": { \n\
"https://matrix.org": false, \n\ "https://matrix.org": false, \n\
"https://matrix-client.matrix.org": false \n\ "https://matrix-client.matrix.org": false \n\
}, \n\ }, \n\
"settingDefaults": { \n\ "settingDefaults": { \n\
"breadcrumbs": true \n\ "breadcrumbs": true \n\
} \n\ } \n\
}' > webapp/config.json }' > webapp/config.json
FROM nginx FROM nginx
# Add "Service-Worker-Allowed: /" header so the worker can sniff traffic on this domain rather # Add "Service-Worker-Allowed: /" header so the worker can sniff traffic on this domain rather
# than just the path this gets hosted under. NB this newline echo syntax only works on bash. # than just the path this gets hosted under. NB this newline echo syntax only works on bash.
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
RUN echo $'\ RUN echo $'\
server { \n\ server { \n\
listen 80; \n\ listen 80; \n\
add_header \'Service-Worker-Allowed\' \'/\'; \n\ add_header \'Service-Worker-Allowed\' \'/\'; \n\
location / { \n\ location / { \n\
root /usr/share/nginx/html; \n\ root /usr/share/nginx/html; \n\
index index.html index.htm; \n\ index index.html index.htm; \n\
} \n\ } \n\
}' > /etc/nginx/conf.d/default.conf }' > /etc/nginx/conf.d/default.conf
RUN sed -i 's/}/ application\/wasm wasm;\n}/g' /etc/nginx/mime.types RUN sed -i 's/}/ application\/wasm wasm;\n}/g' /etc/nginx/mime.types
COPY --from=jsbuild /build/element-web-matthew-p2p/webapp /usr/share/nginx/html COPY --from=jsbuild /build/element-web-matthew-p2p/webapp /usr/share/nginx/html

View file

@ -37,7 +37,7 @@ If a job fails, click the "details" button and you should be taken to the job's
logs. logs.
![Click the details button on the failing build ![Click the details button on the failing build
step](https://raw.githubusercontent.com/matrix-org/dendrite/master/docs/images/details-button-location.jpg) step](https://raw.githubusercontent.com/matrix-org/dendrite/main/docs/images/details-button-location.jpg)
Scroll down to the failing step and you should see some log output. Scan the Scroll down to the failing step and you should see some log output. Scan the
logs until you find what it's complaining about, fix it, submit a new commit, logs until you find what it's complaining about, fix it, submit a new commit,
@ -57,7 +57,7 @@ significant amount of CPU and RAM.
Once the code builds, run [Sytest](https://github.com/matrix-org/sytest) Once the code builds, run [Sytest](https://github.com/matrix-org/sytest)
according to the guide in according to the guide in
[docs/sytest.md](https://github.com/matrix-org/dendrite/blob/master/docs/sytest.md#using-a-sytest-docker-image) [docs/sytest.md](https://github.com/matrix-org/dendrite/blob/main/docs/sytest.md#using-a-sytest-docker-image)
so you can see whether something is being broken and whether there are newly so you can see whether something is being broken and whether there are newly
passing tests. passing tests.
@ -94,4 +94,4 @@ For more general questions please use
We ask that everyone who contributes to the project signs off their We ask that everyone who contributes to the project signs off their
contributions, in accordance with the contributions, in accordance with the
[DCO](https://github.com/matrix-org/matrix-doc/blob/master/CONTRIBUTING.rst#sign-off). [DCO](https://github.com/matrix-org/matrix-doc/blob/main/CONTRIBUTING.rst#sign-off).

View file

@ -6,7 +6,7 @@ These are the instructions for setting up P2P Dendrite, current as of May 2020.
#### Build #### Build
- The `master` branch has a WASM-only binary for dendrite: `./cmd/dendritejs`. - The `main` branch has a WASM-only binary for dendrite: `./cmd/dendritejs`.
- Build it and copy assets to riot-web. - Build it and copy assets to riot-web.
``` ```
$ ./build-dendritejs.sh $ ./build-dendritejs.sh