浏览代码

Merge pull request #1337 from jellyfin/release-10.3.z

Backmerge for 10.3.2 release
Joshua M. Boniface 6 年之前
父节点
当前提交
2bc378a9c3
共有 32 个文件被更改,包括 408 次插入57 次删除
  1. 1 1
      Dockerfile
  2. 1 1
      Dockerfile.arm
  3. 1 1
      Dockerfile.arm64
  4. 1 1
      Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
  5. 1 1
      Emby.Server.Implementations/Library/UserManager.cs
  6. 1 1
      Emby.Server.Implementations/Services/StringMapTypeDeserializer.cs
  7. 1 24
      MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
  8. 22 15
      MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
  9. 1 1
      MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs
  10. 1 1
      MediaBrowser.Providers/Music/MusicBrainzArtistProvider.cs
  11. 1 1
      MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs
  12. 1 1
      MediaBrowser.WebDashboard/jellyfin-web
  13. 2 2
      SharedVersion.cs
  14. 3 1
      build.yaml
  15. 43 0
      deployment/debian-package-arm64/Dockerfile.amd64
  16. 34 0
      deployment/debian-package-arm64/Dockerfile.arm64
  17. 29 0
      deployment/debian-package-arm64/clean.sh
  18. 1 0
      deployment/debian-package-arm64/dependencies.txt
  19. 20 0
      deployment/debian-package-arm64/docker-build.sh
  20. 42 0
      deployment/debian-package-arm64/package.sh
  21. 1 0
      deployment/debian-package-arm64/pkg-src
  22. 6 0
      deployment/debian-package-x64/pkg-src/changelog
  23. 1 1
      deployment/debian-package-x64/pkg-src/control
  24. 10 3
      deployment/debian-package-x64/pkg-src/rules
  25. 3 1
      deployment/fedora-package-x64/pkg-src/jellyfin.spec
  26. 53 0
      deployment/ubuntu-package-arm64/Dockerfile.amd64
  27. 34 0
      deployment/ubuntu-package-arm64/Dockerfile.arm64
  28. 29 0
      deployment/ubuntu-package-arm64/clean.sh
  29. 1 0
      deployment/ubuntu-package-arm64/dependencies.txt
  30. 20 0
      deployment/ubuntu-package-arm64/docker-build.sh
  31. 42 0
      deployment/ubuntu-package-arm64/package.sh
  32. 1 0
      deployment/ubuntu-package-arm64/pkg-src

+ 1 - 1
Dockerfile

@@ -21,7 +21,7 @@ RUN apt-get update \
 COPY --from=ffmpeg / /
 COPY --from=ffmpeg / /
 COPY --from=builder /jellyfin /jellyfin
 COPY --from=builder /jellyfin /jellyfin
 
 
-ARG JELLYFIN_WEB_VERSION=10.3.1
+ARG JELLYFIN_WEB_VERSION=10.3.2
 RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
 RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
  && rm -rf /jellyfin/jellyfin-web \
  && rm -rf /jellyfin/jellyfin-web \
  && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
  && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web

+ 1 - 1
Dockerfile.arm

@@ -30,7 +30,7 @@ RUN apt-get update \
  && chmod 777 /cache /config /media
  && chmod 777 /cache /config /media
 COPY --from=builder /jellyfin /jellyfin
 COPY --from=builder /jellyfin /jellyfin
 
 
-ARG JELLYFIN_WEB_VERSION=10.3.1
+ARG JELLYFIN_WEB_VERSION=10.3.2
 RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
 RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
  && rm -rf /jellyfin/jellyfin-web \
  && rm -rf /jellyfin/jellyfin-web \
  && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
  && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web

+ 1 - 1
Dockerfile.arm64

@@ -31,7 +31,7 @@ RUN apt-get update \
  && chmod 777 /cache /config /media
  && chmod 777 /cache /config /media
 COPY --from=builder /jellyfin /jellyfin
 COPY --from=builder /jellyfin /jellyfin
 
 
-ARG JELLYFIN_WEB_VERSION=10.3.1
+ARG JELLYFIN_WEB_VERSION=10.3.2
 RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
 RUN curl -L https://github.com/jellyfin/jellyfin-web/archive/v${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
  && rm -rf /jellyfin/jellyfin-web \
  && rm -rf /jellyfin/jellyfin-web \
  && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web
  && mv jellyfin-web-${JELLYFIN_WEB_VERSION} /jellyfin/jellyfin-web

+ 1 - 1
Emby.Server.Implementations/HttpServer/HttpResultFactory.cs

@@ -629,7 +629,7 @@ namespace Emby.Server.Implementations.HttpServer
 
 
             if (lastModifiedDate.HasValue)
             if (lastModifiedDate.HasValue)
             {
             {
-                responseHeaders[HeaderNames.LastModified] = lastModifiedDate.ToString();
+                responseHeaders[HeaderNames.LastModified] = lastModifiedDate.Value.ToString(CultureInfo.InvariantCulture);
             }
             }
         }
         }
 
 

+ 1 - 1
Emby.Server.Implementations/Library/UserManager.cs

@@ -596,7 +596,7 @@ namespace Emby.Server.Implementations.Library
             }
             }
 
 
             bool hasConfiguredPassword = GetAuthenticationProvider(user).HasPassword(user).Result;
             bool hasConfiguredPassword = GetAuthenticationProvider(user).HasPassword(user).Result;
-            bool hasConfiguredEasyPassword = string.IsNullOrEmpty(GetLocalPasswordHash(user));
+            bool hasConfiguredEasyPassword = !string.IsNullOrEmpty(GetLocalPasswordHash(user));
 
 
             bool hasPassword = user.Configuration.EnableLocalPassword && !string.IsNullOrEmpty(remoteEndPoint) && _networkManager.IsInLocalNetwork(remoteEndPoint) ?
             bool hasPassword = user.Configuration.EnableLocalPassword && !string.IsNullOrEmpty(remoteEndPoint) && _networkManager.IsInLocalNetwork(remoteEndPoint) ?
                 hasConfiguredEasyPassword :
                 hasConfiguredEasyPassword :

+ 1 - 1
Emby.Server.Implementations/Services/StringMapTypeDeserializer.cs

@@ -71,7 +71,7 @@ namespace Emby.Server.Implementations.Services
                 string propertyName = pair.Key;
                 string propertyName = pair.Key;
                 string propertyTextValue = pair.Value;
                 string propertyTextValue = pair.Value;
 
 
