diff --git a/README.md b/README.md index 280334c..5b42825 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.10.0~ynh1 +**Shipped version:** 0.11.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index bf541a2..37a6357 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.10.0~ynh1 +**Version incluse :** 0.11.0~ynh1 ## Captures d’écran diff --git a/conf/arm64.src b/conf/arm64.src index 9ef742d..bb13f44 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.10.0/gotosocial_0.10.0_linux_arm64.tar.gz -SOURCE_SUM=90238812b8e398f09c4a42a5b4347e932ea632f921f5b81d6896f35fd032ea0f +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.11.0/gotosocial_0.11.0_linux_arm64.tar.gz +SOURCE_SUM=c0483b53200b7af7bb3d02f2eacd22780deb2ba20ca246bc62198fe18c05f11b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.10.0_linux_arm64.tar.gz +SOURCE_FILENAME=gotosocial_0.11.0_linux_arm64.tar.gz diff --git a/conf/armv6.src b/conf/armv6.src index 39cd7e6..f6924d2 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.10.0/gotosocial_0.10.0_linux_armv6.tar.gz -SOURCE_SUM=6fd8e981722792104c035d82eb433b62b91489f9aef2bffe9ee86e4caf528b05 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.11.0/gotosocial_0.11.0_linux_armv6.tar.gz +SOURCE_SUM=43506e27f7ced4683bd2db665176d3bf6ee761c8a46979af833890862ba74437 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.10.0_linux_armv6.tar.gz +SOURCE_FILENAME=gotosocial_0.11.0_linux_armv6.tar.gz diff --git a/conf/armv7.src b/conf/armv7.src index 5bc3ffd..8e760cd 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.10.0/gotosocial_0.10.0_linux_armv7.tar.gz -SOURCE_SUM=01eaccbe8613669b78aa3995638c5c8d84ea1e2ae715192903d980c363cf687c +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.11.0/gotosocial_0.11.0_linux_armv7.tar.gz +SOURCE_SUM=3950fcf38a0438c33307dc00e91be305a247ff965b592dd54962f359c721a3df SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.10.0_linux_armv7.tar.gz +SOURCE_FILENAME=gotosocial_0.11.0_linux_armv7.tar.gz diff --git a/conf/config.yaml b/conf/config.yaml index c2b949a..08678b2 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -195,10 +195,6 @@ db-tls-ca-cert: "" # # 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 @@ -236,107 +232,13 @@ db-sqlite-cache-size: "8MiB" db-sqlite-busy-timeout: "30m" 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 ###### - ########################### - # - # Configure GTS database - # model caches. - - account-max-size: 2000 - account-ttl: "30m" - account-sweep-freq: "1m" - - block-max-size: 1000 - block-ttl: "30m" - block-sweep-freq: "1m" - - domain-block-max-size: 2000 - domain-block-ttl: "24h" - domain-block-sweep-freq: "1m" - - emoji-max-size: 2000 - emoji-ttl: "30m" - emoji-sweep-freq: "1m" - - emoji-category-max-size: 100 - emoji-category-ttl: "30m" - emoji-category-sweep-freq: "1m" - - follow-max-size: 2000 - follow-ttl: "30m" - follow-sweep-freq: "1m" - - follow-request-max-size: 2000 - follow-request-ttl: "30m" - follow-request-sweep-freq: "1m" - - instance-max-size: 2000 - instance-ttl: "30m" - instance-sweep-freq: "1m" - - list-max-size: 2000 - list-ttl: "30m" - list-sweep-freq: "1m" - - list-entry-max-size: 2000 - list-entry-ttl: "30m" - list-entry-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: "30m" - report-sweep-freq: "1m" - - status-max-size: 2000 - status-ttl: "30m" - status-sweep-freq: "1m" - - status-fave-max-size: 2000 - status-fave-ttl: "30m" - status-fave-sweep-freq: "1m" - - 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: "15m" + # cache.memory-target sets a target limit that + # the application will try to keep it's caches + # within. This is based on estimated sizes of + # in-memory objects, and so NOT AT ALL EXACT. + # Examples: ["100MiB", "200MiB", "500MiB", "1GiB"] + # Default: "100MiB" + memory-target: __CACHE_MEMORY_TARGET__ ###################### ##### WEB CONFIG ##### @@ -401,6 +303,15 @@ instance-expose-public-timeline: __INSTANCE_EXPOSE_PUBLIC_TIMELINE__ # Default: true instance-deliver-to-shared-inboxes: __INSTANCE_DELIVER_TO_SHARED_INBOXES__ +# Bool. This flag will inject a Mastodon version into the version field that +# is included in /api/v1/instance. This version is often used by Mastodon clients +# to do API feature detection. By injecting a Mastodon compatible version, it is +# possible to cajole those clients to behave correctly with GoToSocial. +# +# Options: [true, false] +# Default: false +instance-inject-mastodon-version: __INSTANCE_INJECT_MASTODON_VERSION__ + ########################### ##### ACCOUNTS CONFIG ##### ########################### @@ -479,7 +390,7 @@ media-description-max-chars: __MEDIA_DESCRIPTION_MAX_CHARS__ # # If this is set to 0, then media from remote instances will be cached indefinitely. # Examples: [30, 60, 7, 0] -# Default: 30 +# Default: 7 media-remote-cache-days: __MEDIA_REMOTE_CACHE_DAYS__ # Int. Max size in bytes of emojis uploaded to this instance via the admin API. @@ -872,6 +783,18 @@ http-client: allow-ips: [] block-ips: [] + # Bool. Disable verification of TLS certificates of remote servers. + # With this set to 'true', GoToSocial will not error when a remote + # server presents an invalid or self-signed certificate. + # + # THIS SETTING SHOULD BE USED FOR TESTING ONLY! IF YOU TURN THIS + # ON WHILE RUNNING IN PRODUCTION YOU ARE LEAVING YOUR SERVER WIDE + # OPEN TO MAN IN THE MIDDLE ATTACKS! DO NOT CHANGE THIS SETTING + # UNLESS YOU KNOW EXACTLY WHAT YOU'RE DOING AND WHY YOU'RE DOING IT. + # + # Default: false + tls-insecure-skip-verify: false + ############################# ##### ADVANCED SETTINGS ##### ############################# diff --git a/conf/i386.src b/conf/i386.src index 46db766..b24a1f8 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.10.0/gotosocial_0.10.0_linux_386.tar.gz -SOURCE_SUM=4883f6f2c80535b059b4147c6f9491e13bbec9b624acf95b1893a168a50f2312 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.11.0/gotosocial_0.11.0_linux_386.tar.gz +SOURCE_SUM=1429acce3a61580596816f26c4ce4baf4f299ac47fdd447ad4527ee8103c6a99 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.10.0_linux_386.tar.gz +SOURCE_FILENAME=gotosocial_0.11.0_linux_386.tar.gz diff --git a/conf/x86-64.src b/conf/x86-64.src index 250afee..99c442a 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.10.0/gotosocial_0.10.0_linux_amd64.tar.gz -SOURCE_SUM=1618cafe9316d60159b59287e98b4d79d3bb17c4d89ced31f3d325ab59cf5a39 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.11.0/gotosocial_0.11.0_linux_amd64.tar.gz +SOURCE_SUM=b008350c7130388860182065d95d23feec6ea10d4c9013528ee96fd041a85804 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.10.0_linux_amd64.tar.gz +SOURCE_FILENAME=gotosocial_0.11.0_linux_amd64.tar.gz diff --git a/config_panel.toml b/config_panel.toml index 2f56854..c1b6a61 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -288,6 +288,22 @@ 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" +[main.instance.instance_inject_mastodon_version] +ask.en = "Inject Mastodon version?" +ask.fr = "Injecter une version Mastodon ?" +bind = "instance-inject-mastodon-version:__FINALPATH__/config.yaml" +choices = ["true", "false"] +default = "false" +help.en = """This flag will inject a Mastodon version into the version field that is included in /api/v1/instance.\ +This version is often used by Mastodon clients to do API feature detection.\ +By injecting a Mastodon compatible version, it is possible to cajole those clients to behave correctly with GoToSocial.\ +Default: false""" +help.fr = """Ce paramètre injecte une version de Mastodon dans le champ version qui est inclus dans /api/v1/instance.\ +Cette version est souvent utilisée par les clients Mastodon pour détecter les caractéristiques de l'API.\ +En injectant une version compatible avec Mastodon, il est possible d'inciter ces clients à se comporter correctement avec GoToSocial. +Par défautl : false""" +type = "select" + ################ #### SMTP CONFIG ################ @@ -355,6 +371,29 @@ help.fr = """true : divulguer tous les destinataires dans le champ À\ false : l'e-mail sera envoyé sans divulguer les destinataires""" type = "select" +#################### +#### CACHE SETTINGS +#################### + +[main.cache] + +name = "Cache settings" + +help = "Settings pertaining to... the cache" + +[main.cache.cache_memory_target] +ask.en = "Value of the cache target" +ask.fr = "Valeur du niveau de cache" +bind = "memory-target:__FINALPATH__/config.yaml" +default = "100MiB" +help.en = """Sets a target limit that the application will try to keep it's caches within.\ +This is based on estimated sizes of in-memory objects, and so NOT AT ALL EXACT. +Examples: 100MiB, 200MiB, 500MiB, 1GiB; Default: 100MiB""" +help.fr = """Définit une limite cible que l'application essaiera de ne pas dépasser pour ses caches.\ +Cette limite est basée sur des estimations de la taille des objets en mémoire et N'EST DONC PAS DU TOUT EXACTE. +Exemples : 100MiB, 200MiB, 500MiB, 1GiB; Par défaut : 100MiB""" +type = "string" + #################### #### ADVANCED SETTINGS #################### diff --git a/manifest.json b/manifest.json index d5c2c3a..ecb993a 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.10.0~ynh1", + "version": "0.11.0~ynh1", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", @@ -106,4 +106,4 @@ } ] } -} \ No newline at end of file +} diff --git a/scripts/install b/scripts/install index 4f096a4..a79e60f 100755 --- a/scripts/install +++ b/scripts/install @@ -39,6 +39,8 @@ password="$YNH_APP_ARG_PASSWORD" # Config stuff: +cache_memory_target="100MiB" + accounts_registration_open=$(convert_bool "$YNH_APP_ARG_ACCOUNTS_REGISTRATION_OPEN") accounts_approval_required=$(convert_bool "$YNH_APP_ARG_ACCOUNTS_APPROVAL_REQUIRED") accounts_reason_required=$(convert_bool "$YNH_APP_ARG_ACCOUNTS_REASON_REQUIRED") @@ -50,12 +52,13 @@ instance_expose_suspended="false" instance_expose_suspended_web="false" instance_expose_public_timeline="false" instance_deliver_to_shared_inboxes="true" +instance_inject_mastodon_version="false" media_image_max_size="10485760" media_video_max_size="41943040" media_description_min_chars="0" media_description_max_chars="500" -media_remote_cache_days="30" +media_remote_cache_days="7" media_emoji_local_max_size="51200" media_emoji_remote_max_size="102400" @@ -111,6 +114,8 @@ ynh_app_setting_set --app="$app" --key=admin --value="$admin" ynh_app_setting_set --app="$app" --key=email --value="$email" ynh_app_setting_set --app="$app" --key=password --value="$password" +ynh_app_setting_set --app="$app" --key=cache_memory_target --value="$cache_memory_target" + ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="$accounts_registration_open" ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="$accounts_approval_required" ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="$accounts_reason_required" @@ -122,6 +127,7 @@ ynh_app_setting_set --app="$app" --key=instance_expose_suspended --value="$insta 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" +ynh_app_setting_set --app="$app" --key=instance_inject_mastodon_version --value="$instance_inject_mastodon_version" ynh_app_setting_set --app="$app" --key=media_image_max_size --value="$media_image_max_size" ynh_app_setting_set --app="$app" --key=media_video_max_size --value="$media_video_max_size" diff --git a/scripts/restore b/scripts/restore index 0080665..60848ee 100755 --- a/scripts/restore +++ b/scripts/restore @@ -44,16 +44,20 @@ db_pwd=$(ynh_app_setting_get --app="$app" --key=db_pwd) datadir=$(ynh_app_setting_get --app="$app" --key=datadir) +cache_memory_target=$(ynh_app_setting_get --app="$app" --key=cache_memory_target) + 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) +instance_inject_mastodon_version=$(ynh_app_setting_get --app="$app" --key=instance_inject_mastodon_version) accounts_registration_open=$(ynh_app_setting_get --app="$app" --key=accounts_registration_open) accounts_approval_required=$(ynh_app_setting_get --app="$app" --key=accounts_approval_required) accounts_reason_required=$(ynh_app_setting_get --app="$app" --key=accounts_reason_required) accounts_allow_custom_css=$(ynh_app_setting_get --app="$app" --key=accounts_allow_custom_css) +accounts_custom_css_length=$(ynh_app_setting_get --app="$app" --key=accounts_custom_css_length) media_image_max_size=$(ynh_app_setting_get --app="$app" --key=media_image_max_size) media_video_max_size=$(ynh_app_setting_get --app="$app" --key=media_video_max_size) diff --git a/scripts/upgrade b/scripts/upgrade index dceeffe..83bd7e8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,11 +32,14 @@ db_pwd=$(ynh_app_setting_get --app="$app" --key=db_pwd) datadir=$(ynh_app_setting_get --app="$app" --key=datadir) +cache_memory_target=$(ynh_app_setting_get --app="$app" --key=cache_memory_target) + 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) +instance_inject_mastodon_version=$(ynh_app_setting_get --app="$app" --key=instance_inject_mastodon_version) accounts_registration_open=$(ynh_app_setting_get --app="$app" --key=accounts_registration_open) accounts_approval_required=$(ynh_app_setting_get --app="$app" --key=accounts_approval_required) @@ -305,6 +308,24 @@ then ynh_app_setting_set --app="$app" --key=accounts_custom_css_length --value="$accounts_custom_css_length" fi +# Upgrade from <0.11.0~ynh1: +if ynh_compare_current_package_version --comparison lt --version 0.11.0~ynh1 || [ -z "$cache_memory_target" ] +then + # declaration of new parameter + cache_memory_target="100MiB" + instance_inject_mastodon_version="false" + # update default config + if [ "$media_remote_cache_days" == "30" ]; then + # "30" is the old default value, "7" the new one + # updating to the new default only if the old default value is used (to not overwrite an user modified value) + media_remote_cache_days="7" + ynh_app_setting_set --app="$app" --key=media_remote_cache_days --value="$media_remote_cache_days" + fi + # registration of parameter + ynh_app_setting_set --app="$app" --key=cache_memory_target --value="$cache_memory_target" + ynh_app_setting_set --app="$app" --key=instance_inject_mastodon_version --value="$instance_inject_mastodon_version" +fi + #================================================= # CREATE DEDICATED USER #=================================================