From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id 6F7C81FF164
	for <inbox@lore.proxmox.com>; Fri,  9 May 2025 14:11:46 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 8E2093C71E;
	Fri,  9 May 2025 14:12:05 +0200 (CEST)
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Fri,  9 May 2025 14:09:12 +0200
Message-ID: <20250509121007.1430080-1-c.heiss@proxmox.com>
X-Mailer: git-send-email 2.49.0
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.030 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [main.rs, cli.rs, proxmox.com, lib.rs, utils.rs, answer.rs]
Subject: [pve-devel] [PATCH installer 0/5] chroot,
 assistant: replace clap with pico-args
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

This series first and foremost replaces clap, which is used by
proxmox-chroot and proxmox-auto-install-assistant for parsing CLI
arguments.

clap likes to completely overhaul its API with ~each major release,
which causes quite some churn. It is also quite heavyweight, both in
compile time and binary size impact (see patches #2 & #3 for details on
that). 

We already use pico-args in other tools such as pmg-log-tracker and
vma-to-pbs. Thomas also favored removing clap in the past, most recently
in [0].

Patches #4 through #5 are two other small cleanups & optimizations, esp.
#4 dropping another big dependency (regex) at least for one tool.

[0] https://lore.proxmox.com/pve-devel/f5a03ff5-7190-4d19-8fa9-3a93bffc1eb6@proxmox.com/

Christoph Heiss (5):
  common: introduce simple cli subcommand parser based on pico-args
  chroot: replace clap with pico-args for command argument parsing
  assistant: replace clap with pico-args for command argument parsing
  chroot: replace btrfs parsing regex with lsblk json parsing
  tui: drop unused dependencies from manifest

 Cargo.toml                                 |   1 +
 debian/control                             |   2 +-
 proxmox-auto-install-assistant/Cargo.toml  |   6 +-
 proxmox-auto-install-assistant/src/main.rs | 536 +++++++++++++++------
 proxmox-auto-installer/Cargo.toml          |   1 -
 proxmox-auto-installer/src/answer.rs       |   6 +-
 proxmox-auto-installer/src/utils.rs        |   7 +-
 proxmox-chroot/Cargo.toml                  |   6 +-
 proxmox-chroot/src/main.rs                 | 207 +++++---
 proxmox-installer-common/Cargo.toml        |   4 +
 proxmox-installer-common/src/cli.rs        |  62 +++
 proxmox-installer-common/src/lib.rs        |   3 +
 proxmox-tui-installer/Cargo.toml           |   2 -
 13 files changed, 612 insertions(+), 231 deletions(-)
 create mode 100644 proxmox-installer-common/src/cli.rs

-- 
2.49.0



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel