From 5ec1be8f48cf0ccc6141a6d19d260f4ff05edba8 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 6 May 2021 13:49:49 +0200 Subject: [PATCH] Upgrade to v10.7.5 and fix source files generation --- README.md | 2 +- README_fr.md | 2 +- conf/{ffmpeg.src => ffmpeg.amd64.src} | 0 conf/ffmpeg.arm64.src | 7 ++ conf/ffmpeg.armhf.src | 7 ++ conf/ffmpeg.src.default | 4 +- conf/{server.src => server.amd64.src} | 4 +- conf/server.arm64.src | 7 ++ conf/server.armhf.src | 7 ++ conf/{web.src => web.amd64.src} | 4 +- conf/web.arm64.src | 7 ++ conf/web.armhf.src | 7 ++ manifest.json | 2 +- scripts/_common.sh | 166 +------------------------- scripts/install | 6 +- scripts/update_version.sh | 17 ++- scripts/upgrade | 6 +- 17 files changed, 70 insertions(+), 185 deletions(-) rename conf/{ffmpeg.src => ffmpeg.amd64.src} (100%) create mode 100644 conf/ffmpeg.arm64.src create mode 100644 conf/ffmpeg.armhf.src rename conf/{server.src => server.amd64.src} (57%) create mode 100644 conf/server.arm64.src create mode 100644 conf/server.armhf.src rename conf/{web.src => web.amd64.src} (58%) create mode 100644 conf/web.arm64.src create mode 100644 conf/web.armhf.src diff --git a/README.md b/README.md index ee69c92..c269223 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,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.7.2 +**Shipped version:** 10.7.5 ## Screenshots diff --git a/README_fr.md b/README_fr.md index f9e8988..66a499a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble Jellyfin vous permet de collecter, gérer et diffuser vos médias. Exécutez le serveur Jellyfin sur votre système et accédez au principal système de divertissement à logiciel libre. -**Version incluse :** 10.7.2 +**Version incluse :** 10.7.5 ## Captures d'écran diff --git a/conf/ffmpeg.src b/conf/ffmpeg.amd64.src similarity index 100% rename from conf/ffmpeg.src rename to conf/ffmpeg.amd64.src diff --git a/conf/ffmpeg.arm64.src b/conf/ffmpeg.arm64.src new file mode 100644 index 0000000..3c73ae5 --- /dev/null +++ b/conf/ffmpeg.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-buster_arm64.deb +SOURCE_SUM=02b8ee277f428b0519036b1657873ec65c124090f605daa235de10eb7c5a381d +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-ffmpeg.deb diff --git a/conf/ffmpeg.armhf.src b/conf/ffmpeg.armhf.src new file mode 100644 index 0000000..aabbb53 --- /dev/null +++ b/conf/ffmpeg.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-buster_armhf.deb +SOURCE_SUM=04e99a82aae906af6fd526bfbde22b6a8ea2b3b2bb1460561ff2c543b0963d4f +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-ffmpeg.deb diff --git a/conf/ffmpeg.src.default b/conf/ffmpeg.src.default index 5c0349b..4976a6c 100644 --- a/conf/ffmpeg.src.default +++ b/conf/ffmpeg.src.default @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/__FFMPEG_PKG_VERSION__/jellyfin-ffmpeg___FFMPEG_PKG_VERSION__-__DEBIAN___amd64.deb -SOURCE_SUM=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/__FFMPEG_PKG_VERSION__/jellyfin-ffmpeg___FFMPEG_PKG_VERSION__-__DEBIAN___amd64.deb.sha256sum +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/__FFMPEG_PKG_VERSION__/jellyfin-ffmpeg___FFMPEG_PKG_VERSION__-__DEBIAN_____ARCHITECTURE__.deb +SOURCE_SUM=https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/__FFMPEG_PKG_VERSION__/jellyfin-ffmpeg___FFMPEG_PKG_VERSION__-__DEBIAN_____ARCHITECTURE__.deb.sha256sum SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/server.src b/conf/server.amd64.src similarity index 57% rename from conf/server.src rename to conf/server.amd64.src index ffe2ba4..3086fbd 100644 --- a/conf/server.src +++ b/conf/server.amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.7.2/jellyfin-server_10.7.2-1_amd64.deb -SOURCE_SUM=05d7d7afc9ac7bf44d5fef79d88d56afd1c36f98b0f0746c2b8f37e3b881c353 +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.7.5/jellyfin-server_10.7.5-1_amd64.deb +SOURCE_SUM=5b3c1fe15a1b701311e8b07a9b15f6d7a45e58d4e3b388bdf8e3afe9530483d5 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/server.arm64.src b/conf/server.arm64.src new file mode 100644 index 0000000..bb301db --- /dev/null +++ b/conf/server.arm64.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.7.5/jellyfin-server_10.7.5-1_arm64.deb +SOURCE_SUM=01da7e3250c7b32b0090680db0199f86130171b1c7e499557f339827ffce6185 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-server.deb diff --git a/conf/server.armhf.src b/conf/server.armhf.src new file mode 100644 index 0000000..40dd98b --- /dev/null +++ b/conf/server.armhf.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/server/10.7.5/jellyfin-server_10.7.5-1_armhf.deb +SOURCE_SUM=2418ab32fb13217a138229aad8101876bc221375fc9b3194e6c2f2b8b7d998f4 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-server.deb diff --git a/conf/web.src b/conf/web.amd64.src similarity index 58% rename from conf/web.src rename to conf/web.amd64.src index 40ddf4f..29a3b50 100644 --- a/conf/web.src +++ b/conf/web.amd64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.7.2/jellyfin-web_10.7.2-1_all.deb -SOURCE_SUM=a2213212e3c6ef0fd87c7414f64e0c2dc991997eef7b8a4a755734c5878c337a +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.7.5/jellyfin-web_10.7.5-1_all.deb +SOURCE_SUM=294a00e7a63c1a7f826e4da798663e872d2f2d227061b60253ac9cecd8642301 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=deb SOURCE_IN_SUBDIR=false diff --git a/conf/web.arm64.src b/conf/web.arm64.src new file mode 100644 index 0000000..29a3b50 --- /dev/null +++ b/conf/web.arm64.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.7.5/jellyfin-web_10.7.5-1_all.deb +SOURCE_SUM=294a00e7a63c1a7f826e4da798663e872d2f2d227061b60253ac9cecd8642301 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-web.deb diff --git a/conf/web.armhf.src b/conf/web.armhf.src new file mode 100644 index 0000000..29a3b50 --- /dev/null +++ b/conf/web.armhf.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://repo.jellyfin.org/releases/server/debian/versions/stable/web/10.7.5/jellyfin-web_10.7.5-1_all.deb +SOURCE_SUM=294a00e7a63c1a7f826e4da798663e872d2f2d227061b60253ac9cecd8642301 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=deb +SOURCE_IN_SUBDIR=false +SOURCE_EXTRACT=false +SOURCE_FILENAME=jellyfin-web.deb diff --git a/manifest.json b/manifest.json index 9fa3acc..e7d4bdc 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.2~ynh1", + "version": "10.7.5~ynh1", "url": "https://github.com/jellyfin/jellyfin", "license": "GPL-2.0-only", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index fab6ae5..429ccc7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,10 +5,10 @@ #================================================= debian=$(lsb_release --codename --short) -pkg_version="10.7.0-1" +pkg_version="10.7.5-1" version=$(echo "$pkg_version" | cut -d '-' -f 1) -ffmpeg_pkg_version="4.3.1-4" +ffmpeg_pkg_version="4.3.2-1" architecture=$(dpkg --print-architecture) @@ -16,168 +16,6 @@ architecture=$(dpkg --print-architecture) # PERSONAL HELPERS #================================================= -# -# usage: ynh_setup_source_2 --dest_dir=dest_dir [--source_id=source_id] -# | arg: -d, --dest_dir= - Directory where to setup sources -# | arg: -s, --source_id= - Name of the app, if the package contains more than one app -# -# The file conf/app.src need to contains: -# -# SOURCE_URL=Address to download the app archive -# SOURCE_SUM can either be the SUM string, or a URL to a file containing the SUM. -# If a URL is provided, the contents of the file will be cut to the first space. -# SOURCE_SUM=Control sum -# # (Optional) Program to check the integrity (sha256sum, md5sum...) -# # default: sha256 -# SOURCE_SUM_PRG=sha256 -# # (Optional) Archive format -# # default: tar.gz -# SOURCE_FORMAT=tar.gz -# # (Optional) Put false if sources are directly in the archive root -# # default: true -# # Instead of true, SOURCE_IN_SUBDIR could be the number of sub directories -# # to remove. -# SOURCE_IN_SUBDIR=false -# # (Optionnal) Name of the local archive (offline setup support) -# # default: ${src_id}.${src_format} -# SOURCE_FILENAME=example.tar.gz -# # (Optional) If it set as false don't extract the source. -# # (Useful to get a debian package or a python wheel.) -# # default: true -# SOURCE_EXTRACT=(true|false) -# -# Details: -# This helper downloads sources from SOURCE_URL if there is no local source -# archive in /opt/yunohost-apps-src/APP_ID/SOURCE_FILENAME -# -# Next, it checks the integrity with "SOURCE_SUM_PRG -c --status" command. -# -# If it's ok, the source archive will be uncompressed in $dest_dir. If the -# SOURCE_IN_SUBDIR is true, the first level directory of the archive will be -# removed. -# If SOURCE_IN_SUBDIR is a numeric value, 2 for example, the 2 first level -# directories will be removed -# -# Finally, patches named sources/patches/${src_id}-*.patch and extra files in -# sources/extra_files/$src_id will be applied to dest_dir -# -# Requires YunoHost version 2.6.4 or higher. -ynh_setup_source_2 () { - # Declare an array to define the options of this helper. - local legacy_args=ds - local -A args_array=( [d]=dest_dir= [s]=source_id= ) - local dest_dir - local source_id - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - source_id="${source_id:-app}" # If the argument is not given, source_id equals "app" - - local src_file_path="$YNH_CWD/../conf/${source_id}.src" - # In case of restore script the src file is in an other path. - # So try to use the restore path if the general path point to no file. - if [ ! -e "$src_file_path" ]; then - src_file_path="$YNH_CWD/../settings/conf/${source_id}.src" - fi - - # Load value from configuration file (see above for a small doc about this file - # format) - local src_url=$(grep 'SOURCE_URL=' "$src_file_path" | cut --delimiter='=' --fields=2-) - local src_sum=$(grep 'SOURCE_SUM=' "$src_file_path" | cut --delimiter='=' --fields=2-) - local src_sumprg=$(grep 'SOURCE_SUM_PRG=' "$src_file_path" | cut --delimiter='=' --fields=2-) - local src_format=$(grep 'SOURCE_FORMAT=' "$src_file_path" | cut --delimiter='=' --fields=2-) - local src_extract=$(grep 'SOURCE_EXTRACT=' "$src_file_path" | cut --delimiter='=' --fields=2-) - local src_in_subdir=$(grep 'SOURCE_IN_SUBDIR=' "$src_file_path" | cut --delimiter='=' --fields=2-) - local src_filename=$(grep 'SOURCE_FILENAME=' "$src_file_path" | cut --delimiter='=' --fields=2-) - - # Default value - src_sumprg=${src_sumprg:-sha256sum} - src_in_subdir=${src_in_subdir:-true} - src_format=${src_format:-tar.gz} - src_format=$(echo "$src_format" | tr '[:upper:]' '[:lower:]') - src_extract=${src_extract:-true} - if [ "$src_filename" = "" ]; then - src_filename="${source_id}.${src_format}" - fi - local local_src="/opt/yunohost-apps-src/${YNH_APP_ID}/${src_filename}" - - if test -e "$local_src" - then # Use the local source file if it is present - cp $local_src $src_filename - else # If not, download the source - # NB. we have to declare the var as local first, - # otherwise 'local foo=$(false) || echo 'pwet'" does'nt work - # because local always return 0 ... - local out - # Timeout option is here to enforce the timeout on dns query and tcp connect (c.f. man wget) - out=$(wget --tries 3 --no-dns-cache --timeout 900 --no-verbose --output-document=$src_filename $src_url 2>&1) \ - || ynh_die --message="$out" - fi - - # Get the control sum if a URL was provided - # Only retain the part before the first space - if [[ "${src_sum}" =~ ^http[s+]:// ]]; then - src_sum=$(curl -L -s "${src_sum}" | cut -d ' ' -f 1) - fi - - # Check the control sum - echo "${src_sum} ${src_filename}" | ${src_sumprg} --check --status \ - || ynh_die --message="Corrupt source" - - # Extract source into the app dir - mkdir --parents "$dest_dir" - - if ! "$src_extract" - then - mv $src_filename $dest_dir - elif [ "$src_format" = "zip" ] - then - # Zip format - # Using of a temp directory, because unzip doesn't manage --strip-components - if $src_in_subdir - then - local tmp_dir=$(mktemp --directory) - unzip -quo $src_filename -d "$tmp_dir" - cp --archive $tmp_dir/*/. "$dest_dir" - ynh_secure_remove --file="$tmp_dir" - else - unzip -quo $src_filename -d "$dest_dir" - fi - else - local strip="" - if [ "$src_in_subdir" != "false" ] - then - if [ "$src_in_subdir" == "true" ] - then - local sub_dirs=1 - else - local sub_dirs="$src_in_subdir" - fi - strip="--strip-components $sub_dirs" - fi - if [[ "$src_format" =~ ^tar.gz|tar.bz2|tar.xz$ ]] - then - tar --extract --file=$src_filename --directory="$dest_dir" $strip - else - ynh_die --message="Archive format unrecognized." - fi - fi - - # Apply patches - if (( $(find $YNH_CWD/../sources/patches/ -type f -name "${source_id}-*.patch" 2> /dev/null | wc --lines) > "0" )) - then - (cd "$dest_dir" - for p in $YNH_CWD/../sources/patches/${source_id}-*.patch - do - patch --strip=1 < $p - done) || ynh_die --message="Unable to apply patches" - fi - - # Add supplementary files - if test -e "$YNH_CWD/../sources/extra_files/${source_id}"; then - cp --archive $YNH_CWD/../sources/extra_files/$source_id/. "$dest_dir" - fi -} - #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index a81e750..9fea419 100644 --- a/scripts/install +++ b/scripts/install @@ -84,9 +84,9 @@ ynh_add_config --template="../conf/web.src.default" --destination="../conf/web.s tempdir="$(mktemp -d)" # Download the deb files -ynh_setup_source_2 --dest_dir=$tempdir --source_id=ffmpeg -ynh_setup_source_2 --dest_dir=$tempdir --source_id=server -ynh_setup_source_2 --dest_dir=$tempdir --source_id=web +ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" +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 diff --git a/scripts/update_version.sh b/scripts/update_version.sh index 00a943c..041b954 100755 --- a/scripts/update_version.sh +++ b/scripts/update_version.sh @@ -13,10 +13,11 @@ source /usr/share/yunohost/helpers prepare_source () { # Declare an array to define the options of this helper. - local legacy_args=tdv - local -A args_array=( [t]=template= [d]=destination= ) + local legacy_args=tda + local -A args_array=( [t]=template= [d]=destination= [a]=architecture= ) local template local destination + local architecture # Manage arguments with getopts ynh_handle_getopts_args "$@" local template_path @@ -66,12 +67,16 @@ prepare_source () { fi } -prepare_source --template="../conf/ffmpeg.src.default" --destination="../conf/ffmpeg.src" -prepare_source --template="../conf/web.src.default" --destination="../conf/web.src" -prepare_source --template="../conf/server.src.default" --destination="../conf/server.src" +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" +done sed -i "s#\*\*Shipped version:\*\*.*#\*\*Shipped version:\*\* ${version}#" ../README.md sed -i "s#\*\*Version incluse :\*\*.*#\*\*Version incluse :\*\* ${version}#" ../README_fr.md sed -i "s# \"version\": \".*# \"version\": \"${version}\~ynh1\",#" ../manifest.json -git commit ../README.md ../README_fr.md ../manifest.json ../conf/ffmpeg.src ../conf/web.src ../conf/server.src -m "Upgrade to v$version" +git add . +git commit ../README.md ../README_fr.md ../manifest.json ../conf/ffmpeg.*.src ../conf/web.*.src ../conf/server.*.src -m "Upgrade to v$version" diff --git a/scripts/upgrade b/scripts/upgrade index 6da156a..4203a27 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,9 +109,9 @@ ynh_add_config --template="../conf/web.src.default" --destination="../conf/web.s tempdir="$(mktemp -d)" # Download the deb files -ynh_setup_source_2 --dest_dir=$tempdir --source_id=ffmpeg -ynh_setup_source_2 --dest_dir=$tempdir --source_id=server -ynh_setup_source_2 --dest_dir=$tempdir --source_id=web +ynh_setup_source --dest_dir=$tempdir --source_id="ffmpeg.$architecture" +ynh_setup_source --dest_dir=$tempdir --source_id="server.$architecture" +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