From 9a6d018337c7d83193282830ff9d9e9b0ae3a733 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 7 Feb 2023 21:18:48 +0000 Subject: [PATCH 01/57] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1a515b3..16affce 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # GoToSocial for YunoHost -[![Integration level](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Working status](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Working status](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) [![Install GoToSocial with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 7cdbd08..f1f68c7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # GoToSocial pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) [![Installer GoToSocial avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial) *[Read this readme in english.](./README.md)* From 93dd1f81ca8eca263fb7d7dcf8bdc972778ec096 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 18:35:16 +0100 Subject: [PATCH 02/57] Preparing for v0.7.1 --- conf/config.yaml | 191 ++++++++++++++++++++++++++++++++++++++++++++-- config_panel.toml | 14 +++- scripts/upgrade | 12 +++ 3 files changed, 208 insertions(+), 9 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index 3a1c976..c4b3895 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -1,5 +1,5 @@ # GoToSocial -# Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org +# Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -77,9 +77,11 @@ protocol: "https" # String. Address to bind the GoToSocial server to. # This can be an IPv4 address or an IPv6 address (surrounded in square brackets), or a hostname. -# Default value will bind to all interfaces. -# You probably won't need to change this unless you're setting GoToSocial up in some fancy way or -# you have specific networking requirements. +# The default value will bind to all interfaces, which makes the server +# accessible by other machines. For most setups there is no need to change this. +# If you are using GoToSocial in a reverse proxy setup with the proxy running on +# the same machine, you will want to set this to "localhost" or an equivalent, +# so that the proxy can't be bypassed. # Examples: ["0.0.0.0", "172.128.0.16", "localhost", "[::]", "[2001:db8::fed1]"] # Default: "0.0.0.0" bind-address: "0.0.0.0" @@ -163,6 +165,125 @@ db-tls-mode: "disable" # Default: "" db-tls-ca-cert: "" +# Int. Number to multiply by CPU count to set permitted total of open database connections (in-use and idle). +# You can use this setting to tune your database connection behavior, though most admins won't need to touch it. +# +# Example values for multiplier 8: +# +# 1 cpu = 08 open connections +# 2 cpu = 16 open connections +# 4 cpu = 32 open connections +# +# Example values for multiplier 4: +# +# 1 cpu = 04 open connections +# 2 cpu = 08 open connections +# 4 cpu = 16 open connections +# +# A multiplier of 8 is a sensible default, but you may wish to increase this for instances +# running on very performant hardware, or decrease it for instances using v. slow CPUs. +# +# If you set the multiplier to less than 1, only one open connection will be used regardless of cpu count. +# +# PLEASE NOTE!!: This setting currently only applies for Postgres. SQLite will always use 1 connection regardless +# of what is set here. This behavior will change in future when we implement better SQLITE_BUSY handling. +# See https://github.com/superseriousbusiness/gotosocial/issues/1407 for more details. +# +# Examples: [16, 8, 10, 2] +# Default: 8 +db-max-open-conns-multiplier: 8 + +# String. SQLite journaling mode. +# SQLite only -- unused otherwise. +# If set to empty string, the sqlite default will be used. +# See: https://www.sqlite.org/pragma.html#pragma_journal_mode +# Examples: ["DELETE", "TRUNCATE", "PERSIST", "MEMORY", "WAL", "OFF"] +# Default: "WAL" +db-sqlite-journal-mode: "WAL" + +# String. SQLite synchronous mode. +# SQLite only -- unused otherwise. +# If set to empty string, the sqlite default will be used. +# See: https://www.sqlite.org/pragma.html#pragma_synchronous +# Examples: ["OFF", "NORMAL", "FULL", "EXTRA"] +# Default: "NORMAL" +db-sqlite-synchronous: "NORMAL" + +# Byte size. SQlite cache size. +# SQLite only -- unused otherwise. +# If set to empty string or zero, the sqlite default (2MiB) will be used. +# See: https://www.sqlite.org/pragma.html#pragma_cache_size +# Examples: ["0", "2MiB", "8MiB", "64MiB"] +# Default: "8MiB" +db-sqlite-cache-size: "8MiB" + +# Duration. SQlite busy timeout. +# SQLite only -- unused otherwise. +# If set to empty string or zero, the sqlite default will be used. +# See: https://www.sqlite.org/pragma.html#pragma_busy_timeout +# Examples: ["0s", "1s", "30s", "1m", "5m"] +# Default: "5s" +db-sqlite-busy-timeout: "5m" + +cache: + gts: + ########################### + #### DATABASE CACHES ###### + ########################### + # + # Database cache configuration: + # + # Allows configuration of caches used + # when loading GTS models from the database. + # + # max-size = maximum cached objects count + # ttl = cached object lifetime + # sweep-freq = frequency to look for stale cache objects + + account-max-size: 100 + account-ttl: "5m" + account-sweep-freq: "10s" + + block-max-size: 100 + block-ttl: "5m" + block-sweep-freq: "10s" + + domain-block-max-size: 1000 + domain-block-ttl: "24h" + domain-block-sweep-freq: "1m" + + emoji-max-size: 500 + emoji-ttl: "5m" + emoji-sweep-freq: "10s" + + emoji-category-max-size: 100 + emoji-category-ttl: "5m" + emoji-category-sweep-freq: "10s" + + mention-max-size: 500 + mention-ttl: "5m" + mention-sweep-freq: "10s" + + notification-max-size: 500 + notification-ttl: "5m" + notification-sweep-freq: "10s" + + report-max-size: 100 + report-ttl: "5m" + report-sweep-freq: "10s" + + status-max-size: 500 + status-ttl: "5m" + status-sweep-freq: "10s" + + tombstone-max-size: 100 + tombstone-ttl: "5m" + tombstone-sweep-freq: "10s" + + user-max-size: 100 + user-ttl: "5m" + user-sweep-freq: "10s" + ###################### ##### WEB CONFIG ##### ###################### @@ -200,6 +321,12 @@ instance-expose-peers: __INSTANCE_EXPOSE_PEERS__ # Default: false instance-expose-suspended: __INSTANCE_EXPOSE_SUSPENDED__ +# Bool. Allow unauthenticated users to view /about/suspended, +# showing the HTML rendered list of instances that this instance blocks/suspends. +# Options: [true, false] +# Default: false +instance-expose-suspended-web: __INSTANCE_EXPOSE_SUSPENDED_WEB__ + # Bool. Allow unauthenticated users to make queries to /api/v1/timelines/public in order # to see a list of public posts on this server. Even if set to 'false', then authenticated # users (members of the instance) will still be able to query the endpoint. @@ -332,6 +459,8 @@ storage-local-base-path: "__DATADIR__" # String. API endpoint of the S3 compatible service. # Only required when running with the s3 storage backend. # Examples: ["minio:9000", "s3.nl-ams.scw.cloud", "s3.us-west-002.backblazeb2.com"] +# GoToSocial uses "DNS-style" when accessing buckets. +# If you are using Scaleways object storage, please remove the "bucket name" from the endpoint address # Default: "" storage-s3-endpoint: "__STORAGE_S3_ENDPOINT__" @@ -340,6 +469,13 @@ storage-s3-endpoint: "__STORAGE_S3_ENDPOINT__" # Default: false storage-s3-proxy: __STORAGE_S3_PROXY__ +# Bool. Use SSL for S3 connections. +# +# Only set this to 'false' when testing locally. +# +# Default: true +storage-s3-use-ssl: true + # String. Access key part of the S3 credentials. # Consider setting this value using environment variables to avoid leaking it via the config file # Only required when running with the s3 storage backend. @@ -491,6 +627,13 @@ oidc-scopes: - "profile" - "groups" +# Bool. Link OIDC authenticated users to existing ones based on their email address. +# This is mostly intended for migration purposes if you were running previous versions of GTS +# which only correlated users with their email address. Should be set to false for most usecases. +# Options: [true, false] +# Default: false +oidc-link-existing: false + ####################### ##### SMTP CONFIG ##### ####################### @@ -578,9 +721,8 @@ syslog-address: "localhost:514" # Default: "lax" advanced-cookies-samesite: "__ADVANCED_COOKIES_SAMESITE__" -# Int. Amount of requests to permit from a single IP address within a span of 5 minutes. -# If this amount is exceeded, a 429 HTTP error code will be returned. -# See https://docs.gotosocial.org/en/latest/api/swagger/#rate-limit. +# Int. Amount of requests to permit per router grouping from a single IP address within +# a span of 5 minutes. If this amount is exceeded, a 429 HTTP error code will be returned. # # If you find yourself adjusting this limit because it's regularly being exceeded, # you should first verify that your settings for `trusted-proxies` (above) are correct. @@ -594,3 +736,38 @@ advanced-cookies-samesite: "__ADVANCED_COOKIES_SAMESITE__" # Examples: [1000, 500, 0] # Default: 1000 advanced-rate-limit-requests: __ADVANCED_RATE_LIMIT_REQUESTS__ + +# Int. Amount of open requests to permit per CPU, per router grouping, before applying http +# request throttling. Any requests beyond the calculated limit are held in a backlog queue for +# up to 30 seconds before either being processed or timing out. Requests that don't fit in the backlog +# queue will have status 503 returned to them, and the header 'Retry-After' will be set to 30 seconds. +# +# Open request limit is available CPUs * multiplier; backlog queue limit is limit * multiplier. +# +# Example values for multiplier 8: +# +# 1 cpu = 08 open, 064 backlog +# 2 cpu = 16 open, 128 backlog +# 4 cpu = 32 open, 256 backlog +# +# Example values for multiplier 4: +# +# 1 cpu = 04 open, 016 backlog +# 2 cpu = 08 open, 032 backlog +# 4 cpu = 16 open, 064 backlog +# +# A multiplier of 8 is a sensible default, but you may wish to increase this for instances +# running on very performant hardware, or decrease it for instances using v. slow CPUs. +# +# If you set this to 0 or less, http request throttling will be disabled entirely. +# +# Examples: [8, 4, 9, 0] +# Default: 8 +advanced-throttling-multiplier: 8 + +# Duration. Time period to use as the "retry-after" header value in response to throttled requests. +# Minimum resolution is 1 second. +# +# Examples: [30s, 10s, 5s, 1m] +# Default: 30s +advanced-throttling-retry-after: "30s" \ No newline at end of file diff --git a/config_panel.toml b/config_panel.toml index 681af8a..9541c0f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -245,6 +245,16 @@ help.en = "Allow unauthenticated users to make queries to /api/v1/instance/peers help.fr = "Permet aux utilisateurs non authentifiés d'effectuer des requêtes API sur /api/v1/instance/peers?filter=suspended afin de voir la liste des instances bloquées ou suspendues par votre instance. Cela permettra également aux utilisateurs non authentifiés de consulter la liste via l'interface Web. Même s'il est défini à 'false', les utilisateurs authentifiés (membres de l'instance) seront toujours en mesure d'interroger l'API." type = "select" +[main.instance.instance_expose_suspended_web] +ask.en = "API: Expose suspended on Web (/about/suspended)?" +ask.fr = "API : Exposer les instances bloquées sur le Web (/about/suspended) ?" +bind = "instance-expose-suspended_web:__FINALPATH__/config.yaml" +choices = ["true", "false"] +default = "false" +help.en = "Allow unauthenticated users to view /about/suspended, showing the HTML rendered list of instances that this instance blocks/suspends." +help.fr = "Permet aux utilisateurs non authentifiés d'afficher /about/suspended, montrant la liste rendue en HTML des instances que cette instance bloque ou suspend." +type = "select" + [main.instance.instance_expose_public_timeline] ask.en = "API: Expose public timeline?" ask.fr = "API : Exposer la timeline publique ?" @@ -296,8 +306,8 @@ type = "select" ask.en = "Amount of requests to permit from a single IP address within a span of 5 minutes." ask.fr = "Nombre de requêtes autorisées à partir d'une seule adresse IP dans un délai de 5 minutes." bind = "advanced-rate-limit-requests:__FINALPATH__/config.yaml" -default = "1000" -help.en = """Default: 1000\ +default = "300" +help.en = """Default: 300\ If this amount is exceeded, a 429 HTTP error code will be returned.\ See https://docs.gotosocial.org/en/latest/api/swagger/#rate-limit.\ If you find yourself adjusting this limit because it's regularly being exceeded, you should first verify that your settings for `trusted-proxies` are correct.\ diff --git a/scripts/upgrade b/scripts/upgrade index 3856f6d..a97c398 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -225,6 +225,18 @@ then ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests" fi +# Upgrade from <0.7.1~ynh1: +if ynh_compare_current_package_version --comparison lt --version 0.7.1~ynh1 || [ -z "$instance_expose_suspended_web" ] +then + # updating parameters + advanced_rate_limit_requests="300" + # declaration of new parameter + instance_expose_suspended_web="false" + # registration of parameters + ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests" + ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web" +fi + #================================================= # CREATE DEDICATED USER #================================================= From d0972002b38e9a072182b4d729b95e9b47243570 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 18 Feb 2023 17:35:22 +0000 Subject: [PATCH 03/57] Auto-update README --- README.md | 3 ++- README_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1a515b3..3cf7c29 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # GoToSocial for YunoHost -[![Integration level](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Working status](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Working status](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) + [![Install GoToSocial with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 7cdbd08..1862441 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # GoToSocial pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) + [![Installer GoToSocial avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial) *[Read this readme in english.](./README.md)* From d038afb395bba9710077e126a44bd4219e867936 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 18 Feb 2023 17:41:05 +0000 Subject: [PATCH 04/57] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 16affce..3cf7c29 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # GoToSocial for YunoHost [![Integration level](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Working status](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) + [![Install GoToSocial with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index f1f68c7..1862441 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # GoToSocial pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) + [![Installer GoToSocial avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial) *[Read this readme in english.](./README.md)* From 526c78f3b290ce6a2cdb9b5056d76b017209dbbc Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 20:20:14 +0100 Subject: [PATCH 05/57] adding & modifying parameters for v0.7.1 --- scripts/install | 4 +++- scripts/restore | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b995941..9aedefc 100755 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,7 @@ accounts_allow_custom_css="false" instance_expose_peers="false" instance_expose_suspended="false" +instance_expose_suspended_web="false" instance_expose_public_timeline="false" instance_deliver_to_shared_inboxes="true" @@ -71,7 +72,7 @@ statuses_poll_option_max_chars="50" statuses_media_max_files="6" advanced_cookies_samesite="lax" -advanced_rate_limit_requests="1000" +advanced_rate_limit_requests="300" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -109,6 +110,7 @@ ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="$accou ynh_app_setting_set --app="$app" --key=instance_expose_peers --value="$instance_expose_peers" ynh_app_setting_set --app="$app" --key=instance_expose_suspended --value="$instance_expose_suspended" +ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web" ynh_app_setting_set --app="$app" --key=instance_expose_public_timeline --value="$instance_expose_public_timeline" ynh_app_setting_set --app="$app" --key=instance_deliver_to_shared_inboxes --value="$instance_deliver_to_shared_inboxes" diff --git a/scripts/restore b/scripts/restore index 7eff40c..0072052 100755 --- a/scripts/restore +++ b/scripts/restore @@ -46,6 +46,7 @@ datadir=$(ynh_app_setting_get --app="$app" --key=datadir) instance_expose_peers=$(ynh_app_setting_get --app="$app" --key=instance_expose_peers) instance_expose_suspended=$(ynh_app_setting_get --app="$app" --key=instance_expose_suspended) +instance_expose_suspended_web=$(ynh_app_setting_get --app="$app" --key=instance_expose_suspended_web) instance_expose_public_timeline=$(ynh_app_setting_get --app="$app" --key=instance_expose_public_timeline) instance_deliver_to_shared_inboxes=$(ynh_app_setting_get --app="$app" --key=instance_deliver_to_shared_inboxes) From 6450b761e0c7d5b2f6831346d1cb5b571a509abb Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 21:48:51 +0100 Subject: [PATCH 06/57] Expose 'account-domain' setting at install --- conf/config.yaml | 2 +- manifest.json | 16 +++++++++++++++- scripts/install | 2 ++ scripts/restore | 1 + scripts/upgrade | 2 ++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index c4b3895..e8e4835 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -65,7 +65,7 @@ host: "__DOMAIN__" # https://docs.gotosocial.org/installation_guide/advanced/#can-i-host-my-instance-at-fediexampleorg-but-have-just-exampleorg-in-my-username # # Default: "" -account-domain: "" +account-domain: "__ACCOUNT_DOMAIN__" # String. Protocol to use for the server. Only change to http for local testing! # This should be the protocol part of the URI that your server is actually reachable on. So even if you're diff --git a/manifest.json b/manifest.json index 983e871..90f0382 100644 --- a/manifest.json +++ b/manifest.json @@ -41,7 +41,21 @@ }, { "name": "domain", - "type": "domain" + "type": "domain", + "example": "gts.example.org" + }, + { + "name": "account_domain", + "type": "domain", + "ask": { + "en": "Domain to use when federating profiles.", + "fr": "Domaine à utiliser lors de la fédération des profils." + }, + "help": { + "en": "This is useful when you want your server to be at eg., \"gts.example.org\", but you want the domain on accounts to be \"example.org\" because it looks better or is just shorter/easier to remember. ⚠️ WARNING: This cannot be changed after installation, as the main domain parameter.", + "fr": "Cette option est utile lorsque vous souhaitez que votre serveur se trouve à l'adresse \"gts.example.org\", par exemple, mais que vous souhaitez que le domaine des comptes soit \"example.org\" parce que c'est plus joli, plus court ou plus facile à retenir. ⚠️ ATTENTION : Ce paramètre ne peut etre modifié après installation, tout comme le paramètre du domaine principal." + }, + "example": "example.org" }, { "name": "admin", diff --git a/scripts/install b/scripts/install index 9aedefc..eb257ec 100755 --- a/scripts/install +++ b/scripts/install @@ -29,6 +29,7 @@ app="$YNH_APP_INSTANCE_NAME" landing_page_user="" domain="$YNH_APP_ARG_DOMAIN" +account_domain"$YNH_APP_ARG_ACCOUNT_DOMAIN" path_url="/" client_max_body_size="100M" @@ -95,6 +96,7 @@ ynh_app_setting_set --app="$app" --key=final_path --value="$final_path" ynh_app_setting_set --app="$app" --key=landing_page_user --value="$landing_page_user" ynh_app_setting_set --app="$app" --key=domain --value="$domain" +ynh_app_setting_set --app="$app" --key=account_domain --value="$account_domain" ynh_app_setting_set --app="$app" --key=path_url --value="$path_url" ynh_app_setting_set --app="$app" --key=client_max_body_size --value="$client_max_body_size" diff --git a/scripts/restore b/scripts/restore index 0072052..455ecbb 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,6 +33,7 @@ final_path=$(ynh_app_setting_get --app="$app" --key=final_path) landing_page_user=$(ynh_app_setting_get --app="$app" --key=landing_page_user) domain=$(ynh_app_setting_get --app="$app" --key=domain) +account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain) port=$(ynh_app_setting_get --app="$app" --key=port) path_url=$(ynh_app_setting_get --app="$app" --key=path_url) diff --git a/scripts/upgrade b/scripts/upgrade index a97c398..a8ed52a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -232,9 +232,11 @@ then advanced_rate_limit_requests="300" # declaration of new parameter instance_expose_suspended_web="false" + account_domain="" # registration of parameters ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests" ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web" + ynh_app_setting_set --app="$app" --key=account_domain --value="$account_domain" fi #================================================= From 73688e76ca07b9e819a5ec2719ad1174a6f09e0f Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 21:56:00 +0100 Subject: [PATCH 07/57] adding 'account_domain' --- check_process | 1 + 1 file changed, 1 insertion(+) diff --git a/check_process b/check_process index 29bba52..1a0ff02 100644 --- a/check_process +++ b/check_process @@ -6,6 +6,7 @@ ;; Test complet ; Manifest domain="goto.domain.tld" + account_domain="domain.tld" admin="xana" email="user@example.com" password="1Strong-Password" From e6b7e3cbcc6d8aa4c63f0635d15629452e993310 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 22:04:01 +0100 Subject: [PATCH 08/57] typo --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index eb257ec..70d4884 100755 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,7 @@ app="$YNH_APP_INSTANCE_NAME" landing_page_user="" domain="$YNH_APP_ARG_DOMAIN" -account_domain"$YNH_APP_ARG_ACCOUNT_DOMAIN" +account_domain="$YNH_APP_ARG_ACCOUNT_DOMAIN" path_url="/" client_max_body_size="100M" From 8f41f602b0942819ebda80880319094390946f10 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 22:26:39 +0100 Subject: [PATCH 09/57] more "account_domain" stuff --- scripts/backup | 2 ++ scripts/install | 15 ++++++++++++++- scripts/remove | 15 ++++++++++++++- scripts/restore | 1 + scripts/upgrade | 15 ++++++++++++++- 5 files changed, 45 insertions(+), 3 deletions(-) diff --git a/scripts/backup b/scripts/backup index 05535cb..9c9880f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -29,6 +29,7 @@ ynh_print_info --message="Loading installation settings..." app="$YNH_APP_INSTANCE_NAME" domain=$(ynh_app_setting_get --app="$app" --key=domain) +account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain) db_name=$(ynh_app_setting_get --app="$app" --key=db_name) @@ -63,6 +64,7 @@ ynh_backup --src_path="$datadir" --is_big #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup --src_path="/etc/nginx/conf.d/$account_domain.d/$app.conf" #================================================= # SPECIFIC BACKUP diff --git a/scripts/install b/scripts/install index 70d4884..35cdb81 100755 --- a/scripts/install +++ b/scripts/install @@ -210,9 +210,22 @@ chown -R "$app:www-data" "$final_path" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 -# Create a dedicated NGINX config +# Create a dedicated NGINX config for the main domain ynh_add_nginx_config +# Create a dedicated NGINX config for the account domain, if applicable +if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then + + # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) + domain="$account_domain" + + ynh_add_nginx_config + + # undo the trick + account_domain="$domain" +fi + + #================================================= # CREATE DATA DIRECTORY #================================================= diff --git a/scripts/remove b/scripts/remove index 88ddc19..eebe7a3 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,6 +17,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 app="$YNH_APP_INSTANCE_NAME" domain=$(ynh_app_setting_get --app="$app" --key=domain) +account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain) port=$(ynh_app_setting_get --app="$app" --key=port) db_name=$(ynh_app_setting_get --app="$app" --key=db_name) db_user=$(ynh_app_setting_get --app="$app" --key=db_user) @@ -81,9 +82,21 @@ ynh_secure_remove --file="$datadir" #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 -# Remove the dedicated NGINX config +# Remove the dedicated NGINX config of the main domain ynh_remove_nginx_config +# Remove the dedicated NGINX config for the account domain, if applicable +if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then + + # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) + domain="$account_domain" + + ynh_remove_nginx_config + + # undo the trick + account_domain="$domain" +fi + #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 455ecbb..c7f5a5e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -96,6 +96,7 @@ test ! -d "$final_path" \ ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore_file --origin_path="/etc/nginx/conf.d/$account_domain.d/$app.conf" #================================================= # RECREATE THE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index a8ed52a..def92ae 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,7 @@ final_path=$(ynh_app_setting_get --app="$app" --key=final_path) landing_page_user=$(ynh_app_setting_get --app="$app" --key=landing_page_user) domain=$(ynh_app_setting_get --app="$app" --key=domain) +account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain) port=$(ynh_app_setting_get --app="$app" --key=port) path_url=$(ynh_app_setting_get --app="$app" --key=path_url) @@ -277,9 +278,21 @@ chown -R "$app:www-data" "$final_path" #================================================= ynh_script_progression --message="Upgrading NGINX web server configuration..." -# Create a dedicated NGINX config +# Create a dedicated NGINX config for the main domain ynh_add_nginx_config +# Create a dedicated NGINX config for the account domain, if applicable +if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then + + # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) + domain="$account_domain" + + ynh_add_nginx_config + + # undo the trick + account_domain="$domain" +fi + #================================================= # UPGRADE DEPENDENCIES #================================================= From ded9cfdcfbe5cce0b15c4b9975febfadac93f7b3 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 22:48:35 +0100 Subject: [PATCH 10/57] adapting the nginx config to the "account_domain" system --- conf/nginx.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index a6db09c..596bb72 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,9 @@ +# Verifying of it's the "account_domain" +set $is_account_domain 0; +if ($host = __ACCOUNT_DOMAIN__) { + set $is_account_domain 1; +} + #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { @@ -7,6 +13,11 @@ location __PATH__/ { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; + # If we're on the "account_domain, redirect to the main domain" + if ($is_account_domain = 1) { + rewrite ^ https://__PATH__$request_uri? permanent; + } + proxy_pass http://localhost:__PORT__; client_max_body_size __CLIENT_MAX_BODY_SIZE__; @@ -14,3 +25,13 @@ location __PATH__/ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } + +location ^~ /.well-known { + + if ($is_account_domain = 1) { + location = /.well-known/webfinger { return 301 __PATH__/.well-known/webfinger; } + location = /.well-known/nodeinfo { return 301 __PATH__/.well-known/nodeinfo; } + } + + try_files $uri $uri/ =404; +} From ee2536ac2919baf9449866bb69790c3ec4115824 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 22:54:39 +0100 Subject: [PATCH 11/57] fix a really dumb bug :"3 --- scripts/install | 5 +++-- scripts/remove | 3 ++- scripts/upgrade | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 35cdb81..f90bfa7 100755 --- a/scripts/install +++ b/scripts/install @@ -202,7 +202,7 @@ ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" # But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder _ # this will be treated as a security issue. chmod 750 "$final_path" -chmod -R o-rwx "$final_path" +chmod -R o-rwx "$final_path") chown -R "$app:www-data" "$final_path" #================================================= @@ -217,12 +217,13 @@ ynh_add_nginx_config if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) + domain_backup="$domain" domain="$account_domain" ynh_add_nginx_config # undo the trick - account_domain="$domain" + domain="$domain_backup" fi diff --git a/scripts/remove b/scripts/remove index eebe7a3..97e2617 100755 --- a/scripts/remove +++ b/scripts/remove @@ -89,12 +89,13 @@ ynh_remove_nginx_config if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) + domain_backup="$domain" domain="$account_domain" ynh_remove_nginx_config # undo the trick - account_domain="$domain" + domain="$domain_backup" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index def92ae..8241d1a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -285,12 +285,13 @@ ynh_add_nginx_config if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) + domain_backup="$domain" domain="$account_domain" ynh_add_nginx_config # undo the trick - account_domain="$domain" + domain="$domain_backup" fi #================================================= From c3e7bb1d88f50f60dc5b171aa338a7e149cf450c Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:11:03 +0100 Subject: [PATCH 12/57] fix "location" directive is not allowed here --- conf/nginx.conf | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 596bb72..288d231 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -26,12 +26,14 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } -location ^~ /.well-known { - +# redirect the account_domain .well-known to the domain one +location = /.well-known/webfinger { if ($is_account_domain = 1) { - location = /.well-known/webfinger { return 301 __PATH__/.well-known/webfinger; } - location = /.well-known/nodeinfo { return 301 __PATH__/.well-known/nodeinfo; } + return 301 __PATH__/.well-known/webfinger; + } +} +location = /.well-known/nodeinfo { + if ($is_account_domain = 1) { + return 301 __PATH__/.well-known/nodeinfo; } - - try_files $uri $uri/ =404; } From 2985191b7d4cd1f115b54c7cefb37ab75377fd83 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:12:04 +0100 Subject: [PATCH 13/57] fix comment --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 288d231..8d99949 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -26,7 +26,7 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } -# redirect the account_domain .well-known to the domain one +# redirect the account_domain .well-known to the main domain one location = /.well-known/webfinger { if ($is_account_domain = 1) { return 301 __PATH__/.well-known/webfinger; From 68f667abefedc7a9baeca7ab2c0d9690c28fe067 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:14:11 +0100 Subject: [PATCH 14/57] typo... --- scripts/install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index f90bfa7..807cd65 100755 --- a/scripts/install +++ b/scripts/install @@ -202,7 +202,7 @@ ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" # But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder _ # this will be treated as a security issue. chmod 750 "$final_path" -chmod -R o-rwx "$final_path") +chmod -R o-rwx "$final_path" chown -R "$app:www-data" "$final_path" #================================================= @@ -226,7 +226,6 @@ if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then domain="$domain_backup" fi - #================================================= # CREATE DATA DIRECTORY #================================================= From 9ee22774f269d4df032ce3c173e4f90561b2ce8f Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:27:29 +0100 Subject: [PATCH 15/57] adding important infos for account_domain --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 90f0382..bbda2f9 100644 --- a/manifest.json +++ b/manifest.json @@ -52,8 +52,8 @@ "fr": "Domaine à utiliser lors de la fédération des profils." }, "help": { - "en": "This is useful when you want your server to be at eg., \"gts.example.org\", but you want the domain on accounts to be \"example.org\" because it looks better or is just shorter/easier to remember. ⚠️ WARNING: This cannot be changed after installation, as the main domain parameter.", - "fr": "Cette option est utile lorsque vous souhaitez que votre serveur se trouve à l'adresse \"gts.example.org\", par exemple, mais que vous souhaitez que le domaine des comptes soit \"example.org\" parce que c'est plus joli, plus court ou plus facile à retenir. ⚠️ ATTENTION : Ce paramètre ne peut etre modifié après installation, tout comme le paramètre du domaine principal." + "en": "This is useful when you want your server to be at eg., \"gts.example.org\", but you want the domain on accounts to be \"example.org\" because it looks better or is just shorter/easier to remember. ⚠️ WARNING: The domain filled in must be parent to the one previously filled in. This cannot be changed after installation, as the main domain parameter. By default, set this parameter to the same as the previously defined domain.", + "fr": "Cette option est utile lorsque vous souhaitez que votre serveur se trouve à l'adresse \"gts.example.org\", par exemple, mais que vous souhaitez que le domaine des comptes soit \"example.org\" parce que c'est plus joli, plus court ou plus facile à retenir. ⚠️ ATTENTION : Le domaine renseigné doit être parent à celui renseigné précédemment ! Ce paramètre ne peut etre modifié après installation, tout comme le paramètre du domaine principal. Par défaut, mettez ce paramètre à l'identique du domaine renseigné précédemment." }, "example": "example.org" }, From 94e4ee1221912cbb77e1c1695c1d760bfe35ed2b Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:40:45 +0100 Subject: [PATCH 16/57] enhance is_account_domain mechanism --- conf/nginx.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 8d99949..7942534 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,8 +4,7 @@ if ($host = __ACCOUNT_DOMAIN__) { set $is_account_domain 1; } -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location / { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -18,7 +17,9 @@ location __PATH__/ { rewrite ^ https://__PATH__$request_uri? permanent; } - proxy_pass http://localhost:__PORT__; + if ($is_account_domain = 0) { + proxy_pass http://localhost:__PORT__; + } client_max_body_size __CLIENT_MAX_BODY_SIZE__; From 41675bbf8810338a86884ef4769e88dc739ea530 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:41:20 +0100 Subject: [PATCH 17/57] trying to debug dumb "duplicate location "/"" error --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 1a0ff02..65aa5c3 100644 --- a/check_process +++ b/check_process @@ -5,8 +5,8 @@ ;; Test complet ; Manifest - domain="goto.domain.tld" - account_domain="domain.tld" + domain="goto.test.domain.tld" + account_domain="test.domain.tld" admin="xana" email="user@example.com" password="1Strong-Password" From 846f7ae4dc0b65e59ea13123d375ad629369322a Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:47:41 +0100 Subject: [PATCH 18/57] tweaking the main_domain logic --- conf/nginx.conf | 6 +++--- scripts/install | 5 +++-- scripts/remove | 5 +++-- scripts/upgrade | 5 +++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7942534..0a9277e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -14,7 +14,7 @@ location / { # If we're on the "account_domain, redirect to the main domain" if ($is_account_domain = 1) { - rewrite ^ https://__PATH__$request_uri? permanent; + rewrite ^ https://__MAIN_DOMAIN__$request_uri? permanent; } if ($is_account_domain = 0) { @@ -30,11 +30,11 @@ location / { # redirect the account_domain .well-known to the main domain one location = /.well-known/webfinger { if ($is_account_domain = 1) { - return 301 __PATH__/.well-known/webfinger; + rewrite ^.*$ https://__MAIN_DOMAIN__/.well-known/webfinger permanent; } } location = /.well-known/nodeinfo { if ($is_account_domain = 1) { - return 301 __PATH__/.well-known/nodeinfo; + rewrite ^.*$ https://__MAIN_DOMAIN__/.well-known/nodeinfo permanent; } } diff --git a/scripts/install b/scripts/install index 807cd65..b4918c3 100755 --- a/scripts/install +++ b/scripts/install @@ -210,6 +210,8 @@ chown -R "$app:www-data" "$final_path" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 +main_domain="$domain" + # Create a dedicated NGINX config for the main domain ynh_add_nginx_config @@ -217,13 +219,12 @@ ynh_add_nginx_config if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) - domain_backup="$domain" domain="$account_domain" ynh_add_nginx_config # undo the trick - domain="$domain_backup" + domain="$main_domain" fi #================================================= diff --git a/scripts/remove b/scripts/remove index 97e2617..70392a3 100755 --- a/scripts/remove +++ b/scripts/remove @@ -82,6 +82,8 @@ ynh_secure_remove --file="$datadir" #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 +main_domain="$domain" + # Remove the dedicated NGINX config of the main domain ynh_remove_nginx_config @@ -89,13 +91,12 @@ ynh_remove_nginx_config if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) - domain_backup="$domain" domain="$account_domain" ynh_remove_nginx_config # undo the trick - domain="$domain_backup" + domain="$main_domain" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8241d1a..714d694 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -278,6 +278,8 @@ chown -R "$app:www-data" "$final_path" #================================================= ynh_script_progression --message="Upgrading NGINX web server configuration..." +main_domain="$domain" + # Create a dedicated NGINX config for the main domain ynh_add_nginx_config @@ -285,13 +287,12 @@ ynh_add_nginx_config if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) - domain_backup="$domain" domain="$account_domain" ynh_add_nginx_config # undo the trick - domain="$domain_backup" + domain="$main_domain" fi #================================================= From 0a4e8f5d56ba3be0a48618b461da32f4b1814d92 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:51:01 +0100 Subject: [PATCH 19/57] another trying --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 65aa5c3..1592f0a 100644 --- a/check_process +++ b/check_process @@ -5,8 +5,8 @@ ;; Test complet ; Manifest - domain="goto.test.domain.tld" - account_domain="test.domain.tld" + domain="goto.domain.tld" + account_domain="sub.domain.tld" admin="xana" email="user@example.com" password="1Strong-Password" From 93f224a2035341026628ef2964b432679a62f79c Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:57:36 +0100 Subject: [PATCH 20/57] "domain" parameter removed --- check_process | 1 - 1 file changed, 1 deletion(-) diff --git a/check_process b/check_process index 1592f0a..e58d391 100644 --- a/check_process +++ b/check_process @@ -5,7 +5,6 @@ ;; Test complet ; Manifest - domain="goto.domain.tld" account_domain="sub.domain.tld" admin="xana" email="user@example.com" From f42720df02a4d598671ada3ea65ecaedcfece8eb Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 19 Feb 2023 00:05:10 +0100 Subject: [PATCH 21/57] try to debug the IC --- check_process | 3 ++- scripts/install | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index e58d391..7120d4c 100644 --- a/check_process +++ b/check_process @@ -5,7 +5,8 @@ ;; Test complet ; Manifest - account_domain="sub.domain.tld" + main_domain="gts.domain.tld" + account_domain="domain.tld" admin="xana" email="user@example.com" password="1Strong-Password" diff --git a/scripts/install b/scripts/install index b4918c3..410f1a9 100755 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,7 @@ app="$YNH_APP_INSTANCE_NAME" landing_page_user="" -domain="$YNH_APP_ARG_DOMAIN" +domain="$YNH_APP_ARG_MAIN_DOMAIN" account_domain="$YNH_APP_ARG_ACCOUNT_DOMAIN" path_url="/" From 3088ea005da877cd67a5b9cb05cb24f93f7032d6 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 19 Feb 2023 00:08:19 +0100 Subject: [PATCH 22/57] miss --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index bbda2f9..90b1324 100644 --- a/manifest.json +++ b/manifest.json @@ -40,7 +40,7 @@ } }, { - "name": "domain", + "name": "main_domain", "type": "domain", "example": "gts.example.org" }, From cc6618188e630f2c94e59a5fa30eb91a448e9341 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 19 Feb 2023 00:30:11 +0100 Subject: [PATCH 23/57] reverting all "account_domain" stuff --- check_process | 2 -- conf/config.yaml | 2 +- conf/nginx.conf | 29 ++--------------------------- manifest.json | 15 +-------------- scripts/backup | 2 -- scripts/install | 18 +----------------- scripts/remove | 15 --------------- scripts/restore | 2 -- scripts/upgrade | 17 ----------------- 9 files changed, 5 insertions(+), 97 deletions(-) diff --git a/check_process b/check_process index 7120d4c..4ba35c3 100644 --- a/check_process +++ b/check_process @@ -5,8 +5,6 @@ ;; Test complet ; Manifest - main_domain="gts.domain.tld" - account_domain="domain.tld" admin="xana" email="user@example.com" password="1Strong-Password" diff --git a/conf/config.yaml b/conf/config.yaml index e8e4835..c4b3895 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -65,7 +65,7 @@ host: "__DOMAIN__" # https://docs.gotosocial.org/installation_guide/advanced/#can-i-host-my-instance-at-fediexampleorg-but-have-just-exampleorg-in-my-username # # Default: "" -account-domain: "__ACCOUNT_DOMAIN__" +account-domain: "" # String. Protocol to use for the server. Only change to http for local testing! # This should be the protocol part of the URI that your server is actually reachable on. So even if you're diff --git a/conf/nginx.conf b/conf/nginx.conf index 0a9277e..1a4cd60 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,4 @@ -# Verifying of it's the "account_domain" -set $is_account_domain 0; -if ($host = __ACCOUNT_DOMAIN__) { - set $is_account_domain 1; -} - -location / { +location __PATH__/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -12,29 +6,10 @@ location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; - # If we're on the "account_domain, redirect to the main domain" - if ($is_account_domain = 1) { - rewrite ^ https://__MAIN_DOMAIN__$request_uri? permanent; - } - - if ($is_account_domain = 0) { - proxy_pass http://localhost:__PORT__; - } + proxy_pass http://localhost:__PORT__; client_max_body_size __CLIENT_MAX_BODY_SIZE__; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } - -# redirect the account_domain .well-known to the main domain one -location = /.well-known/webfinger { - if ($is_account_domain = 1) { - rewrite ^.*$ https://__MAIN_DOMAIN__/.well-known/webfinger permanent; - } -} -location = /.well-known/nodeinfo { - if ($is_account_domain = 1) { - rewrite ^.*$ https://__MAIN_DOMAIN__/.well-known/nodeinfo permanent; - } -} diff --git a/manifest.json b/manifest.json index 90b1324..6456d8e 100644 --- a/manifest.json +++ b/manifest.json @@ -40,23 +40,10 @@ } }, { - "name": "main_domain", + "name": "domain", "type": "domain", "example": "gts.example.org" }, - { - "name": "account_domain", - "type": "domain", - "ask": { - "en": "Domain to use when federating profiles.", - "fr": "Domaine à utiliser lors de la fédération des profils." - }, - "help": { - "en": "This is useful when you want your server to be at eg., \"gts.example.org\", but you want the domain on accounts to be \"example.org\" because it looks better or is just shorter/easier to remember. ⚠️ WARNING: The domain filled in must be parent to the one previously filled in. This cannot be changed after installation, as the main domain parameter. By default, set this parameter to the same as the previously defined domain.", - "fr": "Cette option est utile lorsque vous souhaitez que votre serveur se trouve à l'adresse \"gts.example.org\", par exemple, mais que vous souhaitez que le domaine des comptes soit \"example.org\" parce que c'est plus joli, plus court ou plus facile à retenir. ⚠️ ATTENTION : Le domaine renseigné doit être parent à celui renseigné précédemment ! Ce paramètre ne peut etre modifié après installation, tout comme le paramètre du domaine principal. Par défaut, mettez ce paramètre à l'identique du domaine renseigné précédemment." - }, - "example": "example.org" - }, { "name": "admin", "type": "string", diff --git a/scripts/backup b/scripts/backup index 9c9880f..05535cb 100755 --- a/scripts/backup +++ b/scripts/backup @@ -29,7 +29,6 @@ ynh_print_info --message="Loading installation settings..." app="$YNH_APP_INSTANCE_NAME" domain=$(ynh_app_setting_get --app="$app" --key=domain) -account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain) db_name=$(ynh_app_setting_get --app="$app" --key=db_name) @@ -64,7 +63,6 @@ ynh_backup --src_path="$datadir" --is_big #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_backup --src_path="/etc/nginx/conf.d/$account_domain.d/$app.conf" #================================================= # SPECIFIC BACKUP diff --git a/scripts/install b/scripts/install index 410f1a9..d75df3f 100755 --- a/scripts/install +++ b/scripts/install @@ -28,8 +28,7 @@ app="$YNH_APP_INSTANCE_NAME" landing_page_user="" -domain="$YNH_APP_ARG_MAIN_DOMAIN" -account_domain="$YNH_APP_ARG_ACCOUNT_DOMAIN" +domain="$YNH_APP_ARG_DOMAIN" path_url="/" client_max_body_size="100M" @@ -96,7 +95,6 @@ ynh_app_setting_set --app="$app" --key=final_path --value="$final_path" ynh_app_setting_set --app="$app" --key=landing_page_user --value="$landing_page_user" ynh_app_setting_set --app="$app" --key=domain --value="$domain" -ynh_app_setting_set --app="$app" --key=account_domain --value="$account_domain" ynh_app_setting_set --app="$app" --key=path_url --value="$path_url" ynh_app_setting_set --app="$app" --key=client_max_body_size --value="$client_max_body_size" @@ -210,23 +208,9 @@ chown -R "$app:www-data" "$final_path" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 -main_domain="$domain" - # Create a dedicated NGINX config for the main domain ynh_add_nginx_config -# Create a dedicated NGINX config for the account domain, if applicable -if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then - - # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) - domain="$account_domain" - - ynh_add_nginx_config - - # undo the trick - domain="$main_domain" -fi - #================================================= # CREATE DATA DIRECTORY #================================================= diff --git a/scripts/remove b/scripts/remove index 70392a3..3bd5e14 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,7 +17,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 app="$YNH_APP_INSTANCE_NAME" domain=$(ynh_app_setting_get --app="$app" --key=domain) -account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain) port=$(ynh_app_setting_get --app="$app" --key=port) db_name=$(ynh_app_setting_get --app="$app" --key=db_name) db_user=$(ynh_app_setting_get --app="$app" --key=db_user) @@ -82,23 +81,9 @@ ynh_secure_remove --file="$datadir" #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 -main_domain="$domain" - # Remove the dedicated NGINX config of the main domain ynh_remove_nginx_config -# Remove the dedicated NGINX config for the account domain, if applicable -if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then - - # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) - domain="$account_domain" - - ynh_remove_nginx_config - - # undo the trick - domain="$main_domain" -fi - #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index c7f5a5e..0072052 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,7 +33,6 @@ final_path=$(ynh_app_setting_get --app="$app" --key=final_path) landing_page_user=$(ynh_app_setting_get --app="$app" --key=landing_page_user) domain=$(ynh_app_setting_get --app="$app" --key=domain) -account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain) port=$(ynh_app_setting_get --app="$app" --key=port) path_url=$(ynh_app_setting_get --app="$app" --key=path_url) @@ -96,7 +95,6 @@ test ! -d "$final_path" \ ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_restore_file --origin_path="/etc/nginx/conf.d/$account_domain.d/$app.conf" #================================================= # RECREATE THE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 714d694..18863c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,6 @@ final_path=$(ynh_app_setting_get --app="$app" --key=final_path) landing_page_user=$(ynh_app_setting_get --app="$app" --key=landing_page_user) domain=$(ynh_app_setting_get --app="$app" --key=domain) -account_domain=$(ynh_app_setting_get --app="$app" --key=account_domain) port=$(ynh_app_setting_get --app="$app" --key=port) path_url=$(ynh_app_setting_get --app="$app" --key=path_url) @@ -233,11 +232,9 @@ then advanced_rate_limit_requests="300" # declaration of new parameter instance_expose_suspended_web="false" - account_domain="" # registration of parameters ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests" ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web" - ynh_app_setting_set --app="$app" --key=account_domain --value="$account_domain" fi #================================================= @@ -278,23 +275,9 @@ chown -R "$app:www-data" "$final_path" #================================================= ynh_script_progression --message="Upgrading NGINX web server configuration..." -main_domain="$domain" - # Create a dedicated NGINX config for the main domain ynh_add_nginx_config -# Create a dedicated NGINX config for the account domain, if applicable -if [ "$domain" != "$account_domain" ] && [ -n "$account_domain" ]; then - - # switching domain name for tricking ynh_add_nginx_config (who supports only the 'domain' variable) - domain="$account_domain" - - ynh_add_nginx_config - - # undo the trick - domain="$main_domain" -fi - #================================================= # UPGRADE DEPENDENCIES #================================================= From 4e5899a7b6266f809f4dad81f51aa4fdae739560 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 Feb 2023 14:46:11 +0000 Subject: [PATCH 24/57] Upgrade to v0.7.1 --- conf/arm64.src | 6 +++--- conf/armv6.src | 6 +++--- conf/armv7.src | 6 +++--- conf/i386.src | 6 +++--- conf/x86-64.src | 6 +++--- manifest.json | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/conf/arm64.src b/conf/arm64.src index 1d614fc..5352ec0 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_arm64.tar.gz -SOURCE_SUM=a97b3aad81f72b990e9982686e6906599522cc8ec442d1e2d02ebba03b125168 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_arm64.tar.gz +SOURCE_SUM=6f60b13214e51da38336333dc780611729a66fc894d7093aef9c49c9a5e48bab SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_arm64.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_arm64.tar.gz diff --git a/conf/armv6.src b/conf/armv6.src index 03fc737..c7d5b71 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_armv6.tar.gz -SOURCE_SUM=10e3d227e738fd58ee6a1dca778667dbbc63933640a168b9cc5fc97203c7f26c +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_armv6.tar.gz +SOURCE_SUM=582a9b0cefb62039a737aa1fb0a08bd3d917d679db473d15042dcbcb6bc88cf4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_armv6.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_armv6.tar.gz diff --git a/conf/armv7.src b/conf/armv7.src index adf827d..8b899cc 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_armv7.tar.gz -SOURCE_SUM=e9f1cc03b18faeae2009781c6a2f6f9138c37aa85f4b2c5954c12a4798ed6208 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_armv7.tar.gz +SOURCE_SUM=a9cd301bffecf4d863419fc614be50f890e577960a1db529799f97cf1e8ee4b9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_armv7.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_armv7.tar.gz diff --git a/conf/i386.src b/conf/i386.src index a6df2ed..3cf2f7b 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_386.tar.gz -SOURCE_SUM=228cf5dac5f8fda9a9711963b6834ca782ed553207e78dc6f8132f30c4aa318f +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_386.tar.gz +SOURCE_SUM=864ac0cf58623fe77b4f9de7e90d038ab589cf80026df3866b5a5fb0893cd24c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_386.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_386.tar.gz diff --git a/conf/x86-64.src b/conf/x86-64.src index 7f3b436..b53064c 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_amd64.tar.gz -SOURCE_SUM=4d7e2a569b625e5854ff00f5c0574870a3643d74821cfe7f923e0408ff3db2fc +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_amd64.tar.gz +SOURCE_SUM=e19740b5cb6891d80440425d5c255089fef06b08b741dc5f115761c94a3910e7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_amd64.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_amd64.tar.gz diff --git a/manifest.json b/manifest.json index 6456d8e..2abbe2c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub social network server", "fr": "Serveur de réseau social basé sur ActivityPub" }, - "version": "0.6.0~ynh1", + "version": "0.7.1~ynh1", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", @@ -115,4 +115,4 @@ } ] } -} \ No newline at end of file +} From 0e9608d3384a6fad675009902fe3d2ff514e9fe2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 Feb 2023 14:46:16 +0000 Subject: [PATCH 25/57] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3cf7c29..b8a66ca 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). -**Shipped version:** 0.6.0~ynh1 +**Shipped version:** 0.7.1~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 1862441..afc77f5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). -**Version incluse :** 0.6.0~ynh1 +**Version incluse :** 0.7.1~ynh1 ## Captures d’écran From 65247191ec01904095bb0969c16b3bb647e71f74 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 21 Feb 2023 15:51:54 +0100 Subject: [PATCH 26/57] leftover --- manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 6456d8e..983e871 100644 --- a/manifest.json +++ b/manifest.json @@ -41,8 +41,7 @@ }, { "name": "domain", - "type": "domain", - "example": "gts.example.org" + "type": "domain" }, { "name": "admin", From 97677a55fa83f5a17b75df89dad02d896fe947f5 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 21 Feb 2023 15:53:13 +0100 Subject: [PATCH 27/57] check upgrade from 0.6.0~ynh1 --- check_process | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/check_process b/check_process index 4ba35c3..6035d12 100644 --- a/check_process +++ b/check_process @@ -20,6 +20,7 @@ upgrade=1 from_commit=29c7d0df5dd6e3d90070f242b74cce980676cd72 upgrade=1 from_commit=5c1c052995a10d899abcb0e4d4fa1c1dc35f84a5 upgrade=1 from_commit=1b6c1c62e022f04afa02bf128f419e77a72bf1e9 + upgrade=1 from_commit=9a6d018337c7d83193282830ff9d9e9b0ae3a733 backup_restore=1 multi_instance=1 port_already_use=1 @@ -33,4 +34,6 @@ Notification=none ; commit=5c1c052995a10d899abcb0e4d4fa1c1dc35f84a5 name=v0.4.0~ynh1 ; commit=1b6c1c62e022f04afa02bf128f419e77a72bf1e9 - name=0.5.2~ynh2 \ No newline at end of file + name=0.5.2~ynh2 + ; commit=9a6d018337c7d83193282830ff9d9e9b0ae3a733 + name=0.6.0~ynh1 \ No newline at end of file From fcc03281e56e5d8d6f99ff05b91d9d23eeebdb5c Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 21 Feb 2023 16:09:29 +0100 Subject: [PATCH 28/57] instance_expose_suspended_web: unbound variable --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 18863c5..1aef49d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,6 +34,7 @@ datadir=$(ynh_app_setting_get --app="$app" --key=datadir) instance_expose_peers=$(ynh_app_setting_get --app="$app" --key=instance_expose_peers) instance_expose_suspended=$(ynh_app_setting_get --app="$app" --key=instance_expose_suspended) +instance_expose_suspended_web=$(ynh_app_setting_get --app="$app" --key=instance_expose_suspended_web) instance_expose_public_timeline=$(ynh_app_setting_get --app="$app" --key=instance_expose_public_timeline) instance_deliver_to_shared_inboxes=$(ynh_app_setting_get --app="$app" --key=instance_deliver_to_shared_inboxes) From c72a63ff95fa18f624aaa76dde9098283af1e108 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 21 Feb 2023 17:21:42 +0100 Subject: [PATCH 29/57] Testing v0.7.1 Even Stormier Sloth (#65) * Preparing for v0.7.1 * Auto-update README * Auto-update README * adding & modifying parameters for v0.7.1 * Expose 'account-domain' setting at install * adding 'account_domain' * typo * more "account_domain" stuff * adapting the nginx config to the "account_domain" system * fix a really dumb bug :"3 * fix "location" directive is not allowed here * fix comment * typo... * adding important infos for account_domain * enhance is_account_domain mechanism * trying to debug dumb "duplicate location "/"" error * tweaking the main_domain logic * another trying * "domain" parameter removed * try to debug the IC * miss * reverting all "account_domain" stuff * Upgrade to v0.7.1 * Auto-update README * leftover * check upgrade from 0.6.0~ynh1 * instance_expose_suspended_web: unbound variable --------- Co-authored-by: yunohost-bot Co-authored-by: yunohost-bot --- README.md | 3 +- README_fr.md | 3 +- check_process | 6 +- conf/arm64.src | 6 +- conf/armv6.src | 6 +- conf/armv7.src | 6 +- conf/config.yaml | 191 ++++++++++++++++++++++++++++++++++++++++++++-- conf/i386.src | 6 +- conf/nginx.conf | 1 - conf/x86-64.src | 6 +- config_panel.toml | 14 +++- manifest.json | 4 +- scripts/install | 6 +- scripts/remove | 2 +- scripts/restore | 1 + scripts/upgrade | 15 +++- 16 files changed, 241 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 16affce..b8a66ca 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # GoToSocial for YunoHost [![Integration level](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Working status](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) + [![Install GoToSocial with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial) *[Lire ce readme en français.](./README_fr.md)* @@ -24,7 +25,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). -**Shipped version:** 0.6.0~ynh1 +**Shipped version:** 0.7.1~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index f1f68c7..afc77f5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # GoToSocial pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg) + [![Installer GoToSocial avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial) *[Read this readme in english.](./README.md)* @@ -24,7 +25,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). -**Version incluse :** 0.6.0~ynh1 +**Version incluse :** 0.7.1~ynh1 ## Captures d’écran diff --git a/check_process b/check_process index 29bba52..6035d12 100644 --- a/check_process +++ b/check_process @@ -5,7 +5,6 @@ ;; Test complet ; Manifest - domain="goto.domain.tld" admin="xana" email="user@example.com" password="1Strong-Password" @@ -21,6 +20,7 @@ upgrade=1 from_commit=29c7d0df5dd6e3d90070f242b74cce980676cd72 upgrade=1 from_commit=5c1c052995a10d899abcb0e4d4fa1c1dc35f84a5 upgrade=1 from_commit=1b6c1c62e022f04afa02bf128f419e77a72bf1e9 + upgrade=1 from_commit=9a6d018337c7d83193282830ff9d9e9b0ae3a733 backup_restore=1 multi_instance=1 port_already_use=1 @@ -34,4 +34,6 @@ Notification=none ; commit=5c1c052995a10d899abcb0e4d4fa1c1dc35f84a5 name=v0.4.0~ynh1 ; commit=1b6c1c62e022f04afa02bf128f419e77a72bf1e9 - name=0.5.2~ynh2 \ No newline at end of file + name=0.5.2~ynh2 + ; commit=9a6d018337c7d83193282830ff9d9e9b0ae3a733 + name=0.6.0~ynh1 \ No newline at end of file diff --git a/conf/arm64.src b/conf/arm64.src index 1d614fc..5352ec0 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_arm64.tar.gz -SOURCE_SUM=a97b3aad81f72b990e9982686e6906599522cc8ec442d1e2d02ebba03b125168 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_arm64.tar.gz +SOURCE_SUM=6f60b13214e51da38336333dc780611729a66fc894d7093aef9c49c9a5e48bab SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_arm64.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_arm64.tar.gz diff --git a/conf/armv6.src b/conf/armv6.src index 03fc737..c7d5b71 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_armv6.tar.gz -SOURCE_SUM=10e3d227e738fd58ee6a1dca778667dbbc63933640a168b9cc5fc97203c7f26c +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_armv6.tar.gz +SOURCE_SUM=582a9b0cefb62039a737aa1fb0a08bd3d917d679db473d15042dcbcb6bc88cf4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_armv6.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_armv6.tar.gz diff --git a/conf/armv7.src b/conf/armv7.src index adf827d..8b899cc 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_armv7.tar.gz -SOURCE_SUM=e9f1cc03b18faeae2009781c6a2f6f9138c37aa85f4b2c5954c12a4798ed6208 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_armv7.tar.gz +SOURCE_SUM=a9cd301bffecf4d863419fc614be50f890e577960a1db529799f97cf1e8ee4b9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_armv7.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_armv7.tar.gz diff --git a/conf/config.yaml b/conf/config.yaml index 3a1c976..c4b3895 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -1,5 +1,5 @@ # GoToSocial -# Copyright (C) 2021-2022 GoToSocial Authors admin@gotosocial.org +# Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -77,9 +77,11 @@ protocol: "https" # String. Address to bind the GoToSocial server to. # This can be an IPv4 address or an IPv6 address (surrounded in square brackets), or a hostname. -# Default value will bind to all interfaces. -# You probably won't need to change this unless you're setting GoToSocial up in some fancy way or -# you have specific networking requirements. +# The default value will bind to all interfaces, which makes the server +# accessible by other machines. For most setups there is no need to change this. +# If you are using GoToSocial in a reverse proxy setup with the proxy running on +# the same machine, you will want to set this to "localhost" or an equivalent, +# so that the proxy can't be bypassed. # Examples: ["0.0.0.0", "172.128.0.16", "localhost", "[::]", "[2001:db8::fed1]"] # Default: "0.0.0.0" bind-address: "0.0.0.0" @@ -163,6 +165,125 @@ db-tls-mode: "disable" # Default: "" db-tls-ca-cert: "" +# Int. Number to multiply by CPU count to set permitted total of open database connections (in-use and idle). +# You can use this setting to tune your database connection behavior, though most admins won't need to touch it. +# +# Example values for multiplier 8: +# +# 1 cpu = 08 open connections +# 2 cpu = 16 open connections +# 4 cpu = 32 open connections +# +# Example values for multiplier 4: +# +# 1 cpu = 04 open connections +# 2 cpu = 08 open connections +# 4 cpu = 16 open connections +# +# A multiplier of 8 is a sensible default, but you may wish to increase this for instances +# running on very performant hardware, or decrease it for instances using v. slow CPUs. +# +# If you set the multiplier to less than 1, only one open connection will be used regardless of cpu count. +# +# PLEASE NOTE!!: This setting currently only applies for Postgres. SQLite will always use 1 connection regardless +# of what is set here. This behavior will change in future when we implement better SQLITE_BUSY handling. +# See https://github.com/superseriousbusiness/gotosocial/issues/1407 for more details. +# +# Examples: [16, 8, 10, 2] +# Default: 8 +db-max-open-conns-multiplier: 8 + +# String. SQLite journaling mode. +# SQLite only -- unused otherwise. +# If set to empty string, the sqlite default will be used. +# See: https://www.sqlite.org/pragma.html#pragma_journal_mode +# Examples: ["DELETE", "TRUNCATE", "PERSIST", "MEMORY", "WAL", "OFF"] +# Default: "WAL" +db-sqlite-journal-mode: "WAL" + +# String. SQLite synchronous mode. +# SQLite only -- unused otherwise. +# If set to empty string, the sqlite default will be used. +# See: https://www.sqlite.org/pragma.html#pragma_synchronous +# Examples: ["OFF", "NORMAL", "FULL", "EXTRA"] +# Default: "NORMAL" +db-sqlite-synchronous: "NORMAL" + +# Byte size. SQlite cache size. +# SQLite only -- unused otherwise. +# If set to empty string or zero, the sqlite default (2MiB) will be used. +# See: https://www.sqlite.org/pragma.html#pragma_cache_size +# Examples: ["0", "2MiB", "8MiB", "64MiB"] +# Default: "8MiB" +db-sqlite-cache-size: "8MiB" + +# Duration. SQlite busy timeout. +# SQLite only -- unused otherwise. +# If set to empty string or zero, the sqlite default will be used. +# See: https://www.sqlite.org/pragma.html#pragma_busy_timeout +# Examples: ["0s", "1s", "30s", "1m", "5m"] +# Default: "5s" +db-sqlite-busy-timeout: "5m" + +cache: + gts: + ########################### + #### DATABASE CACHES ###### + ########################### + # + # Database cache configuration: + # + # Allows configuration of caches used + # when loading GTS models from the database. + # + # max-size = maximum cached objects count + # ttl = cached object lifetime + # sweep-freq = frequency to look for stale cache objects + + account-max-size: 100 + account-ttl: "5m" + account-sweep-freq: "10s" + + block-max-size: 100 + block-ttl: "5m" + block-sweep-freq: "10s" + + domain-block-max-size: 1000 + domain-block-ttl: "24h" + domain-block-sweep-freq: "1m" + + emoji-max-size: 500 + emoji-ttl: "5m" + emoji-sweep-freq: "10s" + + emoji-category-max-size: 100 + emoji-category-ttl: "5m" + emoji-category-sweep-freq: "10s" + + mention-max-size: 500 + mention-ttl: "5m" + mention-sweep-freq: "10s" + + notification-max-size: 500 + notification-ttl: "5m" + notification-sweep-freq: "10s" + + report-max-size: 100 + report-ttl: "5m" + report-sweep-freq: "10s" + + status-max-size: 500 + status-ttl: "5m" + status-sweep-freq: "10s" + + tombstone-max-size: 100 + tombstone-ttl: "5m" + tombstone-sweep-freq: "10s" + + user-max-size: 100 + user-ttl: "5m" + user-sweep-freq: "10s" + ###################### ##### WEB CONFIG ##### ###################### @@ -200,6 +321,12 @@ instance-expose-peers: __INSTANCE_EXPOSE_PEERS__ # Default: false instance-expose-suspended: __INSTANCE_EXPOSE_SUSPENDED__ +# Bool. Allow unauthenticated users to view /about/suspended, +# showing the HTML rendered list of instances that this instance blocks/suspends. +# Options: [true, false] +# Default: false +instance-expose-suspended-web: __INSTANCE_EXPOSE_SUSPENDED_WEB__ + # Bool. Allow unauthenticated users to make queries to /api/v1/timelines/public in order # to see a list of public posts on this server. Even if set to 'false', then authenticated # users (members of the instance) will still be able to query the endpoint. @@ -332,6 +459,8 @@ storage-local-base-path: "__DATADIR__" # String. API endpoint of the S3 compatible service. # Only required when running with the s3 storage backend. # Examples: ["minio:9000", "s3.nl-ams.scw.cloud", "s3.us-west-002.backblazeb2.com"] +# GoToSocial uses "DNS-style" when accessing buckets. +# If you are using Scaleways object storage, please remove the "bucket name" from the endpoint address # Default: "" storage-s3-endpoint: "__STORAGE_S3_ENDPOINT__" @@ -340,6 +469,13 @@ storage-s3-endpoint: "__STORAGE_S3_ENDPOINT__" # Default: false storage-s3-proxy: __STORAGE_S3_PROXY__ +# Bool. Use SSL for S3 connections. +# +# Only set this to 'false' when testing locally. +# +# Default: true +storage-s3-use-ssl: true + # String. Access key part of the S3 credentials. # Consider setting this value using environment variables to avoid leaking it via the config file # Only required when running with the s3 storage backend. @@ -491,6 +627,13 @@ oidc-scopes: - "profile" - "groups" +# Bool. Link OIDC authenticated users to existing ones based on their email address. +# This is mostly intended for migration purposes if you were running previous versions of GTS +# which only correlated users with their email address. Should be set to false for most usecases. +# Options: [true, false] +# Default: false +oidc-link-existing: false + ####################### ##### SMTP CONFIG ##### ####################### @@ -578,9 +721,8 @@ syslog-address: "localhost:514" # Default: "lax" advanced-cookies-samesite: "__ADVANCED_COOKIES_SAMESITE__" -# Int. Amount of requests to permit from a single IP address within a span of 5 minutes. -# If this amount is exceeded, a 429 HTTP error code will be returned. -# See https://docs.gotosocial.org/en/latest/api/swagger/#rate-limit. +# Int. Amount of requests to permit per router grouping from a single IP address within +# a span of 5 minutes. If this amount is exceeded, a 429 HTTP error code will be returned. # # If you find yourself adjusting this limit because it's regularly being exceeded, # you should first verify that your settings for `trusted-proxies` (above) are correct. @@ -594,3 +736,38 @@ advanced-cookies-samesite: "__ADVANCED_COOKIES_SAMESITE__" # Examples: [1000, 500, 0] # Default: 1000 advanced-rate-limit-requests: __ADVANCED_RATE_LIMIT_REQUESTS__ + +# Int. Amount of open requests to permit per CPU, per router grouping, before applying http +# request throttling. Any requests beyond the calculated limit are held in a backlog queue for +# up to 30 seconds before either being processed or timing out. Requests that don't fit in the backlog +# queue will have status 503 returned to them, and the header 'Retry-After' will be set to 30 seconds. +# +# Open request limit is available CPUs * multiplier; backlog queue limit is limit * multiplier. +# +# Example values for multiplier 8: +# +# 1 cpu = 08 open, 064 backlog +# 2 cpu = 16 open, 128 backlog +# 4 cpu = 32 open, 256 backlog +# +# Example values for multiplier 4: +# +# 1 cpu = 04 open, 016 backlog +# 2 cpu = 08 open, 032 backlog +# 4 cpu = 16 open, 064 backlog +# +# A multiplier of 8 is a sensible default, but you may wish to increase this for instances +# running on very performant hardware, or decrease it for instances using v. slow CPUs. +# +# If you set this to 0 or less, http request throttling will be disabled entirely. +# +# Examples: [8, 4, 9, 0] +# Default: 8 +advanced-throttling-multiplier: 8 + +# Duration. Time period to use as the "retry-after" header value in response to throttled requests. +# Minimum resolution is 1 second. +# +# Examples: [30s, 10s, 5s, 1m] +# Default: 30s +advanced-throttling-retry-after: "30s" \ No newline at end of file diff --git a/conf/i386.src b/conf/i386.src index a6df2ed..3cf2f7b 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_386.tar.gz -SOURCE_SUM=228cf5dac5f8fda9a9711963b6834ca782ed553207e78dc6f8132f30c4aa318f +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_386.tar.gz +SOURCE_SUM=864ac0cf58623fe77b4f9de7e90d038ab589cf80026df3866b5a5fb0893cd24c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_386.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_386.tar.gz diff --git a/conf/nginx.conf b/conf/nginx.conf index a6db09c..1a4cd60 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,3 @@ -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { proxy_http_version 1.1; diff --git a/conf/x86-64.src b/conf/x86-64.src index 7f3b436..b53064c 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.6.0/gotosocial_0.6.0_linux_amd64.tar.gz -SOURCE_SUM=4d7e2a569b625e5854ff00f5c0574870a3643d74821cfe7f923e0408ff3db2fc +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_amd64.tar.gz +SOURCE_SUM=e19740b5cb6891d80440425d5c255089fef06b08b741dc5f115761c94a3910e7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.6.0_linux_amd64.tar.gz +SOURCE_FILENAME=gotosocial_0.7.1_linux_amd64.tar.gz diff --git a/config_panel.toml b/config_panel.toml index 681af8a..9541c0f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -245,6 +245,16 @@ help.en = "Allow unauthenticated users to make queries to /api/v1/instance/peers help.fr = "Permet aux utilisateurs non authentifiés d'effectuer des requêtes API sur /api/v1/instance/peers?filter=suspended afin de voir la liste des instances bloquées ou suspendues par votre instance. Cela permettra également aux utilisateurs non authentifiés de consulter la liste via l'interface Web. Même s'il est défini à 'false', les utilisateurs authentifiés (membres de l'instance) seront toujours en mesure d'interroger l'API." type = "select" +[main.instance.instance_expose_suspended_web] +ask.en = "API: Expose suspended on Web (/about/suspended)?" +ask.fr = "API : Exposer les instances bloquées sur le Web (/about/suspended) ?" +bind = "instance-expose-suspended_web:__FINALPATH__/config.yaml" +choices = ["true", "false"] +default = "false" +help.en = "Allow unauthenticated users to view /about/suspended, showing the HTML rendered list of instances that this instance blocks/suspends." +help.fr = "Permet aux utilisateurs non authentifiés d'afficher /about/suspended, montrant la liste rendue en HTML des instances que cette instance bloque ou suspend." +type = "select" + [main.instance.instance_expose_public_timeline] ask.en = "API: Expose public timeline?" ask.fr = "API : Exposer la timeline publique ?" @@ -296,8 +306,8 @@ type = "select" ask.en = "Amount of requests to permit from a single IP address within a span of 5 minutes." ask.fr = "Nombre de requêtes autorisées à partir d'une seule adresse IP dans un délai de 5 minutes." bind = "advanced-rate-limit-requests:__FINALPATH__/config.yaml" -default = "1000" -help.en = """Default: 1000\ +default = "300" +help.en = """Default: 300\ If this amount is exceeded, a 429 HTTP error code will be returned.\ See https://docs.gotosocial.org/en/latest/api/swagger/#rate-limit.\ If you find yourself adjusting this limit because it's regularly being exceeded, you should first verify that your settings for `trusted-proxies` are correct.\ diff --git a/manifest.json b/manifest.json index 983e871..fa2c712 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub social network server", "fr": "Serveur de réseau social basé sur ActivityPub" }, - "version": "0.6.0~ynh1", + "version": "0.7.1~ynh1", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", @@ -114,4 +114,4 @@ } ] } -} \ No newline at end of file +} diff --git a/scripts/install b/scripts/install index b995941..d75df3f 100755 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,7 @@ accounts_allow_custom_css="false" instance_expose_peers="false" instance_expose_suspended="false" +instance_expose_suspended_web="false" instance_expose_public_timeline="false" instance_deliver_to_shared_inboxes="true" @@ -71,7 +72,7 @@ statuses_poll_option_max_chars="50" statuses_media_max_files="6" advanced_cookies_samesite="lax" -advanced_rate_limit_requests="1000" +advanced_rate_limit_requests="300" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -109,6 +110,7 @@ ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="$accou ynh_app_setting_set --app="$app" --key=instance_expose_peers --value="$instance_expose_peers" ynh_app_setting_set --app="$app" --key=instance_expose_suspended --value="$instance_expose_suspended" +ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web" ynh_app_setting_set --app="$app" --key=instance_expose_public_timeline --value="$instance_expose_public_timeline" ynh_app_setting_set --app="$app" --key=instance_deliver_to_shared_inboxes --value="$instance_deliver_to_shared_inboxes" @@ -206,7 +208,7 @@ chown -R "$app:www-data" "$final_path" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 -# Create a dedicated NGINX config +# Create a dedicated NGINX config for the main domain ynh_add_nginx_config #================================================= diff --git a/scripts/remove b/scripts/remove index 88ddc19..3bd5e14 100755 --- a/scripts/remove +++ b/scripts/remove @@ -81,7 +81,7 @@ ynh_secure_remove --file="$datadir" #================================================= ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 -# Remove the dedicated NGINX config +# Remove the dedicated NGINX config of the main domain ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index 7eff40c..0072052 100755 --- a/scripts/restore +++ b/scripts/restore @@ -46,6 +46,7 @@ datadir=$(ynh_app_setting_get --app="$app" --key=datadir) instance_expose_peers=$(ynh_app_setting_get --app="$app" --key=instance_expose_peers) instance_expose_suspended=$(ynh_app_setting_get --app="$app" --key=instance_expose_suspended) +instance_expose_suspended_web=$(ynh_app_setting_get --app="$app" --key=instance_expose_suspended_web) instance_expose_public_timeline=$(ynh_app_setting_get --app="$app" --key=instance_expose_public_timeline) instance_deliver_to_shared_inboxes=$(ynh_app_setting_get --app="$app" --key=instance_deliver_to_shared_inboxes) diff --git a/scripts/upgrade b/scripts/upgrade index 3856f6d..1aef49d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,6 +34,7 @@ datadir=$(ynh_app_setting_get --app="$app" --key=datadir) instance_expose_peers=$(ynh_app_setting_get --app="$app" --key=instance_expose_peers) instance_expose_suspended=$(ynh_app_setting_get --app="$app" --key=instance_expose_suspended) +instance_expose_suspended_web=$(ynh_app_setting_get --app="$app" --key=instance_expose_suspended_web) instance_expose_public_timeline=$(ynh_app_setting_get --app="$app" --key=instance_expose_public_timeline) instance_deliver_to_shared_inboxes=$(ynh_app_setting_get --app="$app" --key=instance_deliver_to_shared_inboxes) @@ -225,6 +226,18 @@ then ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests" fi +# Upgrade from <0.7.1~ynh1: +if ynh_compare_current_package_version --comparison lt --version 0.7.1~ynh1 || [ -z "$instance_expose_suspended_web" ] +then + # updating parameters + advanced_rate_limit_requests="300" + # declaration of new parameter + instance_expose_suspended_web="false" + # registration of parameters + ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests" + ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web" +fi + #================================================= # CREATE DEDICATED USER #================================================= @@ -263,7 +276,7 @@ chown -R "$app:www-data" "$final_path" #================================================= ynh_script_progression --message="Upgrading NGINX web server configuration..." -# Create a dedicated NGINX config +# Create a dedicated NGINX config for the main domain ynh_add_nginx_config #================================================= From 2249e2c32465c0364c297809f676f9c9b9ae4104 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 21 Feb 2023 22:37:51 +0100 Subject: [PATCH 30/57] fix a typo --- config_panel.toml | 2 +- manifest.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 9541c0f..84f387a 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -248,7 +248,7 @@ type = "select" [main.instance.instance_expose_suspended_web] ask.en = "API: Expose suspended on Web (/about/suspended)?" ask.fr = "API : Exposer les instances bloquées sur le Web (/about/suspended) ?" -bind = "instance-expose-suspended_web:__FINALPATH__/config.yaml" +bind = "instance-expose-suspended-web:__FINALPATH__/config.yaml" choices = ["true", "false"] default = "false" help.en = "Allow unauthenticated users to view /about/suspended, showing the HTML rendered list of instances that this instance blocks/suspends." diff --git a/manifest.json b/manifest.json index fa2c712..2a68a3d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub social network server", "fr": "Serveur de réseau social basé sur ActivityPub" }, - "version": "0.7.1~ynh1", + "version": "0.7.1~ynh2", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", @@ -114,4 +114,4 @@ } ] } -} +} \ No newline at end of file From f1cee46d0c19543bf33035e94abbea43b7f9f609 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 Feb 2023 21:37:56 +0000 Subject: [PATCH 31/57] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b8a66ca..9019322 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). -**Shipped version:** 0.7.1~ynh1 +**Shipped version:** 0.7.1~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index afc77f5..d9b40a7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). -**Version incluse :** 0.7.1~ynh1 +**Version incluse :** 0.7.1~ynh2 ## Captures d’écran From 744c591805b54707bee0809f94b19fb5acd08dcb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 Feb 2023 21:40:23 +0000 Subject: [PATCH 32/57] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index a8ed2e6..9019322 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). + **Shipped version:** 0.7.1~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5ce2a78..d9b40a7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -24,6 +24,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). + **Version incluse :** 0.7.1~ynh2 ## Captures d’écran From 90e68df55b3b85e7e45271a18e7e5667712d431f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 24 Feb 2023 00:33:06 +0100 Subject: [PATCH 33/57] [autopatch] Upgrade auto-updater --- .github/workflows/updater.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index d91ef61..61c811f 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,7 +33,7 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} From 297ae7281d783ff6069c3727b417178e908bc191 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 26 Feb 2023 21:29:27 +0100 Subject: [PATCH 34/57] update GTS website --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 8702271..891fde3 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", - "website": "https://docs.gotosocial.org/", + "website": "https://gotosocial.org/", "demo": "", "admindoc": "https://docs.gotosocial.org/en/latest/", "userdoc": "https://docs.gotosocial.org/en/latest/", @@ -114,4 +114,4 @@ } ] } -} +} \ No newline at end of file From ffce867c3466627aa0a30001ded998548d4faa7d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 26 Feb 2023 20:29:31 +0000 Subject: [PATCH 35/57] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9019322..743a37c 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ And to promote them as an administrator of your instance: ## Documentation and resources -* Official app website: +* Official app website: * Official user documentation: * Official admin documentation: * Upstream app code repository: diff --git a/README_fr.md b/README_fr.md index d9b40a7..e0c75a7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -113,7 +113,7 @@ Et pour promouvoir un compte en tant qu'administrateur de votre instance : ## Documentations et ressources -* Site officiel de l’app : +* Site officiel de l’app : * Documentation officielle utilisateur : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : From fa051c736453e673914a45920a37567a95534316 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 26 Feb 2023 21:32:40 +0100 Subject: [PATCH 36/57] removal of a command that is no longer required --- scripts/install | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index d75df3f..7b8bf25 100755 --- a/scripts/install +++ b/scripts/install @@ -276,8 +276,6 @@ ynh_script_progression --message="Creating gotosocial admin user..." --weight=1 "$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account create --username "$admin" --email "$email" --password "$password" -"$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account confirm --username "$admin" - "$final_path"/gotosocial --config-path "$final_path/config.yaml" admin account promote --username "$admin" #================================================= From b5062cbda0e9d0219fab472d72559d859e699033 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 9 Apr 2023 17:39:16 +0000 Subject: [PATCH 37/57] Upgrade to v0.8.0 --- conf/arm64.src | 6 +++--- conf/armv6.src | 6 +++--- conf/armv7.src | 6 +++--- conf/i386.src | 6 +++--- conf/x86-64.src | 6 +++--- manifest.json | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/conf/arm64.src b/conf/arm64.src index 5352ec0..b22b1a8 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_arm64.tar.gz -SOURCE_SUM=6f60b13214e51da38336333dc780611729a66fc894d7093aef9c49c9a5e48bab +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_arm64.tar.gz +SOURCE_SUM=5dc2e205f8d254c4b17880d830efc34e135a3feade5347d8bfe8ad04912cf121 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.7.1_linux_arm64.tar.gz +SOURCE_FILENAME=gotosocial_0.8.0_linux_arm64.tar.gz diff --git a/conf/armv6.src b/conf/armv6.src index c7d5b71..cbe155c 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_armv6.tar.gz -SOURCE_SUM=582a9b0cefb62039a737aa1fb0a08bd3d917d679db473d15042dcbcb6bc88cf4 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_armv6.tar.gz +SOURCE_SUM=9551e2d8f30db11a5b3c5539e4ed67f6ffd78d94afebb09c5ec98a91d7da4e3a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.7.1_linux_armv6.tar.gz +SOURCE_FILENAME=gotosocial_0.8.0_linux_armv6.tar.gz diff --git a/conf/armv7.src b/conf/armv7.src index 8b899cc..3cafb01 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_armv7.tar.gz -SOURCE_SUM=a9cd301bffecf4d863419fc614be50f890e577960a1db529799f97cf1e8ee4b9 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_armv7.tar.gz +SOURCE_SUM=7598eabfaed6ec6de0f7846d80b913708a2f115aac6cbce3be5428d92a63a6e4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.7.1_linux_armv7.tar.gz +SOURCE_FILENAME=gotosocial_0.8.0_linux_armv7.tar.gz diff --git a/conf/i386.src b/conf/i386.src index 3cf2f7b..d78b7b5 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_386.tar.gz -SOURCE_SUM=864ac0cf58623fe77b4f9de7e90d038ab589cf80026df3866b5a5fb0893cd24c +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_386.tar.gz +SOURCE_SUM=17ef690197873b23759d7d84c4801689637eba5093d24b8903fa46032d18b15b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.7.1_linux_386.tar.gz +SOURCE_FILENAME=gotosocial_0.8.0_linux_386.tar.gz diff --git a/conf/x86-64.src b/conf/x86-64.src index b53064c..4cff682 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.7.1/gotosocial_0.7.1_linux_amd64.tar.gz -SOURCE_SUM=e19740b5cb6891d80440425d5c255089fef06b08b741dc5f115761c94a3910e7 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_amd64.tar.gz +SOURCE_SUM=7384267428167e8852223998995f83cad7670cd803688d562eda0d9c5d95ce5a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.7.1_linux_amd64.tar.gz +SOURCE_FILENAME=gotosocial_0.8.0_linux_amd64.tar.gz diff --git a/manifest.json b/manifest.json index 891fde3..d0f55fa 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub social network server", "fr": "Serveur de réseau social basé sur ActivityPub" }, - "version": "0.7.1~ynh2", + "version": "0.8.0~ynh1", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", From f8721c52a9eea75109128e124913dfe06bafda36 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 9 Apr 2023 17:39:21 +0000 Subject: [PATCH 38/57] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 743a37c..b6de2cb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). -**Shipped version:** 0.7.1~ynh2 +**Shipped version:** 0.8.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index e0c75a7..25dfbaa 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). -**Version incluse :** 0.7.1~ynh2 +**Version incluse :** 0.8.0~ynh1 ## Captures d’écran From 82bb3cc4bd78631aa7a36dca83104ec71ef10dfb Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 9 Apr 2023 19:46:52 +0200 Subject: [PATCH 39/57] update congif.yaml according to the newer version --- conf/config.yaml | 144 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 107 insertions(+), 37 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index c4b3895..96d710c 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -55,6 +55,11 @@ host: "__DOMAIN__" # to "gts.example.org/.well-known/webfinger" so that GtS can handle them properly. # # You should also redirect requests at "example.org/.well-known/nodeinfo" in the same way. +# +# You should also redirect requests at "example.org/.well-known/host-meta" in the same way. This endpoint +# is used by a number of clients to discover the API endpoint to use when the host and account domain are +# different. +# # An empty string (ie., not set) means that the same value as 'host' will be used. # # DO NOT change this after your server has already run once, or you will break things! @@ -226,63 +231,95 @@ db-sqlite-cache-size: "8MiB" db-sqlite-busy-timeout: "5m" cache: + # Cache configuration options: + # + # max-size = maximum cached objects count + # ttl = cached object lifetime + # sweep-freq = frequency to look for stale cache objects + # (zero will disable cache sweeping) + + ############################# + #### VISIBILITY CACHES ###### + ############################# + # + # Configure Status and account + # visibility cache. + + visibility-max-size: 2000 + visibility-ttl: "30m" + visibility-sweep-freq: "1m" + gts: ########################### #### DATABASE CACHES ###### ########################### # - # Database cache configuration: - # - # Allows configuration of caches used - # when loading GTS models from the database. - # - # max-size = maximum cached objects count - # ttl = cached object lifetime - # sweep-freq = frequency to look for stale cache objects + # Configure GTS database + # model caches. - account-max-size: 100 - account-ttl: "5m" - account-sweep-freq: "10s" + account-max-size: 2000 + account-ttl: "30m" + account-sweep-freq: "1m" block-max-size: 100 - block-ttl: "5m" - block-sweep-freq: "10s" + block-ttl: "30m" + block-sweep-freq: "1m" - domain-block-max-size: 1000 + domain-block-max-size: 2000 domain-block-ttl: "24h" domain-block-sweep-freq: "1m" - emoji-max-size: 500 - emoji-ttl: "5m" - emoji-sweep-freq: "10s" + emoji-max-size: 2000 + emoji-ttl: "30m" + emoji-sweep-freq: "1m" emoji-category-max-size: 100 - emoji-category-ttl: "5m" - emoji-category-sweep-freq: "10s" + emoji-category-ttl: "30m" + emoji-category-sweep-freq: "1m" - mention-max-size: 500 - mention-ttl: "5m" - mention-sweep-freq: "10s" + follow-max-size: 2000 + follow-ttl: "30m" + follow-sweep-freq: "1m" - notification-max-size: 500 - notification-ttl: "5m" - notification-sweep-freq: "10s" + follow-request-max-size: 2000 + follow-request-ttl: "30m" + follow-request-sweep-freq: "1m" + + media-max-size: 1000 + media-ttl: "30m" + media-sweep-freq: "1m" + + mention-max-size: 2000 + mention-ttl: "30m" + mention-sweep-freq: "1m" + + notification-max-size: 1000 + notification-ttl: "30m" + notification-sweep-freq: "1m" report-max-size: 100 - report-ttl: "5m" - report-sweep-freq: "10s" + report-ttl: "30m" + report-sweep-freq: "1m" - status-max-size: 500 - status-ttl: "5m" - status-sweep-freq: "10s" + status-max-size: 2000 + status-ttl: "30m" + status-sweep-freq: "1m" - tombstone-max-size: 100 - tombstone-ttl: "5m" - tombstone-sweep-freq: "10s" + status-fave-max-size: 2000 + status-fave-ttl: "30m" + status-fave-sweep-freq: "1m" - user-max-size: 100 - user-ttl: "5m" - user-sweep-freq: "10s" + tombstone-max-size: 500 + tombstone-ttl: "30m" + tombstone-sweep-freq: "1m" + + user-max-size: 500 + user-ttl: "30m" + user-sweep-freq: "1m" + + webfinger-max-size": 250 + webfinger-ttl: "24h" + webfinger-sweep-freq": "1m" ###################### ##### WEB CONFIG ##### @@ -573,6 +610,22 @@ letsencrypt-cert-dir: "/gotosocial/storage/certs" # Default: "" letsencrypt-email-address: "" +############################## +##### MANUAL TLS CONFIG ##### +############################## + +# String. Path to a PEM-encoded file on disk that includes the certificate chain +# and the public key +# Examples: ["/gotosocial/storage/certs/chain.pem"] +# Default: "" +tls-certificate-chain: "" + +# String. Path to a PEM-encoded file on disk containing the private key for the +# associated tls-certificate-chain +# Examples: ["/gotosocial/storage/certs/private.pem"] +# Default: "" +tls-certificate-key: "" + ####################### ##### OIDC CONFIG ##### ####################### @@ -618,7 +671,7 @@ oidc-client-secret: "" # Array of string. Scopes to request from the OIDC provider. The returned values will be used to # populate users created in GtS as a result of the authentication flow. 'openid' and 'email' are required. # 'profile' is used to extract a username for the newly created user. -# 'groups' is optional and can be used to determine if a user is an admin (if they're in the group 'admin' or 'admins'). +# 'groups' is optional and can be used to determine if a user is an admin based on oidc-admin-groups. # Examples: See eg., https://auth0.com/docs/scopes/openid-connect-scopes # Default: ["openid", "email", "profile", "groups"] oidc-scopes: @@ -634,6 +687,11 @@ oidc-scopes: # Default: false oidc-link-existing: false +# Array of string. If the returned ID token contains a 'groups' claim that matches one of the +# groups in oidc-admin-groups, then this user will be granted admin rights on the GtS instance +# Default: [] +oidc-admin-groups: [] + ####################### ##### SMTP CONFIG ##### ####################### @@ -669,6 +727,18 @@ smtp-password: "" # Default: "" smtp-from: "GoToSocial@__DOMAIN__" +# Bool. If true, when an email is sent that has multiple recipients, each recipient +# will be included in the To field, so that each recipient can see who else got the +# email, and they can 'reply all' to the other recipients if they want to. +# +# If false, email will be sent to Undisclosed Recipients, and each recipient will not +# be able to see who else received the email. +# +# It might be useful to change this setting to 'true' if you want to be able to discuss +# new moderation reports with other admins by 'replying-all' to the notification email. +# Default: false +smtp-disclose-recipients: false + ######################### ##### SYSLOG CONFIG ##### ######################### From 3652f904eb8e36ef991ce41ad7676a0bca52782b Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 10 Apr 2023 17:38:12 +0200 Subject: [PATCH 40/57] finish deleting unnecessary command lines --- doc/DISCLAIMER.md | 2 -- doc/DISCLAIMER_fr.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index a6912b0..f13fb16 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -62,8 +62,6 @@ To create a new user, proceed as follows: ``` bash ./gotosocial --config-path config.yaml admin account create --username some_username --email someuser@example.org --password 'SomeLongAndComplicatedPassword' - -./gotosocial --config-path config.yaml admin account confirm --username some_username ``` And to promote them as an administrator of your instance: diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 6a32c79..5d1e78b 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -62,8 +62,6 @@ Pour créer un nouveau compte utilisateur, procédez comme suit : ``` bash ./gotosocial --config-path config.yaml admin account create --username nom_dutilisateur --email utilisateur@example.org --password 'UnMotDePasseTrèsComplexe' - -./gotosocial --config-path config.yaml admin account confirm --username nom_dutilisateur ``` Et pour promouvoir un compte en tant qu'administrateur de votre instance : From 907a80fe9c4b332e2c8b7c5f31cbe33504a91265 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 10 Apr 2023 15:38:21 +0000 Subject: [PATCH 41/57] Auto-update README --- README.md | 2 -- README_fr.md | 2 -- 2 files changed, 4 deletions(-) diff --git a/README.md b/README.md index b6de2cb..2e19e78 100644 --- a/README.md +++ b/README.md @@ -97,8 +97,6 @@ To create a new user, proceed as follows: ``` bash ./gotosocial --config-path config.yaml admin account create --username some_username --email someuser@example.org --password 'SomeLongAndComplicatedPassword' - -./gotosocial --config-path config.yaml admin account confirm --username some_username ``` And to promote them as an administrator of your instance: diff --git a/README_fr.md b/README_fr.md index 25dfbaa..ebe3479 100644 --- a/README_fr.md +++ b/README_fr.md @@ -97,8 +97,6 @@ Pour créer un nouveau compte utilisateur, procédez comme suit : ``` bash ./gotosocial --config-path config.yaml admin account create --username nom_dutilisateur --email utilisateur@example.org --password 'UnMotDePasseTrèsComplexe' - -./gotosocial --config-path config.yaml admin account confirm --username nom_dutilisateur ``` Et pour promouvoir un compte en tant qu'administrateur de votre instance : From d1c485f69aabbde1f99e08bd567bb7d8a2d56a52 Mon Sep 17 00:00:00 2001 From: Eric Geldmacher Date: Mon, 10 Apr 2023 13:30:47 -0500 Subject: [PATCH 42/57] Add SMTP CONFIG options to Config Panel --- conf/config.yaml | 14 +++++----- config_panel.toml | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 7 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index 96d710c..a43a3ac 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -702,30 +702,30 @@ oidc-admin-groups: [] # If this is not set, smtp will not be used to send emails, and you can ignore the other settings. # Examples: ["mail.example.org", "localhost"] # Default: "" -smtp-host: "localhost" +smtp-host: "__SMTP_HOST__" # Int. Port to use to connect to the smtp server. # Examples: [] # Default: 0 -smtp-port: 25 +smtp-port: __SMTP_PORT__ # String. Username to use when authenticating with the smtp server. # This should have been provided to you by your smtp host. # This is often, but not always, an email address. # Examples: ["maillord@example.org"] # Default: "" -smtp-username: "" +smtp-username: "__SMTP_USERNAME__" # String. Password to use when authenticating with the smtp server. # This should have been provided to you by your smtp host. # Examples: ["1234", "password"] # Default: "" -smtp-password: "" +smtp-password: "__SMTP_PASSWORD__" # String. 'From' address for sent emails. # Examples: ["mail@example.org"] # Default: "" -smtp-from: "GoToSocial@__DOMAIN__" +smtp-from: "__SMTP_FROM__" # Bool. If true, when an email is sent that has multiple recipients, each recipient # will be included in the To field, so that each recipient can see who else got the @@ -737,7 +737,7 @@ smtp-from: "GoToSocial@__DOMAIN__" # It might be useful to change this setting to 'true' if you want to be able to discuss # new moderation reports with other admins by 'replying-all' to the notification email. # Default: false -smtp-disclose-recipients: false +smtp-disclose-recipients: __SMTP_DISCLOSE_RECIPIENTS__ ######################### ##### SYSLOG CONFIG ##### @@ -840,4 +840,4 @@ advanced-throttling-multiplier: 8 # # Examples: [30s, 10s, 5s, 1m] # Default: 30s -advanced-throttling-retry-after: "30s" \ No newline at end of file +advanced-throttling-retry-after: "30s" diff --git a/config_panel.toml b/config_panel.toml index 84f387a..17437ca 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -279,6 +279,73 @@ La livraison dans la boîte de réception partagée peut réduire de manière si Voir : https://www.w3.org/TR/activitypub/#shared-inbox-delivery""" type = "select" +################ +#### SMTP CONFIG +################ + +[main.smtp] + +name = "SMTP config" + +help = "Config for sending emails via an smtp server." + +[main.smtp.smtp_host] +ask.en = "SMTP Server Hostname" +ask.fr = "Nom d'hôte du serveur SMTP" +bind = "smtp-host:__FINALPATH__/config.yaml" +default = "localhost" +help.en = "The hostname of the smtp server you want to use. Examples: mail.example.org, localhost" +help.fr = "Le nom d'hôte du serveur smtp que vous souhaitez utiliser. Exemples: mail.example.org, localhost" +type = "string" + +[main.smtp.smtp_port] +ask.en = "SMTP Port" +ask.fr = "Port SMTP" +bind = "smtp-port:__FINALPATH__/config.yaml" +default = "25" +help.en = "Port to use to connect to the smtp server" +help.fr = "Port à utiliser pour se connecter au serveur smtp" +type = "number" + +[main.smtp.smtp_username] +ask.en = "SMTP Username" +ask.fr = "Nom d'utilisateur SMTP" +bind = "smtp-username:__FINALPATH__/config.yaml" +default = "" +help.en = "Username to use when authenticating with the smtp server" +help.fr = "Nom d'utilisateur à utiliser lors de l'authentification avec le serveur smtp" +type = "string" + +[main.smtp.smtp_password] +ask.en = "SMTP Password" +ask.fr = "Mot de passe SMTP" +bind = "smtp-password:__FINALPATH__/config.yaml" +default = "" +help.en = "Password to use when authenticating with the smtp server" +help.fr = "Mot de passe à utiliser lors de l'authentification avec le serveur smtp" +type = "password" + +[main.smtp.smtp_from] +ask.en = "SMTP From Address" +ask.fr = "Adresse d'expédition SMTP" +bind = "smtp-from:__FINALPATH__/config.yaml" +default = "GoToSocial@__DOMAIN__" +help.en = "From address for sent emails" +help.fr = "De l'adresse pour les e-mails envoyés" +type = "email" + +[main.smtp.smtp_disclose_recipients] +ask.en = "SMTP Disclose Recipients" +ask.fr = "SMTP Divulguer les destinataires" +bind = "smtp-disclose-recipients:__FINALPATH__/config.yaml" +choices = ["true", "false"] +default = "false" +help.en = """true: Disclose all recipients in the To field\ +false: Email will be sent to Undisclosed Recipients""" +help.fr = """vrai : divulguer tous les destinataires dans le champ À\ +false : l'e-mail sera envoyé aux destinataires non divulgués""" +type = "select" + #################### #### ADVANCED SETTINGS #################### From 34211ba68315b0b31bc56538296330dc13403361 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 10 Apr 2023 21:06:14 +0200 Subject: [PATCH 43/57] added parameters related to SMTP configuration --- config_panel.toml | 22 +++++++++++----------- scripts/install | 14 ++++++++++++++ scripts/restore | 7 +++++++ scripts/upgrade | 26 ++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 11 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 17437ca..bef576a 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -294,8 +294,8 @@ ask.en = "SMTP Server Hostname" ask.fr = "Nom d'hôte du serveur SMTP" bind = "smtp-host:__FINALPATH__/config.yaml" default = "localhost" -help.en = "The hostname of the smtp server you want to use. Examples: mail.example.org, localhost" -help.fr = "Le nom d'hôte du serveur smtp que vous souhaitez utiliser. Exemples: mail.example.org, localhost" +help.en = "The hostname of the SMTP server you want to use. Examples: mail.example.org, localhost" +help.fr = "Le nom d'hôte du serveur SMTP que vous souhaitez utiliser. Exemples: mail.example.org, localhost" type = "string" [main.smtp.smtp_port] @@ -303,8 +303,8 @@ ask.en = "SMTP Port" ask.fr = "Port SMTP" bind = "smtp-port:__FINALPATH__/config.yaml" default = "25" -help.en = "Port to use to connect to the smtp server" -help.fr = "Port à utiliser pour se connecter au serveur smtp" +help.en = "Port to use to connect to the SMTP server" +help.fr = "Port à utiliser pour se connecter au serveur SMTP" type = "number" [main.smtp.smtp_username] @@ -312,8 +312,8 @@ ask.en = "SMTP Username" ask.fr = "Nom d'utilisateur SMTP" bind = "smtp-username:__FINALPATH__/config.yaml" default = "" -help.en = "Username to use when authenticating with the smtp server" -help.fr = "Nom d'utilisateur à utiliser lors de l'authentification avec le serveur smtp" +help.en = "Username to use when authenticating with the SMTP server" +help.fr = "Nom d'utilisateur à utiliser lors de l'authentification avec le serveur SMTP" type = "string" [main.smtp.smtp_password] @@ -321,8 +321,8 @@ ask.en = "SMTP Password" ask.fr = "Mot de passe SMTP" bind = "smtp-password:__FINALPATH__/config.yaml" default = "" -help.en = "Password to use when authenticating with the smtp server" -help.fr = "Mot de passe à utiliser lors de l'authentification avec le serveur smtp" +help.en = "Password to use when authenticating with the SMTP server" +help.fr = "Mot de passe à utiliser lors de l'authentification avec le serveur SMTP" type = "password" [main.smtp.smtp_from] @@ -331,7 +331,7 @@ ask.fr = "Adresse d'expédition SMTP" bind = "smtp-from:__FINALPATH__/config.yaml" default = "GoToSocial@__DOMAIN__" help.en = "From address for sent emails" -help.fr = "De l'adresse pour les e-mails envoyés" +help.fr = "L'adresse utilisée pour les e-mails envoyés" type = "email" [main.smtp.smtp_disclose_recipients] @@ -342,8 +342,8 @@ choices = ["true", "false"] default = "false" help.en = """true: Disclose all recipients in the To field\ false: Email will be sent to Undisclosed Recipients""" -help.fr = """vrai : divulguer tous les destinataires dans le champ À\ -false : l'e-mail sera envoyé aux destinataires non divulgués""" +help.fr = """true : divulguer tous les destinataires dans le champ À\ +false : l'e-mail sera envoyé sans divulguer les destinataires""" type = "select" #################### diff --git a/scripts/install b/scripts/install index 7b8bf25..fc5fae9 100755 --- a/scripts/install +++ b/scripts/install @@ -71,6 +71,13 @@ statuses_poll_max_options="6" statuses_poll_option_max_chars="50" statuses_media_max_files="6" +smtp_host="localhost" +smtp_port="25" +smtp_username="" +smtp_password="" +smtp_from="noreply@$domain" +smtp_disclose_recipients="false" + advanced_cookies_samesite="lax" advanced_rate_limit_requests="300" @@ -135,6 +142,13 @@ ynh_app_setting_set --app="$app" --key=statuses_poll_max_options --value="$statu ynh_app_setting_set --app="$app" --key=statuses_poll_option_max_chars --value="$statuses_poll_option_max_chars" ynh_app_setting_set --app="$app" --key=statuses_media_max_files --value="$statuses_media_max_files" +ynh_app_setting_set --app="$app" --key=smtp_host --value="$smtp_host" +ynh_app_setting_set --app="$app" --key=smtp_port --value="$smtp_port" +ynh_app_setting_set --app="$app" --key=smtp_username --value="$smtp_username" +ynh_app_setting_set --app="$app" --key=smtp_password --value="$smtp_password" +ynh_app_setting_set --app="$app" --key=smtp_from --value="$smtp_from" +ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients" + ynh_app_setting_set --app="$app" --key=advanced_cookies_samesite --value="$advanced_cookies_samesite" ynh_app_setting_set --app="$app" --key=advanced_rate_limit_requests --value="$advanced_rate_limit_requests" diff --git a/scripts/restore b/scripts/restore index 0072052..0080665 100755 --- a/scripts/restore +++ b/scripts/restore @@ -76,6 +76,13 @@ statuses_poll_max_options=$(ynh_app_setting_get --app="$app" --key=statuses_poll statuses_poll_option_max_chars=$(ynh_app_setting_get --app="$app" --key=statuses_poll_option_max_chars) statuses_media_max_files=$(ynh_app_setting_get --app="$app" --key=statuses_media_max_files) +smtp_host=$(ynh_app_setting_get --app="$app" --key=smtp_host) +smtp_port=$(ynh_app_setting_get --app="$app" --key=smtp_port) +smtp_username=$(ynh_app_setting_get --app="$app" --key=smtp_username) +smtp_password=$(ynh_app_setting_get --app="$app" --key=smtp_password) +smtp_from=$(ynh_app_setting_get --app="$app" --key=smtp_from) +smtp_disclose_recipients=$(ynh_app_setting_get --app="$app" --key=smtp_disclose_recipients) + advanced_cookies_samesite=$(ynh_app_setting_get --app="$app" --key=advanced_cookies_samesite) advanced_rate_limit_requests=$(ynh_app_setting_get --app="$app" --key=advanced_rate_limit_requests) diff --git a/scripts/upgrade b/scripts/upgrade index 1aef49d..e4e83e2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,6 +64,13 @@ statuses_poll_max_options=$(ynh_app_setting_get --app="$app" --key=statuses_poll statuses_poll_option_max_chars=$(ynh_app_setting_get --app="$app" --key=statuses_poll_option_max_chars) statuses_media_max_files=$(ynh_app_setting_get --app="$app" --key=statuses_media_max_files) +smtp_host=$(ynh_app_setting_get --app="$app" --key=smtp_host) +smtp_port=$(ynh_app_setting_get --app="$app" --key=smtp_port) +smtp_username=$(ynh_app_setting_get --app="$app" --key=smtp_username) +smtp_password=$(ynh_app_setting_get --app="$app" --key=smtp_password) +smtp_from=$(ynh_app_setting_get --app="$app" --key=smtp_from) +smtp_disclose_recipients=$(ynh_app_setting_get --app="$app" --key=smtp_disclose_recipients) + advanced_cookies_samesite=$(ynh_app_setting_get --app="$app" --key=advanced_cookies_samesite) advanced_rate_limit_requests=$(ynh_app_setting_get --app="$app" --key=advanced_rate_limit_requests) @@ -238,6 +245,25 @@ then ynh_app_setting_set --app="$app" --key=instance_expose_suspended_web --value="$instance_expose_suspended_web" fi +# Upgrade from <0.8.0~ynh2: +if ynh_compare_current_package_version --comparison lt --version 0.8.0~ynh2 || [ -z "$smtp_host" ] +then + # declaration of new parameter + smtp_host="localhost" + smtp_port="25" + smtp_username="" + smtp_password="" + smtp_from="GoToSocial@$domain" + smtp_disclose_recipients="false" + # registration of parameters + ynh_app_setting_set --app="$app" --key=smtp_host --value="$smtp_host" + ynh_app_setting_set --app="$app" --key=smtp_port --value="$smtp_port" + ynh_app_setting_set --app="$app" --key=smtp_username --value="$smtp_username" + ynh_app_setting_set --app="$app" --key=smtp_password --value="$smtp_password" + ynh_app_setting_set --app="$app" --key=smtp_from --value="$smtp_from" + ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients" +fi + #================================================= # CREATE DEDICATED USER #================================================= From 36396f6aa148b12177d8392b69c2423e09e8f009 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 10 Apr 2023 21:11:35 +0200 Subject: [PATCH 44/57] bump version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d0f55fa..6783547 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub social network server", "fr": "Serveur de réseau social basé sur ActivityPub" }, - "version": "0.8.0~ynh1", + "version": "0.8.0~ynh2", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", From 69b949a4aa8c7abf672590c8e6be46cdb2cae556 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 10 Apr 2023 19:11:40 +0000 Subject: [PATCH 45/57] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e19e78..ca51677 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). -**Shipped version:** 0.8.0~ynh1 +**Shipped version:** 0.8.0~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index ebe3479..5be7537 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). -**Version incluse :** 0.8.0~ynh1 +**Version incluse :** 0.8.0~ynh2 ## Captures d’écran From 7c6176978fe2d224e718bb920867ea62d782d9c3 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 10 Apr 2023 21:19:04 +0200 Subject: [PATCH 46/57] typo --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e4e83e2..33d3f7f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -253,7 +253,7 @@ then smtp_port="25" smtp_username="" smtp_password="" - smtp_from="GoToSocial@$domain" + smtp_from="noreply@$domain" smtp_disclose_recipients="false" # registration of parameters ynh_app_setting_set --app="$app" --key=smtp_host --value="$smtp_host" From bce4917b2dec2980fd0eb90ecaa5e9b8e7879b0d Mon Sep 17 00:00:00 2001 From: Eric Geldmacher Date: Mon, 10 Apr 2023 15:01:03 -0500 Subject: [PATCH 47/57] Fix keys in [main.accounts] section of config_panel.toml --- config_panel.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index bef576a..3b6b032 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -19,7 +19,7 @@ name = "Accounts config" help = "Config pertaining to creation and maintenance of accounts on the server, as well as defaults for new accounts." -[main.accounts.registration_open] +[main.accounts.accounts_registration_open] ask.en = "Open registrations?" ask.fr = "Inscriptions ouvertes ?" bind = "accounts-registration-open:__FINALPATH__/config.yaml" @@ -29,7 +29,7 @@ help.en = "Do we want people to be able to just submit sign up requests, or do w help.fr = "Voulez-vous que les gens puissent simplement envoyer des demandes d'inscription, ou voulez-vous qu'iels doivent être invité-e-s ?" type = "select" -[main.accounts.approval_required] +[main.accounts.accounts_approval_required] ask.en = "Approval required?" ask.fr = "Validation requise ?" bind = "accounts-approval-required:__FINALPATH__/config.yaml" @@ -39,7 +39,7 @@ help.en = "Do sign up requests require approval from an admin/moderator before a help.fr = "Les demandes d'inscription doivent-elles être approuvées par un-e administrateur-ice/modérateur-ice avant qu'un compte puisse se connecter/utiliser le serveur ?" type = "select" -[main.accounts.reason_required] +[main.accounts.accounts_reason_required] ask.en = "Reason required?" ask.fr = "Motif requis ?" bind = "accounts-reason-required:__FINALPATH__/config.yaml" @@ -49,7 +49,7 @@ help.en = "Are sign up requests required to submit a reason for the request (eg. help.fr = "Les demandes d'inscription doivent-elles être motivées (par exemple, par une explication de la raison pour laquelle la personne souhaite rejoindre l'instance) ?" type = "select" -[main.accounts.allow_custom_css] +[main.accounts.accounts_allow_custom_css] ask.en = "Allow custom CSS?" ask.fr = "Autoriser le CSS personnalisé ?" bind = "accounts-allow-custom-css:__FINALPATH__/config.yaml" From 5e8c883cb787a33938dabf9bdff7dfbed0ae35d9 Mon Sep 17 00:00:00 2001 From: Eric Geldmacher Date: Tue, 11 Apr 2023 08:33:58 -0500 Subject: [PATCH 48/57] apply values from problem key during upgrade --- scripts/upgrade | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 33d3f7f..e144c3b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -264,6 +264,32 @@ then ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients" fi +# Upgrade from <0.8.0~ynh3: +if ynh_compare_current_package_version --comparison lt --version 0.8.0~ynh3 +then + # get settings from problem key + allow_custom_css=$(ynh_app_setting_get --app="$app" --key=allow_custom_css) + approval_required=$(ynh_app_setting_get --app="$app" --key=approval_required) + reason_required=$(ynh_app_setting_get --app="$app" --key=reason_required) + registration_open=$(ynh_app_setting_get --app="$app" --key=registration_open) + # apply setting to correct key if set on old key + if [ -n "$allow_custom_css" ] + then + ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="allow_custom_css" + fi + if [ -n "$approval_required" ] + then + ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="approval_required" + fi + if [ -n "$reason_required" ] + then + ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="reason_required" + fi + if [ -n "$registration_open" ] + then + ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="registration_open" + fi + #================================================= # CREATE DEDICATED USER #================================================= From 96e3803419faab923f98752ee55a23b2844ff99c Mon Sep 17 00:00:00 2001 From: Eric Geldmacher Date: Tue, 11 Apr 2023 08:37:04 -0500 Subject: [PATCH 49/57] bump version --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 6783547..0ba3e16 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub social network server", "fr": "Serveur de réseau social basé sur ActivityPub" }, - "version": "0.8.0~ynh2", + "version": "0.8.0~ynh3", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", @@ -114,4 +114,4 @@ } ] } -} \ No newline at end of file +} From 440a38b5b1d479a47fa4d592abae0a4ad4105db3 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 11 Apr 2023 17:24:01 +0200 Subject: [PATCH 50/57] Deleting residual parameters --- scripts/upgrade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index e144c3b..93a21a0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -276,18 +276,22 @@ then if [ -n "$allow_custom_css" ] then ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="allow_custom_css" + ynh_app_setting_delete --app="$app" --key=allow_custom_css fi if [ -n "$approval_required" ] then ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="approval_required" + ynh_app_setting_delete --app="$app" --key=approval_required fi if [ -n "$reason_required" ] then ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="reason_required" + ynh_app_setting_delete --app="$app" --key=reason_required fi if [ -n "$registration_open" ] then ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="registration_open" + ynh_app_setting_delete --app="$app" --key=registration_open fi #================================================= From 9fe96b1b9b72c990d796f81a1043a1fa2af9e6bb Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 11 Apr 2023 17:29:22 +0200 Subject: [PATCH 51/57] correction of forgotten closure of a condition --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 93a21a0..e3ddf72 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -293,6 +293,7 @@ then ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="registration_open" ynh_app_setting_delete --app="$app" --key=registration_open fi +fi #================================================= # CREATE DEDICATED USER From 3301c6929e0656224a1f9cd290c63b7561580129 Mon Sep 17 00:00:00 2001 From: Eric Geldmacher Date: Tue, 11 Apr 2023 10:38:50 -0500 Subject: [PATCH 52/57] correct variable reference in value --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e3ddf72..16def1b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -275,22 +275,22 @@ then # apply setting to correct key if set on old key if [ -n "$allow_custom_css" ] then - ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="allow_custom_css" + ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="$allow_custom_css" ynh_app_setting_delete --app="$app" --key=allow_custom_css fi if [ -n "$approval_required" ] then - ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="approval_required" + ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="$approval_required" ynh_app_setting_delete --app="$app" --key=approval_required fi if [ -n "$reason_required" ] then - ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="reason_required" + ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="$reason_required" ynh_app_setting_delete --app="$app" --key=reason_required fi if [ -n "$registration_open" ] then - ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="registration_open" + ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="$registration_open" ynh_app_setting_delete --app="$app" --key=registration_open fi fi From 5f4f3dd24264e61dd9d00cb8d28a3dc3a213bb25 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 11 Apr 2023 16:42:07 +0000 Subject: [PATCH 53/57] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca51677..1c1509b 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). -**Shipped version:** 0.8.0~ynh2 +**Shipped version:** 0.8.0~ynh3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5be7537..c887184 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). -**Version incluse :** 0.8.0~ynh2 +**Version incluse :** 0.8.0~ynh3 ## Captures d’écran From ed17d981388cdbae7a49875413201f55edeccf62 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 12 Apr 2023 16:56:11 +0200 Subject: [PATCH 54/57] indentation harmonization --- scripts/upgrade | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 16def1b..041e688 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -267,32 +267,32 @@ fi # Upgrade from <0.8.0~ynh3: if ynh_compare_current_package_version --comparison lt --version 0.8.0~ynh3 then - # get settings from problem key - allow_custom_css=$(ynh_app_setting_get --app="$app" --key=allow_custom_css) - approval_required=$(ynh_app_setting_get --app="$app" --key=approval_required) - reason_required=$(ynh_app_setting_get --app="$app" --key=reason_required) - registration_open=$(ynh_app_setting_get --app="$app" --key=registration_open) - # apply setting to correct key if set on old key - if [ -n "$allow_custom_css" ] - then - ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="$allow_custom_css" - ynh_app_setting_delete --app="$app" --key=allow_custom_css - fi - if [ -n "$approval_required" ] - then - ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="$approval_required" - ynh_app_setting_delete --app="$app" --key=approval_required - fi - if [ -n "$reason_required" ] - then - ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="$reason_required" - ynh_app_setting_delete --app="$app" --key=reason_required - fi - if [ -n "$registration_open" ] - then - ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="$registration_open" - ynh_app_setting_delete --app="$app" --key=registration_open - fi + # get settings from problem key + allow_custom_css=$(ynh_app_setting_get --app="$app" --key=allow_custom_css) + approval_required=$(ynh_app_setting_get --app="$app" --key=approval_required) + reason_required=$(ynh_app_setting_get --app="$app" --key=reason_required) + registration_open=$(ynh_app_setting_get --app="$app" --key=registration_open) + # apply setting to correct key if set on old key + if [ -n "$allow_custom_css" ] + then + ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="$allow_custom_css" + ynh_app_setting_delete --app="$app" --key=allow_custom_css + fi + if [ -n "$approval_required" ] + then + ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="$approval_required" + ynh_app_setting_delete --app="$app" --key=approval_required + fi + if [ -n "$reason_required" ] + then + ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="$reason_required" + ynh_app_setting_delete --app="$app" --key=reason_required + fi + if [ -n "$registration_open" ] + then + ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="$registration_open" + ynh_app_setting_delete --app="$app" --key=registration_open + fi fi #================================================= From d70bd632ec7a74b74a4837edba707b24cac16be8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 19 Apr 2023 13:41:37 +0000 Subject: [PATCH 55/57] Upgrade to v0.8.1 --- conf/arm64.src | 6 +++--- conf/armv6.src | 6 +++--- conf/armv7.src | 6 +++--- conf/i386.src | 6 +++--- conf/x86-64.src | 6 +++--- manifest.json | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/conf/arm64.src b/conf/arm64.src index b22b1a8..9638143 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_arm64.tar.gz -SOURCE_SUM=5dc2e205f8d254c4b17880d830efc34e135a3feade5347d8bfe8ad04912cf121 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.1/gotosocial_0.8.1_linux_arm64.tar.gz +SOURCE_SUM=671d66a6c7cd6b96b7499bf3e6419a1c4cc9278ff532191c0bcecc025fd4a0db SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.8.0_linux_arm64.tar.gz +SOURCE_FILENAME=gotosocial_0.8.1_linux_arm64.tar.gz diff --git a/conf/armv6.src b/conf/armv6.src index cbe155c..9ce61fd 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_armv6.tar.gz -SOURCE_SUM=9551e2d8f30db11a5b3c5539e4ed67f6ffd78d94afebb09c5ec98a91d7da4e3a +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.1/gotosocial_0.8.1_linux_armv6.tar.gz +SOURCE_SUM=207aed157dd418d6a4a7e4cff74de0724e08b0be24cf7208122988a2d9da44cc SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.8.0_linux_armv6.tar.gz +SOURCE_FILENAME=gotosocial_0.8.1_linux_armv6.tar.gz diff --git a/conf/armv7.src b/conf/armv7.src index 3cafb01..a67e712 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_armv7.tar.gz -SOURCE_SUM=7598eabfaed6ec6de0f7846d80b913708a2f115aac6cbce3be5428d92a63a6e4 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.1/gotosocial_0.8.1_linux_armv7.tar.gz +SOURCE_SUM=54117d643829ec0c3a8e47d036d2485747d301299964dd33178308e560e1b265 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.8.0_linux_armv7.tar.gz +SOURCE_FILENAME=gotosocial_0.8.1_linux_armv7.tar.gz diff --git a/conf/i386.src b/conf/i386.src index d78b7b5..d0c8e9c 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_386.tar.gz -SOURCE_SUM=17ef690197873b23759d7d84c4801689637eba5093d24b8903fa46032d18b15b +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.1/gotosocial_0.8.1_linux_386.tar.gz +SOURCE_SUM=8d1436b1eab293e97f3de3572b3631da1efb12b23dc29ffcdb76b40f8f925a0c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.8.0_linux_386.tar.gz +SOURCE_FILENAME=gotosocial_0.8.1_linux_386.tar.gz diff --git a/conf/x86-64.src b/conf/x86-64.src index 4cff682..512ed20 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.0/gotosocial_0.8.0_linux_amd64.tar.gz -SOURCE_SUM=7384267428167e8852223998995f83cad7670cd803688d562eda0d9c5d95ce5a +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.8.1/gotosocial_0.8.1_linux_amd64.tar.gz +SOURCE_SUM=32475bc78db64dbcfadb61b6c9b63542d9687fb9d42fa4c866f8136d86f8cf6d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.8.0_linux_amd64.tar.gz +SOURCE_FILENAME=gotosocial_0.8.1_linux_amd64.tar.gz diff --git a/manifest.json b/manifest.json index 0ba3e16..9360a62 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub social network server", "fr": "Serveur de réseau social basé sur ActivityPub" }, - "version": "0.8.0~ynh3", + "version": "0.8.1~ynh1", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", From f5b4848e4c5d447845ebfcdfe3bd2a4c463d6ee0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 19 Apr 2023 13:41:44 +0000 Subject: [PATCH 56/57] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1c1509b..eca101f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). -**Shipped version:** 0.8.0~ynh3 +**Shipped version:** 0.8.1~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index c887184..b0c72d0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). -**Version incluse :** 0.8.0~ynh3 +**Version incluse :** 0.8.1~ynh1 ## Captures d’écran From 8369b8d9ef339fb9fca3c4e3fe3ccb2b2266c13f Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 19 Apr 2023 16:01:52 +0200 Subject: [PATCH 57/57] fix small config typos (upstream) --- conf/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index a43a3ac..8e1fde9 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -317,9 +317,9 @@ cache: user-ttl: "30m" user-sweep-freq: "1m" - webfinger-max-size": 250 + webfinger-max-size: 250 webfinger-ttl: "24h" - webfinger-sweep-freq": "1m" + webfinger-sweep-freq: "1m" ###################### ##### WEB CONFIG #####