diff --git a/README.md b/README.md index e81c913..2e820c7 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Navidrome indexes all digital music stored in your hard drive and makes it avail - Transcoding on the fly. Can be set per user/player. Opus encoding is supported -**Shipped version:** 0.49.3~ynh2 +**Shipped version:** 0.50.0~ynh1 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index 08c0cac..00f3a76 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Navidrome indexe toute la musique numérique stockée sur votre disque dur et la - Compatible avec tous les clients subsonique/madsononique/aironique - Encodage à la volée. Peut être défini par utilisateur/lecteur. Le codage opus est pris en charge -**Version incluse :** 0.49.3~ynh2 +**Version incluse :** 0.50.0~ynh1 **Démo :** https://demo.navidrome.org/app/#/login diff --git a/conf/systemd.service b/conf/systemd.service index 440cb14..ed0f54e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,18 +1,18 @@ [Unit] Description=Navidrome: Music Server and Streamer After=remote-fs.target network.target -AssertPathExists=__CONFIG_PATH__ +AssertPathExists=/var/lib/__APP__ [Service] Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__CONFIG_PATH__/ -ExecStart=__INSTALL_DIR__/__APP__ --configfile "__CONFIG_PATH__/navidrome.toml" +WorkingDirectory=/var/lib/__APP__/ +ExecStart=__INSTALL_DIR__/__APP__ --configfile "/var/lib/__APP__/navidrome.toml" TimeoutStopSec=20 KillMode=process Restart=on-failure -ReadWritePaths=__CONFIG_PATH__ +ReadWritePaths=/var/lib/__APP__ # Sandboxing options to harden security # Depending on specificities of your service/app, you may need to tweak these diff --git a/doc/ADMIN.md b/doc/ADMIN.md index b4b9f4d..ff1fcb8 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -3,7 +3,3 @@ Your music files are stored by default in your shared [multimedia folder](https://github.com/YunoHost-Apps/yunohost.multimedia) `/home/yunohost.multimedia/share/Music`. This folder is accessible from Nextcloud with *External Storages* enabled. This will allow you to easily upload your music files to the server. You can configure an alternative path to you music files by editing the path `MusicFolder = "/home/yunohost.multimedia/share/Music"` in this file `/var/lib/navidrome/navidrome.toml` using the [documentation](https://www.navidrome.org/docs/usage/configuration-options/). Remember to restart Navidrome service if you change your configuration file. - -#### Client player - -You must activate *public site* if you want to connect a client player to Navidrome. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index f90f781..68c9995 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -3,7 +3,3 @@ Votre musique est a stockée par default dans le [dossier multimédia](https://github.com/YunoHost-Apps/yunohost.multimedia) partagé `/home/yunohost.multimedia/share/Music`. Ce dossier, facilement accessible depuis Nextcloud avec *Stockages externes* activée, vous permettra d'*uploader* facilement vos fichiers de musique sur votre server. Vous pouvez personnaliser le dossier de stockage de vos fichiers de musique en éditant le fichier de configuration `/var/lib/navidrome/navidrome.toml` et rediriger la variable `MusicFolder = "/home/yunohost.multimedia/share/Music"`. Vous pouvez également changer d'autre réglage en vous aidant de la [documentation](https://www.navidrome.org/docs/usage/configuration-options/). Pensez à redémarrer le service de Navidrome si vous modifiez votre fichier de configuration. - -#### Utilisation d'un client - -Vous devez activer *site public* si vous souhaitez connecter un lecteur client à Navidrome. diff --git a/doc/PRE_INSTALL.md b/doc/PRE_INSTALL.md new file mode 100644 index 0000000..923351e --- /dev/null +++ b/doc/PRE_INSTALL.md @@ -0,0 +1 @@ +You must activate *visitors* during installation process if you want to connect a client player to Navidrome. diff --git a/doc/PRE_INSTALL_fr.md b/doc/PRE_INSTALL_fr.md new file mode 100644 index 0000000..b4972bb --- /dev/null +++ b/doc/PRE_INSTALL_fr.md @@ -0,0 +1 @@ +Vous devez activer à l'installation *visiteurs* si vous souhaitez connecter un joueur client à Navidrome. \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index dc42236..2dff503 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Navidrome" description.en = "Modern Music Server and Streamer compatible with Subsonic/Airsonic" description.fr = "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" -version = "0.49.3~ynh2" +version = "0.50.0~ynh1" maintainers = ["eric_G"] @@ -17,11 +17,14 @@ admindoc = "https://www.navidrome.org/docs" code = "https://github.com/deluan/navidrome" [integration] -yunohost = ">= 11.1.20" +yunohost = ">= 11.2" architectures = ["amd64", "arm64", "armhf"] multi_instance = false + ldap = false + sso = true + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -43,7 +46,7 @@ ram.runtime = "50M" [install.language] ask.en = "Choose the application language" ask.fr = "Choisissez la langue de l'application" - type = "string" + type = "select" choices = ["de", "en", "es", "fr", "it", "nl", "pt"] default = "fr" @@ -52,12 +55,12 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - amd64.url = "https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_x86_64.tar.gz" - amd64.sha256 = "d7646878e34d7c79eab9345c8779637eeac9faf2147f6fda2f4b2d832a76308e" - arm64.url = "https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_arm64.tar.gz" - arm64.sha256 = "1c7b31be311d441261fe148e7c8bb81273ac7bf1024388304a8929457eab87a6" - armhf.url = "https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_armv7.tar.gz" - armhf.sha256 = "c8298754e7abd0461ca014bb939e2f34af1fd88b34e8d8329c50af321b8a155d" + amd64.url = "https://github.com/navidrome/navidrome/releases/download/v0.50.0/navidrome_0.50.0_linux_amd64.tar.gz" + amd64.sha256 = "a4b8760d6e2b1649aa5069b67f5ba1c5554df4259054159ef7aebc4babee5c38" + arm64.url = "https://github.com/navidrome/navidrome/releases/download/v0.50.0/navidrome_0.50.0_linux_arm64.tar.gz" + arm64.sha256 = "e1f7bbabbae87cb0a5309764f9e52557f76a4947fbb9bac1c46382c1791e0e7b" + armhf.url = "https://github.com/navidrome/navidrome/releases/download/v0.50.0/navidrome_0.50.0_linux_armv7.tar.gz" + armhf.sha256 = "c93b8ec7f46cd717d4f7a0e5f5d4861e8f8342059379a77a2c1fc9d7c16c847e" in_subdir = false [resources.system_user] diff --git a/scripts/change_url b/scripts/change_url index 200a19e..3536590 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,13 +30,12 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Modifying a config file..." --weight=1 -config_path="/var/lib/$app" path_url="$new_path" -ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" +ynh_add_config --template="navidrome.toml" --destination="/var/lib/$app/navidrome.toml" -chmod 600 "$config_path/navidrome.toml" -chown -R $app:$app "$config_path" +chmod 600 "/var/lib/$app/navidrome.toml" +chown -R $app:$app "/var/lib/$app/navidrome.toml" #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index fcfb6eb..c961961 100644 --- a/scripts/install +++ b/scripts/install @@ -19,6 +19,7 @@ enable_animation="true" enable_transcoding="false" welcome_message="" enable_sharing="false" +config_path="/var/lib/$app" #================================================= # STORE SETTINGS FROM MANIFEST @@ -31,6 +32,7 @@ ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation ynh_app_setting_set --app=$app --key=enable_transcoding --value=$enable_transcoding ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message ynh_app_setting_set --app=$app --key=enable_sharing --value=$enable_sharing +ynh_app_setting_set --app=$app --key=config_path --value=$config_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -40,7 +42,8 @@ ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$install_dir" +mkdir -p "$config_path" + chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -52,6 +55,11 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=3 # Create a dedicated NGINX config ynh_add_nginx_config +# Create a dedicated systemd config +ynh_add_systemd_config + +yunohost service add $app --description="Web-based music collection server and streamer" --log="/var/log/$app/$app.log" + #================================================= # SPECIFIC SETUP #================================================= @@ -66,34 +74,12 @@ ynh_multimedia_build_main_dir #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -config_path="/var/lib/$app" -ynh_app_setting_set --app=$app --key=config_path --value=$config_path - -mkdir -p "$config_path" - # Main config File -ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" +ynh_add_config --template="navidrome.toml" --destination="$config_path/navidrome.toml" chmod 600 "$config_path/navidrome.toml" chown -R $app:$app "$config_path" -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config - -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Web-based music collection server and streamer" - #================================================= # START SYSTEMD SERVICE #================================================= diff --git a/scripts/remove b/scripts/remove index cbce88c..a104918 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,29 +22,12 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=5 - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=6 - # Remove the config directory securely ynh_secure_remove --file="/var/lib/$app" diff --git a/scripts/restore b/scripts/restore index 4e4aab3..b0f524f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -17,17 +17,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE VARIOUS FILES #================================================= @@ -36,7 +28,7 @@ ynh_script_progression --message="Restoring various files..." --weight=2 ynh_restore_file --origin_path="/var/lib/$app" chmod 600 "/var/lib/$app/navidrome.toml" -chown -R $app "/var/lib/$app" +chown -R $app:$app "/var/lib/$app" #================================================= # RESTORE SYSTEMD @@ -46,12 +38,9 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -yunohost service add $app --description="Web-based music collection server and streamer" +yunohost service add $app --description="Web-based music collection server and streamer" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -60,13 +49,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Version:" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 30ad5b7..2494e54 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,47 +79,32 @@ then ynh_setup_source --dest_dir="$install_dir" fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." - -config_path="/var/lib/$app" - -# Uncomment when there is new options added upstream -ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" - -chmod 600 "$config_path/navidrome.toml" -chown -R $app:$app "$config_path" - -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 - # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +yunohost service add $app --description="Web-based music collection server and streamer" --log="/var/log/$app/$app.log" -yunohost service add $app --description="Web-based music collection server and streamer" +#================================================= +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating a configuration file..." --weight=2 + +# Uncomment when there is new options added upstream +ynh_add_config --template="navidrome.toml" --destination="/var/lib/$app/navidrome.toml" + +chmod 600 "/var/lib/$app/navidrome.toml" +chown -R $app:$app "/var/lib/$app" #================================================= # START SYSTEMD SERVICE diff --git a/tests.toml b/tests.toml index 5a08f03..75e7c08 100644 --- a/tests.toml +++ b/tests.toml @@ -12,4 +12,4 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.d7eb59fd.name = "Upgrade from 0.47.0~ynh1" + test_upgrade_from.67d16cd5c8a3d2e2c44348ec3e8c41af6559e3df.name = "Upgrade from 0.49.2~ynh1"