From 70e2e0da5696b84ee599fd78c2ebfbfedec83d5d Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sun, 6 Jul 2025 08:33:12 +0200 Subject: Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index a3b6880..93b3d3a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Réseau social libre et fédéré" version = "4.3.8~ynh1" -maintainers = ["Tagada"] +maintainers = [] [upstream] license = "AGPL-3.0-or-later" -- cgit v1.2.3-70-g09d2 From 0e8f26cae17062e81422d8acfc601ac43f175f63 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Sat, 23 Aug 2025 22:44:57 +0200 Subject: Apply AlisonSelby's patch See https://github.com/YunoHost-Apps/glitchsoc_ynh/pull/374/commits/3a6deeb1fbb52c4ae6fa74c62b87a88fb718a635 --- conf/.env.production.sample | 1 - manifest.toml | 7 +++++++ scripts/install | 5 ++--- scripts/upgrade | 13 +++++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/conf/.env.production.sample b/conf/.env.production.sample index 2abf6c5..d934fa8 100644 --- a/conf/.env.production.sample +++ b/conf/.env.production.sample @@ -20,7 +20,6 @@ LOCAL_DOMAIN=__DOMAIN__ # ----- REDIS_HOST=localhost REDIS_PORT=6379 -REDIS_NAMESPACE=__REDIS_NAMESPACE__ # PostgreSQL # ---------- diff --git a/manifest.toml b/manifest.toml index fd14664..4f88e38 100644 --- a/manifest.toml +++ b/manifest.toml @@ -56,6 +56,13 @@ ram.runtime = "500M" sha256 = "ede116b80a525462f5ea68d046a4cdd787930fc6d2f9327c140756311ee07848" autoupdate.strategy = "latest_github_release" + [resources.sources.redis_migration] + url = "https://raw.githubusercontent.com/mastodon/redis_namespace_migration/47c6bd9757e7a40f7091b5692d78aef992ea8bf2/rename.rb" + sha256 = "3134a5c7e0157ee752f5cb49b942c89480951e94236b03dd1cb3cb1d3afdcdd2" + in_subdir = false + extract = false + rename = "rename.rb" + [resources.system_user] allow_email = true diff --git a/scripts/install b/scripts/install index dfcbb27..21361f2 100644 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir/live" +# Download redis migration script +ynh_setup_source --source_id=redis_migration --dest_dir="$install_dir/live" chown -R $app:www-data "$install_dir" @@ -60,9 +62,6 @@ config="$install_dir/live/.env.production" language="$(echo $language | head -c 2)" -redis_namespace=${app}_production -ynh_app_setting_set --app="$app" --key=redis_namespace --value="$redis_namespace" - secret_key_base=$(ynh_string_random --length=128) ynh_app_setting_set --app="$app" --key=secret_key_base --value="$secret_key_base" diff --git a/scripts/upgrade b/scripts/upgrade index f7a3573..ab1d807 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,6 +104,8 @@ then # Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir/live" --full_replace=1 --keep="public/system .env.production" + # Download redis migration script + ynh_setup_source --source_id=redis_migration --dest_dir="$install_dir/live" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" @@ -194,6 +196,17 @@ pushd "$install_dir/live" ynh_use_ruby ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate --quiet ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:precompile --quiet + + # Apply redis namespace migration (https://github.com/mastodon/redis_namespace_migration) + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/rails runner rename.rb + redis_namespace="$(ynh_app_setting_get --app=$app --key=redis_namespace)" + if [ $redis_namespace ]; then + if [ ynh_app_setting_get --app=$app --key=es_enabled == "true" ] && [ ynh_app_setting_get --app=$app --key=es_prefix == "" ]; then + ynh_app_setting_set --app=$app --key=es_prefix --value=$redis_namespace + else + ynh_app_setting_delete --app=$app --key=redis_namespace + fi + fi popd #================================================= -- cgit v1.2.3-70-g09d2 From ece66a86b23651ed2ef3a6532cd7f6ae2e740d2c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 23 Aug 2025 22:50:36 +0200 Subject: Auto-update READMEs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41d14ba..e285399 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-rgba(0,150,0,1)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/mastodon/) +[![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/)
-- cgit v1.2.3-70-g09d2 From 730497da8b99770c9f5f96b5c3e98bfc035f0d08 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Sat, 23 Aug 2025 23:04:37 +0200 Subject: Update ruby version --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 0dbcc15..e894197 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= memory_needed="2560" -ruby_version=3.3.5 +ruby_version=3.4.5 nodejs_version=20 case $YNH_ARCH in -- cgit v1.2.3-70-g09d2 From efb0166d5be53944abb484c0077aaa1e301d3cea Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Sun, 24 Aug 2025 13:48:33 +0200 Subject: Reimplement warnings for debugging --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 21361f2..49297e6 100644 --- a/scripts/install +++ b/scripts/install @@ -125,11 +125,11 @@ chmod 400 "$config" chown $app:$app "$config" pushd "$install_dir/live" - ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate --quiet - ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:precompile --quiet + ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate --quiet + ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:precompile --quiet # Create the first admin user - ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null - ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts approve "$admin" > /dev/null + ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner + ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts approve "$admin" popd #================================================= -- cgit v1.2.3-70-g09d2 From a6059396f8ee42645b9588809f81950539f01980 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Sun, 24 Aug 2025 14:14:25 +0200 Subject: Seed database to create Owner role --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 49297e6..d7851d9 100644 --- a/scripts/install +++ b/scripts/install @@ -126,6 +126,7 @@ chown $app:$app "$config" pushd "$install_dir/live" ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate --quiet + ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:seed --quiet ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:precompile --quiet # Create the first admin user ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner -- cgit v1.2.3-70-g09d2 From d5c70e78295e0a35026bf2e1848ef40ac0092fda Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Sun, 24 Aug 2025 14:40:38 +0200 Subject: Hide warnings again --- scripts/install | 12 ++++++------ scripts/upgrade | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index d7851d9..2d3e68d 100644 --- a/scripts/install +++ b/scripts/install @@ -94,7 +94,7 @@ pushd "$install_dir/live" ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle config deployment 'true' ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle config without 'development test' ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle config set force_ruby_platform true --quiet - ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) ynh_use_nodejs env $ynh_node_load_PATH corepack enable echo Y | ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn workspaces focus --production @@ -125,12 +125,12 @@ chmod 400 "$config" chown $app:$app "$config" pushd "$install_dir/live" - ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate --quiet - ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:seed --quiet - ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:precompile --quiet + ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate --quiet + ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:seed --quiet + ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:precompile --quiet # Create the first admin user - ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner - ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts approve "$admin" + ynh_exec_quiet ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner + ynh_exec_warn_less ynh_exec_as $app RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts approve "$admin" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ab1d807..746d009 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -124,7 +124,7 @@ pushd "$install_dir/live" ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle config deployment 'true' ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle config without 'development test' ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle config set force_ruby_platform true --quiet - ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) ynh_use_nodejs env $ynh_node_load_PATH corepack enable echo Y | ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn workspaces focus --production -- cgit v1.2.3-70-g09d2 From 6f3d2987174de20f1ca0847745013f85363ae324 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Sun, 24 Aug 2025 15:35:30 +0200 Subject: Hide warning during restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 77e934b..48e1384 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,7 +66,7 @@ pushd "$install_dir/live" ynh_use_ruby ynh_gem update --system ynh_gem install bundler --no-document - ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle install --redownload -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_warn_less ynh_exec_as $app $ynh_ruby_load_path $ld_preload bin/bundle install --redownload -j$(getconf _NPROCESSORS_ONLN) popd #================================================= -- cgit v1.2.3-70-g09d2