From 232973c548b3ecf511ff6e9a3c4cba19d6a1a3f1 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 14:52:23 +0100 Subject: [PATCH 01/28] fix url of old versions --- scripts/install | 11 +++++++++++ scripts/restore | 11 +++++++++++ scripts/upgrade | 11 +++++++++++ 3 files changed, 33 insertions(+) diff --git a/scripts/install b/scripts/install index 3466d03..3d7e65d 100644 --- a/scripts/install +++ b/scripts/install @@ -108,7 +108,18 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +# 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 +src_url=$(grep 'SOURCE_URL=' "../conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" + +# Same for web +src_url=$(grep 'SOURCE_URL=' "../conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages diff --git a/scripts/restore b/scripts/restore index b2e9f84..3280425 100644 --- a/scripts/restore +++ b/scripts/restore @@ -116,7 +116,18 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +# 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 +src_url=$(grep 'SOURCE_URL=' "../conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" + +# Same for web +src_url=$(grep 'SOURCE_URL=' "../conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages diff --git a/scripts/upgrade b/scripts/upgrade index ce19637..13747c5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -144,7 +144,18 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +# 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 +src_url=$(grep 'SOURCE_URL=' "../conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" + +# Same for web +src_url=$(grep 'SOURCE_URL=' "../conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" +fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages From 65d39036a26286ffba1da17b6805d584a6d9722c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 14:52:59 +0100 Subject: [PATCH 02/28] add pkg_dependencies --- scripts/_common.sh | 4 ++++ scripts/install | 15 +++++++++++---- scripts/remove | 15 +++++++++++---- scripts/restore | 16 ++++++++++++---- scripts/upgrade | 15 +++++++++++---- 5 files changed, 49 insertions(+), 16 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 2995370..be01c38 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,6 +16,10 @@ architecture=$(dpkg --print-architecture) discovery_service_port=1900 discovery_client_port=7359 +ffmpeg_deps="libass9 libbluray2 libc6 libdrm-intel1 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 libopencl1 zlib1g" +jellyfin_deps="at libsqlite3-0 libfontconfig1 libfreetype6 libssl1.1" +pkg_dependencies="$ffmpeg_deps $jellyfin_deps" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 3d7e65d..a928f1e 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,14 @@ ynh_app_setting_set --app=$app --key=discovery_client --value=$discovery_client #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 +ynh_script_progression --message="Installing dependencies..." --weight=5 + +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# INSTALL PACKAGES +#================================================= +ynh_script_progression --message="Installing packages..." --weight=1 # Create the temporary directory tempdir="$(mktemp -d)" @@ -123,9 +130,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-ffmpeg.deb -y -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-server.deb -y -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-web.deb -y +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb #================================================= # NGINX CONFIGURATION diff --git a/scripts/remove b/scripts/remove index ad0998e..63a7177 100644 --- a/scripts/remove +++ b/scripts/remove @@ -38,11 +38,18 @@ fi #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 +ynh_script_progression --message="Removing dependencies" --weight=3 -apt-get remove jellyfin-web -y -apt-get remove jellyfin-server -y -apt-get remove jellyfin-ffmpeg -y +ynh_remove_app_dependencies + +#================================================= +# REMOVE PACKAGES +#================================================= +ynh_script_progression --message="Removing packages..." --weight=1 + +dpkg --remove jellyfin-web +dpkg --remove jellyfin-server +dpkg --remove jellyfin-ffmpeg #================================================= # REMOVE APP DIRECTORIES diff --git a/scripts/restore b/scripts/restore index 3280425..ec2c518 100644 --- a/scripts/restore +++ b/scripts/restore @@ -109,7 +109,15 @@ ynh_system_user_create --username=$app #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=7 +ynh_script_progression --message="Reinstalling dependencies..." --weight=5 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# REINSTALL PACKAGES +#================================================= +ynh_script_progression --message="Reinstalling packages..." --weight=7 # Create the temporary directory tempdir="$(mktemp -d)" @@ -131,9 +139,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-ffmpeg.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-server.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-web.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb --force-confdef --force-confold +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb --force-confdef --force-confold +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb --force-confdef --force-confold #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 13747c5..f7ac544 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,7 +137,14 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=3 +ynh_script_progression --message="Upgrading dependencies..." --weight=5 + +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# UPGRADE packages +#================================================= +ynh_script_progression --message="Upgrading packages..." --weight=3 # Create the temporary directory tempdir="$(mktemp -d)" @@ -159,9 +166,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-ffmpeg.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-server.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -ynh_exec_warn_less apt-get -f install $tempdir/jellyfin-web.deb -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb --force-confdef --force-confnew +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb --force-confdef --force-confnew +ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb --force-confdef --force-confnew #================================================= # CREATE DEDICATED USER From 96cb21fff833bec88698abd7ae3f0914a9732d40 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 14:53:13 +0100 Subject: [PATCH 03/28] bump ldap plugin --- conf/ldap.src | 4 ++-- scripts/_common.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/ldap.src b/conf/ldap.src index cb0025b..aeee6fe 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_12.0.0.0.zip -SOURCE_SUM=e3ef05fdb0cce145504a34595aefe568e47964e981017d9ccb87f39e58fff861 +SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_14.0.0.0.zip +SOURCE_SUM=7e09c87b698b3315357139468ec601b1395b2e88cb940c20d3e716f9bf48a37c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/scripts/_common.sh b/scripts/_common.sh index be01c38..398d363 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ pkg_version="10.7.7-1" version=$(echo "$pkg_version" | cut -d '-' -f 1) ffmpeg_pkg_version="4.3.2-1" -ldap_pkg_version="12.0.0.0" +ldap_pkg_version="14.0.0.0" architecture=$(dpkg --print-architecture) From cb09f4ec353195aaa0a5e27ed76e3e416ef45ff5 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 14:55:10 +0100 Subject: [PATCH 04/28] ... --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 63a7177..31c288c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -38,7 +38,7 @@ fi #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies" --weight=3 +ynh_script_progression --message="Removing dependencies..." --weight=3 ynh_remove_app_dependencies From b7203a166ac523e7204ffc53da60bc0d9efc5c0c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 15:28:11 +0100 Subject: [PATCH 05/28] fix conf path in restore script --- scripts/restore | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/restore b/scripts/restore index ec2c518..2bda156 100644 --- a/scripts/restore +++ b/scripts/restore @@ -125,16 +125,16 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" # 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 -src_url=$(grep 'SOURCE_URL=' "../conf/server.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../settings/conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../settings/conf/server.$architecture.src" fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" # Same for web -src_url=$(grep 'SOURCE_URL=' "../conf/web.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../settings/conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../settings/conf/web.$architecture.src" fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" From 76c751668f2dc8cc54c30d58862100c43e3294a8 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 13 Dec 2021 15:28:23 +0100 Subject: [PATCH 06/28] fix dpkg options --- scripts/restore | 6 +++--- scripts/upgrade | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/restore b/scripts/restore index 2bda156..f04d7fe 100644 --- a/scripts/restore +++ b/scripts/restore @@ -139,9 +139,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb --force-confdef --force-confold -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb --force-confdef --force-confold -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb --force-confdef --force-confold +ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-ffmpeg.deb +ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-server.deb +ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-web.deb #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index f7ac544..74ae232 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -166,9 +166,9 @@ fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" # Install the packages -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb --force-confdef --force-confnew -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-server.deb --force-confdef --force-confnew -ynh_exec_warn_less dpkg -i $tempdir/jellyfin-web.deb --force-confdef --force-confnew +ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-ffmpeg.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 #================================================= # CREATE DEDICATED USER From af742c43496067c500304a53c271b5142aa16853 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 14:31:26 +0000 Subject: [PATCH 07/28] LDAP plugin v14 is not compatible with current version. Rolling back. --- conf/ldap.src | 4 ++-- scripts/_common.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/ldap.src b/conf/ldap.src index aeee6fe..cb0025b 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_14.0.0.0.zip -SOURCE_SUM=7e09c87b698b3315357139468ec601b1395b2e88cb940c20d3e716f9bf48a37c +SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_12.0.0.0.zip +SOURCE_SUM=e3ef05fdb0cce145504a34595aefe568e47964e981017d9ccb87f39e58fff861 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/scripts/_common.sh b/scripts/_common.sh index 398d363..be01c38 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ pkg_version="10.7.7-1" version=$(echo "$pkg_version" | cut -d '-' -f 1) ffmpeg_pkg_version="4.3.2-1" -ldap_pkg_version="14.0.0.0" +ldap_pkg_version="12.0.0.0" architecture=$(dpkg --print-architecture) From cc2a61acff6275cc40b06e040357dbc5503568db Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 14:32:18 +0000 Subject: [PATCH 08/28] Fixing dependencies for ARM64 --- scripts/_common.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index be01c38..3f135a0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,7 +16,12 @@ architecture=$(dpkg --print-architecture) discovery_service_port=1900 discovery_client_port=7359 -ffmpeg_deps="libass9 libbluray2 libc6 libdrm-intel1 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 libopencl1 zlib1g" +if [ $architecture == "arm64" ]; then + ffmpeg_deps="libass9 libbluray2 libc6 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 zlib1g" +else + ffmpeg_deps="libass9 libbluray2 libc6 libdrm-intel1 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 libopencl1 zlib1g" +fi + jellyfin_deps="at libsqlite3-0 libfontconfig1 libfreetype6 libssl1.1" pkg_dependencies="$ffmpeg_deps $jellyfin_deps" From 913f46cf5a710759bc0892d81b02b0ba63689f5c Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 14:35:48 +0000 Subject: [PATCH 09/28] Simplify configuration files --- scripts/install | 29 ++++------------------------- scripts/upgrade | 40 +++++----------------------------------- 2 files changed, 9 insertions(+), 60 deletions(-) diff --git a/scripts/install b/scripts/install index a928f1e..d0e2cce 100644 --- a/scripts/install +++ b/scripts/install @@ -160,32 +160,11 @@ fi #================================================= ynh_script_progression --message="Configuring the settings..." --weight=1 -# Set permissions to app files -chown -R $app: $final_path - -# Load services once to generate system.xml -ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 -# Port config -ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" -ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" - -# Enable IPv6 -ynh_replace_string --match_string="false" --replace_string="true" --target_file="$config_path/network.xml" - -# BaseUrl config -ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="$config_path/network.xml" - -# Disable Setup Wizard -ynh_replace_string --match_string="false" --replace_string="true" --target_file="$config_path/system.xml" - -# Lower logging verbosity -cp "$config_path/logging.default.json" "$config_path/logging.json" -ynh_replace_string --match_string="\"Default\": \"Information\"" --replace_string="\"Default\": \"Error\"" --target_file="$config_path/logging.json" - -ynh_store_file_checksum --file="$config_path/network.xml" -ynh_store_file_checksum --file="$config_path/system.xml" +ynh_add_config --template="system.xml" --destination="$config_path/system.xml" +ynh_add_config --template="network.xml" --destination="$config_path/network.xml" +ynh_add_config --template="logging.json" --destination="$config_path/logging.json" #================================================= # INSTALL LDAP PLUGIN @@ -194,7 +173,7 @@ ynh_script_progression --message="Installing LDAP plugin..." --weight=2 ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --source_id=ldap mkdir -p /var/lib/jellyfin/plugins/configurations/ -ynh_add_config --template="../conf/LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" +ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 74ae232..0bbfc4e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -181,41 +181,11 @@ ynh_system_user_create --username=$app #================================================= # MODIFY A CONFIG FILE #================================================= +ynh_script_progression --message="Setting up configuration files..." --weight=2 -# Check if network.xml exists (introduced in v10.7) -if [ -f "/etc/jellyfin/network.xml" ]; then - ynh_script_progression --message="Configuring the settings..." --weight=1 - - ynh_backup_if_checksum_is_different --file="$config_path/network.xml" - ynh_backup_if_checksum_is_different --file="$config_path/system.xml" - - # Set permissions to app files - chown -R $app: $final_path - - # Load services once to generate network.xml - ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd" --line_match="Started Jellyfin Media Server" --timeout=15 - ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 - - # Port config - ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" - ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="$config_path/network.xml" - - # Enable IPv6 - ynh_replace_string --match_string="false" --replace_string="true" --target_file="$config_path/network.xml" - - # BaseUrl config - ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="$config_path/network.xml" - - ynh_store_file_checksum --file="$config_path/network.xml" - ynh_store_file_checksum --file="$config_path/system.xml" -fi - -# Lower logging verbosity -# But first, if missing, copy it from its template -if [ ! -f "$config_path/logging.json" ]; then - cp "$config_path/logging.default.json" "$config_path/logging.json" -fi -ynh_exec_fully_quiet ynh_replace_string --match_string="\"Default\": \"Information\"" --replace_string="\"Default\": \"Error\"" --target_file="$config_path/logging.json" +ynh_add_config --template="system.xml" --destination="$config_path/system.xml" +ynh_add_config --template="network.xml" --destination="$config_path/network.xml" +ynh_add_config --template="logging.json" --destination="$config_path/logging.json" #================================================= # INSTALL LDAP PLUGIN @@ -224,7 +194,7 @@ ynh_script_progression --message="Installing LDAP plugin..." --weight=2 ynh_setup_source --dest_dir="/var/lib/jellyfin/plugins/LDAP Authentication" --source_id=ldap mkdir -p /var/lib/jellyfin/plugins/configurations/ -ynh_add_config --template="../conf/LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" +ynh_add_config --template="LDAP-Auth.xml" --destination="/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml" #================================================= # GENERIC FINALIZATION From bc272cfd47d5a6c31b61c4cfdfe2bc736fd7204c Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 14:36:54 +0000 Subject: [PATCH 10/28] No need to backup service file, it's included in deb files --- scripts/backup | 1 - scripts/restore | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/backup b/scripts/backup index aa00def..18038d9 100644 --- a/scripts/backup +++ b/scripts/backup @@ -61,7 +61,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= ynh_backup --src_path="/etc/systemd/system/jellyfin.service.d" --not_mandatory -ynh_backup --src_path="/lib/systemd/system/jellyfin.service" #================================================= # BACKUP VARIOUS FILES diff --git a/scripts/restore b/scripts/restore index f04d7fe..2d796bb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -149,7 +149,6 @@ ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-web ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 ynh_restore_file --origin_path="/etc/systemd/system/jellyfin.service.d" --not_mandatory -ynh_restore_file --origin_path="/lib/systemd/system/jellyfin.service" systemctl enable jellyfin.service --quiet #================================================= From 83b7b08d9a15b5186ee978737cf88e6e332f11ea Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 15:22:48 +0000 Subject: [PATCH 11/28] Add the configuration files... --- conf/logging.json | 38 +++++++++ conf/network.xml | 35 +++++++++ conf/system.xml | 195 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 268 insertions(+) create mode 100644 conf/logging.json create mode 100644 conf/network.xml create mode 100644 conf/system.xml diff --git a/conf/logging.json b/conf/logging.json new file mode 100644 index 0000000..359bfa4 --- /dev/null +++ b/conf/logging.json @@ -0,0 +1,38 @@ +{ + "Serilog": { + "MinimumLevel": { + "Default": "Error", + "Override": { + "Microsoft": "Warning", + "System": "Warning" + } + }, + "WriteTo": [ + { + "Name": "Console", + "Args": { + "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}" + } + }, + { + "Name": "Async", + "Args": { + "configure": [ + { + "Name": "File", + "Args": { + "path": "%JELLYFIN_LOG_DIR%//log_.log", + "rollingInterval": "Day", + "retainedFileCountLimit": 3, + "rollOnFileSizeLimit": true, + "fileSizeLimitBytes": 100000000, + "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message}{NewLine}{Exception}" + } + } + ] + } + } + ], + "Enrich": [ "FromLogContext", "WithThreadId" ] + } +} diff --git a/conf/network.xml b/conf/network.xml new file mode 100644 index 0000000..1d60af9 --- /dev/null +++ b/conf/network.xml @@ -0,0 +1,35 @@ + + + false + + + __PATH__ + 8920 + __PORT__ + 8920 + false + __PORT__ + false + + true + true + false + + 2 + 100 + true + vEthernet* + 60 + false + + + false + true + + false + true + true + + + + diff --git a/conf/system.xml b/conf/system.xml new file mode 100644 index 0000000..6e2ed94 --- /dev/null +++ b/conf/system.xml @@ -0,0 +1,195 @@ + + + 3 + true + true + false + __PORT__ + false + + true + true + false + + 2 + 100 + true + vEthernet* + 60 + false + + + false + true + 8920 + __PORT__ + 8920 + false + true + + + true + false + true + true + true + + + en + US + + . + + + % + + + , + & + - + { + } + ' + + + the + a + an + + 5 + 90 + 300 + 5 + 5 + 60 + true + Legacy + + + Book + + + + + + + + + Movie + + + + + + + + + MusicVideo + + + + The Open Movie Database + + + + The Open Movie Database + + + + + Series + + + + + + + + + MusicAlbum + + + + TheAudioDB + + + + + + + MusicArtist + + + + TheAudioDB + + + + + + + BoxSet + + + + + + + + + Season + + + + + + + + + Episode + + + + + + + + + true + + + en-US + false + + 0 + false + false + true + + + + + + Jellyfin Stable + https://repo.jellyfin.org/releases/plugin/manifest-stable.json + true + + + true + false + true + + false + 0 + + + true + 500 + + * + + + 30 + 0 + 0 + false + From d196b947b33030b00989f258346be28a29021fa2 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 17:02:38 +0000 Subject: [PATCH 12/28] Update check_process --- check_process | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/check_process b/check_process index c1fd17c..f2acfeb 100644 --- a/check_process +++ b/check_process @@ -1,14 +1,12 @@ # See here for more information # https://github.com/YunoHost/package_check#syntax-check_process-file -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + admin="john" + is_public=1 discovery=1 ; Checks pkg_linter=1 @@ -18,18 +16,6 @@ setup_private=1 setup_public=1 upgrade=1 - # 10.6.4~ynh1 - #upgrade=1 from_commit=dc5ab412fe599ce6d558c2f55fe53d2c21956c08 - # 10.6.4~ynh2 - #upgrade=1 from_commit=2aab8003d64ffabe65bd11ebe5933cfef519b061 - # 10.6.4~ynh3 - #upgrade=1 from_commit=5478712c0ca7683503bc1b50cfafe81ea508065e - # 10.7.0~ynh1 - #upgrade=1 from_commit=63ab03ab79cc088a52b8a36fb4fdf5918bf0e14b - # 10.7.5~ynh1 - #upgrade=1 from_commit=8ed403b30a8d3e61e2d3bf5bc8d3f4cae1ed80b6 - # 10.7.6~ynh1 - upgrade=1 from_commit=227b2cb8661b59ba391802637d0893976ffb6dd4 backup_restore=1 multi_instance=0 port_already_use=0 @@ -38,15 +24,5 @@ Email= Notification=none ;;; Upgrade options - ; commit=dc5ab412fe599ce6d558c2f55fe53d2c21956c08 - name=10.6.4~ynh1 - ; commit=2aab8003d64ffabe65bd11ebe5933cfef519b061 - name=10.6.4~ynh2 - ; commit=5478712c0ca7683503bc1b50cfafe81ea508065e - name=10.6.4~ynh3 - ; commit=63ab03ab79cc088a52b8a36fb4fdf5918bf0e14b - name=10.7.0~ynh1 - ; commit=8ed403b30a8d3e61e2d3bf5bc8d3f4cae1ed80b6 - name=10.7.5~ynh1 - ; commit=227b2cb8661b59ba391802637d0893976ffb6dd4 - name=10.7.6~ynh1 +# ; commit= +# name= From cc62a2953a048e0d6cf58461dc037a443507076c Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sat, 22 Jan 2022 22:42:36 +0100 Subject: [PATCH 13/28] Bump package version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 6957392..b7903c9 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.7.7~ynh1", + "version": "10.7.7~ynh2", "url": "https://jellyfin.org", "upstream": { "license": "GPL-2.0-only", From 4934fbef3644c15e0e322a98420aa67f3ce383d7 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 22 Jan 2022 21:42:44 +0000 Subject: [PATCH 14/28] 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 713ffe0..8efd03f 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.7.7~ynh1 +**Shipped version:** 10.7.7~ynh2 **Demo:** https://demo.jellyfin.org/stable/web/index.html diff --git a/README_fr.md b/README_fr.md index 4d0183c..010511f 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 Système multimédia qui gère et diffuse vos médias. -**Version incluse :** 10.7.7~ynh1 +**Version incluse :** 10.7.7~ynh2 **Démo :** https://demo.jellyfin.org/stable/web/index.html From 4168e73bb54a4ec1cb76608a75152706f28779e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 14 Feb 2022 20:47:01 +0100 Subject: [PATCH 15/28] Fix dependency package list : switch on architecture and release. --- scripts/_common.sh | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 3f135a0..04ae441 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,14 +16,45 @@ architecture=$(dpkg --print-architecture) discovery_service_port=1900 discovery_client_port=7359 -if [ $architecture == "arm64" ]; then - ffmpeg_deps="libass9 libbluray2 libc6 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 zlib1g" -else - ffmpeg_deps="libass9 libbluray2 libc6 libdrm-intel1 libdrm2 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgmp10 libgnutls30 libmp3lame0 libopus0 libstdc++6 libtheora0 libvdpau1 libvorbis0a libvorbisenc2 libvpx5 libwebp6 libwebpmux3 libx11-6 libx264-155 libx265-165 libzvbi0 libopencl1 zlib1g" -fi +ffmpeg_deps=( + libass9 + libbluray2 + libc6 + libdrm2 + libfontconfig1 + libfreetype6 + libfribidi0 + libgcc1 + libgmp10 + libgnutls30 + libmp3lame0 + libopus0 + libstdc++6 + libtheora0 + libvdpau1 + libvorbis0a + libvorbisenc2 + libwebp6 + libwebpmux3 + libx11-6 + libzvbi0 + zlib1g +) -jellyfin_deps="at libsqlite3-0 libfontconfig1 libfreetype6 libssl1.1" -pkg_dependencies="$ffmpeg_deps $jellyfin_deps" +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 ;; +esac +case "$architecture" in + arm64) : ;; + armhf) : ;; + *) ffmpeg_deps+=( libdrm-intel1 libopencl1 ) ;; +esac + +jellyfin_deps=(at libsqlite3-0 libfontconfig1 libfreetype6 libssl1.1) + +pkg_dependencies="${ffmpeg_deps[*]} ${jellyfin_deps[*]}" #================================================= # PERSONAL HELPERS From 418baacd125577f627417e98d715596702ae7561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 14 Feb 2022 21:10:16 +0100 Subject: [PATCH 16/28] Generate buster and bullseye source files --- conf/ffmpeg.bullseye.amd64.src | 7 +++++++ conf/ffmpeg.bullseye.arm64.src | 7 +++++++ conf/ffmpeg.bullseye.armhf.src | 7 +++++++ conf/{ffmpeg.amd64.src => ffmpeg.buster.amd64.src} | 0 conf/{ffmpeg.arm64.src => ffmpeg.buster.arm64.src} | 0 conf/{ffmpeg.armhf.src => ffmpeg.buster.armhf.src} | 0 ...{server.amd64.src => server.bullseye.amd64.src} | 0 ...{server.arm64.src => server.bullseye.arm64.src} | 0 ...{server.armhf.src => server.bullseye.armhf.src} | 0 conf/server.buster.amd64.src | 7 +++++++ conf/server.buster.arm64.src | 7 +++++++ conf/server.buster.armhf.src | 7 +++++++ conf/{web.amd64.src => web.bullseye.amd64.src} | 0 conf/{web.arm64.src => web.bullseye.arm64.src} | 0 conf/{web.armhf.src => web.bullseye.armhf.src} | 0 conf/web.buster.amd64.src | 7 +++++++ conf/web.buster.arm64.src | 7 +++++++ conf/web.buster.armhf.src | 7 +++++++ scripts/install | 14 +++++++------- scripts/restore | 8 ++++---- scripts/update_version.sh | 11 +++++++---- scripts/upgrade | 8 ++++---- 22 files changed, 85 insertions(+), 19 deletions(-) create mode 100644 conf/ffmpeg.bullseye.amd64.src create mode 100644 conf/ffmpeg.bullseye.arm64.src create mode 100644 conf/ffmpeg.bullseye.armhf.src rename conf/{ffmpeg.amd64.src => ffmpeg.buster.amd64.src} (100%) rename conf/{ffmpeg.arm64.src => ffmpeg.buster.arm64.src} (100%) rename conf/{ffmpeg.armhf.src => ffmpeg.buster.armhf.src} (100%) rename conf/{server.amd64.src => server.bullseye.amd64.src} (100%) rename conf/{server.arm64.src => server.bullseye.arm64.src} (100%) rename conf/{server.armhf.src => server.bullseye.armhf.src} (100%) create mode 100644 conf/server.buster.amd64.src create mode 100644 conf/server.buster.arm64.src create mode 100644 conf/server.buster.armhf.src rename conf/{web.amd64.src => web.bullseye.amd64.src} (100%) rename conf/{web.arm64.src => web.bullseye.arm64.src} (100%) rename conf/{web.armhf.src => web.bullseye.armhf.src} (100%) create mode 100644 conf/web.buster.amd64.src create mode 100644 conf/web.buster.arm64.src create mode 100644 conf/web.buster.armhf.src diff --git a/conf/ffmpeg.bullseye.amd64.src b/conf/ffmpeg.bullseye.amd64.src new file mode 100644 index 0000000..985087a --- /dev/null +++ b/conf/ffmpeg.bullseye.amd64.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/4.3.2-1/jellyfin-ffmpeg_4.3.2-1-bullseye_amd64.deb +SOURCE_SUM=00bfda23ba65427566a50ce17876973c20350b69cd9ebd069cd7c6f7706414e8 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-ffmpeg.deb diff --git a/conf/ffmpeg.bullseye.arm64.src b/conf/ffmpeg.bullseye.arm64.src new file mode 100644 index 0000000..23b778c --- /dev/null +++ b/conf/ffmpeg.bullseye.arm64.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/4.3.2-1/jellyfin-ffmpeg_4.3.2-1-bullseye_arm64.deb +SOURCE_SUM=e8dce4cc4904cae5efaa2ab1f0dd6345ab840548f944352628827696a2d9625f +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-ffmpeg.deb diff --git a/conf/ffmpeg.bullseye.armhf.src b/conf/ffmpeg.bullseye.armhf.src new file mode 100644 index 0000000..1f758b0 --- /dev/null +++ b/conf/ffmpeg.bullseye.armhf.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/4.3.2-1/jellyfin-ffmpeg_4.3.2-1-bullseye_armhf.deb +SOURCE_SUM=1d02c43218d785e4e2218a413950a6c16ab852e3e409ddad494a1ae5cf5a7e02 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-ffmpeg.deb diff --git a/conf/ffmpeg.amd64.src b/conf/ffmpeg.buster.amd64.src similarity index 100% rename from conf/ffmpeg.amd64.src rename to conf/ffmpeg.buster.amd64.src diff --git a/conf/ffmpeg.arm64.src b/conf/ffmpeg.buster.arm64.src similarity index 100% rename from conf/ffmpeg.arm64.src rename to conf/ffmpeg.buster.arm64.src diff --git a/conf/ffmpeg.armhf.src b/conf/ffmpeg.buster.armhf.src similarity index 100% rename from conf/ffmpeg.armhf.src rename to conf/ffmpeg.buster.armhf.src diff --git a/conf/server.amd64.src b/conf/server.bullseye.amd64.src similarity index 100% rename from conf/server.amd64.src rename to conf/server.bullseye.amd64.src diff --git a/conf/server.arm64.src b/conf/server.bullseye.arm64.src similarity index 100% rename from conf/server.arm64.src rename to conf/server.bullseye.arm64.src diff --git a/conf/server.armhf.src b/conf/server.bullseye.armhf.src similarity index 100% rename from conf/server.armhf.src rename to conf/server.bullseye.armhf.src diff --git a/conf/server.buster.amd64.src b/conf/server.buster.amd64.src new file mode 100644 index 0000000..bbf422f --- /dev/null +++ b/conf/server.buster.amd64.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.7.7/jellyfin-server_10.7.7-1_amd64.deb +SOURCE_SUM=938c8be07e2d183b4ee23a0f01f78d140ecb7f58aadc7c0a6105b2e4382c7a4e +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-server.deb diff --git a/conf/server.buster.arm64.src b/conf/server.buster.arm64.src new file mode 100644 index 0000000..46a191e --- /dev/null +++ b/conf/server.buster.arm64.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.7.7/jellyfin-server_10.7.7-1_arm64.deb +SOURCE_SUM=0c42e615382fa567d8e274e77a65632f878680536eaf2bd77fb13a09dc59ada9 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-server.deb diff --git a/conf/server.buster.armhf.src b/conf/server.buster.armhf.src new file mode 100644 index 0000000..1968dd0 --- /dev/null +++ b/conf/server.buster.armhf.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.7.7/jellyfin-server_10.7.7-1_armhf.deb +SOURCE_SUM=685931c972ad044fbdc2ccbea07a5aaf75f93e99562ea799cd6e5a7ac4bdb0cf +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-server.deb diff --git a/conf/web.amd64.src b/conf/web.bullseye.amd64.src similarity index 100% rename from conf/web.amd64.src rename to conf/web.bullseye.amd64.src diff --git a/conf/web.arm64.src b/conf/web.bullseye.arm64.src similarity index 100% rename from conf/web.arm64.src rename to conf/web.bullseye.arm64.src diff --git a/conf/web.armhf.src b/conf/web.bullseye.armhf.src similarity index 100% rename from conf/web.armhf.src rename to conf/web.bullseye.armhf.src diff --git a/conf/web.buster.amd64.src b/conf/web.buster.amd64.src new file mode 100644 index 0000000..25cac6c --- /dev/null +++ b/conf/web.buster.amd64.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.7.7/jellyfin-web_10.7.7-1_all.deb +SOURCE_SUM=ca06cc1be55cb0393de9cd002e5cd422b7746c68341125b8f4c18907c59647c8 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-web.deb diff --git a/conf/web.buster.arm64.src b/conf/web.buster.arm64.src new file mode 100644 index 0000000..25cac6c --- /dev/null +++ b/conf/web.buster.arm64.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.7.7/jellyfin-web_10.7.7-1_all.deb +SOURCE_SUM=ca06cc1be55cb0393de9cd002e5cd422b7746c68341125b8f4c18907c59647c8 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-web.deb diff --git a/conf/web.buster.armhf.src b/conf/web.buster.armhf.src new file mode 100644 index 0000000..25cac6c --- /dev/null +++ b/conf/web.buster.armhf.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.7.7/jellyfin-web_10.7.7-1_all.deb +SOURCE_SUM=ca06cc1be55cb0393de9cd002e5cd422b7746c68341125b8f4c18907c59647c8 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-web.deb diff --git a/scripts/install b/scripts/install index d0e2cce..2f10c97 100644 --- a/scripts/install +++ b/scripts/install @@ -114,20 +114,20 @@ ynh_script_progression --message="Installing packages..." --weight=1 tempdir="$(mktemp -d)" # Download the deb files -ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$debian.$architecture" # 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 -src_url=$(grep 'SOURCE_URL=' "../conf/server.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$debian.$architecture.src" fi -ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="server.$debian.$architecture" # Same for web -src_url=$(grep 'SOURCE_URL=' "../conf/web.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$debian.$architecture.src" fi -ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="web.$debian.$architecture" # Install the packages ynh_exec_warn_less dpkg -i $tempdir/jellyfin-ffmpeg.deb diff --git a/scripts/restore b/scripts/restore index 2d796bb..e1dfdd3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -125,16 +125,16 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" # 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 -src_url=$(grep 'SOURCE_URL=' "../settings/conf/server.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../settings/conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../settings/conf/server.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../settings/conf/server.$debian.$architecture.src" fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" # Same for web -src_url=$(grep 'SOURCE_URL=' "../settings/conf/web.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../settings/conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../settings/conf/web.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../settings/conf/web.$debian.$architecture.src" fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" diff --git a/scripts/update_version.sh b/scripts/update_version.sh index cc07c74..8b56568 100755 --- a/scripts/update_version.sh +++ b/scripts/update_version.sh @@ -69,11 +69,14 @@ prepare_source () { fi } +debians=("buster" "bullseye") architectures=("amd64" "arm64" "armhf") -for architecture in "${architectures[@]}"; do - prepare_source --template="../conf/ffmpeg.src.default" --destination="../conf/ffmpeg.$architecture.src" --architecture="$architecture" - prepare_source --template="../conf/web.src.default" --destination="../conf/web.$architecture.src" --architecture="$architecture" - prepare_source --template="../conf/server.src.default" --destination="../conf/server.$architecture.src" --architecture="$architecture" +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" + done done prepare_source --template="../conf/ldap.src.default" --destination="../conf/ldap.src" diff --git a/scripts/upgrade b/scripts/upgrade index 0bbfc4e..490c563 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -152,16 +152,16 @@ tempdir="$(mktemp -d)" # Download the deb files ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" # 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 -src_url=$(grep 'SOURCE_URL=' "../conf/server.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$debian.$architecture.src" fi ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" # Same for web -src_url=$(grep 'SOURCE_URL=' "../conf/web.$architecture.src" | cut -d= -f2-) +src_url=$(grep 'SOURCE_URL=' "../conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$architecture.src" + ynh_replace_string --match_string="releases/server/debian/versions/stable/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$debian.$architecture.src" fi ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" From 6659be56fbfe4ab0339d4382a6f1d6078c32a7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 14 Feb 2022 21:38:20 +0100 Subject: [PATCH 17/28] Remove unsupported old argument --log_type to yunohost service add --- scripts/install | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 2f10c97..680ee30 100644 --- a/scripts/install +++ b/scripts/install @@ -206,9 +206,9 @@ needed_ports=() # Integrate service and require to expose the ports if needed if [[ -z ${needed_ports[@]} ]]; then - yunohost service add $app --description="Jellyfin media center" --log_type="systemd" + yunohost service add $app --description="Jellyfin media center" else - yunohost service add $app --description="Jellyfin media center" --log_type="systemd" --needs_exposed_ports ${needed_ports[@]} + yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]} fi #================================================= diff --git a/scripts/restore b/scripts/restore index e1dfdd3..db66983 100644 --- a/scripts/restore +++ b/scripts/restore @@ -163,9 +163,9 @@ needed_ports=() # Integrate service and require to expose the ports if needed if [[ -z ${needed_ports[@]} ]]; then - yunohost service add $app --description="Jellyfin media center" --log_type="systemd" + yunohost service add $app --description="Jellyfin media center" else - yunohost service add $app --description="Jellyfin media center" --log_type="systemd" --needs_exposed_ports ${needed_ports[@]} + yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]} fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 490c563..5a3eb6b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -226,9 +226,9 @@ needed_ports=() # Integrate service and require to expose the ports if needed if [[ -z ${needed_ports[@]} ]]; then - yunohost service add $app --description="Jellyfin media center" --log_type="systemd" + yunohost service add $app --description="Jellyfin media center" else - yunohost service add $app --description="Jellyfin media center" --log_type="systemd" --needs_exposed_ports ${needed_ports[@]} + yunohost service add $app --description="Jellyfin media center" --needs_exposed_ports ${needed_ports[@]} fi #================================================= From 8009af06718c17c7210932be4200d97da901d409 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 15 Feb 2022 21:30:57 +0000 Subject: [PATCH 18/28] Do not override system.xml in upgrade --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5a3eb6b..52f3b21 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -183,7 +183,8 @@ ynh_system_user_create --username=$app #================================================= ynh_script_progression --message="Setting up configuration files..." --weight=2 -ynh_add_config --template="system.xml" --destination="$config_path/system.xml" +# TODO: investigate if we can avoid overriding system.xml +#ynh_add_config --template="system.xml" --destination="$config_path/system.xml" ynh_add_config --template="network.xml" --destination="$config_path/network.xml" ynh_add_config --template="logging.json" --destination="$config_path/logging.json" From 0db61d1ea740752cf4e695104e3acd3b80e27e3a Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 15 Feb 2022 21:36:13 +0000 Subject: [PATCH 19/28] Wait 30s upon first install --- scripts/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 680ee30..58a5306 100644 --- a/scripts/install +++ b/scripts/install @@ -158,6 +158,9 @@ fi #================================================= # MODIFY A CONFIG FILE #================================================= +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_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped Jellyfin Media Server" --timeout=15 From 87379b6c769840e856589802b55e7d3534158a30 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 15 Feb 2022 21:42:40 +0000 Subject: [PATCH 20/28] Fix restore with debian.architecture sources --- scripts/restore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/restore b/scripts/restore index db66983..ce97bc8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -123,20 +123,20 @@ ynh_script_progression --message="Reinstalling packages..." --weight=7 tempdir="$(mktemp -d)" # Download the deb files -ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$debian.$architecture" # 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 src_url=$(grep 'SOURCE_URL=' "../settings/conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../settings/conf/server.$debian.$architecture.src" fi -ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="server.$debian.$architecture" # Same for web src_url=$(grep 'SOURCE_URL=' "../settings/conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../settings/conf/web.$debian.$architecture.src" fi -ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="web.$debian.$architecture" # Install the packages ynh_exec_warn_less dpkg --force-confdef --force-confold -i $tempdir/jellyfin-ffmpeg.deb From 785a0a2468d97e3738abb2a4fc5e5f2ab1c4aa6f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 15 Feb 2022 21:44:57 +0000 Subject: [PATCH 21/28] Fix upgrade with debian.architecture sources --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 52f3b21..14866d7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -150,20 +150,20 @@ ynh_script_progression --message="Upgrading packages..." --weight=3 tempdir="$(mktemp -d)" # Download the deb files -ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$debian.$architecture" # 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 src_url=$(grep 'SOURCE_URL=' "../conf/server.$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/server/$version/jellyfin-server_$version-1_$architecture.deb" --replace_string="archive/debian/stable/$version/server/jellyfin-server_$version-1_$architecture.deb" --target_file="../conf/server.$debian.$architecture.src" fi -ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="server.$debian.$architecture" # Same for web src_url=$(grep 'SOURCE_URL=' "../conf/web.$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/web/$version/jellyfin-web_$version-1_all.deb" --replace_string="archive/debian/stable/$version/web/jellyfin-web_$version-1_all.deb" --target_file="../conf/web.$debian.$architecture.src" fi -ynh_setup_source --dest_dir=$tempdir --source_id="web.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="web.$debian.$architecture" # Install the packages ynh_exec_warn_less dpkg --force-confdef --force-confnew -i $tempdir/jellyfin-ffmpeg.deb From a0b9297e5874ac4662335037eff53385202bf81a Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Feb 2022 23:50:50 +0100 Subject: [PATCH 22/28] Add access to multimedia directories --- scripts/install | 10 ++++++++++ scripts/restore | 10 ++++++++++ scripts/upgrade | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/scripts/install b/scripts/install index 58a5306..f972139 100644 --- a/scripts/install +++ b/scripts/install @@ -178,6 +178,16 @@ 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" +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=2 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Allow nextcloud to write into these directories +ynh_multimedia_addaccess $app + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index ce97bc8..844cf98 100644 --- a/scripts/restore +++ b/scripts/restore @@ -184,6 +184,16 @@ 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 nextcloud to write into these directories +ynh_multimedia_addaccess $app + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 14866d7..38b092d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -197,6 +197,16 @@ 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" +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=2 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Allow nextcloud to write into these directories +ynh_multimedia_addaccess $app + #================================================= # GENERIC FINALIZATION #================================================= From 5349bcfe5c15b2cdbf18b14b0a681508043266ac Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 16 Feb 2022 23:56:16 +0100 Subject: [PATCH 23/28] Update README for multimedia directories --- doc/DISCLAIMER.md | 3 +++ doc/DISCLAIMER_fr.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index df7c459..b6cec4f 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -2,6 +2,9 @@ * Standard users need the `main` permission; * Users with the `admin` permission will have access to the administration panel. +* The app can access YunoHost's multimedia directories: +choose one of the folders in `/home/yunohost.multimedia/share` upon configuration of your libraries. + * Starting version 10.7.5~ynh2, you can ask for the discovery ports (1900 and 7359) to be opened. They ease the setting up of your media center between clients and server. * If you are upgrading to this version and above, set `discovery: '1'` in `/etc/yunohost/apps/jellyfin/settings.yml` diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index d5d7731..a10ff73 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -2,6 +2,9 @@ * Les utilisateurs standards doivent avoir la permission `main` ; * Les utilisateurs doivent avoir la permission `admin` pour pouvoir accéder au panneau d'administration. +* L'app a accès aux dossiers multimédia de YunoHost: +indiquez un des dossiers de `/home/yunohost.multimedia/share` comme source lors du paramétrage de vos bibliothèques. + * À partir de la version 10.7.5~ynh2, vous pouvez demander l'ouverture des ports de découverte (1900 et 7359). Ils facilitent la mise en place de votre système multimédia entre les clients et le serveur. * Si vous mettez à jour vers cette version et les suivantes, mettez `discovery: '1'` dans `/etc/yunohost/apps/jellyfin/settings.yml` From b503d96f231c276db614b31b96de34fdc5c7158b Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Wed, 16 Feb 2022 22:56:28 +0000 Subject: [PATCH 24/28] Auto-update README --- README.md | 3 +++ README_fr.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 8efd03f..eaa13a7 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,9 @@ Media System that manage and stream your media. * Standard users need the `main` permission; * Users with the `admin` permission will have access to the administration panel. +* The app can access YunoHost's multimedia directories: +choose one of the folders in `/home/yunohost.multimedia/share` upon configuration of your libraries. + * Starting version 10.7.5~ynh2, you can ask for the discovery ports (1900 and 7359) to be opened. They ease the setting up of your media center between clients and server. * If you are upgrading to this version and above, set `discovery: '1'` in `/etc/yunohost/apps/jellyfin/settings.yml` diff --git a/README_fr.md b/README_fr.md index 010511f..70a42b9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,6 +27,9 @@ Système multimédia qui gère et diffuse vos médias. * Les utilisateurs standards doivent avoir la permission `main` ; * Les utilisateurs doivent avoir la permission `admin` pour pouvoir accéder au panneau d'administration. +* L'app a accès aux dossiers multimédia de YunoHost: +indiquez un des dossiers de `/home/yunohost.multimedia/share` comme source lors du paramétrage de vos bibliothèques. + * À partir de la version 10.7.5~ynh2, vous pouvez demander l'ouverture des ports de découverte (1900 et 7359). Ils facilitent la mise en place de votre système multimédia entre les clients et le serveur. * Si vous mettez à jour vers cette version et les suivantes, mettez `discovery: '1'` dans `/etc/yunohost/apps/jellyfin/settings.yml` From 0c6c33d1f5abf2c8f8222abd31f4fbdcf2450add Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 17 Feb 2022 06:54:28 +0100 Subject: [PATCH 25/28] Fix shameless copy-paste --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f972139..161de0a 100644 --- a/scripts/install +++ b/scripts/install @@ -185,7 +185,7 @@ ynh_script_progression --message="Adding multimedia directories..." --weight=2 # Build YunoHost multimedia directories ynh_multimedia_build_main_dir -# Allow nextcloud to write into these directories +# Allow Jellyfin to write into these directories ynh_multimedia_addaccess $app #================================================= From fd71f9cca340e5ec0f27139762506845f2e7c7c1 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 17 Feb 2022 06:55:15 +0100 Subject: [PATCH 26/28] =?UTF-8?q?Fix=20shameless=20copy-paste=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 844cf98..4317ab3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -191,7 +191,7 @@ ynh_script_progression --message="Adding multimedia directories..." --weight=2 # Build YunoHost multimedia directories ynh_multimedia_build_main_dir -# Allow nextcloud to write into these directories +# Allow Jellyfin to write into these directories ynh_multimedia_addaccess $app #================================================= From 5635b8d495ecbc6efadcbc180abe84854769cd20 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 17 Feb 2022 06:55:41 +0100 Subject: [PATCH 27/28] =?UTF-8?q?Fix=20shameless=20copy-paste=C2=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 38b092d..264dcbf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -204,7 +204,7 @@ ynh_script_progression --message="Adding multimedia directories..." --weight=2 # Build YunoHost multimedia directories ynh_multimedia_build_main_dir -# Allow nextcloud to write into these directories +# Allow Jellyfin to write into these directories ynh_multimedia_addaccess $app #================================================= From 49ec75c398a5161befe180c21c0858f722e645b0 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 17 Feb 2022 06:57:08 +0100 Subject: [PATCH 28/28] Bump YunoHost requirement for multimedia helper --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index b7903c9..968525a 100644 --- a/manifest.json +++ b/manifest.json @@ -27,7 +27,7 @@ } ], "requirements": { - "yunohost": ">= 4.1.3" + "yunohost": ">= 4.2" }, "multi_instance": false, "services": [