From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8D344158B20 for ; Wed, 05 Feb 2025 16:58:09 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 51230342FA6 for ; Wed, 05 Feb 2025 16:58:09 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 4B1461103CB; Wed, 05 Feb 2025 16:58:08 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 3E45C1103CB for ; Wed, 05 Feb 2025 16:58:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D5930342FA6 for ; Wed, 05 Feb 2025 16:58:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6EEAD1ABE for ; Wed, 05 Feb 2025 16:58:06 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1738774684.bed6230f2596ddf1cf1a1a9f2e2bcc81eea19b3f.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/incus/, app-containers/incus/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-containers/incus/files/incus-6.9-read-files-in-chunks.patch app-containers/incus/incus-6.9-r1.ebuild app-containers/incus/incus-6.9-r2.ebuild X-VCS-Directories: app-containers/incus/ app-containers/incus/files/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: bed6230f2596ddf1cf1a1a9f2e2bcc81eea19b3f X-VCS-Branch: master Date: Wed, 05 Feb 2025 16:58:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0cf13463-3e47-4bc5-858b-68fe29fb6b01 X-Archives-Hash: 9463db8282d0d4a1c8913858d640f286 commit: bed6230f2596ddf1cf1a1a9f2e2bcc81eea19b3f Author: Joonas Niilola gentoo org> AuthorDate: Wed Feb 5 16:57:01 2025 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Wed Feb 5 16:58:04 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bed6230f app-containers/incus: another 'incus file' fix in 6.9 Signed-off-by: Joonas Niilola gentoo.org> .../files/incus-6.9-read-files-in-chunks.patch | 39 ++++++++++++++++++++++ .../{incus-6.9-r1.ebuild => incus-6.9-r2.ebuild} | 3 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/app-containers/incus/files/incus-6.9-read-files-in-chunks.patch b/app-containers/incus/files/incus-6.9-read-files-in-chunks.patch new file mode 100644 index 000000000000..05c7b45c0e5d --- /dev/null +++ b/app-containers/incus/files/incus-6.9-read-files-in-chunks.patch @@ -0,0 +1,39 @@ +From f2ef7aa808e204c8714de40b29895ea596e2bb0e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?St=C3=A9phane=20Graber?= +Date: Sun, 2 Feb 2025 09:18:54 +0100 +Subject: [PATCH] incus/file/pull: Read files in chunks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Stéphane Graber +--- + cmd/incus/file.go | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/cmd/incus/file.go b/cmd/incus/file.go +index 99467a0bfc5..4aad930acd8 100644 +--- a/cmd/incus/file.go ++++ b/cmd/incus/file.go +@@ -686,10 +686,17 @@ func (c *cmdFilePull) Run(cmd *cobra.Command, args []string) error { + return err + } + } else { +- _, err = io.Copy(writer, src) +- if err != nil { +- progress.Done("") +- return err ++ for { ++ // Read 1MB at a time. ++ _, err = io.CopyN(writer, src, 1024*1024*1024) ++ if err != nil { ++ if err == io.EOF { ++ break ++ } ++ ++ progress.Done("") ++ return err ++ } + } + } + diff --git a/app-containers/incus/incus-6.9-r1.ebuild b/app-containers/incus/incus-6.9-r2.ebuild similarity index 98% rename from app-containers/incus/incus-6.9-r1.ebuild rename to app-containers/incus/incus-6.9-r2.ebuild index 2554cf605f8b..8b0952f3ad95 100644 --- a/app-containers/incus/incus-6.9-r1.ebuild +++ b/app-containers/incus/incus-6.9-r2.ebuild @@ -91,7 +91,8 @@ RESTRICT="test" GOPATH="${S}/_dist" -PATCHES=( "${FILESDIR}"/incus-6.9-ensure-leading-slash-in-all-paths.patch ) +PATCHES=( "${FILESDIR}"/incus-6.9-ensure-leading-slash-in-all-paths.patch + "${FILESDIR}"/incus-6.9-read-files-in-chunks.patch ) src_unpack() { verify-sig_src_unpack