MyGit

v4.2.0

mastodon/mastodon

版本发布时间: 2023-09-21 22:54:00

mastodon/mastodon最新发布版本:v4.3.0-beta.2(2024-09-17 23:53:19)

Mastodon

We are excited to release Mastodon 4.2.0, our next major upgrade 🎉

In this version, we've added (opt-in) search for posts, along with a refined set of privacy options where users can decide whether to have their content indexed for discovery. There are also many other small improvements across the user interface that come together to make everything much more polished and smooth to get started.

To get an overview of what this release brings, check out our announcement blog post.

:warning: We recently released important security updates.

If you don't want or can't update to 4.2.0 yet, the security updates are also available for the 4.1.x branch, the 4.0.x branch and the 3.5.x branch.

Upgrade overview

This release contains upgrade notes that deviate from the norm:

ℹ️ Requires streaming API restart ℹ️ Requires database migrations ℹ️ Starting from this release, Mastodon will periodically check for updates (see below if you want to disable that behavior) :warning: Requires rebuilding Elasticsearch indexes :warning: The minimal supported version for Ruby has been bumped to 3.0 :warning: The minimal supported version for Node.js has been bumped to 16 :warning: The minimal supported version for PostgreSQL has been bumped to 10. Please note that using PostgreSQL 10 or 11 is deprecated and will not be supported in 4.3.0. :warning: The minimal supported version for LibreTranslate has been bumped to 1.3.3 :warning: The way database replicas are configured has changed :warning: Disables part of the StatsD integration by default :warning: Drops built-in clustering support from the streaming server :warning: Updated systemd unit files for the streaming server :warning: We will stop bundling PgHero in a future release

For more information, scroll down to the upgrade instructions section.

Changelog

The following changelog entries focus on changes visible to users, administrators, client developers or federated software developers, but there has also been a lot of code modernization, refactoring, and tooling work, in particular by @danielmbrasil, @mjankowski, @nschonni, @renchap, and @takayamaki.

Added

Changed

Removed

Fixed

Upgrade notes

To get the code for v4.2.0, use git fetch && git checkout v4.2.0.

As always, make sure you have backups of the database before performing any upgrades. If you are using docker-compose, this is how a backup command might look: docker exec mastodon_db_1 pg_dump -Fc -U postgres postgres > name_of_the_backup.dump

Dependencies

External dependencies have changed since v4.1.7, with the Ruby, PostgreSQL and Node.js minimum version being higher.

If your uploaded images are broken after the upgrade, it means your installed ImageMagick version is older than the new minimum version (6.9.7-7), for example if you are running Ubuntu 18.04. If this happens, you can find more information and ways to fix it on this page.

Database replica configuration

The way Mastodon handles read replicas has changed, removing the makara gem and using native Rails support instead.

This changes how database replicas are configured. Instead of editing config/database.yml, you should use an unmodified one and use the REPLICA_DB_NAME, along with REPLICA_DB_USER, REPLICA_DB_PASS, REPLICA_DB_HOST and REPLICA_DB_PORT, if they differ from the primary database.

If you are using DATABASE_URL, you can configure your read replica in a similar way using REPLICA_DATABASE_URL.

StatsD integration

We have identified the current implementation of the StatsD integration for sidekiq to cause a lot of overhead. Therefore, we have disabled it by default, but since we do not have an alternative yet, it is still available by setting the following environment variable: STATSD_SIDEKIQ=true.

Please note that StatsD integration is deprecated and will not be supported in 4.3.0.

Streaming server changes

We have dropped built-in clustering support from the streaming server, which means, depending on the load you are facing, that you may need to run multiple instances of it and configure a load-balancer.

Unless you are using Docker, it is recommended that you update your mastodon-streaming unit scripts with the ones we provide:

  1. sudo cp ~mastodon/live/dist/mastodon-streaming*.service /etc/systemd/system/
  2. sudo systemctl daemon-reload
  3. sudo systemctl restart mastodon-streaming

If you then need to run more than one mastodon-streaming server, you can:

  1. Start a new instance with sudo systemctl start mastodon-streaming@port (e.g. mastodon-streaming@4001)
  2. Edit your nginx configuration file to add the new server to the load-balancing (an example is provided in the comments in dist/nginx.conf)

Automatic update checking

Starting from this release, Mastodon will periodically check for updates by querying https://api.joinmastodon.org/update-check every 30 minutes in a background job. That URL can be changed using the UPDATE_CHECK_URL environment variable, and the feature outright disabled by setting that variable to an empty string (UPDATE_CHECK_URL=).

Update steps

The following instructions are for updating from 4.1.9.

If you are upgrading directly from an earlier release, please carefully read the upgrade notes for the skipped releases as well, as they often require extra steps such as database migrations.

Non-Docker only:

  1. If you are using rbenv, update the list of available versions and install Ruby 3.2.2 by doing RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install in the Mastodon install directory (e.g. /home/mastodon/live)
  2. Install dependencies: bundle install and yarn install --frozen-lockfile
  3. Precompile the assets: RAILS_ENV=production bundle exec rails assets:precompile
  4. Run the pre-deployment database migrations by specifying the SKIP_POST_DEPLOYMENT_MIGRATIONS=true environment variable: SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate
  5. Restart all Mastodon processes
  6. Run the post-deployment database migrations: RAILS_ENV=production bundle exec rails db:migrate
  7. If you use Elasticsearch, rebuild the search indexes with RAILS_ENV=production bin/tootctl search deploy --reset-chewy

Using Docker:

  1. Run the pre-deployment database migrations by specifying the SKIP_POST_DEPLOYMENT_MIGRATIONS=true environment variable: docker-compose run --rm -e SKIP_POST_DEPLOYMENT_MIGRATIONS=true web bundle exec rails db:migrate
  2. Restart all Mastodon processes
  3. Run the post-deployment database migrations: docker-compose run --rm web bundle exec rails db:migrate
  4. If you use Elasticsearch, rebuild the search indexes with docker-compose run --rm web bin/tootctl search deploy --reset-chewy

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-09-21发行的版本