-                if (string.IsNullOrEmpty(propertyTextValue)
+                if (propertyTextValue == null
                     || !propertySetterMap.TryGetValue(propertyName, out propertySerializerEntry)
                     || !propertySetterMap.TryGetValue(propertyName, out propertySerializerEntry)
                     || propertySerializerEntry.PropertySetFn == null)
                     || propertySerializerEntry.PropertySetFn == null)
                 {
                 {

+ 1 - 24
MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs

@@ -283,8 +283,6 @@ namespace MediaBrowser.Api.Playback.Progressive
         {
         {
             state.RemoteHttpHeaders.TryGetValue(HeaderNames.UserAgent, out var useragent);
             state.RemoteHttpHeaders.TryGetValue(HeaderNames.UserAgent, out var useragent);
 
 
-            const bool trySupportSeek = false;
-
             var options = new HttpRequestOptions
             var options = new HttpRequestOptions
             {
             {
                 Url = state.MediaPath,
                 Url = state.MediaPath,
@@ -293,30 +291,9 @@ namespace MediaBrowser.Api.Playback.Progressive
                 CancellationToken = cancellationTokenSource.Token
                 CancellationToken = cancellationTokenSource.Token
             };
             };
 
 
-            if (trySupportSeek)
-            {
-                if (!string.IsNullOrWhiteSpace(Request.QueryString[HeaderNames.Range]))
-                {
-                    options.RequestHeaders[HeaderNames.Range] = Request.QueryString[HeaderNames.Range];
-                }
-            }
             var response = await HttpClient.GetResponse(options).ConfigureAwait(false);
             var response = await HttpClient.GetResponse(options).ConfigureAwait(false);
 
 
-            if (trySupportSeek)
-            {
-                foreach (var name in new[] { HeaderNames.ContentRange, HeaderNames.AcceptRanges })
-                {
-                    var val = response.Headers[name];
-                    if (!string.IsNullOrWhiteSpace(val))
-                    {
-                        responseHeaders[name] = val;
-                    }
-                }
-            }
-            else
-            {
-                responseHeaders[HeaderNames.AcceptRanges] = "none";
-            }
+            responseHeaders[HeaderNames.AcceptRanges] = "none";
 
 
             // Seeing cases of -1 here
             // Seeing cases of -1 here
             if (response.ContentLength.HasValue && response.ContentLength.Value >= 0)
             if (response.ContentLength.HasValue && response.ContentLength.Value >= 0)

+ 22 - 15
MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

@@ -53,7 +53,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
         private readonly int DefaultImageExtractionTimeoutMs;
         private readonly int DefaultImageExtractionTimeoutMs;
         private readonly string StartupOptionFFmpegPath;
         private readonly string StartupOptionFFmpegPath;
 
 
-        private readonly SemaphoreSlim _thumbnailResourcePool = new SemaphoreSlim(1, 1);
+        private readonly SemaphoreSlim _thumbnailResourcePool = new SemaphoreSlim(2, 2);
         private readonly List<ProcessWrapper> _runningProcesses = new List<ProcessWrapper>();
         private readonly List<ProcessWrapper> _runningProcesses = new List<ProcessWrapper>();
         private readonly ILocalizationManager _localization;
         private readonly ILocalizationManager _localization;
 
 
@@ -582,19 +582,27 @@ namespace MediaBrowser.MediaEncoding.Encoder
             {
             {
                 bool ranToCompletion;
                 bool ranToCompletion;
 
 
-                StartProcess(processWrapper);
-
-                var timeoutMs = ConfigurationManager.Configuration.ImageExtractionTimeoutMs;
-                if (timeoutMs <= 0)
+                await _thumbnailResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
+                try
                 {
                 {
-                    timeoutMs = DefaultImageExtractionTimeoutMs;
-                }
+                    StartProcess(processWrapper);
+
+                    var timeoutMs = ConfigurationManager.Configuration.ImageExtractionTimeoutMs;
+                    if (timeoutMs <= 0)
+                    {
+                        timeoutMs = DefaultImageExtractionTimeoutMs;
+                    }
 
 
-                ranToCompletion = await process.WaitForExitAsync(timeoutMs).ConfigureAwait(false);
+                    ranToCompletion = await process.WaitForExitAsync(timeoutMs).ConfigureAwait(false);
 
 
-                if (!ranToCompletion)
+                    if (!ranToCompletion)
+                    {
+                        StopProcess(processWrapper, 1000);
+                    }
+                }
+                finally
                 {
                 {
-                    StopProcess(processWrapper, 1000);
+                    _thumbnailResourcePool.Release();
                 }
                 }
 
 
                 var exitCode = ranToCompletion ? processWrapper.ExitCode ?? 0 : -1;
                 var exitCode = ranToCompletion ? processWrapper.ExitCode ?? 0 : -1;
@@ -625,7 +633,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
             return time.ToString(@"hh\:mm\:ss\.fff", UsCulture);
             return time.ToString(@"hh\:mm\:ss\.fff", UsCulture);
         }
         }
 
 
-        public async Task ExtractVideoImagesOnInterval(string[] inputFiles,
+        public async Task ExtractVideoImagesOnInterval(
+            string[] inputFiles,
             string container,
             string container,
             MediaStream videoStream,
             MediaStream videoStream,
             MediaProtocol protocol,
             MediaProtocol protocol,
@@ -636,8 +645,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
             int? maxWidth,
             int? maxWidth,
             CancellationToken cancellationToken)
             CancellationToken cancellationToken)
         {
         {
-            var resourcePool = _thumbnailResourcePool;
-
             var inputArgument = GetInputArgument(inputFiles, protocol);
             var inputArgument = GetInputArgument(inputFiles, protocol);
 
 
             var vf = "fps=fps=1/" + interval.TotalSeconds.ToString(UsCulture);
             var vf = "fps=fps=1/" + interval.TotalSeconds.ToString(UsCulture);
@@ -701,7 +708,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
 
 
             _logger.LogInformation(process.StartInfo.FileName + " " + process.StartInfo.Arguments);
             _logger.LogInformation(process.StartInfo.FileName + " " + process.StartInfo.Arguments);
 
 
-            await resourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
+            await _thumbnailResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
 
 
             bool ranToCompletion = false;
             bool ranToCompletion = false;
 
 
@@ -742,7 +749,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
                 }
                 }
                 finally
                 finally
                 {
                 {
-                    resourcePool.Release();
+                    _thumbnailResourcePool.Release();
                 }
                 }
 
 
                 var exitCode = ranToCompletion ? processWrapper.ExitCode ?? 0 : -1;
                 var exitCode = ranToCompletion ? processWrapper.ExitCode ?? 0 : -1;

+ 1 - 1
MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs

@@ -336,7 +336,7 @@ namespace MediaBrowser.Providers.Music
                                     }
                                     }
                                     using (var subReader = reader.ReadSubtree())
                                     using (var subReader = reader.ReadSubtree())
                                     {
                                     {
-                                        return ParseReleaseList(subReader);
+                                        return ParseReleaseList(subReader).ToList();
                                     }
                                     }
                                 }
                                 }
                             default:
                             default:

+ 1 - 1
MediaBrowser.Providers/Music/MusicBrainzArtistProvider.cs

