public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-containers/incus/, app-containers/incus/files/
Date: Wed, 05 Feb 2025 16:58:06 +0000 (UTC)	[thread overview]
Message-ID: <1738774684.bed6230f2596ddf1cf1a1a9f2e2bcc81eea19b3f.juippis@gentoo> (raw)

commit:     bed6230f2596ddf1cf1a1a9f2e2bcc81eea19b3f
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 16:57:01 2025 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> 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 <juippis <AT> 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?= <stgraber@stgraber.org>
+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 <stgraber@stgraber.org>
+---
+ 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


             reply	other threads:[~2025-02-05 16:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 16:58 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-02  8:19 [gentoo-commits] repo/gentoo:master commit in: app-containers/incus/, app-containers/incus/files/ Joonas Niilola
2024-07-12 19:28 Joonas Niilola
2024-04-29  8:18 Joonas Niilola
2024-01-31  7:37 Joonas Niilola
2023-12-27 17:21 Joonas Niilola
2023-12-13  8:09 Joonas Niilola
2023-10-13 17:22 Joonas Niilola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1738774684.bed6230f2596ddf1cf1a1a9f2e2bcc81eea19b3f.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox