From e0cd3c711b32e44acabb898b5e5cdc7f8c37b77f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 11 Nov 2020 20:14:48 +0100 Subject: [PATCH 1/8] Adding LDAP plugin and permissions --- conf/LDAP-Auth.xml | 16 ++++++++++++++++ conf/ldap.src | 7 +++++++ manifest.json | 9 +++++++++ scripts/install | 23 ++++++++++++++++++++--- scripts/upgrade | 24 ++++++++++++++++++++++++ 5 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 conf/LDAP-Auth.xml create mode 100644 conf/ldap.src diff --git a/conf/LDAP-Auth.xml b/conf/LDAP-Auth.xml new file mode 100644 index 0000000..37a7a9e --- /dev/null +++ b/conf/LDAP-Auth.xml @@ -0,0 +1,16 @@ + + + 127.0.0.1 + ou=users,dc=yunohost,dc=org + 389 + uid, mail + uid + (permission=cn=jellyfin.main,ou=permission,dc=yunohost,dc=org) + (permission=cn=jellyfin.admin,ou=permission,dc=yunohost,dc=org) + cn=admin,ou=users,dc=yunohost,dc=org + + true + true + false + false + diff --git a/conf/ldap.src b/conf/ldap.src new file mode 100644 index 0000000..c4cd353 --- /dev/null +++ b/conf/ldap.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_9.0.0.0.zip +SOURCE_SUM=1EAE1099E30CB3C42FDC2B0ACE50601A8881EBFD9151526F39C8E2B61D7B3EF1 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=zip +SOURCE_IN_SUBDIR=false +SOURCE_FILENAME= +SOURCE_EXTRACT=true diff --git a/manifest.json b/manifest.json index 1292ae0..dd9c159 100644 --- a/manifest.json +++ b/manifest.json @@ -40,6 +40,15 @@ "example": "/jellyfin", "default": "/jellyfin" }, + { + "name": "admin", + "type": "user", + "ask": { + "en": "Choose an admin user", + "fr": "Choisissez l'administrateur" + }, + "example": "johndoe" + }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index 82a5492..96d1be9 100644 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,7 @@ 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 app=$YNH_APP_INSTANCE_NAME @@ -89,6 +90,7 @@ ynh_system_user_create --username=$app #================================================= # MODIFY A CONFIG FILE #================================================= +ynh_script_progression --message="Configuring the settings..." --weight=1 # Load services once to generate system.xml systemctl enable jellyfin @@ -102,6 +104,18 @@ ynh_replace_string --match_string="8096 Date: Fri, 8 Jan 2021 23:52:54 +0100 Subject: [PATCH 2/8] Upgrade to version 10 --- conf/ldap.src | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/ldap.src b/conf/ldap.src index c4cd353..4e4d1de 100644 --- a/conf/ldap.src +++ b/conf/ldap.src @@ -1,7 +1,8 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_9.0.0.0.zip -SOURCE_SUM=1EAE1099E30CB3C42FDC2B0ACE50601A8881EBFD9151526F39C8E2B61D7B3EF1 +SOURCE_URL=https://github.com/jellyfin/jellyfin-plugin-ldapauth/archive/v10.zip +SOURCE_SUM=d3374a5188abbc6c75c58f64d187f0b9c369a873e6dda7252bf7fe3e44a45eef SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false SOURCE_FILENAME= SOURCE_EXTRACT=true + From ade36194b5cb66d6e0b7bf0a8c9ed55df1e06610 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 10 Mar 2021 09:34:38 +0100 Subject: [PATCH 3/8] Upgrade to version 10.7.0 --- README.md | 2 +- manifest.json | 2 +- scripts/_common.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 820524b..f109e56 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview 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.6.4 +**Shipped version:** 10.7.0 ## Screenshots diff --git a/manifest.json b/manifest.json index dd9c159..f12a6dd 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.6.4~ynh1", + "version": "10.7.0~ynh1", "url": "https://github.com/jellyfin/jellyfin", "license": "GPL-2.0-only", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 0e17ea6..c0e6516 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -pkg_version="10.6.4-1" +pkg_version="10.7.0-1" #================================================= # PERSONAL HELPERS From b4ab1faec59fd4ee274443c30f3a085fad0ca5a0 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 10 Mar 2021 09:36:45 +0100 Subject: [PATCH 4/8] Update LDAP configuration Co-authored-by: h3ndrik h3ndrik@users.noreply.github.com --- conf/LDAP-Auth.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/LDAP-Auth.xml b/conf/LDAP-Auth.xml index 37a7a9e..713a063 100644 --- a/conf/LDAP-Auth.xml +++ b/conf/LDAP-Auth.xml @@ -1,4 +1,4 @@ - + 127.0.0.1 ou=users,dc=yunohost,dc=org @@ -7,10 +7,10 @@ uid (permission=cn=jellyfin.main,ou=permission,dc=yunohost,dc=org) (permission=cn=jellyfin.admin,ou=permission,dc=yunohost,dc=org) - cn=admin,ou=users,dc=yunohost,dc=org - + + true - true + false false false From 8f2150def7fd0ce42c6967b1d27305148ec154e3 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 10 Mar 2021 10:35:54 +0100 Subject: [PATCH 5/8] Ensure network configuration for 10.7 --- scripts/install | 5 +++-- scripts/upgrade | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 01d9921..359b09a 100644 --- a/scripts/install +++ b/scripts/install @@ -99,10 +99,11 @@ sleep 5 systemctl stop jellyfin # Port config -ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="/etc/jellyfin/system.xml" +ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="/etc/jellyfin/network.xml" +ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="/etc/jellyfin/network.xml" # BaseUrl config -ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="/etc/jellyfin/system.xml" +ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="/etc/jellyfin/network.xml" # Disable Setup Wizard ynh_replace_string --match_string="false" --replace_string="true" --target_file="/etc/jellyfin/system.xml" diff --git a/scripts/upgrade b/scripts/upgrade index cbbc124..ed18b31 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,6 +74,28 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app +#================================================= +# MODIFY A CONFIG FILE +#================================================= + +# Check if network.xml exists (introduced in v10.7) +if [ -z "/etc/jellyfin/network.xml" ]; then + ynh_script_progression --message="Configuring the settings..." --weight=1 + + # Load services once to generate network.xml + systemctl enable jellyfin + systemctl start jellyfin + sleep 5 + systemctl stop jellyfin + + # Port config + ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="/etc/jellyfin/network.xml" + ynh_replace_string --match_string="8096" --replace_string="$port" --target_file="/etc/jellyfin/network.xml" + + # BaseUrl config + ynh_replace_string --match_string="" --replace_string="$path_url" --target_file="/etc/jellyfin/network.xml" +fi + #================================================= # INSTALL LDAP PLUGIN #================================================= From 4512bfbaed4f15fe171b78f977c909fdb8210090 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 10 Mar 2021 10:36:26 +0100 Subject: [PATCH 6/8] Update ldap.src --- conf/ldap.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/ldap.src b/conf/ldap.src index 4e4d1de..7ddae3c 100644 --- a/conf/ldap.src +++ b/conf/ldap.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/jellyfin/jellyfin-plugin-ldapauth/archive/v10.zip -SOURCE_SUM=d3374a5188abbc6c75c58f64d187f0b9c369a873e6dda7252bf7fe3e44a45eef +SOURCE_URL=https://repo.jellyfin.org/releases/plugin/ldap-authentication/ldap-authentication_10.0.0.0.zip +SOURCE_SUM=A261DD2F9F448839BC24D4DDC0996007F72517E04EEA8C78C45AEF217DD82D22 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false From 9a3142a0ec1ebb369aa9a074d6099ad039593618 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 10 Mar 2021 14:01:52 +0100 Subject: [PATCH 7/8] Fix change_url for v10.7 --- scripts/change_url | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 03e8e62..e660a15 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -112,10 +112,10 @@ fi if [ $change_path -eq 1 ] then # If somehow was not replaced during install - if grep -q "" "/etc/jellyfin/system.xml"; then - ynh_replace_string --match_string="" --replace_string="$new_path" --target_file="/etc/jellyfin/system.xml" + if grep -q "" "/etc/jellyfin/network.xml"; then + ynh_replace_string --match_string="" --replace_string="$new_path" --target_file="/etc/jellyfin/network.xml" else - ynh_replace_string --match_string="$old_path" --replace_string="$new_path" --target_file="/etc/jellyfin/system.xml" + ynh_replace_string --match_string="$old_path" --replace_string="$new_path" --target_file="/etc/jellyfin/network.xml" fi fi From 5e2ef2062ab7847b339d45e3701ec5d369ab3c45 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 10 Mar 2021 14:02:11 +0100 Subject: [PATCH 8/8] Temporary fix for check_process --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 19f6216..fcdf735 100644 --- a/check_process +++ b/check_process @@ -20,7 +20,8 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=3e38d2ec954f6b333c3c2ed95e0e75c0df2fe966 +# Disabled because Jellyfin's team decided to remove old package... +# upgrade=1 from_commit=3e38d2ec954f6b333c3c2ed95e0e75c0df2fe966 backup_restore=1 multi_instance=0 port_already_use=0 @@ -31,5 +32,4 @@ Notification=none ;;; Upgrade options ; commit=3e38d2ec954f6b333c3c2ed95e0e75c0df2fe966 name=2020-09-07 commit -# manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&port=666&