From ea70a2cd4f17daecf49e2b414c0e95e4385cf1a6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 22 Feb 2020 17:21:37 +0100 Subject: [PATCH 1/9] Fix message --- conf/message | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/message b/conf/message index 488d86d..403c4e0 100644 --- a/conf/message +++ b/conf/message @@ -1,5 +1,5 @@ Mastodon was successfully installed :) -Please open 'https://__DOMAIN____PATH_URL__' +Please open : https://__DOMAIN____PATH_URL__ The admin email is: __ADMIN_MAIL__ The admin password is: __ADMIN_PASS__ If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/mastodon_ynh \ No newline at end of file From 6ff11dacb201a08506b345953aa7b9bd39eeacf5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Feb 2020 18:44:50 +0100 Subject: [PATCH 2/9] Apply example_ynh --- README.md | 1 - README_fr.md | 1 - conf/nginx.conf | 96 +++++++++++++++++++++++----------------------- scripts/_common.sh | 3 +- scripts/backup | 2 + scripts/install | 7 +++- scripts/remove | 10 +++-- scripts/restore | 2 + scripts/upgrade | 7 ++++ 9 files changed, 71 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index ec0e046..dfce394 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,6 @@ $ screen -r * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mastodon%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mastodon/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mastodon%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mastodon/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/mastodon%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/mastodon/) ## Links diff --git a/README_fr.md b/README_fr.md index 6bea9d1..2092750 100644 --- a/README_fr.md +++ b/README_fr.md @@ -57,7 +57,6 @@ L'utilisateur admin est crée automatiquement comme: user@domain.tld * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mastodon%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mastodon/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mastodon%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mastodon/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/mastodon%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/mastodon/) ## Links diff --git a/conf/nginx.conf b/conf/nginx.conf index 190c650..7fa7b87 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,70 +6,70 @@ root __FINALPATH__/live/public; location / { - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + # Force usage of https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } - proxy_set_header Accept-Encoding ""; - try_files $uri @proxy; + proxy_set_header Accept-Encoding ""; + try_files $uri @proxy; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } location ~ ^/(emoji|packs|system/accounts/avatars|system/media_attachments/files) { - add_header Cache-Control "public, max-age=31536000, immutable"; - add_header Strict-Transport-Security "max-age=31536000"; - try_files $uri @proxy; + add_header Cache-Control "public, max-age=31536000, immutable"; + add_header Strict-Transport-Security "max-age=31536000"; + try_files $uri @proxy; } location /sw.js { - add_header Cache-Control "public, max-age=0"; - add_header Strict-Transport-Security "max-age=31536000"; - try_files $uri @proxy; + add_header Cache-Control "public, max-age=0"; + add_header Strict-Transport-Security "max-age=31536000"; + try_files $uri @proxy; } location @proxy { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header Proxy ""; - proxy_pass_header Server; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header Proxy ""; + proxy_pass_header Server; - proxy_pass http://127.0.0.1:3000; - proxy_buffering on; - proxy_redirect off; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_pass http://127.0.0.1:3000; + proxy_buffering on; + proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; - #proxy_cache CACHE; - proxy_cache_valid 200 7d; - proxy_cache_valid 410 24h; - proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; - add_header X-Cached $upstream_cache_status; - add_header Strict-Transport-Security "max-age=31536000"; + #proxy_cache CACHE; + proxy_cache_valid 200 7d; + proxy_cache_valid 410 24h; + proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; + add_header X-Cached $upstream_cache_status; + add_header Strict-Transport-Security "max-age=31536000"; - tcp_nodelay on; + tcp_nodelay on; } location /api/v1/streaming { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto https; - proxy_set_header Proxy ""; - - proxy_pass http://127.0.0.1:4000; - proxy_buffering off; - proxy_redirect off; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - tcp_nodelay on; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header Proxy ""; + + proxy_pass http://127.0.0.1:4000; + proxy_buffering off; + proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + tcp_nodelay on; } - -error_page 500 501 502 503 504 /500.html; \ No newline at end of file +error_page 500 501 502 503 504 /500.html; diff --git a/scripts/_common.sh b/scripts/_common.sh index 904553d..029d4ff 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,8 +5,7 @@ #================================================= # dependencies used by the app -#pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config nodejs gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev nginx redis-server redis-tools postgresql postgresql-contrib certbot python-certbot-nginx yarn libidn11-dev libicu-dev libjemalloc-dev" - pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev redis-server redis-tools postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https" +pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev redis-server redis-tools postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 62ac387..61ad5f4 100644 --- a/scripts/backup +++ b/scripts/backup @@ -13,6 +13,7 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= +ynh_script_progression --message="Managing script failure..." --weight=1 ynh_clean_setup () { ynh_clean_check_starting @@ -77,6 +78,7 @@ ynh_backup --src_path="/etc/systemd/system/$app-streaming.service" #================================================= # BACKUP A CRON FILE #================================================= +ynh_script_progression --message="Backing up a cron file..." --weight=1 ynh_backup --src_path="/etc/cron.d/$app" diff --git a/scripts/install b/scripts/install index 58f0caa..f769f03 100644 --- a/scripts/install +++ b/scripts/install @@ -17,6 +17,7 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= +ynh_script_progression --message="Managing script failure..." --weight=1 ynh_clean_setup () { ynh_clean_check_starting @@ -27,6 +28,7 @@ ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +ynh_script_progression --message="Retrieving arguments from the manifest..." --weight=1 domain=$YNH_APP_ARG_DOMAIN path_url="/" @@ -67,7 +69,7 @@ ynh_app_setting_set --app=$app --key=language --value=$language #================================================= ynh_script_progression --message="Configuring firewall..." --weight=1 -# Find a free port +# Find an available port port_web=$(ynh_find_port --port=3000) port_stream=$(ynh_find_port --port=4000) # Open this port @@ -91,7 +93,7 @@ ynh_script_progression --message="Creating a PostgreSQL database..." --weight=5 # Create postgresql database db_name="${app}_production" db_user=$app -db_pwd=$(ynh_string_random 30) +db_pwd=$(ynh_string_random --length30) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd ynh_psql_test_if_first_run @@ -129,6 +131,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # ADD SWAP IF NEEDED #================================================= +ynh_script_progression --message="Adding swap is needed..." --weight=4 total_memory=$(ynh_check_ram) total_swap=$(ynh_check_ram --only_swap) diff --git a/scripts/remove b/scripts/remove index 3db3310..b88da99 100644 --- a/scripts/remove +++ b/scripts/remove @@ -27,23 +27,24 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # STANDARD REMOVE #================================================= -# REMOVE SERVICE FROM ADMIN PANEL +# REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= +ynh_script_progression --message="Removing service integration in YunoHost..." --weight=2 # Remove a service from the admin panel, added by `yunohost service add` -if yunohost service status "$app-web" >/dev/null 2>&1 +if ynh_exec_warn_less yunohost service status "$app-web" >/dev/null then ynh_script_progression --message="Removing $app-web service..." --weight=2 yunohost service remove "$app-web" fi -if yunohost service status "$app-sidekiq" >/dev/null 2>&1 +if ynh_exec_warn_less yunohost service status "$app-sidekiq" >/dev/null then ynh_script_progression --message="Removing $app-sidekiq service..." --weight=2 yunohost service remove "$app-sidekiq" fi -if yunohost service status "$app-streaming" >/dev/null 2>&1 +if ynh_exec_warn_less yunohost service status "$app-streaming" >/dev/null then ynh_script_progression --message="Removing $app-streaming service..." --weight=2 yunohost service remove "$app-streaming" @@ -99,6 +100,7 @@ ynh_remove_nginx_config #================================================= # REMOVE THE CRON FILE #================================================= +ynh_script_progression --message="Removing the cron file..." --weight=2 # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index 1985b26..a45925e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -17,6 +17,7 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= +ynh_script_progression --message="Managing script failure..." --weight=2 ynh_clean_setup () { ynh_clean_check_starting @@ -85,6 +86,7 @@ chown -R $app: $final_path #================================================= # ADD SWAP IF NEEDED #================================================= +ynh_script_progression --message="Adding swap if needed..." --weight=4 total_memory=$(ynh_check_ram) total_swap=$(ynh_check_ram --only_swap) diff --git a/scripts/upgrade b/scripts/upgrade index 9cfe1cc..32426a2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -42,6 +42,7 @@ vapid_public_key=$(ynh_app_setting_get --app=$app --key=vapid_public_key) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) @@ -147,6 +148,11 @@ ynh_abort_if_errors #================================================= # Normalize the URL path syntax +# N.B. : this is for app installations before YunoHost 2.7 +# where this value might be something like /foo/ or foo/ +# instead of /foo .... +# If nobody installed your app before 2.7, then you may +# safely remove this line path_url=$(ynh_normalize_url_path --path_url=$path_url) #================================================= @@ -218,6 +224,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # ADD SWAP IF NEEDED #================================================= +ynh_script_progression --message="Adding swap if needed..." --weight=7 total_memory=$(ynh_check_ram) total_swap=$(ynh_check_ram --only_swap) From 3a7b21fbcbede1ee108bb5b94b7c6a1717cdaa2c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 23 Feb 2020 19:51:58 +0100 Subject: [PATCH 3/9] Apply example_ynh --- scripts/install | 4 ++-- scripts/remove | 2 +- scripts/restore | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index f769f03..60787e7 100644 --- a/scripts/install +++ b/scripts/install @@ -254,9 +254,9 @@ ynh_script_progression --message="Securing files and directories..." --weight=9 chown -R "$app": "$final_path" #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Advertising service in admin panel..." --weight=3 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=3 yunohost service add "$app-web" yunohost service add "$app-sidekiq" diff --git a/scripts/remove b/scripts/remove index b88da99..f2b2e16 100644 --- a/scripts/remove +++ b/scripts/remove @@ -31,7 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Removing service integration in YunoHost..." --weight=2 -# Remove a service from the admin panel, added by `yunohost service add` +# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status "$app-web" >/dev/null then ynh_script_progression --message="Removing $app-web service..." --weight=2 diff --git a/scripts/restore b/scripts/restore index a45925e..c6e4bc8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -139,9 +139,9 @@ ynh_restore_file --origin_path="/etc/systemd/system/$app-streaming.service" systemctl enable "$app-web" "$app-sidekiq" "$app-streaming" #================================================= -# ADVERTISE SERVICE IN ADMIN PANEL +# INTEGRATE SERVICE IN YUNOHOST #================================================= -ynh_script_progression --message="Advertising service in admin panel..." --weight=3 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=3 yunohost service add $app-web yunohost service add $app-sidekiq From f00ae6d6b926cf80236d98617b579c176beb8dfe Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 25 Feb 2020 00:17:48 +0100 Subject: [PATCH 4/9] ifx typo --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 60787e7..989954b 100644 --- a/scripts/install +++ b/scripts/install @@ -93,7 +93,7 @@ ynh_script_progression --message="Creating a PostgreSQL database..." --weight=5 # Create postgresql database db_name="${app}_production" db_user=$app -db_pwd=$(ynh_string_random --length30) +db_pwd=$(ynh_string_random --length=30) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd ynh_psql_test_if_first_run From 1eda887adea3599e18fb5e32b08d681820b91614 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 27 Feb 2020 20:05:27 +0100 Subject: [PATCH 5/9] Upgrade to 3.1.2 --- README.md | 2 +- README_fr.md | 2 +- check_process | 16 ++++++++++++++++ conf/app.src | 4 ++-- manifest.json | 2 +- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dfce394..30abd8e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Mastodon is a free, open-source social network. A decentralized alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Pick a server that you trust — whichever you choose, you can interact with everyone else. Anyone can run their own Mastodon instance and participate in the social network seamlessly. -**Shipped version:** 3.1.1 +**Shipped version:** 3.1.2 ## Important points to read before installing diff --git a/README_fr.md b/README_fr.md index 2092750..78e6170 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble Mastodon est un réseau social gratuit et open source. Une alternative décentralisée aux plates-formes commerciales, elle évite les risques d'une seule société qui monopolise votre communication. Choisissez un serveur sur lequel vous faites confiance - selon votre choix, vous pouvez interagir avec tous les autres. N'importe qui peut exécuter sa propre instance de Mastodon et participer au réseau social de façon transparente. -**Version incluse:** 3.1.1 +**Version incluse:** 3.1.2 ## Points importants à lire avant l'installation diff --git a/check_process b/check_process index 21c17ae..951b1d3 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,24 @@ setup_private=0 setup_public=1 upgrade=1 + # 2.7.4 + upgrade=1 from_commit=2987ccf8b3aa393dbef79b874dfe5839a0ee10da + # 2.8.2 + upgrade=1 from_commit=2697b734a663bd828d609d3626552611995e6c07 + # 2.8.3 + upgrade=1 from_commit=19299ae680dc851f03a37d49f4e80ca8521e615f + # 2.8.4 + upgrade=1 from_commit=a25e4569c8341ec94a39a57aaccad86379c8a630 + # 2.9.0 + upgrade=1 from_commit=8d0d3ea6611d788635251379e4a51d566b19d8db + # 2.9.2 + upgrade=1 from_commit=1ec1d44c6ed1daa5887367700f077286355a184f + # 2.9.3 + upgrade=1 from_commit=b9086682d2d7762d2882fff2cda4f5dceb73e32b # 3.0.1 upgrade=1 from_commit=168573d3d7dcc4306691f21d5b64819d1f6dd38c + # 3.1.1 + upgrade=1 from_commit=53aeae382eda1263d0ebf9a454bd1c3eeca8ddb1 backup_restore=1 multi_instance=1 # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. diff --git a/conf/app.src b/conf/app.src index 5e78c4e..fc275ee 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v3.1.1.tar.gz -SOURCE_SUM=4d44458b28667e49bc0d69e7f344a953f869a0df5e41140d932982aa952ab13c +SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v3.1.2.tar.gz +SOURCE_SUM=c12fd8c1b426861825d37d2eab1d6356be05b2b321eae0c1b87f80fcc11b0da7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 1a29d40..a38eac9 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "3.1.1~ynh1", + "version": "3.1.2~ynh1", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL-3.0-or-later", "maintainer": [ From 2902d4120ef24cde642330eb3c7ff22b516c0b96 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 28 Feb 2020 02:55:28 +0100 Subject: [PATCH 6/9] Update check_process --- check_process | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/check_process b/check_process index 951b1d3..77b69b0 100644 --- a/check_process +++ b/check_process @@ -12,20 +12,6 @@ setup_private=0 setup_public=1 upgrade=1 - # 2.7.4 - upgrade=1 from_commit=2987ccf8b3aa393dbef79b874dfe5839a0ee10da - # 2.8.2 - upgrade=1 from_commit=2697b734a663bd828d609d3626552611995e6c07 - # 2.8.3 - upgrade=1 from_commit=19299ae680dc851f03a37d49f4e80ca8521e615f - # 2.8.4 - upgrade=1 from_commit=a25e4569c8341ec94a39a57aaccad86379c8a630 - # 2.9.0 - upgrade=1 from_commit=8d0d3ea6611d788635251379e4a51d566b19d8db - # 2.9.2 - upgrade=1 from_commit=1ec1d44c6ed1daa5887367700f077286355a184f - # 2.9.3 - upgrade=1 from_commit=b9086682d2d7762d2882fff2cda4f5dceb73e32b # 3.0.1 upgrade=1 from_commit=168573d3d7dcc4306691f21d5b64819d1f6dd38c # 3.1.1 From 6e4c2a232dae33095bb3f63350a97b8c5f03c459 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 18 Mar 2020 02:26:17 +0100 Subject: [PATCH 7/9] Add packages alternatives --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 029d4ff..015c1e9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev redis-server redis-tools postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https" +pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3|libgdbm6 libgdbm-dev redis-server redis-tools postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https" #================================================= # PERSONAL HELPERS From 0dcaee89832095688bd11d32bf4ab577f2083f25 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 19 Mar 2020 22:35:17 +0100 Subject: [PATCH 8/9] removing test upgrade from previous version for buster to work --- check_process | 4 ---- 1 file changed, 4 deletions(-) diff --git a/check_process b/check_process index 77b69b0..66a0890 100644 --- a/check_process +++ b/check_process @@ -12,10 +12,6 @@ setup_private=0 setup_public=1 upgrade=1 - # 3.0.1 - upgrade=1 from_commit=168573d3d7dcc4306691f21d5b64819d1f6dd38c - # 3.1.1 - upgrade=1 from_commit=53aeae382eda1263d0ebf9a454bd1c3eeca8ddb1 backup_restore=1 multi_instance=1 # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. From ede37a92321a7a1d4b5f3dc7b22146aa4a74d120 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 28 Mar 2020 20:25:37 +0100 Subject: [PATCH 9/9] Temporary workaround for https://github.com/tootsuite/mastodon/issues/13292 --- manifest.json | 2 +- scripts/install | 3 +++ scripts/upgrade | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index a38eac9..2792cd4 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "3.1.2~ynh1", + "version": "3.1.2~ynh2", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL-3.0-or-later", "maintainer": [ diff --git a/scripts/install b/scripts/install index 989954b..7d7d4b8 100644 --- a/scripts/install +++ b/scripts/install @@ -110,6 +110,9 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path mkdir $final_path ynh_setup_source --dest_dir="$final_path/live" +# Temporary workaround for https://github.com/tootsuite/mastodon/issues/13292 +ynh_replace_string --match_string="sidekiq-unique-jobs (6.0.18)" --replace_string="sidekiq-unique-jobs (6.0.20)" --target_file="$final_path/live/Gemfile.lock" + #================================================= # NGINX CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 32426a2..0bc44b3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -184,6 +184,10 @@ then rsync -a "$final_path/live/.env.production" "$tmpdir/." ynh_secure_remove --file="$final_path/live/" ynh_setup_source --dest_dir="$final_path/live" + + # Temporary workaround for https://github.com/tootsuite/mastodon/issues/13292 + ynh_replace_string --match_string="sidekiq-unique-jobs (6.0.18)" --replace_string="sidekiq-unique-jobs (6.0.20)" --target_file="$final_path/live/Gemfile.lock" + if [ -d "$tmpdir/system" ]; then rsync -a "$tmpdir/system" "$final_path/live/public/." fi