From 452e371d1249d0ef95f236bc316d06201c01b0fd Mon Sep 17 00:00:00 2001 From: Phan Trung Thanh Date: Fri, 29 Nov 2024 16:27:14 +0100 Subject: [PATCH] remove extra tab for indentation (#613) --- synapse_rock/rockcraft.yaml | 344 ++++++++++++++++++------------------ 1 file changed, 172 insertions(+), 172 deletions(-) diff --git a/synapse_rock/rockcraft.yaml b/synapse_rock/rockcraft.yaml index 29a31d39..63248fac 100644 --- a/synapse_rock/rockcraft.yaml +++ b/synapse_rock/rockcraft.yaml @@ -11,175 +11,175 @@ license: Apache-2.0 platforms: amd64: parts: - scripts: - plugin: dump - source: scripts - organize: - "*": usr/local/bin/ - override-prime: | - craftctl default - chmod -R +x usr/local/bin/* - cron: - after: - - scripts - stage-packages: - - cron - plugin: dump - source: cron - organize: - "cron.hourly/*": /etc/cron.hourly - "cron.daily/*": /etc/cron.daily - "cron.weekly/*": /etc/cron.weekly - "cron.monthly/*": /etc/cron.monthly - override-prime: | - craftctl default - chmod -R +x etc/cron.* - add-user: - plugin: nil - overlay-script: | - groupadd -R $CRAFT_OVERLAY --gid 991 synapse - useradd -R $CRAFT_OVERLAY --system --gid 991 --uid 991 --home /srv/synapse -m synapse - chmod 755 $CRAFT_OVERLAY/etc - groupadd -R $CRAFT_OVERLAY --gid 2000 nginx - useradd -R $CRAFT_OVERLAY --system --gid 2000 --uid 2000 --no-create-home nginx - nginx-conf: - plugin: dump - source: etc - organize: - nginx.conf: etc/nginx/nginx.conf - worker_location.conf: etc/nginx/worker_location.conf - abuse_report_location.conf.template: etc/nginx/abuse_report_location.conf.template - abuse_report_location.conf: etc/nginx/abuse_report_location.conf - main_location.conf.template: etc/nginx/main_location.conf.template - main_location.conf: etc/nginx/main_location.conf - nginx: - stage-packages: - - logrotate - - nginx - - sed - plugin: nil - override-build: | - craftctl default - rm $CRAFT_PART_INSTALL/etc/nginx/nginx.conf - override-prime: | - craftctl default - mkdir run - synapse: - build-packages: - - build-essential - - curl - - git - - libffi-dev - - libicu-dev - - libjpeg-dev - - libpq-dev - - libssl-dev - - libwebp-dev - - libxml++2.6-dev - - libxslt1-dev - - openssl - - pkg-config - - python3-dev - - python3-pip - - python3-setuptools - - python3-venv - - zlib1g-dev - stage-packages: - - coreutils - - curl - - gosu - - gpg - - gpg-agent - - libffi-dev - - libicu74 - - libjemalloc2 - - libjpeg-turbo8 - - libpq5 - - libssl-dev - - libwebp7 - - openssl - - python3 - - python3-pip - - xmlsec1 - stage-snaps: - - aws-cli - - mjolnir/latest/edge - plugin: nil - source: https://github.com/element-hq/synapse/ - source-type: git - source-tag: v1.120.0 - build-environment: - - RUST_VERSION: "1.76.0" - - POETRY_VERSION: "1.7.1" - override-build: | - craftctl default - export RUSTUP_HOME=/rust - export CARGO_HOME=/cargo - export PATH=/cargo/bin:/rust/bin:$PATH - export CARGO_NET_GIT_FETCH_WITH_CLI=false - mkdir -p /rust /cargo /synapse /install - curl -m 30 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain=$RUST_VERSION --profile minimal - /rust/toolchains/$RUST_VERSION-x86_64-unknown-linux-gnu/bin/rustc -V > $CRAFT_PART_INSTALL/rust-version - # - # install synapse requirements - pip3 install --break-system-packages --root-user-action=ignore "poetry==$POETRY_VERSION" - cp pyproject.toml poetry.lock /synapse/ - $CRAFT_PART_INSTALL/usr/local/bin/poetry export --extras all -o /synapse/requirements.txt - pip3 install --break-system-packages --prefix="/install" --no-deps --no-warn-script-location -r /synapse/requirements.txt - # - # install synapse stats exporter - git clone https://github.com/canonical/synapse_stats_exporter.git - cd synapse_stats_exporter - pip3 --python=/usr/bin/python3 install --break-system-packages --prefix="/install" --no-warn-script-location -U . - cd .. - # - # install s3 storage provider - git clone --branch v1.4.0 --depth 1 https://github.com/matrix-org/synapse-s3-storage-provider - cd synapse-s3-storage-provider - pip3 install --break-system-packages --prefix="/install" --no-warn-script-location -U . - cd .. - # - # install synapse invite checker - git clone https://git.buechner.me/nbuechner/synapse-invite-checker - cd synapse-invite-checker - git checkout ab6c8b78d78c4cbf31e1a30981ae45c09285b34a - pip3 install --break-system-packages --prefix="/install" --no-warn-script-location -U . - cd .. - # - # install synapse - cp -r synapse /synapse/ - cp -r rust /synapse/ - cp pyproject.toml README.rst build_rust.py Cargo.toml Cargo.lock /synapse/ - pip3 install --break-system-packages --prefix="/install" --no-deps --no-warn-script-location /synapse[all]; - # fix issue while creating file - # https://github.com/element-hq/synapse/issues/17882 - pip3 install --break-system-packages --prefix="/install" --force-reinstall -v "Twisted==24.7.0" - cp docker/start.py $CRAFT_PART_INSTALL/ - chmod 755 $CRAFT_PART_INSTALL/start.py - cp -r docker/conf $CRAFT_PART_INSTALL/ - cp -r /install/local/* $CRAFT_PART_INSTALL/usr/local/ - mkdir -p $CRAFT_PART_INSTALL/usr/local/attributemaps - chmod 755 $CRAFT_PART_INSTALL/usr/local/attributemaps - rm -rf $CRAFT_PART_INSTALL/aws/dist/awscli/examples/ - overlay-packages: - - ca-certificates - - libjemalloc2 - patches: - plugin: dump - after: [synapse] - source: patches - organize: - "*": srv/patches/ - patch-start: - after: - - patches - plugin: nil - build-packages: - - git - override-stage: | - patch -f -u ./start.py -i srv/patches/start.patch - synapse-conf: - plugin: dump - source: attributemaps - organize: - login_ubuntu.py: /usr/local/attributemaps/login_ubuntu.py + scripts: + plugin: dump + source: scripts + organize: + "*": usr/local/bin/ + override-prime: | + craftctl default + chmod -R +x usr/local/bin/* + cron: + after: + - scripts + stage-packages: + - cron + plugin: dump + source: cron + organize: + "cron.hourly/*": /etc/cron.hourly + "cron.daily/*": /etc/cron.daily + "cron.weekly/*": /etc/cron.weekly + "cron.monthly/*": /etc/cron.monthly + override-prime: | + craftctl default + chmod -R +x etc/cron.* + add-user: + plugin: nil + overlay-script: | + groupadd -R $CRAFT_OVERLAY --gid 991 synapse + useradd -R $CRAFT_OVERLAY --system --gid 991 --uid 991 --home /srv/synapse -m synapse + chmod 755 $CRAFT_OVERLAY/etc + groupadd -R $CRAFT_OVERLAY --gid 2000 nginx + useradd -R $CRAFT_OVERLAY --system --gid 2000 --uid 2000 --no-create-home nginx + nginx-conf: + plugin: dump + source: etc + organize: + nginx.conf: etc/nginx/nginx.conf + worker_location.conf: etc/nginx/worker_location.conf + abuse_report_location.conf.template: etc/nginx/abuse_report_location.conf.template + abuse_report_location.conf: etc/nginx/abuse_report_location.conf + main_location.conf.template: etc/nginx/main_location.conf.template + main_location.conf: etc/nginx/main_location.conf + nginx: + stage-packages: + - logrotate + - nginx + - sed + plugin: nil + override-build: | + craftctl default + rm $CRAFT_PART_INSTALL/etc/nginx/nginx.conf + override-prime: | + craftctl default + mkdir run + synapse: + build-packages: + - build-essential + - curl + - git + - libffi-dev + - libicu-dev + - libjpeg-dev + - libpq-dev + - libssl-dev + - libwebp-dev + - libxml++2.6-dev + - libxslt1-dev + - openssl + - pkg-config + - python3-dev + - python3-pip + - python3-setuptools + - python3-venv + - zlib1g-dev + stage-packages: + - coreutils + - curl + - gosu + - gpg + - gpg-agent + - libffi-dev + - libicu74 + - libjemalloc2 + - libjpeg-turbo8 + - libpq5 + - libssl-dev + - libwebp7 + - openssl + - python3 + - python3-pip + - xmlsec1 + stage-snaps: + - aws-cli + - mjolnir/latest/edge + plugin: nil + source: https://github.com/element-hq/synapse/ + source-type: git + source-tag: v1.120.0 + build-environment: + - RUST_VERSION: "1.76.0" + - POETRY_VERSION: "1.7.1" + override-build: | + craftctl default + export RUSTUP_HOME=/rust + export CARGO_HOME=/cargo + export PATH=/cargo/bin:/rust/bin:$PATH + export CARGO_NET_GIT_FETCH_WITH_CLI=false + mkdir -p /rust /cargo /synapse /install + curl -m 30 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain=$RUST_VERSION --profile minimal + /rust/toolchains/$RUST_VERSION-x86_64-unknown-linux-gnu/bin/rustc -V > $CRAFT_PART_INSTALL/rust-version + # + # install synapse requirements + pip3 install --break-system-packages --root-user-action=ignore "poetry==$POETRY_VERSION" + cp pyproject.toml poetry.lock /synapse/ + $CRAFT_PART_INSTALL/usr/local/bin/poetry export --extras all -o /synapse/requirements.txt + pip3 install --break-system-packages --prefix="/install" --no-deps --no-warn-script-location -r /synapse/requirements.txt + # + # install synapse stats exporter + git clone https://github.com/canonical/synapse_stats_exporter.git + cd synapse_stats_exporter + pip3 --python=/usr/bin/python3 install --break-system-packages --prefix="/install" --no-warn-script-location -U . + cd .. + # + # install s3 storage provider + git clone --branch v1.4.0 --depth 1 https://github.com/matrix-org/synapse-s3-storage-provider + cd synapse-s3-storage-provider + pip3 install --break-system-packages --prefix="/install" --no-warn-script-location -U . + cd .. + # + # install synapse invite checker + git clone https://git.buechner.me/nbuechner/synapse-invite-checker + cd synapse-invite-checker + git checkout ab6c8b78d78c4cbf31e1a30981ae45c09285b34a + pip3 install --break-system-packages --prefix="/install" --no-warn-script-location -U . + cd .. + # + # install synapse + cp -r synapse /synapse/ + cp -r rust /synapse/ + cp pyproject.toml README.rst build_rust.py Cargo.toml Cargo.lock /synapse/ + pip3 install --break-system-packages --prefix="/install" --no-deps --no-warn-script-location /synapse[all]; + # fix issue while creating file + # https://github.com/element-hq/synapse/issues/17882 + pip3 install --break-system-packages --prefix="/install" --force-reinstall -v "Twisted==24.7.0" + cp docker/start.py $CRAFT_PART_INSTALL/ + chmod 755 $CRAFT_PART_INSTALL/start.py + cp -r docker/conf $CRAFT_PART_INSTALL/ + cp -r /install/local/* $CRAFT_PART_INSTALL/usr/local/ + mkdir -p $CRAFT_PART_INSTALL/usr/local/attributemaps + chmod 755 $CRAFT_PART_INSTALL/usr/local/attributemaps + rm -rf $CRAFT_PART_INSTALL/aws/dist/awscli/examples/ + overlay-packages: + - ca-certificates + - libjemalloc2 + patches: + plugin: dump + after: [synapse] + source: patches + organize: + "*": srv/patches/ + patch-start: + after: + - patches + plugin: nil + build-packages: + - git + override-stage: | + patch -f -u ./start.py -i srv/patches/start.patch + synapse-conf: + plugin: dump + source: attributemaps + organize: + login_ubuntu.py: /usr/local/attributemaps/login_ubuntu.py