From 9eb1bd40270e9698a7520577e8e307f311da8a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 9 Jun 2023 20:26:43 +0200 Subject: [PATCH 01/24] Version 2 (#102) * fix * fix * fix --- .github/workflows/updater.sh | 138 ---------------------------------- .github/workflows/updater.yml | 49 ------------ conf/amd64.src | 5 -- conf/arm64.src | 5 -- conf/armhf.src | 5 -- conf/systemd.service | 2 +- manifest.toml | 16 +++- scripts/change_url | 90 +--------------------- scripts/install | 2 +- scripts/upgrade | 2 +- 10 files changed, 19 insertions(+), 295 deletions(-) delete mode 100644 .github/workflows/updater.sh delete mode 100644 .github/workflows/updater.yml delete mode 100644 conf/amd64.src delete mode 100644 conf/arm64.src delete mode 100644 conf/armhf.src diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh deleted file mode 100644 index cda04b4..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/bash - -#================================================= -# PACKAGE UPDATING HELPER -#================================================= - -# This script is meant to be run by GitHub Actions -# The YunoHost-Apps organisation offers a template Action to run this script periodically -# Since each app is different, maintainers can adapt its contents so as to perform -# automatic actions when a new upstream release is detected. - -# Remove this exit command when you are ready to run this Action -#exit 1 - -#================================================= -# FETCHING LATEST RELEASE AND ITS ASSETS -#================================================= - -# Fetching information -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') -# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) - -if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then - version=${version:1} -fi - -# Setting up the environment variables -echo "Current version: $current_version" -echo "Latest release from upstream: $version" -echo "VERSION=$version" >> $GITHUB_ENV -# For the time being, let's assume the script will fail -echo "PROCEED=false" >> $GITHUB_ENV - -# Proceed only if the retrieved version is greater than the current one -if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then - echo "::warning ::No new version available" - exit 0 -# Proceed only if a PR for this new version does not already exist -elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then - echo "::warning ::A branch already exists for this update" - exit 0 -fi - -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Here we use the $assets variable to get the resources published in the upstream release. -# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - -echo "Handling asset at $asset_url" - -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in navidrome_"*"_Linux_arm64.tar.gz - navidrome_"*"_Linux_arm64.tar.gz) - src="arm64" - ;; - navidrome_"*"_Linux_armv5.tar.gz) - src="armv5" - ;; - navidrome_"*"_Linux_armv6.tar.gz) - src="armv6" - ;; - navidrome_"*"_Linux_armv7.tar.gz) - src="armv7" - ;; - navidrome_"*"_Linux_x86_64.tar.gz) - src="x86-64" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then - -# Create the temporary directory -tempdir="$(mktemp -d)" - -# Download sources and calculate checksum -filename=${asset_url##*/} -curl --silent -4 -L $asset_url -o "$tempdir/$filename" -checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - -# Delete temporary directory -rm -rf $tempdir - -# Get extension -if [[ $filename == *.tar.gz ]]; then - extension=tar.gz -else - extension=${filename##*.} -fi - -# Rewrite source file -cat < conf/$src.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=$extension -SOURCE_IN_SUBDIR=false -EOT -echo "... conf/$src.src updated" - -else -echo "... asset ignored" -fi - -done - -#================================================= -# SPECIFIC UPDATE STEPS -#================================================= - -# Any action on the app's source code can be done. -# The GitHub Action workflow takes care of committing all changes after this script ends. - -#================================================= -# GENERIC FINALIZATION -#================================================= - -# Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json - -# No need to update the README, yunohost-bot takes care of it - -# The Action will proceed only if the PROCEED environment variable is set to true -echo "PROCEED=true" >> $GITHUB_ENV -exit 0 diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml deleted file mode 100644 index fd6ed60..0000000 --- a/.github/workflows/updater.yml +++ /dev/null @@ -1,49 +0,0 @@ -# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. -# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. -# This file should be enough by itself, but feel free to tune it to your needs. -# It calls updater.sh, which is where you should put the app-specific update steps. -name: Check for new upstream releases -on: - # Allow to manually trigger the workflow - workflow_dispatch: - # Run it every day at 6:00 UTC - schedule: - - cron: '0 6 * * *' -jobs: - updater: - runs-on: ubuntu-latest - steps: - - name: Fetch the source code - uses: actions/checkout@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Run the updater script - id: run_updater - run: | - # Setting up Git user - git config --global user.name 'yunohost-bot' - git config --global user.email 'yunohost-bot@users.noreply.github.com' - # Run the updater script - /bin/bash .github/workflows/updater.sh - - name: Commit changes - id: commit - if: ${{ env.PROCEED == 'true' }} - run: | - git commit -am "Upgrade to v$VERSION" - - name: Create Pull Request - id: cpr - if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update to version ${{ env.VERSION }} - committer: 'yunohost-bot ' - author: 'yunohost-bot ' - signoff: false - branch: ci-auto-update-v${{ env.VERSION }} - base: testing - delete-branch: true - title: 'Upgrade to version ${{ env.VERSION }}' - body: | - Upgrade to v${{ env.VERSION }} - draft: false diff --git a/conf/amd64.src b/conf/amd64.src deleted file mode 100644 index 4e5d805..0000000 --- a/conf/amd64.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_x86_64.tar.gz -SOURCE_SUM=d7646878e34d7c79eab9345c8779637eeac9faf2147f6fda2f4b2d832a76308e -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false diff --git a/conf/arm64.src b/conf/arm64.src deleted file mode 100644 index 357535b..0000000 --- a/conf/arm64.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_arm64.tar.gz -SOURCE_SUM=1c7b31be311d441261fe148e7c8bb81273ac7bf1024388304a8929457eab87a6 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false diff --git a/conf/armhf.src b/conf/armhf.src deleted file mode 100644 index 1557b41..0000000 --- a/conf/armhf.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_armv7.tar.gz -SOURCE_SUM=c8298754e7abd0461ca014bb939e2f34af1fd88b34e8d8329c50af321b8a155d -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false diff --git a/conf/systemd.service b/conf/systemd.service index 9474502..440cb14 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Navidrome: Music Server and Streamer compatible with Subsonic/Airsonic +Description=Navidrome: Music Server and Streamer After=remote-fs.target network.target AssertPathExists=__CONFIG_PATH__ diff --git a/manifest.toml b/manifest.toml index 9602673..dc42236 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://www.navidrome.org/docs" code = "https://github.com/deluan/navidrome" [integration] -yunohost = ">= 11.1.7" +yunohost = ">= 11.1.20" architectures = ["amd64", "arm64", "armhf"] multi_instance = false ldap = false @@ -36,7 +36,7 @@ ram.runtime = "50M" [install.init_main_permission] help.en = "You must activate 'Visitors' if you want to connect a client player to Navidrome. This can be changed later via the webadmin." - help.fr = "Vous devez activer 'V'isiteurs' si vous souhaitez connecter un lecteur client à Navidrome. Vous pourrez changer ceci plus tard via la webadmin." + help.fr = "Vous devez activer 'Visiteurs' si vous souhaitez connecter un lecteur client à Navidrome. Vous pourrez changer ceci plus tard via la webadmin." type = "group" default = "visitors" @@ -48,6 +48,18 @@ ram.runtime = "50M" default = "fr" [resources] + +[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" + in_subdir = false + [resources.system_user] [resources.install_dir] diff --git a/scripts/change_url b/scripts/change_url index c0e4dca..200a19e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,63 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -enable_downloads=$(ynh_app_setting_get --app=$app --key=enable_downloads) -scanner_extractor=$(ynh_app_setting_get --app=$app --key=scanner_extractor) -enable_animation=$(ynh_app_setting_get --app=$app --key=enable_animation) -enable_transcoding=$(ynh_app_setting_get --app=$app --key=enable_transcoding) -welcome_message=$(ynh_app_setting_get --app=$app --key=welcome_message) -enable_sharing=$(ynh_app_setting_get --app=$app --key=enable_sharing) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -73,36 +16,14 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated NGINX config - ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi +ynh_change_url_nginx_config #================================================= # MODIFY A CONFIG FILE @@ -127,13 +48,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Version:" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 5f2ce01..fcfb6eb 100644 --- a/scripts/install +++ b/scripts/install @@ -38,7 +38,7 @@ ynh_app_setting_set --app=$app --key=enable_sharing --value=$enable_sharing 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" --source_id=$YNH_ARCH +ynh_setup_source --dest_dir="$install_dir" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 807eee8..30ad5b7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,7 +76,7 @@ then ynh_secure_remove --file=$install_dir # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --source_id=$YNH_ARCH + ynh_setup_source --dest_dir="$install_dir" fi chmod 750 "$install_dir" From bd851fa591c901516c650d452e5e06acb399cf95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 14:58:18 +0100 Subject: [PATCH 02/24] cleaning --- manifest.toml | 4 ++-- scripts/change_url | 2 +- scripts/install | 3 +-- scripts/remove | 17 ----------------- scripts/restore | 20 +------------------- scripts/upgrade | 25 ++++++------------------- 6 files changed, 11 insertions(+), 60 deletions(-) diff --git a/manifest.toml b/manifest.toml index dc42236..8e1d531 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ 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 @@ -43,7 +43,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" diff --git a/scripts/change_url b/scripts/change_url index 200a19e..1c33c62 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ 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="$config_path/navidrome.toml" chmod 600 "$config_path/navidrome.toml" chown -R $app:$app "$config_path" diff --git a/scripts/install b/scripts/install index fcfb6eb..8d6232d 100644 --- a/scripts/install +++ b/scripts/install @@ -40,7 +40,6 @@ 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" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -72,7 +71,7 @@ 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" 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..3a7c4af 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 #================================================= @@ -46,10 +38,7 @@ 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" @@ -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..26566c4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,7 +79,6 @@ 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" @@ -91,6 +90,11 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # 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" + #================================================= # UPDATE A CONFIG FILE #================================================= @@ -99,28 +103,11 @@ 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" +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="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" - #================================================= # START SYSTEMD SERVICE #================================================= From 682101412b9261b86b55434a8a91370bbbaa4372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 15:01:18 +0100 Subject: [PATCH 03/24] cleaning --- doc/ADMIN.md | 4 ---- doc/ADMIN_fr.md | 4 ---- doc/PRE_INSTALL.md | 1 + doc/PRE_INSTALL_fr.md | 1 + scripts/install | 22 +++++----------------- 5 files changed, 7 insertions(+), 25 deletions(-) create mode 100644 doc/PRE_INSTALL.md create mode 100644 doc/PRE_INSTALL_fr.md 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/scripts/install b/scripts/install index 8d6232d..c860b72 100644 --- a/scripts/install +++ b/scripts/install @@ -51,6 +51,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" + #================================================= # SPECIFIC SETUP #================================================= @@ -76,23 +81,6 @@ ynh_add_config --template="navidrome.toml" --destination="$config_path/navidrome 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 #================================================= From 76724f6ba66ce6a7c21a0d16df168520863d283f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 29 Oct 2023 16:53:17 +0100 Subject: [PATCH 04/24] Update install --- scripts/install | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index c860b72..33532a9 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,6 +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" +mkdir -p "$config_path" + chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -70,11 +74,6 @@ 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="navidrome.toml" --destination="$config_path/navidrome.toml" From 257699cb56a13d6b137ac3f8d1b62008b943aee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:17:07 +0100 Subject: [PATCH 05/24] cleaning --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 33532a9..c961961 100644 --- a/scripts/install +++ b/scripts/install @@ -58,7 +58,7 @@ 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" +yunohost service add $app --description="Web-based music collection server and streamer" --log="/var/log/$app/$app.log" #================================================= # SPECIFIC SETUP diff --git a/scripts/restore b/scripts/restore index 3a7c4af..60f8c4e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -40,7 +40,7 @@ systemctl enable $app.service --quiet 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 diff --git a/scripts/upgrade b/scripts/upgrade index 26566c4..18305a6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,7 +93,7 @@ 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" +yunohost service add $app --description="Web-based music collection server and streamer" --log="/var/log/$app/$app.log" #================================================= # UPDATE A CONFIG FILE From 6b05a4160f46e827db829ec2cfd3c72fc1a77e54 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 12 Nov 2023 20:17:12 +0000 Subject: [PATCH 06/24] Auto-update README --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4a69c2b..e6dab60 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.49.3~ynh3 **Demo:** https://demo.navidrome.org/app/#/login @@ -45,7 +45,7 @@ Navidrome indexes all digital music stored in your hard drive and makes it avail * Official app website: * Official admin documentation: * Upstream app code repository: -* YunoHost documentation for this app: +* YunoHost Store: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index 8e621e2..6d5b740 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.49.3~ynh3 **Démo :** https://demo.navidrome.org/app/#/login @@ -44,7 +44,7 @@ Navidrome indexe toute la musique numérique stockée sur votre disque dur et la * Site officiel de l’app : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : -* Documentation YunoHost pour cette app : +* YunoHost Store: * Signaler un bug : ## Informations pour les développeurs From 01fa45bd8c993ffda4143c6e964466837e310e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:17:31 +0100 Subject: [PATCH 07/24] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index 5a08f03..6664be1 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.d7eb59fd.name = "Upgrade from 0.47.0~ynh1" From 167e742e736c6bcb0eda73e8ef78f10078db7ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:19:59 +0100 Subject: [PATCH 08/24] fix --- scripts/restore | 2 +- scripts/upgrade | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/restore b/scripts/restore index 60f8c4e..b0f524f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -28,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 diff --git a/scripts/upgrade b/scripts/upgrade index 18305a6..2494e54 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,9 +83,9 @@ 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 @@ -98,15 +98,13 @@ yunohost service add $app --description="Web-based music collection server and s #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." - -config_path="/var/lib/$app" +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="$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" #================================================= # START SYSTEMD SERVICE From 2d16d8ebbe924c47b4b49be74bb17729bfd424a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:21:23 +0100 Subject: [PATCH 09/24] cleaning --- conf/systemd.service | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From a9b7aa76310921fc243fb1b7b37df38020d0fc23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:22:25 +0100 Subject: [PATCH 10/24] Update change_url --- scripts/change_url | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 1c33c62..b2f3668 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,12 +30,11 @@ 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="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" +chmod 600 "/var/lib/$app/navidrome.toml" chown -R $app:$app "$config_path" #================================================= From 1c4796eb6eeaae5624e7207897ca094aa1e704b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 08:17:54 +0100 Subject: [PATCH 11/24] Update manifest.toml --- manifest.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manifest.toml b/manifest.toml index 7e5e69d..a90e349 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,8 +20,11 @@ code = "https://github.com/deluan/navidrome" yunohost = ">= 11.2" architectures = ["amd64", "arm64", "armhf"] multi_instance = false + ldap = false + sso = true + disk = "50M" ram.build = "50M" ram.runtime = "50M" From 1f3eb77a31d1256be70adbd36f2c55a503828709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 08:22:41 +0100 Subject: [PATCH 12/24] Update manifest.toml --- manifest.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/manifest.toml b/manifest.toml index a90e349..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~ynh3" +version = "0.50.0~ynh1" maintainers = ["eric_G"] @@ -55,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] From a4362014d353b9149214dcdc8e9082211faa6ee6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 17 Nov 2023 07:22:46 +0000 Subject: [PATCH 13/24] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e6dab60..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~ynh3 +**Shipped version:** 0.50.0~ynh1 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index 6d5b740..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~ynh3 +**Version incluse :** 0.50.0~ynh1 **Démo :** https://demo.navidrome.org/app/#/login From 9bfea35fb2a3b51362d1574cdabdb635e6bba2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 08:26:04 +0100 Subject: [PATCH 14/24] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index 6664be1..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" From 05f4b2aa87fe76c52b26a2f3d937248e4781f7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:00:29 +0100 Subject: [PATCH 15/24] Update change_url --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index b2f3668..3536590 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -35,7 +35,7 @@ path_url="$new_path" ynh_add_config --template="navidrome.toml" --destination="/var/lib/$app/navidrome.toml" chmod 600 "/var/lib/$app/navidrome.toml" -chown -R $app:$app "$config_path" +chown -R $app:$app "/var/lib/$app/navidrome.toml" #================================================= # GENERIC FINALISATION From 8e0075eb92d0805a95426e81cc03fcbcf431b81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:03:21 +0100 Subject: [PATCH 16/24] fix --- scripts/change_url | 2 +- scripts/install | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 3536590..70da1ad 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -35,7 +35,7 @@ path_url="$new_path" 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/navidrome.toml" +chown -R $app:$app "/var/lib/$app" #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index c961961..b9ab0e7 100644 --- a/scripts/install +++ b/scripts/install @@ -42,7 +42,7 @@ 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" -mkdir -p "$config_path" +mkdir -p "/var/lib/$app" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -75,10 +75,10 @@ ynh_multimedia_build_main_dir ynh_script_progression --message="Adding a configuration file..." --weight=1 # Main config File -ynh_add_config --template="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" #================================================= # START SYSTEMD SERVICE From 03267129b56256d02a7dbdc26e7b490ab2ee8459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:11:14 +0100 Subject: [PATCH 17/24] Revert "fix" This reverts commit 8e0075eb92d0805a95426e81cc03fcbcf431b81c. --- scripts/change_url | 2 +- scripts/install | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 70da1ad..3536590 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -35,7 +35,7 @@ path_url="$new_path" 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" +chown -R $app:$app "/var/lib/$app/navidrome.toml" #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index b9ab0e7..c961961 100644 --- a/scripts/install +++ b/scripts/install @@ -42,7 +42,7 @@ 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" -mkdir -p "/var/lib/$app" +mkdir -p "$config_path" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -75,10 +75,10 @@ ynh_multimedia_build_main_dir ynh_script_progression --message="Adding a configuration file..." --weight=1 # Main config File -ynh_add_config --template="navidrome.toml" --destination="/var/lib/$app/navidrome.toml" +ynh_add_config --template="navidrome.toml" --destination="$config_path/navidrome.toml" -chmod 600 "/var/lib/$app/navidrome.toml" -chown -R $app:$app "/var/lib/$app/navidrome.toml" +chmod 600 "$config_path/navidrome.toml" +chown -R $app:$app "$config_path" #================================================= # START SYSTEMD SERVICE From 7a565c18c80c2707c0c268a375f624efe6b176c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:05:17 +0100 Subject: [PATCH 18/24] Update navidrome.toml --- conf/navidrome.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/navidrome.toml b/conf/navidrome.toml index 8891bcf..860ab4b 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -26,7 +26,7 @@ TranscodingCacheSize = "150MB" ImageCacheSize = "100MB" # Folder to store application data (DB, cache…) -DataFolder = "__CONFIG_PATH__" +DataFolder = "/var/lib/__APP__/" # Folder where your music library is stored. Can be read-only MusicFolder = "/home/yunohost.multimedia/share/Music" From 9b342e6af96ed111c30873ac52b343e04161be1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:05:25 +0100 Subject: [PATCH 19/24] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 2dff503..125c2e3 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.50.0~ynh1" +version = "0.50.0~ynh2" maintainers = ["eric_G"] From 818b6912d02d7bd215b80adab8fc8c95c51f0828 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 17 Nov 2023 13:05:30 +0000 Subject: [PATCH 20/24] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e820c7..00b972f 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.50.0~ynh1 +**Shipped version:** 0.50.0~ynh2 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index 00f3a76..cd6353b 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.50.0~ynh1 +**Version incluse :** 0.50.0~ynh2 **Démo :** https://demo.navidrome.org/app/#/login From b6bfabefe8d7f4b01a6aba0e7959e020422b1b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Nov 2023 18:46:16 +0100 Subject: [PATCH 21/24] Update navidrome.toml --- conf/navidrome.toml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/conf/navidrome.toml b/conf/navidrome.toml index 860ab4b..6d22e0d 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -113,5 +113,23 @@ ReverseProxyUserHeader = "remote-user" ReverseProxyWhitelist = "0.0.0.0/0" # Path to ffmpeg executable. Use it when Navidrome cannot find it, or you want to use a specific version -FFmpegPath = "" +FFmpegPath = "/usr/bin/ffmpeg" +# Enable/Disable Jukebox mode +#Jukebox.Enabled = true + +#MPVPath = "/path/to/mpv" + +# List of registered devices, syntax: +# "symbolic name " - Symbolic name to be used in UI's +# "device" - MPV audio device name, do mpv --audio-device=help to get a list + +#Jukebox.Devices = [ +# # "symbolic name " "device" +# [ "internal", "coreaudio/BuiltInSpeakerDevice" ], +# [ "dac", "coreaudio/AppleUSBAudioEngine:Cambridge Audio :Cambridge Audio USB Audio 1.0:0000:1" ] +#] + +# Device to use for Jukebox mode, if there are multiple entries above. +# Using device "auto" if missing +#Jukebox.Default = "dac" From 5c12845ca93c88ea8c984c992839f384f820b1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 5 Dec 2023 09:45:05 +0100 Subject: [PATCH 22/24] Update upgrade --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2494e54..37cfceb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,13 +98,13 @@ yunohost service add $app --description="Web-based music collection server and s #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=2 +#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" +#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" +#chmod 600 "/var/lib/$app/navidrome.toml" +#chown -R $app:$app "/var/lib/$app" #================================================= # START SYSTEMD SERVICE From 4ca32fdaf5bb384c05703cfe768a99139278f123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:03:16 +0100 Subject: [PATCH 23/24] remove maintenance --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 125c2e3..2479ed2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Serveur de musique moderne et Streamer compatibles avec Subson version = "0.50.0~ynh2" -maintainers = ["eric_G"] +maintainers = [] [upstream] license = "GPL-3.0-only" From e365057bdcb0e250e72aeea4676de788f0332e68 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 15 Feb 2024 04:45:15 +0100 Subject: [PATCH 24/24] autoupdate.strategy = "latest_github_release" --- manifest.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/manifest.toml b/manifest.toml index 2479ed2..e98fe30 100644 --- a/manifest.toml +++ b/manifest.toml @@ -62,6 +62,11 @@ ram.runtime = "50M" 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 + + autoupdate.strategy = "latest_github_release" + autoupdate.asset.amd64 = "^navidrome_.*_linux_amd64.tar.gz$" + autoupdate.asset.arm64 = "^navidrome_.*_linux_arm64.tar.gz$" + autoupdate.asset.armhf = "^navidrome_.*_linux_armv7.tar.gz$" [resources.system_user]