From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Daniel Kral <d.kral@proxmox.com>
Subject: [pve-devel] applied: [PATCH installer v2] auto: allow a binary executable as the first boot executable
Date: Mon, 24 Feb 2025 16:23:52 +0100 [thread overview]
Message-ID: <247b2cfe-fc93-4b33-828c-ea8848b3ce90@proxmox.com> (raw)
In-Reply-To: <20241211092436.69088-1-d.kral@proxmox.com>
Am 11.12.24 um 10:24 schrieb Daniel Kral:
> As the initial use case for the first boot feature request [0] was for
> running shell scripts, the auto installer retrieved the binary as a
> `String`. Unfortunately, this tries to interpret binary data as UTF-8
> and will transform 'invalid' characters to replacement characters [1].
>
> This causes the auto-installer to create an invalid binary when fetching
> from an URL, and error with a `stream did not contain valid UTF-8` error
> when fetching from the ISO image.
>
> To allow binary executables to be used as a first boot executable, this
> commit changes the fetching from being read as a `String` to being read
> as a `Vec<u8>` to not interfere with the content of the executable.
>
> [0] https://bugzilla.proxmox.com/show_bug.cgi?id=5579
> [1] https://doc.rust-lang.org/src/alloc/string.rs.html#635
>
> Signed-off-by: Daniel Kral <d.kral@proxmox.com>
> ---
> changes from v1:
> - remove explicit handling of `std::io::ErrorKind::UnexpectedEof`
>
> .../src/bin/proxmox-auto-installer.rs | 12 ++++++++----
> proxmox-installer-common/src/http.rs | 18 ++++++++++++++----
> 2 files changed, 22 insertions(+), 8 deletions(-)
>
>
applied, with Christoph's R-b and T-b, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-02-24 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 9:24 [pve-devel] " Daniel Kral
2024-12-13 10:00 ` Christoph Heiss
2024-12-18 7:29 ` Daniel Kral
2025-02-24 15:23 ` Thomas Lamprecht [this message]
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=247b2cfe-fc93-4b33-828c-ea8848b3ce90@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.kral@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal