From 23b9365fa04af254f902dd71f5be428b408ccffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 19 Aug 2021 17:12:03 +0200 Subject: [PATCH 01/21] Upgrade to 0.45.0 (#64) * Upgrade to 0.45.0 --- README.md | 2 +- README_fr.md | 2 +- conf/arm64.src | 4 ++-- conf/armv5.src | 4 ++-- conf/armv6.src | 4 ++-- conf/armv7.src | 4 ++-- conf/i386.src | 4 ++-- conf/x86-64.src | 4 ++-- manifest.json | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index de27a09..042a933 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Modern Music Server and Streamer compatible with Subsonic/Airsonic -**Shipped version:** 0.44.1~ynh2 +**Shipped version:** 0.45.0~ynh1 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index c14fbf1..fb6a3dd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic -**Version incluse :** 0.44.1~ynh2 +**Version incluse :** 0.45.0~ynh1 **Démo :** https://demo.navidrome.org/app/#/login diff --git a/conf/arm64.src b/conf/arm64.src index 68af918..9888c62 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.44.1/navidrome_0.44.1_Linux_arm64.tar.gz -SOURCE_SUM=4506f60cbb9f2205f7e3ef850570e8b3a2c9346983a6bfdec632b13586970f9c +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_arm64.tar.gz +SOURCE_SUM=768cc98a2f24e51c3868e2408f0f2897713fd10b8a22f37b911a849302c3feaf SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv5.src b/conf/armv5.src index 2ec0eda..69cb517 100644 --- a/conf/armv5.src +++ b/conf/armv5.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.44.1/navidrome_0.44.1_Linux_armv5.tar.gz -SOURCE_SUM=8704681a7f2a6588aa59b71353f0107c79c0faa42f0e18b24193ec505bb4feca +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_armv5.tar.gz +SOURCE_SUM=c5a023e9306f70c68849d4734e680746db572f5475bba2031b05768ff3c9da2f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv6.src b/conf/armv6.src index 4229a09..9286e58 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.44.1/navidrome_0.44.1_Linux_armv6.tar.gz -SOURCE_SUM=cc5011017d3e9479564a4be3008196333f5a76466ca63e42e99040a065bd973d +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_armv6.tar.gz +SOURCE_SUM=3a6ac2a1c9bd984691490c948941c2187620322b89da68d5c8016a67d82df567 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv7.src b/conf/armv7.src index 98cf830..9b88eb3 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.44.1/navidrome_0.44.1_Linux_armv7.tar.gz -SOURCE_SUM=af54bbfaf8f3cc572c7b1b2eb1204a3e76d3cdcf4a7b2bf89d79b2d6844d3085 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_armv7.tar.gz +SOURCE_SUM=a5d59d262ec727398f304d0b36128abe6d4b6aec47f89aa4b42c57567972533d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/i386.src b/conf/i386.src index 4cdf376..33d0bd3 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.44.1/navidrome_0.44.1_Linux_i386.tar.gz -SOURCE_SUM=8660db38cdb505f15f04ce2138b344d2988896b17ed8aa808df967f54e7031ad +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_i386.tar.gz +SOURCE_SUM=3f3e7148e02a5577a2e9e906d9c5f4d20195592ba4073098bdf8f6567319a318 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/x86-64.src b/conf/x86-64.src index 9cc7384..0acae39 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.44.1/navidrome_0.44.1_Linux_x86_64.tar.gz -SOURCE_SUM=da59e3e9a34b3de2f0c60c9151014e4090ec39232ef416a77b3f1130c42cef86 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_x86_64.tar.gz +SOURCE_SUM=a5028580afe74b882ac611fa08be93c215320bf7939acfadfd0aac5e834346c7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index 2fb9479..7203bdf 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" }, - "version": "0.44.1~ynh2", + "version": "0.45.0~ynh1", "url": "https://www.navidrome.org", "upstream": { "license": "free", From 6d85ad5a1467623ff7d5fa6d1d6f191eb0e8d9e6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 26 Aug 2021 07:25:09 +0200 Subject: [PATCH 02/21] O.45.1 --- conf/arm64.src | 4 ++-- conf/armv5.src | 4 ++-- conf/armv6.src | 4 ++-- conf/armv7.src | 4 ++-- conf/i386.src | 4 ++-- conf/x86-64.src | 4 ++-- manifest.json | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/conf/arm64.src b/conf/arm64.src index 9888c62..2bff1ec 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_arm64.tar.gz -SOURCE_SUM=768cc98a2f24e51c3868e2408f0f2897713fd10b8a22f37b911a849302c3feaf +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_arm64.tar.gz +SOURCE_SUM=55ad034a67a68fc86c6b2c283fa58aa3fc7e410cd23701c2a54e155ace65a5b2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv5.src b/conf/armv5.src index 69cb517..0ac134a 100644 --- a/conf/armv5.src +++ b/conf/armv5.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_armv5.tar.gz -SOURCE_SUM=c5a023e9306f70c68849d4734e680746db572f5475bba2031b05768ff3c9da2f +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_armv5.tar.gz +SOURCE_SUM=c73cdc0418d120ccd95a95c50a3b925bad5a8c76922074eccecdd1c1596e41a7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv6.src b/conf/armv6.src index 9286e58..545b376 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_armv6.tar.gz -SOURCE_SUM=3a6ac2a1c9bd984691490c948941c2187620322b89da68d5c8016a67d82df567 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_armv6.tar.gz +SOURCE_SUM=49b752ef6b7078b0ae12e6b8ef5aa936abc3cba26499aa4ea6aea448aa9053c8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv7.src b/conf/armv7.src index 9b88eb3..0711866 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_armv7.tar.gz -SOURCE_SUM=a5d59d262ec727398f304d0b36128abe6d4b6aec47f89aa4b42c57567972533d +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_armv7.tar.gz +SOURCE_SUM=baa86452c8d7a48d67145b22eb4fcfa56042172dc4a9f1d3a2328b7d2076e7d1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/i386.src b/conf/i386.src index 33d0bd3..0a65445 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_i386.tar.gz -SOURCE_SUM=3f3e7148e02a5577a2e9e906d9c5f4d20195592ba4073098bdf8f6567319a318 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_i386.tar.gz +SOURCE_SUM=e9615dc5574c5368c3a0ea457277b8ed35df737de9a2e9f46b0c3934864928c2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/x86-64.src b/conf/x86-64.src index 0acae39..6e4c4de 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.0/navidrome_0.45.0_Linux_x86_64.tar.gz -SOURCE_SUM=a5028580afe74b882ac611fa08be93c215320bf7939acfadfd0aac5e834346c7 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_x86_64.tar.gz +SOURCE_SUM=4d9717ab9d6c2a878b3e6711a6fe1520b0e64ba76c4bb971949cd30c7d2d1163 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index 7203bdf..2afd771 100644 --- a/manifest.json +++ b/manifest.json @@ -6,10 +6,10 @@ "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" }, - "version": "0.45.0~ynh1", + "version": "0.45.1~ynh1", "url": "https://www.navidrome.org", "upstream": { - "license": "free", + "license": "GPL-3.0-only", "website": "https://www.navidrome.org", "demo": "https://demo.navidrome.org/app/#/login", "admindoc": "https://www.navidrome.org/docs", From 276666339479514d353adcfacc895e68b589239c Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 26 Aug 2021 05:25:15 +0000 Subject: [PATCH 03/21] 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 042a933..44b47ba 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Modern Music Server and Streamer compatible with Subsonic/Airsonic -**Shipped version:** 0.45.0~ynh1 +**Shipped version:** 0.45.1~ynh1 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index fb6a3dd..120e2d9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic -**Version incluse :** 0.45.0~ynh1 +**Version incluse :** 0.45.1~ynh1 **Démo :** https://demo.navidrome.org/app/#/login From 55033ef839633ad896c507a746caad468248a383 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 4 Sep 2021 22:29:55 +0200 Subject: [PATCH 04/21] Add description --- doc/DESCRIPTION.md | 2 ++ doc/DESCRIPTION_fr.md | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DESCRIPTION_fr.md diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..0afcc5e --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,2 @@ +Navidrome a software that allows you to listen to your own digital music in the same way you would with services like Spotify, Apple Music and others. It also allows you to easily share your music and playlists with your friends and family.s +Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists \ No newline at end of file diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..d524c6c --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,2 @@ +Navidrome un logiciel qui vous permet d'écouter votre propre musique numérique de la même manière que vous le feriez avec des services comme Spotify, Apple Music et autres. Il vous permet également de partager facilement votre musique et vos listes de lecture avec vos amis et votre famille. +Navidrome indexe toute la musique numérique stockée sur votre disque dur et la rend disponible via un agréable lecteur Web et également en utilisant n'importe quel client mobile compatible Subsonic-API. Votre musique devient consultable et vous pouvez créer des listes de lecture, évaluer et « favori » vos morceaux, albums et artistes préférés From 4986a93dc7bfca0198bc4155fe16012802c06c36 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 4 Sep 2021 20:30:03 +0000 Subject: [PATCH 05/21] Auto-update README --- README.md | 3 ++- README_fr.md | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44b47ba..6d3c487 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Modern Music Server and Streamer compatible with Subsonic/Airsonic +Navidrome a software that allows you to listen to your own digital music in the same way you would with services like Spotify, Apple Music and others. It also allows you to easily share your music and playlists with your friends and family.s +Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists **Shipped version:** 0.45.1~ynh1 diff --git a/README_fr.md b/README_fr.md index 120e2d9..3f72b70 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,9 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic +Navidrome un logiciel qui vous permet d'écouter votre propre musique numérique de la même manière que vous le feriez avec des services comme Spotify, Apple Music et autres. Il vous permet également de partager facilement votre musique et vos listes de lecture avec vos amis et votre famille. +Navidrome indexe toute la musique numérique stockée sur votre disque dur et la rend disponible via un agréable lecteur Web et également en utilisant n'importe quel client mobile compatible Subsonic-API. Votre musique devient consultable et vous pouvez créer des listes de lecture, évaluer et « favori » vos morceaux, albums et artistes préférés + **Version incluse :** 0.45.1~ynh1 From d1bfd59a4ac94bf8557390c1a45f32b4a5ccf233 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 4 Sep 2021 22:32:00 +0200 Subject: [PATCH 06/21] Cleaning up --- check_process | 2 +- scripts/restore | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/check_process b/check_process index 8986592..2c86312 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" - path="/" + path="/path" is_public=1 port="4533" ; Checks diff --git a/scripts/restore b/scripts/restore index 300e178..cc75277 100644 --- a/scripts/restore +++ b/scripts/restore @@ -36,8 +36,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " From 5daa75605566fcda23d889977b88a42143e5e2ff Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Sep 2021 10:25:46 +0200 Subject: [PATCH 07/21] Update manifest.json --- manifest.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 2afd771..b3f1b2d 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.2.4" }, "multi_instance": false, "services": [ @@ -31,8 +31,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", From 192904c2bd7f73e25cc2ea0940d50afe62581ebc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Sep 2021 10:31:11 +0200 Subject: [PATCH 08/21] Add auto updates --- .github/workflows/updater.sh | 144 ++++++++++++++++++++++++++++++++++ .github/workflows/updater.yml | 48 ++++++++++++ conf/arm64.src | 3 +- conf/armv5.src | 3 +- conf/armv6.src | 3 +- conf/armv7.src | 3 +- conf/i386.src | 3 +- 7 files changed, 197 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/updater.sh create mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh new file mode 100644 index 0000000..dbc541d --- /dev/null +++ b/.github/workflows/updater.sh @@ -0,0 +1,144 @@ +#!/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_i386.tar.gz) + src="i386" + ;; + 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 +#================================================= + +# Install moreutils, needed for sponge +sudo apt-get install moreutils + +# 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 new file mode 100644 index 0000000..ca77fed --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,48 @@ +# 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 }} + delete-branch: true + title: 'Upgrade to version ${{ env.VERSION }}' + body: | + Upgrade to v${{ env.VERSION }} + draft: false diff --git a/conf/arm64.src b/conf/arm64.src index 2bff1ec..ead7b20 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -2,5 +2,4 @@ SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidro SOURCE_SUM=55ad034a67a68fc86c6b2c283fa58aa3fc7e410cd23701c2a54e155ace65a5b2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= \ No newline at end of file +SOURCE_IN_SUBDIR=false \ No newline at end of file diff --git a/conf/armv5.src b/conf/armv5.src index 0ac134a..73eff29 100644 --- a/conf/armv5.src +++ b/conf/armv5.src @@ -2,5 +2,4 @@ SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidro SOURCE_SUM=c73cdc0418d120ccd95a95c50a3b925bad5a8c76922074eccecdd1c1596e41a7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= \ No newline at end of file +SOURCE_IN_SUBDIR=false \ No newline at end of file diff --git a/conf/armv6.src b/conf/armv6.src index 545b376..d175240 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -2,5 +2,4 @@ SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidro SOURCE_SUM=49b752ef6b7078b0ae12e6b8ef5aa936abc3cba26499aa4ea6aea448aa9053c8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= \ No newline at end of file +SOURCE_IN_SUBDIR=false \ No newline at end of file diff --git a/conf/armv7.src b/conf/armv7.src index 0711866..115b2b3 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -2,5 +2,4 @@ SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidro SOURCE_SUM=baa86452c8d7a48d67145b22eb4fcfa56042172dc4a9f1d3a2328b7d2076e7d1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= \ No newline at end of file +SOURCE_IN_SUBDIR=false \ No newline at end of file diff --git a/conf/i386.src b/conf/i386.src index 0a65445..06e56a1 100644 --- a/conf/i386.src +++ b/conf/i386.src @@ -2,5 +2,4 @@ SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidro SOURCE_SUM=e9615dc5574c5368c3a0ea457277b8ed35df737de9a2e9f46b0c3934864928c2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= \ No newline at end of file +SOURCE_IN_SUBDIR=false \ No newline at end of file From 33d5e1cd3207f167684d80584a7173e9af88a35a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 7 Oct 2021 12:52:59 +0200 Subject: [PATCH 09/21] 0.46.0 (#67) * 0.46.0 --- .github/workflows/updater.sh | 6 ------ .github/workflows/updater.yml | 1 + README.md | 3 +-- README_fr.md | 3 +-- conf/arm64.src | 6 +++--- conf/armv5.src | 6 +++--- conf/armv6.src | 6 +++--- conf/armv7.src | 6 +++--- conf/i386.src | 5 ----- conf/x86-64.src | 5 ++--- manifest.json | 3 +-- scripts/_common.sh | 4 +--- scripts/backup | 3 --- scripts/install | 3 --- scripts/restore | 3 --- scripts/upgrade | 1 - 16 files changed, 19 insertions(+), 45 deletions(-) delete mode 100644 conf/i386.src diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index dbc541d..cda04b4 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -75,9 +75,6 @@ case $asset_url in navidrome_"*"_Linux_arm64.tar.gz navidrome_"*"_Linux_armv7.tar.gz) src="armv7" ;; - navidrome_"*"_Linux_i386.tar.gz) - src="i386" - ;; navidrome_"*"_Linux_x86_64.tar.gz) src="x86-64" ;; @@ -131,9 +128,6 @@ done # GENERIC FINALIZATION #================================================= -# Install moreutils, needed for sponge -sudo apt-get install moreutils - # Replace new version in manifest echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index ca77fed..fd6ed60 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -41,6 +41,7 @@ jobs: author: 'yunohost-bot ' signoff: false branch: ci-auto-update-v${{ env.VERSION }} + base: testing delete-branch: true title: 'Upgrade to version ${{ env.VERSION }}' body: | diff --git a/README.md b/README.md index 6d3c487..a44959f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Navidrome a software that allows you to listen to your own digital music in the same way you would with services like Spotify, Apple Music and others. It also allows you to easily share your music and playlists with your friends and family.s Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists -**Shipped version:** 0.45.1~ynh1 +**Shipped version:** 0.46.0~ynh1 **Demo:** https://demo.navidrome.org/app/#/login @@ -43,7 +43,6 @@ You must activate *public site* if you want to connect a client player to Navidr ## Documentation and resources * Official app website: https://www.navidrome.org -* Official user documentation: https://yunohost.org/en/app_navidrome * Official admin documentation: https://www.navidrome.org/docs * Upstream app code repository: https://github.com/deluan/navidrome * YunoHost documentation for this app: https://yunohost.org/app_navidrome diff --git a/README_fr.md b/README_fr.md index 3f72b70..16f6a40 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,7 +15,7 @@ Navidrome un logiciel qui vous permet d'écouter votre propre musique numérique Navidrome indexe toute la musique numérique stockée sur votre disque dur et la rend disponible via un agréable lecteur Web et également en utilisant n'importe quel client mobile compatible Subsonic-API. Votre musique devient consultable et vous pouvez créer des listes de lecture, évaluer et « favori » vos morceaux, albums et artistes préférés -**Version incluse :** 0.45.1~ynh1 +**Version incluse :** 0.46.0~ynh1 **Démo :** https://demo.navidrome.org/app/#/login @@ -40,7 +40,6 @@ Vous devez activer *site public* si vous souhaitez connecter un lecteur client ## Documentations et ressources * Site officiel de l'app : https://www.navidrome.org -* Documentation officielle utilisateur : https://yunohost.org/en/app_navidrome * Documentation officielle de l'admin : https://www.navidrome.org/docs * Dépôt de code officiel de l'app : https://github.com/deluan/navidrome * Documentation YunoHost pour cette app : https://yunohost.org/app_navidrome diff --git a/conf/arm64.src b/conf/arm64.src index ead7b20..1b07b2d 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_arm64.tar.gz -SOURCE_SUM=55ad034a67a68fc86c6b2c283fa58aa3fc7e410cd23701c2a54e155ace65a5b2 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_arm64.tar.gz +SOURCE_SUM=2a6e7c04c7369e0bfa08ba9790da432310be9c56ff7dbbf3ee2045d3fc4d72c5 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false \ No newline at end of file +SOURCE_IN_SUBDIR=false diff --git a/conf/armv5.src b/conf/armv5.src index 73eff29..93f6243 100644 --- a/conf/armv5.src +++ b/conf/armv5.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_armv5.tar.gz -SOURCE_SUM=c73cdc0418d120ccd95a95c50a3b925bad5a8c76922074eccecdd1c1596e41a7 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_armv5.tar.gz +SOURCE_SUM=9ffe050c91d0504b472f894ec73ceb95e2c1bc57e83df2e75d6cb8e17d0587eb SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false \ No newline at end of file +SOURCE_IN_SUBDIR=false diff --git a/conf/armv6.src b/conf/armv6.src index d175240..76dcc86 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_armv6.tar.gz -SOURCE_SUM=49b752ef6b7078b0ae12e6b8ef5aa936abc3cba26499aa4ea6aea448aa9053c8 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_armv6.tar.gz +SOURCE_SUM=653d07d94d6add4dcce09204578167ff9a94c828298f43fc9a16943cf819f14f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false \ No newline at end of file +SOURCE_IN_SUBDIR=false diff --git a/conf/armv7.src b/conf/armv7.src index 115b2b3..3d4ec16 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_armv7.tar.gz -SOURCE_SUM=baa86452c8d7a48d67145b22eb4fcfa56042172dc4a9f1d3a2328b7d2076e7d1 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_armv7.tar.gz +SOURCE_SUM=8cb14112f49f32fde66e8d7da8651d6b7f1304106707428902a20292f8b529de SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false \ No newline at end of file +SOURCE_IN_SUBDIR=false diff --git a/conf/i386.src b/conf/i386.src deleted file mode 100644 index 06e56a1..0000000 --- a/conf/i386.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_i386.tar.gz -SOURCE_SUM=e9615dc5574c5368c3a0ea457277b8ed35df737de9a2e9f46b0c3934864928c2 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false \ No newline at end of file diff --git a/conf/x86-64.src b/conf/x86-64.src index 6e4c4de..396468c 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,6 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.45.1/navidrome_0.45.1_Linux_x86_64.tar.gz -SOURCE_SUM=4d9717ab9d6c2a878b3e6711a6fe1520b0e64ba76c4bb971949cd30c7d2d1163 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_x86_64.tar.gz +SOURCE_SUM=6da0524199e5702e73abbc0a59b89af3110ca99b828249ffcf2416c2d7c79ffc SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false -SOURCE_FILENAME= \ No newline at end of file diff --git a/manifest.json b/manifest.json index b3f1b2d..38e6a08 100644 --- a/manifest.json +++ b/manifest.json @@ -6,14 +6,13 @@ "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" }, - "version": "0.45.1~ynh1", + "version": "0.46.0~ynh1", "url": "https://www.navidrome.org", "upstream": { "license": "GPL-3.0-only", "website": "https://www.navidrome.org", "demo": "https://demo.navidrome.org/app/#/login", "admindoc": "https://www.navidrome.org/docs", - "userdoc": "https://yunohost.org/en/app_navidrome", "code": "https://github.com/deluan/navidrome" }, "license": "GPL-3.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index 5e393bf..b4b81b0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -29,9 +29,7 @@ pkg_dependencies="ffmpeg" ynh_detect_arch(){ local architecture if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" - elif [ -n "$(uname -m | grep 86)" ]; then - architecture="i386" + architecture="arm64" elif [ -n "$(uname -m | grep 64)" ]; then architecture="x86-64" elif [ -n "$(uname -m | grep armv7)" ]; then diff --git a/scripts/backup b/scripts/backup index 425d53f..5c650a0 100644 --- a/scripts/backup +++ b/scripts/backup @@ -14,9 +14,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/install b/scripts/install index 68f0473..fc7f598 100644 --- a/scripts/install +++ b/scripts/install @@ -13,9 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ynh_clean_check_starting -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/restore b/scripts/restore index cc75277..9518ed0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -14,9 +14,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ynh_clean_check_starting -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/upgrade b/scripts/upgrade index d102875..eeea0c8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,7 +25,6 @@ architecture=$(ynh_detect_arch) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) From 8501579bb2ace5370d8abdbc8829f56a3e826f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 19 Nov 2021 09:12:10 +0100 Subject: [PATCH 10/21] 0.47.0 (#69) * 0.47.0 --- README.md | 2 +- README_fr.md | 2 +- conf/arm64.src | 4 ++-- conf/armv5.src | 4 ++-- conf/armv6.src | 4 ++-- conf/armv7.src | 4 ++-- conf/navidrome.toml | 3 +++ conf/nginx.conf | 5 ----- conf/x86-64.src | 4 ++-- manifest.json | 4 ++-- scripts/install | 2 -- 11 files changed, 17 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index a44959f..6d9252e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Navidrome a software that allows you to listen to your own digital music in the same way you would with services like Spotify, Apple Music and others. It also allows you to easily share your music and playlists with your friends and family.s Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists -**Shipped version:** 0.46.0~ynh1 +**Shipped version:** 0.47.0~ynh1 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index 16f6a40..d5a6251 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,7 +15,7 @@ Navidrome un logiciel qui vous permet d'écouter votre propre musique numérique Navidrome indexe toute la musique numérique stockée sur votre disque dur et la rend disponible via un agréable lecteur Web et également en utilisant n'importe quel client mobile compatible Subsonic-API. Votre musique devient consultable et vous pouvez créer des listes de lecture, évaluer et « favori » vos morceaux, albums et artistes préférés -**Version incluse :** 0.46.0~ynh1 +**Version incluse :** 0.47.0~ynh1 **Démo :** https://demo.navidrome.org/app/#/login diff --git a/conf/arm64.src b/conf/arm64.src index 1b07b2d..0ab64e0 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_arm64.tar.gz -SOURCE_SUM=2a6e7c04c7369e0bfa08ba9790da432310be9c56ff7dbbf3ee2045d3fc4d72c5 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_arm64.tar.gz +SOURCE_SUM=1488ebc3e0412573a387502855d7cf64875c0f2939c92ff3283d4efaedf56251 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv5.src b/conf/armv5.src index 93f6243..9140d91 100644 --- a/conf/armv5.src +++ b/conf/armv5.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_armv5.tar.gz -SOURCE_SUM=9ffe050c91d0504b472f894ec73ceb95e2c1bc57e83df2e75d6cb8e17d0587eb +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv5.tar.gz +SOURCE_SUM=c49157f71efbc4d05e3aea90dfd9a39ad9fe5ad23694894fcd2fdde87e379783 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv6.src b/conf/armv6.src index 76dcc86..221b2ef 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_armv6.tar.gz -SOURCE_SUM=653d07d94d6add4dcce09204578167ff9a94c828298f43fc9a16943cf819f14f +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv6.tar.gz +SOURCE_SUM=9cf4f771a5ad39e31f4b01fe8a276183b754a9d390af16fd5bed48aac7690744 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv7.src b/conf/armv7.src index 3d4ec16..ebf125e 100644 --- a/conf/armv7.src +++ b/conf/armv7.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_armv7.tar.gz -SOURCE_SUM=8cb14112f49f32fde66e8d7da8651d6b7f1304106707428902a20292f8b529de +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv7.tar.gz +SOURCE_SUM=8100c0a02ec6bd9941c3d44433c9fa5e11b49e86a8d5b9fc36f62225a8d0af6f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/navidrome.toml b/conf/navidrome.toml index 43cfc1c..4419bba 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -84,3 +84,6 @@ EnableStarRating = "true" # Enable regular users to edit their details and change their password EnableUserEditing = "true" + +# Enable Navidrome to connect to any external service +EnableExternalServices = "true" diff --git a/conf/nginx.conf b/conf/nginx.conf index 4f09f2d..65c87f7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,5 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } proxy_pass http://127.0.0.1:__PORT__; proxy_redirect off; diff --git a/conf/x86-64.src b/conf/x86-64.src index 396468c..979e940 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.46.0/navidrome_0.46.0_Linux_x86_64.tar.gz -SOURCE_SUM=6da0524199e5702e73abbc0a59b89af3110ca99b828249ffcf2416c2d7c79ffc +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_x86_64.tar.gz +SOURCE_SUM=32806fd9d4c2a2d2e719a64e5162d2718775fa02928cf5d34a41c047a522adc0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index 38e6a08..9917bf6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" }, - "version": "0.46.0~ynh1", + "version": "0.47.0~ynh1", "url": "https://www.navidrome.org", "upstream": { "license": "GPL-3.0-only", @@ -20,7 +20,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ diff --git a/scripts/install b/scripts/install index fc7f598..47fd126 100644 --- a/scripts/install +++ b/scripts/install @@ -149,8 +149,6 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. ynh_permission_update --permission="main" --add="visitors" fi From 521c01229f87678d7217d8b3467537ba4e5b67ca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 16 Dec 2021 00:01:51 +0100 Subject: [PATCH 11/21] Update restore --- scripts/restore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 9518ed0..23281c0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -33,8 +33,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS From 57b5f1a76cb2c8214e4da5c3bc8036cdbf2bb43d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 20 Jan 2022 16:42:18 +0100 Subject: [PATCH 12/21] Add config panel (#71) - Add config panel - Add YNH_ARCH helper --- README.md | 14 ++++++++++++++ README_fr.md | 12 ++++++++++++ conf/{x86-64.src => amd64.src} | 0 conf/{armv7.src => armhf.src} | 0 conf/armv5.src | 5 ----- conf/armv6.src | 5 ----- conf/navidrome.toml | 7 +++++-- config_panel.toml | 32 ++++++++++++++++++++++++++++++++ doc/DESCRIPTION.md | 15 ++++++++++++++- doc/DESCRIPTION_fr.md | 13 +++++++++++++ scripts/_common.sh | 25 ------------------------- scripts/change_url | 4 ++++ scripts/install | 9 ++++++++- scripts/upgrade | 21 ++++++++++++++++++++- 14 files changed, 122 insertions(+), 40 deletions(-) rename conf/{x86-64.src => amd64.src} (100%) rename conf/{armv7.src => armhf.src} (100%) delete mode 100644 conf/armv5.src delete mode 100644 conf/armv6.src create mode 100644 config_panel.toml diff --git a/README.md b/README.md index 6d9252e..69a90ca 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,20 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Navidrome a software that allows you to listen to your own digital music in the same way you would with services like Spotify, Apple Music and others. It also allows you to easily share your music and playlists with your friends and family.s Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists +### Features + +- Handles very large music collections +- Streams virtually any audio format available +- Reads and uses all your beautifully curated metadata +- Great support for compilations (Various Artists albums) and box sets (multi-disc albums) +- Multi-user, each user has their own play counts, playlists, favourites, etc... +- Very low resource usage +- Automatically monitors your library for changes, importing new files and reloading new metadata +- Themeable, modern and responsive Web interface based on Material UI +- Compatible with all Subsonic/Madsonic/Airsonic clients +- Transcoding on the fly. Can be set per user/player. Opus encoding is supported + + **Shipped version:** 0.47.0~ynh1 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index d5a6251..a6f0732 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,6 +14,18 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Navidrome un logiciel qui vous permet d'écouter votre propre musique numérique de la même manière que vous le feriez avec des services comme Spotify, Apple Music et autres. Il vous permet également de partager facilement votre musique et vos listes de lecture avec vos amis et votre famille. Navidrome indexe toute la musique numérique stockée sur votre disque dur et la rend disponible via un agréable lecteur Web et également en utilisant n'importe quel client mobile compatible Subsonic-API. Votre musique devient consultable et vous pouvez créer des listes de lecture, évaluer et « favori » vos morceaux, albums et artistes préférés +### Caractéristiques + +- Gère de très grandes collections de musique +- Streams pratiquement n'importe quel format audio disponible +- Lit et utilise toutes vos métadonnées +- Support pour les compilations (divers albums d'artistes) et les albums multi-disques +- Multi-User, chaque utilisateur a ses propres listes de lecture, favoris etc. +- Utilisation très faible des ressources +- Surveille automatiquement votre bibliothèque pour des modifications, importation de nouveaux fichiers et recharger de nouvelles métadonnées +- Interface Web thématique, moderne et réactive basée sur l'interface utilisateur du matériel +- 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.47.0~ynh1 diff --git a/conf/x86-64.src b/conf/amd64.src similarity index 100% rename from conf/x86-64.src rename to conf/amd64.src diff --git a/conf/armv7.src b/conf/armhf.src similarity index 100% rename from conf/armv7.src rename to conf/armhf.src diff --git a/conf/armv5.src b/conf/armv5.src deleted file mode 100644 index 9140d91..0000000 --- a/conf/armv5.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv5.tar.gz -SOURCE_SUM=c49157f71efbc4d05e3aea90dfd9a39ad9fe5ad23694894fcd2fdde87e379783 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false diff --git a/conf/armv6.src b/conf/armv6.src deleted file mode 100644 index 221b2ef..0000000 --- a/conf/armv6.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv6.tar.gz -SOURCE_SUM=9cf4f771a5ad39e31f4b01fe8a276183b754a9d390af16fd5bed48aac7690744 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=false diff --git a/conf/navidrome.toml b/conf/navidrome.toml index 4419bba..f658574 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -29,7 +29,7 @@ DataFolder = "__CONFIG_PATH__" MusicFolder = "/home/yunohost.multimedia/share/Music" # Enable the option in the UI to download music/albums/artists/playlists from the server -EnableDownloads = "true" +EnableDownloads = "__ENABLE_DOWNLOADS__" #Change background image used in the Login page UILoginBackgroundUrl = "" @@ -37,6 +37,9 @@ UILoginBackgroundUrl = "" # Add a welcome message to the login screen UIWelcomeMessage = "" +# Controls whether the player in the UI will animate the album cover (rotation) +EnableCoverAnimation = "__ENABLE_ANIMATION__" + # How long Navidrome will wait before closing web ui idle sessions SessionTimeout = "24h" @@ -56,7 +59,7 @@ IgnoredArticles = "The El La Los Las Le Les Os As O A" AutoImportPlaylists = "true" # The default metadata extractor is still ffmpeg but you can use the new taglib extractor -Scanner.Extractor = "taglib" +Scanner.Extractor = "__SCANNER_EXTRACTOR__" # Last.FM ApiKey LastFM.ApiKey = "" diff --git a/config_panel.toml b/config_panel.toml new file mode 100644 index 0000000..c8361fe --- /dev/null +++ b/config_panel.toml @@ -0,0 +1,32 @@ +version = "1.0" + +[main] +name = "Navidrome configuration" +services = ["__APP__"] + + [main.config] + name = "Configuration Options" + + [main.config.enable_animation] + ask = "Enable cover animation" + type = "boolean" + yes = "true" + no = "false" + help = "Controls whether the player in the UI will animate the album cover" + bind = "EnableCoverAnimation:/var/lib/navidrome/navidrome.toml" + + [main.config.enable_downloads] + ask = "Allow music download" + type = "boolean" + yes = "true" + no = "false" + help = "Enable the option in the UI to download music/albums/artists/playlists from the server" + bind = "EnableDownloads:/var/lib/navidrome/navidrome.toml" + + [main.config.scanner_extractor] + ask = "Select metadata extractor" + type = "select" + choices = ["taglib", "ffmpeg"] + default = "taglib" + help = "Select metadata extractor implementation" + bind = "Scanner.Extractor:/var/lib/navidrome/navidrome.toml" diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 0afcc5e..20c2034 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,2 +1,15 @@ Navidrome a software that allows you to listen to your own digital music in the same way you would with services like Spotify, Apple Music and others. It also allows you to easily share your music and playlists with your friends and family.s -Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists \ No newline at end of file +Navidrome indexes all digital music stored in your hard drive and makes it available through a nice web player and also by using any Subsonic-API compatible mobile client. Your music becomes searchable and you can create playlists, rate and “favourite” your loved tracks, albums and artists + +### Features + +- Handles very large music collections +- Streams virtually any audio format available +- Reads and uses all your beautifully curated metadata +- Great support for compilations (Various Artists albums) and box sets (multi-disc albums) +- Multi-user, each user has their own play counts, playlists, favourites, etc... +- Very low resource usage +- Automatically monitors your library for changes, importing new files and reloading new metadata +- Themeable, modern and responsive Web interface based on Material UI +- Compatible with all Subsonic/Madsonic/Airsonic clients +- Transcoding on the fly. Can be set per user/player. Opus encoding is supported diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index d524c6c..4608ae2 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1,2 +1,15 @@ Navidrome un logiciel qui vous permet d'écouter votre propre musique numérique de la même manière que vous le feriez avec des services comme Spotify, Apple Music et autres. Il vous permet également de partager facilement votre musique et vos listes de lecture avec vos amis et votre famille. Navidrome indexe toute la musique numérique stockée sur votre disque dur et la rend disponible via un agréable lecteur Web et également en utilisant n'importe quel client mobile compatible Subsonic-API. Votre musique devient consultable et vous pouvez créer des listes de lecture, évaluer et « favori » vos morceaux, albums et artistes préférés + +### Caractéristiques + +- Gère de très grandes collections de musique +- Streams pratiquement n'importe quel format audio disponible +- Lit et utilise toutes vos métadonnées +- Support pour les compilations (divers albums d'artistes) et les albums multi-disques +- Multi-User, chaque utilisateur a ses propres listes de lecture, favoris etc. +- Utilisation très faible des ressources +- Surveille automatiquement votre bibliothèque pour des modifications, importation de nouveaux fichiers et recharger de nouvelles métadonnées +- Interface Web thématique, moderne et réactive basée sur l'interface utilisateur du matériel +- 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 \ No newline at end of file diff --git a/scripts/_common.sh b/scripts/_common.sh index b4b81b0..39722ca 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -18,28 +18,3 @@ pkg_dependencies="ffmpeg" #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Check the architecture -# -# example: architecture=$(ynh_detect_arch) -# -# usage: ynh_detect_arch -# -# Requires YunoHost version 2.2.4 or higher. -ynh_detect_arch(){ - local architecture - if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" - elif [ -n "$(uname -m | grep 64)" ]; then - architecture="x86-64" - elif [ -n "$(uname -m | grep armv7)" ]; then - architecture="armv7" - elif [ -n "$(uname -m | grep armv6)" ]; then - architecture="armv6" - elif [ -n "$(uname -m | grep armv5)" ]; then - architecture="armv5" - else - architecture="unknown" - fi - echo $architecture -} diff --git a/scripts/change_url b/scripts/change_url index c1ba790..07c4761 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,6 +30,10 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) +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) + #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= diff --git a/scripts/install b/scripts/install index 47fd126..ef49713 100644 --- a/scripts/install +++ b/scripts/install @@ -23,10 +23,14 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -architecture=$(ynh_detect_arch) +architecture=$YNH_ARCH app=$YNH_APP_INSTANCE_NAME +scanner_extractor="taglib" +enable_downloads="true" +enable_animation="true" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -45,6 +49,9 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=enable_downloads --value=$enable_downloads +ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extractor +ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index eeea0c8..396e251 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,11 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) -architecture=$(ynh_detect_arch) +architecture=$YNH_ARCH + +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) #================================================= # CHECK VERSION @@ -56,6 +60,21 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +if [ -z "$enable_animation" ]; then + enable_animation="true" + ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation +fi + +if [ -z "$enable_downloads" ]; then + enable_downloads="true" + ynh_app_setting_set --app=$app --key=enable_downloads --value=$enable_downloads +fi + +if [ -z "$scanner_extractor" ]; then + scanner_extractor="taglib" + ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extractor +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all From 9ed8bdb831ab7717aaaf1e6be37af875d4a12558 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 22 Jan 2022 08:44:47 +0100 Subject: [PATCH 13/21] 0.47.5 --- conf/amd64.src | 4 ++-- conf/arm64.src | 4 ++-- conf/armhf.src | 4 ++-- manifest.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/amd64.src b/conf/amd64.src index 979e940..13dc6b2 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_x86_64.tar.gz -SOURCE_SUM=32806fd9d4c2a2d2e719a64e5162d2718775fa02928cf5d34a41c047a522adc0 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_x86_64.tar.gz +SOURCE_SUM=0244a3b659f9dc70dd21c4209c0f168f4d744579ce94eb059b6c1f5606efc2d7 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/arm64.src b/conf/arm64.src index 0ab64e0..c0685e1 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_arm64.tar.gz -SOURCE_SUM=1488ebc3e0412573a387502855d7cf64875c0f2939c92ff3283d4efaedf56251 +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_arm64.tar.gz +SOURCE_SUM=f95051895db329ae8fc1a9968ff8e61388aea288400faa1e1a79458b8ff4d473 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armhf.src b/conf/armhf.src index ebf125e..beca70a 100644 --- a/conf/armhf.src +++ b/conf/armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.0/navidrome_0.47.0_Linux_armv7.tar.gz -SOURCE_SUM=8100c0a02ec6bd9941c3d44433c9fa5e11b49e86a8d5b9fc36f62225a8d0af6f +SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_armv7.tar.gz +SOURCE_SUM=81663cd2e7a571e9db798f45161bdde8c681fa60e0e30e454dcee403010d0632 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index 9917bf6..4bea732 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" }, - "version": "0.47.0~ynh1", + "version": "0.47.5~ynh1", "url": "https://www.navidrome.org", "upstream": { "license": "GPL-3.0-only", From 047edc48fe5796d3ff758587b7db75eab86cf800 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 22 Jan 2022 07:44:52 +0000 Subject: [PATCH 14/21] 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 69a90ca..4e6e7c1 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.47.0~ynh1 +**Shipped version:** 0.47.5~ynh1 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index a6f0732..b20cbdf 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,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.47.0~ynh1 +**Version incluse :** 0.47.5~ynh1 **Démo :** https://demo.navidrome.org/app/#/login From 25bb03b0ecadc54c8acef57bbf7dc43f90dada8c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 22 Jan 2022 09:37:58 +0100 Subject: [PATCH 15/21] Fix --- check_process | 3 +++ scripts/upgrade | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/check_process b/check_process index 2c86312..ff7c2bb 100644 --- a/check_process +++ b/check_process @@ -13,6 +13,7 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=e41c919ddb65673ea6b452e138d36c240be3b6b7 + upgrade=1 from_commit=d7eb59fdd7a47ef4365af59db857e763f70564a4 backup_restore=1 multi_instance=0 change_url=1 @@ -22,4 +23,6 @@ Notification=none ;;; Upgrade options ; commit=e41c919ddb65673ea6b452e138d36c240be3b6b7 name=Testing (#43) + ; commit=d7eb59fdd7a47ef4365af59db857e763f70564a4 + name=Testing (#70) manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/scripts/upgrade b/scripts/upgrade index 396e251..02fdd2e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,7 +132,7 @@ 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="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" chmod 600 "$config_path/navidrome.toml" chown -R $app:$app "$config_path" From 9138d0185bb90b754a9d0833a0d7262617d8549c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 25 Jan 2022 10:51:35 +0100 Subject: [PATCH 16/21] More config panel (#73) * Fix * Update config_panel.toml --- conf/navidrome.toml | 5 ++++- config_panel.toml | 14 ++++++++++++++ scripts/install | 4 ++++ scripts/upgrade | 12 ++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/conf/navidrome.toml b/conf/navidrome.toml index f658574..ffa96a1 100644 --- a/conf/navidrome.toml +++ b/conf/navidrome.toml @@ -16,6 +16,9 @@ BaseURL = "__PATH_URL__" # Configure periodic scans using “cron” syntax. To disable it altogether, set it to "" (empty string) ScanSchedule = "@every 1m30s" +# Enables transcoding configuration in the UI +EnableTranscodingConfig = "__ENABLE_TRANSCODING__" + # Size of transcoding cache. Set to 0 to disable cache TranscodingCacheSize = "150MB" @@ -35,7 +38,7 @@ EnableDownloads = "__ENABLE_DOWNLOADS__" UILoginBackgroundUrl = "" # Add a welcome message to the login screen -UIWelcomeMessage = "" +UIWelcomeMessage = "__WELCOME_MESSAGE__" # Controls whether the player in the UI will animate the album cover (rotation) EnableCoverAnimation = "__ENABLE_ANIMATION__" diff --git a/config_panel.toml b/config_panel.toml index c8361fe..1cef0dd 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -30,3 +30,17 @@ services = ["__APP__"] default = "taglib" help = "Select metadata extractor implementation" bind = "Scanner.Extractor:/var/lib/navidrome/navidrome.toml" + + [main.config.enable_transcoding] + ask = "Enable transcoding" + type = "boolean" + yes = "true" + no = "false" + help = "Enables transcoding configuration in the UI" + bind = "EnableTranscodingConfig:/var/lib/navidrome/navidrome.toml" + + [main.config.welcome_message] + ask = "Welcome message" + type = "string" + help = "Add a welcome message to the login screen" + bind = "UIWelcomeMessage:/var/lib/navidrome/navidrome.toml" diff --git a/scripts/install b/scripts/install index ef49713..695aa21 100644 --- a/scripts/install +++ b/scripts/install @@ -30,6 +30,8 @@ app=$YNH_APP_INSTANCE_NAME scanner_extractor="taglib" enable_downloads="true" enable_animation="true" +enable_transcoding="false" +welcome_message="" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -52,6 +54,8 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=enable_downloads --value=$enable_downloads ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extractor 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 #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 02fdd2e..b7cf631 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,8 @@ architecture=$YNH_ARCH 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) #================================================= # CHECK VERSION @@ -75,6 +77,16 @@ if [ -z "$scanner_extractor" ]; then ynh_app_setting_set --app=$app --key=scanner_extractor --value=$scanner_extractor fi +if [ -z "$enable_transcoding" ]; then + enable_transcoding="false" + ynh_app_setting_set --app=$app --key=enable_transcoding --value=$enable_transcoding +fi + +if [ -z "$welcome_message" ]; then + welcome_message="" + ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all From 02bf5dca1f5efaceb7830c07fab196bfa01d72d4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 25 Jan 2022 10:52:34 +0100 Subject: [PATCH 17/21] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 4bea732..6476ad3 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" }, - "version": "0.47.5~ynh1", + "version": "0.47.5~ynh2", "url": "https://www.navidrome.org", "upstream": { "license": "GPL-3.0-only", From 3e1b5db682bff147051870031b2ae72d4ee54b4e Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Tue, 25 Jan 2022 09:52:50 +0000 Subject: [PATCH 18/21] 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 4e6e7c1..a5de690 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.47.5~ynh1 +**Shipped version:** 0.47.5~ynh2 **Demo:** https://demo.navidrome.org/app/#/login diff --git a/README_fr.md b/README_fr.md index b20cbdf..e081ffc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,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.47.5~ynh1 +**Version incluse :** 0.47.5~ynh2 **Démo :** https://demo.navidrome.org/app/#/login From 30a43779936312669cdc75cf6936daace7f140ca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 25 Jan 2022 11:28:10 +0100 Subject: [PATCH 19/21] Update change_url --- scripts/change_url | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 07c4761..2c083c3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,6 +33,8 @@ port=$(ynh_app_setting_get --app=$app --key=port) 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) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP From 1cd6825f0664a1146dc3678a859b58e07b0afb82 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 20 Mar 2022 15:32:41 +0100 Subject: [PATCH 20/21] cleaning --- scripts/install | 3 +-- scripts/upgrade | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 695aa21..758e89f 100644 --- a/scripts/install +++ b/scripts/install @@ -23,7 +23,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -architecture=$YNH_ARCH app=$YNH_APP_INSTANCE_NAME @@ -90,7 +89,7 @@ ynh_script_progression --message="Setting up source files..." --weight=4 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" +ynh_setup_source --dest_dir="$final_path" --source_id=$YNH_ARCH chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index b7cf631..c7a05cc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) -architecture=$YNH_ARCH enable_downloads=$(ynh_app_setting_get --app=$app --key=enable_downloads) scanner_extractor=$(ynh_app_setting_get --app=$app --key=scanner_extractor) @@ -114,7 +113,7 @@ then ynh_secure_remove --file=$final_path # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" + ynh_setup_source --dest_dir="$final_path" --source_id=$YNH_ARCH fi chmod 750 "$final_path" From 962113e606841cddf80546e5b79b6c3a61495c4e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 23 Jun 2022 08:48:19 +0200 Subject: [PATCH 21/21] Apply last example_ynh (#77) * Apply last example_ynh * Update manifest.json * Auto-update README * Update check_process Co-authored-by: yunohost-bot --- README.md | 21 +++++++++++---------- README_fr.md | 27 ++++++++++++++++----------- check_process | 3 +++ conf/nginx.conf | 16 ++++++++-------- conf/systemd.service | 32 ++++++++++++-------------------- manifest.json | 4 ++-- scripts/install | 7 ++++++- scripts/remove | 16 ++++++++-------- scripts/restore | 22 +++++++++++++--------- scripts/upgrade | 32 +++++++++++++++++--------------- 10 files changed, 96 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index a5de690..bfc108e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Navidrome for YunoHost -[![Integration level](https://dash.yunohost.org/integration/navidrome.svg)](https://dash.yunohost.org/appci/app/navidrome) ![](https://ci-apps.yunohost.org/ci/badges/navidrome.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/navidrome.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/navidrome.svg)](https://dash.yunohost.org/appci/app/navidrome) ![Working status](https://ci-apps.yunohost.org/ci/badges/navidrome.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/navidrome.maintain.svg) [![Install Navidrome with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=navidrome) *[Lire ce readme en français.](./README_fr.md)* @@ -32,13 +32,13 @@ 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.47.5~ynh2 +**Shipped version:** 0.47.5~ynh3 **Demo:** https://demo.navidrome.org/app/#/login ## Screenshots -![](./doc/screenshots/ss-desktop-player.png) +![Screenshot of Navidrome](./doc/screenshots/ss-desktop-player.png) ## Disclaimers / important information @@ -56,21 +56,22 @@ You must activate *public site* if you want to connect a client player to Navidr ## Documentation and resources -* Official app website: https://www.navidrome.org -* Official admin documentation: https://www.navidrome.org/docs -* Upstream app code repository: https://github.com/deluan/navidrome -* YunoHost documentation for this app: https://yunohost.org/app_navidrome -* Report a bug: https://github.com/YunoHost-Apps/navidrome_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/navidrome_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/navidrome_ynh/tree/testing --debug or sudo yunohost app upgrade navidrome -u https://github.com/YunoHost-Apps/navidrome_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index e081ffc..794b19d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Navidrome pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/navidrome.svg)](https://dash.yunohost.org/appci/app/navidrome) ![](https://ci-apps.yunohost.org/ci/badges/navidrome.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/navidrome.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/navidrome.svg)](https://dash.yunohost.org/appci/app/navidrome) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/navidrome.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/navidrome.maintain.svg) [![Installer Navidrome avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=navidrome) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Navidrome rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -27,13 +31,13 @@ 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.47.5~ynh2 +**Version incluse :** 0.47.5~ynh3 **Démo :** https://demo.navidrome.org/app/#/login ## Captures d'écran -![](./doc/screenshots/ss-desktop-player.png) +![Capture d'écran de Navidrome](./doc/screenshots/ss-desktop-player.png) ## Avertissements / informations importantes @@ -51,21 +55,22 @@ Vous devez activer *site public* si vous souhaitez connecter un lecteur client ## Documentations et ressources -* Site officiel de l'app : https://www.navidrome.org -* Documentation officielle de l'admin : https://www.navidrome.org/docs -* Dépôt de code officiel de l'app : https://github.com/deluan/navidrome -* Documentation YunoHost pour cette app : https://yunohost.org/app_navidrome -* Signaler un bug : https://github.com/YunoHost-Apps/navidrome_ynh/issues +* Site officiel de l'app : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/navidrome_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/navidrome_ynh/tree/testing --debug ou sudo yunohost app upgrade navidrome -u https://github.com/YunoHost-Apps/navidrome_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** diff --git a/check_process b/check_process index ff7c2bb..8ae619e 100644 --- a/check_process +++ b/check_process @@ -12,10 +12,13 @@ setup_private=1 setup_public=1 upgrade=1 + # 0.40.0~ynh1 upgrade=1 from_commit=e41c919ddb65673ea6b452e138d36c240be3b6b7 + # 0.47.0~ynh1 upgrade=1 from_commit=d7eb59fdd7a47ef4365af59db857e763f70564a4 backup_restore=1 multi_instance=0 + port_already_use=0 change_url=1 ;;; Options Email= diff --git a/conf/nginx.conf b/conf/nginx.conf index 65c87f7..5445910 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,14 +1,14 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - + proxy_pass http://127.0.0.1:__PORT__; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; diff --git a/conf/systemd.service b/conf/systemd.service index fa73915..7075e05 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -3,42 +3,34 @@ Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsoni After=remote-fs.target network.target AssertPathExists=__CONFIG_PATH__ -[Install] -WantedBy=multi-user.target - [Service] +Type=simple User=__APP__ Group=__APP__ -Type=simple +WorkingDirectory=__CONFIG_PATH__/ ExecStart=__FINALPATH__/__APP__ --configfile "__CONFIG_PATH__/navidrome.toml" -WorkingDirectory=__CONFIG_PATH__ TimeoutStopSec=20 KillMode=process Restart=on-failure +ReadWritePaths=__CONFIG_PATH__ # See https://www.freedesktop.org/software/systemd/man/systemd.exec.html -DevicePolicy=closed NoNewPrivileges=yes PrivateTmp=yes PrivateUsers=yes -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 RestrictNamespaces=yes RestrictRealtime=yes -SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap -ReadWritePaths=__CONFIG_PATH__ - -# You can uncomment the following line if you're not using the jukebox This -# will prevent navidrome from accessing any real (physical) devices -#PrivateDevices=yes - -# You can change the following line to `strict` instead of `full` if you don't -# want navidrome to be able to write anything on your filesystem outside of -# /var/lib/navidrome. +DevicePolicy=closed ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap # You can comment the following line if you don't have any media in /home/*. # This will prevent navidrome from ever reading/writing anything there. -#ProtectHome=true \ No newline at end of file +#ProtectHome=true + +[Install] +WantedBy=multi-user.target diff --git a/manifest.json b/manifest.json index 6476ad3..6c6b255 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" }, - "version": "0.47.5~ynh2", + "version": "0.47.5~ynh3", "url": "https://www.navidrome.org", "upstream": { "license": "GPL-3.0-only", @@ -27,7 +27,7 @@ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" diff --git a/scripts/install b/scripts/install index 758e89f..166ebe9 100644 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,9 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ynh_clean_check_starting +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -80,7 +83,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -159,6 +162,8 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then + # Everyone can access the app. + # The "main" permission is automatically created before the install script. ynh_permission_update --permission="main" --add="visitors" fi diff --git a/scripts/remove b/scripts/remove index 39c8c8d..1a8cd1c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -41,14 +41,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -65,6 +57,14 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/restore b/scripts/restore index 23281c0..706452d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -14,6 +14,9 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ynh_clean_check_starting +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -33,24 +36,18 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS -#================================================= -# 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" - #================================================= # RECREATE THE DEDICATED USER #================================================= ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR @@ -73,6 +70,13 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=7 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# 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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c7a05cc..6bdc026 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,6 +30,7 @@ welcome_message=$(ynh_app_setting_get --app=$app --key=welcome_message) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -41,6 +42,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -61,6 +63,13 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + if [ -z "$enable_animation" ]; then enable_animation="true" ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation @@ -86,20 +95,13 @@ if [ -z "$welcome_message" ]; then ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message fi -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -120,6 +122,13 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=8 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -128,13 +137,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=8 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # UPDATE A CONFIG FILE #=================================================