From 3675859f43d8112409e198e3545f5fb7c3c23dc8 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 15 Jul 2022 12:04:41 +0200 Subject: [PATCH 01/12] Upgrade to v10.8.1 --- conf/ffmpeg.bullseye.amd64.src | 4 ++-- conf/ffmpeg.bullseye.arm64.src | 4 ++-- conf/ffmpeg.bullseye.armhf.src | 4 ++-- conf/ffmpeg.buster.amd64.src | 4 ++-- conf/ffmpeg.buster.arm64.src | 4 ++-- conf/ffmpeg.buster.armhf.src | 4 ++-- conf/ldap.src | 4 ++-- conf/server.bullseye.amd64.src | 4 ++-- conf/server.bullseye.arm64.src | 4 ++-- conf/server.bullseye.armhf.src | 4 ++-- conf/server.buster.amd64.src | 4 ++-- conf/server.buster.arm64.src | 4 ++-- conf/server.buster.armhf.src | 4 ++-- conf/web.bullseye.amd64.src | 4 ++-- conf/web.bullseye.arm64.src | 4 ++-- conf/web.bullseye.armhf.src | 4 ++-- conf/web.buster.amd64.src | 4 ++-- conf/web.buster.arm64.src | 4 ++-- conf/web.buster.armhf.src | 4 ++-- manifest.json | 2 +- scripts/_common.sh | 6 +++--- 21 files changed, 42 insertions(+), 42 deletions(-) diff --git a/conf/ffmpeg.bullseye.amd64.src b/conf/ffmpeg.bullseye.amd64.src index d87e0f6..f53855a 100644 --- a/conf/ffmpeg.bullseye.amd64.src +++ b/conf/ffmpeg.bullseye.amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-5/jellyfin-ffmpeg5_5.0.1-5-bullseye_amd64.deb -SOURCE_SUM=8070eb09a73912da19c4659b8f8e8f3aac70bac62601195d15b03c7c419adc55 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-8/jellyfin-ffmpeg5_5.0.1-8-bullseye_amd64.deb +SOURCE_SUM=12036152d4260dbd945b69ec4079d3bad932790a1c39451b0978443d22a1d92b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/ffmpeg.bullseye.arm64.src b/conf/ffmpeg.bullseye.arm64.src index 409b725..bb5ab90 100644 --- a/conf/ffmpeg.bullseye.arm64.src +++ b/conf/ffmpeg.bullseye.arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-5/jellyfin-ffmpeg5_5.0.1-5-bullseye_arm64.deb -SOURCE_SUM=7aeff16cee434c1732ab3a7b6bfc949b2714b6bd432fff147fe8bb9424de85c8 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-8/jellyfin-ffmpeg5_5.0.1-8-bullseye_arm64.deb +SOURCE_SUM=bf9aaf07d5f6233ae50ef2c28c8bc3e2ac5a1bdf87914b6c5ad971711c86c827 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/ffmpeg.bullseye.armhf.src b/conf/ffmpeg.bullseye.armhf.src index f5fd72b..333865a 100644 --- a/conf/ffmpeg.bullseye.armhf.src +++ b/conf/ffmpeg.bullseye.armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-5/jellyfin-ffmpeg5_5.0.1-5-bullseye_armhf.deb -SOURCE_SUM=ae59fc84b52176618debebf211dcba083663a4bb82747a320bee64558cfb6ccc +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-8/jellyfin-ffmpeg5_5.0.1-8-bullseye_armhf.deb +SOURCE_SUM=e41146c3329288a92962d8ceb448a7bb02deaddbd952e18b689945d1278bd22e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/ffmpeg.buster.amd64.src b/conf/ffmpeg.buster.amd64.src index b3d8d87..8b95396 100644 --- a/conf/ffmpeg.buster.amd64.src +++ b/conf/ffmpeg.buster.amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-5/jellyfin-ffmpeg5_5.0.1-5-buster_amd64.deb -SOURCE_SUM=d1079c74f6d644fb7accf02232583e3c78100c57c5af8c24914d67250cdb3d0d +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-8/jellyfin-ffmpeg5_5.0.1-8-buster_amd64.deb +SOURCE_SUM=5f95a816bbfcfa63f5b816f9a828391628bb1889b714e8d5765f745b37af6a62 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/ffmpeg.buster.arm64.src b/conf/ffmpeg.buster.arm64.src index 414f4ee..24ad221 100644 --- a/conf/ffmpeg.buster.arm64.src +++ b/conf/ffmpeg.buster.arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-5/jellyfin-ffmpeg5_5.0.1-5-buster_arm64.deb -SOURCE_SUM=3c732da2f365faf7c7c859602e07da114ba63dcac69c54daa8403171c6a955ec +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-8/jellyfin-ffmpeg5_5.0.1-8-buster_arm64.deb +SOURCE_SUM=a6bf1b913b98dff65179bfa21e569c8f5b134dfee50f9da09ce05661e385ecba SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/ffmpeg.buster.armhf.src b/conf/ffmpeg.buster.armhf.src index 0a8456c..46ade93 100644 --- a/conf/ffmpeg.buster.armhf.src +++ b/conf/ffmpeg.buster.armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-5/jellyfin-ffmpeg5_5.0.1-5-buster_armhf.deb -SOURCE_SUM=8c3d65b68e56b1ee26dec1727f514946e04bd4fefab9b40c2df12f3d80f54ba6 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/5.0.1-8/jellyfin-ffmpeg5_5.0.1-8-buster_armhf.deb +SOURCE_SUM=704bee7926d5e741f7d34df7c5262285fd78e2f21277948d8bba2f9f18f6ea7b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/ldap.src b/conf/ldap.src index c905494..d8edcd8 100644 --- a/conf/ldap.src +++ b/conf/ldap.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_15.0.0.0.zip -SOURCE_SUM=e0fa2ee4ec0bbe3a6f56fd5775abe1dd41cde88f05d9c085e9135cda4680c00c +SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_16.0.0.0.zip +SOURCE_SUM=8857a7dbe8bd08db2a8c10621d388424a389a9f0d98253dbd0ea229310d5cf7f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/conf/server.bullseye.amd64.src b/conf/server.bullseye.amd64.src index d15c726..ae18992 100644 --- a/conf/server.bullseye.amd64.src +++ b/conf/server.bullseye.amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.0/jellyfin-server_10.8.0-1_amd64.deb -SOURCE_SUM=af0b6133fe9df3b9096c3cd329a4a7df1664279a3903f47e8b003670305ac761 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.1/jellyfin-server_10.8.1-1_amd64.deb +SOURCE_SUM=2edf6e485ec4d04e9fd9b8573ec4cb0f58f47c6645ebd8edc65511597a194115 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/server.bullseye.arm64.src b/conf/server.bullseye.arm64.src index cabe1f0..6e3611f 100644 --- a/conf/server.bullseye.arm64.src +++ b/conf/server.bullseye.arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.0/jellyfin-server_10.8.0-1_arm64.deb -SOURCE_SUM=1e594290beb3128f03221c4e5bcaa5b2f8fada1ade519fcc60d12f466fd090ec +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.1/jellyfin-server_10.8.1-1_arm64.deb +SOURCE_SUM=683ec1ac76a78d46568ecc88ff891e23f63038fa8c89466f6be0f7e8da363c15 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/server.bullseye.armhf.src b/conf/server.bullseye.armhf.src index f2e3900..ce3d48e 100644 --- a/conf/server.bullseye.armhf.src +++ b/conf/server.bullseye.armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.0/jellyfin-server_10.8.0-1_armhf.deb -SOURCE_SUM=4acfcdb8f70fb57615ea66fdbf400b9e1a990bd95439b94479fd101cf657c340 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.1/jellyfin-server_10.8.1-1_armhf.deb +SOURCE_SUM=d4f558c4e35a58f503aa54a49e6fe726fff2b13a55438f0fbe3e3adb87b2d5bd SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/server.buster.amd64.src b/conf/server.buster.amd64.src index d15c726..ae18992 100644 --- a/conf/server.buster.amd64.src +++ b/conf/server.buster.amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.0/jellyfin-server_10.8.0-1_amd64.deb -SOURCE_SUM=af0b6133fe9df3b9096c3cd329a4a7df1664279a3903f47e8b003670305ac761 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.1/jellyfin-server_10.8.1-1_amd64.deb +SOURCE_SUM=2edf6e485ec4d04e9fd9b8573ec4cb0f58f47c6645ebd8edc65511597a194115 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/server.buster.arm64.src b/conf/server.buster.arm64.src index cabe1f0..6e3611f 100644 --- a/conf/server.buster.arm64.src +++ b/conf/server.buster.arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.0/jellyfin-server_10.8.0-1_arm64.deb -SOURCE_SUM=1e594290beb3128f03221c4e5bcaa5b2f8fada1ade519fcc60d12f466fd090ec +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.1/jellyfin-server_10.8.1-1_arm64.deb +SOURCE_SUM=683ec1ac76a78d46568ecc88ff891e23f63038fa8c89466f6be0f7e8da363c15 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/server.buster.armhf.src b/conf/server.buster.armhf.src index f2e3900..ce3d48e 100644 --- a/conf/server.buster.armhf.src +++ b/conf/server.buster.armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.0/jellyfin-server_10.8.0-1_armhf.deb -SOURCE_SUM=4acfcdb8f70fb57615ea66fdbf400b9e1a990bd95439b94479fd101cf657c340 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.8.1/jellyfin-server_10.8.1-1_armhf.deb +SOURCE_SUM=d4f558c4e35a58f503aa54a49e6fe726fff2b13a55438f0fbe3e3adb87b2d5bd SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/web.bullseye.amd64.src b/conf/web.bullseye.amd64.src index ff02d56..427bb61 100644 --- a/conf/web.bullseye.amd64.src +++ b/conf/web.bullseye.amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.0/jellyfin-web_10.8.0-1_all.deb -SOURCE_SUM=f5e5861f3e9941cef17fbd04d294a6f538f258f6167ef5201b97632167cd3af4 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.1/jellyfin-web_10.8.1-1_all.deb +SOURCE_SUM=0b7ab57f6d88ea1bd87f88b56bcaf597b88f3b73ca037007d3f6dae7b4673215 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/web.bullseye.arm64.src b/conf/web.bullseye.arm64.src index ff02d56..427bb61 100644 --- a/conf/web.bullseye.arm64.src +++ b/conf/web.bullseye.arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.0/jellyfin-web_10.8.0-1_all.deb -SOURCE_SUM=f5e5861f3e9941cef17fbd04d294a6f538f258f6167ef5201b97632167cd3af4 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.1/jellyfin-web_10.8.1-1_all.deb +SOURCE_SUM=0b7ab57f6d88ea1bd87f88b56bcaf597b88f3b73ca037007d3f6dae7b4673215 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/web.bullseye.armhf.src b/conf/web.bullseye.armhf.src index ff02d56..427bb61 100644 --- a/conf/web.bullseye.armhf.src +++ b/conf/web.bullseye.armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.0/jellyfin-web_10.8.0-1_all.deb -SOURCE_SUM=f5e5861f3e9941cef17fbd04d294a6f538f258f6167ef5201b97632167cd3af4 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.1/jellyfin-web_10.8.1-1_all.deb +SOURCE_SUM=0b7ab57f6d88ea1bd87f88b56bcaf597b88f3b73ca037007d3f6dae7b4673215 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/web.buster.amd64.src b/conf/web.buster.amd64.src index ff02d56..427bb61 100644 --- a/conf/web.buster.amd64.src +++ b/conf/web.buster.amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.0/jellyfin-web_10.8.0-1_all.deb -SOURCE_SUM=f5e5861f3e9941cef17fbd04d294a6f538f258f6167ef5201b97632167cd3af4 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.1/jellyfin-web_10.8.1-1_all.deb +SOURCE_SUM=0b7ab57f6d88ea1bd87f88b56bcaf597b88f3b73ca037007d3f6dae7b4673215 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/web.buster.arm64.src b/conf/web.buster.arm64.src index ff02d56..427bb61 100644 --- a/conf/web.buster.arm64.src +++ b/conf/web.buster.arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.0/jellyfin-web_10.8.0-1_all.deb -SOURCE_SUM=f5e5861f3e9941cef17fbd04d294a6f538f258f6167ef5201b97632167cd3af4 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.1/jellyfin-web_10.8.1-1_all.deb +SOURCE_SUM=0b7ab57f6d88ea1bd87f88b56bcaf597b88f3b73ca037007d3f6dae7b4673215 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/web.buster.armhf.src b/conf/web.buster.armhf.src index ff02d56..427bb61 100644 --- a/conf/web.buster.armhf.src +++ b/conf/web.buster.armhf.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.0/jellyfin-web_10.8.0-1_all.deb -SOURCE_SUM=f5e5861f3e9941cef17fbd04d294a6f538f258f6167ef5201b97632167cd3af4 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.8.1/jellyfin-web_10.8.1-1_all.deb +SOURCE_SUM=0b7ab57f6d88ea1bd87f88b56bcaf597b88f3b73ca037007d3f6dae7b4673215 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index b126c30..3ebb1d0 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Media System that manage and stream your media.", "fr": "Système multimédia qui gère et diffuse vos médias." }, - "version": "10.8.0~ynh1", + "version": "10.8.1~ynh1", "url": "https://jellyfin.org", "upstream": { "license": "GPL-2.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index ad67e18..b35fd17 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,11 +5,11 @@ #================================================= debian=$(lsb_release --codename --short) -pkg_version="10.8.0-1" +pkg_version="10.8.1-1" version=$(echo "$pkg_version" | cut -d '-' -f 1) -ffmpeg_pkg_version="5.0.1-5" -ldap_pkg_version="15.0.0.0" +ffmpeg_pkg_version="5.0.1-8" +ldap_pkg_version="16.0.0.0" architecture=$(dpkg --print-architecture) From 90a540c219693216968e9f5e0667dff186d04d88 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 15 Jul 2022 10:04:50 +0000 Subject: [PATCH 02/12] 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 4c212f4..f8c993d 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 Media System that manage and stream your media. -**Shipped version:** 10.8.0~ynh1 +**Shipped version:** 10.8.1~ynh1 **Demo:** https://demo.jellyfin.org/stable/web/index.html diff --git a/README_fr.md b/README_fr.md index a9f4c67..caf04a0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Système multimédia qui gère et diffuse vos médias. -**Version incluse :** 10.8.0~ynh1 +**Version incluse :** 10.8.1~ynh1 **Démo :** https://demo.jellyfin.org/stable/web/index.html From 925c2106a90c2c61afd089c31f690db8f44a7bc8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 16 Jul 2022 16:34:44 +0200 Subject: [PATCH 03/12] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index fc05ad9..837d509 100644 --- a/scripts/restore +++ b/scripts/restore @@ -145,7 +145,7 @@ yunohost service add $app --description="Jellyfin media center" ${needed_ports:+ #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 +ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 ynh_restore_file --origin_path="/etc/logrotate.d/$app" From 05844bd90270931511682e9d69ad926021c8b965 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 16 Jul 2022 16:40:18 +0200 Subject: [PATCH 04/12] Revert "Update restore" This reverts commit 925c2106a90c2c61afd089c31f690db8f44a7bc8. --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 837d509..fc05ad9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -145,7 +145,7 @@ yunohost service add $app --description="Jellyfin media center" ${needed_ports:+ #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 +ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 ynh_restore_file --origin_path="/etc/logrotate.d/$app" From 181ff53f427a9c51b60496aa4c24b73fac873c9f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 18 Jul 2022 23:23:10 +0200 Subject: [PATCH 05/12] Apply example_ynh --- check_process | 10 +-- doc/DESCRIPTION.md | 1 + doc/DESCRIPTION_fr.md | 1 + manifest.json | 18 ++--- scripts/_common.sh | 124 +++++++++++++++--------------- scripts/backup | 2 +- scripts/change_url | 12 +-- scripts/install | 77 +++++++++---------- scripts/remove | 64 ++++++++-------- scripts/restore | 124 +++++++++++++++--------------- scripts/update_version.sh | 100 ++++++++++++------------- scripts/upgrade | 154 +++++++++++++++++++------------------- 12 files changed, 347 insertions(+), 340 deletions(-) create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DESCRIPTION_fr.md diff --git a/check_process b/check_process index f2acfeb..4c97cf6 100644 --- a/check_process +++ b/check_process @@ -1,12 +1,9 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - ;; Test complet ; Manifest domain="domain.tld" path="/path" - admin="john" is_public=1 + admin="john" discovery=1 ; Checks pkg_linter=1 @@ -16,6 +13,8 @@ setup_private=1 setup_public=1 upgrade=1 + # 10.8.0~ynh1 + upgrade=1 from_commit=384dcd2ff1dbf4b0085edb7f12e4d15f00508e2b backup_restore=1 multi_instance=0 port_already_use=0 @@ -23,6 +22,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options -# ; commit= -# name= diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..7772641 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Jellyfin enables you to collect, manage, and stream your media. Run the Jellyfin server on your system and gain access to the leading free-software entertainment system, bells and whistles included. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..265e5f6 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Jellyfin vous permet de collecter, gérer et diffuser vos médias. Exécutez le serveur Jellyfin sur votre système et accédez au principal système de divertissement à logiciel libre. diff --git a/manifest.json b/manifest.json index b126c30..3df61dc 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Media System that manage and stream your media.", "fr": "Système multimédia qui gère et diffuse vos médias." }, - "version": "10.8.0~ynh1", + "version": "10.8.0~ynh2", "url": "https://jellyfin.org", "upstream": { "license": "GPL-2.0-only", @@ -17,8 +17,8 @@ }, "license": "GPL-2.0-only", "maintainer": { - "name": "tituspijean", - "email": "tituspijean@outlook.com" + "name": "tituspijean", + "email": "tituspijean@outlook.com" }, "previous_maintainers": [ { @@ -27,14 +27,14 @@ } ], "requirements": { - "yunohost": ">=4.3" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" @@ -45,10 +45,6 @@ "example": "/jellyfin", "default": "/jellyfin" }, - { - "name": "admin", - "type": "user" - }, { "name": "is_public", "type": "boolean", @@ -58,6 +54,10 @@ "fr": "Jellyfin a son propre système de connexion, vous devriez la laisser publique pour permettre la connexion de clients externes (app mobile, etc.)." } }, + { + "name": "admin", + "type": "user" + }, { "name": "discovery", "type": "boolean", diff --git a/scripts/_common.sh b/scripts/_common.sh index ad67e18..2cc02ee 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -11,47 +11,45 @@ version=$(echo "$pkg_version" | cut -d '-' -f 1) ffmpeg_pkg_version="5.0.1-5" ldap_pkg_version="15.0.0.0" -architecture=$(dpkg --print-architecture) - discovery_service_port=1900 discovery_client_port=7359 ffmpeg_deps=( - libass9 - libbluray2 - libc6 - libdrm2 - libfontconfig1 - libfreetype6 - libfribidi0 - libgcc1 - libgmp10 - libgnutls30 - libllvm11 - libmp3lame0 - libopus0 - libstdc++6 - libtheora0 - libvdpau1 - libvorbis0a - libvorbisenc2 - libwebp6 - libwebpmux3 - libx11-6 - libxcb-randr0 - libzvbi0 - zlib1g + libass9 + libbluray2 + libc6 + libdrm2 + libfontconfig1 + libfreetype6 + libfribidi0 + libgcc1 + libgmp10 + libgnutls30 + libllvm11 + libmp3lame0 + libopus0 + libstdc++6 + libtheora0 + libvdpau1 + libvorbis0a + libvorbisenc2 + libwebp6 + libwebpmux3 + libx11-6 + libxcb-randr0 + libzvbi0 + zlib1g ) case "$debian" in - buster) ffmpeg_deps+=( libvpx5 libx264-155 libx265-165 ) ;; - bullseye) ffmpeg_deps+=( libvpx6 libx264-160 libx265-192 ) ;; - *) echo "Unknown release: $debian" >&2; exit 1 ;; + buster) ffmpeg_deps+=( libvpx5 libx264-155 libx265-165 ) ;; + bullseye) ffmpeg_deps+=( libvpx6 libx264-160 libx265-192 ) ;; + *) echo "Unknown release: $debian" >&2; exit 1 ;; esac -case "$architecture" in - arm64) : ;; - armhf) : ;; - *) ffmpeg_deps+=( libdrm-intel1 libopencl1 ) ;; +case "$YNH_ARCH" in + arm64) : ;; + armhf) : ;; + *) ffmpeg_deps+=( libdrm-intel1 libopencl1 ) ;; esac jellyfin_deps=(at libsqlite3-0 libfontconfig1 libfreetype6 libssl1.1) @@ -63,41 +61,41 @@ pkg_dependencies="${ffmpeg_deps[*]} ${jellyfin_deps[*]}" #================================================= install_jellyfin_packages() { - # In case of a new version, the url change from - # https://repo.jellyfin.org/releases/server/debian/versions/stable/server/X.X.X/jellyfin-server_X.X.X-1_$architecture.deb to - # https://repo.jellyfin.org/archive/debian/stable/X.X.X/server/jellyfin-server_X.X.X-1_$architecture.deb - for pkg in web server; do - src_url=$(grep 'SOURCE_URL=' "$YNH_APP_BASEDIR/conf/$pkg.$debian.$architecture.src" | cut -d= -f2-) - if ! curl --output /dev/null --silent --head --fail "$src_url"; then - ynh_replace_string \ - --match_string="releases/server/debian/versions/stable/$pkg/$version/" \ - --replace_string="archive/debian/stable/$version/$pkg/" \ - --target_file="$YNH_APP_BASEDIR/conf/$pkg.$debian.$architecture.src" - fi - done + # In case of a new version, the url change from + # https://repo.jellyfin.org/releases/server/debian/versions/stable/server/X.X.X/jellyfin-server_X.X.X-1_$YNH_ARCH.deb to + # https://repo.jellyfin.org/archive/debian/stable/X.X.X/server/jellyfin-server_X.X.X-1_$YNH_ARCH.deb + for pkg in web server; do + src_url=$(grep 'SOURCE_URL=' "$YNH_APP_BASEDIR/conf/$pkg.$debian.$YNH_ARCH.src" | cut -d= -f2-) + if ! curl --output /dev/null --silent --head --fail "$src_url"; then + ynh_replace_string \ + --match_string="releases/server/debian/versions/stable/$pkg/$version/" \ + --replace_string="archive/debian/stable/$version/$pkg/" \ + --target_file="$YNH_APP_BASEDIR/conf/$pkg.$debian.$YNH_ARCH.src" + fi + done - # Create the temporary directory - tempdir="$(mktemp -d)" + # Create the temporary directory + tempdir="$(mktemp -d)" - # Download the deb files - ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$debian.$architecture" - ynh_setup_source --dest_dir=$tempdir --source_id="server.$debian.$architecture" - ynh_setup_source --dest_dir=$tempdir --source_id="web.$debian.$architecture" + # Download the deb files + ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$debian.$YNH_ARCH" + ynh_setup_source --dest_dir=$tempdir --source_id="server.$debian.$YNH_ARCH" + ynh_setup_source --dest_dir=$tempdir --source_id="web.$debian.$YNH_ARCH" - # Install the packages - ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-ffmpeg5.deb - ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-server.deb - ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-web.deb + # Install the packages + ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-ffmpeg5.deb + ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-server.deb + ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-web.deb - rm -rf "$tempdir" + rm -rf "$tempdir" - # The doc says it should be called only once, - # but the code says multiple calls are supported. - # Also, they're already installed so that should be quasi instantaneous. - ynh_install_app_dependencies \ - jellyfin-ffmpeg5="$ffmpeg_pkg_version-$debian" \ - jellyfin-server="$pkg_version" \ - jellyfin-web="$pkg_version" + # The doc says it should be called only once, + # but the code says multiple calls are supported. + # Also, they're already installed so that should be quasi instantaneous. + ynh_install_app_dependencies \ + jellyfin-ffmpeg5="$ffmpeg_pkg_version-$debian" \ + jellyfin-server="$pkg_version" \ + jellyfin-web="$pkg_version" } #================================================= diff --git a/scripts/backup b/scripts/backup index 18038d9..41b31c9 100644 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/change_url b/scripts/change_url index b802be2..9399d8a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -21,9 +21,6 @@ new_path=$YNH_APP_NEW_PATH app=$YNH_APP_INSTANCE_NAME -port=$(ynh_app_setting_get --app="$app" --key=port) -config_path=$(ynh_app_setting_get --app="$app" --key=config_path) - #================================================= # LOAD SETTINGS #================================================= @@ -32,14 +29,19 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) +# Add settings here as needed by your application +port=$(ynh_app_setting_get --app="$app" --key=port) +config_path=$(ynh_app_setting_get --app="$app" --key=config_path) + #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=10 # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # 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" @@ -127,7 +129,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=2 -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Startup complete" --timeout=15 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15 #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index f18c9ed..0b4d6d4 100644 --- a/scripts/install +++ b/scripts/install @@ -25,8 +25,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN discovery=$YNH_APP_ARG_DISCOVERY app=$YNH_APP_INSTANCE_NAME @@ -41,9 +41,8 @@ config_path=/etc/jellyfin test ! -e "$final_path" || ynh_die --message="There is already a directory: $final_path " test ! -e "$config_path" || ynh_die --message="There is already a directory: $config_path " -architecture=$(dpkg --print-architecture) -if [[ ! "$architecture" =~ ^(amd64|arm64|armhf)$ ]]; then - ynh_die "Jellyfin is not compatible with your architecture, $architecture, which is neither amd64, arm64, or armhf." 1 +if [[ ! "$YNH_ARCH" =~ ^(amd64|arm64|armhf)$ ]]; then + ynh_die "Jellyfin is not compatible with your architecture, $YNH_ARCH, which is neither amd64, arm64, or armhf." 1 fi # Register (book) web path @@ -76,23 +75,23 @@ discovery_service=$discovery discovery_client=$discovery if [ $discovery -eq 1 ]; then - ynh_script_progression --message="Configuring firewall..." --weight=1 + ynh_script_progression --message="Configuring firewall..." --weight=1 - # Open port 1900 for service auto-discovery - if ynh_port_available --port=$discovery_service_port; then - ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port - else - discovery_service=0 - ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless." - fi + # Open port $discovery_service_port for service auto-discovery + if ynh_port_available --port=$discovery_service_port; then + ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port + else + discovery_service=0 + ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless." + fi - # Open port 7359 for client auto-discovery - if ynh_port_available --port=$discovery_client_port; then - ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port - else - discovery_client=0 - ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless." - fi + # Open port $discovery_client_port for client auto-discovery + if ynh_port_available --port=$discovery_client_port; then + ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port + else + discovery_client=0 + ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless." + fi fi ynh_app_setting_set --app=$app --key=discovery_service --value=$discovery_service @@ -112,14 +111,6 @@ ynh_script_progression --message="Installing packages..." --weight=1 install_jellyfin_packages -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=6 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # CREATE DEDICATED USER #================================================= @@ -134,12 +125,22 @@ if grep -q "^render:" /etc/group; then fi #================================================= -# MODIFY A CONFIG FILE +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=6 + +# Create a dedicated NGINX config +ynh_add_nginx_config + +#================================================= +# SPECIFIC SETUP +#================================================= +# ADD A CONFIGURATION #================================================= ynh_print_info --message="Waiting 30s to let Jellyfin fully start a first time..." sleep 30 -ynh_script_progression --message="Configuring the settings..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 @@ -156,6 +157,15 @@ ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --so mkdir -p /var/lib/jellyfin/plugins/configurations/ ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= +ynh_script_progression --message="Securing files and directories..." + +# Set permissions to app files +chown -R $app: $final_path +chown -R $app: $config_path + #================================================= # YUNOHOST MULTIMEDIA INTEGRATION #================================================= @@ -168,15 +178,6 @@ ynh_multimedia_addaccess $app #================================================= # GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -ynh_script_progression --message="Securing files and directories..." - -# Set permissions to app files -chown -R $app: $final_path -chown -R $app: $config_path - #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/remove b/scripts/remove index d00068e..0c70619 100644 --- a/scripts/remove +++ b/scripts/remove @@ -36,11 +36,20 @@ then fi #================================================= -# REMOVE DEPENDENCIES +# REMOVE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=3 +ynh_script_progression --message="Removing logrotate configuration..." --weight=1 -ynh_remove_app_dependencies +# Remove the app-specific logrotate config +ynh_remove_logrotate + +#================================================= +# REMOVE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 + +# Remove the dedicated NGINX config +ynh_remove_nginx_config #================================================= # REMOVE PACKAGES @@ -52,47 +61,40 @@ dpkg --remove jellyfin-server dpkg --remove jellyfin-ffmpeg5 #================================================= -# REMOVE APP DIRECTORIES +# REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing app directories..." --weight=1 +ynh_script_progression --message="Removing dependencies..." --weight=3 -# Remove the app directory securely -ynh_secure_remove --file="$final_path" -ynh_secure_remove --file="$config_path" -ynh_secure_remove --file="/etc/systemd/system/jellyfin.service.d" - -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - -# Remove the dedicated NGINX config -ynh_remove_nginx_config - -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 - -# Remove the app-specific logrotate config -ynh_remove_logrotate +# Remove metapackage and its dependencies +ynh_remove_app_dependencies #================================================= # CLOSE A PORT #================================================= -if [[ $discovery_service -eq 1 ]] && yunohost firewall list | grep -q "\- 1900$" +if [[ $discovery_service -eq 1 ]] && yunohost firewall list | grep -q "\- $discovery_service_port$" then - ynh_script_progression --message="Closing port 1900..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow UDP 1900 + ynh_script_progression --message="Closing port $discovery_service_port..." --weight=1 + ynh_exec_warn_less yunohost firewall disallow UDP $discovery_service_port fi -if [[ $discovery_client -eq 1 ]] && yunohost firewall list | grep -q "\- 7359$" +if [[ $discovery_client -eq 1 ]] && yunohost firewall list | grep -q "\- $discovery_client_port$" then - ynh_script_progression --message="Closing port 7359..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow UDP 7359 + ynh_script_progression --message="Closing port $discovery_client_port..." --weight=1 + ynh_exec_warn_less yunohost firewall disallow UDP $discovery_client_port fi +#================================================= +# SPECIFIC REMOVE +#================================================= +# REMOVE VARIOUS FILES +#================================================= +ynh_script_progression --message="Removing various files..." --weight=1 + +ynh_secure_remove --file="$final_path" +ynh_secure_remove --file="$config_path" +ynh_secure_remove --file="/etc/systemd/system/jellyfin.service.d" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index fc05ad9..ab9c8b3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -23,7 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -43,13 +43,25 @@ test ! -d $final_path \ test ! -d $config_path \ || ynh_die --message="There is already a directory: $config_path " -architecture=$(dpkg --print-architecture) -if [[ ! "$architecture" =~ ^(amd64|arm64|armhf)$ ]]; then - ynh_die "Jellyfin is not compatible with your architecture, $architecture, which is neither amd64, arm64, or armhf." 1 +if [[ ! "$YNH_ARCH" =~ ^(amd64|arm64|armhf)$ ]]; then + ynh_die "Jellyfin is not compatible with your architecture, $YNH_ARCH, which is neither amd64, arm64, or armhf." 1 fi #================================================= # STANDARD RESTORATION STEPS +#================================================= +# 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 + +if grep -q "^render:" /etc/group; then + # Add user to render group + adduser $app render +fi + #================================================= # OPEN PORTS #================================================= @@ -58,35 +70,28 @@ discovery_service=$discovery discovery_client=$discovery if [ $discovery -eq 1 ]; then - ynh_script_progression --message="Configuring firewall..." --weight=1 + ynh_script_progression --message="Configuring firewall..." --weight=1 - # Open port 1900 for service auto-discovery - if ynh_port_available --port=$discovery_service_port; then - ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port - else - discovery_service=0 - ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless." - fi + # Open port $discovery_service_port for service auto-discovery + if ynh_port_available --port=$discovery_service_port; then + ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port + else + discovery_service=0 + ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless." + fi - # Open port 7359 for client auto-discovery - if ynh_port_available --port=$discovery_client_port; then - ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port - else - discovery_client=0 - ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless." - fi + # Open port $discovery_client_port for client auto-discovery + if ynh_port_available --port=$discovery_client_port; then + ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port + else + discovery_client=0 + ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless." + fi fi ynh_app_setting_set --app=$app --key=discovery_service --value=$discovery_service ynh_app_setting_set --app=$app --key=discovery_client --value=$discovery_client -#================================================= -# 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 THE APP MAIN DIR #================================================= @@ -96,14 +101,6 @@ ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$config_path" ynh_restore_file --origin_path="/etc/default/jellyfin" --not_mandatory -#================================================= -# 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 - #================================================= # SPECIFIC RESTORATION #================================================= @@ -121,6 +118,32 @@ ynh_script_progression --message="Reinstalling packages..." --weight=7 install_jellyfin_packages +#================================================= +# 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 USER RIGHTS +#================================================= +ynh_script_progression --message="Restoring user rights..." + +# Restore permissions on app files +chown -R $app: $final_path +chown -R $app: $config_path + +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=2 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Allow Jellyfin to write into these directories +ynh_multimedia_addaccess $app + #================================================= # RESTORE SYSTEMD #================================================= @@ -129,6 +152,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig ynh_restore_file --origin_path="/etc/systemd/system/jellyfin.service.d" --not_mandatory systemctl enable jellyfin.service --quiet +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -142,22 +172,6 @@ needed_ports=() # Integrate service and require to expose the ports if needed yunohost service add $app --description="Jellyfin media center" ${needed_ports:+--needs_exposed_ports} "${needed_ports[@]}" -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - -#================================================= -# RESTORE USER RIGHTS -#================================================= -ynh_script_progression --message="Restoring user rights..." - -# Restore permissions on app files -chown -R $app: $final_path -chown -R $app: $config_path - #================================================= # START SYSTEMD SERVICE #================================================= @@ -165,16 +179,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15 -#================================================= -# YUNOHOST MULTIMEDIA INTEGRATION -#================================================= -ynh_script_progression --message="Adding multimedia directories..." --weight=2 - -# Build YunoHost multimedia directories -ynh_multimedia_build_main_dir -# Allow Jellyfin to write into these directories -ynh_multimedia_addaccess $app - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/update_version.sh b/scripts/update_version.sh index 8b56568..b2fd10f 100755 --- a/scripts/update_version.sh +++ b/scripts/update_version.sh @@ -12,76 +12,76 @@ source /usr/share/yunohost/helpers # Edit version numbers in _common.sh before running the script. prepare_source () { - # Declare an array to define the options of this helper. - local legacy_args=tda - local -A args_array=( [t]=template= [d]=destination= [a]=architecture= ) - local template - local destination - local architecture - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - local template_path + # Declare an array to define the options of this helper. + local legacy_args=tda + local -A args_array=( [t]=template= [d]=destination= [a]=architecture= ) + local template + local destination + local architecture + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + local template_path - if [ -f "../conf/$template" ]; then - template_path="../conf/$template" - elif [ -f "../settings/conf/$template" ]; then - template_path="../settings/conf/$template" - elif [ -f "$template" ]; then - template_path=$template - else - ynh_die --message="The provided template $template doesn't exist" - fi + if [ -f "../conf/$template" ]; then + template_path="../conf/$template" + elif [ -f "../settings/conf/$template" ]; then + template_path="../settings/conf/$template" + elif [ -f "$template" ]; then + template_path=$template + else + ynh_die --message="The provided template $template doesn't exist" + fi - cp "$template_path" "$destination" + cp "$template_path" "$destination" - ynh_replace_vars --file="$destination" + ynh_replace_vars --file="$destination" - local official_checksum - local official_checksum_url - local filename - local checksum - local url + local official_checksum + local official_checksum_url + local filename + local checksum + local url - # Create the temporary directory - tempdir="$(mktemp -d)" + # Create the temporary directory + tempdir="$(mktemp -d)" - url=$(grep "SOURCE_URL=" "$destination" | cut -d "=" -f 2) - echo $url - filename=${url##*/} - echo $filename - curl -s -4 -L $url -o "$tempdir/$filename" - checksum=$(sha256sum "$tempdir/$filename" | head -c 64) + url=$(grep "SOURCE_URL=" "$destination" | cut -d "=" -f 2) + echo $url + filename=${url##*/} + echo $filename + curl -s -4 -L $url -o "$tempdir/$filename" + checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - ynh_secure_remove $tempdir + ynh_secure_remove $tempdir - official_checksum_url=$(grep "SOURCE_SUM=" "$destination" | cut -d "=" -f 2) - if [[ "$official_checksum_url" != "none" ]]; then - official_checksum=$(curl -L -s "${official_checksum_url}" | cut -d ' ' -f 1) - echo $official_checksum - fi + official_checksum_url=$(grep "SOURCE_SUM=" "$destination" | cut -d "=" -f 2) + if [[ "$official_checksum_url" != "none" ]]; then + official_checksum=$(curl -L -s "${official_checksum_url}" | cut -d ' ' -f 1) + echo $official_checksum + fi - if [[ "$official_checksum_url" != "none" && "$official_checksum" != "$checksum" ]]; then - echo "Downloaded file checksum ($checksum) does not match official checksum ($official_checksum)" - exit 1 - else - sed -i "s/SOURCE_SUM=.*/SOURCE_SUM=${checksum}/" "$destination" - echo "$destination updated" - fi + if [[ "$official_checksum_url" != "none" && "$official_checksum" != "$checksum" ]]; then + echo "Downloaded file checksum ($checksum) does not match official checksum ($official_checksum)" + exit 1 + else + sed -i "s/SOURCE_SUM=.*/SOURCE_SUM=${checksum}/" "$destination" + echo "$destination updated" + fi } debians=("buster" "bullseye") architectures=("amd64" "arm64" "armhf") for debian in "${debians[@]}"; do for architecture in "${architectures[@]}"; do - prepare_source --template="../conf/ffmpeg.src.default" --destination="../conf/ffmpeg.$debian.$architecture.src" --architecture="$architecture" - prepare_source --template="../conf/web.src.default" --destination="../conf/web.$debian.$architecture.src" --architecture="$architecture" - prepare_source --template="../conf/server.src.default" --destination="../conf/server.$debian.$architecture.src" --architecture="$architecture" + prepare_source --template="../conf/ffmpeg.src.default" --destination="../conf/ffmpeg.$debian.$architecture.src" --architecture="$architecture" + prepare_source --template="../conf/web.src.default" --destination="../conf/web.$debian.$architecture.src" --architecture="$architecture" + prepare_source --template="../conf/server.src.default" --destination="../conf/server.$debian.$architecture.src" --architecture="$architecture" done done prepare_source --template="../conf/ldap.src.default" --destination="../conf/ldap.src" -sed -i "s# \"version\": \".*# \"version\": \"${version}\~ynh1\",#" ../manifest.json +sed -i "s# \"version\": \".*# \"version\": \"${version}\~ynh1\",#" ../manifest.json git add _common.sh ../manifest.json ../conf/ffmpeg.*.src ../conf/web.*.src ../conf/server.*.src ../conf/ldap.src git commit -m "Upgrade to v$version" diff --git a/scripts/upgrade b/scripts/upgrade index bf76cb7..1f16252 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,14 +30,37 @@ ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=3 + +# 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 +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# STANDARD UPGRADE STEPS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -architecture=$(dpkg --print-architecture) -if [[ ! "$architecture" =~ ^(amd64|arm64|armhf)$ ]]; then - ynh_die "Jellyfin is not compatible with your architecture, $architecture, which is neither amd64, arm64, or armhf." 1 +if [[ ! "$YNH_ARCH" =~ ^(amd64|arm64|armhf)$ ]]; then + ynh_die "Jellyfin is not compatible with your architecture, $YNH_ARCH, which is neither amd64, arm64, or armhf." 1 fi # If path keys do not exist, create them @@ -73,63 +96,62 @@ if [ -z "$discovery" ]; then fi if [ ! -f "/etc/logrotate.d/$app" ]; then - # Fix possibly missing file due to buggy restore: - ynh_use_logrotate + # Fix possibly missing file due to buggy restore: + ynh_use_logrotate fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=3 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= -# OPEN PORTS -#================================================= - discovery_service=$discovery discovery_client=$discovery if [ $discovery -eq 1 ]; then - ynh_script_progression --message="Configuring firewall..." --weight=1 + ynh_script_progression --message="Configuring firewall..." --weight=1 - # Open port 1900 for service auto-discovery - if ynh_port_available --port=$discovery_service_port; then - ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port - else - discovery_service=0 - ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless." - fi + # Open port $discovery_service_port for service auto-discovery + if ynh_port_available --port=$discovery_service_port; then + ynh_exec_warn_less yunohost firewall allow UDP $discovery_service_port + else + discovery_service=0 + ynh_print_warn --message="Port $discovery_service_port (for service auto-discovery) is not available. Continuing nonetheless." + fi - # Open port 7359 for client auto-discovery - if ynh_port_available --port=$discovery_client_port; then - ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port - else - discovery_client=0 - ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless." - fi + # Open port $discovery_client_port for client auto-discovery + if ynh_port_available --port=$discovery_client_port; then + ynh_exec_warn_less yunohost firewall allow UDP $discovery_client_port + else + discovery_client=0 + ynh_print_warn --message="Port $discovery_client_port (for client auto-discovery) is not available. Continuing nonetheless." + fi fi ynh_app_setting_set --app=$app --key=discovery_service --value=$discovery_service ynh_app_setting_set --app=$app --key=discovery_client --value=$discovery_client +#================================================= +# 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 + +if grep -q "^render:" /etc/group; then + # Add user to render group + adduser $app render +fi #================================================= -# STOP SYSTEMD SERVICE +# UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 +ynh_script_progression --message="Upgrading dependencies..." --weight=5 -ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# UPGRADE PACKAGES +#================================================= +ynh_script_progression --message="Upgrading packages..." --weight=3 + +install_jellyfin_packages #================================================= # NGINX CONFIGURATION @@ -140,31 +162,11 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - ynh_add_nginx_config #================================================= -# UPGRADE DEPENDENCIES +# SPECIFIC UPGRADE #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=5 - -ynh_install_app_dependencies $pkg_dependencies - +# UPDATE A CONFIG FILE #================================================= -# UPGRADE packages -#================================================= -ynh_script_progression --message="Upgrading packages..." --weight=3 - -install_jellyfin_packages - -#================================================= -# 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 - -#================================================= -# MODIFY A CONFIG FILE -#================================================= -ynh_script_progression --message="Setting up configuration files..." --weight=2 +ynh_script_progression --message="Updating a configuration file..." --weight=2 # TODO: investigate if we can avoid overriding system.xml #ynh_add_config --template="system.xml" --destination="$config_path/system.xml" @@ -180,6 +182,14 @@ ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --so mkdir -p /var/lib/jellyfin/plugins/configurations/ ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions on app files +chown -R $app: $final_path +chown -R $app: $config_path + #================================================= # YUNOHOST MULTIMEDIA INTEGRATION #================================================= @@ -192,20 +202,12 @@ ynh_multimedia_addaccess $app #================================================= # GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions on app files -chown -R $app: $final_path -chown -R $app: $config_path - #================================================= # SETUP LOGROTATE #================================================= -ynh_script_progression --message="Configuring log rotation..." --weight=1 +ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 -# Use logrotate to manage application logfile(s) +# Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append #================================================= From 3dc2a42c033a79cac83ff916acd4c30b3fdd7e0e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 18 Jul 2022 21:23:33 +0000 Subject: [PATCH 06/12] Auto-update README --- README.md | 5 +++-- README_fr.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4c212f4..d4840f5 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,10 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Media System that manage and stream your media. +Jellyfin enables you to collect, manage, and stream your media. Run the Jellyfin server on your system and gain access to the leading free-software entertainment system, bells and whistles included. -**Shipped version:** 10.8.0~ynh1 + +**Shipped version:** 10.8.0~ynh2 **Demo:** https://demo.jellyfin.org/stable/web/index.html diff --git a/README_fr.md b/README_fr.md index a9f4c67..f339db1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,9 +15,10 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Système multimédia qui gère et diffuse vos médias. +Jellyfin vous permet de collecter, gérer et diffuser vos médias. Exécutez le serveur Jellyfin sur votre système et accédez au principal système de divertissement à logiciel libre. -**Version incluse :** 10.8.0~ynh1 + +**Version incluse :** 10.8.0~ynh2 **Démo :** https://demo.jellyfin.org/stable/web/index.html From 7742b70e52b9509cbd95c3f50dff41990896c1b6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 Jul 2022 14:28:06 +0200 Subject: [PATCH 07/12] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2cc02ee..fe7d6f8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -87,7 +87,7 @@ install_jellyfin_packages() { ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-server.deb ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-web.deb - rm -rf "$tempdir" + ynh_secure_remove --file="$tempdir" # The doc says it should be called only once, # but the code says multiple calls are supported. From d45f1650cfa1fd050fbebe35cc37193dfdc6fa9d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 19 Jul 2022 17:31:14 +0200 Subject: [PATCH 08/12] reorder package removal --- scripts/remove | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/remove b/scripts/remove index 0c70619..efcea10 100644 --- a/scripts/remove +++ b/scripts/remove @@ -51,6 +51,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=3 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE PACKAGES #================================================= @@ -60,14 +68,6 @@ dpkg --remove jellyfin-web dpkg --remove jellyfin-server dpkg --remove jellyfin-ffmpeg5 -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=3 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # CLOSE A PORT #================================================= From 286f95be9769dc70bab690b1fd7cff9768569ca7 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Jul 2022 02:22:33 +0200 Subject: [PATCH 09/12] Update remove --- scripts/remove | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/remove b/scripts/remove index efcea10..7bc6f51 100644 --- a/scripts/remove +++ b/scripts/remove @@ -95,6 +95,9 @@ ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$config_path" ynh_secure_remove --file="/etc/systemd/system/jellyfin.service.d" +# Remove the log files +ynh_secure_remove --file="/var/log/$app" + #================================================= # GENERIC FINALIZATION #================================================= From 7c596bbe23c919ed366ffb6cba53293ebdb0daba Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 20 Jul 2022 02:24:24 +0200 Subject: [PATCH 10/12] Fix CannotOpen: SQLitePCL.pretty.SQLiteException: unable to open database file --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index fe7d6f8..c31f7e5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -83,9 +83,9 @@ install_jellyfin_packages() { ynh_setup_source --dest_dir=$tempdir --source_id="web.$debian.$YNH_ARCH" # Install the packages + ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-web.deb ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-ffmpeg5.deb ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-server.deb - ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-web.deb ynh_secure_remove --file="$tempdir" @@ -93,9 +93,9 @@ install_jellyfin_packages() { # but the code says multiple calls are supported. # Also, they're already installed so that should be quasi instantaneous. ynh_install_app_dependencies \ + jellyfin-web="$pkg_version" \ jellyfin-ffmpeg5="$ffmpeg_pkg_version-$debian" \ - jellyfin-server="$pkg_version" \ - jellyfin-web="$pkg_version" + jellyfin-server="$pkg_version" } #================================================= From 433e48d5e901f7de2dea41e540ffa7dbdea9ba96 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 20 Jul 2022 07:59:24 +0000 Subject: [PATCH 11/12] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 4d5681c..5647854 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Jellyfin enables you to collect, manage, and stream your media. Run the Jellyfin server on your system and gain access to the leading free-software entertainment system, bells and whistles included. + **Shipped version:** 10.8.1~ynh1 **Demo:** https://demo.jellyfin.org/stable/web/index.html diff --git a/README_fr.md b/README_fr.md index 6119539..a3c7354 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,6 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Jellyfin vous permet de collecter, gérer et diffuser vos médias. Exécutez le serveur Jellyfin sur votre système et accédez au principal système de divertissement à logiciel libre. + **Version incluse :** 10.8.1~ynh1 **Démo :** https://demo.jellyfin.org/stable/web/index.html From 35725e60a659118d2036472a94d6af5ccf63edbf Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 24 Jul 2022 09:05:53 +0200 Subject: [PATCH 12/12] Update scripts/restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index ab9c8b3..33b28e6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -155,7 +155,7 @@ systemctl enable jellyfin.service --quiet #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 +ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 ynh_restore_file --origin_path="/etc/logrotate.d/$app"