From 96b5a0f56ad27cae15b3f49eb31fffba33b0af0a Mon Sep 17 00:00:00 2001 From: siwinter <45730097+siwinter@users.noreply.github.com> Date: Fri, 2 Apr 2021 00:33:25 +0200 Subject: [PATCH 1/6] for CI test Did this modification as a prerequisite for CI test. --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 26db1a8..c9579fc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=2 app=$YNH_APP_INSTANCE_NAME From 955046e5b12229d835a5656e4e0b6e956bd1681f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 5 Apr 2021 18:10:59 +0200 Subject: [PATCH 2/6] Update check_process --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 8cdb500..8af44f2 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,8 @@ pkg_linter=1 setup_sub_dir=1 setup_root=1 - setup_nourl=1 - setup_private=0 + setup_nourl=0 + setup_private=1 setup_public=1 upgrade=1 # upgrade=1 from_commit=CommitHash From 68457bbd5d3bd653aa114f92ea64e40ccc34aa80 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 5 Apr 2021 23:50:32 +0200 Subject: [PATCH 3/6] Fix linter warnings --- README.md | 19 +++++++------------ README_fr.md | 18 +++++++----------- manifest.json | 16 ++++------------ scripts/install | 11 ++++++----- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 6 files changed, 28 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 50c0d13..4986ad4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Mopidy for YunoHost [![Integration level](https://dash.yunohost.org/integration/mopidy.svg)](https://dash.yunohost.org/appci/app/mopidy) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.maintain.svg) -[![Install mopidy with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mopidy) +[![Install Mopidy with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mopidy) *[Lire ce readme en français.](./README_fr.md)* @@ -9,8 +9,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Mopidy - is an extensible music server. -It plays music, podcasts and radio programs from local disk and various streaming services. You edit the playlist from any phone, tablet, or computer. +Mopidy - is an extensible music server. It plays music, podcasts and radio programs from local disk and various streaming services. You edit the playlist from any phone, tablet, or computer. **Shipped version:** 3.1.1 @@ -42,13 +41,13 @@ This installation is shipped with various extensions: #### Multi-user support -Are LDAP and HTTP auth supported? No \ -Can the app be used by multiple users? ?? +* Are LDAP and HTTP auth supported? **No** +* Can the app be used by multiple users? ?? #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mopidy%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mopidy/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mopidy%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mopidy.svg)](https://ci-apps.yunohost.org/ci/apps/mopidy/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mopidy.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/) ## Limitations @@ -57,12 +56,9 @@ Can the app be used by multiple users? ?? ## Additional information * To list current settings enter `sudo mopidyctl config`. -* Edit the file `/opt/yunohost/mopidy/mopidy.conf` to adjust mopidy's configuration. +* Edit the file `/opt/yunohost/mopidy/mopidy.conf` to adjust Mopidy's configuration. * To rebuild the database of your local music collection enter `sudo mopidyctl local scan`. -**More info on the documentation page:** -https://yunohost.org/packaging_apps - ## Links * Report a bug: https://github.com/YunoHost-Apps/mopidy_ynh/issues @@ -73,7 +69,6 @@ https://yunohost.org/packaging_apps ## Developer info -**Only if you want to use a testing branch for coding, instead of merging directly into master.** Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mopidy_ynh/tree/testing). To try the testing branch, please proceed like that. diff --git a/README_fr.md b/README_fr.md index 0146670..62c6aa8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # Mopidy pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/mopidy.svg)](https://dash.yunohost.org/appci/app/mopidy) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mopidy.maintain.svg) -[![Installer mopidy avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mopidy) +[![Installer Mopidy avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mopidy) *[Read this readme in english.](./README.md)* @@ -9,8 +9,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* ## Vue d'ensemble -Mopidy - est un serveur de musique extensible. -Mopidy lit de la musique, des podcasts et des programmes de radio à partir d'un disque local et de divers services de streaming. +Mopidy - est un serveur de musique extensible. Mopidy lit de la musique, des podcasts et des programmes de radio à partir d'un disque local et de divers services de streaming. Vous pouvez modifier la liste de lecture à partir d'un téléphone, d'une tablette ou d'un ordinateur. **Version incluse :** 3.1.1 @@ -40,17 +39,18 @@ Cette installation est livrée avec différentes extensions: ## Documentation * Documentation officielle : https://docs.mopidy.com/en/latest/ + ## Caractéristiques spécifiques YunoHost #### Support multi-utilisateur -* L'authentification LDAP et HTTP est-elle prise en charge ? Non +* L'authentification LDAP et HTTP est-elle prise en charge ? **Non** * L'application peut-elle être utilisée par plusieurs utilisateurs ? #### Architectures supportées -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mopidy%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mopidy/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mopidy%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mopidy.svg)](https://ci-apps.yunohost.org/ci/apps/mopidy/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mopidy.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mopidy/) ## Limitations @@ -59,12 +59,9 @@ Cette installation est livrée avec différentes extensions: ## Informations additionnelles * Pour lister les paramètres actuels, entrez `sudo mopidyctl config` -* Modifiez le fichier /opt/yunohost/mopidy/mopidy.conf pour ajuster la configuration de mopidy +* Modifiez le fichier `/opt/yunohost/mopidy/mopidy.conf` pour ajuster la configuration de mopidy * Pour reconstruire la base de données de votre collection de musique locale, entrez `sudo mopidyctl local scan` -**Plus d'informations sur la page de documentation :** -https://yunohost.org/packaging_apps - ## Liens * Signaler un bug : https://github.com/YunoHost-Apps/mopidy_ynh/issues @@ -75,7 +72,6 @@ https://yunohost.org/packaging_apps ## Informations pour les développeurs -**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mopidy_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. diff --git a/manifest.json b/manifest.json index 841ec86..3adfb72 100644 --- a/manifest.json +++ b/manifest.json @@ -17,7 +17,7 @@ "email": "cyp@rouquin.me" }, "requirements": { - "yunohost": ">= 4.0.8" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ @@ -28,29 +28,21 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Mopidy" - }, "example": "example.com" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Mopidy" - }, "example": "/example", "default": "/mopidy" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?" + "help": { + "en": "Public app can be used by anonymous visitors", + "fr": "L'application publique peut être utilisée par des visiteurs anonymes " }, - "help": { - "en": "public app can be used by anonymous visitors" - }, "default": false } ] diff --git a/scripts/install b/scripts/install index c129528..346e3a8 100755 --- a/scripts/install +++ b/scripts/install @@ -66,7 +66,8 @@ ynh_app_setting_set --app=$app --key=port --value=$port # INSTALL DEPENDENCIES #================================================= ynh_script_progression --message="Installing dependencies..." --weight=30 -ynh_install_app_dependencies $pkg_dependencies + +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER @@ -151,7 +152,7 @@ chown $app: $final_path #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --log_type systemd --description "this is mopidy, a music server" +yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -188,9 +189,9 @@ ynh_systemd_action --service_name=nginx --action=reload ynh_script_progression --message="Provide additional shell comand..." cp -a ../sources/extra_files/mopidyctl "$cmd_file" -ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="$cmd_file" -ynh_replace_string --match_string="__FINAL_PATH__" --replace_string=$final_path --target_file="$cmd_file" -ynh_replace_string --match_string="__CONF_FILE__" --replace_string=$conf_file --target_file="$cmd_file" +ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="$cmd_file" +ynh_replace_string --match_string="__FINAL_PATH__" --replace_string=$final_path --target_file="$cmd_file" +ynh_replace_string --match_string="__CONF_FILE__" --replace_string=$conf_file --target_file="$cmd_file" chmod +x "$cmd_file" diff --git a/scripts/restore b/scripts/restore index d6f4608..14d277d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -89,7 +89,7 @@ ynh_restore_file --origin_path="$final_path" # /opt/yunohost/mopidy ynh_script_progression --message="Reinstalling dependencies..." --weight=50 # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE SYSTEMD @@ -104,7 +104,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --log_type systemd --description "this is mopidy, a music server" +yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log" #================================================= # RESTORE VARIOUS FILES diff --git a/scripts/upgrade b/scripts/upgrade index c9579fc..8061c26 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,7 +102,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=11 -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER @@ -162,7 +162,7 @@ chown $app: $final_path #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --log_type systemd --description "this is mopidy, a music server" +yunohost service add $app --description "Mopidy music server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE From b7d0141eb2c06a1db598d925f20199b63ab299c4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 5 Apr 2021 23:56:26 +0200 Subject: [PATCH 4/6] Fix linter --- scripts/_common.sh | 2 +- scripts/change_url | 2 +- scripts/install | 4 ++-- scripts/upgrade | 10 ---------- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2dd4586..5a99575 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= # dependencies used by the app -pkg_dependencies="build-essential python3-dev python3-pip python3-venv git postgresql postgresql-contrib \ +pkg_dependencies="acl build-essential python3-dev python3-pip python3-venv git postgresql postgresql-contrib \ gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly lsb-base \ python3-gst-1.0 python3-tornado (>= 4.4) debconf python3-pkg-resources python3-pykka python3-requests \ gstreamer1.0-alsa gstreamer1.0-pulseaudio gstreamer1.0-tools" diff --git a/scripts/change_url b/scripts/change_url index 45a28e6..17c0993 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -105,8 +105,8 @@ then ynh_permission_url --permission="main" --add_url="$new_domain/mopidy/ws" --remove_url="$old_domain/mopidy/ws" ynh_permission_url --permission="main" --add_url="$new_domain/local" --remove_url="$old_domain/local" ynh_permission_url --permission="main" --add_url="$new_domain/musicbox_webclient" --remove_url="$old_domain/musicbox_webclient" - fi + #================================================= # SPECIFIC MODIFICATIONS #================================================= diff --git a/scripts/install b/scripts/install index 346e3a8..21a7578 100755 --- a/scripts/install +++ b/scripts/install @@ -102,7 +102,7 @@ ynh_add_nginx_config #================================================= # CREATE YUNOHOST DIRECTORIES #================================================= -ynh_script_progression --message="Creating yunohost directories..." +ynh_script_progression --message="Creating YunoHost directories..." ynh_multimedia_build_main_dir # /home/yunohost.multimedia @@ -186,7 +186,7 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # PROVIDE ADDITIONAL SHELL COMAND #================================================= -ynh_script_progression --message="Provide additional shell comand..." +ynh_script_progression --message="Provide additional shell command..." cp -a ../sources/extra_files/mopidyctl "$cmd_file" ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="$cmd_file" diff --git a/scripts/upgrade b/scripts/upgrade index 8061c26..f8c8ad5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,17 +27,10 @@ work_dir="/home/yunohost.app/$app" conf_file="$final_path/$app.conf" cmd_file="/usr/local/bin/mopidyctl" - #================================================= # CHECK VERSION #================================================= -### This helper will compare the version of the currently installed app and the version of the upstream package. -### $upgrade_type can have 2 different values -### - UPGRADE_APP if the upstream app version has changed -### - UPGRADE_PACKAGE if only the YunoHost package has changed -### ynh_check_app_version_changed will stop the upgrade if the app is up to date. -### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do. upgrade_type=$(ynh_check_app_version_changed) #================================================= @@ -127,11 +120,8 @@ ynh_add_systemd_config --others_var="conf_file start_file" # substitute __CO # MODIFY A CONFIG FILE #================================================= -### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. -### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. ynh_backup_if_checksum_is_different --file="$conf_file" - cp ../conf/app.conf "$conf_file" ynh_replace_string --match_string="__PORT__" --replace_string=$port --target_file="$conf_file" From cd83b00fa1f34a7830d5254656e7b7154d98c151 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 6 Apr 2021 08:34:16 +0200 Subject: [PATCH 5/6] Update _common.sh --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 5a99575..483ba36 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -33,13 +33,13 @@ myynh_install() { $final_path/env/bin/python3 -m pip install vext $final_path/env/bin/python3 -m pip install --no-binary=:all: vext.gi - # install essential packages - ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy==3.1.1 + # install essential packages + ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy==3.1.1 # patch -u $final_path/env/lib/python$python_version/site-packages/mopidy/__main__.py -i ../sources/patches/__main__.patch --forward - ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy-local==3.2.1 + ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy-local==3.2.1 ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy-MusicBox-Webclient==3.1.0 # ynh_script_progression --message="Installing Mopidy-YouTube..." --weight=7 ynh_exec_as $app $final_path/env/bin/python3 -m pip install --no-cache-dir Mopidy-YouTube==3.2 From 525a06013485d496c0a24bc12a120eeaa3db0e31 Mon Sep 17 00:00:00 2001 From: siwinter <45730097+siwinter@users.noreply.github.com> Date: Tue, 6 Apr 2021 13:33:05 +0200 Subject: [PATCH 6/6] test nourl ist useless --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 8cdb500..8af44f2 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,8 @@ pkg_linter=1 setup_sub_dir=1 setup_root=1 - setup_nourl=1 - setup_private=0 + setup_nourl=0 + setup_private=1 setup_public=1 upgrade=1 # upgrade=1 from_commit=CommitHash