From e74b4f323020ca2d62e34ee95f9ea5319802305a Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 24 Nov 2023 23:32:57 +0100 Subject: [PATCH 1/7] remove unnecessary touch and bump min ynh version --- manifest.json | 4 ++-- scripts/install | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index d83ed78..51f8eeb 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 11.0.6" + "yunohost": ">= 11.2.6" }, "multi_instance": true, "services": [ @@ -106,4 +106,4 @@ } ] } -} +} \ No newline at end of file diff --git a/scripts/install b/scripts/install index 6fc85f1..5ad594b 100755 --- a/scripts/install +++ b/scripts/install @@ -307,9 +307,6 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Configuring fail2ban..." --weight=1 -# Create the logfile, required before configuring fail2ban -touch "/var/log/${app}/${app}.log" - # Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="/var/log/${app}/${app}.log" --failregex="statusCode=401 path=/auth/sign_in clientIP= .* msg=\"Unauthorized:" --max_retry=5 From 6bedad62daecf332f4b6d04a3eb3b23de9903d49 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 1 Dec 2023 17:59:08 +0100 Subject: [PATCH 2/7] upgrade config for v0.13.0, Spider Sloth --- conf/config.yaml | 81 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 69 insertions(+), 12 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index f2dd51e..1a2cceb 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -238,6 +238,12 @@ db-sqlite-synchronous: "NORMAL" # 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 +# +# More is not necessarily better for caches. They need to be tuned to the +# workload. The defaults should be plenty for most instances and you shouldn't +# change it. If you do change it, ensure you mention this when requesting help +# in the GoToSocial Help channel. +# # Examples: ["0", "2MiB", "8MiB", "64MiB"] # Default: "8MiB" db-sqlite-cache-size: "8MiB" @@ -281,6 +287,21 @@ web-asset-base-dir: "./web/assets/" # Config pertaining to instance federation settings, pages to hide/expose, etc. +# Array of string. BCP47 language tags to indicate preferred languages of users on this instance. +# +# If you provide these, you should provide these in order from most-preferred to least-preferred, +# but note that leaving out a language from this array doesn't mean it can't be used on this instance, +# it only means it won't be advertised as a preferred instance language. +# +# It is valid to provide no entries here; your instance will then have no particular preferred language. +# +# See here for commonly-used tags: https://en.wikipedia.org/wiki/IETF_language_tag#List_of_common_primary_language_subtags +# See here for all current tags: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry +# +# Example: ["nl", "en-gb", "fr"] +# Default: [] +instance-languages: [] + # String. Federation mode to use for this instance. # # "blocklist" -- open federation by default. Only instances that are explicitly @@ -419,21 +440,10 @@ media-description-min-chars: __MEDIA_DESCRIPTION_MIN_CHARS__ # Default: 500 media-description-max-chars: __MEDIA_DESCRIPTION_MAX_CHARS__ -# Int. Number of days to cache media from remote instances before they are removed from the cache. -# A job will run every day at midnight to clean up any remote media older than the given amount of days. -# -# When remote media is removed from the cache, it is deleted from storage but the database entries for the media -# are kept so that it can be fetched again if requested by a user. -# -# If this is set to 0, then media from remote instances will be cached indefinitely. -# Examples: [30, 60, 7, 0] -# 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. # The default is the same as the Mastodon size limit for emojis (50kb), which allows # for good interoperability. Raising this limit may cause issues with federation -# of your emojis to other instances, so beware. +# of your emojis to other instances, so beware.media-emoji-remote-max-size: 102400 # Examples: [51200, 102400] # Default: 51200 media-emoji-local-max-size: __MEDIA_EMOJI_LOCAL_MAX_SIZE__ @@ -446,6 +456,37 @@ media-emoji-local-max-size: __MEDIA_EMOJI_LOCAL_MAX_SIZE__ # Default: 102400 media-emoji-remote-max-size: __MEDIA_EMOJI_REMOTE_MAX_SIZE__ +# The below media cleanup settings allow admins to customize when and +# how often media cleanup + prune jobs run, while being set to a fairly +# sensible default (every night @ midnight). For more information on exactly +# what these settings do, with some customization examples, see the docs: +# https://docs.gotosocial.org/en/latest/admin/media_caching#cleanup + +# Int. Number of days to cache media from remote instances before +# they are removed from the cache. When remote media is removed from +# the cache, it is deleted from storage but the database entries for +# the media are kept so that it can be fetched again if requested by a user. +# +# If this is set to 0, then media from remote instances will be cached indefinitely. +# +# Examples: [30, 60, 7, 0] +# Default: 7 +media-remote-cache-days: __MEDIA_REMOTE_CACHE_DAYS__ + +# String. 24hr time of day formatted as hh:mm. +# Examples: ["14:30", "00:00", "04:00"] +# Default: "00:00" (midnight). +media-cleanup-from: "00:00" + +# Duration. Period between media cleanup runs. +# More than once per 24h is not recommended +# is likely overkill. Setting this to something +# very low like once every 10 minutes will probably +# cause lag and possibly other issues. +# Examples: ["24h", "72h", "12h"] +# Default: "24h" (once per day). +media-cleanup-every: "24h" + ########################## ##### STORAGE CONFIG ##### ########################## @@ -767,6 +808,22 @@ tracing-endpoint: "" # Default: false tracing-insecure-transport: false +# Bool. Enable OpenTelemetry based metrics support. +# Default: false +metrics-enabled: false + +# Bool. Enable HTTP Basic Authentication for Prometheus metrics endpoint. +# Default: false +metrics-auth-enabled: false + +# String. Username for Prometheus metrics endpoint. +# Default: "" +metrics-auth-username: "" + +# String. Password for Prometheus metrics endpoint. +# Default: "" +metrics-auth-password: "" + ################################ ##### HTTP CLIENT SETTINGS ##### ################################ From c2466b9fbc40f6b3e764b14082b23df09b831f66 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 12 Dec 2023 17:21:22 +0100 Subject: [PATCH 3/7] add a warning about the post upgrade inaccessibility --- doc/PRE_UPGRADE.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/PRE_UPGRADE.md diff --git a/doc/PRE_UPGRADE.md b/doc/PRE_UPGRADE.md new file mode 100644 index 0000000..7405a97 --- /dev/null +++ b/doc/PRE_UPGRADE.md @@ -0,0 +1,2 @@ +GoToSocial takes some time (from some seconds to some minutes) after each version upgrades to perform various things, like database migration or optimizations. +If your instance is not accessible, please be patient and **do not** restart it manually at the risk of breaking everything! \ No newline at end of file From 590bb9c824ed94fb2f08b41bb97da385c1faa4cc Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 13 Dec 2023 04:39:57 +0100 Subject: [PATCH 4/7] typo --- doc/PRE_UPGRADE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/PRE_UPGRADE.md b/doc/PRE_UPGRADE.md index 7405a97..3471a4f 100644 --- a/doc/PRE_UPGRADE.md +++ b/doc/PRE_UPGRADE.md @@ -1,2 +1,2 @@ -GoToSocial takes some time (from some seconds to some minutes) after each version upgrades to perform various things, like database migration or optimizations. -If your instance is not accessible, please be patient and **do not** restart it manually at the risk of breaking everything! \ No newline at end of file +GoToSocial takes some time (from some seconds to some minutes) after each version upgrades to perform various things, like database migration or optimizations. +If your instance is not accessible, please be patient and **do not** restart it manually at the risk of breaking everything! From 298d48ea1125d9bd2b1d8be2156a511e92159c3b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 15 Dec 2023 17:03:46 +0000 Subject: [PATCH 5/7] Upgrade to v0.13.0 --- 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 3ea7a3e..9562775 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.12.2/gotosocial_0.12.2_linux_arm64.tar.gz -SOURCE_SUM=a3db45b6f1b2694c496d63494b75f1933f85c907a257b578fe4b5af63b2ffd9f +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.13.0/gotosocial_0.13.0_linux_arm64.tar.gz +SOURCE_SUM=cd93eb377ff86f241a3957fc81b08607b3df89bb70c3d857bb2ad107db917678 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.12.2_linux_arm64.tar.gz +SOURCE_FILENAME=gotosocial_0.13.0_linux_arm64.tar.gz diff --git a/conf/armv6.src b/conf/armv6.src index a32ec30..db624e1 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.12.2/gotosocial_0.12.2_linux_armv6.tar.gz -SOURCE_SUM=aea3f1b6ec9d41607fab714cdb491bcbdcb7c1c7603d5949503fc4e6623c3c9c +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.13.0/gotosocial_0.13.0_linux_armv6.tar.gz +SOURCE_SUM=9d67def302645987279ea76a64e72eda2d05318bd2aea42109dce097e65b2087 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.12.2_linux_armv6.tar.gz +SOURCE_FILENAME=gotosocial_0.13.0_linux_armv6.tar.gz diff --git a/conf/armv7.src b/conf/armv7.src index 7ed43e0..97e598b 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.12.2/gotosocial_0.12.2_linux_armv7.tar.gz -SOURCE_SUM=ee14e32905949029f4f66d6c1d99b1ad23a20764a85b782cefa74c67c1de2a73 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.13.0/gotosocial_0.13.0_linux_armv7.tar.gz +SOURCE_SUM=2bff982d96333528d6479aef16d3686038a9d01f11c5043a536f2b7a463fd881 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.12.2_linux_armv7.tar.gz +SOURCE_FILENAME=gotosocial_0.13.0_linux_armv7.tar.gz diff --git a/conf/i386.src b/conf/i386.src index a9f354b..beab9e8 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,7 +1,7 @@ -SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.12.2/gotosocial_0.12.2_linux_386.tar.gz -SOURCE_SUM=42d6aea6276cfba123394bf38d3621feda3981f264013cc286596f6174a2c56c +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.13.0/gotosocial_0.13.0_linux_386.tar.gz +SOURCE_SUM=0b75d0c2b55877f6f2c1a8a1d723aa1c868bee902a9689f3cde8410c8b680d89 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.12.2_linux_386.tar.gz +SOURCE_FILENAME=gotosocial_0.13.0_linux_386.tar.gz diff --git a/conf/x86-64.src b/conf/x86-64.src index 2d873c9..40ff90e 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.12.2/gotosocial_0.12.2_linux_amd64.tar.gz -SOURCE_SUM=19c5418293669baeab6216d7a96669b4dfb04ccd533f91a953cf53d4679772f4 +SOURCE_URL=https://github.com/superseriousbusiness/gotosocial/releases/download/v0.13.0/gotosocial_0.13.0_linux_amd64.tar.gz +SOURCE_SUM=fce2f2e3cb0af23542f1f15887cf967dedcae849971c56ee9ce4284a4593a70c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=gotosocial_0.12.2_linux_amd64.tar.gz +SOURCE_FILENAME=gotosocial_0.13.0_linux_amd64.tar.gz diff --git a/manifest.json b/manifest.json index 51f8eeb..33f7da2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Fast ActivityPub social network server written in Go", "fr": "Serveur de réseau social véloce basé sur ActivityPub écrit en Go" }, - "version": "0.12.2~ynh1", + "version": "0.13.0~ynh1", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", @@ -106,4 +106,4 @@ } ] } -} \ No newline at end of file +} From de43e282fe9caaee2a0e84a0fbba1c6935d11710 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 15 Dec 2023 17:03:52 +0000 Subject: [PATCH 6/7] 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 0ae24d1..45ec389 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The official documentation is at [docs.gotosocial.org](https://docs.gotosocial.o The documentation for this YunoHost package [can be read here](./doc/DOCS.md) and the admin is **strongly encouraged to read it**! -**Shipped version:** 0.12.2~ynh1 +**Shipped version:** 0.13.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index cc376c2..17456ab 100644 --- a/README_fr.md +++ b/README_fr.md @@ -24,7 +24,7 @@ Vous pouvez consulter la documentation officielle à l'adresse : [docs.gotosocia La documentation de ce paquet YunoHost [est lisible ici](./doc/DOCS_fr.md) et l'admin est **vivement encouragé-e à la lire** ! -**Version incluse :** 0.12.2~ynh1 +**Version incluse :** 0.13.0~ynh1 ## Captures d’écran From 8086558dbfb3089347252b1d36c56678291f6fde Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 15 Dec 2023 18:09:35 +0100 Subject: [PATCH 7/7] typo --- conf/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.yaml b/conf/config.yaml index 1a2cceb..a926a20 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -443,7 +443,7 @@ media-description-max-chars: __MEDIA_DESCRIPTION_MAX_CHARS__ # Int. Max size in bytes of emojis uploaded to this instance via the admin API. # The default is the same as the Mastodon size limit for emojis (50kb), which allows # for good interoperability. Raising this limit may cause issues with federation -# of your emojis to other instances, so beware.media-emoji-remote-max-size: 102400 +# of your emojis to other instances, so beware. # Examples: [51200, 102400] # Default: 51200 media-emoji-local-max-size: __MEDIA_EMOJI_LOCAL_MAX_SIZE__