From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id F33D21FF09B for ; Mon, 17 Aug 2026 14:59:35 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 95BD62168E; Mon, 17 Aug 2026 14:59:30 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Subject: [PATCH installer 2/2] auto, post-hook: explicitly ref FqdnConfigContainer when `match`ing Date: Mon, 17 Aug 2026 14:54:24 +0200 Message-ID: <20260817125907.878237-3-c.heiss@proxmox.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817125907.878237-1-c.heiss@proxmox.com> References: <20260817125907.878237-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1786971543043 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.748 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: MJBUZTAPYO2TUF5CSMU4LARGAOK562OU X-Message-ID-Hash: MJBUZTAPYO2TUF5CSMU4LARGAOK562OU X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Adaps both crates/binaries to the schema change after commit 4d7f57a12 ("installer-types: replace illegal oneOf schema") in `proxmox`, which changed the `fqdn` field. FqdnConfigContainer now implements AsRef, so switch to that. No functional changes. Signed-off-by: Christoph Heiss --- Depends on the previous patch and needs an appropriate bump of the proxmox-installer-types crate dependency. proxmox-auto-installer/src/utils.rs | 2 +- proxmox-post-hook/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-auto-installer/src/utils.rs b/proxmox-auto-installer/src/utils.rs index 710af21..7205ae3 100644 --- a/proxmox-auto-installer/src/utils.rs +++ b/proxmox-auto-installer/src/utils.rs @@ -40,7 +40,7 @@ fn get_network_settings( .interface_name_pinning() .map(|answer| answer.into()); - let mut network_options = match &answer.global.fqdn { + let mut network_options = match answer.global.fqdn.as_ref() { // If the user set a static FQDN in the answer file, override it FqdnConfig::Simple(name) => { let mut opts = NetworkOptions::defaults_from( diff --git a/proxmox-post-hook/src/main.rs b/proxmox-post-hook/src/main.rs index ec9ab74..749fd0e 100644 --- a/proxmox-post-hook/src/main.rs +++ b/proxmox-post-hook/src/main.rs @@ -98,7 +98,7 @@ mod detail { .and_then(|r| Ok(String::from_utf8(r.stdout)?)) }; - let fqdn = match &answer.global.fqdn { + let fqdn = match answer.global.fqdn.as_ref() { FqdnConfig::Simple(name) => name.to_string(), FqdnConfig::FromDhcp(FqdnFromDhcpConfig { source: FqdnSourceMode::FromDhcp, -- 2.55.0