From 6b4b74fc01312827e79757bc41c185967e7478c4 Mon Sep 17 00:00:00 2001 From: Jeena Date: Sat, 2 May 2026 08:42:23 +0000 Subject: [PATCH] feat: Add Mastodon auto-update with classifier examples --- services/mastodon/auto-update.sh | 4 ++ services/mastodon/context.txt | 1 + services/mastodon/review-examples/auto-1.txt | 41 +++++++++++++++++ services/mastodon/review-examples/auto-2.txt | 43 ++++++++++++++++++ services/mastodon/review-examples/auto-3.txt | 42 +++++++++++++++++ .../mastodon/review-examples/manual-1.txt | 45 +++++++++++++++++++ .../mastodon/review-examples/manual-2.txt | 29 ++++++++++++ services/paperless/auto-update.sh | 0 8 files changed, 205 insertions(+) create mode 100755 services/mastodon/auto-update.sh create mode 100644 services/mastodon/context.txt create mode 100644 services/mastodon/review-examples/auto-1.txt create mode 100644 services/mastodon/review-examples/auto-2.txt create mode 100644 services/mastodon/review-examples/auto-3.txt create mode 100644 services/mastodon/review-examples/manual-1.txt create mode 100644 services/mastodon/review-examples/manual-2.txt mode change 100644 => 100755 services/paperless/auto-update.sh diff --git a/services/mastodon/auto-update.sh b/services/mastodon/auto-update.sh new file mode 100755 index 0000000..8320bee --- /dev/null +++ b/services/mastodon/auto-update.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -euo pipefail + +ssh mastodon@abraham.jeena.net "bash -euo pipefail upgrade.sh $2 2>&1 | tail -5" diff --git a/services/mastodon/context.txt b/services/mastodon/context.txt new file mode 100644 index 0000000..54ad3c8 --- /dev/null +++ b/services/mastodon/context.txt @@ -0,0 +1 @@ +Non-Docker instance installed from source on Linux. Uses systemd services (mastodon-web, mastodon-sidekiq, mastodon-streaming). PostgreSQL and Redis. No Elasticsearch. No LibreTranslate. diff --git a/services/mastodon/review-examples/auto-1.txt b/services/mastodon/review-examples/auto-1.txt new file mode 100644 index 0000000..61aade5 --- /dev/null +++ b/services/mastodon/review-examples/auto-1.txt @@ -0,0 +1,41 @@ +action: auto +reason: Patch security/bug fix release. Standard update steps: bundle install, yarn install, assets precompile, restart. No database migrations needed. +--- +## Upgrade overview + +This release contains upgrade notes that deviate from the norm: + +ℹ️ Requires assets recompilation + +## Changelog + +### Security + +- Insufficient verification of email addresses (GHSA-5r37-qpwq-2jhh) +- Updated dependencies + +### Added + +- Add trademark warning to `mastodon:setup` task (#38548) + +### Fixed + +- Fix definition for `quote` in JSON-LD context (#38686) +- Fix being unable to disable sound for quote update notification (#38537) +- Fix being able to quote someone you blocked (#38608) + +## Upgrade notes + +### Dependencies + +External dependencies have not changed since v4.5.0. + +### Update steps + +The following instructions are for updating from 4.5.8. + +### Non-Docker + +1. Install dependencies with `bundle install` and `yarn install --immutable` +2. Precompile the assets: `RAILS_ENV=production bundle exec rails assets:precompile` +3. Restart all Mastodon processes. diff --git a/services/mastodon/review-examples/auto-2.txt b/services/mastodon/review-examples/auto-2.txt new file mode 100644 index 0000000..3ced258 --- /dev/null +++ b/services/mastodon/review-examples/auto-2.txt @@ -0,0 +1,43 @@ +action: auto +reason: Patch security/bug fix release. No database migrations, no dependency changes. Standard asset recompile and restart. +--- +## Upgrade overview + +This release contains upgrade notes that deviate from the norm: + +ℹ️ Requires assets recompilation + +## Changelog + +### Security + +- Reject unconfirmed FASPs (#37926, GHSA-qgmm-vr4c-ggjg) +- Re-use custom socket class for FASP requests (#37925, GHSA-46w6-g98f-wxqm) + +### Added + +- Add `--suspended-only` option to `tootctl emoji purge` (#37828) + +### Fixed + +- Fix emoji data not being properly cached (#37858) +- Fix delete & redraft of pending posts (#37839) +- Fix processing separate key documents without the ActivityStreams context (#37826) +- Fix custom emojis not being purged on domain suspension (#37808) +- Fix users without special permissions being able to stream disabled timelines (#37791) +- Fix processing of object updates with duplicate hashtags (#37756) + +## Upgrade notes + +### Dependencies + +External dependencies have not changed since v4.5.0. + +### Update steps + +The following instructions are for updating from 4.5.6. + +### Non-Docker + +1. Precompile the assets: `RAILS_ENV=production bundle exec rails assets:precompile` +2. Restart all Mastodon processes. diff --git a/services/mastodon/review-examples/auto-3.txt b/services/mastodon/review-examples/auto-3.txt new file mode 100644 index 0000000..02c31bb --- /dev/null +++ b/services/mastodon/review-examples/auto-3.txt @@ -0,0 +1,42 @@ +action: auto +reason: Patch release with security and bug fixes. No database migrations, no dependency changes, no configuration changes. +--- +## Upgrade overview + +This release contains upgrade notes that deviate from the norm: + +ℹ️ Requires assets recompilation + +## Changelog + +### Security + +- Fix ActivityPub collection caching logic for pinned posts and featured tags not checking blocked accounts (GHSA-ccpr-m53r-mfwr) + +### Changed + +- Shorten caching of quote posts pending approval (#37570) + +### Fixed + +- Fix relationship cache not being cleared when handling account migrations (#37664) +- Fix quote cancel button not appearing after edit then delete-and-redraft (#37066) +- Fix followers with profile subscription being notified of post edits (#37646) +- Fix error when encountering invalid tag in updated object (#37635) +- Fix cross-server conversation tracking (#37559) +- Fix recycled connections not being immediately closed (#37335) + +## Upgrade notes + +### Dependencies + +External dependencies have not changed since v4.5.0. + +### Update steps + +The following instructions are for updating from 4.5.5. + +### Non-Docker + +1. Precompile the assets: `RAILS_ENV=production bundle exec rails assets:precompile` +2. Restart all Mastodon processes. diff --git a/services/mastodon/review-examples/manual-1.txt b/services/mastodon/review-examples/manual-1.txt new file mode 100644 index 0000000..87dc4b5 --- /dev/null +++ b/services/mastodon/review-examples/manual-1.txt @@ -0,0 +1,45 @@ +action: manual +reason: Requires database migrations (db:migrate). Minimum dependency versions bumped (Redis 7.0, PostgreSQL 14, Node 20.19). Sidekiq upgraded from 7 to 8, health check must be updated. Admin must verify dependencies and run migrations. +--- +## Upgrade overview + +This release contains upgrade notes that deviate from the norm: + +:warning: The minimum supported version for Redis has been bumped to 7.0 +:warning: The minimum supported version for PostgreSQL has been bumped to PostgreSQL 14 +:warning: The minimum supported version for Node.js has been bumped to 20.19 +:warning: Rolling updates from versions earlier than Mastodon 4.3 are not supported +:warning: Import jobs from Mastodon versions earlier than Mastodon 4.2 are not supported +ℹ️ Sidekiq has been updated, which may require you to change health check or monitoring code +ℹ️ Requires streaming server restart +ℹ️ Requires database migrations + +### Added + +- Add support for allowing and authoring quotes +- Add support for fetching and refreshing replies to the web UI +- Add ability to block words in usernames +- Add ability to individually disable local or remote feeds + +### Sidekiq update and health checks + +We have updated Sidekiq from Sidekiq 7 to Sidekiq 8, which may require you to change health check or monitoring code. + +## Upgrade notes + +### Dependencies + +External dependencies have changed since v4.4.0, with the Redis, PostgreSQL and Node.js minimum version being higher. + +- Ruby: 3.2 or newer +- PostgreSQL: 14 or newer +- Redis: 7.0 or newer +- Node: 20.19 or newer + +### Non-Docker + +1. If you are using `rbenv`, update the list of available versions and install the proper Ruby version. +2. Install dependencies with `bundle install` and `yarn install --immutable` +3. Precompile the assets: `RAILS_ENV=production bundle exec rails assets:precompile` +4. Run the database migrations: `RAILS_ENV=production bundle exec rails db:migrate` +5. Restart all Mastodon processes. diff --git a/services/mastodon/review-examples/manual-2.txt b/services/mastodon/review-examples/manual-2.txt new file mode 100644 index 0000000..c72ab5a --- /dev/null +++ b/services/mastodon/review-examples/manual-2.txt @@ -0,0 +1,29 @@ +action: manual +reason: Major version with two-step database migration, new required Sidekiq queue (ingress), environment variable changes (AUTHORIZED_FETCH replaced by DISALLOW_UNAUTHENTICATED_API_ACCESS), and systemd service file updates required. +--- +## Upgrade overview + +This release contains upgrade notes that deviate from the norm: + +ℹ️ Requires two-step database migration process for zero-downtime deployment +ℹ️ Some migrations may take a long time to run +ℹ️ Behaviour of `AUTHORIZED_FETCH` changed +ℹ️ Requires review of Sidekiq queues in some setups (new queue: `ingress`) +ℹ️ Some server settings, like thumbnail, short description, and so on, changed and may need to be looked at + +## Upgrade notes + +⚠️ Incoming federated activity now uses a new `ingress` queue in Sidekiq. If you customize Sidekiq processes/queues or use an old version of the `mastodon-sidekiq.service` file, ensure that there is at least one process handling the `ingress` queue. + +ℹ️ The `AUTHORIZED_FETCH` option no longer affects the REST API. To restore previous behaviour, use new environment variable `DISALLOW_UNAUTHENTICATED_API_ACCESS`. + +ℹ️ Media upload of images and animated GIFs are now processed differently. Make sure your installed systemd service files are up to date. + +### Non-Docker + +1. Run the *pre-deployment* database migrations: + `SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate` +2. Precompile the assets: `RAILS_ENV=production bundle exec rails assets:precompile` +3. Restart all Mastodon processes. +4. Run the *post-deployment* database migrations: + `RAILS_ENV=production bundle exec rails db:migrate` diff --git a/services/paperless/auto-update.sh b/services/paperless/auto-update.sh old mode 100644 new mode 100755