From 8f88b5d25e96a506cdb61cf4f9e54e79f9a870d7 Mon Sep 17 00:00:00 2001 From: IUCCA Date: Thu, 4 Jan 2024 14:55:42 +0100 Subject: [PATCH 1/6] updated mautrix-signal docker image --- roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml b/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml index 1a34284f9..63026ad53 100644 --- a/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml +++ b/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml @@ -9,7 +9,7 @@ matrix_mautrix_signal_container_image_self_build_repo: "https://mau.dev/mautrix/ matrix_mautrix_signal_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_signal_version == 'latest' else matrix_mautrix_signal_version }}" # renovate: datasource=docker depName=dock.mau.dev/mautrix/signal -matrix_mautrix_signal_version: 18e006300885e7432f0791211dec77345ae974a2 +matrix_mautrix_signal_version: d4497f53b4e565f3d81949f8fec5de0770d083ff # See: https://mau.dev/mautrix/signal/container_registry matrix_mautrix_signal_docker_image: "{{ matrix_mautrix_signal_docker_image_name_prefix }}mautrix/signal:{{ matrix_mautrix_signal_docker_image_tag }}" From 9c3d8687bf57f6d2244067d0b9ef0d16f0e4a276 Mon Sep 17 00:00:00 2001 From: IUCCA Date: Thu, 4 Jan 2024 14:55:47 +0100 Subject: [PATCH 2/6] added new options to mautrix-signal config template --- .../templates/config.yaml.j2 | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/roles/custom/matrix-bridge-mautrix-signal/templates/config.yaml.j2 b/roles/custom/matrix-bridge-mautrix-signal/templates/config.yaml.j2 index f05ba4174..b695835ea 100644 --- a/roles/custom/matrix-bridge-mautrix-signal/templates/config.yaml.j2 +++ b/roles/custom/matrix-bridge-mautrix-signal/templates/config.yaml.j2 @@ -87,19 +87,29 @@ metrics: # Bridge config bridge: # Localpart template of MXIDs for Signal users. - # {{ '{{.}}' }} is replaced with the internal ID of the Signal user. - username_template: "{{ 'signal_{{.}}' }}" + # {{.}} is replaced with the internal ID of the Signal user. + username_template: signal_{{.}} # Displayname template for Signal users. This is also used as the room name in DMs if private_chat_portal_meta is enabled. - # Available variables: TODO - displayname_template: "{{ '{{.ProfileName}} (Signal)' }}" + # {{.ProfileName}} - The Signal profile name set by the user. + # {{.ContactName}} - The name for the user from your phone's contact list. This is not safe on multi-user instances. + # {{.PhoneNumber}} - The phone number of the user. + # {{.UUID}} - The UUID of the Signal user. + # {{.AboutEmoji}} - The emoji set by the user in their profile. + displayname_template: '{{or .ProfileName .PhoneNumber "Unknown user"}}' # Whether to explicitly set the avatar and room name for private chat portal rooms. # If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms. # If set to `always`, all DM rooms will have explicit names and avatars set. # If set to `never`, DM rooms will never have names and avatars set. private_chat_portal_meta: default + # Should avatars from the user's contact list be used? This is not safe on multi-user instances. + use_contact_avatars: false portal_message_buffer: 128 + + # Should the bridge create a space for each logged-in user and add bridged rooms to it? + # Users who logged in before turning this on should run `!signal sync-space` to create and fill the space for the first time. + personal_filtering_spaces: false # Should the bridge send a read receipt from the bridge bot when a message has been sent to Signal? delivery_receipts: false # Whether the bridge should send the message status as a custom com.beeper.message_send_status event. @@ -113,6 +123,9 @@ bridge: # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run. # This field will automatically be changed back to false after it, except if the config file is not writable. resend_bridge_info: false + # Send captions in the same message as images. This will send data compatible with both MSC2530. + # This is currently not supported in most clients. + caption_in_message: false # Whether or not created rooms should have federation enabled. # If false, created portal rooms will never be federated. federate_rooms: {{ matrix_mautrix_signal_federate_rooms|to_json }} From 0222e75c19ad5118a0573e09587b830db9b94e93 Mon Sep 17 00:00:00 2001 From: IUCCA Date: Thu, 4 Jan 2024 15:13:19 +0100 Subject: [PATCH 3/6] added new options to mautrix-signal config template --- .../matrix-bridge-mautrix-signal/templates/config.yaml.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/custom/matrix-bridge-mautrix-signal/templates/config.yaml.j2 b/roles/custom/matrix-bridge-mautrix-signal/templates/config.yaml.j2 index b695835ea..f827c25ef 100644 --- a/roles/custom/matrix-bridge-mautrix-signal/templates/config.yaml.j2 +++ b/roles/custom/matrix-bridge-mautrix-signal/templates/config.yaml.j2 @@ -87,15 +87,15 @@ metrics: # Bridge config bridge: # Localpart template of MXIDs for Signal users. - # {{.}} is replaced with the internal ID of the Signal user. - username_template: signal_{{.}} + # {{ '{{.}}' }} is replaced with the internal ID of the Signal user. + username_template: "{{ 'signal_{{.}}' }}" # Displayname template for Signal users. This is also used as the room name in DMs if private_chat_portal_meta is enabled. # {{.ProfileName}} - The Signal profile name set by the user. # {{.ContactName}} - The name for the user from your phone's contact list. This is not safe on multi-user instances. # {{.PhoneNumber}} - The phone number of the user. # {{.UUID}} - The UUID of the Signal user. # {{.AboutEmoji}} - The emoji set by the user in their profile. - displayname_template: '{{or .ProfileName .PhoneNumber "Unknown user"}}' + displayname_template: "{{ '{{.ProfileName}} (Signal)' }}" # Whether to explicitly set the avatar and room name for private chat portal rooms. # If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms. # If set to `always`, all DM rooms will have explicit names and avatars set. From 04de14a46245d4f2b1e81363dde581502969a6cc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:00:48 +0000 Subject: [PATCH 4/6] chore(deps): update vectorim/element-web docker tag to v1.11.53 --- roles/custom/matrix-client-element/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/custom/matrix-client-element/defaults/main.yml b/roles/custom/matrix-client-element/defaults/main.yml index 323f02540..2e094c701 100644 --- a/roles/custom/matrix-client-element/defaults/main.yml +++ b/roles/custom/matrix-client-element/defaults/main.yml @@ -11,7 +11,7 @@ matrix_client_element_container_image_self_build_repo: "https://github.com/eleme matrix_client_element_container_image_self_build_low_memory_system_patch_enabled: "{{ ansible_memtotal_mb < 4096 }}" # renovate: datasource=docker depName=vectorim/element-web -matrix_client_element_version: v1.11.52 +matrix_client_element_version: v1.11.53 matrix_client_element_docker_image: "{{ matrix_client_element_docker_image_name_prefix }}vectorim/element-web:{{ matrix_client_element_version }}" matrix_client_element_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_element_container_image_self_build else matrix_container_global_registry_prefix }}" From 2b2c1880cb604af13e45047d9c3d856c893d2d6d Mon Sep 17 00:00:00 2001 From: IUCCA <33322841+IUCCA@users.noreply.github.com> Date: Fri, 5 Jan 2024 00:09:40 +0100 Subject: [PATCH 5/6] Updated mautrix-signal docker image --- roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml b/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml index 63026ad53..e7d98f4e8 100644 --- a/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml +++ b/roles/custom/matrix-bridge-mautrix-signal/defaults/main.yml @@ -9,7 +9,7 @@ matrix_mautrix_signal_container_image_self_build_repo: "https://mau.dev/mautrix/ matrix_mautrix_signal_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_signal_version == 'latest' else matrix_mautrix_signal_version }}" # renovate: datasource=docker depName=dock.mau.dev/mautrix/signal -matrix_mautrix_signal_version: d4497f53b4e565f3d81949f8fec5de0770d083ff +matrix_mautrix_signal_version: a91fc7028c54482ec6c581784d553199dfff93ff # See: https://mau.dev/mautrix/signal/container_registry matrix_mautrix_signal_docker_image: "{{ matrix_mautrix_signal_docker_image_name_prefix }}mautrix/signal:{{ matrix_mautrix_signal_docker_image_tag }}" From 06f561f0dd03568a5a195a501e803884d1880eaf Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Fri, 5 Jan 2024 07:04:19 +0200 Subject: [PATCH 6/6] Build latest/main branch of rust-synapse-compress-state for non-amd64 users The latest tagged release (v0.1.3) does not pin any versions in its Dockerfile and as such fails to build right now. The `main` branch of rust-synapse-compress-state has already addressed this and is buildable, but there's no tagged release yet. Reported here: https://github.com/matrix-org/rust-synapse-compress-state/issues/134 --- .../defaults/main.yml | 2 +- .../tasks/install.yml | 53 +++++++++++-------- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/roles/custom/matrix-synapse-auto-compressor/defaults/main.yml b/roles/custom/matrix-synapse-auto-compressor/defaults/main.yml index 9b5bf0930..4ad7887bd 100644 --- a/roles/custom/matrix-synapse-auto-compressor/defaults/main.yml +++ b/roles/custom/matrix-synapse-auto-compressor/defaults/main.yml @@ -6,7 +6,7 @@ matrix_synapse_auto_compressor_enabled: true # renovate: datasource=docker depName=registry.gitlab.com/etke.cc/rust-synapse-compress-state -matrix_synapse_auto_compressor_version: v0.1.3 +matrix_synapse_auto_compressor_version: "{{ 'latest' if matrix_synapse_auto_compressor_container_image_self_build else 'v0.1.3' }}" matrix_synapse_auto_compressor_base_path: "{{ matrix_base_data_path }}/synapse-auto-compressor" matrix_synapse_auto_compressor_container_src_files_path: "{{ matrix_synapse_auto_compressor_base_path }}/container-src" diff --git a/roles/custom/matrix-synapse-auto-compressor/tasks/install.yml b/roles/custom/matrix-synapse-auto-compressor/tasks/install.yml index be4d5aadb..7e1bbf55f 100644 --- a/roles/custom/matrix-synapse-auto-compressor/tasks/install.yml +++ b/roles/custom/matrix-synapse-auto-compressor/tasks/install.yml @@ -34,28 +34,39 @@ delay: "{{ devture_playbook_help_container_retries_delay }}" until: result is not failed -- name: Ensure synapse-auto-compressor repository is present on self-build - ansible.builtin.git: - repo: "{{ matrix_synapse_auto_compressor_container_image_self_build_repo }}" - version: "{{ matrix_synapse_auto_compressor_container_image_self_build_version }}" - dest: "{{ matrix_synapse_auto_compressor_container_src_files_path }}" - force: "yes" - become: true - become_user: "{{ matrix_user_username }}" - register: matrix_synapse_auto_compressor_git_pull_results - when: "matrix_synapse_auto_compressor_container_image_self_build | bool" -- name: Ensure synapse-auto-compressor image is built - community.docker.docker_image: - name: "{{ matrix_synapse_auto_compressor_container_image }}" - source: build - force_source: "{{ matrix_synapse_auto_compressor_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" - force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mailer_git_pull_results.changed }}" - build: - dockerfile: Dockerfile - path: "{{ matrix_synapse_auto_compressor_container_src_files_path }}" - pull: true - when: "matrix_synapse_auto_compressor_container_image_self_build | bool" +- when: "matrix_synapse_auto_compressor_container_image_self_build | bool" + block: + - name: Ensure synapse-auto-compressor repository is present on self-build + ansible.builtin.git: + repo: "{{ matrix_synapse_auto_compressor_container_image_self_build_repo }}" + version: "{{ matrix_synapse_auto_compressor_container_image_self_build_version }}" + dest: "{{ matrix_synapse_auto_compressor_container_src_files_path }}" + force: "yes" + become: true + become_user: "{{ matrix_user_username }}" + register: matrix_synapse_auto_compressor_git_pull_results + + - name: Check if synapse-auto-compressor image exists + ansible.builtin.command: "{{ devture_systemd_docker_base_host_command_docker }} images --quiet --filter 'reference={{ matrix_synapse_auto_compressor_container_image }}'" + register: matrix_synapse_auto_compressor_container_image_check_result + changed_when: false + + # Invoking the `docker build` command here, instead of calling the `docker_image` Ansible module, + # because the latter does not support BuildKit. + # See: https://github.com/ansible-collections/community.general/issues/514 + - name: Ensure synapse-auto-compressor image is built + ansible.builtin.shell: + chdir: "{{ matrix_synapse_auto_compressor_container_src_files_path }}" + cmd: | + {{ devture_systemd_docker_base_host_command_docker }} build \ + -t "{{ matrix_synapse_auto_compressor_container_image }}" \ + -f Dockerfile \ + . + environment: + DOCKER_BUILDKIT: 1 + changed_when: true + when: "matrix_synapse_auto_compressor_git_pull_results.changed | bool or matrix_synapse_auto_compressor_container_image_check_result.stdout == ''" - name: Ensure matrix-synapse-auto-compressor container network is created community.general.docker_network: