瀏覽代碼

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

Backmerge for Release 10.3.3
Bond-009 6 年之前
父節點
當前提交
2d011b781e

+ 1 - 1
Dockerfile

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

+ 3 - 2
Emby.Dlna/Didl/DidlBuilder.cs

@@ -920,8 +920,6 @@ namespace Emby.Dlna.Didl
                 }
             }
 
-            AddImageResElement(item, writer, 160, 160, "jpg", "JPEG_TN");
-
             if (!_profile.EnableSingleAlbumArtLimit || string.Equals(item.MediaType, MediaType.Photo, StringComparison.OrdinalIgnoreCase))
             {
                 AddImageResElement(item, writer, 4096, 4096, "jpg", "JPEG_LRG");
@@ -930,6 +928,9 @@ namespace Emby.Dlna.Didl
                 AddImageResElement(item, writer, 4096, 4096, "png", "PNG_LRG");
                 AddImageResElement(item, writer, 160, 160, "png", "PNG_TN");
             }
+
+            AddImageResElement(item, writer, 160, 160, "jpg", "JPEG_TN");
+
         }
 
         private void AddEmbeddedImageAsCover(string name, XmlWriter writer)

+ 3 - 3
Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs

@@ -19,7 +19,7 @@ namespace Emby.Server.Implementations.Library
         public string Name => "Default";
 
         public bool IsEnabled => true;
-        
+
         // This is dumb and an artifact of the backwards way auth providers were designed.
         // This version of authenticate was never meant to be called, but needs to be here for interface compat
         // Only the providers that don't provide local user support use this
@@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Library
         {
             throw new NotImplementedException();
         }
-        
+
         // This is the verson that we need to use for local users. Because reasons.
         public Task<ProviderAuthenticationResult> Authenticate(string username, string password, User resolvedUser)
         {
@@ -103,7 +103,7 @@ namespace Emby.Server.Implementations.Library
                 string hash = user.Password;
                 user.Password = string.Format("$SHA1${0}", hash);
             }
-            
+
             if (user.EasyPassword != null && !user.EasyPassword.Contains("$"))
             {
                 string hash = user.EasyPassword;

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

@@ -550,7 +550,7 @@ namespace Emby.Server.Implementations.Library
         {
             return string.IsNullOrEmpty(user.EasyPassword)
                 ? null
-                : user.EasyPassword;
+                : (new PasswordHash(user.EasyPassword)).Hash;
         }
 
         /// <summary>

+ 12 - 1
MediaBrowser.Api/Library/LibraryService.cs

@@ -2,6 +2,8 @@ using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using System.Net;
+using System.Text.RegularExpressions;
 using System.Threading;
 using System.Threading.Tasks;
 using MediaBrowser.Api.Movies;
@@ -828,7 +830,16 @@ namespace MediaBrowser.Api.Library
             var filename = (Path.GetFileName(path) ?? string.Empty).Replace("\"", string.Empty);
             if (!string.IsNullOrWhiteSpace(filename))
             {
-                headers[HeaderNames.ContentDisposition] = "attachment; filename=\"" + filename + "\"";
+                // Kestrel doesn't support non-ASCII characters in headers
+                if (Regex.IsMatch(filename, "[^[:ascii:]]"))
+                {
+                    // Manually encoding non-ASCII characters, following https://tools.ietf.org/html/rfc5987#section-3.2.2
+                    headers[HeaderNames.ContentDisposition] = "attachment; filename*=UTF-8''" + WebUtility.UrlEncode(filename);
+                }
+                else
+                {
+                    headers[HeaderNames.ContentDisposition] = "attachment; filename=\"" + filename + "\"";
+                }
             }
 
             return ResultFactory.GetStaticFileResult(Request, new StaticFileResultOptions

+ 62 - 29
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -78,10 +78,25 @@ namespace MediaBrowser.Controller.Entities
         /// <summary>
         /// The trailer folder name
         /// </summary>
-        public static string TrailerFolderName = "trailers";
-        public static string ThemeSongsFolderName = "theme-music";
-        public static string ThemeSongFilename = "theme";
-        public static string ThemeVideosFolderName = "backdrops";
+        public const string TrailerFolderName = "trailers";
+        public const string ThemeSongsFolderName = "theme-music";
+        public const string ThemeSongFilename = "theme";
+        public const string ThemeVideosFolderName = "backdrops";
+        public const string ExtrasFolderName = "extras";
+        public const string BehindTheScenesFolderName = "behind the scenes";
+        public const string DeletedScenesFolderName = "deleted scenes";
+        public const string InterviewFolderName = "interviews";
+        public const string SceneFolderName = "scenes";
+        public const string SampleFolderName = "samples";
+
+        public static readonly string[] AllExtrasTypesFolderNames = {
+            ExtrasFolderName,
+            BehindTheScenesFolderName,
+            DeletedScenesFolderName,
+            InterviewFolderName,
+            SceneFolderName,
+            SampleFolderName
+        };
 
         [IgnoreDataMember]
         public Guid[] ThemeSongIds { get; set; }
@@ -1276,16 +1291,15 @@ namespace MediaBrowser.Controller.Entities
                 .Select(item =>
                 {
                     // Try to retrieve it from the db. If we don't find it, use the resolved version
-                    var dbItem = LibraryManager.GetItemById(item.Id) as Video;
 
-                    if (dbItem != null)
+                    if (LibraryManager.GetItemById(item.Id) is Video dbItem)
                     {
                         item = dbItem;
                     }
                     else
                     {
                         // item is new
-                        item.ExtraType = MediaBrowser.Model.Entities.ExtraType.ThemeVideo;
+                        item.ExtraType = Model.Entities.ExtraType.ThemeVideo;
                     }
 
                     return item;
@@ -1296,32 +1310,37 @@ namespace MediaBrowser.Controller.Entities
 
         protected virtual BaseItem[] LoadExtras(List<FileSystemMetadata> fileSystemChildren, IDirectoryService directoryService)
         {
-            var files = fileSystemChildren.Where(i => i.IsDirectory)
-                .SelectMany(i => FileSystem.GetFiles(i.FullName));
+            var extras = new List<Video>();
 
-            return LibraryManager.ResolvePaths(files, directoryService, null, new LibraryOptions())
-                .OfType<Video>()
-                .Select(item =>
-                {
-                    // Try to retrieve it from the db. If we don't find it, use the resolved version
-                    var dbItem = LibraryManager.GetItemById(item.Id) as Video;
+            var folders = fileSystemChildren.Where(i => i.IsDirectory).ToArray();
+            foreach (var extraFolderName in AllExtrasTypesFolderNames)
+            {
+                var files = folders
+                    .Where(i => string.Equals(i.Name, extraFolderName, StringComparison.OrdinalIgnoreCase))
+                    .SelectMany(i => FileSystem.GetFiles(i.FullName));
 
-                    if (dbItem != null)
-                    {
-                        item = dbItem;
-                    }
-                    else
+                extras.AddRange(LibraryManager.ResolvePaths(files, directoryService, null, new LibraryOptions())
+                    .OfType<Video>()
+                    .Select(item =>
                     {
-                        // item is new
-                        item.ExtraType = MediaBrowser.Model.Entities.ExtraType.Clip;
-                    }
+                        // Try to retrieve it from the db. If we don't find it, use the resolved version
+                        if (LibraryManager.GetItemById(item.Id) is Video dbItem)
+                        {
+                            item = dbItem;
+                        }
 
-                    return item;
+                        // Use some hackery to get the extra type based on foldername
+                        Enum.TryParse(extraFolderName.Replace(" ", ""), true, out ExtraType extraType);
+                        item.ExtraType = extraType;
 
-                    // Sort them so that the list can be easily compared for changes
-                }).OrderBy(i => i.Path).ToArray();
-        }
+                        return item;
+
+                        // Sort them so that the list can be easily compared for changes
+                    }).OrderBy(i => i.Path));
+            }
 
+            return extras.ToArray();
+        }
 
         public Task RefreshMetadata(CancellationToken cancellationToken)
         {
@@ -1481,7 +1500,13 @@ namespace MediaBrowser.Controller.Entities
 
         private async Task<bool> RefreshExtras(BaseItem item, MetadataRefreshOptions options, List<FileSystemMetadata> fileSystemChildren, CancellationToken cancellationToken)
         {
-            var newExtras = LoadExtras(fileSystemChildren, options.DirectoryService).Concat(LoadThemeVideos(fileSystemChildren, options.DirectoryService)).Concat(LoadThemeSongs(fileSystemChildren, options.DirectoryService));
+            var extras = LoadExtras(fileSystemChildren, options.DirectoryService);
+            var themeVideos = LoadThemeVideos(fileSystemChildren, options.DirectoryService);
+            var themeSongs = LoadThemeSongs(fileSystemChildren, options.DirectoryService);
+            var newExtras = new BaseItem[extras.Length + themeVideos.Length + themeSongs.Length];
+            extras.CopyTo(newExtras, 0);
+            themeVideos.CopyTo(newExtras, extras.Length);
+            themeSongs.CopyTo(newExtras, extras.Length + themeVideos.Length);
 
             var newExtraIds = newExtras.Select(i => i.Id).ToArray();
 
@@ -1493,7 +1518,15 @@ namespace MediaBrowser.Controller.Entities
 
                 var tasks = newExtras.Select(i =>
                 {
-                    return RefreshMetadataForOwnedItem(i, true, new MetadataRefreshOptions(options), cancellationToken);
+                    var subOptions = new MetadataRefreshOptions(options);
+                    if (i.OwnerId != ownerId || i.ParentId != Guid.Empty)
+                    {
+                        i.OwnerId = ownerId;
+                        i.ParentId = Guid.Empty;
+                        subOptions.ForceSave = true;
+                    }
+
+                    return RefreshMetadataForOwnedItem(i, true, subOptions, cancellationToken);
                 });
 
                 await Task.WhenAll(tasks).ConfigureAwait(false);

+ 1 - 1
MediaBrowser.WebDashboard/jellyfin-web

@@ -1 +1 @@
-Subproject commit 1ba58b06b3dc28e07abae124cff78aa656fcb7e7
+Subproject commit b0f7a9b67cc72de98dc357425e9d5c3894c7f377

+ 2 - 2
SharedVersion.cs

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

+ 1 - 1
build.yaml

@@ -1,7 +1,7 @@
 ---
 # We just wrap `build` so this is really it
 name: "jellyfin"
-version: "10.3.2"
+version: "10.3.3"
 packages:
   - debian-package-x64
   - debian-package-armhf

+ 1 - 0
deployment/centos-package-x64/docker-build.sh

@@ -18,3 +18,4 @@ rpmbuild -bb SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-
 # Move the artifacts out
 mkdir -p ${ARTIFACT_DIR}/rpm
 mv /root/rpmbuild/RPMS/x86_64/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/rpm/
+chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

+ 0 - 3
deployment/centos-package-x64/package.sh

@@ -72,9 +72,6 @@ fi
 ${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
 # Build the RPMs and copy out to ${package_temporary_dir}
 ${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}"
-# Correct ownership on the RPMs (as current user, then as root if that fails)
-chown -R "${current_user}" "${package_temporary_dir}" \
-  || sudo chown -R "${current_user}" "${package_temporary_dir}"
 # Move the RPMs to the output directory
 mkdir -p "${output_dir}"
 mv "${package_temporary_dir}"/rpm/* "${output_dir}"

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

@@ -18,3 +18,4 @@ dpkg-buildpackage -us -uc -aarm64
 # Move the artifacts out
 mkdir -p ${ARTIFACT_DIR}/deb
 mv /jellyfin_* ${ARTIFACT_DIR}/deb/
+chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

+ 2 - 3
deployment/debian-package-arm64/package.sh

@@ -30,13 +30,12 @@ case $ARCH in
     ;;
 esac
 
+# Prepare temporary package dir
+mkdir -p "${package_temporary_dir}"
 # 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-armhf/docker-build.sh

@@ -18,3 +18,4 @@ dpkg-buildpackage -us -uc -aarmhf
 # Move the artifacts out
 mkdir -p ${ARTIFACT_DIR}/deb
 mv /jellyfin_* ${ARTIFACT_DIR}/deb/
+chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

+ 2 - 3
deployment/debian-package-armhf/package.sh

@@ -30,13 +30,12 @@ case $ARCH in
     ;;
 esac
 
+# Prepare temporary package dir
+mkdir -p "${package_temporary_dir}"
 # 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-x64/docker-build.sh

@@ -17,3 +17,4 @@ dpkg-buildpackage -us -uc
 # Move the artifacts out
 mkdir -p ${ARTIFACT_DIR}/deb
 mv /jellyfin_* ${ARTIFACT_DIR}/deb/
+chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

+ 2 - 3
deployment/debian-package-x64/package.sh

@@ -19,13 +19,12 @@ else
     docker_sudo=""
 fi
 
+# Prepare temporary package dir
+mkdir -p "${package_temporary_dir}"
 # 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}"

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

@@ -1,3 +1,9 @@
+jellyfin (10.3.3-1) unstable; urgency=medium
+
+  * New upstream version 10.3.3; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.3
+
+ -- Jellyfin Packaging Team <packaging@jellyfin.org>  Fri, 17 May 2019 23:12:08 -0400
+
 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

+ 1 - 0
deployment/fedora-package-x64/docker-build.sh

@@ -18,3 +18,4 @@ rpmbuild -bb SPECS/jellyfin.spec --define "_sourcedir ${SOURCE_DIR}/SOURCES/pkg-
 # Move the artifacts out
 mkdir -p ${ARTIFACT_DIR}/rpm
 mv /root/rpmbuild/RPMS/x86_64/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/rpm/
+chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

+ 2 - 3
deployment/fedora-package-x64/package.sh

@@ -23,13 +23,12 @@ fi
 
 ./create_tarball.sh
 
+# Prepare temporary package dir
+mkdir -p "${package_temporary_dir}"
 # Set up the build environment Docker image
 ${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
 # Build the RPMs and copy out to ${package_temporary_dir}
 ${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}"
-# Correct ownership on the RPMs (as current user, then as root if that fails)
-chown -R "${current_user}" "${package_temporary_dir}" \
-  || sudo chown -R "${current_user}" "${package_temporary_dir}"
 # Move the RPMs to the output directory
 mkdir -p "${output_dir}"
 mv "${package_temporary_dir}"/rpm/* "${output_dir}"

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

@@ -7,7 +7,7 @@
 %endif
 
 Name:           jellyfin
-Version:        10.3.2
+Version:        10.3.3
 Release:        1%{?dist}
 Summary:        The Free Software Media Browser
 License:        GPLv2
@@ -140,6 +140,8 @@ fi
 %systemd_postun_with_restart jellyfin.service
 
 %changelog
+* Fri May 17 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
+- New upstream version 10.3.3; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.3.3
 * 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>

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

@@ -18,3 +18,4 @@ dpkg-buildpackage -us -uc -aarm64
 # Move the artifacts out
 mkdir -p ${ARTIFACT_DIR}/deb
 mv /jellyfin_* ${ARTIFACT_DIR}/deb/
+chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

+ 2 - 3
deployment/ubuntu-package-arm64/package.sh

@@ -30,13 +30,12 @@ case $ARCH in
     ;;
 esac
 
+# Prepare temporary package dir
+mkdir -p "${package_temporary_dir}"
 # 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-armhf/docker-build.sh

@@ -18,3 +18,4 @@ dpkg-buildpackage -us -uc -aarmhf
 # Move the artifacts out
 mkdir -p ${ARTIFACT_DIR}/deb
 mv /jellyfin_* ${ARTIFACT_DIR}/deb/
+chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

+ 2 - 3
deployment/ubuntu-package-armhf/package.sh

@@ -30,13 +30,12 @@ case $ARCH in
     ;;
 esac
 
+# Prepare temporary package dir
+mkdir -p "${package_temporary_dir}"
 # 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-x64/docker-build.sh

@@ -17,3 +17,4 @@ dpkg-buildpackage -us -uc
 # Move the artifacts out
 mkdir -p ${ARTIFACT_DIR}/deb
 mv /jellyfin_* ${ARTIFACT_DIR}/deb/
+chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}

+ 2 - 3
deployment/ubuntu-package-x64/package.sh

@@ -19,13 +19,12 @@ else
     docker_sudo=""
 fi
 
+# Prepare temporary package dir
+mkdir -p "${package_temporary_dir}"
 # 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}"