From e7f213118d206195f430e5cee0d4c58336410837 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Fri, 29 Aug 2025 21:49:53 +0200 Subject: fix: LD_PRELOAD with a proper value --- conf/cron | 10 +++++----- conf/mastodon-sidekiq.service | 2 +- conf/mastodon-web.service | 2 +- scripts/_common.sh | 18 ------------------ scripts/install | 26 +++++++++++++------------- scripts/restore | 2 +- scripts/upgrade | 20 ++++++++++---------- 7 files changed, 31 insertions(+), 49 deletions(-) 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/scripts/_common.sh b/scripts/_common.sh index 182e391..7ac14ba 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,21 +7,3 @@ memory_needed="2560" ruby_version=3.4.5 nodejs_version=20 - -case $YNH_ARCH in - amd64) - ld_preload="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so" - ;; - arm64) - ld_preload="LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so" - ;; - armhf) - ld_preload="LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libjemalloc.so" - ;; - armel) - ld_preload="LD_PRELOAD=/usr/lib/arm-linux-gnueabi/libjemalloc.so" - ;; - i386) - ld_preload="LD_PRELOAD=/usr/lib/i386-linux-gnu/libjemalloc.so" - ;; -esac diff --git a/scripts/install b/scripts/install index 7e400d5..22d297f 100644 --- a/scripts/install +++ b/scripts/install @@ -80,19 +80,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_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config deployment 'true' + ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config without 'development test' + ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config set force_ruby_platform true --quiet + 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_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_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 @@ -112,12 +112,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_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:migrate --quiet + ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:seed --quiet + 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_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner + 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 0becd6c..692aa98 100644 --- a/scripts/restore +++ b/scripts/restore @@ -55,7 +55,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_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 769b47c..633117c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,14 +79,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_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config deployment 'true' + ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config without 'development test' + ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config set force_ruby_platform true --quiet + 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" @@ -125,7 +125,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_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") @@ -146,11 +146,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_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:migrate --quiet + 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_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 -- cgit v1.2.3-70-g09d2 From 0114f2f9b79a03241cffeff6bb18182938dda414 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Fri, 29 Aug 2025 22:09:59 +0200 Subject: hide warnings --- scripts/install | 22 +++++++++++----------- scripts/restore | 2 +- scripts/upgrade | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/install b/scripts/install index 22d297f..ddb0692 100644 --- a/scripts/install +++ b/scripts/install @@ -80,19 +80,19 @@ ynh_script_progression "Building app..." pushd "$install_dir/live" gem update --system gem install bundler --no-document - ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config deployment 'true' - ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config without 'development test' - ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config set force_ruby_platform true --quiet - ynh_exec_as_app LD_PRELOAD=libjemalloc.so 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_exec_as_app yarn workspaces focus --production ynh_exec_as_app yarn install --immutable echo "SAFETY_ASSURED=1">> $config # Generate vapid keys - ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so 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_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so 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 @@ -112,12 +112,12 @@ ynh_delete_file_checksum "$config" ynh_config_add --template=".env.production.sample" --destination="$config" pushd "$install_dir/live" - ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:migrate --quiet - ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:seed --quiet - ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so 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_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner - ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so 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 692aa98..c6939f6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -55,7 +55,7 @@ ynh_script_progression "Building app..." pushd "$install_dir/live" gem update --system gem install bundler --no-document - ynh_exec_as_app LD_PRELOAD=libjemalloc.so 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 633117c..8fa7f0f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,10 +79,10 @@ ynh_script_progression "Building assets..." pushd "$install_dir/live" gem update --system gem install bundler --no-document - ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config deployment 'true' - ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config without 'development test' - ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config set force_ruby_platform true --quiet - ynh_exec_as_app LD_PRELOAD=libjemalloc.so 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_exec_as_app yarn workspaces focus --production @@ -125,7 +125,7 @@ if ynh_app_upgrading_from_version_before 4.3.2~ynh1; then pushd "$install_dir/live" # Generate active record encryption - ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so 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") @@ -146,11 +146,11 @@ ynh_config_add --template=".env.production.sample" --destination="$config" ynh_script_progression "Applying migrations..." pushd "$install_dir/live" - ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:migrate --quiet - ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so 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_exec_as_app RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 LD_PRELOAD=libjemalloc.so 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 -- cgit v1.2.3-70-g09d2 From 4976431397f6e9824526276bdd94d62cefb3548a Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sat, 30 Aug 2025 14:41:25 +0200 Subject: ruby and nodejs resources --- manifest.toml | 9 ++++++++- scripts/_common.sh | 2 -- scripts/install | 8 -------- scripts/remove | 4 ---- scripts/restore | 8 -------- scripts/upgrade | 8 -------- 6 files changed, 8 insertions(+), 31 deletions(-) diff --git a/manifest.toml b/manifest.toml index 7f0b634..152433a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,7 @@ cpe = "cpe:2.3:a:joinmastodon:mastodon" fund = "https://joinmastodon.org/sponsors" [integration] -yunohost = ">= 12.0.10" +yunohost = ">= 12.1.15" helpers_version = "2.1" architectures = "all" multi_instance = true @@ -87,3 +87,10 @@ ram.runtime = "500M" [resources.database] type = "postgresql" + + [resources.nodejs] + version = "20" + + [resources.ruby] + version = "3.4.5" + diff --git a/scripts/_common.sh b/scripts/_common.sh index 182e391..c7ff983 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,8 +5,6 @@ #================================================= memory_needed="2560" -ruby_version=3.4.5 -nodejs_version=20 case $YNH_ARCH in amd64) diff --git a/scripts/install b/scripts/install index 7e400d5..38395c5 100644 --- a/scripts/install +++ b/scripts/install @@ -8,14 +8,6 @@ admin_mail=$(ynh_user_get_info --username=$admin --key=mail) # Set `service` settings to support `yunohost app shell` command ynh_app_setting_set --key=service --value="$app-web.service" -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression "Installing Ruby and NodeJS..." - -ynh_ruby_install -ynh_nodejs_install - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= diff --git a/scripts/remove b/scripts/remove index 297786f..e97be10 100644 --- a/scripts/remove +++ b/scripts/remove @@ -44,10 +44,6 @@ ynh_safe_rm "/etc/cron.d/$app" # Remote logrotate config ynh_config_remove_logrotate -# Remove metapackage and its dependencies -ynh_ruby_remove -ynh_nodejs_remove - # Remove swap ynh_del_swap diff --git a/scripts/restore b/scripts/restore index 0becd6c..2abaa4d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,14 +39,6 @@ ynh_script_progression "Adding $swap_needed Mo to swap..." ynh_add_swap --size=$swap_needed -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression "Reinstalling Ruby and NodeJS..." - -ynh_ruby_install -ynh_nodejs_install - #================================================= # BUILD APP #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 769b47c..1d28afd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,14 +46,6 @@ fi ynh_script_progression "Adding $swap_needed Mo to swap..." ynh_add_swap --size=$swap_needed -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression "Upgrading Ruby and NodeJS..." - -ynh_ruby_install -ynh_nodejs_install - #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) #================================================= -- cgit v1.2.3-70-g09d2 From 8924efedabefe76a7c4f327952a0e850611da8ee Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 1 Sep 2025 11:34:17 +0200 Subject: cleaning --- manifest.toml | 3 ++- scripts/install | 4 ---- scripts/upgrade | 4 ---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/manifest.toml b/manifest.toml index 3575af5..7fc0329 100644 --- a/manifest.toml +++ b/manifest.toml @@ -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 7e400d5..315cca6 100644 --- a/scripts/install +++ b/scripts/install @@ -25,10 +25,6 @@ ynh_setup_source --dest_dir="$install_dir/live" # Download redis migration script ynh_setup_source --source_id=redis_migration --dest_dir="$install_dir/live" -chmod -R 775 "$install_dir" -chmod o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # ADD SWAP IF NEEDED #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 3b8f6e8..735ecc2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,10 +64,6 @@ ynh_setup_source --dest_dir="$install_dir/live" --full_replace --keep="public/sy # Download redis migration script ynh_setup_source --source_id=redis_migration --dest_dir="$install_dir/live" -chmod -R 775 "$install_dir" -chmod o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # BUILD ASSETS #================================================= -- cgit v1.2.3-70-g09d2 From be2718c43687ff875fd7696cde4b98681c17d0eb Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 1 Sep 2025 12:00:09 +0200 Subject: Update manifest.toml --- manifest.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 066569a..bdb7071 100644 --- a/manifest.toml +++ b/manifest.toml @@ -88,8 +88,7 @@ ram.runtime = "500M" type = "postgresql" [resources.nodejs] - version = "20" + version = "22" [resources.ruby] version = "3.4.5" - -- cgit v1.2.3-70-g09d2 From 24b842a772def1cf183da68c0e8de2f59c2206f4 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 1 Sep 2025 15:12:22 +0200 Subject: cleaning --- scripts/install | 4 ++++ scripts/upgrade | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index fad9eb9..ddb0692 100644 --- a/scripts/install +++ b/scripts/install @@ -25,6 +25,10 @@ ynh_setup_source --dest_dir="$install_dir/live" # Download redis migration script ynh_setup_source --source_id=redis_migration --dest_dir="$install_dir/live" +chmod -R 775 "$install_dir" +chmod o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # ADD SWAP IF NEEDED #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ce24e0d..9b3c8db 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -64,6 +64,10 @@ ynh_setup_source --dest_dir="$install_dir/live" --full_replace --keep="public/sy # Download redis migration script ynh_setup_source --source_id=redis_migration --dest_dir="$install_dir/live" +chmod -R 775 "$install_dir" +chmod o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # BUILD ASSETS #================================================= -- cgit v1.2.3-70-g09d2 From 18ff9ac136246764ab576475845bc4cb2dd8eea1 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 17 Sep 2025 00:21:01 +0200 Subject: Upgrade sources - `main` v4.4.4: https://github.com/mastodon/mastodon/releases/tag/v4.4.4 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 3575af5..9cd98ca 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 = [] @@ -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] -- cgit v1.2.3-70-g09d2 From 6f365f2f7ca6be8414c6898f7159fbc2591ec327 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 17 Sep 2025 00:21:03 +0200 Subject: Auto-update READMEs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/)
-- cgit v1.2.3-70-g09d2 From b4b6e4d3b16a33a5de8d9b6b4fd37ab3cdc32da9 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:29:26 +0200 Subject: Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 9cd98ca..7757eab 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,7 @@ cpe = "cpe:2.3:a:joinmastodon:mastodon" fund = "https://joinmastodon.org/sponsors" [integration] -yunohost = ">= 12.0.10" +yunohost = ">= 12.1.17" helpers_version = "2.1" architectures = "all" multi_instance = true -- cgit v1.2.3-70-g09d2 From d8854f4e663f6a24771bb2d1e1f78c8ff09ccfc1 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 17 Sep 2025 21:33:12 +0200 Subject: Update _common.sh --- scripts/_common.sh | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c7ff983..0ad6190 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,21 +5,3 @@ #================================================= memory_needed="2560" - -case $YNH_ARCH in - amd64) - ld_preload="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so" - ;; - arm64) - ld_preload="LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so" - ;; - armhf) - ld_preload="LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libjemalloc.so" - ;; - armel) - ld_preload="LD_PRELOAD=/usr/lib/arm-linux-gnueabi/libjemalloc.so" - ;; - i386) - ld_preload="LD_PRELOAD=/usr/lib/i386-linux-gnu/libjemalloc.so" - ;; -esac -- cgit v1.2.3-70-g09d2 From e95f8793985aa958fcc909acedf075e73a0f9a48 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 24 Sep 2025 00:20:55 +0200 Subject: Upgrade sources - `main` v4.4.5: https://github.com/mastodon/mastodon/releases/tag/v4.4.5 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index f85d5c0..03fe662 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.4~ynh1" +version = "4.4.5~ynh1" maintainers = [] @@ -52,8 +52,8 @@ ram.runtime = "500M" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/mastodon/mastodon/archive/refs/tags/v4.4.4.tar.gz" - sha256 = "1df58eec7da0c47767493ec3ec3ec2225a0bcca94871d1d6615ee324aaed91ba" + url = "https://github.com/mastodon/mastodon/archive/refs/tags/v4.4.5.tar.gz" + sha256 = "add9ee5caae722549a2f7ed2129ecaed0945a1b2f942afbdbb7bd8ab73961fe6" autoupdate.strategy = "latest_github_release" [resources.sources.redis_migration] -- cgit v1.2.3-70-g09d2 From 059bfc00baaf5bc97b2bf0310c6401f2fd85f096 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 24 Sep 2025 00:20:56 +0200 Subject: Auto-update READMEs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 699db55..eab8681 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.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/) +[![Version: 4.4.5~ynh1](https://img.shields.io/badge/Version-4.4.5~ynh1-rgb(18,138,11)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/mastodon/)
-- cgit v1.2.3-70-g09d2