From 04e4badb3d55d7fb25333836486da314e4d83b74 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 8 Jan 2021 12:03:34 +0100 Subject: [PATCH 1/5] Upgrade to v.3.0.0 --- README.md | 4 ++-- README_fr.md | 4 ++-- check_process | 17 ----------------- conf/app.src | 4 ++-- conf/production.yaml | 4 ++-- manifest.json | 2 +- 6 files changed, 9 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index f4cb582..3c5d201 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # PeerTube for YunoHost [![Integration level](https://dash.yunohost.org/integration/peertube.svg)](https://dash.yunohost.org/appci/app/peertube) ![](https://ci-apps.yunohost.org/ci/badges/peertube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/peertube.maintain.svg) -[![Install PeerTube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube) +[![Install PeerTube with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube) *[Lire ce readme en français.](./README_fr.md)* @@ -27,7 +27,7 @@ Servers are run independently by different people and organizations. They can ap By watching a video, you help the hosting provider to broadcast it by becoming a broadcaster of the video yourself. Each instance doesn’t need much money to broadcast the videos of its users. -**Shipped version:** 2.4.0 +**Shipped version:** 3.0.0 ## Important points to read before installing diff --git a/README_fr.md b/README_fr.md index bc808a6..8000e49 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # PeerTube pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/peertube.svg)](https://dash.yunohost.org/appci/app/peertube) ![](https://ci-apps.yunohost.org/ci/badges/peertube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/peertube.maintain.svg) -[![Installer PeerTube pour YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=peertube) +[![Installer PeerTube pour YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube) *[Read this readme in english.](./README.md)* @@ -23,7 +23,7 @@ Les serveurs sont gérés indépendamment par différentes personnes et organisa En regardant une vidéo, vous aidez l'hébergeur à la diffuser en devenant vous-même un diffuseur de la vidéo. Chaque instance n'a pas besoin de beaucoup d'argent pour diffuser les vidéos de ses utilisateurs. -**Version incluse :** 2.4.0 +**Version incluse :** 3.0.0 ## Points importants à lire avant l'installation diff --git a/check_process b/check_process index d9ac1ab..45dded3 100644 --- a/check_process +++ b/check_process @@ -17,32 +17,15 @@ setup_private=1 setup_public=1 upgrade=1 - # 2.1.0 - upgrade=1 from_commit=d049b71061d12ffab92bbf106af200e7d8a69572 - # 2.1.1~ynh1 - upgrade=1 from_commit=63f076db215f8f438dbdcd2966c12d9ee7976121 - # 2.2.0~ynh1 - upgrade=1 from_commit=2b24ab443dc95fc78654e8232351933491cf04b4 # 2.3.0~ynh1 upgrade=1 from_commit=141e5a370e552760b83066fbfe044ca3e5283a72 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. - # incorrect_path=1 port_already_use=0 change_url=0 -;;; Levels - # If the level 5 (Package linter) is forced to 1. Please add justifications here. - Level 5=auto ;;; Options Email=anmol@datamol.org;yalh@yahoo.com Notification=yes ;;; Upgrade options - ; commit=d049b71061d12ffab92bbf106af200e7d8a69572 - name=2.1.0 - ; commit=63f076db215f8f438dbdcd2966c12d9ee7976121 - name=2.1.1~ynh1 - ; commit=2b24ab443dc95fc78654e8232351933491cf04b4 - name=2.2.0~ynh1 ; commit=141e5a370e552760b83066fbfe044ca3e5283a72 name=2.3.0~ynh1 diff --git a/conf/app.src b/conf/app.src index 493f0b6..ea3808a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v2.4.0/peertube-v2.4.0.tar.xz -SOURCE_SUM=3e680fff23584608bae464731bcf08cb2126f4e07f42a1547a3812674da3b315 +SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v3.0.0/peertube-v3.0.0.tar.xz +SOURCE_SUM=a586cec1e54823b673b8bc29cd44c8df0f100f682afc257172da1ec7e76699c9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.xz SOURCE_IN_SUBDIR=true diff --git a/conf/production.yaml b/conf/production.yaml index 6cccd20..12b141d 100644 --- a/conf/production.yaml +++ b/conf/production.yaml @@ -157,7 +157,7 @@ views: # -1 means no cleanup # Other values could be '6 months' or '30 days' etc (PeerTube will periodically delete old entries from database) remote: - max_age: -1 + max_age: '30 days' plugins: # The website PeerTube will ask for available PeerTube plugins and themes @@ -169,7 +169,7 @@ plugins: federation: videos: - federate_unlisted: true + federate_unlisted: false ############################################################################### diff --git a/manifest.json b/manifest.json index 6b5869f..c6ab63d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, - "version": "2.4.0~ynh1", + "version": "3.0.0~ynh1", "url": "https://github.com/Chocobozzz/PeerTube", "license": "AGPL-3.0-only", "maintainer": [ From bfde207bb7e76be3ef45eb2d9db820f17dd745a4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 8 Jan 2021 12:27:08 +0100 Subject: [PATCH 2/5] Small fixes --- README.md | 12 ++---------- README_fr.md | 11 ++--------- manifest.json | 6 +++--- scripts/_common.sh | 2 +- scripts/install | 19 +++++++++---------- scripts/remove | 10 ---------- scripts/restore | 2 +- scripts/upgrade | 26 +++++++------------------- 8 files changed, 25 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index 3c5d201..d40e24f 100644 --- a/README.md +++ b/README.md @@ -9,20 +9,12 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview - -### What is PeerTube? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. - -### Why PeerTube? - -We can't build a FOSS video streaming alternatives to YouTube, Dailymotion, Vimeo... with a centralized software. One organization alone cannot have enough money to pay bandwidth and video storage of its server. - +We can't build a FOSS video streaming alternatives to YouTube, Dailymotion, Vimeo... with a centralized software. One organization alone cannot have enough money to pay bandwidth and video storage of its server. So we need to have a decentralized network of servers seeding videos (as [Hubzilla YunoHost](https://github.com/YunoHost-Apps/hubzilla_ynh), [Friendica YunoHost](https://github.com/YunoHost-Apps/friendica_ynh),[Mastodon YunoHost](https://github.com/YunoHost-Apps/mastodon_ynh)), [Diaspora](https://github.com/diaspora/diaspora) ([Diaspora YunoHost](https://github.com/YunoHost-Apps/diaspora_ynh)),[Funkwhale](https://funkwhale.audio) ([Funkwhale YunoHost](https://github.com/YunoHost-Apps/funkwhale_ynh)). But it's not enough because one video could become famous and overload the server. It's the reason why we need to use a P2P protocol to limit the server load. -Thanks to [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus BitTorrent) inside the web browser, as of today. - -### Why is that cool? +Thanks to [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus BitTorrent) inside the web browser, as of today. Servers are run independently by different people and organizations. They can apply wildly different moderation policies, so you can find or make one that fits your taste perfectly. By watching a video, you help the hosting provider to broadcast it by becoming a broadcaster of the video yourself. Each instance doesn’t need much money to broadcast the videos of its users. diff --git a/README_fr.md b/README_fr.md index 8000e49..b5704e6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -9,18 +9,11 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* ## Vue d'ensemble - -### Qu'est-ce que PeerTube ? PeerTube est une plateforme de streaming vidéo fédérée (ActivityPub) utilisant P2P (BitTorrent) directement dans le navigateur Web, en utilisant WebTorrent . -### Why PeerTube? - Nous ne pouvons pas créer d'alternatives de streaming vidéo FOSS à YouTube, Dailymotion, Vimeo... avec un logiciel centralisé. Une organisation seule ne peut pas avoir assez d'argent pour payer la bande passante et le stockage vidéo de son serveur. Nous avons donc besoin d'un réseau décentralisé de serveurs « semant » des vidéos (comme [Hubzilla YunoHost](https://github.com/YunoHost-Apps/hubzilla_ynh), [Friendica YunoHost](https://github.com/YunoHost-Apps/friendica_ynh), [Mastodon YunoHost](https://github.com/YunoHost-Apps/mastodon_ynh)), [Diaspora](https://github.com/diaspora/diaspora) ([Diaspora YunoHost](https://github.com/YunoHost-Apps/diaspora_ynh)),[Funkwhale](https://funkwhale.audio) ([Funkwhale YunoHost](https://github.com/YunoHost-Apps/funkwhale_ynh)). -Mais ce n'est pas suffisant car une vidéo pourrait devenir célèbre et surcharger le serveur. C'est la raison pour laquelle nous devons utiliser un protocole P2P pour limiter la charge du serveur. Grâce à [WebTorrent](https://github.com/feross/webtorrent), nous pouvons faire du P2P (donc BitTorrent) dans le navigateur Web, dès aujourd'hui. - -### Pourquoi est-ce cool ? -Les serveurs sont gérés indépendamment par différentes personnes et organisations. Ils peuvent appliquer des politiques de modération extrêmement différentes, afin que vous puissiez en trouver ou en créer une qui correspond parfaitement à vos goûts. - +Mais ce n'est pas suffisant car une vidéo pourrait devenir célèbre et surcharger le serveur. C'est la raison pour laquelle nous devons utiliser un protocole P2P pour limiter la charge du serveur. Grâce à [WebTorrent](https://github.com/feross/webtorrent), nous pouvons faire du P2P (donc BitTorrent) dans le navigateur Web, dès aujourd'hui. +Les serveurs sont gérés indépendamment par différentes personnes et organisations. Ils peuvent appliquer des politiques de modération extrêmement différentes, afin que vous puissiez en trouver ou en créer une qui correspond parfaitement à vos goûts. En regardant une vidéo, vous aidez l'hébergeur à la diffuser en devenant vous-même un diffuseur de la vidéo. Chaque instance n'a pas besoin de beaucoup d'argent pour diffuser les vidéos de ses utilisateurs. **Version incluse :** 3.0.0 diff --git a/manifest.json b/manifest.json index c6ab63d..e739e4c 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "peertube", "packaging_format": 1, "description": { - "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", - "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" + "en": "Video streaming platform using P2P", + "fr": "Plateforme de diffusion vidéo par P2P" }, "version": "3.0.0~ynh1", "url": "https://github.com/Chocobozzz/PeerTube", @@ -41,7 +41,7 @@ "type": "string", "ask": { "en": "Choose an admin email (can be changed after installation)", - "fr": "Choisissez une adresse e-mail d'administrateur (peut être modifiée après l'installation)" + "fr": "Choisissez une adresse email d'administrateur (peut être modifiée après l'installation)" }, "example": "johndoe@example.com" }, diff --git a/scripts/_common.sh b/scripts/_common.sh index 03fa0ab..1441eb6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="ffmpeg postgresql postgresql-contrib openssl g++ redis-server redis-tools mailutils apt-transport-https" -YNH_NODEJS_VERSION=12 +YNH_NODEJS_VERSION=14 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 610549e..af21a40 100644 --- a/scripts/install +++ b/scripts/install @@ -77,7 +77,7 @@ ynh_script_progression --message="Installing dependencies..." ynh_install_nodejs --nodejs_version=$YNH_NODEJS_VERSION # Install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies # Install ffmpeg from backports for Debian Jessie and from main for others if [ "$(lsb_release --codename --short)" == "jessie" ]; then @@ -141,7 +141,7 @@ ynh_script_progression --message="Creating the data directory..." mkdir -p "$datadir" # Give permission to the datadir -chown -R "$app":"$app" "$datadir" +chown -R $app: "$datadir" #================================================= # MODIFY A CONFIG FILE @@ -176,11 +176,11 @@ ynh_store_file_checksum --file="$local_config" #================================================= ynh_script_progression --message="Building Yarn dependencies..." -chown -R "$app":"$app" $final_path +chown -R $app: $final_path -pushd "$final_path" +pushd $final_path ynh_use_nodejs - sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile popd #================================================= @@ -199,7 +199,7 @@ ynh_add_systemd_config --others_var="ynh_node_load_PATH" ynh_script_progression --message="Securing files and directories..." # Set permissions to app files -chown -R $app:$app $final_path +chown -R $app: $final_path #================================================= # SETUP LOGROTATE @@ -214,7 +214,7 @@ ynh_use_logrotate --logfile="$datadir/logs/peertube.log" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "$app daemon for Peertube" --log "$datadir/logs/peertube.log" +yunohost service add $app --description="$app daemon for Peertube" --log="$datadir/logs/peertube.log" #================================================= # START SYSTEMD SERVICE @@ -229,11 +229,10 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= ynh_script_progression --message="Configuring SSOwat..." -# Make app public if necessary +# Make app public if necessary or protect it if [ $is_public -eq 1 ] then - # unprotected_uris allows SSO credentials to be passed anyway. - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" + ynh_permission_update --permission "main" --add "visitors" fi #================================================= diff --git a/scripts/remove b/scripts/remove index f99235d..2e20ebb 100644 --- a/scripts/remove +++ b/scripts/remove @@ -88,16 +88,6 @@ ynh_script_progression --message="Removing logrotate configuration..." # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index a0a1a34..15d7d58 100644 --- a/scripts/restore +++ b/scripts/restore @@ -136,7 +136,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "$app daemon for Peertube" --log "$datadir/logs/peertube.log" +yunohost service add $app --description="$app daemon for Peertube" --log="$datadir/logs/peertube.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 878c18b..223f805 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -155,7 +155,7 @@ ynh_script_progression --message="Upgrading dependencies..." ynh_install_nodejs --nodejs_version=$YNH_NODEJS_VERSION # Install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies # Install ffmpeg from backports for Debian Jessie and from main for others if [ "$(lsb_release --codename --short)" == "jessie" ]; then @@ -193,7 +193,7 @@ then fi # Give permission to the datadir -chown -R "$app":"$app" "$datadir" +chown -R $app: "$datadir" #================================================= # MODIFY A CONFIG FILE @@ -221,11 +221,11 @@ ynh_store_file_checksum --file="$local_config" #================================================= ynh_script_progression --message="Building Yarn dependencies..." -chown -R "$app":"$app" $final_path +chown -R $app: $final_path -pushd "$final_path" +pushd $final_path ynh_use_nodejs - sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile popd #================================================= @@ -244,7 +244,7 @@ ynh_add_systemd_config --others_var="ynh_node_load_PATH" ynh_script_progression --message="Securing files and directories..." # Set permissions on app files -chown -R $app:$app $final_path +chown -R $app: $final_path #================================================= # SETUP LOGROTATE @@ -259,7 +259,7 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "$app daemon for Peertube" --log "$datadir/logs/peertube.log" +yunohost service add $app --description="$app daemon for Peertube" --log="$datadir/logs/peertube.log" #================================================= # START SYSTEMD SERVICE @@ -268,18 +268,6 @@ ynh_script_progression --message="Starting a systemd service..." ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server listening on localhost" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # unprotected_uris allows SSO credentials to be passed anyway - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" -fi - #================================================= # RELOAD NGINX #================================================= From 61ada087512641e6525bdf41d725445a22120529 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 8 Jan 2021 12:33:06 +0100 Subject: [PATCH 3/5] Revert "Small fixes" This reverts commit bfde207bb7e76be3ef45eb2d9db820f17dd745a4. --- README.md | 12 ++++++++++-- README_fr.md | 11 +++++++++-- manifest.json | 6 +++--- scripts/_common.sh | 2 +- scripts/install | 19 ++++++++++--------- scripts/remove | 10 ++++++++++ scripts/restore | 2 +- scripts/upgrade | 26 +++++++++++++++++++------- 8 files changed, 63 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index d40e24f..3c5d201 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,20 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview + +### What is PeerTube? PeerTube is a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser, using WebTorrent. -We can't build a FOSS video streaming alternatives to YouTube, Dailymotion, Vimeo... with a centralized software. One organization alone cannot have enough money to pay bandwidth and video storage of its server. + +### Why PeerTube? + +We can't build a FOSS video streaming alternatives to YouTube, Dailymotion, Vimeo... with a centralized software. One organization alone cannot have enough money to pay bandwidth and video storage of its server. + So we need to have a decentralized network of servers seeding videos (as [Hubzilla YunoHost](https://github.com/YunoHost-Apps/hubzilla_ynh), [Friendica YunoHost](https://github.com/YunoHost-Apps/friendica_ynh),[Mastodon YunoHost](https://github.com/YunoHost-Apps/mastodon_ynh)), [Diaspora](https://github.com/diaspora/diaspora) ([Diaspora YunoHost](https://github.com/YunoHost-Apps/diaspora_ynh)),[Funkwhale](https://funkwhale.audio) ([Funkwhale YunoHost](https://github.com/YunoHost-Apps/funkwhale_ynh)). But it's not enough because one video could become famous and overload the server. It's the reason why we need to use a P2P protocol to limit the server load. -Thanks to [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus BitTorrent) inside the web browser, as of today. +Thanks to [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus BitTorrent) inside the web browser, as of today. + +### Why is that cool? Servers are run independently by different people and organizations. They can apply wildly different moderation policies, so you can find or make one that fits your taste perfectly. By watching a video, you help the hosting provider to broadcast it by becoming a broadcaster of the video yourself. Each instance doesn’t need much money to broadcast the videos of its users. diff --git a/README_fr.md b/README_fr.md index b5704e6..8000e49 100644 --- a/README_fr.md +++ b/README_fr.md @@ -9,11 +9,18 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* ## Vue d'ensemble + +### Qu'est-ce que PeerTube ? PeerTube est une plateforme de streaming vidéo fédérée (ActivityPub) utilisant P2P (BitTorrent) directement dans le navigateur Web, en utilisant WebTorrent . +### Why PeerTube? + Nous ne pouvons pas créer d'alternatives de streaming vidéo FOSS à YouTube, Dailymotion, Vimeo... avec un logiciel centralisé. Une organisation seule ne peut pas avoir assez d'argent pour payer la bande passante et le stockage vidéo de son serveur. Nous avons donc besoin d'un réseau décentralisé de serveurs « semant » des vidéos (comme [Hubzilla YunoHost](https://github.com/YunoHost-Apps/hubzilla_ynh), [Friendica YunoHost](https://github.com/YunoHost-Apps/friendica_ynh), [Mastodon YunoHost](https://github.com/YunoHost-Apps/mastodon_ynh)), [Diaspora](https://github.com/diaspora/diaspora) ([Diaspora YunoHost](https://github.com/YunoHost-Apps/diaspora_ynh)),[Funkwhale](https://funkwhale.audio) ([Funkwhale YunoHost](https://github.com/YunoHost-Apps/funkwhale_ynh)). -Mais ce n'est pas suffisant car une vidéo pourrait devenir célèbre et surcharger le serveur. C'est la raison pour laquelle nous devons utiliser un protocole P2P pour limiter la charge du serveur. Grâce à [WebTorrent](https://github.com/feross/webtorrent), nous pouvons faire du P2P (donc BitTorrent) dans le navigateur Web, dès aujourd'hui. -Les serveurs sont gérés indépendamment par différentes personnes et organisations. Ils peuvent appliquer des politiques de modération extrêmement différentes, afin que vous puissiez en trouver ou en créer une qui correspond parfaitement à vos goûts. +Mais ce n'est pas suffisant car une vidéo pourrait devenir célèbre et surcharger le serveur. C'est la raison pour laquelle nous devons utiliser un protocole P2P pour limiter la charge du serveur. Grâce à [WebTorrent](https://github.com/feross/webtorrent), nous pouvons faire du P2P (donc BitTorrent) dans le navigateur Web, dès aujourd'hui. + +### Pourquoi est-ce cool ? +Les serveurs sont gérés indépendamment par différentes personnes et organisations. Ils peuvent appliquer des politiques de modération extrêmement différentes, afin que vous puissiez en trouver ou en créer une qui correspond parfaitement à vos goûts. + En regardant une vidéo, vous aidez l'hébergeur à la diffuser en devenant vous-même un diffuseur de la vidéo. Chaque instance n'a pas besoin de beaucoup d'argent pour diffuser les vidéos de ses utilisateurs. **Version incluse :** 3.0.0 diff --git a/manifest.json b/manifest.json index e739e4c..c6ab63d 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "peertube", "packaging_format": 1, "description": { - "en": "Video streaming platform using P2P", - "fr": "Plateforme de diffusion vidéo par P2P" + "en": "Video streaming platform using P2P directly in the web browser, connected to a federated network", + "fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé" }, "version": "3.0.0~ynh1", "url": "https://github.com/Chocobozzz/PeerTube", @@ -41,7 +41,7 @@ "type": "string", "ask": { "en": "Choose an admin email (can be changed after installation)", - "fr": "Choisissez une adresse email d'administrateur (peut être modifiée après l'installation)" + "fr": "Choisissez une adresse e-mail d'administrateur (peut être modifiée après l'installation)" }, "example": "johndoe@example.com" }, diff --git a/scripts/_common.sh b/scripts/_common.sh index 1441eb6..03fa0ab 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # dependencies used by the app pkg_dependencies="ffmpeg postgresql postgresql-contrib openssl g++ redis-server redis-tools mailutils apt-transport-https" -YNH_NODEJS_VERSION=14 +YNH_NODEJS_VERSION=12 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index af21a40..610549e 100644 --- a/scripts/install +++ b/scripts/install @@ -77,7 +77,7 @@ ynh_script_progression --message="Installing dependencies..." ynh_install_nodejs --nodejs_version=$YNH_NODEJS_VERSION # Install dependencies -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +ynh_install_app_dependencies $pkg_dependencies # Install ffmpeg from backports for Debian Jessie and from main for others if [ "$(lsb_release --codename --short)" == "jessie" ]; then @@ -141,7 +141,7 @@ ynh_script_progression --message="Creating the data directory..." mkdir -p "$datadir" # Give permission to the datadir -chown -R $app: "$datadir" +chown -R "$app":"$app" "$datadir" #================================================= # MODIFY A CONFIG FILE @@ -176,11 +176,11 @@ ynh_store_file_checksum --file="$local_config" #================================================= ynh_script_progression --message="Building Yarn dependencies..." -chown -R $app: $final_path +chown -R "$app":"$app" $final_path -pushd $final_path +pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile + sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile popd #================================================= @@ -199,7 +199,7 @@ ynh_add_systemd_config --others_var="ynh_node_load_PATH" ynh_script_progression --message="Securing files and directories..." # Set permissions to app files -chown -R $app: $final_path +chown -R $app:$app $final_path #================================================= # SETUP LOGROTATE @@ -214,7 +214,7 @@ ynh_use_logrotate --logfile="$datadir/logs/peertube.log" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for Peertube" --log="$datadir/logs/peertube.log" +yunohost service add $app --description "$app daemon for Peertube" --log "$datadir/logs/peertube.log" #================================================= # START SYSTEMD SERVICE @@ -229,10 +229,11 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= ynh_script_progression --message="Configuring SSOwat..." -# Make app public if necessary or protect it +# Make app public if necessary if [ $is_public -eq 1 ] then - ynh_permission_update --permission "main" --add "visitors" + # unprotected_uris allows SSO credentials to be passed anyway. + ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" fi #================================================= diff --git a/scripts/remove b/scripts/remove index 2e20ebb..f99235d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -88,6 +88,16 @@ ynh_script_progression --message="Removing logrotate configuration..." # Remove the app-specific logrotate config ynh_remove_logrotate +#================================================= +# CLOSE A PORT +#================================================= + +if yunohost firewall list | grep -q "\- $port$" +then + ynh_script_progression --message="Closing port $port..." + ynh_exec_warn_less yunohost firewall disallow TCP $port +fi + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 15d7d58..a0a1a34 100644 --- a/scripts/restore +++ b/scripts/restore @@ -136,7 +136,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for Peertube" --log="$datadir/logs/peertube.log" +yunohost service add $app --description "$app daemon for Peertube" --log "$datadir/logs/peertube.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 223f805..878c18b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -155,7 +155,7 @@ ynh_script_progression --message="Upgrading dependencies..." ynh_install_nodejs --nodejs_version=$YNH_NODEJS_VERSION # Install dependencies -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +ynh_install_app_dependencies $pkg_dependencies # Install ffmpeg from backports for Debian Jessie and from main for others if [ "$(lsb_release --codename --short)" == "jessie" ]; then @@ -193,7 +193,7 @@ then fi # Give permission to the datadir -chown -R $app: "$datadir" +chown -R "$app":"$app" "$datadir" #================================================= # MODIFY A CONFIG FILE @@ -221,11 +221,11 @@ ynh_store_file_checksum --file="$local_config" #================================================= ynh_script_progression --message="Building Yarn dependencies..." -chown -R $app: $final_path +chown -R "$app":"$app" $final_path -pushd $final_path +pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile + sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile popd #================================================= @@ -244,7 +244,7 @@ ynh_add_systemd_config --others_var="ynh_node_load_PATH" ynh_script_progression --message="Securing files and directories..." # Set permissions on app files -chown -R $app: $final_path +chown -R $app:$app $final_path #================================================= # SETUP LOGROTATE @@ -259,7 +259,7 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for Peertube" --log="$datadir/logs/peertube.log" +yunohost service add $app --description "$app daemon for Peertube" --log "$datadir/logs/peertube.log" #================================================= # START SYSTEMD SERVICE @@ -268,6 +268,18 @@ ynh_script_progression --message="Starting a systemd service..." ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Server listening on localhost" +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Upgrading SSOwat configuration..." + +# Make app public if necessary +if [ $is_public -eq 1 ] +then + # unprotected_uris allows SSO credentials to be passed anyway + ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" +fi + #================================================= # RELOAD NGINX #================================================= From 6970909e723915773b40d9f8cc92a0897af1fcf9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 8 Jan 2021 13:24:04 +0100 Subject: [PATCH 4/5] Update check_process --- check_process | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/check_process b/check_process index 45dded3..3ca7ed3 100644 --- a/check_process +++ b/check_process @@ -17,6 +17,12 @@ setup_private=1 setup_public=1 upgrade=1 + # 2.1.0 + upgrade=1 from_commit=d049b71061d12ffab92bbf106af200e7d8a69572 + # 2.1.1~ynh1 + upgrade=1 from_commit=63f076db215f8f438dbdcd2966c12d9ee7976121 + # 2.2.0~ynh1 + upgrade=1 from_commit=2b24ab443dc95fc78654e8232351933491cf04b4 # 2.3.0~ynh1 upgrade=1 from_commit=141e5a370e552760b83066fbfe044ca3e5283a72 backup_restore=1 @@ -27,5 +33,12 @@ Email=anmol@datamol.org;yalh@yahoo.com Notification=yes ;;; Upgrade options + ; commit=d049b71061d12ffab92bbf106af200e7d8a69572 + name=2.1.0 + ; commit=63f076db215f8f438dbdcd2966c12d9ee7976121 + name=2.1.1~ynh1 + ; commit=2b24ab443dc95fc78654e8232351933491cf04b4 + name=2.2.0~ynh1 ; commit=141e5a370e552760b83066fbfe044ca3e5283a72 name=2.3.0~ynh1 + \ No newline at end of file From 50eedfe6e871427a2fcfd938dcfdb4c7b35d6eda Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 9 Jan 2021 11:05:39 +0100 Subject: [PATCH 5/5] Package check upgrade --- check_process | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index 3ca7ed3..5458ab3 100644 --- a/check_process +++ b/check_process @@ -18,13 +18,15 @@ setup_public=1 upgrade=1 # 2.1.0 - upgrade=1 from_commit=d049b71061d12ffab92bbf106af200e7d8a69572 + # upgrade=1 from_commit=d049b71061d12ffab92bbf106af200e7d8a69572 # 2.1.1~ynh1 - upgrade=1 from_commit=63f076db215f8f438dbdcd2966c12d9ee7976121 + # upgrade=1 from_commit=63f076db215f8f438dbdcd2966c12d9ee7976121 # 2.2.0~ynh1 - upgrade=1 from_commit=2b24ab443dc95fc78654e8232351933491cf04b4 + # upgrade=1 from_commit=2b24ab443dc95fc78654e8232351933491cf04b4 # 2.3.0~ynh1 upgrade=1 from_commit=141e5a370e552760b83066fbfe044ca3e5283a72 + # 2.4.0~ynh1 + upgrade=1 from_commit=10d79175a8a45137d271931cbd6d14e927400729 backup_restore=1 multi_instance=1 port_already_use=0 @@ -41,4 +43,6 @@ Notification=yes name=2.2.0~ynh1 ; commit=141e5a370e552760b83066fbfe044ca3e5283a72 name=2.3.0~ynh1 + ; commit=10d79175a8a45137d271931cbd6d14e927400729 + name=2.4.0~ynh1 \ No newline at end of file