aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_G <46165813+ericgaspar@users.noreply.github.com>2025-09-17 21:31:28 +0200
committerGitHub <noreply@github.com>2025-09-17 21:31:28 +0200
commit11126008f0b77b06bbab143211e1cbee1f07a021 (patch)
tree2baf9108e18e0e8ab7ca22c169993cd2a6c2e904
parentbe2718c43687ff875fd7696cde4b98681c17d0eb (diff)
parent783836fa5c5282f85a582a1dd039115da7b02436 (diff)
downloadmastodon_ynh-11126008f0b77b06bbab143211e1cbee1f07a021.tar.gz
mastodon_ynh-11126008f0b77b06bbab143211e1cbee1f07a021.tar.bz2
mastodon_ynh-11126008f0b77b06bbab143211e1cbee1f07a021.zip
Merge branch 'testing' into ruby-and-nodejs-resources
-rw-r--r--README.md2
-rw-r--r--conf/cron10
-rw-r--r--conf/mastodon-sidekiq.service2
-rw-r--r--conf/mastodon-web.service2
-rw-r--r--manifest.toml11
-rw-r--r--scripts/install26
-rw-r--r--scripts/restore2
-rw-r--r--scripts/upgrade20
8 files changed, 38 insertions, 37 deletions
diff --git a/README.md b/README.md
index e285399..699db55 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Libre and federated social network
[![🌐 Official app website](https://img.shields.io/badge/Official_app_website-darkgreen?style=for-the-badge)](https://joinmastodon.org/)
[![App Demo](https://img.shields.io/badge/App_Demo-blue?style=for-the-badge)](https://joinmastodon.org/)
-[![Version: 4.4.3~ynh1](https://img.shields.io/badge/Version-4.4.3~ynh1-rgb(18,138,11)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/mastodon/)
+[![Version: 4.4.4~ynh1](https://img.shields.io/badge/Version-4.4.4~ynh1-rgb(18,138,11)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/mastodon/)
<div align="center">
<a href="https://apps.yunohost.org/app/mastodon"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a>
diff --git a/conf/cron b/conf/cron
index ca08f7f..f3d532c 100644
--- a/conf/cron
+++ b/conf/cron
@@ -1,7 +1,7 @@
# This is a system cron file, see crontab(5)
# m h dom mon dow user command
-@daily __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ __LD_PRELOAD__ RAILS_ENV=production bin/tootctl media remove
-@monthly __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ __LD_PRELOAD__ RAILS_ENV=production bin/tootctl media remove-orphans
-@monthly __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ __LD_PRELOAD__ RAILS_ENV=production bin/tootctl accounts cull
-@monthly __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ __LD_PRELOAD__ RAILS_ENV=production bin/tootctl statuses remove
-@monthly __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ __LD_PRELOAD__ RAILS_ENV=production bin/tootctl preview_cards remove
+@daily __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ LD_PRELOAD=libjemalloc.so RAILS_ENV=production bin/tootctl media remove
+@monthly __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ LD_PRELOAD=libjemalloc.so RAILS_ENV=production bin/tootctl media remove-orphans
+@monthly __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ LD_PRELOAD=libjemalloc.so RAILS_ENV=production bin/tootctl accounts cull
+@monthly __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ LD_PRELOAD=libjemalloc.so RAILS_ENV=production bin/tootctl statuses remove
+@monthly __APP__ cd __INSTALL_DIR__/live && PATH=__PATH_WITH_RUBY__ LD_PRELOAD=libjemalloc.so RAILS_ENV=production bin/tootctl preview_cards remove
diff --git a/conf/mastodon-sidekiq.service b/conf/mastodon-sidekiq.service
index 0048c61..1ad6590 100644
--- a/conf/mastodon-sidekiq.service
+++ b/conf/mastodon-sidekiq.service
@@ -9,7 +9,7 @@ WorkingDirectory=__INSTALL_DIR__/live
Environment="RAILS_ENV=production"
Environment="DB_POOL=25"
Environment="MALLOC_ARENA_MAX=2"
-Environment="__LD_PRELOAD__"
+Environment="LD_PRELOAD=libjemalloc.so"
Environment="PATH=__PATH_WITH_RUBY__"
ExecStart=__INSTALL_DIR__/live/bin/bundle exec sidekiq -c 25
TimeoutSec=15
diff --git a/conf/mastodon-web.service b/conf/mastodon-web.service
index 2635c71..5b3da39 100644
--- a/conf/mastodon-web.service
+++ b/conf/mastodon-web.service
@@ -8,7 +8,7 @@ User=__APP__
WorkingDirectory=__INSTALL_DIR__/live
Environment="RAILS_ENV=production"
Environment="PORT=__PORT_WEB__"
-Environment="__LD_PRELOAD__"
+Environment="LD_PRELOAD=libjemalloc.so"
Environment="PATH=__PATH_WITH_RUBY__"
ExecStart=__INSTALL_DIR__/live/bin/bundle exec puma -C config/puma.rb
ExecReload=/bin/kill -SIGUSR1 $MAINPID
diff --git a/manifest.toml b/manifest.toml
index bdb7071..f85d5c0 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -5,7 +5,7 @@ name = "Mastodon"
description.en = "Libre and federated social network"
description.fr = "Réseau social libre et fédéré"
-version = "4.4.3~ynh1"
+version = "4.4.4~ynh1"
maintainers = []
@@ -19,7 +19,7 @@ cpe = "cpe:2.3:a:joinmastodon:mastodon"
fund = "https://joinmastodon.org/sponsors"
[integration]
-yunohost = ">= 12.1.15"
+yunohost = ">= 12.1.17"
helpers_version = "2.1"
architectures = "all"
multi_instance = true
@@ -52,8 +52,8 @@ ram.runtime = "500M"
[resources]
[resources.sources]
[resources.sources.main]
- url = "https://github.com/mastodon/mastodon/archive/refs/tags/v4.4.3.tar.gz"
- sha256 = "ede116b80a525462f5ea68d046a4cdd787930fc6d2f9327c140756311ee07848"
+ url = "https://github.com/mastodon/mastodon/archive/refs/tags/v4.4.4.tar.gz"
+ sha256 = "1df58eec7da0c47767493ec3ec3ec2225a0bcca94871d1d6615ee324aaed91ba"
autoupdate.strategy = "latest_github_release"
[resources.sources.redis_migration]
@@ -67,7 +67,8 @@ ram.runtime = "500M"
allow_email = true
[resources.install_dir]
-
+ group = "www-data:r-x"
+
[resources.permissions]
main.url = "/"
diff --git a/scripts/install b/scripts/install
index 38395c5..4b6b798 100644
--- a/scripts/install
+++ b/scripts/install
@@ -72,19 +72,19 @@ ynh_script_progression "Building app..."
pushd "$install_dir/live"
gem update --system
gem install bundler --no-document
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config deployment 'true'
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config without 'development test'
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config set force_ruby_platform true --quiet
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config deployment 'true'
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config without 'development test'
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config set force_ruby_platform true --quiet
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
env corepack enable
- echo Y | ynh_hide_warnings ynh_exec_as_app yarn workspaces focus --production
- ynh_hide_warnings ynh_exec_as_app yarn install --immutable
+ echo Y | ynh_exec_as_app yarn workspaces focus --production
+ ynh_exec_as_app yarn install --immutable
echo "SAFETY_ASSURED=1">> $config
# Generate vapid keys
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails mastodon:webpush:generate_vapid_key > vapid_key.txt
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails mastodon:webpush:generate_vapid_key > vapid_key.txt
# Generate active record encryption
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:encryption:init > active_record_encryption.txt
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:encryption:init > active_record_encryption.txt
popd
# Re-generate config with vapid keys and active record encryption
@@ -104,12 +104,12 @@ ynh_delete_file_checksum "$config"
ynh_config_add --template=".env.production.sample" --destination="$config"
pushd "$install_dir/live"
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:migrate --quiet
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:seed --quiet
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails assets:precompile --quiet
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:migrate --quiet
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:seed --quiet
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails assets:precompile --quiet
# Create the first admin user
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/tootctl accounts approve "$admin"
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/tootctl accounts approve "$admin"
popd
#=================================================
diff --git a/scripts/restore b/scripts/restore
index cdaf6a5..9a706fb 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -45,7 +45,7 @@ ynh_script_progression "Building app..."
pushd "$install_dir/live"
gem update --system
gem install bundler --no-document
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle install --redownload -j$(getconf _NPROCESSORS_ONLN)
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle install --redownload -j$(getconf _NPROCESSORS_ONLN)
popd
#=================================================
diff --git a/scripts/upgrade b/scripts/upgrade
index 5ab2a51..97e9062 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -68,14 +68,14 @@ ynh_script_progression "Building assets..."
pushd "$install_dir/live"
gem update --system
gem install bundler --no-document
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config deployment 'true'
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config without 'development test'
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config set force_ruby_platform true --quiet
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config deployment 'true'
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config without 'development test'
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config set force_ruby_platform true --quiet
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
env corepack enable
- echo Y | ynh_hide_warnings ynh_exec_as_app yarn workspaces focus --production
- ynh_hide_warnings ynh_exec_as_app yarn install --immutable
+ echo Y | ynh_exec_as_app yarn workspaces focus --production
+ ynh_exec_as_app yarn install --immutable
popd
chown -R "$app:www-data" "$install_dir/live/public"
@@ -112,7 +112,7 @@ if ynh_app_upgrading_from_version_before 4.3.2~ynh1; then
pushd "$install_dir/live"
# Generate active record encryption
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:encryption:init > active_record_encryption.txt
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:encryption:init > active_record_encryption.txt
active_record_encryption_deterministic_key=$(grep -oP "ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=\K.+" "$install_dir/live/active_record_encryption.txt")
ynh_app_setting_set --key=active_record_encryption_deterministic_key --value="$active_record_encryption_deterministic_key"
active_record_encryption_key_derivation_salt=$(grep -oP "ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=\K.+" "$install_dir/live/active_record_encryption.txt")
@@ -133,11 +133,11 @@ ynh_config_add --template=".env.production.sample" --destination="$config"
ynh_script_progression "Applying migrations..."
pushd "$install_dir/live"
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:migrate --quiet
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails assets:precompile --quiet
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:migrate --quiet
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails assets:precompile --quiet
# Apply redis namespace migration (https://github.com/mastodon/redis_namespace_migration)
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 $ld_preload bin/rails runner rename.rb
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 LD_PRELOAD=libjemalloc.so bin/rails runner rename.rb
redis_namespace="$(ynh_app_setting_get --key=redis_namespace)"
if [ $redis_namespace ]; then
if [ ynh_app_setting_get --key=es_enabled == "true" ] && [ ynh_app_setting_get --key=es_prefix == "" ]; then