mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
Merge pull request #88 from Salamandar/fix_packages_testing
Support Bullseye and fix dependency package list : switch on architecture and release.
This commit is contained in:
commit
214f82b930
23 changed files with 140 additions and 39 deletions
7
conf/ffmpeg.bullseye.amd64.src
Normal file
7
conf/ffmpeg.bullseye.amd64.src
Normal file
|
@ -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
|
7
conf/ffmpeg.bullseye.arm64.src
Normal file
7
conf/ffmpeg.bullseye.arm64.src
Normal file
|
@ -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
|
7
conf/ffmpeg.bullseye.armhf.src
Normal file
7
conf/ffmpeg.bullseye.armhf.src
Normal file
|
@ -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
|
7
conf/server.buster.amd64.src
Normal file
7
conf/server.buster.amd64.src
Normal file
|
@ -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
|
7
conf/server.buster.arm64.src
Normal file
7
conf/server.buster.arm64.src
Normal file
|
@ -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
|
7
conf/server.buster.armhf.src
Normal file
7
conf/server.buster.armhf.src
Normal file
|
@ -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
|
7
conf/web.buster.amd64.src
Normal file
7
conf/web.buster.amd64.src
Normal file
|
@ -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
|
7
conf/web.buster.arm64.src
Normal file
7
conf/web.buster.arm64.src
Normal file
|
@ -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
|
7
conf/web.buster.armhf.src
Normal file
7
conf/web.buster.armhf.src
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -206,9 +209,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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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.$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"
|
||||
ynh_setup_source --dest_dir=$tempdir --source_id="server.$debian.$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"
|
||||
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
|
||||
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.$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 --force-confdef --force-confnew -i $tempdir/jellyfin-ffmpeg.deb
|
||||
|
@ -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"
|
||||
|
||||
|
@ -226,9 +227,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
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue