From e827fbe4a89c0dcd51308457e5f00a9fc5dcc18b Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 21 Aug 2025 10:42:04 +0200 Subject: convert to helpers v2.1 and try to upgrade to latest version --- manifest.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifest.toml') diff --git a/manifest.toml b/manifest.toml index fd14664..2e00d20 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,8 @@ cpe = "cpe:2.3:a:joinmastodon:mastodon" fund = "https://joinmastodon.org/sponsors" [integration] -yunohost = ">= 11.2.12" +yunohost = ">= 12.0.10" +helpers_version = "2.1" architectures = "all" multi_instance = true @@ -60,6 +61,7 @@ ram.runtime = "500M" allow_email = true [resources.install_dir] + group = "www-data:r-x" [resources.permissions] main.url = "/" -- cgit v1.2.3-70-g09d2 From b8c794784bc1e07404cb9854499e4daa415e42d0 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 21 Aug 2025 13:50:05 +0200 Subject: fix permissions --- manifest.toml | 1 - scripts/install | 4 ++++ scripts/upgrade | 14 +++++++------- scripts/ynh_add_swap | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) (limited to 'manifest.toml') diff --git a/manifest.toml b/manifest.toml index 2e00d20..4e2591d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -61,7 +61,6 @@ 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 6808c69..6608646 100644 --- a/scripts/install +++ b/scripts/install @@ -17,6 +17,10 @@ ynh_script_progression "Setting up source files..." ynh_setup_source --dest_dir="$install_dir/live" +chmod -R 775 "$install_dir" +chmod o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # INSTALL DEPENDENCIES #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ed19b64..d9fa23f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,14 +83,14 @@ ynh_nodejs_install # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed -if ynh_app_upstream_version_changed -then - ynh_script_progression "Upgrading source files..." +ynh_script_progression "Upgrading source files..." - # Download, check integrity, uncompress and patch the source from manifest.toml - ynh_setup_source --dest_dir="$install_dir/live" --full_replace --keep="public/system .env.production" -fi +# Download, check integrity, uncompress and patch the source from manifest.toml +ynh_setup_source --dest_dir="$install_dir/live" --full_replace --keep="public/system .env.production" + +chmod -R 775 "$install_dir" +chmod o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # BUILD ASSETS diff --git a/scripts/ynh_add_swap b/scripts/ynh_add_swap index aa82c51..f99e1a7 100644 --- a/scripts/ynh_add_swap +++ b/scripts/ynh_add_swap @@ -22,14 +22,14 @@ ynh_add_swap () { # Can't swap inside an LXD if [ "$(systemd-detect-virt)" == "lxc" ] then - ynh_print_warn --message="You are inside a LXC container, swap will not be added, but that can cause troubles for the app $app. Please make sure you have more than 2.5G available RAM." + ynh_print_warn "You are inside a LXC container, swap will not be added, but that can cause troubles for the app $app. Please make sure you have more than 2.5G available RAM." return fi # Swap on SD card only if it's is specified if ynh_is_main_device_a_sd_card && [ "$SD_CARD_CAN_SWAP" == "0" ] then - ynh_print_warn --message="The main mountpoint of your system '/' is on an SD card, swap will not be added to prevent some damage of this one, but that can cause troubles for the app $app. If you still want activate the swap, you can relaunch the command preceded by 'SD_CARD_CAN_SWAP=1'" + ynh_print_warn "The main mountpoint of your system '/' is on an SD card, swap will not be added to prevent some damage of this one, but that can cause troubles for the app $app. If you still want activate the swap, you can relaunch the command preceded by 'SD_CARD_CAN_SWAP=1'" return fi -- cgit v1.2.3-70-g09d2 From 9d34db18df100918645c7f839d2d62bf44fc4d2d Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 1 Sep 2025 10:12:59 +0200 Subject: cleaning --- manifest.toml | 1 - scripts/_common.sh | 4 ++-- scripts/remove | 14 +++----------- scripts/restore | 4 ---- scripts/upgrade | 13 ++++--------- tests.toml | 2 +- 6 files changed, 10 insertions(+), 28 deletions(-) (limited to 'manifest.toml') diff --git a/manifest.toml b/manifest.toml index 7f0b634..3575af5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -25,7 +25,6 @@ architectures = "all" multi_instance = true ldap = true - sso = false disk = "2G" diff --git a/scripts/_common.sh b/scripts/_common.sh index 182e391..acc9c4b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,8 +5,8 @@ #================================================= memory_needed="2560" -ruby_version=3.4.5 -nodejs_version=20 +ruby_version="3.4.5" +nodejs_version="20" case $YNH_ARCH in amd64) diff --git a/scripts/remove b/scripts/remove index 297786f..d2c0cb5 100644 --- a/scripts/remove +++ b/scripts/remove @@ -7,26 +7,18 @@ source /usr/share/yunohost/helpers #================================================= # REMOVE SYSTEM CONFIGURATIONS #================================================= -# REMOVE SYSTEMD SERVICE -#================================================= ynh_script_progression "Removing system configurations related to $app..." # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) -if ynh_hide_warnings yunohost service status "$app-web" >/dev/null -then - ynh_script_progression "Removing $app-web service integration..." +if ynh_hide_warnings yunohost service status "$app-web" >/dev/null; then yunohost service remove "$app-web" fi -if ynh_hide_warnings yunohost service status "$app-sidekiq" >/dev/null -then - ynh_script_progression "Removing $app-sidekiq service integration..." +if ynh_hide_warnings yunohost service status "$app-sidekiq" >/dev/null; then yunohost service remove "$app-sidekiq" fi -if ynh_hide_warnings yunohost service status "$app-streaming" >/dev/null -then - ynh_script_progression "Removing $app-streaming service integration..." +if ynh_hide_warnings yunohost service status "$app-streaming" >/dev/null; then yunohost service remove "$app-streaming" fi diff --git a/scripts/restore b/scripts/restore index 0becd6c..03f0dce 100644 --- a/scripts/restore +++ b/scripts/restore @@ -5,8 +5,6 @@ source ../settings/scripts/_common.sh source ../settings/scripts/ynh_add_swap source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -61,8 +59,6 @@ popd #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression "Restoring system configurations related to $app..." ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 769b47c..3b8f6e8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,11 +16,11 @@ fi #================================================= # STOP SYSTEMD SERVICE #================================================= - ynh_script_progression "Stopping $app's systemd service..." - ynh_systemctl --service=${app}-web --action="stop" --log_path=/var/log/$app/$app-web.log --wait_until="Goodbye" - ynh_systemctl --service=${app}-sidekiq --action="stop" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Bye" - ynh_systemctl --service=${app}-streaming --action="stop" --log_path=/var/log/$app/$app-streaming.log + +ynh_systemctl --service=${app}-web --action="stop" --log_path=/var/log/$app/$app-web.log --wait_until="Goodbye" +ynh_systemctl --service=${app}-sidekiq --action="stop" --log_path=/var/log/$app/$app-sidekiq.log --wait_until="Bye" +ynh_systemctl --service=${app}-streaming --action="stop" --log_path=/var/log/$app/$app-streaming.log #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -54,12 +54,9 @@ ynh_script_progression "Upgrading Ruby and NodeJS..." ynh_ruby_install ynh_nodejs_install -#================================================= -# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= - ynh_script_progression "Upgrading source files..." # Download, check integrity, uncompress and patch the source from manifest.toml @@ -114,8 +111,6 @@ ynh_config_add --template="cron" --destination="/etc/cron.d/$app" mkdir -p /var/log/$app ynh_config_add_logrotate -#================================================= -# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) #================================================= # UPDATE A CONFIG FILE #================================================= diff --git a/tests.toml b/tests.toml index b34a3e6..588a0db 100644 --- a/tests.toml +++ b/tests.toml @@ -21,5 +21,5 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.8102fffa52a4e3279bba9fbdafb3a0e5b1fe3e17.name = "4.2.13~ynh1" + #test_upgrade_from.8102fffa52a4e3279bba9fbdafb3a0e5b1fe3e17.name = "4.2.13~ynh1" test_upgrade_from.38e8436dd8489140af8921c81d9d891bfa92349e.name = "4.3.9 - Helpers v1" -- 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(-) (limited to 'manifest.toml') 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 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(-) (limited to 'manifest.toml') 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