From f4d64b2ed1a755d73dc15919f644d12439490a38 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 11 Jul 2018 13:23:48 +0200 Subject: [PATCH 01/10] Upgrade to 2.4.3 --- README.md | 2 +- conf/app-mastodon.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bcfa53c..bd525b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mastodon for YunoHost -[![Latest Version](https://img.shields.io/badge/version-2.4.2-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[![Latest Version](https://img.shields.io/badge/version-2.4.3-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) diff --git a/conf/app-mastodon.src b/conf/app-mastodon.src index fa0e2eb..9ef161a 100644 --- a/conf/app-mastodon.src +++ b/conf/app-mastodon.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.2.tar.gz -SOURCE_SUM=2de73e57e4f3da4b046b8b1d8c90a03d1bdd8f9abddca8f5329d02a34ed821a5 +SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.3.tar.gz +SOURCE_SUM=efdc680632386665d7b0ba988acd18113557ad165bcc158bfc2c273da76616ce SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index ddb2479..e5797c2 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "2.4.2", + "version": "2.4.3", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL-3.0-or-later", "maintainer": { From 4a3767ca6f8c9f1f562e1de14cb351233ed581f5 Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 22 Aug 2018 22:17:39 +0200 Subject: [PATCH 02/10] Upgrade to 2.4.4 --- README.md | 2 +- conf/app-mastodon.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bd525b0..47f8e19 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mastodon for YunoHost -[![Latest Version](https://img.shields.io/badge/version-2.4.3-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[![Latest Version](https://img.shields.io/badge/version-2.4.4-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) diff --git a/conf/app-mastodon.src b/conf/app-mastodon.src index 9ef161a..1fed702 100644 --- a/conf/app-mastodon.src +++ b/conf/app-mastodon.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.3.tar.gz -SOURCE_SUM=efdc680632386665d7b0ba988acd18113557ad165bcc158bfc2c273da76616ce +SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.4.tar.gz +SOURCE_SUM=a82ba6ed88b5fd6bcf0a7cd78c4b0229c45bff2bef681ad18dfd0f460309b682 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index e5797c2..e72deb3 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "2.4.3", + "version": "2.4.4", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL-3.0-or-later", "maintainer": { From a05de14f3f71cf0e2d8bb0fd10bc6a04c3210673 Mon Sep 17 00:00:00 2001 From: nemsia Date: Fri, 24 Aug 2018 22:36:27 +0200 Subject: [PATCH 03/10] Upgrade to 2.4.5 --- README.md | 2 +- conf/app-mastodon.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 47f8e19..cce244f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mastodon for YunoHost -[![Latest Version](https://img.shields.io/badge/version-2.4.4-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[![Latest Version](https://img.shields.io/badge/version-2.4.5-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) diff --git a/conf/app-mastodon.src b/conf/app-mastodon.src index 1fed702..a63adff 100644 --- a/conf/app-mastodon.src +++ b/conf/app-mastodon.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.4.tar.gz -SOURCE_SUM=a82ba6ed88b5fd6bcf0a7cd78c4b0229c45bff2bef681ad18dfd0f460309b682 +SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.5.tar.gz +SOURCE_SUM=9e8cf6a808c9c34b6b609e8acc86b91a02227580b61221d96a4b78560fcc592c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index e72deb3..75ea654 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "2.4.4", + "version": "2.4.5", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL-3.0-or-later", "maintainer": { From 8a29c1db52736c599aea04782e48346741b06ae5 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 25 Aug 2018 00:26:40 +0200 Subject: [PATCH 04/10] [mod] Add CSP for security --- conf/nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 585109e..eb823e7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,9 @@ # upload max size client_max_body_size 100M; +# Content Security Policy : security to avoid launching unsecure script +add_header Content-Security-Policy "default-src 'none'; font-src 'self'; media-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; img-src 'self' blob: data:; connect-src 'self' wss://$domain;"; + # add to v1.4 assets root __FINALPATH__/live/public; From 9f983fa602a525d83109d26f3a5e72f5dfa9235f Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 25 Aug 2018 00:37:39 +0200 Subject: [PATCH 05/10] [fix] object-src --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index eb823e7..562ba8c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ client_max_body_size 100M; # Content Security Policy : security to avoid launching unsecure script -add_header Content-Security-Policy "default-src 'none'; font-src 'self'; media-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; img-src 'self' blob: data:; connect-src 'self' wss://$domain;"; +add_header Content-Security-Policy "default-src 'none'; font-src 'self'; media-src 'self'; object-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; img-src 'self' blob: data:; connect-src 'self' wss://__DOMAIN__;"; # add to v1.4 assets root __FINALPATH__/live/public; From 16cfcba4e1571b11710e0b084770ce462430677e Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 25 Aug 2018 00:45:54 +0200 Subject: [PATCH 06/10] [mod] use official helper for nginx I didn't find any __PATH__ in nginx config... ?? --- scripts/install | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 5d5bf1e..b33f6ed 100644 --- a/scripts/install +++ b/scripts/install @@ -145,11 +145,7 @@ ynh_setup_source "$final_path/live" "app-mastodon" # NGINX CONFIGURATION #================================================= -# TODO: use official helper ynh_add_nginx_config -# Modify Nginx configuration file and copy it to Nginx conf directory -sed -i "s@__PATH__@$app@g" ../conf/nginx.conf* -sed -i "s@__FINALPATH__@$final_path@g" ../conf/nginx.conf* -cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf +ynh_add_nginx_config #================================================= # CREATE DEDICATED USER From 29399adc3d0049ddefe33a509e263d36881a31fe Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 25 Aug 2018 00:48:50 +0200 Subject: [PATCH 07/10] [mod] Use nginx Helper. See mod for install --- scripts/upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c6b7a83..15075a3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,11 +121,11 @@ ynh_secure_remove $final_path/live/config/initializers/timeout.rb # NGINX CONFIGURATION #================================================= -# TODO: use official helper ynh_add_nginx_config -# Modify Nginx configuration file and copy it to Nginx conf directory -sed -i "s@__PATH__@$app@g" ../conf/nginx.conf* -sed -i "s@__FINALPATH__@$final_path@g" ../conf/nginx.conf* -cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf +ynh_add_nginx_config + +#================================================= +# UPGRADE MASTODON +#================================================= # Upgrade rbenv and ruby plugins ynh_setup_source "$final_path/.rbenv" "app-rbenv" From 19c46d2d2bf3a02aba89ee0596f8b5f95e15a642 Mon Sep 17 00:00:00 2001 From: frju365 Date: Fri, 31 Aug 2018 01:47:32 +0200 Subject: [PATCH 08/10] [fix] nginx conf --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index ffa152a..ee17c03 100644 --- a/scripts/install +++ b/scripts/install @@ -271,6 +271,8 @@ ynh_app_setting_set "$app" unprotected_uris "/" # RELOAD NGINX #================================================= +ynh_replace_string "__PORT_WEB__" "$port_web" "../conf/nginx.conf" +ynh_replace_string "__PORT_STREAM__" "$port_stream" "../conf/nginx.conf" # Reload Nginx systemctl reload nginx From aaa1b11ad1ae6c2cc620567ce9dee7a7eba86023 Mon Sep 17 00:00:00 2001 From: frju365 Date: Fri, 31 Aug 2018 01:48:09 +0200 Subject: [PATCH 09/10] Update upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 207858e..3b42aa6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,6 +116,8 @@ ynh_secure_remove $final_path/live/config/initializers/timeout.rb # NGINX CONFIGURATION #================================================= +ynh_replace_string "__PORT_WEB__" "$port_web" "../conf/nginx.conf" +ynh_replace_string "__PORT_STREAM__" "$port_stream" "../conf/nginx.conf" ynh_add_nginx_config #================================================= From e5d9f9cece396f8c82326bf3b458ac4442535db1 Mon Sep 17 00:00:00 2001 From: nemsia Date: Mon, 3 Sep 2018 01:02:28 +0200 Subject: [PATCH 10/10] Revert "Nginx : CSP + typo" (#113) --- README.md | 2 +- conf/app-mastodon.src | 4 ++-- conf/nginx.conf | 3 --- manifest.json | 2 +- scripts/install | 3 +++ scripts/upgrade | 5 ++--- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cce244f..bd525b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mastodon for YunoHost -[![Latest Version](https://img.shields.io/badge/version-2.4.5-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) +[![Latest Version](https://img.shields.io/badge/version-2.4.3-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) diff --git a/conf/app-mastodon.src b/conf/app-mastodon.src index a63adff..9ef161a 100644 --- a/conf/app-mastodon.src +++ b/conf/app-mastodon.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.5.tar.gz -SOURCE_SUM=9e8cf6a808c9c34b6b609e8acc86b91a02227580b61221d96a4b78560fcc592c +SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.3.tar.gz +SOURCE_SUM=efdc680632386665d7b0ba988acd18113557ad165bcc158bfc2c273da76616ce SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 87b517a..a183a31 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,9 +1,6 @@ # upload max size client_max_body_size 100M; -# Content Security Policy : security to avoid launching unsecure script -add_header Content-Security-Policy "default-src 'none'; font-src 'self'; media-src 'self'; object-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; img-src 'self' blob: data:; connect-src 'self' wss://__DOMAIN__;"; - # add to v1.4 assets root __FINALPATH__/live/public; diff --git a/manifest.json b/manifest.json index 9e87449..7496980 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Mastodon is a free, open-source social network.", "fr": "Mastodon est un réseau social gratuit et open source." }, - "version": "2.4.5", + "version": "2.4.3", "url": "https://github.com/tootsuite/mastodon", "license": "AGPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index ffa152a..cd9a1ce 100644 --- a/scripts/install +++ b/scripts/install @@ -134,6 +134,9 @@ ynh_setup_source "$final_path/live" "app-mastodon" # NGINX CONFIGURATION #================================================= +# Create a dedicated nginx config +ynh_replace_string "__PORT_WEB__" "$port_web" "../conf/nginx.conf" +ynh_replace_string "__PORT_STREAM__" "$port_stream" "../conf/nginx.conf" ynh_add_nginx_config #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 207858e..0429013 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,11 +116,10 @@ ynh_secure_remove $final_path/live/config/initializers/timeout.rb # NGINX CONFIGURATION #================================================= +ynh_replace_string "__PORT_WEB__" "$port_web" "../conf/nginx.conf" +ynh_replace_string "__PORT_STREAM__" "$port_stream" "../conf/nginx.conf" ynh_add_nginx_config -#================================================= -# UPGRADE MASTODON -#================================================= # Upgrade rbenv and ruby plugins ynh_setup_source "$final_path/.rbenv" "app-rbenv"