@@ -110,7 +110,7 @@ namespace MediaBrowser.Providers.Music
                                         }
                                         }
                                         using (var subReader = reader.ReadSubtree())
                                         using (var subReader = reader.ReadSubtree())
                                         {
                                         {
-                                            return ParseArtistList(subReader);
+                                            return ParseArtistList(subReader).ToList();
                                         }
                                         }
                                     }
                                     }
                                 default:
                                 default:

+ 1 - 1
MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs

@@ -18,7 +18,7 @@ namespace MediaBrowser.Providers.TV.TheTVDB
     /// <summary>
     /// <summary>
     /// Class RemoteEpisodeProvider
     /// Class RemoteEpisodeProvider
     /// </summary>
     /// </summary>
-    class TvdbEpisodeProvider : IRemoteMetadataProvider<Episode, EpisodeInfo>, IHasOrder
+    public class TvdbEpisodeProvider : IRemoteMetadataProvider<Episode, EpisodeInfo>, IHasOrder
     {
     {
         private readonly IHttpClient _httpClient;
         private readonly IHttpClient _httpClient;
         private readonly ILogger _logger;
         private readonly ILogger _logger;

+ 1 - 1
MediaBrowser.WebDashboard/jellyfin-web

@@ -1 +1 @@
-Subproject commit 97f6808e12243bbb9b58344185511a9369913c0b
+Subproject commit 1ba58b06b3dc28e07abae124cff78aa656fcb7e7

+ 2 - 2
SharedVersion.cs

@@ -1,4 +1,4 @@
 using System.Reflection;
 using System.Reflection;
 
 
-[assembly: AssemblyVersion("10.3.1")]
-[assembly: AssemblyFileVersion("10.3.1")]
+[assembly: AssemblyVersion("10.3.2")]
+[assembly: AssemblyFileVersion("10.3.2")]

+ 3 - 1
build.yaml

@@ -1,12 +1,14 @@
 ---
 ---
 # We just wrap `build` so this is really it
 # We just wrap `build` so this is really it
 name: "jellyfin"
 name: "jellyfin"
-version: "10.3.1"
+version: "10.3.2"
 packages:
 packages:
   - debian-package-x64
   - debian-package-x64
   - debian-package-armhf
   - debian-package-armhf
+  - debian-package-arm64
   - ubuntu-package-x64
   - ubuntu-package-x64
   - ubuntu-package-armhf
   - ubuntu-package-armhf
+  - ubuntu-package-arm64
   - fedora-package-x64
   - fedora-package-x64
   - centos-package-x64
   - centos-package-x64
   - linux-x64
   - linux-x64

+ 43 - 0
deployment/debian-package-arm64/Dockerfile.amd64

@@ -0,0 +1,43 @@
+FROM debian:9
+# Docker build arguments
+ARG SOURCE_DIR=/jellyfin
+ARG PLATFORM_DIR=/jellyfin/deployment/debian-package-arm64
+ARG ARTIFACT_DIR=/dist
+ARG SDK_VERSION=2.2
+# Docker run environment
+ENV SOURCE_DIR=/jellyfin
+ENV ARTIFACT_DIR=/dist
+ENV DEB_BUILD_OPTIONS=noddebs
+ENV ARCH=amd64
+
+# Prepare Debian build environment
+RUN apt-get update \
+ && apt-get install -y apt-transport-https debhelper gnupg wget devscripts mmv 
+
+# Install dotnet repository
+# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
+RUN wget https://download.visualstudio.microsoft.com/download/pr/69937b49-a877-4ced-81e6-286620b390ab/8ab938cf6f5e83b2221630354160ef21/dotnet-sdk-2.2.104-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
+ && mkdir -p dotnet-sdk \
+ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
+ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
+
+# Prepare the cross-toolchain
+RUN dpkg --add-architecture arm64 \
+ && apt-get update \
+ && apt-get install -y cross-gcc-dev \
+ && TARGET_LIST="arm64" cross-gcc-gensource 6 \
+ && cd cross-gcc-packages-amd64/cross-gcc-6-arm64 \
+ && apt-get install -y gcc-6-source libstdc++6-arm64-cross binutils-aarch64-linux-gnu bison flex libtool gdb sharutils netbase libcloog-isl-dev libmpc-dev libmpfr-dev libgmp-dev systemtap-sdt-dev autogen expect chrpath zlib1g-dev zip libc6-dev:arm64 linux-libc-dev:arm64 libgcc1:arm64 libcurl4-openssl-dev:arm64 libfontconfig1-dev:arm64 libfreetype6-dev:arm64 liblttng-ust0:arm64 libstdc++6:arm64
+
+# Link to docker-build script
+RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
+
+# Link to Debian source dir; mkdir needed or it fails, can't force dest
+RUN mkdir -p ${SOURCE_DIR} && ln -sf ${PLATFORM_DIR}/pkg-src ${SOURCE_DIR}/debian
+
+VOLUME ${ARTIFACT_DIR}/
+
+COPY . ${SOURCE_DIR}/
+
+ENTRYPOINT ["/docker-build.sh"]
+#ENTRYPOINT ["/bin/bash"]

+ 34 - 0
deployment/debian-package-arm64/Dockerfile.arm64

@@ -0,0 +1,34 @@
+FROM debian:9
+# Docker build arguments
+ARG SOURCE_DIR=/jellyfin
+ARG PLATFORM_DIR=/jellyfin/deployment/debian-package-arm64
+ARG ARTIFACT_DIR=/dist
+ARG SDK_VERSION=2.2
+# Docker run environment
+ENV SOURCE_DIR=/jellyfin
+ENV ARTIFACT_DIR=/dist
+ENV DEB_BUILD_OPTIONS=noddebs
+ENV ARCH=arm64
+
+# Prepare Debian build environment
+RUN apt-get update \
+ && apt-get install -y apt-transport-https debhelper gnupg wget devscripts mmv libc6-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev liblttng-ust0
+
+# Install dotnet repository
+# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
+RUN wget https://download.visualstudio.microsoft.com/download/pr/d9f37b73-df8d-4dfa-a905-b7648d3401d0/6312573ac13d7a8ddc16e4058f7d7dc5/dotnet-sdk-2.2.104-linux-arm.tar.gz -O dotnet-sdk.tar.gz \
+ && mkdir -p dotnet-sdk \
+ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
+ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
+
+# Link to docker-build script
+RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
+
+# Link to Debian source dir; mkdir needed or it fails, can't force dest
+RUN mkdir -p ${SOURCE_DIR} && ln -sf ${PLATFORM_DIR}/pkg-src ${SOURCE_DIR}/debian
+
+VOLUME ${ARTIFACT_DIR}/
+
+COPY . ${SOURCE_DIR}/
+
+ENTRYPOINT ["/docker-build.sh"]

+ 29 - 0
deployment/debian-package-arm64/clean.sh

@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+source ../common.build.sh
+
+keep_artifacts="${1}"
+
+WORKDIR="$( pwd )"
+
+package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
+output_dir="${WORKDIR}/pkg-dist"
+current_user="$( whoami )"
+image_name="jellyfin-debian_arm64-build"
+
+rm -rf "${package_temporary_dir}" &>/dev/null \
+  || sudo rm -rf "${package_temporary_dir}" &>/dev/null
+
+rm -rf "${output_dir}" &>/dev/null \
+  || sudo rm -rf "${output_dir}" &>/dev/null
+
+if [[ ${keep_artifacts} == 'n' ]]; then
+    docker_sudo=""
+    if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
+      && [[ ! ${EUID:-1000} -eq 0 ]] \
+      && [[ ! ${USER} == "root" ]] \
+      && [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
+        docker_sudo=sudo
+    fi
+    ${docker_sudo} docker image rm ${image_name} --force
+fi

+ 1 - 0
deployment/debian-package-arm64/dependencies.txt

@@ -0,0 +1 @@
+docker

+ 20 - 0
deployment/debian-package-arm64/docker-build.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Builds the DEB inside the Docker container
+
+set -o errexit
+set -o xtrace
+
+# Move to source directory
+pushd ${SOURCE_DIR}
+
+# Remove build-dep for dotnet-sdk-2.2, since it's not a package in this image
+sed -i '/dotnet-sdk-2.2,/d' debian/control
+
+# Build DEB
+export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
+dpkg-buildpackage -us -uc -aarm64
+
+# Move the artifacts out
+mkdir -p ${ARTIFACT_DIR}/deb
+mv /jellyfin_* ${ARTIFACT_DIR}/deb/

+ 42 - 0
deployment/debian-package-arm64/package.sh

@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+
+source ../common.build.sh
+
+ARCH="$( arch )"
+WORKDIR="$( pwd )"
+
+package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
+output_dir="${WORKDIR}/pkg-dist"
+current_user="$( whoami )"
+image_name="jellyfin-debian_arm64-build"
+
+# Determine if sudo should be used for Docker
+if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
+  && [[ ! ${EUID:-1000} -eq 0 ]] \
+  && [[ ! ${USER} == "root" ]] \
+  && [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
+    docker_sudo="sudo"
+else
+    docker_sudo=""
+fi
+
+# Determine which Dockerfile to use
+case $ARCH in
+    'x86_64')
+        DOCKERFILE="Dockerfile.amd64"
+    ;;
+    'armv7l')
+        DOCKERFILE="Dockerfile.arm64"
+    ;;
+esac
+
+# Set up the build environment Docker image
+${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
+# Build the DEBs and copy out to ${package_temporary_dir}
+${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}"
+# Correct ownership on the DEBs (as current user, then as root if that fails)
+chown -R "${current_user}" "${package_temporary_dir}" &>/dev/null \
+  || sudo chown -R "${current_user}" "${package_temporary_dir}" &>/dev/null
+# Move the DEBs to the output directory
+mkdir -p "${output_dir}"
+mv "${package_temporary_dir}"/deb/* "${output_dir}"

+ 1 - 0
deployment/debian-package-arm64/pkg-src

@@ -0,0 +1 @@
+../debian-package-x64/pkg-src

+ 6 - 0
deployment/debian-package-x64/pkg-src/changelog

@@ -1,3 +1,9 @@
+jellyfin (10.3.2-1) unstable; urgency=medium
+
+  * New upstream version 10.3.2; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.2
+
+ -- Jellyfin Packaging Team <packaging@jellyfin.org>  Tue, 30 Apr 2019 20:18:44 -0400
+
 jellyfin (10.3.1-1) unstable; urgency=medium
 jellyfin (10.3.1-1) unstable; urgency=medium
 
 
   * New upstream version 10.3.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.1
   * New upstream version 10.3.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.1

+ 1 - 1
deployment/debian-package-x64/pkg-src/control

@@ -23,6 +23,6 @@ Depends: at,
          jellyfin-ffmpeg,
          jellyfin-ffmpeg,
          libfontconfig1,
          libfontconfig1,
          libfreetype6,
          libfreetype6,
-         libssl1.0.0 | libssl1.0.2
+         libssl1.0.0 | libssl1.0.2 | libssl1.1
 Description: Jellyfin is a home media server.
 Description: Jellyfin is a home media server.
  It is built on top of other popular open source technologies such as Service Stack, jQuery, jQuery mobile, and Mono. It features a REST-based api with built-in documentation to facilitate client development. We also have client libraries for our api to enable rapid development.
  It is built on top of other popular open source technologies such as Service Stack, jQuery, jQuery mobile, and Mono. It features a REST-based api with built-in documentation to facilitate client development. We also have client libraries for our api to enable rapid development.

+ 10 - 3
deployment/debian-package-x64/pkg-src/rules

@@ -6,18 +6,25 @@ SHELL := /bin/bash
 HOST_ARCH := $(shell arch)
 HOST_ARCH := $(shell arch)
 BUILD_ARCH := ${DEB_HOST_MULTIARCH}
 BUILD_ARCH := ${DEB_HOST_MULTIARCH}
 ifeq ($(HOST_ARCH),x86_64)
 ifeq ($(HOST_ARCH),x86_64)
+    # Building AMD64
+    DOTNETRUNTIME := debian-x64
     ifeq ($(BUILD_ARCH),arm-linux-gnueabihf)
     ifeq ($(BUILD_ARCH),arm-linux-gnueabihf)
         # Cross-building ARM on AMD64
         # Cross-building ARM on AMD64
         DOTNETRUNTIME := debian-arm
         DOTNETRUNTIME := debian-arm
-    else
-        # Building AMD64
-        DOTNETRUNTIME := debian-x64
+    endif
+    ifeq ($(BUILD_ARCH),aarch64-linux-gnu)
+        # Cross-building ARM on AMD64
+        DOTNETRUNTIME := debian-arm64
     endif
     endif
 endif
 endif
 ifeq ($(HOST_ARCH),armv7l)
 ifeq ($(HOST_ARCH),armv7l)
     # Building ARM
     # Building ARM
     DOTNETRUNTIME := debian-arm
     DOTNETRUNTIME := debian-arm
 endif
 endif
+ifeq ($(HOST_ARCH),arm64)
+    # Building ARM
+    DOTNETRUNTIME := debian-arm64
+endif
 
 
 export DH_VERBOSE=1
 export DH_VERBOSE=1
 export DOTNET_CLI_TELEMETRY_OPTOUT=1
 export DOTNET_CLI_TELEMETRY_OPTOUT=1

+ 3 - 1
deployment/fedora-package-x64/pkg-src/jellyfin.spec

@@ -7,7 +7,7 @@
 %endif
 %endif
 
 
 Name:           jellyfin
 Name:           jellyfin
-Version:        10.3.1
+Version:        10.3.2
 Release:        1%{?dist}
 Release:        1%{?dist}
 Summary:        The Free Software Media Browser
 Summary:        The Free Software Media Browser
 License:        GPLv2
 License:        GPLv2
@@ -140,6 +140,8 @@ fi
 %systemd_postun_with_restart jellyfin.service
 %systemd_postun_with_restart jellyfin.service
 
 
 %changelog
 %changelog
+* Tue Apr 30 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
+- New upstream version 10.3.2; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.2
 * Sat Apr 20 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
 * Sat Apr 20 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
 - New upstream version 10.3.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.1
 - New upstream version 10.3.1; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.1
 * Fri Apr 19 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
 * Fri Apr 19 2019 Jellyfin Packaging Team <packaging@jellyfin.org>

+ 53 - 0
deployment/ubuntu-package-arm64/Dockerfile.amd64

@@ -0,0 +1,53 @@
+FROM ubuntu:bionic
+# Docker build arguments
+ARG SOURCE_DIR=/jellyfin
+ARG PLATFORM_DIR=/jellyfin/deployment/ubuntu-package-arm64
+ARG ARTIFACT_DIR=/dist
+ARG SDK_VERSION=2.2
+# Docker run environment
+ENV SOURCE_DIR=/jellyfin
+ENV ARTIFACT_DIR=/dist
+ENV DEB_BUILD_OPTIONS=noddebs
+ENV ARCH=amd64
+
+# Prepare Debian build environment
+RUN apt-get update \
+ && apt-get install -y apt-transport-https debhelper gnupg wget devscripts mmv 
+
+# Install dotnet repository
+# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
+RUN wget https://download.visualstudio.microsoft.com/download/pr/69937b49-a877-4ced-81e6-286620b390ab/8ab938cf6f5e83b2221630354160ef21/dotnet-sdk-2.2.104-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
+ && mkdir -p dotnet-sdk \
+ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
+ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
+
+# Prepare the cross-toolchain
+RUN rm /etc/apt/sources.list \
+ && export CODENAME="$( lsb_release -c -s )" \
+ && echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
+ && echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
+ && echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-backports main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
+ && echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-security main restricted universe multiverse" >>/etc/apt/sources.list.d/amd64.list \
+ && echo "deb [arch=arm64] http://ports.ubuntu.com/ ${CODENAME} main restricted universe multiverse" >>/etc/apt/sources.list.d/arm64.list \
+ && echo "deb [arch=arm64] http://ports.ubuntu.com/ ${CODENAME}-updates main restricted universe multiverse" >>/etc/apt/sources.list.d/arm64.list \
+ && echo "deb [arch=arm64] http://ports.ubuntu.com/ ${CODENAME}-backports main restricted universe multiverse" >>/etc/apt/sources.list.d/arm64.list \
+ && echo "deb [arch=arm64] http://ports.ubuntu.com/ ${CODENAME}-security main restricted universe multiverse" >>/etc/apt/sources.list.d/arm64.list \
+ && dpkg --add-architecture arm64 \
+ && apt-get update \
+ && apt-get install -y cross-gcc-dev \
+ && TARGET_LIST="arm64" cross-gcc-gensource 6 \
+ && cd cross-gcc-packages-amd64/cross-gcc-6-arm64 \
+ && ln -fs /usr/share/zoneinfo/America/Toronto /etc/localtime \
+ && apt-get install -y gcc-6-source libstdc++6-arm64-cross binutils-aarch64-linux-gnu bison flex libtool gdb sharutils netbase libcloog-isl-dev libmpc-dev libmpfr-dev libgmp-dev systemtap-sdt-dev autogen expect chrpath zlib1g-dev zip libc6-dev:arm64 linux-libc-dev:arm64 libgcc1:arm64 libcurl4-openssl-dev:arm64 libfontconfig1-dev:arm64 libfreetype6-dev:arm64 liblttng-ust0:arm64 libstdc++6:arm64
+
+# Link to docker-build script
+RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
+
+# Link to Debian source dir; mkdir needed or it fails, can't force dest
+RUN mkdir -p ${SOURCE_DIR} && ln -sf ${PLATFORM_DIR}/pkg-src ${SOURCE_DIR}/debian
+
+VOLUME ${ARTIFACT_DIR}/
+
+COPY . ${SOURCE_DIR}/
+
+ENTRYPOINT ["/docker-build.sh"]

+ 34 - 0
deployment/ubuntu-package-arm64/Dockerfile.arm64

@@ -0,0 +1,34 @@
+FROM ubuntu:bionic
+# Docker build arguments
+ARG SOURCE_DIR=/jellyfin
+ARG PLATFORM_DIR=/jellyfin/deployment/ubuntu-package-arm64
+ARG ARTIFACT_DIR=/dist
+ARG SDK_VERSION=2.2
+# Docker run environment
+ENV SOURCE_DIR=/jellyfin
+ENV ARTIFACT_DIR=/dist
+ENV DEB_BUILD_OPTIONS=noddebs
+ENV ARCH=arm64
+
+# Prepare Debian build environment
+RUN apt-get update \
+ && apt-get install -y apt-transport-https debhelper gnupg wget devscripts mmv libc6-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev liblttng-ust0
+
+# Install dotnet repository
+# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
+RUN wget https://download.visualstudio.microsoft.com/download/pr/d9f37b73-df8d-4dfa-a905-b7648d3401d0/6312573ac13d7a8ddc16e4058f7d7dc5/dotnet-sdk-2.2.104-linux-arm.tar.gz -O dotnet-sdk.tar.gz \
+ && mkdir -p dotnet-sdk \
+ && tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
+ && ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
+
+# Link to docker-build script
+RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
+
+# Link to Debian source dir; mkdir needed or it fails, can't force dest
+RUN mkdir -p ${SOURCE_DIR} && ln -sf ${PLATFORM_DIR}/pkg-src ${SOURCE_DIR}/debian
+
+VOLUME ${ARTIFACT_DIR}/
+
+COPY . ${SOURCE_DIR}/
+
+ENTRYPOINT ["/docker-build.sh"]

+ 29 - 0
deployment/ubuntu-package-arm64/clean.sh

@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+source ../common.build.sh
+
+keep_artifacts="${1}"
+
+WORKDIR="$( pwd )"
+
+package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
+output_dir="${WORKDIR}/pkg-dist"
+current_user="$( whoami )"
+image_name="jellyfin-ubuntu-build"
+
+rm -rf "${package_temporary_dir}" &>/dev/null \
+  || sudo rm -rf "${package_temporary_dir}" &>/dev/null
+
+rm -rf "${output_dir}" &>/dev/null \
+  || sudo rm -rf "${output_dir}" &>/dev/null
+
+if [[ ${keep_artifacts} == 'n' ]]; then
+    docker_sudo=""
+    if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
+      && [[ ! ${EUID:-1000} -eq 0 ]] \
+      && [[ ! ${USER} == "root" ]] \
+      && [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
+        docker_sudo=sudo
+    fi
+    ${docker_sudo} docker image rm ${image_name} --force
+fi

+ 1 - 0
deployment/ubuntu-package-arm64/dependencies.txt

@@ -0,0 +1 @@
+docker

+ 20 - 0
deployment/ubuntu-package-arm64/docker-build.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Builds the DEB inside the Docker container
+
+set -o errexit
+set -o xtrace
+
+# Move to source directory
+pushd ${SOURCE_DIR}
+
+# Remove build-dep for dotnet-sdk-2.2, since it's not a package in this image
+sed -i '/dotnet-sdk-2.2,/d' debian/control
+
+# Build DEB
+export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
+dpkg-buildpackage -us -uc -aarm64
+
+# Move the artifacts out
+mkdir -p ${ARTIFACT_DIR}/deb
+mv /jellyfin_* ${ARTIFACT_DIR}/deb/

+ 42 - 0
deployment/ubuntu-package-arm64/package.sh

@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+
+source ../common.build.sh
+
+ARCH="$( arch )"
+WORKDIR="$( pwd )"
+
+package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
+output_dir="${WORKDIR}/pkg-dist"
+current_user="$( whoami )"
+image_name="jellyfin-ubuntu_arm64-build"
+
+# Determine if sudo should be used for Docker
+if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
+  && [[ ! ${EUID:-1000} -eq 0 ]] \
+  && [[ ! ${USER} == "root" ]] \
+  && [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
+    docker_sudo="sudo"
+else
+    docker_sudo=""
+fi
+
+# Determine which Dockerfile to use
+case $ARCH in
+    'x86_64')
+        DOCKERFILE="Dockerfile.amd64"
+    ;;
+    'armv7l')
+        DOCKERFILE="Dockerfile.arm64"
+    ;;
+esac
+
+# Set up the build environment Docker image
+${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
+# Build the DEBs and copy out to ${package_temporary_dir}
+${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}"
+# Correct ownership on the DEBs (as current user, then as root if that fails)
+chown -R "${current_user}" "${package_temporary_dir}" &>/dev/null \
+  || sudo chown -R "${current_user}" "${package_temporary_dir}" &>/dev/null
+# Move the DEBs to the output directory
+mkdir -p "${output_dir}"
+mv "${package_temporary_dir}"/deb/* "${output_dir}"

+ 1 - 0
deployment/ubuntu-package-arm64/pkg-src

@@ -0,0 +1 @@
+../debian-package-x64/pkg-src